@basis-theory/react-elements 2.2.4 → 2.5.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/main/index.js CHANGED
@@ -297,7 +297,7 @@ const $a598ed1fc49faa5f$export$d5128efc3cebc889 = /*#__PURE__*/ (0, ($parcel$int
297
297
 
298
298
 
299
299
 
300
- const $89a8c5992dc7cf9a$var$CardNumberElementC = ({ 'aria-label': ariaLabel, autoComplete: autoComplete, binLookup: binLookup, bt: bt, cardTypes: cardTypes, copyIconStyles: copyIconStyles, disabled: disabled, elementRef: elementRef, enableCopy: enableCopy, iconPosition: iconPosition, id: id, inputMode: inputMode, onBlur: onBlur, onChange: onChange, onFocus: onFocus, onKeyDown: onKeyDown, onReady: onReady, placeholder: placeholder, readOnly: readOnly, skipLuhnValidation: skipLuhnValidation, style: style, title: title, validateOnChange: validateOnChange, value: value, valueRef: valueRef })=>{
300
+ const $89a8c5992dc7cf9a$var$CardNumberElementC = ({ 'aria-label': ariaLabel, autoComplete: autoComplete, binLookup: binLookup, bt: bt, cardTypes: cardTypes, copyIconStyles: copyIconStyles, coBadgedSupport: coBadgedSupport, disabled: disabled, elementRef: elementRef, enableCopy: enableCopy, iconPosition: iconPosition, id: id, inputMode: inputMode, onBlur: onBlur, onChange: onChange, onFocus: onFocus, onKeyDown: onKeyDown, onReady: onReady, placeholder: placeholder, readOnly: readOnly, skipLuhnValidation: skipLuhnValidation, style: style, title: title, validateOnChange: validateOnChange, value: value, valueRef: valueRef })=>{
301
301
  const wrapperRef = (0, $6ZdRe$react.useRef)(null);
302
302
  const element = (0, $515e46363124517b$export$93e1bc7222cfbdc8)(id, 'cardNumber', wrapperRef, {
303
303
  'aria-label': ariaLabel,
@@ -305,6 +305,7 @@ const $89a8c5992dc7cf9a$var$CardNumberElementC = ({ 'aria-label': ariaLabel, aut
305
305
  binLookup: binLookup,
306
306
  cardTypes: cardTypes,
307
307
  copyIconStyles: copyIconStyles,
308
+ coBadgedSupport: coBadgedSupport,
308
309
  disabled: disabled,
309
310
  enableCopy: enableCopy,
310
311
  iconPosition: iconPosition,
package/module/module.js CHANGED
@@ -262,7 +262,7 @@ const $b04bbbda03b8923f$export$d5128efc3cebc889 = /*#__PURE__*/ (0, $gb0K4$react
262
262
 
263
263
 
264
264
 
265
- const $c9d0638264a6246e$var$CardNumberElementC = ({ 'aria-label': ariaLabel, autoComplete: autoComplete, binLookup: binLookup, bt: bt, cardTypes: cardTypes, copyIconStyles: copyIconStyles, disabled: disabled, elementRef: elementRef, enableCopy: enableCopy, iconPosition: iconPosition, id: id, inputMode: inputMode, onBlur: onBlur, onChange: onChange, onFocus: onFocus, onKeyDown: onKeyDown, onReady: onReady, placeholder: placeholder, readOnly: readOnly, skipLuhnValidation: skipLuhnValidation, style: style, title: title, validateOnChange: validateOnChange, value: value, valueRef: valueRef })=>{
265
+ const $c9d0638264a6246e$var$CardNumberElementC = ({ 'aria-label': ariaLabel, autoComplete: autoComplete, binLookup: binLookup, bt: bt, cardTypes: cardTypes, copyIconStyles: copyIconStyles, coBadgedSupport: coBadgedSupport, disabled: disabled, elementRef: elementRef, enableCopy: enableCopy, iconPosition: iconPosition, id: id, inputMode: inputMode, onBlur: onBlur, onChange: onChange, onFocus: onFocus, onKeyDown: onKeyDown, onReady: onReady, placeholder: placeholder, readOnly: readOnly, skipLuhnValidation: skipLuhnValidation, style: style, title: title, validateOnChange: validateOnChange, value: value, valueRef: valueRef })=>{
266
266
  const wrapperRef = (0, $gb0K4$useRef)(null);
267
267
  const element = (0, $001f9ef7a572da43$export$93e1bc7222cfbdc8)(id, 'cardNumber', wrapperRef, {
268
268
  'aria-label': ariaLabel,
@@ -270,6 +270,7 @@ const $c9d0638264a6246e$var$CardNumberElementC = ({ 'aria-label': ariaLabel, aut
270
270
  binLookup: binLookup,
271
271
  cardTypes: cardTypes,
272
272
  copyIconStyles: copyIconStyles,
273
+ coBadgedSupport: coBadgedSupport,
273
274
  disabled: disabled,
274
275
  enableCopy: enableCopy,
275
276
  iconPosition: iconPosition,
package/package.json CHANGED
@@ -1,7 +1,10 @@
1
1
  {
2
2
  "name": "@basis-theory/react-elements",
3
- "version": "2.2.4",
4
- "repository": "https://github.com/basis-theory/react-elements",
3
+ "version": "2.5.0",
4
+ "repository": {
5
+ "type": "git",
6
+ "url": "https://github.com/basis-theory/react-elements.git"
7
+ },
5
8
  "license": "Apache-2.0",
6
9
  "author": {
7
10
  "name": "Basis Theory",
@@ -30,7 +33,7 @@
30
33
  "tag": "latest"
31
34
  },
32
35
  "dependencies": {
33
- "@basis-theory/web-elements": "2.2.4"
36
+ "@basis-theory/web-elements": "2.5.0"
34
37
  },
35
38
  "peerDependencies": {
36
39
  "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
package/types/index.d.ts CHANGED
@@ -273,7 +273,7 @@ interface AutoCompleteOption {
273
273
  interface CardAutoCompleteOption {
274
274
  autoComplete?: CardElementAutoComplete;
275
275
  }
276
- export type CustomizableElementOptions = Pick<ElementOptions, 'binLookup' | 'cardTypes' | 'copyIconStyles' | 'coBadgedSupport' | 'disabled' | 'enableCopy' | 'inputMode' | 'readOnly' | 'skipLuhnValidation' | 'style' | 'validateOnChange'> & AutoCompleteOption;
276
+ export type CustomizableElementOptions = Pick<ElementOptions, 'binLookup' | 'cardTypes' | 'copyIconStyles' | 'disabled' | 'enableCopy' | 'inputMode' | 'readOnly' | 'skipLuhnValidation' | 'style' | 'validateOnChange'> & AutoCompleteOption;
277
277
  export type CardCustomizableElementOptions = Pick<ElementOptions, 'binLookup' | 'cardTypes' | 'copyIconStyles' | 'disabled' | 'enableCopy' | 'inputMode' | 'readOnly' | 'skipLuhnValidation' | 'style' | 'validateOnChange'> & CardAutoCompleteOption;
278
278
  type ElementValueType = 'static' | 'reference';
279
279
  export interface CardElementValue<T extends ElementValueType> {
@@ -309,6 +309,7 @@ export type CreateTextElementOptions = CustomizableElementOptions & Pick<Element
309
309
  export type UpdateTextElementOptions = Omit<CreateTextElementOptions, 'targetId' | 'mask' | 'validateOnChange'>;
310
310
  export type CreateCardNumberElementOptions = CustomizableElementOptions & Pick<ElementOptions, 'binLookup' | 'placeholder' | 'iconPosition' | 'cardTypes' | 'skipLuhnValidation' | 'title'> & Required<Pick<ElementOptions, 'targetId'>> & {
311
311
  'aria-label'?: string;
312
+ coBadgedSupport?: CoBadgedSupport[];
312
313
  value?: string;
313
314
  };
314
315
  export type UpdateCardNumberElementOptions = Omit<CreateCardNumberElementOptions, 'targetId' | 'validateOnChange' | 'enableCopy'>;
@@ -455,8 +456,8 @@ export type EncryptTokenModel<DataType = Primitive> = {
455
456
  tokenRequests: {
456
457
  [key: string]: Pick<CreateTokenModel<DataType>, 'data' | 'type'>;
457
458
  } | Pick<CreateTokenModel<DataType>, 'data' | 'type'>;
458
- public_key: string;
459
- key_id: string;
459
+ publicKeyPem: string;
460
+ keyId: string;
460
461
  };
461
462
  type EncryptedSingleToken = {
462
463
  encrypted: string;
@@ -547,6 +548,7 @@ interface RequestOptions {
547
548
  apiKey?: string;
548
549
  correlationId?: string;
549
550
  idempotencyKey?: string;
551
+ deviceInfo?: DeviceInfo;
550
552
  }
551
553
  type Create<T, C> = {
552
554
  create(model: C, options?: RequestOptions): Promise<T>;
@@ -704,6 +706,10 @@ export class BasisTheoryApiError extends Error {
704
706
  readonly _debug?: Record<string, unknown> | undefined;
705
707
  constructor(message: string, status: number, data?: unknown | undefined, _debug?: Record<string, unknown> | undefined);
706
708
  }
709
+ export class BasisTheoryConfigurationError<Details = Record<string, unknown>> extends Error {
710
+ readonly details: Details;
711
+ constructor(message: string, details: Details);
712
+ }
707
713
  export class HttpClientError extends Error {
708
714
  readonly status: number;
709
715
  readonly data?: unknown;
@@ -781,6 +787,7 @@ export interface CardNumberElementProps {
781
787
  bt?: BasisTheoryElements;
782
788
  cardTypes?: CreditCardType[];
783
789
  copyIconStyles?: CopyIconStyles;
790
+ coBadgedSupport?: CoBadgedSupport[];
784
791
  disabled?: boolean;
785
792
  enableCopy?: boolean;
786
793
  iconPosition?: SanitizedElementOptions['iconPosition'];