@bloonio/lokotro-pay 1.1.1 → 1.2.0
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.
|
@@ -17,8 +17,8 @@ import { HttpHeaders, HttpErrorResponse } from '@angular/common/http';
|
|
|
17
17
|
*/
|
|
18
18
|
const LOKOTRO_DEV_ENV = {
|
|
19
19
|
environment: 'development',
|
|
20
|
-
|
|
21
|
-
apiBaseUrl: 'https://dev.app.api.gtwy.lokotro.com',
|
|
20
|
+
apiBaseUrl: 'http://10.37.31.218:6495',
|
|
21
|
+
// apiBaseUrl: 'https://dev.app.api.gtwy.lokotro.com',
|
|
22
22
|
paymentApiVersion: 'v1',
|
|
23
23
|
debugMode: true,
|
|
24
24
|
logLevel: 'debug',
|
|
@@ -949,10 +949,10 @@ class LokotroLocalizationService {
|
|
|
949
949
|
this.translationsSubject.next(TRANSLATIONS[language]);
|
|
950
950
|
}
|
|
951
951
|
}
|
|
952
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
953
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
952
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: LokotroLocalizationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
953
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: LokotroLocalizationService, providedIn: 'root' }); }
|
|
954
954
|
}
|
|
955
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
955
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: LokotroLocalizationService, decorators: [{
|
|
956
956
|
type: Injectable,
|
|
957
957
|
args: [{
|
|
958
958
|
providedIn: 'root'
|
|
@@ -1014,8 +1014,8 @@ class LokotroPaymentMethodSelectionComponent {
|
|
|
1014
1014
|
parent.appendChild(placeholder);
|
|
1015
1015
|
}
|
|
1016
1016
|
}
|
|
1017
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1018
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1017
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: LokotroPaymentMethodSelectionComponent, deps: [{ token: LokotroLocalizationService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1018
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: LokotroPaymentMethodSelectionComponent, isStandalone: true, selector: "lokotro-payment-method-selection", inputs: { paymentMethods: "paymentMethods", selectedMethod: "selectedMethod" }, outputs: { methodSelected: "methodSelected" }, ngImport: i0, template: `
|
|
1019
1019
|
<div class="lokotro-method-selection">
|
|
1020
1020
|
<h3 class="lokotro-section-title">{{ localization.translate('selectPaymentMethod') }}</h3>
|
|
1021
1021
|
|
|
@@ -1068,7 +1068,7 @@ class LokotroPaymentMethodSelectionComponent {
|
|
|
1068
1068
|
</div>
|
|
1069
1069
|
`, isInline: true, styles: [".lokotro-method-selection{display:flex;flex-direction:column;gap:24px}.lokotro-section-title{font-size:20px;font-weight:600;margin:0;color:var(--lokotro-text-primary, #F2F0D5);text-align:center}.lokotro-methods-grid{display:flex;flex-direction:column;gap:12px}.lokotro-method-card{display:flex;align-items:center;gap:16px;padding:16px;background:var(--lokotro-card, #3A4840);border:2px solid var(--lokotro-border, #3A473F);border-radius:16px;cursor:pointer;transition:all .2s ease;text-align:left}.lokotro-method-card:hover:not(.disabled){border-color:var(--lokotro-accent, #3BFBDA);transform:translateY(-2px)}.lokotro-method-card.selected{border-color:var(--lokotro-accent, #3BFBDA);background:linear-gradient(135deg,var(--lokotro-card, #3A4840),var(--lokotro-surface, #2A3832))}.lokotro-method-card.disabled{opacity:.5;cursor:not-allowed}.lokotro-method-icon{width:48px;height:48px;display:flex;align-items:center;justify-content:center;background:var(--lokotro-surface, #2A3832);border-radius:12px;overflow:hidden}.lokotro-method-icon img{width:100%;height:100%;object-fit:contain}.lokotro-method-icon-placeholder{font-size:24px}.lokotro-method-info{flex:1;display:flex;flex-direction:column;gap:4px}.lokotro-method-name{font-size:16px;font-weight:600;color:var(--lokotro-text-primary, #F2F0D5)}.lokotro-method-description{font-size:13px;color:var(--lokotro-text-secondary, #D5D3B8)}.lokotro-method-check{width:24px;height:24px;display:flex;align-items:center;justify-content:center;color:var(--lokotro-accent, #3BFBDA)}.lokotro-continue-btn{width:100%;padding:16px;background:linear-gradient(135deg,var(--lokotro-primary, #5A5E39),var(--lokotro-secondary, #6E7346));color:var(--lokotro-text-primary, #F2F0D5);border:none;border-radius:12px;font-size:16px;font-weight:600;cursor:pointer;transition:all .2s ease}.lokotro-continue-btn:hover:not(:disabled){transform:translateY(-2px);box-shadow:0 8px 16px #0003}.lokotro-continue-btn:disabled{opacity:.5;cursor:not-allowed}\n"] }); }
|
|
1070
1070
|
}
|
|
1071
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1071
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: LokotroPaymentMethodSelectionComponent, decorators: [{
|
|
1072
1072
|
type: Component,
|
|
1073
1073
|
args: [{ selector: 'lokotro-payment-method-selection', standalone: true, imports: [], template: `
|
|
1074
1074
|
<div class="lokotro-method-selection">
|
|
@@ -1474,10 +1474,10 @@ class LokotroHttpClientService {
|
|
|
1474
1474
|
return LokotroPayApiResponseCode.LOK001; // General error
|
|
1475
1475
|
}
|
|
1476
1476
|
}
|
|
1477
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1478
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1477
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: LokotroHttpClientService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1478
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: LokotroHttpClientService, providedIn: 'root' }); }
|
|
1479
1479
|
}
|
|
1480
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1480
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: LokotroHttpClientService, decorators: [{
|
|
1481
1481
|
type: Injectable,
|
|
1482
1482
|
args: [{
|
|
1483
1483
|
providedIn: 'root'
|
|
@@ -1586,10 +1586,10 @@ class LokotroCountryService {
|
|
|
1586
1586
|
this.countriesCache = undefined;
|
|
1587
1587
|
this.countriesSubject.next([]);
|
|
1588
1588
|
}
|
|
1589
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1590
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1589
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: LokotroCountryService, deps: [{ token: LokotroHttpClientService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1590
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: LokotroCountryService, providedIn: 'root' }); }
|
|
1591
1591
|
}
|
|
1592
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1592
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: LokotroCountryService, decorators: [{
|
|
1593
1593
|
type: Injectable,
|
|
1594
1594
|
args: [{
|
|
1595
1595
|
providedIn: 'root'
|
|
@@ -1751,8 +1751,8 @@ class LokotroMobileMoneyPhoneInputComponent {
|
|
|
1751
1751
|
}
|
|
1752
1752
|
return null;
|
|
1753
1753
|
}
|
|
1754
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1755
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1754
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: LokotroMobileMoneyPhoneInputComponent, deps: [{ token: LokotroCountryService }, { token: LokotroLocalizationService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1755
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: LokotroMobileMoneyPhoneInputComponent, isStandalone: true, selector: "lokotro-mobile-money-phone-input", inputs: { label: "label", placeholder: "placeholder", initialCountryCode: "initialCountryCode", showPrefixHints: "showPrefixHints", disabled: "disabled" }, outputs: { countryChanged: "countryChanged", phoneChanged: "phoneChanged" }, providers: [
|
|
1756
1756
|
{
|
|
1757
1757
|
provide: NG_VALUE_ACCESSOR,
|
|
1758
1758
|
useExisting: forwardRef(() => LokotroMobileMoneyPhoneInputComponent),
|
|
@@ -1871,7 +1871,7 @@ class LokotroMobileMoneyPhoneInputComponent {
|
|
|
1871
1871
|
</div>
|
|
1872
1872
|
`, isInline: true, styles: [".lokotro-phone-input-container{position:relative;width:100%}.lokotro-label{display:block;margin-bottom:8px;font-size:14px;font-weight:500;color:var(--lokotro-text-secondary, #D5D3B8)}.lokotro-phone-input-row{display:flex;gap:12px;align-items:stretch}.lokotro-country-selector{display:flex;align-items:center;gap:8px;padding:12px 14px;background:var(--lokotro-card, #3A4840);border:2px solid var(--lokotro-border, #3A473F);border-radius:12px;color:var(--lokotro-text-primary, #F2F0D5);cursor:pointer;transition:border-color .2s;white-space:nowrap}.lokotro-country-selector:hover:not(:disabled){border-color:var(--lokotro-accent, #3BFBDA)}.lokotro-country-selector:disabled{opacity:.6;cursor:not-allowed}.lokotro-flag{font-size:24px;line-height:1}.lokotro-country-code{font-size:16px;font-weight:600}.lokotro-dropdown-arrow{font-size:10px;opacity:.6}.lokotro-loading-spinner{width:20px;height:20px;border:2px solid var(--lokotro-border, #3A473F);border-top-color:var(--lokotro-accent, #3BFBDA);border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.lokotro-phone-input{flex:1;padding:14px 16px;background:var(--lokotro-card, #3A4840);border:2px solid var(--lokotro-border, #3A473F);border-radius:12px;color:var(--lokotro-text-primary, #F2F0D5);font-size:16px;transition:border-color .2s;min-width:0}.lokotro-phone-input:focus{outline:none;border-color:var(--lokotro-accent, #3BFBDA)}.lokotro-phone-input.error{border-color:var(--lokotro-error, #D97652)}.lokotro-phone-input::placeholder{color:var(--lokotro-text-secondary, #D5D3B8);opacity:.6}.lokotro-phone-input:disabled{opacity:.6;cursor:not-allowed}.lokotro-prefix-error{margin-top:6px;font-size:12px;color:var(--lokotro-error, #D97652)}.lokotro-prefix-hints{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:8px}.lokotro-hint-label{font-size:12px;color:var(--lokotro-text-secondary, #D5D3B8)}.lokotro-prefix-chip{padding:2px 8px;background:#3bfbda1a;border-radius:4px;font-size:12px;font-weight:600;color:var(--lokotro-accent, #3BFBDA)}.lokotro-more-prefixes{font-size:12px;color:var(--lokotro-text-secondary, #D5D3B8)}.lokotro-country-picker{position:absolute;top:100%;left:0;right:0;max-height:300px;background:var(--lokotro-card, #3A4840);border:2px solid var(--lokotro-border, #3A473F);border-radius:12px;margin-top:4px;z-index:1000;overflow:hidden;display:flex;flex-direction:column}.lokotro-picker-header{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;border-bottom:1px solid var(--lokotro-border, #3A473F)}.lokotro-picker-title{font-size:16px;font-weight:600;color:var(--lokotro-text-primary, #F2F0D5)}.lokotro-picker-close{background:none;border:none;font-size:24px;color:var(--lokotro-text-secondary, #D5D3B8);cursor:pointer;padding:0;line-height:1}.lokotro-picker-list{overflow-y:auto;max-height:250px}.lokotro-country-option{display:flex;align-items:center;gap:12px;width:100%;padding:12px 16px;background:none;border:none;color:var(--lokotro-text-primary, #F2F0D5);cursor:pointer;text-align:left;transition:background-color .2s}.lokotro-country-option:hover{background:var(--lokotro-surface, #2A3832)}.lokotro-country-option.selected{background:#3bfbda1a}.lokotro-option-flag{font-size:28px}.lokotro-option-name{flex:1;font-size:14px;font-weight:500}.lokotro-option-code{font-size:12px;color:var(--lokotro-text-secondary, #D5D3B8)}.lokotro-option-check{color:var(--lokotro-accent, #3BFBDA);font-weight:700}.lokotro-picker-backdrop{position:fixed;inset:0;z-index:999}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "pipe", type: UpperCasePipe, name: "uppercase" }] }); }
|
|
1873
1873
|
}
|
|
1874
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1874
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: LokotroMobileMoneyPhoneInputComponent, decorators: [{
|
|
1875
1875
|
type: Component,
|
|
1876
1876
|
args: [{ selector: 'lokotro-mobile-money-phone-input', standalone: true, imports: [FormsModule, ReactiveFormsModule, UpperCasePipe], providers: [
|
|
1877
1877
|
{
|
|
@@ -2135,8 +2135,8 @@ class LokotroPaymentFormComponent {
|
|
|
2135
2135
|
onCancel() {
|
|
2136
2136
|
this.cancel.emit();
|
|
2137
2137
|
}
|
|
2138
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2139
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
2138
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: LokotroPaymentFormComponent, deps: [{ token: i1$1.FormBuilder }, { token: LokotroLocalizationService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2139
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: LokotroPaymentFormComponent, isStandalone: true, selector: "lokotro-payment-form", inputs: { channel: "channel", transactionId: "transactionId", showUserInfoForm: "showUserInfoForm" }, outputs: { formSubmitted: "formSubmitted", cancel: "cancel" }, ngImport: i0, template: `
|
|
2140
2140
|
<div class="lokotro-payment-form">
|
|
2141
2141
|
<!-- E-Wallet Form -->
|
|
2142
2142
|
@if (isEWalletForm) {
|
|
@@ -2399,9 +2399,9 @@ class LokotroPaymentFormComponent {
|
|
|
2399
2399
|
</form>
|
|
2400
2400
|
}
|
|
2401
2401
|
</div>
|
|
2402
|
-
`, isInline: true, styles: [".lokotro-payment-form{width:100%}.lokotro-form-title{font-size:20px;font-weight:600;margin:0 0 24px;color:var(--lokotro-text-primary, #F2F0D5);text-align:center}.lokotro-form-group{margin-bottom:20px}.lokotro-form-row{display:flex;gap:16px}.lokotro-form-row .lokotro-form-group{flex:1}.lokotro-label{display:block;margin-bottom:8px;font-size:14px;font-weight:500;color:var(--lokotro-text-secondary, #D5D3B8)}.lokotro-input{width:100%;padding:14px 16px;background:var(--lokotro-card, #3A4840);border:2px solid var(--lokotro-border, #3A473F);border-radius:12px;color:var(--lokotro-text-primary, #F2F0D5);font-size:16px;transition:border-color .2s;box-sizing:border-box}.lokotro-input:focus{outline:none;border-color:var(--lokotro-accent, #3BFBDA)}.lokotro-input::placeholder{color:var(--lokotro-text-secondary, #D5D3B8);opacity:.6}.lokotro-error{display:block;margin-top:6px;font-size:12px;color:var(--lokotro-error, #D97652)}.lokotro-user-info-section{margin-bottom:24px}.lokotro-section-subtitle{font-size:16px;font-weight:600;margin:0 0 16px;color:var(--lokotro-text-primary, #F2F0D5)}.lokotro-divider{border:none;border-top:1px solid var(--lokotro-border, #3A473F);margin:24px 0}.lokotro-form-actions{display:flex;gap:12px;margin-top:32px}.lokotro-btn-primary,.lokotro-btn-secondary{flex:1;padding:14px 24px;border-radius:12px;font-size:16px;font-weight:600;cursor:pointer;transition:all .2s ease}.lokotro-btn-primary{background:linear-gradient(135deg,var(--lokotro-primary, #5A5E39),var(--lokotro-secondary, #6E7346));color:var(--lokotro-text-primary, #F2F0D5);border:none}.lokotro-btn-primary:hover:not(:disabled){transform:translateY(-2px);box-shadow:0 8px 16px #0003}.lokotro-btn-primary:disabled{opacity:.5;cursor:not-allowed}.lokotro-btn-secondary{background:transparent;color:var(--lokotro-text-primary, #F2F0D5);border:2px solid var(--lokotro-border, #3A473F)}.lokotro-btn-secondary:hover{border-color:var(--lokotro-text-secondary, #D5D3B8)}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: LokotroMobileMoneyPhoneInputComponent, selector: "lokotro-mobile-money-phone-input", inputs: ["label", "placeholder", "initialCountryCode", "showPrefixHints", "disabled"], outputs: ["countryChanged", "phoneChanged"] }] }); }
|
|
2402
|
+
`, isInline: true, styles: [".lokotro-payment-form{width:100%}.lokotro-form-title{font-size:20px;font-weight:600;margin:0 0 24px;color:var(--lokotro-text-primary, #F2F0D5);text-align:center}.lokotro-form-group{margin-bottom:20px}.lokotro-form-row{display:flex;gap:16px}.lokotro-form-row .lokotro-form-group{flex:1}.lokotro-label{display:block;margin-bottom:8px;font-size:14px;font-weight:500;color:var(--lokotro-text-secondary, #D5D3B8)}.lokotro-input{width:100%;padding:14px 16px;background:var(--lokotro-card, #3A4840);border:2px solid var(--lokotro-border, #3A473F);border-radius:12px;color:var(--lokotro-text-primary, #F2F0D5);font-size:16px;transition:border-color .2s;box-sizing:border-box}.lokotro-input:focus{outline:none;border-color:var(--lokotro-accent, #3BFBDA)}.lokotro-input::placeholder{color:var(--lokotro-text-secondary, #D5D3B8);opacity:.6}.lokotro-error{display:block;margin-top:6px;font-size:12px;color:var(--lokotro-error, #D97652)}.lokotro-user-info-section{margin-bottom:24px}.lokotro-section-subtitle{font-size:16px;font-weight:600;margin:0 0 16px;color:var(--lokotro-text-primary, #F2F0D5)}.lokotro-divider{border:none;border-top:1px solid var(--lokotro-border, #3A473F);margin:24px 0}.lokotro-form-actions{display:flex;gap:12px;margin-top:32px}.lokotro-btn-primary,.lokotro-btn-secondary{flex:1;padding:14px 24px;border-radius:12px;font-size:16px;font-weight:600;cursor:pointer;transition:all .2s ease}.lokotro-btn-primary{background:linear-gradient(135deg,var(--lokotro-primary, #5A5E39),var(--lokotro-secondary, #6E7346));color:var(--lokotro-text-primary, #F2F0D5);border:none}.lokotro-btn-primary:hover:not(:disabled){transform:translateY(-2px);box-shadow:0 8px 16px #0003}.lokotro-btn-primary:disabled{opacity:.5;cursor:not-allowed}.lokotro-btn-secondary{background:transparent;color:var(--lokotro-text-primary, #F2F0D5);border:2px solid var(--lokotro-border, #3A473F)}.lokotro-btn-secondary:hover{border-color:var(--lokotro-text-secondary, #D5D3B8)}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: LokotroMobileMoneyPhoneInputComponent, selector: "lokotro-mobile-money-phone-input", inputs: ["label", "placeholder", "initialCountryCode", "showPrefixHints", "disabled"], outputs: ["countryChanged", "phoneChanged"] }] }); }
|
|
2403
2403
|
}
|
|
2404
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2404
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: LokotroPaymentFormComponent, decorators: [{
|
|
2405
2405
|
type: Component,
|
|
2406
2406
|
args: [{ selector: 'lokotro-payment-form', standalone: true, imports: [FormsModule, ReactiveFormsModule, LokotroMobileMoneyPhoneInputComponent], template: `
|
|
2407
2407
|
<div class="lokotro-payment-form">
|
|
@@ -2767,8 +2767,8 @@ class LokotroOtpVerificationComponent {
|
|
|
2767
2767
|
onCancelClick() {
|
|
2768
2768
|
this.cancel.emit();
|
|
2769
2769
|
}
|
|
2770
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2771
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
2770
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: LokotroOtpVerificationComponent, deps: [{ token: LokotroLocalizationService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2771
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: LokotroOtpVerificationComponent, isStandalone: true, selector: "lokotro-otp-verification", inputs: { transactionId: "transactionId", otpDestination: "otpDestination", otpLength: "otpLength" }, outputs: { otpVerified: "otpVerified", resendOtp: "resendOtp", cancel: "cancel" }, ngImport: i0, template: `
|
|
2772
2772
|
<div class="lokotro-otp-verification">
|
|
2773
2773
|
<div class="lokotro-otp-icon">
|
|
2774
2774
|
<svg width="64" height="64" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
|
|
@@ -2827,7 +2827,7 @@ class LokotroOtpVerificationComponent {
|
|
|
2827
2827
|
</div>
|
|
2828
2828
|
`, isInline: true, styles: [".lokotro-otp-verification{display:flex;flex-direction:column;align-items:center;text-align:center;padding:24px 0}.lokotro-otp-icon{width:80px;height:80px;display:flex;align-items:center;justify-content:center;background:var(--lokotro-card, #3A4840);border-radius:50%;margin-bottom:24px;color:var(--lokotro-accent, #3BFBDA)}.lokotro-otp-title{font-size:24px;font-weight:600;margin:0 0 8px;color:var(--lokotro-text-primary, #F2F0D5)}.lokotro-otp-subtitle{font-size:14px;color:var(--lokotro-text-secondary, #D5D3B8);margin:0 0 32px}.lokotro-otp-inputs{display:flex;gap:12px;margin-bottom:24px}.lokotro-otp-input{width:50px;height:56px;text-align:center;font-size:24px;font-weight:600;background:var(--lokotro-card, #3A4840);border:2px solid var(--lokotro-border, #3A473F);border-radius:12px;color:var(--lokotro-text-primary, #F2F0D5);transition:border-color .2s}.lokotro-otp-input:focus{outline:none;border-color:var(--lokotro-accent, #3BFBDA)}.lokotro-otp-timer{font-size:14px;color:var(--lokotro-text-secondary, #D5D3B8);margin-bottom:24px}.lokotro-resend-btn{background:none;border:none;color:var(--lokotro-accent, #3BFBDA);font-size:14px;font-weight:600;cursor:pointer;margin-bottom:24px;text-decoration:underline}.lokotro-resend-btn:hover{opacity:.8}.lokotro-form-actions{display:flex;gap:12px;width:100%}.lokotro-btn-primary,.lokotro-btn-secondary{flex:1;padding:14px 24px;border-radius:12px;font-size:16px;font-weight:600;cursor:pointer;transition:all .2s ease}.lokotro-btn-primary{background:linear-gradient(135deg,var(--lokotro-primary, #5A5E39),var(--lokotro-secondary, #6E7346));color:var(--lokotro-text-primary, #F2F0D5);border:none}.lokotro-btn-primary:hover:not(:disabled){transform:translateY(-2px);box-shadow:0 8px 16px #0003}.lokotro-btn-primary:disabled{opacity:.5;cursor:not-allowed}.lokotro-btn-secondary{background:transparent;color:var(--lokotro-text-primary, #F2F0D5);border:2px solid var(--lokotro-border, #3A473F)}.lokotro-btn-secondary:hover{border-color:var(--lokotro-text-secondary, #D5D3B8)}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }] }); }
|
|
2829
2829
|
}
|
|
2830
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2830
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: LokotroOtpVerificationComponent, decorators: [{
|
|
2831
2831
|
type: Component,
|
|
2832
2832
|
args: [{ selector: 'lokotro-otp-verification', standalone: true, imports: [FormsModule], template: `
|
|
2833
2833
|
<div class="lokotro-otp-verification">
|
|
@@ -2915,8 +2915,8 @@ class LokotroProcessingComponent {
|
|
|
2915
2915
|
setTimeout(() => this.currentStep = 3, 6000);
|
|
2916
2916
|
}
|
|
2917
2917
|
}
|
|
2918
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2919
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
2918
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: LokotroProcessingComponent, deps: [{ token: LokotroLocalizationService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2919
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: LokotroProcessingComponent, isStandalone: true, selector: "lokotro-processing", inputs: { type: "type", message: "message" }, ngImport: i0, template: `
|
|
2920
2920
|
<div class="lokotro-processing">
|
|
2921
2921
|
<div class="lokotro-processing-spinner">
|
|
2922
2922
|
<div class="lokotro-spinner-ring"></div>
|
|
@@ -2951,7 +2951,7 @@ class LokotroProcessingComponent {
|
|
|
2951
2951
|
</div>
|
|
2952
2952
|
`, isInline: true, styles: [".lokotro-processing{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:48px 24px;min-height:300px}.lokotro-processing-spinner{position:relative;width:80px;height:80px;margin-bottom:32px}.lokotro-spinner-ring{position:absolute;width:100%;height:100%;border:3px solid transparent;border-radius:50%;animation:lokotro-spin 1.5s linear infinite}.lokotro-spinner-ring:nth-child(1){border-top-color:var(--lokotro-accent, #3BFBDA);animation-delay:0s}.lokotro-spinner-ring:nth-child(2){border-right-color:var(--lokotro-primary, #5A5E39);animation-delay:.15s;width:70%;height:70%;top:15%;left:15%}.lokotro-spinner-ring:nth-child(3){border-bottom-color:var(--lokotro-secondary, #6E7346);animation-delay:.3s;width:50%;height:50%;top:25%;left:25%}@keyframes lokotro-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.lokotro-processing-title{font-size:20px;font-weight:600;margin:0 0 8px;color:var(--lokotro-text-primary, #F2F0D5)}.lokotro-processing-subtitle{font-size:14px;color:var(--lokotro-text-secondary, #D5D3B8);margin:0 0 32px}.lokotro-processing-steps{display:flex;flex-direction:column;gap:16px;width:100%;max-width:280px}.lokotro-step{display:flex;align-items:center;gap:12px;padding:12px 16px;background:var(--lokotro-card, #3A4840);border-radius:12px;opacity:.5;transition:opacity .3s}.lokotro-step.active{opacity:1}.lokotro-step-icon{font-size:20px}.lokotro-step span{font-size:14px;color:var(--lokotro-text-primary, #F2F0D5)}\n"] }); }
|
|
2953
2953
|
}
|
|
2954
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2954
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: LokotroProcessingComponent, decorators: [{
|
|
2955
2955
|
type: Component,
|
|
2956
2956
|
args: [{ selector: 'lokotro-processing', standalone: true, imports: [], template: `
|
|
2957
2957
|
<div class="lokotro-processing">
|
|
@@ -2996,6 +2996,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
|
|
|
2996
2996
|
/**
|
|
2997
2997
|
* Lokotro Pay - Result Component
|
|
2998
2998
|
* Success, Error, Warning, Info screens
|
|
2999
|
+
*
|
|
3000
|
+
* Designed for financial UX: clean white surface, prominent amount focal
|
|
3001
|
+
* on success, filled status badge, restrained transaction-detail panel.
|
|
2999
3002
|
*/
|
|
3000
3003
|
class LokotroResultComponent {
|
|
3001
3004
|
constructor(localization) {
|
|
@@ -3056,13 +3059,15 @@ class LokotroResultComponent {
|
|
|
3056
3059
|
return 0;
|
|
3057
3060
|
return (this.countdownSeconds / this.autoRedirectSeconds) * 100;
|
|
3058
3061
|
}
|
|
3062
|
+
formatNumber(amount) {
|
|
3063
|
+
return new Intl.NumberFormat('en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2 }).format(amount);
|
|
3064
|
+
}
|
|
3059
3065
|
formatAmount(amount, currency) {
|
|
3060
|
-
|
|
3066
|
+
return new Intl.NumberFormat('en-US', {
|
|
3061
3067
|
style: 'currency',
|
|
3062
3068
|
currency: currency || 'USD',
|
|
3063
3069
|
minimumFractionDigits: 2
|
|
3064
|
-
});
|
|
3065
|
-
return formatter.format(amount);
|
|
3070
|
+
}).format(amount);
|
|
3066
3071
|
}
|
|
3067
3072
|
onPrimaryClick() {
|
|
3068
3073
|
this.cancelCountdown();
|
|
@@ -3072,230 +3077,196 @@ class LokotroResultComponent {
|
|
|
3072
3077
|
this.cancelCountdown();
|
|
3073
3078
|
this.secondaryAction.emit();
|
|
3074
3079
|
}
|
|
3075
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3076
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
3080
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: LokotroResultComponent, deps: [{ token: LokotroLocalizationService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3081
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: LokotroResultComponent, isStandalone: true, selector: "lokotro-result", inputs: { type: "type", title: "title", message: "message", amount: "amount", currency: "currency", transactionId: "transactionId", primaryActionLabel: "primaryActionLabel", secondaryActionLabel: "secondaryActionLabel", autoRedirectSeconds: "autoRedirectSeconds" }, outputs: { primaryAction: "primaryAction", secondaryAction: "secondaryAction", autoRedirect: "autoRedirect" }, ngImport: i0, template: `
|
|
3077
3082
|
<div class="lokotro-result" [class]="'lokotro-result-' + type">
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
<
|
|
3100
|
-
|
|
3101
|
-
|
|
3083
|
+
<div class="lokotro-result-card">
|
|
3084
|
+
<!-- Status Badge (filled circle with icon) -->
|
|
3085
|
+
<div class="lokotro-status-badge" [class]="'lokotro-status-' + type">
|
|
3086
|
+
@if (type === 'success') {
|
|
3087
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round">
|
|
3088
|
+
<polyline points="5 12 10 17 19 8"/>
|
|
3089
|
+
</svg>
|
|
3090
|
+
}
|
|
3091
|
+
@if (type === 'error') {
|
|
3092
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round">
|
|
3093
|
+
<line x1="18" y1="6" x2="6" y2="18"/>
|
|
3094
|
+
<line x1="6" y1="6" x2="18" y2="18"/>
|
|
3095
|
+
</svg>
|
|
3096
|
+
}
|
|
3097
|
+
@if (type === 'warning') {
|
|
3098
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round">
|
|
3099
|
+
<line x1="12" y1="8" x2="12" y2="13"/>
|
|
3100
|
+
<line x1="12" y1="17" x2="12.01" y2="17"/>
|
|
3101
|
+
</svg>
|
|
3102
|
+
}
|
|
3103
|
+
@if (type === 'info') {
|
|
3104
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round">
|
|
3105
|
+
<line x1="12" y1="11" x2="12" y2="16"/>
|
|
3106
|
+
<line x1="12" y1="7" x2="12.01" y2="7"/>
|
|
3107
|
+
</svg>
|
|
3108
|
+
}
|
|
3109
|
+
</div>
|
|
3110
|
+
|
|
3111
|
+
<!-- Amount focal (success only, when amount provided) -->
|
|
3112
|
+
@if (type === 'success' && amount !== undefined && amount !== null) {
|
|
3113
|
+
<div class="lokotro-amount-focal">
|
|
3114
|
+
<span class="lokotro-amount-currency">{{ (currency || '').toUpperCase() }}</span>
|
|
3115
|
+
<span class="lokotro-amount-value">{{ formatNumber(amount) }}</span>
|
|
3116
|
+
</div>
|
|
3102
3117
|
}
|
|
3103
|
-
|
|
3104
|
-
<!--
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
</
|
|
3118
|
+
|
|
3119
|
+
<!-- Title -->
|
|
3120
|
+
<h2 class="lokotro-result-title">{{ title }}</h2>
|
|
3121
|
+
|
|
3122
|
+
<!-- Message -->
|
|
3123
|
+
@if (message) {
|
|
3124
|
+
<p class="lokotro-result-message">{{ message }}</p>
|
|
3110
3125
|
}
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
<!-- Message -->
|
|
3117
|
-
@if (message) {
|
|
3118
|
-
<p class="lokotro-result-message">{{ message }}</p>
|
|
3119
|
-
}
|
|
3120
|
-
|
|
3121
|
-
<!-- Countdown Indicator -->
|
|
3122
|
-
@if (autoRedirectSeconds > 0 && countdownSeconds > 0 && !isCountdownCancelled) {
|
|
3123
|
-
<div class="lokotro-countdown-indicator"
|
|
3124
|
-
(click)="cancelCountdown()">
|
|
3125
|
-
<div class="lokotro-countdown-progress">
|
|
3126
|
+
|
|
3127
|
+
<!-- Countdown Indicator -->
|
|
3128
|
+
@if (autoRedirectSeconds > 0 && countdownSeconds > 0 && !isCountdownCancelled) {
|
|
3129
|
+
<button type="button" class="lokotro-countdown-indicator" (click)="cancelCountdown()">
|
|
3126
3130
|
<svg viewBox="0 0 36 36" class="lokotro-countdown-circle">
|
|
3127
3131
|
<path class="lokotro-countdown-bg"
|
|
3128
|
-
|
|
3129
|
-
a 15.9155 15.9155 0 0 1 0 31.831
|
|
3130
|
-
a 15.9155 15.9155 0 0 1 0 -31.831"
|
|
3131
|
-
/>
|
|
3132
|
+
d="M18 2.0845 a 15.9155 15.9155 0 0 1 0 31.831 a 15.9155 15.9155 0 0 1 0 -31.831"/>
|
|
3132
3133
|
<path class="lokotro-countdown-fill" [class]="'lokotro-countdown-' + type"
|
|
3133
3134
|
[attr.stroke-dasharray]="getCountdownProgress() + ', 100'"
|
|
3134
|
-
|
|
3135
|
-
a 15.9155 15.9155 0 0 1 0 31.831
|
|
3136
|
-
a 15.9155 15.9155 0 0 1 0 -31.831"
|
|
3137
|
-
/>
|
|
3135
|
+
d="M18 2.0845 a 15.9155 15.9155 0 0 1 0 31.831 a 15.9155 15.9155 0 0 1 0 -31.831"/>
|
|
3138
3136
|
</svg>
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
</
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
<div class="lokotro-result-details">
|
|
3152
|
-
@if (amount) {
|
|
3153
|
-
<div class="lokotro-detail-row">
|
|
3154
|
-
<span class="lokotro-detail-label">{{ localization.translate('amount') }}</span>
|
|
3155
|
-
<span class="lokotro-detail-value">{{ formatAmount(amount, currency) }}</span>
|
|
3156
|
-
</div>
|
|
3157
|
-
}
|
|
3158
|
-
@if (transactionId) {
|
|
3137
|
+
<span class="lokotro-countdown-text">
|
|
3138
|
+
{{ localization.translate('redirectingIn', { seconds: countdownSeconds }) }}
|
|
3139
|
+
</span>
|
|
3140
|
+
<svg class="lokotro-countdown-cancel" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
3141
|
+
<path d="M18 6L6 18M6 6l12 12"/>
|
|
3142
|
+
</svg>
|
|
3143
|
+
</button>
|
|
3144
|
+
}
|
|
3145
|
+
|
|
3146
|
+
<!-- Transaction Details -->
|
|
3147
|
+
@if (type === 'success' && transactionId) {
|
|
3148
|
+
<div class="lokotro-result-details">
|
|
3159
3149
|
<div class="lokotro-detail-row">
|
|
3160
3150
|
<span class="lokotro-detail-label">Transaction ID</span>
|
|
3161
3151
|
<span class="lokotro-detail-value lokotro-mono">{{ transactionId }}</span>
|
|
3162
3152
|
</div>
|
|
3153
|
+
</div>
|
|
3154
|
+
}
|
|
3155
|
+
</div>
|
|
3156
|
+
|
|
3157
|
+
<!-- Actions -->
|
|
3158
|
+
@if (primaryActionLabel || secondaryActionLabel) {
|
|
3159
|
+
<div class="lokotro-result-actions">
|
|
3160
|
+
@if (primaryActionLabel) {
|
|
3161
|
+
<button type="button" class="lokotro-btn-primary" (click)="onPrimaryClick()">
|
|
3162
|
+
{{ primaryActionLabel }}
|
|
3163
|
+
</button>
|
|
3164
|
+
}
|
|
3165
|
+
@if (secondaryActionLabel) {
|
|
3166
|
+
<button type="button" class="lokotro-btn-secondary" (click)="onSecondaryClick()">
|
|
3167
|
+
{{ secondaryActionLabel }}
|
|
3168
|
+
</button>
|
|
3163
3169
|
}
|
|
3164
3170
|
</div>
|
|
3165
3171
|
}
|
|
3166
|
-
|
|
3167
|
-
<!-- Actions -->
|
|
3168
|
-
<div class="lokotro-result-actions">
|
|
3169
|
-
@if (primaryActionLabel) {
|
|
3170
|
-
<button
|
|
3171
|
-
class="lokotro-btn-primary"
|
|
3172
|
-
(click)="onPrimaryClick()">
|
|
3173
|
-
{{ primaryActionLabel }}
|
|
3174
|
-
</button>
|
|
3175
|
-
}
|
|
3176
|
-
@if (secondaryActionLabel) {
|
|
3177
|
-
<button
|
|
3178
|
-
class="lokotro-btn-secondary"
|
|
3179
|
-
(click)="onSecondaryClick()">
|
|
3180
|
-
{{ secondaryActionLabel }}
|
|
3181
|
-
</button>
|
|
3182
|
-
}
|
|
3183
|
-
</div>
|
|
3184
3172
|
</div>
|
|
3185
|
-
|
|
3173
|
+
`, isInline: true, styles: [".lokotro-result{display:flex;flex-direction:column;align-items:stretch;max-width:420px;margin:0 auto;padding:24px 16px;gap:20px}.lokotro-result-card{display:flex;flex-direction:column;align-items:center;text-align:center;padding:32px 24px;background:var(--lokotro-card, #FFFFFF);border:1px solid var(--lokotro-border, #E2E8F0);border-radius:20px;box-shadow:0 1px 3px var(--lokotro-shadow-light, rgba(15, 23, 42, .04)),0 8px 24px var(--lokotro-shadow-light, rgba(15, 23, 42, .04))}.lokotro-status-badge{width:72px;height:72px;border-radius:50%;display:flex;align-items:center;justify-content:center;margin-bottom:24px;animation:lokotro-pop .5s cubic-bezier(.34,1.56,.64,1)}.lokotro-status-badge svg{width:36px;height:36px;color:#fff}.lokotro-status-success{background:var(--lokotro-success, #16A34A);box-shadow:0 0 0 8px #16a34a1f,0 8px 20px #16a34a40}.lokotro-status-error{background:var(--lokotro-error, #DC2626);box-shadow:0 0 0 8px #dc26261f,0 8px 20px #dc262640}.lokotro-status-warning{background:var(--lokotro-warning, #D97706);box-shadow:0 0 0 8px #d977061f,0 8px 20px #d9770640}.lokotro-status-info{background:var(--lokotro-info, #2563EB);box-shadow:0 0 0 8px #2563eb1f,0 8px 20px #2563eb40}@keyframes lokotro-pop{0%{transform:scale(0);opacity:0}to{transform:scale(1);opacity:1}}.lokotro-amount-focal{display:flex;flex-direction:column;align-items:center;gap:4px;margin-bottom:16px}.lokotro-amount-currency{font-size:12px;font-weight:600;letter-spacing:.08em;color:var(--lokotro-text-secondary, #64748B)}.lokotro-amount-value{font-size:40px;font-weight:700;line-height:1;color:var(--lokotro-text-primary, #0F172A);font-variant-numeric:tabular-nums}.lokotro-result-title{font-size:20px;font-weight:600;margin:0 0 6px;color:var(--lokotro-text-primary, #0F172A)}.lokotro-result-message{font-size:14px;color:var(--lokotro-text-secondary, #64748B);margin:0;line-height:1.5;max-width:320px}.lokotro-result-details{width:100%;background:var(--lokotro-surface, #F7F8FA);border:1px solid var(--lokotro-border, #E2E8F0);border-radius:12px;padding:12px 16px;margin-top:24px}.lokotro-detail-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:6px 0}.lokotro-detail-row:not(:last-child){border-bottom:1px solid var(--lokotro-divider, #F1F5F9)}.lokotro-detail-label{font-size:13px;color:var(--lokotro-text-secondary, #64748B)}.lokotro-detail-value{font-size:13px;font-weight:600;color:var(--lokotro-text-primary, #0F172A);text-align:right;overflow:hidden;text-overflow:ellipsis;max-width:200px;white-space:nowrap}.lokotro-mono{font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Monaco,monospace;font-size:12px}.lokotro-result-actions{display:flex;flex-direction:column;gap:10px;width:100%}.lokotro-btn-primary,.lokotro-btn-secondary{width:100%;padding:14px 24px;border-radius:12px;font-size:15px;font-weight:600;cursor:pointer;transition:all .18s ease;font-family:inherit}.lokotro-btn-primary{background:var(--lokotro-primary, #0F172A);color:#fff;border:none}.lokotro-btn-primary:hover{transform:translateY(-1px);box-shadow:0 6px 16px var(--lokotro-shadow-medium, rgba(15, 23, 42, .12))}.lokotro-btn-primary:active{transform:translateY(0)}.lokotro-btn-secondary{background:transparent;color:var(--lokotro-text-primary, #0F172A);border:1.5px solid var(--lokotro-border, #E2E8F0)}.lokotro-btn-secondary:hover{border-color:var(--lokotro-text-secondary, #64748B);background:var(--lokotro-surface, #F7F8FA)}.lokotro-countdown-indicator{display:inline-flex;align-items:center;gap:8px;padding:6px 12px;background:var(--lokotro-surface, #F7F8FA);border:1px solid var(--lokotro-border, #E2E8F0);border-radius:999px;cursor:pointer;margin-top:20px;transition:all .18s ease;color:var(--lokotro-text-secondary, #64748B);font-family:inherit}.lokotro-countdown-indicator:hover{background:var(--lokotro-card, #FFFFFF);border-color:var(--lokotro-text-tertiary, #64748B)}.lokotro-countdown-circle{width:14px;height:14px;transform:rotate(-90deg)}.lokotro-countdown-bg{fill:none;stroke:var(--lokotro-border, #E2E8F0);stroke-width:4}.lokotro-countdown-fill{fill:none;stroke-width:4;stroke-linecap:round;transition:stroke-dasharray .3s ease}.lokotro-countdown-success{stroke:var(--lokotro-success, #16A34A)}.lokotro-countdown-error{stroke:var(--lokotro-error, #DC2626)}.lokotro-countdown-warning{stroke:var(--lokotro-warning, #D97706)}.lokotro-countdown-info{stroke:var(--lokotro-info, #2563EB)}.lokotro-countdown-text{font-size:12px;font-weight:500}.lokotro-countdown-cancel{color:inherit;opacity:.7}\n"] }); }
|
|
3186
3174
|
}
|
|
3187
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3175
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: LokotroResultComponent, decorators: [{
|
|
3188
3176
|
type: Component,
|
|
3189
3177
|
args: [{ selector: 'lokotro-result', standalone: true, imports: [], template: `
|
|
3190
3178
|
<div class="lokotro-result" [class]="'lokotro-result-' + type">
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
<
|
|
3213
|
-
|
|
3214
|
-
|
|
3179
|
+
<div class="lokotro-result-card">
|
|
3180
|
+
<!-- Status Badge (filled circle with icon) -->
|
|
3181
|
+
<div class="lokotro-status-badge" [class]="'lokotro-status-' + type">
|
|
3182
|
+
@if (type === 'success') {
|
|
3183
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round">
|
|
3184
|
+
<polyline points="5 12 10 17 19 8"/>
|
|
3185
|
+
</svg>
|
|
3186
|
+
}
|
|
3187
|
+
@if (type === 'error') {
|
|
3188
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round">
|
|
3189
|
+
<line x1="18" y1="6" x2="6" y2="18"/>
|
|
3190
|
+
<line x1="6" y1="6" x2="18" y2="18"/>
|
|
3191
|
+
</svg>
|
|
3192
|
+
}
|
|
3193
|
+
@if (type === 'warning') {
|
|
3194
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round">
|
|
3195
|
+
<line x1="12" y1="8" x2="12" y2="13"/>
|
|
3196
|
+
<line x1="12" y1="17" x2="12.01" y2="17"/>
|
|
3197
|
+
</svg>
|
|
3198
|
+
}
|
|
3199
|
+
@if (type === 'info') {
|
|
3200
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round">
|
|
3201
|
+
<line x1="12" y1="11" x2="12" y2="16"/>
|
|
3202
|
+
<line x1="12" y1="7" x2="12.01" y2="7"/>
|
|
3203
|
+
</svg>
|
|
3204
|
+
}
|
|
3205
|
+
</div>
|
|
3206
|
+
|
|
3207
|
+
<!-- Amount focal (success only, when amount provided) -->
|
|
3208
|
+
@if (type === 'success' && amount !== undefined && amount !== null) {
|
|
3209
|
+
<div class="lokotro-amount-focal">
|
|
3210
|
+
<span class="lokotro-amount-currency">{{ (currency || '').toUpperCase() }}</span>
|
|
3211
|
+
<span class="lokotro-amount-value">{{ formatNumber(amount) }}</span>
|
|
3212
|
+
</div>
|
|
3215
3213
|
}
|
|
3216
|
-
|
|
3217
|
-
<!--
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
</
|
|
3214
|
+
|
|
3215
|
+
<!-- Title -->
|
|
3216
|
+
<h2 class="lokotro-result-title">{{ title }}</h2>
|
|
3217
|
+
|
|
3218
|
+
<!-- Message -->
|
|
3219
|
+
@if (message) {
|
|
3220
|
+
<p class="lokotro-result-message">{{ message }}</p>
|
|
3223
3221
|
}
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
<!-- Message -->
|
|
3230
|
-
@if (message) {
|
|
3231
|
-
<p class="lokotro-result-message">{{ message }}</p>
|
|
3232
|
-
}
|
|
3233
|
-
|
|
3234
|
-
<!-- Countdown Indicator -->
|
|
3235
|
-
@if (autoRedirectSeconds > 0 && countdownSeconds > 0 && !isCountdownCancelled) {
|
|
3236
|
-
<div class="lokotro-countdown-indicator"
|
|
3237
|
-
(click)="cancelCountdown()">
|
|
3238
|
-
<div class="lokotro-countdown-progress">
|
|
3222
|
+
|
|
3223
|
+
<!-- Countdown Indicator -->
|
|
3224
|
+
@if (autoRedirectSeconds > 0 && countdownSeconds > 0 && !isCountdownCancelled) {
|
|
3225
|
+
<button type="button" class="lokotro-countdown-indicator" (click)="cancelCountdown()">
|
|
3239
3226
|
<svg viewBox="0 0 36 36" class="lokotro-countdown-circle">
|
|
3240
3227
|
<path class="lokotro-countdown-bg"
|
|
3241
|
-
|
|
3242
|
-
a 15.9155 15.9155 0 0 1 0 31.831
|
|
3243
|
-
a 15.9155 15.9155 0 0 1 0 -31.831"
|
|
3244
|
-
/>
|
|
3228
|
+
d="M18 2.0845 a 15.9155 15.9155 0 0 1 0 31.831 a 15.9155 15.9155 0 0 1 0 -31.831"/>
|
|
3245
3229
|
<path class="lokotro-countdown-fill" [class]="'lokotro-countdown-' + type"
|
|
3246
3230
|
[attr.stroke-dasharray]="getCountdownProgress() + ', 100'"
|
|
3247
|
-
|
|
3248
|
-
a 15.9155 15.9155 0 0 1 0 31.831
|
|
3249
|
-
a 15.9155 15.9155 0 0 1 0 -31.831"
|
|
3250
|
-
/>
|
|
3231
|
+
d="M18 2.0845 a 15.9155 15.9155 0 0 1 0 31.831 a 15.9155 15.9155 0 0 1 0 -31.831"/>
|
|
3251
3232
|
</svg>
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
</
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
<div class="lokotro-result-details">
|
|
3265
|
-
@if (amount) {
|
|
3266
|
-
<div class="lokotro-detail-row">
|
|
3267
|
-
<span class="lokotro-detail-label">{{ localization.translate('amount') }}</span>
|
|
3268
|
-
<span class="lokotro-detail-value">{{ formatAmount(amount, currency) }}</span>
|
|
3269
|
-
</div>
|
|
3270
|
-
}
|
|
3271
|
-
@if (transactionId) {
|
|
3233
|
+
<span class="lokotro-countdown-text">
|
|
3234
|
+
{{ localization.translate('redirectingIn', { seconds: countdownSeconds }) }}
|
|
3235
|
+
</span>
|
|
3236
|
+
<svg class="lokotro-countdown-cancel" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
3237
|
+
<path d="M18 6L6 18M6 6l12 12"/>
|
|
3238
|
+
</svg>
|
|
3239
|
+
</button>
|
|
3240
|
+
}
|
|
3241
|
+
|
|
3242
|
+
<!-- Transaction Details -->
|
|
3243
|
+
@if (type === 'success' && transactionId) {
|
|
3244
|
+
<div class="lokotro-result-details">
|
|
3272
3245
|
<div class="lokotro-detail-row">
|
|
3273
3246
|
<span class="lokotro-detail-label">Transaction ID</span>
|
|
3274
3247
|
<span class="lokotro-detail-value lokotro-mono">{{ transactionId }}</span>
|
|
3275
3248
|
</div>
|
|
3249
|
+
</div>
|
|
3250
|
+
}
|
|
3251
|
+
</div>
|
|
3252
|
+
|
|
3253
|
+
<!-- Actions -->
|
|
3254
|
+
@if (primaryActionLabel || secondaryActionLabel) {
|
|
3255
|
+
<div class="lokotro-result-actions">
|
|
3256
|
+
@if (primaryActionLabel) {
|
|
3257
|
+
<button type="button" class="lokotro-btn-primary" (click)="onPrimaryClick()">
|
|
3258
|
+
{{ primaryActionLabel }}
|
|
3259
|
+
</button>
|
|
3260
|
+
}
|
|
3261
|
+
@if (secondaryActionLabel) {
|
|
3262
|
+
<button type="button" class="lokotro-btn-secondary" (click)="onSecondaryClick()">
|
|
3263
|
+
{{ secondaryActionLabel }}
|
|
3264
|
+
</button>
|
|
3276
3265
|
}
|
|
3277
3266
|
</div>
|
|
3278
3267
|
}
|
|
3279
|
-
|
|
3280
|
-
<!-- Actions -->
|
|
3281
|
-
<div class="lokotro-result-actions">
|
|
3282
|
-
@if (primaryActionLabel) {
|
|
3283
|
-
<button
|
|
3284
|
-
class="lokotro-btn-primary"
|
|
3285
|
-
(click)="onPrimaryClick()">
|
|
3286
|
-
{{ primaryActionLabel }}
|
|
3287
|
-
</button>
|
|
3288
|
-
}
|
|
3289
|
-
@if (secondaryActionLabel) {
|
|
3290
|
-
<button
|
|
3291
|
-
class="lokotro-btn-secondary"
|
|
3292
|
-
(click)="onSecondaryClick()">
|
|
3293
|
-
{{ secondaryActionLabel }}
|
|
3294
|
-
</button>
|
|
3295
|
-
}
|
|
3296
|
-
</div>
|
|
3297
3268
|
</div>
|
|
3298
|
-
|
|
3269
|
+
`, styles: [".lokotro-result{display:flex;flex-direction:column;align-items:stretch;max-width:420px;margin:0 auto;padding:24px 16px;gap:20px}.lokotro-result-card{display:flex;flex-direction:column;align-items:center;text-align:center;padding:32px 24px;background:var(--lokotro-card, #FFFFFF);border:1px solid var(--lokotro-border, #E2E8F0);border-radius:20px;box-shadow:0 1px 3px var(--lokotro-shadow-light, rgba(15, 23, 42, .04)),0 8px 24px var(--lokotro-shadow-light, rgba(15, 23, 42, .04))}.lokotro-status-badge{width:72px;height:72px;border-radius:50%;display:flex;align-items:center;justify-content:center;margin-bottom:24px;animation:lokotro-pop .5s cubic-bezier(.34,1.56,.64,1)}.lokotro-status-badge svg{width:36px;height:36px;color:#fff}.lokotro-status-success{background:var(--lokotro-success, #16A34A);box-shadow:0 0 0 8px #16a34a1f,0 8px 20px #16a34a40}.lokotro-status-error{background:var(--lokotro-error, #DC2626);box-shadow:0 0 0 8px #dc26261f,0 8px 20px #dc262640}.lokotro-status-warning{background:var(--lokotro-warning, #D97706);box-shadow:0 0 0 8px #d977061f,0 8px 20px #d9770640}.lokotro-status-info{background:var(--lokotro-info, #2563EB);box-shadow:0 0 0 8px #2563eb1f,0 8px 20px #2563eb40}@keyframes lokotro-pop{0%{transform:scale(0);opacity:0}to{transform:scale(1);opacity:1}}.lokotro-amount-focal{display:flex;flex-direction:column;align-items:center;gap:4px;margin-bottom:16px}.lokotro-amount-currency{font-size:12px;font-weight:600;letter-spacing:.08em;color:var(--lokotro-text-secondary, #64748B)}.lokotro-amount-value{font-size:40px;font-weight:700;line-height:1;color:var(--lokotro-text-primary, #0F172A);font-variant-numeric:tabular-nums}.lokotro-result-title{font-size:20px;font-weight:600;margin:0 0 6px;color:var(--lokotro-text-primary, #0F172A)}.lokotro-result-message{font-size:14px;color:var(--lokotro-text-secondary, #64748B);margin:0;line-height:1.5;max-width:320px}.lokotro-result-details{width:100%;background:var(--lokotro-surface, #F7F8FA);border:1px solid var(--lokotro-border, #E2E8F0);border-radius:12px;padding:12px 16px;margin-top:24px}.lokotro-detail-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:6px 0}.lokotro-detail-row:not(:last-child){border-bottom:1px solid var(--lokotro-divider, #F1F5F9)}.lokotro-detail-label{font-size:13px;color:var(--lokotro-text-secondary, #64748B)}.lokotro-detail-value{font-size:13px;font-weight:600;color:var(--lokotro-text-primary, #0F172A);text-align:right;overflow:hidden;text-overflow:ellipsis;max-width:200px;white-space:nowrap}.lokotro-mono{font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Monaco,monospace;font-size:12px}.lokotro-result-actions{display:flex;flex-direction:column;gap:10px;width:100%}.lokotro-btn-primary,.lokotro-btn-secondary{width:100%;padding:14px 24px;border-radius:12px;font-size:15px;font-weight:600;cursor:pointer;transition:all .18s ease;font-family:inherit}.lokotro-btn-primary{background:var(--lokotro-primary, #0F172A);color:#fff;border:none}.lokotro-btn-primary:hover{transform:translateY(-1px);box-shadow:0 6px 16px var(--lokotro-shadow-medium, rgba(15, 23, 42, .12))}.lokotro-btn-primary:active{transform:translateY(0)}.lokotro-btn-secondary{background:transparent;color:var(--lokotro-text-primary, #0F172A);border:1.5px solid var(--lokotro-border, #E2E8F0)}.lokotro-btn-secondary:hover{border-color:var(--lokotro-text-secondary, #64748B);background:var(--lokotro-surface, #F7F8FA)}.lokotro-countdown-indicator{display:inline-flex;align-items:center;gap:8px;padding:6px 12px;background:var(--lokotro-surface, #F7F8FA);border:1px solid var(--lokotro-border, #E2E8F0);border-radius:999px;cursor:pointer;margin-top:20px;transition:all .18s ease;color:var(--lokotro-text-secondary, #64748B);font-family:inherit}.lokotro-countdown-indicator:hover{background:var(--lokotro-card, #FFFFFF);border-color:var(--lokotro-text-tertiary, #64748B)}.lokotro-countdown-circle{width:14px;height:14px;transform:rotate(-90deg)}.lokotro-countdown-bg{fill:none;stroke:var(--lokotro-border, #E2E8F0);stroke-width:4}.lokotro-countdown-fill{fill:none;stroke-width:4;stroke-linecap:round;transition:stroke-dasharray .3s ease}.lokotro-countdown-success{stroke:var(--lokotro-success, #16A34A)}.lokotro-countdown-error{stroke:var(--lokotro-error, #DC2626)}.lokotro-countdown-warning{stroke:var(--lokotro-warning, #D97706)}.lokotro-countdown-info{stroke:var(--lokotro-info, #2563EB)}.lokotro-countdown-text{font-size:12px;font-weight:500}.lokotro-countdown-cancel{color:inherit;opacity:.7}\n"] }]
|
|
3299
3270
|
}], ctorParameters: () => [{ type: LokotroLocalizationService }], propDecorators: { type: [{
|
|
3300
3271
|
type: Input
|
|
3301
3272
|
}], title: [{
|
|
@@ -3326,8 +3297,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
|
|
|
3326
3297
|
* Lokotro Pay - Loading Component
|
|
3327
3298
|
*/
|
|
3328
3299
|
class LokotroLoadingComponent {
|
|
3329
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3330
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
3300
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: LokotroLoadingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3301
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: LokotroLoadingComponent, isStandalone: true, selector: "lokotro-loading", inputs: { message: "message" }, ngImport: i0, template: `
|
|
3331
3302
|
<div class="lokotro-loading">
|
|
3332
3303
|
<div class="lokotro-loading-spinner">
|
|
3333
3304
|
<div class="lokotro-pulse-ring"></div>
|
|
@@ -3340,7 +3311,7 @@ class LokotroLoadingComponent {
|
|
|
3340
3311
|
</div>
|
|
3341
3312
|
`, isInline: true, styles: [".lokotro-loading{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:300px;padding:24px}.lokotro-loading-spinner{position:relative;width:60px;height:60px;margin-bottom:24px}.lokotro-pulse-ring{position:absolute;width:100%;height:100%;border:3px solid var(--lokotro-accent, #3BFBDA);border-radius:50%;opacity:0;animation:lokotro-pulse 2s cubic-bezier(.215,.61,.355,1) infinite}.lokotro-pulse-ring:nth-child(2){animation-delay:.5s}.lokotro-pulse-dot{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:16px;height:16px;background:var(--lokotro-accent, #3BFBDA);border-radius:50%;animation:lokotro-dot-pulse 2s ease-in-out infinite}@keyframes lokotro-pulse{0%{transform:scale(.5);opacity:.8}to{transform:scale(1.5);opacity:0}}@keyframes lokotro-dot-pulse{0%,to{transform:translate(-50%,-50%) scale(1)}50%{transform:translate(-50%,-50%) scale(1.2)}}.lokotro-loading-message{font-size:16px;color:var(--lokotro-text-secondary, #D5D3B8);margin:0}\n"] }); }
|
|
3342
3313
|
}
|
|
3343
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3314
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: LokotroLoadingComponent, decorators: [{
|
|
3344
3315
|
type: Component,
|
|
3345
3316
|
args: [{ selector: 'lokotro-loading', standalone: true, imports: [], template: `
|
|
3346
3317
|
<div class="lokotro-loading">
|
|
@@ -4129,10 +4100,10 @@ class LokotroPaymentService {
|
|
|
4129
4100
|
.map(item => this.asRecord(item))
|
|
4130
4101
|
.filter((item) => Boolean(item));
|
|
4131
4102
|
}
|
|
4132
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4133
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
4103
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: LokotroPaymentService, deps: [{ token: LokotroHttpClientService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4104
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: LokotroPaymentService, providedIn: 'root' }); }
|
|
4134
4105
|
}
|
|
4135
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4106
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: LokotroPaymentService, decorators: [{
|
|
4136
4107
|
type: Injectable,
|
|
4137
4108
|
args: [{
|
|
4138
4109
|
providedIn: 'root'
|
|
@@ -4146,14 +4117,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
|
|
|
4146
4117
|
class LokotroPayCheckoutComponent {
|
|
4147
4118
|
// Retry attempts tracking
|
|
4148
4119
|
static { this.MAX_RETRY_ATTEMPTS = 3; }
|
|
4149
|
-
constructor(paymentService, localization) {
|
|
4120
|
+
constructor(paymentService, localization, elementRef) {
|
|
4150
4121
|
this.paymentService = paymentService;
|
|
4151
4122
|
this.localization = localization;
|
|
4123
|
+
this.elementRef = elementRef;
|
|
4152
4124
|
this.enableHapticFeedback = true;
|
|
4153
4125
|
this.response = new EventEmitter();
|
|
4154
4126
|
this.error = new EventEmitter();
|
|
4155
4127
|
this.closed = new EventEmitter();
|
|
4156
|
-
|
|
4128
|
+
/** Default to light theme — payment widgets should look like clean white cards. */
|
|
4129
|
+
this.isDarkTheme = false;
|
|
4157
4130
|
this.retryAttempts = 0;
|
|
4158
4131
|
}
|
|
4159
4132
|
/** Check if user has retries left */
|
|
@@ -4161,15 +4134,55 @@ class LokotroPayCheckoutComponent {
|
|
|
4161
4134
|
return this.retryAttempts < LokotroPayCheckoutComponent.MAX_RETRY_ATTEMPTS;
|
|
4162
4135
|
}
|
|
4163
4136
|
ngOnInit() {
|
|
4137
|
+
this.applyThemeConfig();
|
|
4164
4138
|
this.initializeEnvironment();
|
|
4165
4139
|
this.initializeLocalization();
|
|
4166
4140
|
this.subscribeToState();
|
|
4167
4141
|
this.initializePayment();
|
|
4168
4142
|
}
|
|
4143
|
+
ngOnChanges(changes) {
|
|
4144
|
+
if (changes['themeConfig']) {
|
|
4145
|
+
this.applyThemeConfig();
|
|
4146
|
+
}
|
|
4147
|
+
}
|
|
4169
4148
|
ngOnDestroy() {
|
|
4170
4149
|
this.stateSubscription?.unsubscribe();
|
|
4171
4150
|
this.paymentService.resetState();
|
|
4172
4151
|
}
|
|
4152
|
+
/**
|
|
4153
|
+
* Apply the merchant-provided theme as CSS custom properties on the
|
|
4154
|
+
* checkout host element. Only sets variables for fields the merchant
|
|
4155
|
+
* provided — undefined fields fall back to the package defaults defined
|
|
4156
|
+
* in lokotro-pay.scss.
|
|
4157
|
+
*/
|
|
4158
|
+
applyThemeConfig() {
|
|
4159
|
+
const host = this.elementRef.nativeElement;
|
|
4160
|
+
if (!this.themeConfig)
|
|
4161
|
+
return;
|
|
4162
|
+
const t = this.themeConfig;
|
|
4163
|
+
const tertiary = t.tertiaryColor ?? t.accentColor;
|
|
4164
|
+
const map = [
|
|
4165
|
+
['--lokotro-primary', t.primaryColor],
|
|
4166
|
+
['--lokotro-secondary', t.secondaryColor],
|
|
4167
|
+
['--lokotro-tertiary', tertiary],
|
|
4168
|
+
['--lokotro-accent', tertiary],
|
|
4169
|
+
['--lokotro-background', t.backgroundColor],
|
|
4170
|
+
['--lokotro-surface', t.surfaceColor],
|
|
4171
|
+
['--lokotro-card', t.surfaceColor],
|
|
4172
|
+
['--lokotro-text-primary', t.textColor],
|
|
4173
|
+
['--lokotro-text-secondary', t.secondaryTextColor],
|
|
4174
|
+
['--lokotro-border', t.borderColor],
|
|
4175
|
+
['--lokotro-error', t.errorColor],
|
|
4176
|
+
['--lokotro-success', t.successColor],
|
|
4177
|
+
['--lokotro-warning', t.warningColor],
|
|
4178
|
+
['--lokotro-font-family', t.fontFamily],
|
|
4179
|
+
['--lokotro-radius-md', t.borderRadius]
|
|
4180
|
+
];
|
|
4181
|
+
for (const [prop, value] of map) {
|
|
4182
|
+
if (value)
|
|
4183
|
+
host.style.setProperty(prop, value);
|
|
4184
|
+
}
|
|
4185
|
+
}
|
|
4173
4186
|
initializeEnvironment() {
|
|
4174
4187
|
console.log('[Lokotro Checkout] initializeEnvironment - configs:', {
|
|
4175
4188
|
token: this.configs.token?.substring(0, 20) + '...',
|
|
@@ -4396,9 +4409,10 @@ class LokotroPayCheckoutComponent {
|
|
|
4396
4409
|
}
|
|
4397
4410
|
this.closed.emit();
|
|
4398
4411
|
}
|
|
4399
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4400
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
4401
|
-
<div class="lokotro-checkout" [class.lokotro-dark]="isDarkTheme" [style]="containerStyle"
|
|
4412
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: LokotroPayCheckoutComponent, deps: [{ token: LokotroPaymentService }, { token: LokotroLocalizationService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4413
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: LokotroPayCheckoutComponent, isStandalone: true, selector: "lokotro-pay-checkout", inputs: { title: "title", titleStyle: "titleStyle", titleBackgroundColor: "titleBackgroundColor", configs: "configs", paymentBody: "paymentBody", enableHapticFeedback: "enableHapticFeedback", backgroundColor: "backgroundColor", padding: "padding", themeConfig: "themeConfig", language: "language" }, outputs: { response: "response", error: "error", closed: "closed" }, usesOnChanges: true, ngImport: i0, template: `
|
|
4414
|
+
<div class="lokotro-checkout" [class.lokotro-dark]="isDarkTheme" [style]="containerStyle"
|
|
4415
|
+
role="dialog" aria-modal="true">
|
|
4402
4416
|
<!-- Header -->
|
|
4403
4417
|
@if (title) {
|
|
4404
4418
|
<div class="lokotro-checkout-header" [style.background-color]="titleBackgroundColor">
|
|
@@ -4519,9 +4533,9 @@ class LokotroPayCheckoutComponent {
|
|
|
4519
4533
|
}
|
|
4520
4534
|
</div>
|
|
4521
4535
|
</div>
|
|
4522
|
-
`, isInline: true, styles: [".lokotro-checkout{display:flex;flex-direction:column;min-height:100%;background:var(--lokotro-background, #
|
|
4536
|
+
`, isInline: true, styles: [".lokotro-checkout{display:flex;flex-direction:column;min-height:100%;background:var(--lokotro-background, #FFFFFF);color:var(--lokotro-text-primary, #0F172A);font-family:var(--lokotro-font-family, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif)}.lokotro-checkout-header{display:flex;align-items:center;justify-content:space-between;padding:16px;background:var(--lokotro-background, #FFFFFF);border-bottom:1px solid var(--lokotro-border, #E2E8F0)}.lokotro-title{flex:1;text-align:center;font-size:18px;font-weight:600;margin:0;color:var(--lokotro-text-primary, #0F172A)}.lokotro-back-btn,.lokotro-close-btn{background:none;border:none;padding:8px;cursor:pointer;color:var(--lokotro-text-secondary, #475569);border-radius:8px;transition:background-color .2s,color .2s}.lokotro-back-btn:hover,.lokotro-close-btn:hover{background:var(--lokotro-surface, #F7F8FA);color:var(--lokotro-text-primary, #0F172A)}.lokotro-checkout-content{flex:1;padding:16px;overflow-y:auto}.lokotro-dark{--lokotro-background: #0F172A;--lokotro-surface: #1E293B;--lokotro-card: #1E293B;--lokotro-text-primary: #F8FAFC;--lokotro-text-secondary: #CBD5E1;--lokotro-border: #334155}\n"], dependencies: [{ kind: "component", type: LokotroPaymentMethodSelectionComponent, selector: "lokotro-payment-method-selection", inputs: ["paymentMethods", "selectedMethod"], outputs: ["methodSelected"] }, { kind: "component", type: LokotroPaymentFormComponent, selector: "lokotro-payment-form", inputs: ["channel", "transactionId", "showUserInfoForm"], outputs: ["formSubmitted", "cancel"] }, { kind: "component", type: LokotroOtpVerificationComponent, selector: "lokotro-otp-verification", inputs: ["transactionId", "otpDestination", "otpLength"], outputs: ["otpVerified", "resendOtp", "cancel"] }, { kind: "component", type: LokotroProcessingComponent, selector: "lokotro-processing", inputs: ["type", "message"] }, { kind: "component", type: LokotroResultComponent, selector: "lokotro-result", inputs: ["type", "title", "message", "amount", "currency", "transactionId", "primaryActionLabel", "secondaryActionLabel", "autoRedirectSeconds"], outputs: ["primaryAction", "secondaryAction", "autoRedirect"] }, { kind: "component", type: LokotroLoadingComponent, selector: "lokotro-loading", inputs: ["message"] }] }); }
|
|
4523
4537
|
}
|
|
4524
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4538
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: LokotroPayCheckoutComponent, decorators: [{
|
|
4525
4539
|
type: Component,
|
|
4526
4540
|
args: [{ selector: 'lokotro-pay-checkout', standalone: true, imports: [
|
|
4527
4541
|
LokotroPaymentMethodSelectionComponent,
|
|
@@ -4531,7 +4545,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
|
|
|
4531
4545
|
LokotroResultComponent,
|
|
4532
4546
|
LokotroLoadingComponent
|
|
4533
4547
|
], template: `
|
|
4534
|
-
<div class="lokotro-checkout" [class.lokotro-dark]="isDarkTheme" [style]="containerStyle"
|
|
4548
|
+
<div class="lokotro-checkout" [class.lokotro-dark]="isDarkTheme" [style]="containerStyle"
|
|
4549
|
+
role="dialog" aria-modal="true">
|
|
4535
4550
|
<!-- Header -->
|
|
4536
4551
|
@if (title) {
|
|
4537
4552
|
<div class="lokotro-checkout-header" [style.background-color]="titleBackgroundColor">
|
|
@@ -4652,8 +4667,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
|
|
|
4652
4667
|
}
|
|
4653
4668
|
</div>
|
|
4654
4669
|
</div>
|
|
4655
|
-
`, styles: [".lokotro-checkout{display:flex;flex-direction:column;min-height:100%;background:var(--lokotro-background, #
|
|
4656
|
-
}], ctorParameters: () => [{ type: LokotroPaymentService }, { type: LokotroLocalizationService }], propDecorators: { title: [{
|
|
4670
|
+
`, styles: [".lokotro-checkout{display:flex;flex-direction:column;min-height:100%;background:var(--lokotro-background, #FFFFFF);color:var(--lokotro-text-primary, #0F172A);font-family:var(--lokotro-font-family, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif)}.lokotro-checkout-header{display:flex;align-items:center;justify-content:space-between;padding:16px;background:var(--lokotro-background, #FFFFFF);border-bottom:1px solid var(--lokotro-border, #E2E8F0)}.lokotro-title{flex:1;text-align:center;font-size:18px;font-weight:600;margin:0;color:var(--lokotro-text-primary, #0F172A)}.lokotro-back-btn,.lokotro-close-btn{background:none;border:none;padding:8px;cursor:pointer;color:var(--lokotro-text-secondary, #475569);border-radius:8px;transition:background-color .2s,color .2s}.lokotro-back-btn:hover,.lokotro-close-btn:hover{background:var(--lokotro-surface, #F7F8FA);color:var(--lokotro-text-primary, #0F172A)}.lokotro-checkout-content{flex:1;padding:16px;overflow-y:auto}.lokotro-dark{--lokotro-background: #0F172A;--lokotro-surface: #1E293B;--lokotro-card: #1E293B;--lokotro-text-primary: #F8FAFC;--lokotro-text-secondary: #CBD5E1;--lokotro-border: #334155}\n"] }]
|
|
4671
|
+
}], ctorParameters: () => [{ type: LokotroPaymentService }, { type: LokotroLocalizationService }, { type: i0.ElementRef }], propDecorators: { title: [{
|
|
4657
4672
|
type: Input
|
|
4658
4673
|
}], titleStyle: [{
|
|
4659
4674
|
type: Input
|
|
@@ -4741,8 +4756,8 @@ class LokotroPayModule {
|
|
|
4741
4756
|
],
|
|
4742
4757
|
};
|
|
4743
4758
|
}
|
|
4744
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4745
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
4759
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: LokotroPayModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
4760
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: LokotroPayModule, imports: [ReactiveFormsModule,
|
|
4746
4761
|
FormsModule,
|
|
4747
4762
|
// Standalone components
|
|
4748
4763
|
LokotroPayCheckoutComponent,
|
|
@@ -4758,14 +4773,14 @@ class LokotroPayModule {
|
|
|
4758
4773
|
LokotroProcessingComponent,
|
|
4759
4774
|
LokotroResultComponent,
|
|
4760
4775
|
LokotroLoadingComponent] }); }
|
|
4761
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
4776
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: LokotroPayModule, imports: [ReactiveFormsModule,
|
|
4762
4777
|
FormsModule,
|
|
4763
4778
|
// Standalone components
|
|
4764
4779
|
LokotroPayCheckoutComponent,
|
|
4765
4780
|
LokotroPaymentFormComponent,
|
|
4766
4781
|
LokotroOtpVerificationComponent] }); }
|
|
4767
4782
|
}
|
|
4768
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4783
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: LokotroPayModule, decorators: [{
|
|
4769
4784
|
type: NgModule,
|
|
4770
4785
|
args: [{
|
|
4771
4786
|
imports: [
|
|
@@ -4794,110 +4809,96 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
|
|
|
4794
4809
|
|
|
4795
4810
|
/**
|
|
4796
4811
|
* Lokotro Pay - Color Constants
|
|
4797
|
-
*
|
|
4798
|
-
|
|
4799
|
-
|
|
4800
|
-
*
|
|
4812
|
+
*
|
|
4813
|
+
* Neutral white-background palette intended for payment surfaces.
|
|
4814
|
+
* Brand colors (primary/secondary/tertiary) default to slate so the
|
|
4815
|
+
* widget renders correctly with no themeConfig provided. Merchants
|
|
4816
|
+
* override at runtime via `<lokotro-pay-checkout [themeConfig]>`.
|
|
4801
4817
|
*/
|
|
4802
4818
|
const LokotroPayColors = {
|
|
4803
|
-
//
|
|
4804
|
-
primary: '#
|
|
4805
|
-
primaryDark: '#
|
|
4806
|
-
primaryLight: '#
|
|
4807
|
-
primaryVariant: '#
|
|
4808
|
-
|
|
4809
|
-
|
|
4810
|
-
|
|
4811
|
-
|
|
4812
|
-
|
|
4813
|
-
|
|
4814
|
-
|
|
4815
|
-
|
|
4816
|
-
|
|
4817
|
-
|
|
4818
|
-
|
|
4819
|
-
|
|
4820
|
-
|
|
4821
|
-
|
|
4822
|
-
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
info: '#
|
|
4831
|
-
infoDark: '#
|
|
4832
|
-
infoLight: '#
|
|
4833
|
-
// Neutral
|
|
4819
|
+
// Brand - neutral defaults (override via themeConfig)
|
|
4820
|
+
primary: '#0F172A',
|
|
4821
|
+
primaryDark: '#020617',
|
|
4822
|
+
primaryLight: '#1E293B',
|
|
4823
|
+
primaryVariant: '#0F172A',
|
|
4824
|
+
secondary: '#475569',
|
|
4825
|
+
secondaryDark: '#334155',
|
|
4826
|
+
secondaryLight: '#64748B',
|
|
4827
|
+
secondaryVariant: '#1E293B',
|
|
4828
|
+
// Tertiary (highlight / accent stop)
|
|
4829
|
+
tertiary: '#2563EB',
|
|
4830
|
+
tertiaryDark: '#1D4ED8',
|
|
4831
|
+
tertiaryLight: '#3B82F6',
|
|
4832
|
+
// Backwards-compat aliases
|
|
4833
|
+
accent: '#2563EB',
|
|
4834
|
+
accentDark: '#1D4ED8',
|
|
4835
|
+
accentLight: '#3B82F6',
|
|
4836
|
+
// Semantic - status colors (do not override)
|
|
4837
|
+
success: '#16A34A',
|
|
4838
|
+
successDark: '#15803D',
|
|
4839
|
+
successLight: '#22C55E',
|
|
4840
|
+
error: '#DC2626',
|
|
4841
|
+
errorDark: '#B91C1C',
|
|
4842
|
+
errorLight: '#EF4444',
|
|
4843
|
+
warning: '#D97706',
|
|
4844
|
+
warningDark: '#B45309',
|
|
4845
|
+
warningLight: '#F59E0B',
|
|
4846
|
+
info: '#2563EB',
|
|
4847
|
+
infoDark: '#1D4ED8',
|
|
4848
|
+
infoLight: '#3B82F6',
|
|
4849
|
+
// Neutral
|
|
4834
4850
|
white: '#FFFFFF',
|
|
4835
4851
|
black: '#000000',
|
|
4836
|
-
grey: '#
|
|
4837
|
-
greyLight: '#
|
|
4838
|
-
greyDark: '#
|
|
4839
|
-
//
|
|
4840
|
-
textPrimaryLight: '#
|
|
4841
|
-
textSecondaryLight: '#
|
|
4842
|
-
textTertiaryLight: '#
|
|
4843
|
-
textDisabledLight: '#
|
|
4844
|
-
//
|
|
4845
|
-
textPrimaryDark: '#
|
|
4846
|
-
textSecondaryDark: '#
|
|
4847
|
-
textTertiaryDark: '#
|
|
4848
|
-
textDisabledDark: '#
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
|
|
4852
|
-
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
|
|
4856
|
-
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
-
|
|
4865
|
-
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
|
|
4873
|
-
overlayDark: 'rgba(0, 0, 0, 0.5)',
|
|
4874
|
-
// Transaction Type Colors
|
|
4875
|
-
transactionSent: '#D97652',
|
|
4876
|
-
transactionReceived: '#3BFBDA',
|
|
4877
|
-
transactionPending: '#6E7346',
|
|
4878
|
-
transactionFailed: '#3A4840'
|
|
4852
|
+
grey: '#94A3B8',
|
|
4853
|
+
greyLight: '#E2E8F0',
|
|
4854
|
+
greyDark: '#475569',
|
|
4855
|
+
// Light theme (default)
|
|
4856
|
+
textPrimaryLight: '#0F172A',
|
|
4857
|
+
textSecondaryLight: '#475569',
|
|
4858
|
+
textTertiaryLight: '#64748B',
|
|
4859
|
+
textDisabledLight: '#94A3B8',
|
|
4860
|
+
// Dark theme (opt-in)
|
|
4861
|
+
textPrimaryDark: '#F8FAFC',
|
|
4862
|
+
textSecondaryDark: '#CBD5E1',
|
|
4863
|
+
textTertiaryDark: '#94A3B8',
|
|
4864
|
+
textDisabledDark: '#64748B',
|
|
4865
|
+
backgroundLight: '#FFFFFF',
|
|
4866
|
+
surfaceLight: '#F7F8FA',
|
|
4867
|
+
cardLight: '#FFFFFF',
|
|
4868
|
+
backgroundDark: '#0F172A',
|
|
4869
|
+
surfaceDark: '#1E293B',
|
|
4870
|
+
cardDark: '#1E293B',
|
|
4871
|
+
// Glass overlays
|
|
4872
|
+
glassLight: 'rgba(255, 255, 255, 0.7)',
|
|
4873
|
+
glassDark: 'rgba(15, 23, 42, 0.04)',
|
|
4874
|
+
glassBlur: 'rgba(15, 23, 42, 0.5)',
|
|
4875
|
+
borderLight: '#E2E8F0',
|
|
4876
|
+
borderDark: '#334155',
|
|
4877
|
+
dividerLight: '#F1F5F9',
|
|
4878
|
+
dividerDark: '#1E293B',
|
|
4879
|
+
shadowLight: 'rgba(15, 23, 42, 0.04)',
|
|
4880
|
+
shadowMedium: 'rgba(15, 23, 42, 0.08)',
|
|
4881
|
+
shadowDark: 'rgba(15, 23, 42, 0.12)',
|
|
4882
|
+
overlayLight: 'rgba(255, 255, 255, 0.7)',
|
|
4883
|
+
overlayDark: 'rgba(15, 23, 42, 0.5)',
|
|
4884
|
+
// Transaction (semantic)
|
|
4885
|
+
transactionSent: '#DC2626',
|
|
4886
|
+
transactionReceived: '#16A34A',
|
|
4887
|
+
transactionPending: '#D97706',
|
|
4888
|
+
transactionFailed: '#475569'
|
|
4879
4889
|
};
|
|
4880
4890
|
/**
|
|
4881
|
-
*
|
|
4882
|
-
|
|
4883
|
-
|
|
4884
|
-
|
|
4885
|
-
secondary: `linear-gradient(135deg, ${LokotroPayColors.secondary}, ${LokotroPayColors.secondaryLight})`,
|
|
4886
|
-
accent: `linear-gradient(135deg, ${LokotroPayColors.accent}, ${LokotroPayColors.accentLight})`,
|
|
4887
|
-
success: `linear-gradient(135deg, ${LokotroPayColors.success}, ${LokotroPayColors.successDark})`,
|
|
4888
|
-
error: `linear-gradient(135deg, ${LokotroPayColors.error}, ${LokotroPayColors.errorDark})`,
|
|
4889
|
-
warning: `linear-gradient(135deg, ${LokotroPayColors.warning}, ${LokotroPayColors.warningDark})`,
|
|
4890
|
-
info: `linear-gradient(135deg, ${LokotroPayColors.info}, ${LokotroPayColors.infoLight})`,
|
|
4891
|
-
card: `linear-gradient(135deg, ${LokotroPayColors.backgroundDark}, ${LokotroPayColors.secondary})`
|
|
4892
|
-
};
|
|
4893
|
-
/**
|
|
4894
|
-
* Default theme configuration
|
|
4891
|
+
* Default theme — clean white payment surface.
|
|
4892
|
+
*
|
|
4893
|
+
* The checkout component sets these as CSS custom properties on its
|
|
4894
|
+
* host element, so any merchant override scopes only to the widget.
|
|
4895
4895
|
*/
|
|
4896
4896
|
const LokotroPayDefaultTheme = {
|
|
4897
4897
|
light: {
|
|
4898
4898
|
'--lokotro-primary': LokotroPayColors.primary,
|
|
4899
4899
|
'--lokotro-secondary': LokotroPayColors.secondary,
|
|
4900
|
-
'--lokotro-
|
|
4900
|
+
'--lokotro-tertiary': LokotroPayColors.tertiary,
|
|
4901
|
+
'--lokotro-accent': LokotroPayColors.tertiary,
|
|
4901
4902
|
'--lokotro-background': LokotroPayColors.backgroundLight,
|
|
4902
4903
|
'--lokotro-surface': LokotroPayColors.surfaceLight,
|
|
4903
4904
|
'--lokotro-card': LokotroPayColors.cardLight,
|
|
@@ -4913,7 +4914,8 @@ const LokotroPayDefaultTheme = {
|
|
|
4913
4914
|
dark: {
|
|
4914
4915
|
'--lokotro-primary': LokotroPayColors.primary,
|
|
4915
4916
|
'--lokotro-secondary': LokotroPayColors.secondary,
|
|
4916
|
-
'--lokotro-
|
|
4917
|
+
'--lokotro-tertiary': LokotroPayColors.tertiary,
|
|
4918
|
+
'--lokotro-accent': LokotroPayColors.tertiary,
|
|
4917
4919
|
'--lokotro-background': LokotroPayColors.backgroundDark,
|
|
4918
4920
|
'--lokotro-surface': LokotroPayColors.surfaceDark,
|
|
4919
4921
|
'--lokotro-card': LokotroPayColors.cardDark,
|
|
@@ -5226,8 +5228,8 @@ class LokotroPaymentStatusComponent {
|
|
|
5226
5228
|
}
|
|
5227
5229
|
this.onClose.emit();
|
|
5228
5230
|
}
|
|
5229
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
5230
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
5231
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: LokotroPaymentStatusComponent, deps: [{ token: LokotroPaymentService }, { token: LokotroLocalizationService }, { token: LokotroHttpClientService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5232
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: LokotroPaymentStatusComponent, isStandalone: true, selector: "lokotro-payment-status", inputs: { statusConfig: "statusConfig", showHeader: "showHeader", showCloseButton: "showCloseButton" }, outputs: { statusChange: "statusChange", paymentComplete: "paymentComplete", paymentFailed: "paymentFailed", onClose: "onClose", onDoneEvent: "onDoneEvent" }, ngImport: i0, template: `
|
|
5231
5233
|
<div class="lokotro-payment-status-container">
|
|
5232
5234
|
<!-- Header -->
|
|
5233
5235
|
@if (showHeader) {
|
|
@@ -5344,7 +5346,7 @@ class LokotroPaymentStatusComponent {
|
|
|
5344
5346
|
</div>
|
|
5345
5347
|
`, isInline: true, styles: [".lokotro-payment-status-container{min-height:300px;display:flex;flex-direction:column;background:var(--lokotro-background, #1C2621);border-radius:16px;border:1px solid var(--lokotro-border, rgba(59, 251, 218, .1));overflow:hidden;font-family:var(--lokotro-font-family, \"Comfortaa\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif)}.lokotro-status-header{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;background:var(--lokotro-surface, #2A3832);border-bottom:1px solid var(--lokotro-border, rgba(59, 251, 218, .1))}.lokotro-status-title{font-size:18px;font-weight:600;color:var(--lokotro-text-primary, #F2F0D5);margin:0}.lokotro-close-btn{background:none;border:none;padding:8px;cursor:pointer;color:var(--lokotro-text-primary, #F2F0D5);border-radius:8px;transition:background-color .2s}.lokotro-close-btn:hover{background:#ffffff1a}.lokotro-status-content{flex:1;padding:24px;display:flex;flex-direction:column;align-items:center;justify-content:center}.status-section{text-align:center;width:100%;max-width:400px}.status-icon{width:80px;height:80px;margin:0 auto 24px;display:flex;align-items:center;justify-content:center;border-radius:50%}.pending-icon{background:#fbbf241a;color:#fbbf24}.status-title{font-size:22px;font-weight:600;color:var(--lokotro-text-primary, #F2F0D5);margin:0 0 12px}.status-message{font-size:14px;color:var(--lokotro-text-secondary, rgba(242, 240, 213, .7));margin:0 0 24px;line-height:1.5}.payment-info{background:#5a5e3933;border-radius:12px;padding:16px;margin-bottom:24px}.info-row{display:flex;justify-content:space-between;padding:8px 0;border-bottom:1px solid rgba(242,240,213,.1)}.info-row:last-child{border-bottom:none}.info-label{color:var(--lokotro-text-secondary, rgba(242, 240, 213, .6));font-size:14px}.info-value{color:var(--lokotro-text-primary, #F2F0D5);font-size:14px;font-weight:500}.polling-indicator{display:flex;align-items:center;justify-content:center;gap:8px;font-size:12px;color:var(--lokotro-text-secondary, rgba(242, 240, 213, .5))}.pulse{width:8px;height:8px;background:var(--lokotro-primary, #3BFBDA);border-radius:50%;animation:pulse 1.5s ease-in-out infinite}@keyframes pulse{0%,to{opacity:1;transform:scale(1)}50%{opacity:.5;transform:scale(1.2)}}\n"], dependencies: [{ kind: "component", type: LokotroLoadingComponent, selector: "lokotro-loading", inputs: ["message"] }, { kind: "component", type: LokotroResultComponent, selector: "lokotro-result", inputs: ["type", "title", "message", "amount", "currency", "transactionId", "primaryActionLabel", "secondaryActionLabel", "autoRedirectSeconds"], outputs: ["primaryAction", "secondaryAction", "autoRedirect"] }, { kind: "component", type: LokotroProcessingComponent, selector: "lokotro-processing", inputs: ["type", "message"] }] }); }
|
|
5346
5348
|
}
|
|
5347
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
5349
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: LokotroPaymentStatusComponent, decorators: [{
|
|
5348
5350
|
type: Component,
|
|
5349
5351
|
args: [{ selector: 'lokotro-payment-status', standalone: true, imports: [LokotroLoadingComponent, LokotroResultComponent, LokotroProcessingComponent], template: `
|
|
5350
5352
|
<div class="lokotro-payment-status-container">
|