@globalpayments/js 4.0.9 → 4.0.11

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 (54) hide show
  1. package/README.md +1 -1
  2. package/package.json +2 -7
  3. package/types/apm/qr-code-payments/enums.d.ts +1 -2
  4. package/types/common/currency.d.ts +0 -1
  5. package/types/common/enums.d.ts +1 -8
  6. package/types/common/html-element.d.ts +0 -27
  7. package/types/internal/built-in-validations/messages.d.ts +0 -3
  8. package/types/internal/gateways/gp-api/index.d.ts +1 -2
  9. package/types/internal/gateways/index.d.ts +1 -6
  10. package/types/internal/lib/card.d.ts +0 -29
  11. package/types/internal/lib/detectLanguage.d.ts +0 -1
  12. package/types/internal/lib/eums.d.ts +11 -0
  13. package/types/internal/lib/styles/built-in-validations/simple.d.ts +0 -3
  14. package/types/internal/lib/styles/default.d.ts +0 -262
  15. package/types/internal/lib/styles/gp-default.d.ts +47 -255
  16. package/types/internal/lib/styles/qr-code-payments/common.d.ts +0 -8
  17. package/types/internal/lib/styles/simple.d.ts +0 -265
  18. package/types/internal/lib/translations/en.d.ts +0 -15
  19. package/types/internal/validators/expiration.d.ts +0 -7
  20. package/types/lib/version.d.ts +1 -1
  21. package/types/tools/configure.d.ts +0 -8
  22. package/types/ui/form/index.d.ts +113 -856
  23. package/types/ui/iframe-field/index.d.ts +1 -1
  24. package/types/common/helpers.d.ts +0 -4
  25. package/types/internal/gateways/gp-api/action-query-currency-conversion.d.ts +0 -3
  26. package/types/internal/lib/currency-conversion/components/enums.d.ts +0 -5
  27. package/types/internal/lib/currency-conversion/components/events.d.ts +0 -8
  28. package/types/internal/lib/currency-conversion/components/template.d.ts +0 -7
  29. package/types/internal/lib/currency-conversion/contracts/constants.d.ts +0 -5
  30. package/types/internal/lib/currency-conversion/contracts/enums.d.ts +0 -15
  31. package/types/internal/lib/currency-conversion/contracts/interfaces.d.ts +0 -13
  32. package/types/internal/lib/currency-conversion/requests/query-currency-conversion.d.ts +0 -3
  33. package/types/internal/lib/currency-conversion/utils/helpers.d.ts +0 -8
  34. package/types/internal/lib/currency-conversion/utils/reset-currency-conversion.d.ts +0 -7
  35. package/types/internal/lib/styles/currency-conversion/common.d.ts +0 -191
  36. package/types/internal/lib/styles/currency-conversion/default.d.ts +0 -204
  37. package/types/internal/lib/styles/currency-conversion/gp-default.d.ts +0 -197
  38. package/types/internal/lib/styles/currency-conversion/simple.d.ts +0 -204
  39. package/types/internal/lib/styles/tooltip/common.d.ts +0 -65
  40. package/types/ui/iframe-field/apple-pay/action-add.d.ts +0 -2
  41. package/types/ui/iframe-field/click-to-pay/action-add.d.ts +0 -2
  42. package/types/ui/iframe-field/currency-conversion/action-add.d.ts +0 -9
  43. package/types/ui/iframe-field/currency-conversion/action-get-value.d.ts +0 -8
  44. package/types/ui/iframe-field/currency-conversion/action-request-accumulate-data.d.ts +0 -9
  45. package/types/ui/iframe-field/currency-conversion/action-request-data.d.ts +0 -9
  46. package/types/ui/iframe-field/currency-conversion/action-request-start.d.ts +0 -8
  47. package/types/ui/iframe-field/google-pay/action-add.d.ts +0 -2
  48. package/types/ui/iframe-field/installments/action-add.d.ts +0 -3
  49. package/types/ui/iframe-field/installments/action-request-accumulate-data.d.ts +0 -3
  50. package/types/ui/iframe-field/installments/action-request-data.d.ts +0 -3
  51. package/types/ui/iframe-field/installments/action-request-start.d.ts +0 -6
  52. package/types/ui/iframe-field/open-banking/action-add.d.ts +0 -2
  53. package/types/ui/iframe-field/qr-code-payment-methods/action-add.d.ts +0 -3
  54. package/types/ui/iframe-field/qr-code-payment-methods/action-request-start.d.ts +0 -6
package/README.md CHANGED
@@ -24,7 +24,7 @@ This plugin allows you to use online payments (eCommerce) features of a variety
24
24
  ## Usage
25
25
 
26
26
  ```html
27
- <script src="https://js.globalpay.com/4.0.9/globalpayments.js"></script>
27
+ <script src="https://js.globalpay.com/4.0.11/globalpayments.js"></script>
28
28
  ```
29
29
 
30
30
  > Note: Installing via NPM will only provide TypeScript types for type-checking.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@globalpayments/js",
3
- "version": "4.0.9",
3
+ "version": "4.0.11",
4
4
  "author": "Heartland Developer Portal <developers@heartland.us>",
5
5
  "license": "GPL-2.0",
6
6
  "repository": {
@@ -17,15 +17,10 @@
17
17
  "clean": "rimraf dist",
18
18
  "cypress:open": "cypress open",
19
19
  "format": "prettier --write config/**/* src/**/* !src/assets/**/* !test/run.sh !test/run.ps1 test/fixtures/**/*.html",
20
-
21
- "postbuild": "xcopy src\\assets dist\\ /e/y/h && node bin/replace-gp-ref.js",
22
-
20
+ "postbuild": "cross-os postbuild-cross",
23
21
  "prebuild": "yarn test:lint && node bin/update-version.js",
24
22
  "prepublish": "yarn build",
25
-
26
23
  "test": "cross-os test-cross",
27
-
28
-
29
24
  "test:integration": "cypress run",
30
25
  "test:lint": "tslint --project tsconfig.json",
31
26
  "test:serve": "serve -p 7777"
@@ -5,6 +5,5 @@ export declare const enum QRCodePaymentsInternalEvents {
5
5
  }
6
6
  export declare const enum QRCodePaymentsActions {
7
7
  RedirectAction = "REDIRECT",
8
- RedirectInFrameAction = "REDIRECT_IN_FRAME",
9
- PresentQRCodeAction = "PRESENT_QR_CODE"
8
+ RedirectInFrameAction = "REDIRECT_IN_FRAME"
10
9
  }
@@ -5,4 +5,3 @@ export declare const availableCurrencies: {
5
5
  code: string;
6
6
  symbol: string;
7
7
  }[];
8
- export declare const convertAmount: (amount: string, withoutDecimals?: boolean, decimalPlaces?: number) => string | void;
@@ -17,8 +17,7 @@ export declare enum HostedFieldValidationEvents {
17
17
  ValidatePassData = "hosted-field-validate-pass-data",
18
18
  ValidateForm = "hosted-field-validate-form",
19
19
  ValidateFormValid = "hosted-field-validate-form-valid",
20
- ValidateFormInvalid = "hosted-field-validate-form-invalid",
21
- ValidationCurrencyConversionShow = "hosted-field-validation-currency-conversion-show"
20
+ ValidateFormInvalid = "hosted-field-validate-form-invalid"
22
21
  }
23
22
  export declare enum CardFormFieldValidationTestEvents {
24
23
  CardNumber = "card-number-test",
@@ -26,9 +25,3 @@ export declare enum CardFormFieldValidationTestEvents {
26
25
  CardCvv = "card-cvv-test",
27
26
  CardHolderName = "card-holder-name-test"
28
27
  }
29
- export declare enum Environments {
30
- Local = "local",
31
- QA = "qa",
32
- Sandbox = "sandbox",
33
- Production = "production"
34
- }
@@ -77,19 +77,6 @@ export declare const createHtmlCheckboxElement: (props?: {
77
77
  textContent?: string | undefined;
78
78
  checked: boolean;
79
79
  } | undefined) => HTMLInputElement;
80
- export declare const createHtmlRadioButtonElement: (props?: {
81
- id?: string | undefined;
82
- className?: string | undefined;
83
- attributes?: {
84
- [key: string]: string;
85
- }[] | undefined;
86
- name?: string | undefined;
87
- labelText?: string | undefined;
88
- additionalInfo?: string | undefined;
89
- checked: boolean;
90
- target?: string | undefined;
91
- value?: string | undefined;
92
- } | undefined) => HTMLDivElement;
93
80
  export declare const createHtmlLabelElement: (props?: {
94
81
  id?: string | undefined;
95
82
  className?: string | undefined;
@@ -108,17 +95,3 @@ export declare const createHtmlIFrameElement: (props?: {
108
95
  }[] | undefined;
109
96
  } | undefined) => HTMLIFrameElement;
110
97
  export declare const changeCreditCardFormFieldsVisibility: (visible: boolean) => void;
111
- export declare const createToolTip: (props?: {
112
- id?: string | undefined;
113
- className?: string | undefined;
114
- attributes?: {
115
- [key: string]: string;
116
- }[] | undefined;
117
- ariaLabel?: string | undefined;
118
- ariaDescribedBy?: string | undefined;
119
- role?: string | undefined;
120
- tabIndex?: string | undefined;
121
- title?: string | undefined;
122
- htmlContent?: string | undefined;
123
- } | undefined) => HTMLElement;
124
- export declare const createHtmlFromString: (htmlString: string) => DocumentFragment;
@@ -21,7 +21,4 @@ export declare const ValidationMessages: {
21
21
  NotValidCardHolderName: any;
22
22
  CharactersMoreThan100: any;
23
23
  };
24
- CurrencyConversion: {
25
- Required: any;
26
- };
27
24
  };
@@ -22,8 +22,7 @@ export declare const urls: {
22
22
  assetBaseUrl: (result: string) => string;
23
23
  tokenization: (prod: boolean) => string;
24
24
  queryInstallmentPlans: (prod: boolean) => string;
25
- queryCurrencyConversionUrl: () => string;
26
- getQRCodePaymentMethodsUrl: () => string;
25
+ getQRCodePaymentMethodsUrl: (prod: boolean) => string;
27
26
  };
28
27
  export declare const actions: IActions;
29
28
  export declare const requiredSettings: string[];
@@ -46,9 +46,6 @@ export interface ISuccess {
46
46
  id: string;
47
47
  reference: string;
48
48
  };
49
- currencyConversion?: {
50
- id: string;
51
- };
52
49
  };
53
50
  methodName?: string;
54
51
  payerEmail?: string;
@@ -73,15 +70,13 @@ export interface IActions {
73
70
  tokenize: (url: string, env: string, data: IDictionary) => Promise<any>;
74
71
  validateData: (data: IDictionary) => IErrorReason[];
75
72
  queryInstallmentPlans?: (url: string, env: string, data: IDictionary) => Promise<any>;
76
- queryCurrencyConversion?: (url: string, env: string, data: IDictionary) => Promise<any>;
77
73
  getQRCodePaymentMethods?: (url: string, env: string, data: IDictionary) => Promise<any>;
78
74
  }
79
75
  export interface IUrlGenerators {
80
76
  assetBaseUrl?: (result: string) => string;
81
77
  tokenization: (prod: boolean) => string;
82
78
  queryInstallmentPlans?: (prod: boolean) => string;
83
- queryCurrencyConversionUrl?: () => string;
84
- getQRCodePaymentMethodsUrl?: () => string;
79
+ getQRCodePaymentMethodsUrl?: (prod: boolean) => string;
85
80
  }
86
81
  export interface IGatewayModule {
87
82
  [key: string]: any;
@@ -119,37 +119,8 @@ export default class Card {
119
119
  * availability of use installment plans.
120
120
  *
121
121
  * @param e
122
- * @param fieldType
123
122
  */
124
123
  static validateInstallmentFields(e: Event, fieldType: string): void;
125
- /**
126
- * validateCurrencyConversionFields
127
- *
128
- * Validates a target element"s value based on the
129
- * availability of use currency conversion.
130
- *
131
- * @param e
132
- * @param fieldType
133
- */
134
- static validateCurrencyConversionFields(e: Event, fieldType: string): void;
135
- /**
136
- * currencyConversionFieldsValidatedEvent
137
- *
138
- * Post an event when an installment related card field is validated
139
- *
140
- * @param e
141
- * @param fieldType
142
- */
143
- static currencyConversionFieldsValidatedEvent(e: Event, fieldType: string): void;
144
- /**
145
- * hideCurrencyConversionField
146
- *
147
- * Hides the currency conversion field component.
148
- *
149
- * @param e
150
- * @param fieldType
151
- */
152
- static hideCurrencyConversionField(e: Event, fieldType: string): void;
153
124
  /**
154
125
  * postInstallmentFieldValidatedEvent
155
126
  *
@@ -1,4 +1,3 @@
1
1
  import { Language } from "./enums";
2
2
  export declare function setCurrentLanguage(lang?: Language): string;
3
3
  export declare function getCurrentLanguage(): string;
4
- export declare function getTranslationSet(language: string, featureSet: string): any;
@@ -0,0 +1,11 @@
1
+ export declare enum Apm {
2
+ ClickToPay = "click-to-pay",
3
+ GooglePay = "google-pay",
4
+ ApplePay = "apple-pay"
5
+ }
6
+ export declare enum CardNetwork {
7
+ Visa = "VISA",
8
+ Mastercard = "MASTERCARD",
9
+ Amex = "AMEX",
10
+ Discover = "DISCOVER"
11
+ }
@@ -7,9 +7,6 @@ export declare const fieldStyles: (assetBaseUrl: string) => {
7
7
  right: string;
8
8
  top: string;
9
9
  };
10
- "#field-validation-wrapper": {
11
- "margin-top": string;
12
- };
13
10
  "@font-face": {
14
11
  "font-family": string;
15
12
  src: string;
@@ -30,11 +30,6 @@ export declare const fieldStyles: (assetBaseUrl: string) => {
30
30
  "#secure-payment-field[type=text].hf-invalid"?: {
31
31
  border: string;
32
32
  };
33
- "#secure-payment-field[hidden]"?: {
34
- display: string;
35
- opacity: string;
36
- visibility: string;
37
- };
38
33
  "#secure-payment-field": {
39
34
  "-o-transition": string;
40
35
  "-webkit-box-shadow": string;
@@ -358,201 +353,6 @@ export declare const parentStyles: (assetBaseUrl: string) => {
358
353
  "font-size": string;
359
354
  "line-height": string;
360
355
  };
361
- ".secure-payment-form .credit-card-currency-conversion .currency-conversion-container"?: {
362
- width: string;
363
- "flex-wrap": string;
364
- };
365
- ".secure-payment-form .credit-card-currency-conversion legend"?: {
366
- "font-family": string;
367
- color: string;
368
- "font-size": string;
369
- "font-weight": string;
370
- "line-height": string;
371
- "text-transform": string;
372
- };
373
- ".secure-payment-form .credit-card-currency-conversion fieldset"?: {
374
- "font-family": string;
375
- border: string;
376
- margin: string;
377
- padding: string;
378
- display: string;
379
- "flex-wrap": string;
380
- width: string;
381
- };
382
- ".secure-payment-form .credit-card-currency-conversion .radio-button"?: {
383
- display: string;
384
- "justify-content": string;
385
- "align-items": string;
386
- border: string;
387
- padding: string;
388
- "white-space": string;
389
- height: string;
390
- "margin-right": string;
391
- };
392
- ".secure-payment-form .credit-card-currency-conversion .radio-button:last-child"?: {
393
- "margin-right": string;
394
- };
395
- ".secure-payment-form .credit-card-currency-conversion .radio-button label"?: {
396
- "font-family": string;
397
- "font-size": string;
398
- "font-weight": number;
399
- display: string;
400
- margin: string;
401
- };
402
- ".secure-payment-form .credit-card-currency-conversion .radio-button.checked label"?: {
403
- color: string;
404
- };
405
- ".secure-payment-form .credit-card-currency-conversion .merchant-currency-content"?: {
406
- opacity: string;
407
- visibility: boolean;
408
- display: string;
409
- "flex-direction": string;
410
- margin: string;
411
- "align-items": string;
412
- height: string;
413
- };
414
- ".secure-payment-form .credit-card-currency-conversion .card-currency-content"?: {
415
- opacity: string;
416
- visibility: boolean;
417
- display: string;
418
- "flex-direction": string;
419
- margin: string;
420
- "align-items": string;
421
- height: string;
422
- };
423
- ".secure-payment-form .credit-card-currency-conversion .additional-info p"?: {
424
- "font-family": string;
425
- margin: string;
426
- "font-style": string;
427
- };
428
- ".secure-payment-form .credit-card-currency-conversion .tooltip-content p"?: {
429
- "font-family": string;
430
- margin: string;
431
- };
432
- ".secure-payment-form .currency-conversion-container"?: {
433
- display: string;
434
- "flex-direction": string;
435
- "align-items": string;
436
- };
437
- ".secure-payment-form .credit-card-currency-conversion iframe"?: {
438
- "min-height": string;
439
- };
440
- ".secure-payment-form .credit-card-currency-conversion .radio-button:hover"?: {
441
- "border-color": string;
442
- };
443
- ".secure-payment-form .credit-card-currency-conversion fieldset:focus-within > .radio-button"?: {
444
- outline: string;
445
- "outline-offset": string;
446
- };
447
- ".secure-payment-form .credit-card-currency-conversion fieldset.no-focus-outline .radio-button.checked"?: {
448
- outline: string;
449
- "outline-offset": string;
450
- };
451
- ".secure-payment-form .credit-card-currency-conversion .radio-button.checked"?: {
452
- background: string;
453
- "border-color": string;
454
- color: string;
455
- outline: string;
456
- };
457
- ".secure-payment-form .credit-card-currency-conversion .radio-button input[type='radio']"?: {
458
- margin: string;
459
- appearance: string;
460
- "-webkit-appearance": string;
461
- "-moz-appearance": string;
462
- border: string;
463
- "border-radius": string;
464
- width: string;
465
- height: string;
466
- display: string;
467
- position: string;
468
- padding: string;
469
- };
470
- ".secure-payment-form .credit-card-currency-conversion .radio-button input[type='radio']:checked"?: {
471
- "background-color": string;
472
- border: string;
473
- };
474
- ".secure-payment-form .credit-card-currency-conversion .radio-button input[type='radio']:focus"?: {
475
- outline: string;
476
- };
477
- ".secure-payment-form .credit-card-currency-conversion .card-currency-content.visible"?: {
478
- display: string;
479
- opacity: string;
480
- visibility: boolean;
481
- };
482
- ".secure-payment-form .credit-card-currency-conversion .merchant-currency-content.visible"?: {
483
- display: string;
484
- opacity: string;
485
- visibility: boolean;
486
- };
487
- ".secure-payment-form .credit-card-currency-conversion .additional-info"?: {
488
- "font-family": string;
489
- "font-size": string;
490
- "font-weight": number;
491
- margin: string;
492
- display: string;
493
- };
494
- ".secure-payment-form .credit-card-currency-conversion .tooltip"?: {
495
- width: string;
496
- height: string;
497
- "min-width": string;
498
- "border-left": string;
499
- display: string;
500
- };
501
- ".secure-payment-form .credit-card-currency-conversion .tooltip:hover"?: {
502
- "border-left": string;
503
- };
504
- ".secure-payment-form .credit-card-currency-conversion .tooltip:focus"?: {
505
- "border-left": string;
506
- };
507
- ".secure-payment-form .credit-card-currency-conversion .tooltip-content"?: {
508
- bottom: string;
509
- right: string;
510
- display: string;
511
- };
512
- ".secure-payment-form .credit-card-currency-conversion .tooltip:hover .tooltip-content"?: {
513
- display: string;
514
- };
515
- ".secure-payment-form .credit-card-currency-conversion .tooltip-content p:last-child"?: {
516
- "margin-bottom": string;
517
- };
518
- ".secure-payment-form .credit-card-currency-conversion .tooltip-content::before"?: {
519
- left: string;
520
- top: string;
521
- right: string;
522
- transform: string;
523
- "border-width": string;
524
- "border-style": string;
525
- "border-color": string;
526
- };
527
- "@media only screen and (max-width: 768px)"?: {
528
- ".secure-payment-form .currency-conversion-container": {
529
- "flex-direction": string;
530
- "align-items": string;
531
- };
532
- ".secure-payment-form .credit-card-currency-conversion fieldset": {
533
- "justify-content": string;
534
- };
535
- ".secure-payment-form .credit-card-currency-conversion .radio-button": {
536
- width: string;
537
- "justify-content": string;
538
- };
539
- ".secure-payment-form .credit-card-currency-conversion .radio-button:first-child": {
540
- margin: string;
541
- };
542
- ".secure-payment-form .credit-card-currency-conversion .card-currency-content": {
543
- width: string;
544
- "margin-top": string;
545
- "margin-left": string;
546
- };
547
- ".secure-payment-form .credit-card-currency-conversion .merchant-currency-content": {
548
- width: string;
549
- "margin-top": string;
550
- "margin-left": string;
551
- };
552
- ".secure-payment-form .credit-card-currency-conversion .tooltip-content::before": {
553
- right: string;
554
- };
555
- };
556
356
  "#googlePay": {
557
357
  height: string;
558
358
  margin: string;
@@ -855,68 +655,6 @@ export declare const parentStyles: (assetBaseUrl: string) => {
855
655
  display: string;
856
656
  margin: string;
857
657
  };
858
- ".secure-payment-form .tooltip": {
859
- position: string;
860
- width: string;
861
- height: string;
862
- border: string;
863
- "border-left": string;
864
- color: string;
865
- float: string;
866
- "background-size": string;
867
- background: string;
868
- "font-family": string;
869
- };
870
- ".secure-payment-form .tooltip:focus": {
871
- border: string;
872
- outline: string;
873
- "border-left": string;
874
- };
875
- ".secure-payment-form .tooltip:hover": {
876
- border: string;
877
- outline: string;
878
- "border-left": string;
879
- };
880
- ".secure-payment-form .tooltip-content": {
881
- visibility: string;
882
- width: string;
883
- "background-color": string;
884
- color: string;
885
- "text-align": string;
886
- "border-radius": string;
887
- border: string;
888
- padding: string;
889
- position: string;
890
- "z-index": string;
891
- right: string;
892
- opacity: string;
893
- transition: string;
894
- "font-size": string;
895
- "font-weight": string;
896
- "box-shadow": string;
897
- "margin-top": string;
898
- "margin-right": string;
899
- };
900
- ".secure-payment-form .tooltip-content h4": {
901
- margin: string;
902
- };
903
- ".secure-payment-form .tooltip:hover > .tooltip-content": {
904
- visibility: string;
905
- opacity: string;
906
- };
907
- ".secure-payment-form .tooltip:focus > .tooltip-content": {
908
- visibility: string;
909
- opacity: string;
910
- };
911
- ".secure-payment-form .tooltip-content::before": {
912
- position: string;
913
- content: string;
914
- right: string;
915
- top: string;
916
- "border-left": string;
917
- "border-right": string;
918
- "border-bottom": string;
919
- };
920
658
  ".secure-payment-form": {
921
659
  "font-family": string;
922
660
  };