@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
|
@@ -9,13 +9,6 @@ import { filter, map as map$1, tap, debounce, catchError } from 'rxjs/operators'
|
|
|
9
9
|
import * as i1$1 from '@angular/router';
|
|
10
10
|
import { CommonModule } from '@angular/common';
|
|
11
11
|
|
|
12
|
-
const masksFunctionsMap = {
|
|
13
|
-
zip: () => {
|
|
14
|
-
const zipLength = 5;
|
|
15
|
-
return new Array(zipLength).fill('9').join('');
|
|
16
|
-
},
|
|
17
|
-
};
|
|
18
|
-
|
|
19
12
|
class AppError extends Error {
|
|
20
13
|
constructor(message) {
|
|
21
14
|
super(message);
|
|
@@ -3169,14 +3162,12 @@ class ZipConverter extends Converter {
|
|
|
3169
3162
|
config.icon = 'location';
|
|
3170
3163
|
if (this.isUsCountry) {
|
|
3171
3164
|
config.maskConfig = {
|
|
3165
|
+
mask: new Array(this.usCountryLength).fill('9').join(''),
|
|
3172
3166
|
guide: false,
|
|
3173
3167
|
unmaskModelValue: true,
|
|
3174
3168
|
showMask: true,
|
|
3175
3169
|
};
|
|
3176
3170
|
config.inputMode = 'numeric';
|
|
3177
|
-
if (masksFunctionsMap['zip']) {
|
|
3178
|
-
config.maskConfig.mask = masksFunctionsMap['zip'];
|
|
3179
|
-
}
|
|
3180
3171
|
}
|
|
3181
3172
|
else {
|
|
3182
3173
|
config.maxLength = this.maxLength;
|
|
@@ -3416,7 +3407,7 @@ class CvvConverter extends Converter {
|
|
|
3416
3407
|
createControlConfig(field, formState) {
|
|
3417
3408
|
const config = this.createDefaultControlConfig(TextControlConfig, field);
|
|
3418
3409
|
config.maskConfig = {
|
|
3419
|
-
mask:
|
|
3410
|
+
mask: new Array(this.maxFieldLength).fill('9').join(''),
|
|
3420
3411
|
unmaskModelValue: false,
|
|
3421
3412
|
guide: false,
|
|
3422
3413
|
};
|
|
@@ -3436,7 +3427,7 @@ class CvvConverter extends Converter {
|
|
|
3436
3427
|
return 'cc-csc';
|
|
3437
3428
|
}
|
|
3438
3429
|
getDataType() {
|
|
3439
|
-
return '
|
|
3430
|
+
return 'text';
|
|
3440
3431
|
}
|
|
3441
3432
|
shouldHideUserInput() {
|
|
3442
3433
|
return true;
|
|
@@ -3656,7 +3647,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
|
|
|
3656
3647
|
type: Injectable
|
|
3657
3648
|
}], ctorParameters: function () { return [{ type: SyncService }]; } });
|
|
3658
3649
|
|
|
3659
|
-
class
|
|
3650
|
+
class SelectControlConfig extends ControlConfig {
|
|
3660
3651
|
constructor() {
|
|
3661
3652
|
super(...arguments);
|
|
3662
3653
|
this.controlType = 'search-select';
|
|
@@ -3668,8 +3659,9 @@ class SelectConverter extends Converter {
|
|
|
3668
3659
|
super(syncService);
|
|
3669
3660
|
}
|
|
3670
3661
|
createControlConfig(field) {
|
|
3671
|
-
const config = this.createDefaultControlConfig(
|
|
3662
|
+
const config = this.createDefaultControlConfig(SelectControlConfig, field);
|
|
3672
3663
|
config.options = field.options;
|
|
3664
|
+
config.initValue = field.value;
|
|
3673
3665
|
return config;
|
|
3674
3666
|
}
|
|
3675
3667
|
}
|
|
@@ -3729,7 +3721,7 @@ class PricepointConverter extends Converter {
|
|
|
3729
3721
|
createControlConfig(field) {
|
|
3730
3722
|
const config = this.createDefaultControlConfig(TextControlConfig, field);
|
|
3731
3723
|
config.maskConfig = {
|
|
3732
|
-
mask:
|
|
3724
|
+
mask: new Array(this.maxFieldLength).fill('9').join(``),
|
|
3733
3725
|
unmaskModelValue: false,
|
|
3734
3726
|
guide: false,
|
|
3735
3727
|
};
|
|
@@ -3972,6 +3964,9 @@ class FormService {
|
|
|
3972
3964
|
}, {});
|
|
3973
3965
|
return new UntypedFormGroup(controls);
|
|
3974
3966
|
}
|
|
3967
|
+
getFieldFormState(fieldName) {
|
|
3968
|
+
return this.fieldFormStates[fieldName] ?? null;
|
|
3969
|
+
}
|
|
3975
3970
|
updateFieldFormState(form, fields, fieldName, formState) {
|
|
3976
3971
|
const field = fields.find((fieldItem) => fieldItem.name === fieldName);
|
|
3977
3972
|
if (!field) {
|
|
@@ -6452,6 +6447,9 @@ class PaymentService {
|
|
|
6452
6447
|
this.formService.updateFieldFormState(this.form, this.fields, fieldName, formState);
|
|
6453
6448
|
}
|
|
6454
6449
|
}
|
|
6450
|
+
getFieldFormState(fieldName) {
|
|
6451
|
+
return this.formService.getFieldFormState(fieldName);
|
|
6452
|
+
}
|
|
6455
6453
|
async getStatus() {
|
|
6456
6454
|
if (!isSubmitResponse(this.data)) {
|
|
6457
6455
|
throw new Error('Should submit form first');
|
|
@@ -7080,6 +7078,7 @@ class CoreLibraryService {
|
|
|
7080
7078
|
changeFieldValue: (name, value) => this.paymentService.changeFieldValue(name, value),
|
|
7081
7079
|
changeFieldState: (name, state) => this.paymentService.changeFieldState(name, state),
|
|
7082
7080
|
updateFieldFormState: (fieldName, formState) => this.paymentService.updateFieldFormState(fieldName, formState),
|
|
7081
|
+
getFieldFormState: (fieldName) => this.paymentService.getFieldFormState(fieldName),
|
|
7083
7082
|
formMessages$: this.formMessagesService.data$,
|
|
7084
7083
|
getFormStatus: () => this.paymentService.form?.status,
|
|
7085
7084
|
getControlStatus: (name) => this.paymentService.getControlStatus(name),
|
|
@@ -7106,10 +7105,6 @@ class CoreLibraryService {
|
|
|
7106
7105
|
getLegalComponentConfig() {
|
|
7107
7106
|
return this.legalService.getLegalComponentConfig();
|
|
7108
7107
|
}
|
|
7109
|
-
getFieldMask(field) {
|
|
7110
|
-
const sanitizedName = field.name.replace(/^fix_/i, '');
|
|
7111
|
-
return masksFunctionsMap[sanitizedName];
|
|
7112
|
-
}
|
|
7113
7108
|
getUserBalanceValue() {
|
|
7114
7109
|
return this.userBalanceService.getUserBalanceValue();
|
|
7115
7110
|
}
|
|
@@ -7890,5 +7885,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
|
|
|
7890
7885
|
* Generated bundle index. Do not edit.
|
|
7891
7886
|
*/
|
|
7892
7887
|
|
|
7893
|
-
export { ApplePayService, CoreLibraryModule, CoreLibraryService, FieldNames, GooglePayService, PaymentSystemProcessingService, userBehaviourEventTypes };
|
|
7888
|
+
export { ApplePayService, CoreLibraryModule, CoreLibraryService, CreditCardTypes, FieldNames, GooglePayService, PaymentSystemProcessingService, userBehaviourEventTypes };
|
|
7894
7889
|
//# sourceMappingURL=xsolla-payment-client-core.mjs.map
|