@xsolla/payment-client-core 0.2.14 → 0.2.15
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.
- package/esm2020/lib/core/payment/form/controls/search-select/select-control.config.mjs +8 -0
- package/esm2020/lib/core/payment/form/converters/cvv/cvv.converter.mjs +3 -3
- package/esm2020/lib/core/payment/form/converters/pricepoint/pricepoint.converter.mjs +2 -2
- package/esm2020/lib/core/payment/form/converters/select/select.converter.mjs +4 -3
- package/esm2020/lib/core/payment/form/converters/zip/zip.converter.mjs +2 -5
- package/esm2020/lib/core/payment/form/form.service.mjs +4 -1
- package/esm2020/lib/core/payment/payment.interface.mjs +1 -1
- package/esm2020/lib/core/payment/payment.service.mjs +4 -1
- package/esm2020/lib/core-library.service.mjs +2 -6
- package/esm2020/public-api.mjs +2 -1
- package/fesm2015/xsolla-payment-client-core.mjs +16 -20
- package/fesm2015/xsolla-payment-client-core.mjs.map +1 -1
- package/fesm2020/xsolla-payment-client-core.mjs +15 -20
- package/fesm2020/xsolla-payment-client-core.mjs.map +1 -1
- package/lib/core/payment/form/controls/search-select/{search-select-control.config.d.ts → select-control.config.d.ts} +2 -2
- package/lib/core/payment/form/converters/select/select.converter.d.ts +2 -2
- package/lib/core/payment/form/form.service.d.ts +2 -0
- package/lib/core/payment/payment.interface.d.ts +1 -0
- package/lib/core/payment/payment.service.d.ts +1 -0
- package/lib/core-library.service.d.ts +0 -2
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/xsolla-payment-client-core-0.2.15.tgz +0 -0
- package/esm2020/lib/core/payment/form/controls/search-select/search-select-control.config.mjs +0 -8
- package/esm2020/lib/core/payment/form/mask-config.interface.mjs +0 -2
- package/esm2020/lib/core/payment/form/masks-functions.map.mjs +0 -7
- package/lib/core/payment/form/mask-config.interface.d.ts +0 -6
- package/lib/core/payment/form/masks-functions.map.d.ts +0 -3
- package/xsolla-payment-client-core-0.2.14.tgz +0 -0
|
@@ -10,13 +10,6 @@ import { filter, map as map$1, tap, debounce, catchError } from 'rxjs/operators'
|
|
|
10
10
|
import * as i1$1 from '@angular/router';
|
|
11
11
|
import { CommonModule } from '@angular/common';
|
|
12
12
|
|
|
13
|
-
const masksFunctionsMap = {
|
|
14
|
-
zip: () => {
|
|
15
|
-
const zipLength = 5;
|
|
16
|
-
return new Array(zipLength).fill('9').join('');
|
|
17
|
-
},
|
|
18
|
-
};
|
|
19
|
-
|
|
20
13
|
class AppError extends Error {
|
|
21
14
|
constructor(message) {
|
|
22
15
|
super(message);
|
|
@@ -3234,14 +3227,12 @@ class ZipConverter extends Converter {
|
|
|
3234
3227
|
config.icon = 'location';
|
|
3235
3228
|
if (this.isUsCountry) {
|
|
3236
3229
|
config.maskConfig = {
|
|
3230
|
+
mask: new Array(this.usCountryLength).fill('9').join(''),
|
|
3237
3231
|
guide: false,
|
|
3238
3232
|
unmaskModelValue: true,
|
|
3239
3233
|
showMask: true,
|
|
3240
3234
|
};
|
|
3241
3235
|
config.inputMode = 'numeric';
|
|
3242
|
-
if (masksFunctionsMap['zip']) {
|
|
3243
|
-
config.maskConfig.mask = masksFunctionsMap['zip'];
|
|
3244
|
-
}
|
|
3245
3236
|
}
|
|
3246
3237
|
else {
|
|
3247
3238
|
config.maxLength = this.maxLength;
|
|
@@ -3485,7 +3476,7 @@ class CvvConverter extends Converter {
|
|
|
3485
3476
|
var _a;
|
|
3486
3477
|
const config = this.createDefaultControlConfig(TextControlConfig, field);
|
|
3487
3478
|
config.maskConfig = {
|
|
3488
|
-
mask:
|
|
3479
|
+
mask: new Array(this.maxFieldLength).fill('9').join(''),
|
|
3489
3480
|
unmaskModelValue: false,
|
|
3490
3481
|
guide: false,
|
|
3491
3482
|
};
|
|
@@ -3505,7 +3496,7 @@ class CvvConverter extends Converter {
|
|
|
3505
3496
|
return 'cc-csc';
|
|
3506
3497
|
}
|
|
3507
3498
|
getDataType() {
|
|
3508
|
-
return '
|
|
3499
|
+
return 'text';
|
|
3509
3500
|
}
|
|
3510
3501
|
shouldHideUserInput() {
|
|
3511
3502
|
return true;
|
|
@@ -3725,7 +3716,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
|
|
|
3725
3716
|
type: Injectable
|
|
3726
3717
|
}], ctorParameters: function () { return [{ type: SyncService }]; } });
|
|
3727
3718
|
|
|
3728
|
-
class
|
|
3719
|
+
class SelectControlConfig extends ControlConfig {
|
|
3729
3720
|
constructor() {
|
|
3730
3721
|
super(...arguments);
|
|
3731
3722
|
this.controlType = 'search-select';
|
|
@@ -3737,8 +3728,9 @@ class SelectConverter extends Converter {
|
|
|
3737
3728
|
super(syncService);
|
|
3738
3729
|
}
|
|
3739
3730
|
createControlConfig(field) {
|
|
3740
|
-
const config = this.createDefaultControlConfig(
|
|
3731
|
+
const config = this.createDefaultControlConfig(SelectControlConfig, field);
|
|
3741
3732
|
config.options = field.options;
|
|
3733
|
+
config.initValue = field.value;
|
|
3742
3734
|
return config;
|
|
3743
3735
|
}
|
|
3744
3736
|
}
|
|
@@ -3798,7 +3790,7 @@ class PricepointConverter extends Converter {
|
|
|
3798
3790
|
createControlConfig(field) {
|
|
3799
3791
|
const config = this.createDefaultControlConfig(TextControlConfig, field);
|
|
3800
3792
|
config.maskConfig = {
|
|
3801
|
-
mask:
|
|
3793
|
+
mask: new Array(this.maxFieldLength).fill('9').join(``),
|
|
3802
3794
|
unmaskModelValue: false,
|
|
3803
3795
|
guide: false,
|
|
3804
3796
|
};
|
|
@@ -4044,6 +4036,10 @@ class FormService {
|
|
|
4044
4036
|
}, {});
|
|
4045
4037
|
return new UntypedFormGroup(controls);
|
|
4046
4038
|
}
|
|
4039
|
+
getFieldFormState(fieldName) {
|
|
4040
|
+
var _a;
|
|
4041
|
+
return (_a = this.fieldFormStates[fieldName]) !== null && _a !== void 0 ? _a : null;
|
|
4042
|
+
}
|
|
4047
4043
|
updateFieldFormState(form, fields, fieldName, formState) {
|
|
4048
4044
|
var _a;
|
|
4049
4045
|
const field = fields.find((fieldItem) => fieldItem.name === fieldName);
|
|
@@ -6608,6 +6604,9 @@ class PaymentService {
|
|
|
6608
6604
|
this.formService.updateFieldFormState(this.form, this.fields, fieldName, formState);
|
|
6609
6605
|
}
|
|
6610
6606
|
}
|
|
6607
|
+
getFieldFormState(fieldName) {
|
|
6608
|
+
return this.formService.getFieldFormState(fieldName);
|
|
6609
|
+
}
|
|
6611
6610
|
getStatus() {
|
|
6612
6611
|
var _a, _b, _c, _d;
|
|
6613
6612
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -7261,6 +7260,7 @@ class CoreLibraryService {
|
|
|
7261
7260
|
changeFieldValue: (name, value) => this.paymentService.changeFieldValue(name, value),
|
|
7262
7261
|
changeFieldState: (name, state) => this.paymentService.changeFieldState(name, state),
|
|
7263
7262
|
updateFieldFormState: (fieldName, formState) => this.paymentService.updateFieldFormState(fieldName, formState),
|
|
7263
|
+
getFieldFormState: (fieldName) => this.paymentService.getFieldFormState(fieldName),
|
|
7264
7264
|
formMessages$: this.formMessagesService.data$,
|
|
7265
7265
|
getFormStatus: () => { var _a; return (_a = this.paymentService.form) === null || _a === void 0 ? void 0 : _a.status; },
|
|
7266
7266
|
getControlStatus: (name) => this.paymentService.getControlStatus(name),
|
|
@@ -7287,10 +7287,6 @@ class CoreLibraryService {
|
|
|
7287
7287
|
getLegalComponentConfig() {
|
|
7288
7288
|
return this.legalService.getLegalComponentConfig();
|
|
7289
7289
|
}
|
|
7290
|
-
getFieldMask(field) {
|
|
7291
|
-
const sanitizedName = field.name.replace(/^fix_/i, '');
|
|
7292
|
-
return masksFunctionsMap[sanitizedName];
|
|
7293
|
-
}
|
|
7294
7290
|
getUserBalanceValue() {
|
|
7295
7291
|
return this.userBalanceService.getUserBalanceValue();
|
|
7296
7292
|
}
|
|
@@ -8078,5 +8074,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
|
|
|
8078
8074
|
* Generated bundle index. Do not edit.
|
|
8079
8075
|
*/
|
|
8080
8076
|
|
|
8081
|
-
export { ApplePayService, CoreLibraryModule, CoreLibraryService, FieldNames, GooglePayService, PaymentSystemProcessingService, userBehaviourEventTypes };
|
|
8077
|
+
export { ApplePayService, CoreLibraryModule, CoreLibraryService, CreditCardTypes, FieldNames, GooglePayService, PaymentSystemProcessingService, userBehaviourEventTypes };
|
|
8082
8078
|
//# sourceMappingURL=xsolla-payment-client-core.mjs.map
|