@globalpayments/js 1.9.15 → 1.9.18

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 (33) hide show
  1. package/package.json +1 -1
  2. package/types/internal/gateways/gp-api/action-query-installment-plans.d.ts +3 -0
  3. package/types/internal/gateways/gp-api/index.d.ts +1 -0
  4. package/types/internal/gateways/index.d.ts +6 -0
  5. package/types/internal/lib/card.d.ts +17 -0
  6. package/types/internal/lib/installments/components/add-issuer-banner.d.ts +2 -0
  7. package/types/internal/lib/installments/components/modal/create-modal-component.d.ts +9 -0
  8. package/types/internal/lib/installments/components/modal/styles.d.ts +23 -0
  9. package/types/internal/lib/installments/contracts/constants.d.ts +3 -0
  10. package/types/internal/lib/installments/contracts/enums.d.ts +13 -0
  11. package/types/internal/lib/installments/contracts/installment-action.d.ts +20 -0
  12. package/types/internal/lib/installments/contracts/installment-payment-method.d.ts +21 -0
  13. package/types/internal/lib/installments/contracts/installment-plans-data.d.ts +50 -0
  14. package/types/internal/lib/installments/contracts/installment-term-fees.d.ts +16 -0
  15. package/types/internal/lib/installments/contracts/installment-term.d.ts +35 -0
  16. package/types/internal/lib/installments/helpers/currency.d.ts +2 -0
  17. package/types/internal/lib/installments/helpers/html-element.d.ts +88 -0
  18. package/types/internal/lib/installments/installments-handler.d.ts +48 -0
  19. package/types/internal/lib/installments/requests/query-installment-plans.d.ts +3 -0
  20. package/types/internal/lib/installments/templates/common.d.ts +6 -0
  21. package/types/internal/lib/installments/templates/create-step-0.d.ts +3 -0
  22. package/types/internal/lib/installments/templates/create-step-1.d.ts +3 -0
  23. package/types/internal/lib/installments/templates/modals.d.ts +6 -0
  24. package/types/internal/lib/styles/gp-default.d.ts +335 -6
  25. package/types/internal/lib/styles/installments/common.d.ts +335 -0
  26. package/types/internal/lib/styles/installments/default.d.ts +335 -0
  27. package/types/internal/lib/styles/installments/gp-default.d.ts +335 -0
  28. package/types/internal/lib/styles/installments/simple.d.ts +335 -0
  29. package/types/lib/version.d.ts +1 -1
  30. package/types/tools/configure.d.ts +6 -0
  31. package/types/ui/form/index.d.ts +373 -55
  32. package/types/ui/iframe-field/action-add-installments.d.ts +3 -0
  33. package/types/ui/iframe-field/action-card-request-installments.d.ts +6 -0
@@ -50,9 +50,6 @@ export declare const fieldStyles: () => {
50
50
  "font-size": string;
51
51
  "font-weight": string;
52
52
  "line-height": string;
53
- /**
54
- * Represents logic surrounding a group of hosted fields.
55
- */
56
53
  "margin-bottom": string;
57
54
  padding: string;
58
55
  "text-align": string;
@@ -134,6 +131,11 @@ export declare const fieldStyles: () => {
134
131
  "img.card-number.valid.card-type-jcb": {
135
132
  background: string;
136
133
  "background-size": string;
134
+ /**
135
+ * Appends additional CSS rules to the group of hosted fields
136
+ *
137
+ * @param json New CSS rules
138
+ */
137
139
  "background-position-y": string;
138
140
  };
139
141
  "img.card-number.valid.card-type-mastercard": {
@@ -150,7 +152,12 @@ export declare const fieldStyles: () => {
150
152
  display: string;
151
153
  };
152
154
  "input[placeholder]": {
153
- "letter-spacing": string;
155
+ "letter-spacing": string; /**
156
+ * Sets a special-case event listener that fires when all hosted
157
+ * fields in a form have registered / loaded
158
+ *
159
+ * @param fn The listener function
160
+ */
154
161
  };
155
162
  };
156
163
  "gp-default": {
@@ -334,7 +341,12 @@ export declare const fieldStyles: () => {
334
341
  };
335
342
  "img.card-number.invalid.card-type-discover": {
336
343
  background: string;
337
- "background-size": string;
344
+ "background-size": string; /**
345
+ * Instantiates a new UIForm object for a group of hosted fields
346
+ *
347
+ * @param fields Hosted field configuration
348
+ * @param styles Custom CSS configuration
349
+ */
338
350
  "background-position-y": string;
339
351
  width: string;
340
352
  right: string;
@@ -470,16 +482,6 @@ export declare const parentStyles: () => {
470
482
  margin: string;
471
483
  "white-space": string;
472
484
  };
473
- /**
474
- * Sets an event listener for an event type
475
- *
476
- * @param fieldTypeOrEventName The field type on which the listener should
477
- * be applied, or the type of event that should trigger the listener
478
- * @param eventNameOrListener The type of event that should trigger the
479
- * listener, or the listener function
480
- * @param listener The listener function when both field type and event type
481
- * are provided
482
- */
483
485
  ".secure-payment-form .ctp-info-tooltip-content": {
484
486
  visibility: string;
485
487
  width: string;
@@ -592,7 +594,9 @@ export declare const parentStyles: () => {
592
594
  right: string;
593
595
  border: string;
594
596
  "border-width": string;
595
- display: string;
597
+ display: string; /**
598
+ * Deletes all hosted fields within the form
599
+ */
596
600
  padding: string;
597
601
  transform: string;
598
602
  "-webkit-transform": string;
@@ -890,16 +894,6 @@ export declare const parentStyles: () => {
890
894
  margin: string;
891
895
  "white-space": string;
892
896
  };
893
- /**
894
- * Sets an event listener for an event type
895
- *
896
- * @param fieldTypeOrEventName The field type on which the listener should
897
- * be applied, or the type of event that should trigger the listener
898
- * @param eventNameOrListener The type of event that should trigger the
899
- * listener, or the listener function
900
- * @param listener The listener function when both field type and event type
901
- * are provided
902
- */
903
897
  ".secure-payment-form .ctp-info-tooltip-content": {
904
898
  visibility: string;
905
899
  width: string;
@@ -1012,7 +1006,9 @@ export declare const parentStyles: () => {
1012
1006
  right: string;
1013
1007
  border: string;
1014
1008
  "border-width": string;
1015
- display: string;
1009
+ display: string; /**
1010
+ * Deletes all hosted fields within the form
1011
+ */
1016
1012
  padding: string;
1017
1013
  transform: string;
1018
1014
  "-webkit-transform": string;
@@ -1120,6 +1116,338 @@ export declare const parentStyles: () => {
1120
1116
  display: string;
1121
1117
  margin: string;
1122
1118
  };
1119
+ ".secure-payment-form .modal-overlay": {
1120
+ background: string;
1121
+ position: string;
1122
+ top: string;
1123
+ left: string;
1124
+ margin: string;
1125
+ width: string;
1126
+ height: string;
1127
+ display: string;
1128
+ "justify-content": string;
1129
+ "align-items": string;
1130
+ "z-index": string;
1131
+ };
1132
+ ".secure-payment-form .modal-wrapper": {
1133
+ "font-family": string;
1134
+ background: string;
1135
+ "border-width": string;
1136
+ "border-radius": string;
1137
+ overflow: string;
1138
+ };
1139
+ ".secure-payment-form .credit-card-installments": {
1140
+ "font-family": string;
1141
+ };
1142
+ ".secure-payment-form .installment-issuer-panel": {
1143
+ background: string;
1144
+ display: string;
1145
+ "flex-direction": string;
1146
+ "max-width": string;
1147
+ padding: string;
1148
+ margin: string;
1149
+ gap: string;
1150
+ width: string;
1151
+ };
1152
+ ".secure-payment-form .installment-issuer-panel-header": {
1153
+ display: string;
1154
+ "justify-content": string;
1155
+ "align-items": string;
1156
+ };
1157
+ ".secure-payment-form .installment-issuer-panel-title": {
1158
+ color: string;
1159
+ "font-style": string;
1160
+ "font-weight": string;
1161
+ "line-height": string;
1162
+ "font-size": string;
1163
+ };
1164
+ ".secure-payment-form .installment-issuer-panel-content": {
1165
+ color: string;
1166
+ "font-style": string;
1167
+ "font-weight": string;
1168
+ "line-height": string;
1169
+ "font-size": string;
1170
+ };
1171
+ ".secure-payment-form .installment-panel": {
1172
+ "max-width": string;
1173
+ "margin-bottom": string;
1174
+ };
1175
+ ".secure-payment-form .installment-plans-title": {
1176
+ color: string;
1177
+ "font-style": string;
1178
+ "font-weight": string;
1179
+ "line-height": string;
1180
+ "font-size": string;
1181
+ margin: string;
1182
+ };
1183
+ ".secure-payment-form .installment-plans-subtitle": {
1184
+ color: string;
1185
+ "font-style": string;
1186
+ "font-weight": string;
1187
+ "line-height": string;
1188
+ "font-size": string;
1189
+ };
1190
+ ".secure-payment-form .installment-plan-details": {
1191
+ "border-top": string;
1192
+ "border-bottom": string;
1193
+ padding: string;
1194
+ };
1195
+ ".secure-payment-form .installment-plan-monthly-amount": {
1196
+ color: string;
1197
+ "font-style": string;
1198
+ "font-weight": string;
1199
+ "line-height": string;
1200
+ "font-size": string;
1201
+ };
1202
+ ".secure-payment-form .installment-options, .installment-panel": {
1203
+ display: string;
1204
+ "flex-direction": string;
1205
+ padding: string;
1206
+ width: string;
1207
+ };
1208
+ ".secure-payment-form .installment-options": {
1209
+ background: string;
1210
+ margin: string;
1211
+ padding: string;
1212
+ "border-radius": string;
1213
+ };
1214
+ ".secure-payment-form .installment-plan-options-title": {
1215
+ color: string;
1216
+ "font-style": string;
1217
+ "font-weight": string;
1218
+ "line-height": string;
1219
+ "font-size": string;
1220
+ };
1221
+ ".secure-payment-form .installment-options-content": {
1222
+ color: string;
1223
+ "font-style": string;
1224
+ "font-weight": string;
1225
+ "line-height": string;
1226
+ "font-size": string;
1227
+ margin: string;
1228
+ };
1229
+ ".secure-payment-form .installment-term-selector-title": {
1230
+ "text-align": string;
1231
+ padding: string;
1232
+ };
1233
+ ".secure-payment-form .installment-panel-header": {
1234
+ "text-align": string;
1235
+ display: string;
1236
+ "flex-direction": string;
1237
+ };
1238
+ ".secure-payment-form .installment-panel-content": {
1239
+ margin: string;
1240
+ };
1241
+ ".secure-payment-form .installment-panel-footer": {
1242
+ "text-align": string;
1243
+ display: string;
1244
+ "flex-direction": string;
1245
+ };
1246
+ ".secure-payment-form .installment-field-value-item": {
1247
+ color: string;
1248
+ "font-style": string;
1249
+ "font-weight": string;
1250
+ "line-height": string;
1251
+ "font-size": string;
1252
+ margin: string;
1253
+ };
1254
+ ".secure-payment-form .installment-field-value-item, .installment-options-header": {
1255
+ display: string;
1256
+ "flex-direction": string;
1257
+ "justify-content": string;
1258
+ };
1259
+ ".secure-payment-form .installment-link": {
1260
+ background: string;
1261
+ border: string;
1262
+ color: string;
1263
+ "font-style": string;
1264
+ "font-weight": string;
1265
+ "text-decoration": string;
1266
+ "line-height": string;
1267
+ "font-size": string;
1268
+ padding: string;
1269
+ cursor: string;
1270
+ };
1271
+ ".secure-payment-form .installment-link:hover": {
1272
+ color: string;
1273
+ };
1274
+ ".secure-payment-form .installment-link:active": {
1275
+ color: string;
1276
+ };
1277
+ ".secure-payment-form .installment-link:focus": {
1278
+ color: string;
1279
+ border: string;
1280
+ };
1281
+ ".secure-payment-form .installment-step-container": {
1282
+ display: string;
1283
+ "justify-content": string;
1284
+ };
1285
+ ".secure-payment-form .installment-base-action-button-wrapper": {
1286
+ display: string;
1287
+ "justify-content": string;
1288
+ "flex-wrap": string;
1289
+ };
1290
+ ".secure-payment-form .installment-base-action-button, .installment-button-explore-plans, .installment-button-learn-more, .installment-button-month-term, .installment-button-pay": {
1291
+ "border-radius": string;
1292
+ width: string;
1293
+ height: string;
1294
+ padding: string;
1295
+ color: string;
1296
+ "font-weight": string;
1297
+ "font-size": string;
1298
+ "line-height": string;
1299
+ "font-style": string;
1300
+ border: string;
1301
+ cursor: string;
1302
+ "margin-top": string;
1303
+ "margin-bottom": string;
1304
+ display: string;
1305
+ "justify-content": string;
1306
+ "align-items": string;
1307
+ gap: string;
1308
+ };
1309
+ ".secure-payment-form .installment-button-explore-plans": {
1310
+ background: string;
1311
+ "margin-bottom": string;
1312
+ };
1313
+ ".secure-payment-form .installment-button-explore-plans:hover": {
1314
+ background: string;
1315
+ };
1316
+ ".secure-payment-form .installment-button-explore-plans:active": {
1317
+ background: string;
1318
+ };
1319
+ ".secure-payment-form .installment-button-explore-plans:focus": {
1320
+ background: string;
1321
+ border: string;
1322
+ };
1323
+ ".secure-payment-form .installment-button-learn-more": {
1324
+ background: string;
1325
+ color: string;
1326
+ "font-weight": string;
1327
+ "font-size": string;
1328
+ "line-height": string;
1329
+ margin: string;
1330
+ };
1331
+ ".secure-payment-form .installment-button-learn-more::after": {
1332
+ content: string;
1333
+ "padding-top": string;
1334
+ filter: string;
1335
+ };
1336
+ ".secure-payment-form .installment-button-learn-more:hover": {
1337
+ color: string;
1338
+ };
1339
+ ".secure-payment-form .installment-button-learn-more:active": {
1340
+ color: string;
1341
+ };
1342
+ ".secure-payment-form .installment-button-learn-more:focus": {
1343
+ color: string;
1344
+ border: string;
1345
+ };
1346
+ ".secure-payment-form .installment-button-month-term": {
1347
+ background: string;
1348
+ width: string;
1349
+ height: string;
1350
+ "font-weight": string;
1351
+ margin: string;
1352
+ };
1353
+ ".secure-payment-form .installment-unselected": {
1354
+ background: string;
1355
+ color: string;
1356
+ };
1357
+ ".secure-payment-form .installment-unselected:hover": {
1358
+ border: string;
1359
+ };
1360
+ ".secure-payment-form .installment-button-pay": {
1361
+ background: string;
1362
+ height: string;
1363
+ padding: string;
1364
+ };
1365
+ ".secure-payment-form .installment-button-pay:hover": {
1366
+ background: string;
1367
+ };
1368
+ ".secure-payment-form .installment-button-pay:active": {
1369
+ background: string;
1370
+ };
1371
+ ".secure-payment-form .installment-button-pay:focus": {
1372
+ background: string;
1373
+ border: string;
1374
+ };
1375
+ ".secure-payment-form .installment-button-pay::before": {
1376
+ content: string;
1377
+ "margin-right": string;
1378
+ };
1379
+ ".secure-payment-form .provided-by": {
1380
+ "font-style": string;
1381
+ "font-weight": string;
1382
+ "font-size": string;
1383
+ "line-height": string;
1384
+ color: string;
1385
+ margin: string;
1386
+ };
1387
+ ".secure-payment-form .installment-learn-more-content": {
1388
+ width: string;
1389
+ };
1390
+ ".secure-payment-form .installment-learn-more-header": {
1391
+ display: string;
1392
+ padding: string;
1393
+ "justify-content": string;
1394
+ "align-items": string;
1395
+ background: string;
1396
+ };
1397
+ ".secure-payment-form .installment-learn-more-header-title": {
1398
+ "font-style": string;
1399
+ "font-size": string;
1400
+ "line-height": string;
1401
+ color: string;
1402
+ };
1403
+ ".secure-payment-form .installment-learn-more-body": {
1404
+ display: string;
1405
+ margin: string;
1406
+ "flex-direction": string;
1407
+ "align-items": string;
1408
+ };
1409
+ ".secure-payment-form .installment-learn-more-body ul": {
1410
+ color: string;
1411
+ "font-style": string;
1412
+ "font-weight": string;
1413
+ "line-height": string;
1414
+ padding: string;
1415
+ "margin-top": string;
1416
+ };
1417
+ ".secure-payment-form .installment-learn-more-link": {
1418
+ color: string;
1419
+ "font-style": string;
1420
+ "font-weight": string;
1421
+ "line-height": string;
1422
+ "text-decoration-line": string;
1423
+ margin: string;
1424
+ };
1425
+ ".secure-payment-form .installment-button-close": {
1426
+ background: string;
1427
+ border: string;
1428
+ padding: string;
1429
+ cursor: string;
1430
+ };
1431
+ ".secure-payment-form .installment-button-close::after": {
1432
+ content: string;
1433
+ };
1434
+ ".secure-payment-form .term-and-condition-title": {
1435
+ display: string;
1436
+ "align-items": string;
1437
+ "font-style": string;
1438
+ "font-weight": string;
1439
+ };
1440
+ ".secure-payment-form .term-and-condition-title::before": {
1441
+ content: string;
1442
+ "margin-right": string;
1443
+ };
1444
+ ".secure-payment-form .term-and-condition-link": {
1445
+ color: string;
1446
+ "font-style": string;
1447
+ "font-weight": string;
1448
+ "line-height": string;
1449
+ "text-decoration-line": string;
1450
+ };
1123
1451
  ".secure-payment-form": {
1124
1452
  display: string;
1125
1453
  "-ms-flex-wrap": string;
@@ -1162,12 +1490,6 @@ export declare const parentStyles: () => {
1162
1490
  };
1163
1491
  ".secure-payment-form div[class$='-shield'] .ssl-msg": {
1164
1492
  "font-size": string;
1165
- /**
1166
- * Sets a special-case event listener that fires when all hosted
1167
- * fields in a form have registered / loaded
1168
- *
1169
- * @param fn The listener function
1170
- */
1171
1493
  "font-weight": string;
1172
1494
  "font-family": string;
1173
1495
  color: string;
@@ -1196,9 +1518,6 @@ export declare const parentStyles: () => {
1196
1518
  ".secure-payment-form div[class$='-logo'] img": {
1197
1519
  "vertical-align": string;
1198
1520
  };
1199
- /**
1200
- * Deletes all hosted fields within the form
1201
- */
1202
1521
  ".secure-payment-form .credit-card-submit": {
1203
1522
  margin: string;
1204
1523
  };
@@ -1213,7 +1532,7 @@ export declare const parentStyles: () => {
1213
1532
  border: string;
1214
1533
  "border-left": string;
1215
1534
  color: string;
1216
- overflow: string;
1535
+ float: string;
1217
1536
  "background-size": string;
1218
1537
  background: string;
1219
1538
  };
@@ -1224,7 +1543,9 @@ export declare const parentStyles: () => {
1224
1543
  ".secure-payment-form .tooltip-content": {
1225
1544
  visibility: string;
1226
1545
  width: string;
1227
- "background-color": string;
1546
+ "background-color": string; /**
1547
+ * Deletes all hosted fields within the form
1548
+ */
1228
1549
  color: string;
1229
1550
  "text-align": string;
1230
1551
  "border-radius": string;
@@ -1241,11 +1562,11 @@ export declare const parentStyles: () => {
1241
1562
  overflow: string;
1242
1563
  "box-shadow": string;
1243
1564
  };
1244
- ".secure-payment-form .tooltip:hover + .tooltip-content": {
1565
+ ".secure-payment-form .tooltip:hover > .tooltip-content": {
1245
1566
  visibility: string;
1246
1567
  opacity: string;
1247
1568
  };
1248
- ".secure-payment-form .tooltip:focus + .tooltip-content": {
1569
+ ".secure-payment-form .tooltip:focus > .tooltip-content": {
1249
1570
  visibility: string;
1250
1571
  opacity: string;
1251
1572
  };
@@ -1289,9 +1610,6 @@ export declare const parentStyles: () => {
1289
1610
  flex: string;
1290
1611
  "margin-left": string;
1291
1612
  };
1292
- ".secure-payment-form .tooltip-content": {
1293
- right: string;
1294
- };
1295
1613
  };
1296
1614
  };
1297
1615
  simple: {
@@ -1373,16 +1691,6 @@ export declare const parentStyles: () => {
1373
1691
  margin: string;
1374
1692
  "white-space": string;
1375
1693
  };
1376
- /**
1377
- * Sets an event listener for an event type
1378
- *
1379
- * @param fieldTypeOrEventName The field type on which the listener should
1380
- * be applied, or the type of event that should trigger the listener
1381
- * @param eventNameOrListener The type of event that should trigger the
1382
- * listener, or the listener function
1383
- * @param listener The listener function when both field type and event type
1384
- * are provided
1385
- */
1386
1694
  ".secure-payment-form .ctp-info-tooltip-content": {
1387
1695
  visibility: string;
1388
1696
  width: string;
@@ -1495,7 +1803,9 @@ export declare const parentStyles: () => {
1495
1803
  right: string;
1496
1804
  border: string;
1497
1805
  "border-width": string;
1498
- display: string;
1806
+ display: string; /**
1807
+ * Deletes all hosted fields within the form
1808
+ */
1499
1809
  padding: string;
1500
1810
  transform: string;
1501
1811
  "-webkit-transform": string;
@@ -1615,7 +1925,12 @@ export declare const parentStyles: () => {
1615
1925
  "text-transform": string;
1616
1926
  };
1617
1927
  ".secure-payment-form #ss-banner": {
1618
- background: string;
1928
+ background: string; /**
1929
+ * Sets a special-case event listener that fires when all hosted
1930
+ * fields in a form have registered / loaded
1931
+ *
1932
+ * @param fn The listener function
1933
+ */
1619
1934
  "background-size": string;
1620
1935
  height: string;
1621
1936
  "margin-bottom": string;
@@ -1800,6 +2115,9 @@ export default class UIForm {
1800
2115
  */
1801
2116
  dispose(): void;
1802
2117
  private createFrames;
2118
+ private configureCardInstallmentsEvents;
2119
+ private startCardInstallmentDataRequest;
2120
+ private removeInstallmentsPanel;
1803
2121
  private requestDataFromAll;
1804
2122
  setSubtotalAmount(amount: string): void;
1805
2123
  }
@@ -0,0 +1,3 @@
1
+ import { IframeField } from ".";
2
+ import { InstallmentPaymentData } from "../../internal/lib/installments/installments-handler";
3
+ export default function addInstallments(iframeField: IframeField | undefined, installmentPlans: any, tokenizationCallback: (installment: InstallmentPaymentData) => void): void;
@@ -0,0 +1,6 @@
1
+ import { IDictionary } from "../../internal/lib/util";
2
+ declare const _default: (id: string, data: IDictionary) => void;
3
+ /**
4
+ * Requests the installment plans data for a valid credit card number
5
+ */
6
+ export default _default;