@globalpayments/js 1.9.20 → 1.9.21

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.
@@ -5,6 +5,166 @@ export { IUIFormField } from "../iframe-field";
5
5
  export declare const fieldStyles: () => {
6
6
  blank: {};
7
7
  default: {
8
+ "#secure-payment-field[type=text].field-validation-wrapper": {
9
+ "font-family": string;
10
+ };
11
+ "#secure-payment-field[type=tel].invalid": {
12
+ border: string;
13
+ };
14
+ "#secure-payment-field[type=text].invalid": {
15
+ border: string;
16
+ };
17
+ "img.card-number-icon.invalid": {
18
+ "margin-top": string;
19
+ };
20
+ "#secure-payment-field": {
21
+ "-o-transition": string;
22
+ "-webkit-box-shadow": string;
23
+ "-webkit-transition": string;
24
+ "background-color": string;
25
+ border: string;
26
+ "border-radius": string;
27
+ "box-shadow": string;
28
+ "box-sizing": string;
29
+ color: string;
30
+ display: string;
31
+ "font-family": string;
32
+ "font-size": string;
33
+ height: string;
34
+ "line-height": string;
35
+ margin: string;
36
+ "max-width": string;
37
+ outline: string;
38
+ padding: string;
39
+ transition: string;
40
+ "vertical-align": string;
41
+ width: string;
42
+ };
43
+ "#secure-payment-field:focus": {
44
+ border: string;
45
+ "box-shadow": string;
46
+ height: string;
47
+ outline: string;
48
+ };
49
+ "#secure-payment-field[type=button]": {
50
+ "-moz-user-select": string;
51
+ "-ms-touch-action": string;
52
+ "-ms-user-select": string;
53
+ "-webkit-user-select": string;
54
+ "background-color": string;
55
+ "background-image": string;
56
+ border: string;
57
+ "box-sizing": string;
58
+ color: string;
59
+ cursor: string;
60
+ display: string;
61
+ "font-family": string;
62
+ "font-size": string;
63
+ "font-weight": string;
64
+ "line-height": string;
65
+ "margin-bottom": string;
66
+ padding: string;
67
+ "text-align": string;
68
+ "text-transform": string;
69
+ "touch-action": string;
70
+ "user-select": string;
71
+ "vertical-align": string;
72
+ "white-space": string;
73
+ };
74
+ "#secure-payment-field[type=button]:focus": {
75
+ "background-color": string;
76
+ color: string;
77
+ outline: string;
78
+ };
79
+ "#secure-payment-field[type=button]:hover": {
80
+ "background-color": string;
81
+ };
82
+ ".card-cvv": {
83
+ background: string;
84
+ "background-size": string;
85
+ };
86
+ ".card-cvv.card-type-amex": {
87
+ background: string;
88
+ "background-size": string;
89
+ };
90
+ "img.card-number-icon": {
91
+ background: string;
92
+ "background-size": string;
93
+ width: string;
94
+ height: string;
95
+ position: string;
96
+ right: string;
97
+ top: string;
98
+ "margin-top": string;
99
+ "background-position": string;
100
+ };
101
+ "img.card-number-icon[src$='/gp-cc-generic.svg']": {
102
+ background: string;
103
+ "background-size": string;
104
+ "background-position-y": string;
105
+ };
106
+ "img.card-number-icon.invalid.card-type-amex": {
107
+ background: string;
108
+ "background-size": string;
109
+ "background-position-y": string;
110
+ };
111
+ "img.card-number-icon.invalid.card-type-discover": {
112
+ background: string;
113
+ "background-size": string;
114
+ "background-position-y": string;
115
+ width: string;
116
+ };
117
+ "img.card-number-icon.invalid.card-type-jcb": {
118
+ background: string;
119
+ "background-size": string;
120
+ "background-position-y": string;
121
+ };
122
+ "img.card-number-icon.invalid.card-type-mastercard": {
123
+ background: string;
124
+ "background-size": string;
125
+ "background-position-y": string;
126
+ };
127
+ "img.card-number-icon.invalid.card-type-visa": {
128
+ background: string;
129
+ "background-size": string;
130
+ "background-position-y": string;
131
+ };
132
+ "img.card-number-icon.valid.card-type-amex": {
133
+ background: string;
134
+ "background-size": string;
135
+ "background-position-y": string;
136
+ };
137
+ "img.card-number-icon.valid.card-type-discover": {
138
+ background: string;
139
+ "background-size": string;
140
+ "background-position-y": string;
141
+ width: string;
142
+ };
143
+ "img.card-number-icon.valid.card-type-jcb": {
144
+ background: string;
145
+ "background-size": string;
146
+ "background-position-y": string;
147
+ };
148
+ "img.card-number-icon.valid.card-type-mastercard": {
149
+ background: string;
150
+ "background-size": string;
151
+ "background-position-y": string;
152
+ };
153
+ "img.card-number-icon.valid.card-type-visa": {
154
+ background: string;
155
+ "background-size": string;
156
+ "background-position-y": string;
157
+ };
158
+ ".card-number::-ms-clear": {
159
+ display: string;
160
+ };
161
+ "input[placeholder]": {
162
+ "letter-spacing": string;
163
+ };
164
+ } | {
165
+ "img.card-number-icon.invalid": {
166
+ "margin-top": string;
167
+ };
8
168
  "#secure-payment-field": {
9
169
  "-o-transition": string;
10
170
  "-webkit-box-shadow": string;
@@ -151,6 +311,129 @@ export declare const fieldStyles: () => {
151
311
  };
152
312
  };
153
313
  "gp-default": {
314
+ "#secure-payment-field[type=text].field-validation-wrapper": {
315
+ "font-family": string;
316
+ };
317
+ "#secure-payment-field[type=tel].invalid": {
318
+ border: string;
319
+ };
320
+ "#secure-payment-field[type=text].invalid": {
321
+ border: string;
322
+ };
323
+ "img.card-number-icon.invalid": {
324
+ "margin-top": string;
325
+ };
326
+ "*": {
327
+ "box-sizing": string;
328
+ };
329
+ "::-webkit-input-placeholder": {
330
+ color: string;
331
+ };
332
+ "::-ms-input-placeholder": {
333
+ color: string;
334
+ };
335
+ "::-moz-input-placeholder": {
336
+ color: string;
337
+ opacity: number;
338
+ };
339
+ ":-moz-input-placeholder": {
340
+ color: string;
341
+ opacity: number;
342
+ };
343
+ ":-moz-placeholder": {
344
+ color: string;
345
+ opacity: string;
346
+ };
347
+ "::-moz-placeholder": {
348
+ color: string;
349
+ opacity: string;
350
+ };
351
+ "#secure-payment-field": {
352
+ width: string;
353
+ height: string;
354
+ padding: string;
355
+ border: string;
356
+ "border-radius": string;
357
+ "font-size": string;
358
+ "font-weight": string;
359
+ color: string;
360
+ };
361
+ "#secure-payment-field:focus": {
362
+ border: string;
363
+ outline: string;
364
+ };
365
+ "#secure-payment-field:hover": {
366
+ border: string;
367
+ outline: string;
368
+ };
369
+ "#secure-payment-field[type=button]": {
370
+ "background-color": string;
371
+ color: string;
372
+ padding: string;
373
+ border: string;
374
+ width: string;
375
+ "border-radius": string;
376
+ cursor: string;
377
+ "font-size": string;
378
+ "font-weight": string;
379
+ height: string;
380
+ "text-align": string;
381
+ "vertical-align": string;
382
+ "text-transform": string;
383
+ };
384
+ "#secure-payment-field[type=button]:focus": {
385
+ border: string;
386
+ outline: string;
387
+ };
388
+ "#secure-payment-field[type=button]:hover": {
389
+ "background-color": string;
390
+ };
391
+ "#secure-payment-field[type=button]::before": {
392
+ content: string;
393
+ "margin-right": string;
394
+ };
395
+ ".card-cvv": {
396
+ background: string;
397
+ "background-size": string;
398
+ };
399
+ ".card-cvv.card-type-amex": {
400
+ "background-image": string;
401
+ };
402
+ "img.card-number-icon": {
403
+ background: string;
404
+ position: string;
405
+ right: string;
406
+ top: string;
407
+ width: string;
408
+ height: string;
409
+ "margin-top": string;
410
+ "background-size": string;
411
+ };
412
+ "img.card-number-icon.card-type-amex": {
413
+ "background-image": string;
414
+ };
415
+ "img.card-number-icon.card-type-discover": {
416
+ "background-image": string;
417
+ };
418
+ "img.card-number-icon.card-type-jcb": {
419
+ "background-image": string;
420
+ };
421
+ "img.card-number-icon.card-type-mastercard": {
422
+ "background-image": string;
423
+ };
424
+ "img.card-number-icon.card-type-visa": {
425
+ "background-image": string;
426
+ };
427
+ "img.card-number-icon.card-type-diners": {
428
+ "background-image": string;
429
+ };
430
+ ".card-number::-ms-clear": {
431
+ display: string;
432
+ };
433
+ } | {
434
+ "img.card-number-icon.invalid": {
435
+ "margin-top": string;
436
+ };
154
437
  "*": {
155
438
  "box-sizing": string;
156
439
  };
@@ -233,9 +516,6 @@ export declare const fieldStyles: () => {
233
516
  right: string;
234
517
  top: string;
235
518
  width: string;
236
- /**
237
- * Represents logic surrounding a group of hosted fields.
238
- */
239
519
  height: string;
240
520
  "margin-top": string;
241
521
  "background-size": string;
@@ -263,6 +543,150 @@ export declare const fieldStyles: () => {
263
543
  };
264
544
  };
265
545
  simple: {
546
+ "#secure-payment-field[type=text].field-validation-wrapper": {
547
+ "font-family": string;
548
+ };
549
+ "#secure-payment-field[type=tel].invalid": {
550
+ border: string;
551
+ };
552
+ "#secure-payment-field[type=text].invalid": {
553
+ border: string;
554
+ };
555
+ "img.card-number-icon.invalid": {
556
+ "margin-top": string;
557
+ };
558
+ html: {
559
+ "font-size": string;
560
+ };
561
+ body: {
562
+ "font-size": string;
563
+ };
564
+ "#secure-payment-field-wrapper": {
565
+ postition: string;
566
+ };
567
+ "#secure-payment-field": {
568
+ "-o-transition": string;
569
+ "-webkit-box-shadow": string;
570
+ "-webkit-transition": string;
571
+ "background-color": string;
572
+ border: string;
573
+ "border-radius": string;
574
+ "box-shadow": string;
575
+ "box-sizing": string;
576
+ display: string;
577
+ "font-family": string;
578
+ "font-size": string;
579
+ "font-smoothing": string;
580
+ height: string;
581
+ margin: string;
582
+ "max-width": string;
583
+ outline: string;
584
+ padding: string;
585
+ transition: string;
586
+ "vertical-align": string;
587
+ width: string;
588
+ };
589
+ "#secure-payment-field:focus": {
590
+ border: string;
591
+ "box-shadow": string;
592
+ outline: string;
593
+ };
594
+ "#secure-payment-field[type=button]": {
595
+ "text-align": string;
596
+ "text-transform": string;
597
+ "white-space": string;
598
+ };
599
+ "#secure-payment-field[type=button]:focus": {
600
+ outline: string;
601
+ };
602
+ ".card-cvv": {
603
+ background: string;
604
+ "background-size": string;
605
+ };
606
+ ".card-cvv.card-type-amex": {
607
+ background: string;
608
+ "background-size": string;
609
+ };
610
+ "img.card-number-icon": {
611
+ background: string;
612
+ "background-size": string;
613
+ width: string;
614
+ height: string;
615
+ position: string;
616
+ right: string;
617
+ top: string;
618
+ "margin-top": string;
619
+ "background-position": string;
620
+ };
621
+ "img.card-number-icon[src$='/gp-cc-generic.svg']": {
622
+ background: string;
623
+ "background-size": string;
624
+ "background-position-y": string;
625
+ };
626
+ "img.card-number-icon.invalid.card-type-amex": {
627
+ background: string;
628
+ "background-size": string;
629
+ "background-position-y": string;
630
+ };
631
+ "img.card-number-icon.invalid.card-type-discover": {
632
+ background: string;
633
+ "background-size": string;
634
+ "background-position-y": string;
635
+ width: string;
636
+ right: string;
637
+ };
638
+ "img.card-number-icon.invalid.card-type-jcb": {
639
+ background: string;
640
+ "background-size": string;
641
+ "background-position-y": string;
642
+ };
643
+ "img.card-number-icon.invalid.card-type-mastercard": {
644
+ background: string;
645
+ "background-size": string;
646
+ "background-position": string;
647
+ };
648
+ "img.card-number-icon.invalid.card-type-visa": {
649
+ background: string;
650
+ "background-size": string;
651
+ "background-position": string;
652
+ };
653
+ "img.card-number-icon.valid.card-type-amex": {
654
+ background: string;
655
+ "background-size": string;
656
+ "background-position-y": string;
657
+ };
658
+ "img.card-number-icon.valid.card-type-discover": {
659
+ background: string;
660
+ "background-size": string;
661
+ "background-position-y": string;
662
+ width: string;
663
+ right: string;
664
+ };
665
+ "img.card-number-icon.valid.card-type-jcb": {
666
+ background: string;
667
+ "background-size": string;
668
+ "background-position-y": string;
669
+ };
670
+ "img.card-number-icon.valid.card-type-mastercard": {
671
+ background: string;
672
+ "background-size": string;
673
+ "background-position": string;
674
+ };
675
+ "img.card-number-icon.valid.card-type-visa": {
676
+ background: string;
677
+ "background-size": string;
678
+ "background-position": string;
679
+ };
680
+ ".card-number::-ms-clear": {
681
+ display: string;
682
+ };
683
+ "input[placeholder]": {
684
+ "letter-spacing": string;
685
+ };
686
+ } | {
687
+ "img.card-number-icon.invalid": {
688
+ "margin-top": string;
689
+ };
266
690
  html: {
267
691
  "font-size": string;
268
692
  };
@@ -336,12 +760,6 @@ export declare const fieldStyles: () => {
336
760
  "background-size": string;
337
761
  "background-position-y": string;
338
762
  };
339
- /**
340
- * Instantiates a new UIForm object for a group of hosted fields
341
- *
342
- * @param fields Hosted field configuration
343
- * @param styles Custom CSS configuration
344
- */
345
763
  "img.card-number-icon.invalid.card-type-discover": {
346
764
  background: string;
347
765
  "background-size": string;
@@ -486,7 +904,9 @@ export declare const parentStyles: () => {
486
904
  "background-color": string;
487
905
  color: string;
488
906
  "text-align": string;
489
- "border-radius": string;
907
+ "border-radius": string; /**
908
+ * Represents logic surrounding a group of hosted fields.
909
+ */
490
910
  border: string;
491
911
  padding: string;
492
912
  position: string;
@@ -501,16 +921,7 @@ export declare const parentStyles: () => {
501
921
  "box-shadow": string;
502
922
  };
503
923
  ".secure-payment-form .ctp-info-tooltip-content .ctp-icon": {
504
- "margin-left": string; /**
505
- * Sets an event listener for an event type
506
- *
507
- * @param fieldTypeOrEventName The field type on which the listener should
508
- * be applied, or the type of event that should trigger the listener
509
- * @param eventNameOrListener The type of event that should trigger the
510
- * listener, or the listener function
511
- * @param listener The listener function when both field type and event type
512
- * are provided
513
- */
924
+ "margin-left": string;
514
925
  };
515
926
  ".secure-payment-form .ctp-info-tooltip .ctp-heading": {
516
927
  "max-width": string;
@@ -905,7 +1316,9 @@ export declare const parentStyles: () => {
905
1316
  "background-color": string;
906
1317
  color: string;
907
1318
  "text-align": string;
908
- "border-radius": string;
1319
+ "border-radius": string; /**
1320
+ * Represents logic surrounding a group of hosted fields.
1321
+ */
909
1322
  border: string;
910
1323
  padding: string;
911
1324
  position: string;
@@ -920,16 +1333,7 @@ export declare const parentStyles: () => {
920
1333
  "box-shadow": string;
921
1334
  };
922
1335
  ".secure-payment-form .ctp-info-tooltip-content .ctp-icon": {
923
- "margin-left": string; /**
924
- * Sets an event listener for an event type
925
- *
926
- * @param fieldTypeOrEventName The field type on which the listener should
927
- * be applied, or the type of event that should trigger the listener
928
- * @param eventNameOrListener The type of event that should trigger the
929
- * listener, or the listener function
930
- * @param listener The listener function when both field type and event type
931
- * are provided
932
- */
1336
+ "margin-left": string;
933
1337
  };
934
1338
  ".secure-payment-form .ctp-info-tooltip .ctp-heading": {
935
1339
  "max-width": string;
@@ -1492,6 +1896,11 @@ export declare const parentStyles: () => {
1492
1896
  width: string;
1493
1897
  height: string;
1494
1898
  "text-align": string;
1899
+ /**
1900
+ * Appends additional CSS rules to the group of hosted fields
1901
+ *
1902
+ * @param json New CSS rules
1903
+ */
1495
1904
  margin: string;
1496
1905
  };
1497
1906
  ".secure-payment-form div[class$='-shield'] .ssl-logo_ico": {
@@ -1711,7 +2120,9 @@ export declare const parentStyles: () => {
1711
2120
  "background-color": string;
1712
2121
  color: string;
1713
2122
  "text-align": string;
1714
- "border-radius": string;
2123
+ "border-radius": string; /**
2124
+ * Represents logic surrounding a group of hosted fields.
2125
+ */
1715
2126
  border: string;
1716
2127
  padding: string;
1717
2128
  position: string;
@@ -1726,16 +2137,7 @@ export declare const parentStyles: () => {
1726
2137
  "box-shadow": string;
1727
2138
  };
1728
2139
  ".secure-payment-form .ctp-info-tooltip-content .ctp-icon": {
1729
- "margin-left": string; /**
1730
- * Sets an event listener for an event type
1731
- *
1732
- * @param fieldTypeOrEventName The field type on which the listener should
1733
- * be applied, or the type of event that should trigger the listener
1734
- * @param eventNameOrListener The type of event that should trigger the
1735
- * listener, or the listener function
1736
- * @param listener The listener function when both field type and event type
1737
- * are provided
1738
- */
2140
+ "margin-left": string;
1739
2141
  };
1740
2142
  ".secure-payment-form .ctp-info-tooltip .ctp-heading": {
1741
2143
  "max-width": string;
@@ -1967,9 +2369,7 @@ export declare const parentStyles: () => {
1967
2369
  ".secure-payment-form div[class$='-shield'] .ssl-logo_ico": {
1968
2370
  width: string;
1969
2371
  height: string;
1970
- "margin-top": string; /**
1971
- * Deletes all hosted fields within the form
1972
- */
2372
+ "margin-top": string;
1973
2373
  "vertical-align": string;
1974
2374
  };
1975
2375
  ".secure-payment-form div[class$='-shield'] .ssl-msg": {
@@ -2037,11 +2437,36 @@ export declare const parentStyles: () => {
2037
2437
  transition: string;
2038
2438
  "vertical-align": string;
2039
2439
  width: string;
2440
+ } | {
2441
+ "-o-transition": string;
2442
+ "-webkit-box-shadow": string;
2443
+ "-webkit-transition": string;
2444
+ "background-color": string;
2445
+ border: string;
2446
+ "border-radius": string;
2447
+ "box-shadow": string;
2448
+ "box-sizing": string;
2449
+ display: string;
2450
+ "font-family": string;
2451
+ "font-size": string;
2452
+ "font-smoothing": string;
2453
+ height: string;
2454
+ margin: string;
2455
+ "max-width": string;
2456
+ outline: string;
2457
+ padding: string;
2458
+ transition: string;
2459
+ "vertical-align": string;
2460
+ width: string;
2040
2461
  };
2041
2462
  ".secure-payment-form input:focus": {
2042
2463
  border: string;
2043
2464
  "box-shadow": string;
2044
2465
  outline: string;
2466
+ } | {
2467
+ border: string;
2468
+ "box-shadow": string;
2469
+ outline: string;
2045
2470
  };
2046
2471
  ".secure-payment-form .tooltip, .secure-payment-form .tooltip-content": {
2047
2472
  display: string;
@@ -2139,4 +2564,7 @@ export default class UIForm {
2139
2564
  private requestDataFromAll;
2140
2565
  setSubtotalAmount(amount: string): void;
2141
2566
  private requestInstallmentData;
2567
+ private configureHostedFieldValidations;
2568
+ private validateForm;
2569
+ private submitForm;
2142
2570
  }
@@ -0,0 +1,6 @@
1
+ declare const _default: (fieldType: string) => void;
2
+ /**
3
+ * Hide the validation message for a hosted field
4
+ *
5
+ */
6
+ export default _default;
@@ -0,0 +1,7 @@
1
+ declare const _default: (validationMessage: string, fieldType: string) => void;
2
+ /**
3
+ * Show the validation message for a hosted field
4
+ *
5
+ * @param validationMessage The desired validation message
6
+ */
7
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import { IDictionary } from "../../internal/lib/util";
2
+ declare const _default: (id: string, data: IDictionary) => void;
3
+ export default _default;
@@ -0,0 +1,5 @@
1
+ declare const _default: (id: string, type: string, target: string) => void;
2
+ /**
3
+ * Validate the value for a hosted field
4
+ */
5
+ export default _default;
@@ -148,5 +148,21 @@ export declare class IframeField extends EventEmitter {
148
148
  * @param title The desired title
149
149
  */
150
150
  setTitle(title: string): void;
151
+ /**
152
+ * Show the validation of a hosted field
153
+ *
154
+ * @param validationMessage The desired validation message
155
+ */
156
+ showValidation(validationMessage: string): void;
157
+ /**
158
+ * Hide the validation of a hosted field
159
+ *
160
+ */
161
+ hideValidation(): void;
162
+ /**
163
+ * Validate hosted field
164
+ *
165
+ */
166
+ validate(): void;
151
167
  private makeFrame;
152
168
  }