@trustpayments/js-payments-card 2.2.1077 → 2.2.1079

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.
Files changed (37) hide show
  1. package/dist/index.cjs +45 -0
  2. package/dist/index.d.ts +59 -4
  3. package/dist/index.js +3225 -2806
  4. package/package.json +14 -14
  5. package/dist/components/card/Card.component.d.ts +0 -47
  6. package/dist/components/card/Card.interface.d.ts +0 -9
  7. package/dist/components/card/Card.spec.d.ts +0 -4
  8. package/dist/components/card/CardLogos.const.d.ts +0 -3
  9. package/dist/components/card/CardProperties.const.d.ts +0 -36
  10. package/dist/components/card/CardSelectors.const.d.ts +0 -30
  11. package/dist/components/card/CardType.const.d.ts +0 -18
  12. package/dist/components/card-wrapper/CardWrapper.d.ts +0 -34
  13. package/dist/components/card-wrapper/CardWrapper.interface.d.ts +0 -20
  14. package/dist/components/card-wrapper/CardWrapper.spec.d.ts +0 -4
  15. package/dist/index.umd.js +0 -45
  16. package/dist/js-payments-card.css +0 -1
  17. package/dist/services/dom-methods/DomMethods.service.d.ts +0 -8
  18. package/dist/services/dom-methods/DomMethods.service.spec.d.ts +0 -4
  19. package/dist/services/formatter/Formatter.service.d.ts +0 -15
  20. package/dist/services/formatter/Formatter.service.spec.d.ts +0 -4
  21. package/dist/services/translator/Translation.service.spec.d.ts +0 -4
  22. package/dist/services/translator/Translator.service.d.ts +0 -11
  23. package/dist/services/utils/Utils.service.d.ts +0 -17
  24. package/dist/services/utils/Utils.service.spec.d.ts +0 -4
  25. package/dist/services/validator/Validator.service.d.ts +0 -38
  26. package/dist/services/validator/Validator.service.spec.d.ts +0 -4
  27. package/dist/shared/translations/cy_GB.json.d.ts +0 -9
  28. package/dist/shared/translations/da_DK.json.d.ts +0 -9
  29. package/dist/shared/translations/de_DE.json.d.ts +0 -9
  30. package/dist/shared/translations/en_GB.json.d.ts +0 -9
  31. package/dist/shared/translations/en_US.json.d.ts +0 -9
  32. package/dist/shared/translations/es_ES.json.d.ts +0 -9
  33. package/dist/shared/translations/fr_FR.json.d.ts +0 -9
  34. package/dist/shared/translations/it_IT.json.d.ts +0 -9
  35. package/dist/shared/translations/nl_NL.json.d.ts +0 -9
  36. package/dist/shared/translations/no_NO.json.d.ts +0 -9
  37. package/dist/shared/translations/sv_SE.json.d.ts +0 -9
@@ -1,8 +0,0 @@
1
- export declare class DomMethods {
2
- static addClass: (element: HTMLElement, classToAdd: string) => void;
3
- static appendChildIntoDOM(target: string, child: HTMLElement): HTMLElement;
4
- static createHtmlElement: (attributes: Record<string, string>, markup: string) => HTMLElement;
5
- static removeClass: (element: HTMLElement, classToRemove: string) => void;
6
- static removeChildFromDOM(parentId: string, childId: string): HTMLElement;
7
- static setProperty(attr: string, value: string, elementId: string): HTMLElement;
8
- }
@@ -1,4 +0,0 @@
1
- /**
2
- * @jest-environment jsdom
3
- */
4
- export {};
@@ -1,15 +0,0 @@
1
- import { Validator } from '../validator/Validator.service';
2
- export declare class Formatter extends Validator {
3
- private blocks;
4
- private cardNumberFormatted;
5
- private dateBlocks;
6
- constructor(locale: string);
7
- number(cardNumber: string, id: string): {
8
- value: string;
9
- nonformat: string;
10
- };
11
- date(value: string, id?: string, outsideValue?: boolean): string;
12
- code(value: string, id?: string, outsideValue?: boolean): string;
13
- private dateISO;
14
- private dateFixed;
15
- }
@@ -1,4 +0,0 @@
1
- /**
2
- * @jest-environment jsdom
3
- */
4
- export {};
@@ -1,4 +0,0 @@
1
- /**
2
- * @jest-environment jsdom
3
- */
4
- export {};
@@ -1,11 +0,0 @@
1
- export declare class Translator {
2
- static get translations(): {
3
- LABEL_CARD_NUMBER: string;
4
- LABEL_EXPIRATION_DATE: string;
5
- LABEL_SECURITY_CODE: string;
6
- PLACEHOLDER_EXPIRATION_DATE: string;
7
- };
8
- private translationLookup;
9
- constructor(locale: string);
10
- translate: (text: string) => string;
11
- }
@@ -1,17 +0,0 @@
1
- import { Translator } from '../translator/Translator.service';
2
- export declare class Utils {
3
- static ifElementExists(id: string): HTMLInputElement;
4
- static inArray<T>(array: ArrayLike<T>, item: T): boolean;
5
- static getLastElementOfArray: (array: number[]) => number;
6
- static setElementAttributes(attributes: Record<string, string>, element: HTMLInputElement): void;
7
- static stripChars(string: string, regex?: RegExp): string;
8
- static forEachBreak<TInputType, TReturnType>(iterable: ArrayLike<TInputType>, callback: (item: TInputType) => TReturnType): TReturnType | null;
9
- protected translator: Translator;
10
- constructor();
11
- protected getElement: (id: string) => HTMLInputElement;
12
- protected getContent: (value: string, placeholder: string) => string;
13
- protected setContent: (id: string, text: string) => string;
14
- protected setAttr: (id: string, attr: string, value: string) => void;
15
- protected toLower: (content: string | null) => string;
16
- protected clearContent: (id: string) => string;
17
- }
@@ -1,4 +0,0 @@
1
- /**
2
- * @jest-environment jsdom
3
- */
4
- export {};
@@ -1,38 +0,0 @@
1
- import { BrandDetailsType } from '@trustpayments/ts-iin-lookup/dist/types';
2
- export declare class Validator {
3
- protected static STANDARD_FORMAT_PATTERN: string;
4
- private static backspaceKeyCode;
5
- private static cardNumberDefaultLength;
6
- private static deleteKeyCode;
7
- private static matchChars;
8
- private static matchDigits;
9
- private static securityCodeDefaultLength;
10
- private static errorClass;
11
- private static cursorSingleSkip;
12
- private static cursorDoubleSkip;
13
- protected cardNumberValue: string;
14
- protected expirationDateValue: string;
15
- protected securityCodeValue: string;
16
- private translator;
17
- private currentKeyCode;
18
- private selectionRangeEnd;
19
- private selectionRangeStart;
20
- private matchDigitsRegexp;
21
- private cursorSkip;
22
- constructor(locale: string);
23
- setKeyDownProperties(element: HTMLInputElement, event: KeyboardEvent): void;
24
- keepCursorAtSamePosition(element: HTMLInputElement): void;
25
- luhnCheck(element: HTMLInputElement): void;
26
- validate(element: HTMLInputElement, errorContainer: HTMLElement): void;
27
- onPaste(event: ClipboardEvent): DataTransfer | string;
28
- protected cardNumber(value: string): void;
29
- protected expirationDate(value: string): void;
30
- protected securityCode(value: string): void;
31
- protected getCardDetails(cardNumber?: string): BrandDetailsType;
32
- protected isPressedKeyBackspace(): boolean;
33
- protected isPressedKeyDelete(): boolean;
34
- protected limitLength(value: string, length: number): string;
35
- protected removeNonDigits(value: string): string;
36
- private setError;
37
- private removeError;
38
- }
@@ -1,4 +0,0 @@
1
- /**
2
- * @jest-environment jsdom
3
- */
4
- export {};
@@ -1,9 +0,0 @@
1
- declare const _default: {
2
- "Card number": "Rhif y cerdyn",
3
- "Expiration date": "Dyddiad dod i ben",
4
- "Security code": "Cod diogelwch",
5
- "MM/YY": "MM/BB"
6
- }
7
- ;
8
-
9
- export default _default;
@@ -1,9 +0,0 @@
1
- declare const _default: {
2
- "Card number": "Kortnummer",
3
- "Expiration date": "Udløbsdato",
4
- "Security code": "Sikkerhedskode",
5
- "MM/YY": "MM/ÅÅ"
6
- }
7
- ;
8
-
9
- export default _default;
@@ -1,9 +0,0 @@
1
- declare const _default: {
2
- "Card number": "Kartennummer",
3
- "Expiration date": "Ablaufdatum",
4
- "Security code": "Sicherheitscode",
5
- "MM/YY": "MM/JJ"
6
- }
7
- ;
8
-
9
- export default _default;
@@ -1,9 +0,0 @@
1
- declare const _default: {
2
- "Card number": "Card number",
3
- "Expiration date": "Expiration date",
4
- "Security code": "Security code",
5
- "MM/YY": "MM/YY"
6
- }
7
- ;
8
-
9
- export default _default;
@@ -1,9 +0,0 @@
1
- declare const _default: {
2
- "Card number": "Card number",
3
- "Expiration date": "Expiration date",
4
- "Security code": "Security code",
5
- "MM/YY": "MM/YY"
6
- }
7
- ;
8
-
9
- export default _default;
@@ -1,9 +0,0 @@
1
- declare const _default: {
2
- "Card number": "Número de tarjeta",
3
- "Expiration date": "Fecha de vencimiento",
4
- "Security code": "Código de seguridad",
5
- "MM/YY": "MM/AA"
6
- }
7
- ;
8
-
9
- export default _default;
@@ -1,9 +0,0 @@
1
- declare const _default: {
2
- "Card number": "Numéro de carte",
3
- "Expiration date": "Date d'expiration",
4
- "Security code": "Code de sécurité",
5
- "MM/YY": "MM/AA"
6
- }
7
- ;
8
-
9
- export default _default;
@@ -1,9 +0,0 @@
1
- declare const _default: {
2
- "Card number": "Numero di carta",
3
- "Expiration date": "Data di scadenza",
4
- "Security code": "Codice di sicurezza",
5
- "MM/YY": "MM/AA"
6
- }
7
- ;
8
-
9
- export default _default;
@@ -1,9 +0,0 @@
1
- declare const _default: {
2
- "Card number": "Kaartnummer",
3
- "Expiration date": "Vervaldatum",
4
- "Security code": "Beveiligingscode",
5
- "MM/YY": "MM/JJ"
6
- }
7
- ;
8
-
9
- export default _default;
@@ -1,9 +0,0 @@
1
- declare const _default: {
2
- "Card number": "Kortnummer",
3
- "Expiration date": "Utløpsdato",
4
- "Security code": "Sikkerhetskode",
5
- "MM/YY": "MM/ÅÅ"
6
- }
7
- ;
8
-
9
- export default _default;
@@ -1,9 +0,0 @@
1
- declare const _default: {
2
- "Card number": "Kortnummer",
3
- "Expiration date": "Sista giltighetsdatum",
4
- "Security code": "Säkerhetskod",
5
- "MM/YY": "MM/ÅÅ"
6
- }
7
- ;
8
-
9
- export default _default;