@basis-theory/basis-theory-js 1.32.0 → 1.32.1

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.
@@ -3,4 +3,5 @@ declare const ELEMENTS_NOM_DOM_ERROR_MESSAGE = "Tried to load BasisTheoryElement
3
3
  declare const ELEMENTS_SCRIPT_LOAD_ERROR_MESSAGE = "BasisTheoryElements did not load properly.";
4
4
  declare const ELEMENTS_SCRIPT_UNKNOWN_ERROR_MESSAGE = "There was an unknown error when loading BasisTheoryElements";
5
5
  declare const CARD_BRANDS: readonly ["visa", "mastercard", "american-express", "discover", "diners-club", "jcb", "unionpay", "maestro", "elo", "hiper", "hipercard", "mir", "unknown"];
6
- export { ELEMENTS_INIT_ERROR_MESSAGE, ELEMENTS_NOM_DOM_ERROR_MESSAGE, ELEMENTS_SCRIPT_LOAD_ERROR_MESSAGE, ELEMENTS_SCRIPT_UNKNOWN_ERROR_MESSAGE, CARD_BRANDS, };
6
+ declare const CARD_ICON_POSITIONS: readonly ["left", "right", "none"];
7
+ export { ELEMENTS_INIT_ERROR_MESSAGE, ELEMENTS_NOM_DOM_ERROR_MESSAGE, ELEMENTS_SCRIPT_LOAD_ERROR_MESSAGE, ELEMENTS_SCRIPT_UNKNOWN_ERROR_MESSAGE, CARD_BRANDS, CARD_ICON_POSITIONS, };
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.ELEMENTS_SCRIPT_UNKNOWN_ERROR_MESSAGE = exports.ELEMENTS_SCRIPT_LOAD_ERROR_MESSAGE = exports.ELEMENTS_NOM_DOM_ERROR_MESSAGE = exports.ELEMENTS_INIT_ERROR_MESSAGE = exports.CARD_BRANDS = void 0;
6
+ exports.ELEMENTS_SCRIPT_UNKNOWN_ERROR_MESSAGE = exports.ELEMENTS_SCRIPT_LOAD_ERROR_MESSAGE = exports.ELEMENTS_NOM_DOM_ERROR_MESSAGE = exports.ELEMENTS_INIT_ERROR_MESSAGE = exports.CARD_ICON_POSITIONS = exports.CARD_BRANDS = void 0;
7
7
  const ELEMENTS_INIT_ERROR_MESSAGE = 'BasisTheory Elements was not properly initialized.';
8
8
  exports.ELEMENTS_INIT_ERROR_MESSAGE = ELEMENTS_INIT_ERROR_MESSAGE;
9
9
  const ELEMENTS_NOM_DOM_ERROR_MESSAGE = 'Tried to load BasisTheoryElements in a non-DOM environment.';
@@ -13,4 +13,6 @@ exports.ELEMENTS_SCRIPT_LOAD_ERROR_MESSAGE = ELEMENTS_SCRIPT_LOAD_ERROR_MESSAGE;
13
13
  const ELEMENTS_SCRIPT_UNKNOWN_ERROR_MESSAGE = 'There was an unknown error when loading BasisTheoryElements';
14
14
  exports.ELEMENTS_SCRIPT_UNKNOWN_ERROR_MESSAGE = ELEMENTS_SCRIPT_UNKNOWN_ERROR_MESSAGE;
15
15
  const CARD_BRANDS = ['visa', 'mastercard', 'american-express', 'discover', 'diners-club', 'jcb', 'unionpay', 'maestro', 'elo', 'hiper', 'hipercard', 'mir', 'unknown'];
16
- exports.CARD_BRANDS = CARD_BRANDS;
16
+ exports.CARD_BRANDS = CARD_BRANDS;
17
+ const CARD_ICON_POSITIONS = ['left', 'right', 'none'];
18
+ exports.CARD_ICON_POSITIONS = CARD_ICON_POSITIONS;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@basis-theory/basis-theory-js",
3
- "version": "1.32.0",
3
+ "version": "1.32.1",
4
4
  "repository": "https://github.com/Basis-Theory/basis-theory-js",
5
5
  "license": "Apache-2.0",
6
6
  "author": {
@@ -16,7 +16,7 @@ interface SanitizedElementOptions {
16
16
  transform?: [RegExp, string] | null;
17
17
  ariaDescription?: string;
18
18
  ariaLabel?: string;
19
- iconPosition?: 'left' | 'right' | 'none';
19
+ iconPosition?: string;
20
20
  cardBrand?: string;
21
21
  }
22
22
  declare type ElementOptions = ElementInternalOptions & SanitizedElementOptions;
@@ -1,4 +1,4 @@
1
- import { CARD_BRANDS } from '@/elements/constants';
1
+ import { CARD_BRANDS, CARD_ICON_POSITIONS } from '@/elements/constants';
2
2
  declare type FieldErrorType = 'incomplete' | 'invalid';
3
3
  declare type ConfigErrorType = 'missing-configuration' | 'missing-permission' | 'invalid-configuration';
4
4
  interface ConfigError {
@@ -20,4 +20,8 @@ interface PropertyError {
20
20
  * Card brands type
21
21
  */
22
22
  declare type Brand = typeof CARD_BRANDS[number];
23
- export type { FieldErrorType, ConfigErrorType, ConfigError, Targeted, ListenableKey, FieldError, PropertyError, Brand, };
23
+ /**
24
+ * Icon position for card number element
25
+ */
26
+ declare type CardIconPosition = typeof CARD_ICON_POSITIONS[number];
27
+ export type { FieldErrorType, ConfigErrorType, ConfigError, Targeted, ListenableKey, FieldError, PropertyError, Brand, CardIconPosition, };