@basis-theory/react-elements 1.19.0 → 1.20.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/package.json +2 -2
- package/types/index.d.ts +10 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@basis-theory/react-elements",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.20.0",
|
|
4
4
|
"repository": "https://github.com/basis-theory/react-elements",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"tag": "latest"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@basis-theory/web-elements": "1.
|
|
33
|
+
"@basis-theory/web-elements": "1.20.0"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
package/types/index.d.ts
CHANGED
|
@@ -155,8 +155,11 @@ export interface ElementInternalOptions {
|
|
|
155
155
|
apiKey: string | undefined;
|
|
156
156
|
baseUrl: string;
|
|
157
157
|
type: ElementType;
|
|
158
|
+
debug: boolean | undefined;
|
|
159
|
+
disableTelemetry: boolean | undefined;
|
|
158
160
|
useNgApi: boolean | undefined;
|
|
159
161
|
useSameOriginApi: boolean | undefined;
|
|
162
|
+
useUat: boolean | undefined;
|
|
160
163
|
}
|
|
161
164
|
export enum InputMode {
|
|
162
165
|
DECIMAL = "decimal",
|
|
@@ -201,7 +204,11 @@ interface TransformOption {
|
|
|
201
204
|
interface AutoCompleteOption {
|
|
202
205
|
autoComplete?: AutoCompleteValue;
|
|
203
206
|
}
|
|
207
|
+
interface CardAutoCompleteOption {
|
|
208
|
+
autoComplete?: CardElementAutoComplete;
|
|
209
|
+
}
|
|
204
210
|
export type CustomizableElementOptions = Pick<ElementOptions, 'cardTypes' | 'copyIconStyles' | 'disabled' | 'enableCopy' | 'inputMode' | 'readOnly' | 'skipLuhnValidation' | 'style' | 'validateOnChange'> & AutoCompleteOption;
|
|
211
|
+
export type CardCustomizableElementOptions = Pick<ElementOptions, 'cardTypes' | 'copyIconStyles' | 'disabled' | 'enableCopy' | 'inputMode' | 'readOnly' | 'skipLuhnValidation' | 'style' | 'validateOnChange'> & CardAutoCompleteOption;
|
|
205
212
|
type ElementValueType = 'static' | 'reference';
|
|
206
213
|
export interface CardElementValue<T extends ElementValueType> {
|
|
207
214
|
cvc?: T extends 'reference' ? DataElementReference : string;
|
|
@@ -223,8 +230,7 @@ export interface CardElementAutoComplete {
|
|
|
223
230
|
expirationDate: AutoCompleteValue;
|
|
224
231
|
csc: AutoCompleteValue;
|
|
225
232
|
}
|
|
226
|
-
export type CreateCardElementOptions =
|
|
227
|
-
autoComplete?: CardElementAutoComplete;
|
|
233
|
+
export type CreateCardElementOptions = CardCustomizableElementOptions & Pick<ElementOptions, 'cardTypes' | 'skipLuhnValidation' | 'title'> & {
|
|
228
234
|
placeholder?: CardElementPlaceholder;
|
|
229
235
|
value?: CardElementValue<'static'>;
|
|
230
236
|
};
|
|
@@ -560,7 +566,7 @@ export interface BasisTheoryElements {
|
|
|
560
566
|
createElement(type: 'cardVerificationCode', options: CreateCardVerificationCodeElementOptions): ICardVerificationCodeElement;
|
|
561
567
|
}
|
|
562
568
|
export interface BasisTheoryElementsInternal extends BasisTheoryElements {
|
|
563
|
-
init: (apiKey: string | undefined, elementsBaseUrl: string, elementsUseNgApi: boolean | undefined, elementsUseSameOriginApi: boolean | undefined, disableTelemetry: boolean | undefined, debug: boolean | undefined) => Promise<BasisTheoryElements>;
|
|
569
|
+
init: (apiKey: string | undefined, elementsBaseUrl: string, elementsUseNgApi: boolean | undefined, elementsUseSameOriginApi: boolean | undefined, disableTelemetry: boolean | undefined, debug: boolean | undefined, useUat: boolean | undefined) => Promise<BasisTheoryElements>;
|
|
564
570
|
hasElement: (payload: unknown) => boolean;
|
|
565
571
|
}
|
|
566
572
|
declare global {
|
|
@@ -572,6 +578,7 @@ export interface BasisTheoryInitOptions {
|
|
|
572
578
|
_devMode?: boolean;
|
|
573
579
|
disableTelemetry?: boolean;
|
|
574
580
|
useSameOriginApi?: boolean;
|
|
581
|
+
useUat?: boolean;
|
|
575
582
|
debug?: boolean;
|
|
576
583
|
}
|
|
577
584
|
export const basistheory: (apiKey: string, options?: BasisTheoryInitOptions) => Promise<BasisTheoryElements | undefined>;
|