@miden-npm/angular 0.0.3 → 0.0.4

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/package.json CHANGED
@@ -5,7 +5,10 @@
5
5
  "registry": "https://registry.npmjs.org",
6
6
  "access": "public"
7
7
  },
8
- "version": "0.0.3",
8
+ "version": "0.0.4",
9
+ "files": [
10
+ "dist/**/*"
11
+ ],
9
12
  "description": "Miden Payment Gateway Angular SDK",
10
13
  "keywords": [
11
14
  "payments",
@@ -1,131 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { EventEmitter, OnInit, OnDestroy, ChangeDetectorRef, AfterViewInit, Renderer2, ElementRef } from '@angular/core';
3
- import { IPaymentObject, ISelectOption, CheckoutService } from '@miden-npm/angular';
4
-
5
- interface CheckoutIframeStyle {
6
- [cssProp: string]: string | number;
7
- }
8
- interface CheckoutCardOptions {
9
- imageUrl?: string;
10
- numberPlaceholder?: string;
11
- expiryPlaceholder?: string;
12
- cvcPlaceholder?: string;
13
- styles?: {
14
- base?: CheckoutIframeStyle;
15
- invalid?: CheckoutIframeStyle;
16
- focus?: CheckoutIframeStyle;
17
- };
18
- }
19
- interface TokenizeResult {
20
- token: string;
21
- last4?: string;
22
- brand?: string;
23
- }
24
- declare class CheckoutCardComponent {
25
- options: CheckoutCardOptions | null;
26
- secretKey: string;
27
- environment: 'sandbox' | 'prod';
28
- paymentObject: IPaymentObject;
29
- ready: EventEmitter<void>;
30
- validityChange: EventEmitter<{
31
- valid: boolean;
32
- field?: string;
33
- }>;
34
- tokenize: EventEmitter<TokenizeResult>;
35
- checkoutState: 'STABLE_COIN_PAYMENT' | 'PAYMENT' | 'SUCCESS';
36
- countryOptions: ISelectOption[];
37
- paymentTypeOptions: ISelectOption[];
38
- paymentType: string;
39
- get filteredPaymentTypeOptions(): ISelectOption[];
40
- get formatAmountHandler(): string;
41
- paymentTypeHandler(event: string): void;
42
- payStableCoinHandler(): void;
43
- static ɵfac: i0.ɵɵFactoryDeclaration<CheckoutCardComponent, never>;
44
- static ɵcmp: i0.ɵɵComponentDeclaration<CheckoutCardComponent, "bzp-checkout-card", never, { "options": { "alias": "options"; "required": false; }; "secretKey": { "alias": "secretKey"; "required": false; }; "environment": { "alias": "environment"; "required": false; }; "paymentObject": { "alias": "paymentObject"; "required": false; }; }, { "ready": "ready"; "validityChange": "validityChange"; "tokenize": "tokenize"; }, never, never, true, never>;
45
- }
46
-
47
- declare class PayByCardComponent {
48
- formIndex: number;
49
- setFormIndex(index: number): void;
50
- static ɵfac: i0.ɵɵFactoryDeclaration<PayByCardComponent, never>;
51
- static ɵcmp: i0.ɵɵComponentDeclaration<PayByCardComponent, "pay-by-card", never, {}, {}, never, never, true, never>;
52
- }
53
-
54
- declare class PayByTransferComponent implements OnInit, OnDestroy {
55
- private cdr;
56
- countDownTime: string;
57
- private remainingSeconds;
58
- private intervalId;
59
- constructor(cdr: ChangeDetectorRef);
60
- private updateDisplay;
61
- private startTimer;
62
- ngOnInit(): void;
63
- ngOnDestroy(): void;
64
- static ɵfac: i0.ɵɵFactoryDeclaration<PayByTransferComponent, never>;
65
- static ɵcmp: i0.ɵɵComponentDeclaration<PayByTransferComponent, "pay-by-transfer", never, {}, {}, never, never, true, never>;
66
- }
67
-
68
- declare class PayByStableCoinComponent {
69
- proceedToPay: EventEmitter<void>;
70
- formIndex: number;
71
- setFormIndex(index: number): void;
72
- payHandler(): void;
73
- static ɵfac: i0.ɵɵFactoryDeclaration<PayByStableCoinComponent, never>;
74
- static ɵcmp: i0.ɵɵComponentDeclaration<PayByStableCoinComponent, "pay-by-stable-coin", never, {}, { "proceedToPay": "proceedToPay"; }, never, never, true, never>;
75
- }
76
-
77
- interface IIframeStyle {
78
- width?: string;
79
- height?: string;
80
- border?: string;
81
- borderRadius?: string;
82
- overflow?: string;
83
- }
84
- declare class CheckoutIframeComponent implements AfterViewInit {
85
- private renderer;
86
- private cdr;
87
- private checkout;
88
- constructor(renderer: Renderer2, cdr: ChangeDetectorRef, checkout: CheckoutService);
89
- errorMessage: string;
90
- loading: boolean;
91
- launchUrl: string;
92
- iframe: any;
93
- secretKey: string;
94
- url: string;
95
- style: IIframeStyle;
96
- environment: 'sandbox' | 'prod';
97
- paymentObject: IPaymentObject;
98
- container?: ElementRef<HTMLDivElement>;
99
- get blockStyle(): {
100
- width?: string;
101
- height?: string;
102
- border?: string;
103
- borderRadius?: string;
104
- overflow?: string;
105
- };
106
- launchIframe(url: string): void;
107
- generatePaymentLinkHandler(): Promise<void | string>;
108
- ngAfterViewInit(): Promise<void>;
109
- static ɵfac: i0.ɵɵFactoryDeclaration<CheckoutIframeComponent, never>;
110
- static ɵcmp: i0.ɵɵComponentDeclaration<CheckoutIframeComponent, "bzp-checkout-iframe", never, { "secretKey": { "alias": "secretKey"; "required": false; }; "url": { "alias": "url"; "required": false; }; "style": { "alias": "style"; "required": false; }; "environment": { "alias": "environment"; "required": false; }; "paymentObject": { "alias": "paymentObject"; "required": false; }; }, {}, never, never, true, never>;
111
- }
112
-
113
- declare class CheckoutButtonComponent {
114
- private checkout;
115
- private cdr;
116
- constructor(checkout: CheckoutService, cdr: ChangeDetectorRef);
117
- errorMessage: string;
118
- loading: boolean;
119
- launchUrl: string;
120
- secretKey: string;
121
- timeout: number;
122
- environment: 'sandbox' | 'prod';
123
- mode: 'redirect' | 'iframe';
124
- paymentObject: IPaymentObject;
125
- generatePaymentLinkHandler(): Promise<void | string>;
126
- static ɵfac: i0.ɵɵFactoryDeclaration<CheckoutButtonComponent, never>;
127
- static ɵcmp: i0.ɵɵComponentDeclaration<CheckoutButtonComponent, "bzp-checkout-button", never, { "secretKey": { "alias": "secretKey"; "required": false; }; "timeout": { "alias": "timeout"; "required": false; }; "environment": { "alias": "environment"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "paymentObject": { "alias": "paymentObject"; "required": false; }; }, {}, never, never, true, never>;
128
- }
129
-
130
- export { CheckoutButtonComponent, CheckoutCardComponent, CheckoutIframeComponent, PayByCardComponent, PayByStableCoinComponent, PayByTransferComponent };
131
- export type { CheckoutCardOptions, CheckoutIframeStyle, TokenizeResult };
@@ -1,352 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { ChangeDetectionStrategy, Component, EventEmitter, Output, Input, ViewChild } from '@angular/core';
3
- import * as i1 from '@miden-npm/angular';
4
- import { ButtonComponent, InputComponent, SelectComponent, LabelInfoComponent, CopyComponent, ImageComponent, CurrencyAmountComponent, IconArrowSwapComponent, formatAmount, RadioGroupComponent, SuccessComponent, CardComponent, checkObjectTruthy, IconLoaderComponent, InputErrorComponent } from '@miden-npm/angular';
5
- import * as i2 from '@angular/common';
6
- import { CommonModule } from '@angular/common';
7
- import { tap, finalize } from 'rxjs';
8
-
9
- class PayByCardComponent {
10
- formIndex = 0;
11
- setFormIndex(index) {
12
- this.formIndex = index;
13
- }
14
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: PayByCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
15
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: PayByCardComponent, isStandalone: true, selector: "pay-by-card", ngImport: i0, template: "<div class=\"flex flex-col gap-6\">\n <!-- Billing Details -->\n @if (formIndex === 0) {\n <div class=\"grid grid-cols-2 gap-6 overflow-y-auto\">\n <base-input label=\"First Name\" [required]=\"true\"></base-input>\n <base-input label=\"Last Name\" [required]=\"true\"></base-input>\n <base-input label=\"Email\"></base-input>\n <base-input label=\"Phone Number\"></base-input>\n <base-select\n label=\"Select Country\"\n [required]=\"true\"\n [options]=\"[\n { label: 'United States', value: 'US' },\n { label: 'Canada', value: 'CA' },\n { label: 'United Kingdom', value: 'UK' },\n ]\"\n ></base-select>\n <base-select\n label=\"Select State\"\n [required]=\"true\"\n [options]=\"[\n { label: 'California', value: 'CA' },\n { label: 'Texas', value: 'TX' },\n { label: 'New York', value: 'NY' },\n ]\"\n ></base-select>\n <base-input label=\"City\" [required]=\"true\"></base-input>\n <base-input label=\"Postal Code\" [required]=\"true\"></base-input>\n <div class=\"col-span-2\">\n <base-input label=\"Street Address\" [required]=\"true\"></base-input>\n </div>\n </div>\n }\n\n <!-- Card Details -->\n @if (formIndex === 1) {\n <div class=\"grid grid-cols-2 gap-6 overflow-y-auto\" style=\"max-height: 320px\">\n <div class=\"col-span-2\">\n <base-input label=\"Card Name\" [required]=\"true\"></base-input>\n </div>\n <div class=\"col-span-2\">\n <base-input label=\"Card Number\" [required]=\"true\"></base-input>\n </div>\n <base-input label=\"Expiry Date\" [required]=\"true\"></base-input>\n <base-input label=\"CVV\" [required]=\"true\"></base-input>\n </div>\n }\n\n <base-button\n [label]=\"formIndex === 0 ? 'Proceed' : 'Pay'\"\n type=\"primary\"\n customClass=\"w-full\"\n (onClick)=\"formIndex === 0 ? setFormIndex(1) : null\"\n ></base-button>\n</div>\n", dependencies: [{ kind: "component", type: ButtonComponent, selector: "base-button", inputs: ["label", "type", "size", "paddingClassX", "disabled", "loading", "customClass"], outputs: ["onClick"] }, { kind: "component", type: InputComponent, selector: "base-input", inputs: ["label", "type", "placeholder", "validationError", "hint", "mask", "rules", "isAmountInput", "required", "disabled", "loading", "showCopyIcon"], outputs: ["onInputChange", "onInputBlur"] }, { kind: "component", type: SelectComponent, selector: "base-select", inputs: ["options", "placeholder", "hasSearch", "disabled", "loading", "validationError", "label", "hint", "required", "itemImageType"], outputs: ["onSelectChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
16
- }
17
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: PayByCardComponent, decorators: [{
18
- type: Component,
19
- args: [{ selector: 'pay-by-card', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [ButtonComponent, InputComponent, SelectComponent], template: "<div class=\"flex flex-col gap-6\">\n <!-- Billing Details -->\n @if (formIndex === 0) {\n <div class=\"grid grid-cols-2 gap-6 overflow-y-auto\">\n <base-input label=\"First Name\" [required]=\"true\"></base-input>\n <base-input label=\"Last Name\" [required]=\"true\"></base-input>\n <base-input label=\"Email\"></base-input>\n <base-input label=\"Phone Number\"></base-input>\n <base-select\n label=\"Select Country\"\n [required]=\"true\"\n [options]=\"[\n { label: 'United States', value: 'US' },\n { label: 'Canada', value: 'CA' },\n { label: 'United Kingdom', value: 'UK' },\n ]\"\n ></base-select>\n <base-select\n label=\"Select State\"\n [required]=\"true\"\n [options]=\"[\n { label: 'California', value: 'CA' },\n { label: 'Texas', value: 'TX' },\n { label: 'New York', value: 'NY' },\n ]\"\n ></base-select>\n <base-input label=\"City\" [required]=\"true\"></base-input>\n <base-input label=\"Postal Code\" [required]=\"true\"></base-input>\n <div class=\"col-span-2\">\n <base-input label=\"Street Address\" [required]=\"true\"></base-input>\n </div>\n </div>\n }\n\n <!-- Card Details -->\n @if (formIndex === 1) {\n <div class=\"grid grid-cols-2 gap-6 overflow-y-auto\" style=\"max-height: 320px\">\n <div class=\"col-span-2\">\n <base-input label=\"Card Name\" [required]=\"true\"></base-input>\n </div>\n <div class=\"col-span-2\">\n <base-input label=\"Card Number\" [required]=\"true\"></base-input>\n </div>\n <base-input label=\"Expiry Date\" [required]=\"true\"></base-input>\n <base-input label=\"CVV\" [required]=\"true\"></base-input>\n </div>\n }\n\n <base-button\n [label]=\"formIndex === 0 ? 'Proceed' : 'Pay'\"\n type=\"primary\"\n customClass=\"w-full\"\n (onClick)=\"formIndex === 0 ? setFormIndex(1) : null\"\n ></base-button>\n</div>\n" }]
20
- }] });
21
-
22
- class PayByTransferComponent {
23
- cdr;
24
- countDownTime = '';
25
- remainingSeconds = 30 * 60;
26
- intervalId = null;
27
- constructor(cdr) {
28
- this.cdr = cdr;
29
- }
30
- updateDisplay() {
31
- const minutes = Math.floor(this.remainingSeconds / 60);
32
- const seconds = this.remainingSeconds % 60;
33
- this.countDownTime = `${String(minutes).padStart(2, '0')}:${String(seconds).padStart(2, '0')}`;
34
- this.cdr.markForCheck(); // 👈 notify OnPush to re-render
35
- }
36
- startTimer() {
37
- this.updateDisplay();
38
- this.intervalId = setInterval(() => {
39
- this.remainingSeconds--;
40
- if (this.remainingSeconds < 0) {
41
- if (this.intervalId) {
42
- clearInterval(this.intervalId);
43
- this.intervalId = null;
44
- }
45
- this.countDownTime = '00:00';
46
- this.cdr.markForCheck();
47
- return;
48
- }
49
- this.updateDisplay();
50
- }, 1000);
51
- }
52
- ngOnInit() {
53
- this.startTimer();
54
- }
55
- ngOnDestroy() {
56
- if (this.intervalId) {
57
- clearInterval(this.intervalId);
58
- this.intervalId = null;
59
- }
60
- }
61
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: PayByTransferComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
62
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.1", type: PayByTransferComponent, isStandalone: true, selector: "pay-by-transfer", ngImport: i0, template: "<div class=\"flex flex-col gap-10\">\n <p class=\"text-sub-copy text-sm font-semibold text-center\">Amount to Pay NGN 200,500.00</p>\n\n <div class=\"bg-[#EFF7FF] p-4 rounded-lg flex flex-col gap-6\">\n <base-label-info label=\"Bank Name\" value=\"Teerus MFB\"></base-label-info>\n <div class=\"flex items-center justify-between\">\n <base-label-info label=\"Account Number\" value=\"0001928940\"></base-label-info>\n <base-copy color=\"#9DBFDE\"></base-copy>\n </div>\n <div class=\"flex items-center justify-between\">\n <base-label-info label=\"Amount\" value=\"NGN 200,500.00\"></base-label-info>\n <base-copy color=\"#9DBFDE\"></base-copy>\n </div>\n </div>\n\n <p class=\"w-2/3 mx-auto text-center text-body-2xs font-medium text-sub-copy\">\n This account is for this transaction only and expires in\n <span class=\"text-orange-500\">{{ countDownTime }}</span>\n </p>\n\n <div class=\"flex flex-col gap-4\">\n <base-button label=\"I have paid the money\" type=\"primary\" customClass=\"w-full\"></base-button>\n <p class=\"text-heading-text text-body-2xs font-medium text-center py-2 cursor-pointer\">Cancel Payment</p>\n </div>\n</div>\n", dependencies: [{ kind: "component", type: LabelInfoComponent, selector: "base-label-info", inputs: ["type", "label", "labelCustomClass", "valueImageSrc", "valueImageCustomClass", "valueImagePosition", "hasValueCopy", "value", "valueCustomClass", "alignRight"] }, { kind: "component", type: CopyComponent, selector: "base-copy", inputs: ["copyText", "color"] }, { kind: "component", type: ButtonComponent, selector: "base-button", inputs: ["label", "type", "size", "paddingClassX", "disabled", "loading", "customClass"], outputs: ["onClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
63
- }
64
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: PayByTransferComponent, decorators: [{
65
- type: Component,
66
- args: [{ selector: 'pay-by-transfer', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [LabelInfoComponent, CopyComponent, ButtonComponent], template: "<div class=\"flex flex-col gap-10\">\n <p class=\"text-sub-copy text-sm font-semibold text-center\">Amount to Pay NGN 200,500.00</p>\n\n <div class=\"bg-[#EFF7FF] p-4 rounded-lg flex flex-col gap-6\">\n <base-label-info label=\"Bank Name\" value=\"Teerus MFB\"></base-label-info>\n <div class=\"flex items-center justify-between\">\n <base-label-info label=\"Account Number\" value=\"0001928940\"></base-label-info>\n <base-copy color=\"#9DBFDE\"></base-copy>\n </div>\n <div class=\"flex items-center justify-between\">\n <base-label-info label=\"Amount\" value=\"NGN 200,500.00\"></base-label-info>\n <base-copy color=\"#9DBFDE\"></base-copy>\n </div>\n </div>\n\n <p class=\"w-2/3 mx-auto text-center text-body-2xs font-medium text-sub-copy\">\n This account is for this transaction only and expires in\n <span class=\"text-orange-500\">{{ countDownTime }}</span>\n </p>\n\n <div class=\"flex flex-col gap-4\">\n <base-button label=\"I have paid the money\" type=\"primary\" customClass=\"w-full\"></base-button>\n <p class=\"text-heading-text text-body-2xs font-medium text-center py-2 cursor-pointer\">Cancel Payment</p>\n </div>\n</div>\n" }]
67
- }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }] });
68
-
69
- class PayByStableCoinComponent {
70
- proceedToPay = new EventEmitter();
71
- formIndex = 0;
72
- setFormIndex(index) {
73
- this.formIndex = index;
74
- }
75
- payHandler() {
76
- this.setFormIndex(1);
77
- this.proceedToPay.emit();
78
- }
79
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: PayByStableCoinComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
80
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: PayByStableCoinComponent, isStandalone: true, selector: "pay-by-stable-coin", outputs: { proceedToPay: "proceedToPay" }, ngImport: i0, template: "<div class=\"flex flex-col gap-6\">\n @if (formIndex === 0) {\n <div class=\"grid grid-cols-1 gap-6\">\n <base-select\n label=\"Select Crypto\"\n [required]=\"true\"\n [options]=\"[\n { label: 'USDT', value: 'USDT' },\n { label: 'USDC', value: 'USDC' },\n { label: 'BUSD', value: 'BUSD' },\n ]\"\n ></base-select>\n <base-select\n label=\"Select Network\"\n [required]=\"true\"\n [options]=\"[\n { label: 'Ethereum', value: 'ETH' },\n { label: 'Binance Smart Chain', value: 'BSC' },\n { label: 'Polygon', value: 'MATIC' },\n ]\"\n ></base-select>\n </div>\n\n <base-button\n label=\"Pay\"\n type=\"primary\"\n customClass=\"w-full\"\n (onClick)=\"payHandler()\"\n ></base-button>\n }\n\n @if (formIndex === 1) {\n <div class=\"flex flex-col gap-6\">\n <div class=\"mx-auto\">\n <base-image\n src=\"../../../assets/images/stable-coin-qr-code.png\"\n alt=\"QR Code\"\n [width]=\"122\"\n [height]=\"122\"\n class=\"mb-1\"\n ></base-image>\n <p class=\"mb-0 text-body-4xs text-light-copy font-normal text-center\">USDC</p>\n </div>\n\n <div class=\"flex flex-col gap-6 border-c border-grey-100 p-4 rounded-2xl bg-light-white-50\">\n <div class=\"border-b border-grey-border pb-4 flex flex-col gap-2\">\n <p class=\"mb-0 text-body-3xs text-light-copy font-normal\">Network</p>\n <div class=\"flex justify-between\">\n <div class=\"flex flex-col gap-1\">\n <p class=\"mb-0 text-body-2xs font-medium text-sub-copy\">BNB Smart Chain (BEP20)</p>\n <div class=\"flex items-center gap-2\">\n <p class=\"mb-0 text-body-3xs text-light-copy font-normal\">*Est. arrival = 3 mins</p>\n <p class=\"mb-0 text-body-3xs text-light-copy font-normal\">|</p>\n <base-currency-amount\n currency=\"USDC\"\n [amount]=\"10\"\n textClass=\"mb-0 text-body-3xs text-light-copy font-normal\"\n iconColorClass=\"#557591\"\n iconWidth=\"12\"\n iconHeight=\"12\"\n ></base-currency-amount>\n </div>\n </div>\n <icon-arrow-swap></icon-arrow-swap>\n </div>\n </div>\n\n <div class=\"pb-4 flex flex-col gap-2\">\n <p class=\"mb-0 text-body-3xs text-light-copy font-normal\">Deposit Address ></p>\n <div class=\"flex justify-between\">\n <p class=\"mb-0 text-body-2xs font-medium text-sub-copy w-2/3 break-words\">\n 0j8938ysheeee8333c162883a4d4f5g6t111nhk8uey37777yt6\n </p>\n <base-copy copyText=\"0j8938ysheeee8333c162883a4d4f5g6t111nhk8uey37777yt6\"></base-copy>\n </div>\n </div>\n\n <!-- <div class=\"pb-4 flex flex-col gap-2\">\n <p class=\"mb-0 text-body-3xs text-light-copy font-normal\">Memo ></p>\n <div class=\"flex justify-between\">\n <p\n class=\"mb-0 text-body-2xs font-medium text-sub-copy w-2/3 break-words\"\n >\n 0j8938ysheeee8333c162883a4d4f5g6t111nhk8uey37777yt6\n </p>\n <app-copy\n [isCopyIcon]=\"true\"\n [copyText]=\"'0j8938ysheeee8333c162883a4d4f5g6t111nhk8uey37777yt6'\"\n ></app-copy>\n </div>\n </div> -->\n </div>\n\n <div class=\"flex flex-col gap-2\">\n <div class=\"flex items-center justify-between border-b border-grey-border py-3\">\n <p class=\"mb-0 text-body-2xs font-medium text-primary-black\">Network fee</p>\n <base-currency-amount\n currency=\"USDC\"\n [amount]=\"12\"\n textClass=\"mb-0 text-body-2xs font-extrabold text-primary-black\"\n iconColorClass=\"#231F20\"\n ></base-currency-amount>\n </div>\n\n <div class=\"flex items-center justify-between py-4\">\n <p class=\"mb-0 text-body-lg font-semibold text-primary-black\">Pay</p>\n <base-currency-amount\n currency=\"USDC\"\n [amount]=\"15\"\n textClass=\"mb-0 text-body-lg font-extrabold text-primary-black\"\n iconColorClass=\"#231F20\"\n iconWidth=\"20\"\n iconHeight=\"20\"\n ></base-currency-amount>\n </div>\n </div>\n\n <div class=\"flex flex-col gap-6\">\n <base-button label=\"Confirm Payment\" type=\"primary\" customClass=\"w-full\"></base-button>\n </div>\n </div>\n }\n</div>\n", dependencies: [{ kind: "component", type: SelectComponent, selector: "base-select", inputs: ["options", "placeholder", "hasSearch", "disabled", "loading", "validationError", "label", "hint", "required", "itemImageType"], outputs: ["onSelectChange"] }, { kind: "component", type: ButtonComponent, selector: "base-button", inputs: ["label", "type", "size", "paddingClassX", "disabled", "loading", "customClass"], outputs: ["onClick"] }, { kind: "component", type: ImageComponent, selector: "base-image", inputs: ["src", "alt", "isFullWidth", "width", "height", "customClass"], outputs: ["onClick"] }, { kind: "component", type: CurrencyAmountComponent, selector: "base-currency-amount", inputs: ["currency", "amount", "textClass", "iconColorClass", "iconWidth", "iconHeight"] }, { kind: "component", type: CopyComponent, selector: "base-copy", inputs: ["copyText", "color"] }, { kind: "component", type: IconArrowSwapComponent, selector: "icon-arrow-swap", inputs: ["color", "width", "height"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
81
- }
82
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: PayByStableCoinComponent, decorators: [{
83
- type: Component,
84
- args: [{ selector: 'pay-by-stable-coin', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
85
- SelectComponent,
86
- ButtonComponent,
87
- ImageComponent,
88
- CurrencyAmountComponent,
89
- CopyComponent,
90
- IconArrowSwapComponent,
91
- ], template: "<div class=\"flex flex-col gap-6\">\n @if (formIndex === 0) {\n <div class=\"grid grid-cols-1 gap-6\">\n <base-select\n label=\"Select Crypto\"\n [required]=\"true\"\n [options]=\"[\n { label: 'USDT', value: 'USDT' },\n { label: 'USDC', value: 'USDC' },\n { label: 'BUSD', value: 'BUSD' },\n ]\"\n ></base-select>\n <base-select\n label=\"Select Network\"\n [required]=\"true\"\n [options]=\"[\n { label: 'Ethereum', value: 'ETH' },\n { label: 'Binance Smart Chain', value: 'BSC' },\n { label: 'Polygon', value: 'MATIC' },\n ]\"\n ></base-select>\n </div>\n\n <base-button\n label=\"Pay\"\n type=\"primary\"\n customClass=\"w-full\"\n (onClick)=\"payHandler()\"\n ></base-button>\n }\n\n @if (formIndex === 1) {\n <div class=\"flex flex-col gap-6\">\n <div class=\"mx-auto\">\n <base-image\n src=\"../../../assets/images/stable-coin-qr-code.png\"\n alt=\"QR Code\"\n [width]=\"122\"\n [height]=\"122\"\n class=\"mb-1\"\n ></base-image>\n <p class=\"mb-0 text-body-4xs text-light-copy font-normal text-center\">USDC</p>\n </div>\n\n <div class=\"flex flex-col gap-6 border-c border-grey-100 p-4 rounded-2xl bg-light-white-50\">\n <div class=\"border-b border-grey-border pb-4 flex flex-col gap-2\">\n <p class=\"mb-0 text-body-3xs text-light-copy font-normal\">Network</p>\n <div class=\"flex justify-between\">\n <div class=\"flex flex-col gap-1\">\n <p class=\"mb-0 text-body-2xs font-medium text-sub-copy\">BNB Smart Chain (BEP20)</p>\n <div class=\"flex items-center gap-2\">\n <p class=\"mb-0 text-body-3xs text-light-copy font-normal\">*Est. arrival = 3 mins</p>\n <p class=\"mb-0 text-body-3xs text-light-copy font-normal\">|</p>\n <base-currency-amount\n currency=\"USDC\"\n [amount]=\"10\"\n textClass=\"mb-0 text-body-3xs text-light-copy font-normal\"\n iconColorClass=\"#557591\"\n iconWidth=\"12\"\n iconHeight=\"12\"\n ></base-currency-amount>\n </div>\n </div>\n <icon-arrow-swap></icon-arrow-swap>\n </div>\n </div>\n\n <div class=\"pb-4 flex flex-col gap-2\">\n <p class=\"mb-0 text-body-3xs text-light-copy font-normal\">Deposit Address ></p>\n <div class=\"flex justify-between\">\n <p class=\"mb-0 text-body-2xs font-medium text-sub-copy w-2/3 break-words\">\n 0j8938ysheeee8333c162883a4d4f5g6t111nhk8uey37777yt6\n </p>\n <base-copy copyText=\"0j8938ysheeee8333c162883a4d4f5g6t111nhk8uey37777yt6\"></base-copy>\n </div>\n </div>\n\n <!-- <div class=\"pb-4 flex flex-col gap-2\">\n <p class=\"mb-0 text-body-3xs text-light-copy font-normal\">Memo ></p>\n <div class=\"flex justify-between\">\n <p\n class=\"mb-0 text-body-2xs font-medium text-sub-copy w-2/3 break-words\"\n >\n 0j8938ysheeee8333c162883a4d4f5g6t111nhk8uey37777yt6\n </p>\n <app-copy\n [isCopyIcon]=\"true\"\n [copyText]=\"'0j8938ysheeee8333c162883a4d4f5g6t111nhk8uey37777yt6'\"\n ></app-copy>\n </div>\n </div> -->\n </div>\n\n <div class=\"flex flex-col gap-2\">\n <div class=\"flex items-center justify-between border-b border-grey-border py-3\">\n <p class=\"mb-0 text-body-2xs font-medium text-primary-black\">Network fee</p>\n <base-currency-amount\n currency=\"USDC\"\n [amount]=\"12\"\n textClass=\"mb-0 text-body-2xs font-extrabold text-primary-black\"\n iconColorClass=\"#231F20\"\n ></base-currency-amount>\n </div>\n\n <div class=\"flex items-center justify-between py-4\">\n <p class=\"mb-0 text-body-lg font-semibold text-primary-black\">Pay</p>\n <base-currency-amount\n currency=\"USDC\"\n [amount]=\"15\"\n textClass=\"mb-0 text-body-lg font-extrabold text-primary-black\"\n iconColorClass=\"#231F20\"\n iconWidth=\"20\"\n iconHeight=\"20\"\n ></base-currency-amount>\n </div>\n </div>\n\n <div class=\"flex flex-col gap-6\">\n <base-button label=\"Confirm Payment\" type=\"primary\" customClass=\"w-full\"></base-button>\n </div>\n </div>\n }\n</div>\n" }]
92
- }], propDecorators: { proceedToPay: [{
93
- type: Output
94
- }] } });
95
-
96
- class CheckoutCardComponent {
97
- options = null;
98
- secretKey = '';
99
- environment = 'sandbox';
100
- paymentObject = {
101
- amount: 0,
102
- currency: '',
103
- email: '',
104
- phoneNumber: '',
105
- narration: '',
106
- redirectUrl: '',
107
- };
108
- ready = new EventEmitter();
109
- validityChange = new EventEmitter();
110
- tokenize = new EventEmitter();
111
- checkoutState = 'PAYMENT';
112
- countryOptions = [
113
- {
114
- label: 'Nigeria',
115
- value: 'Nigeria',
116
- },
117
- {
118
- label: 'Ghana',
119
- value: 'Ghana',
120
- },
121
- ];
122
- paymentTypeOptions = [
123
- { label: 'Card', value: 'CARD' },
124
- { label: 'Bank Transfer', value: 'BANK_TRANSFER' },
125
- { label: 'Stable Coin', value: 'STABLE_COIN' },
126
- ];
127
- paymentType = this.paymentTypeOptions[0].value;
128
- get filteredPaymentTypeOptions() {
129
- if (this.paymentObject.currency === 'USD') {
130
- return this.paymentTypeOptions.filter((option) => option.value !== 'BANK_TRANSFER');
131
- }
132
- return this.paymentTypeOptions.filter((option) => option.value !== 'STABLE_COIN');
133
- }
134
- get formatAmountHandler() {
135
- return formatAmount(this.paymentObject.amount, this.paymentObject.currency);
136
- }
137
- paymentTypeHandler(event) {
138
- this.paymentType = event;
139
- }
140
- payStableCoinHandler() {
141
- this.checkoutState = 'STABLE_COIN_PAYMENT';
142
- }
143
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: CheckoutCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
144
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: CheckoutCardComponent, isStandalone: true, selector: "bzp-checkout-card", inputs: { options: "options", secretKey: "secretKey", environment: "environment", paymentObject: "paymentObject" }, outputs: { ready: "ready", validityChange: "validityChange", tokenize: "tokenize" }, ngImport: i0, template: "<base-card [showBackButton]=\"checkoutState === 'STABLE_COIN_PAYMENT'\">\n <div class=\"grid grid-cols-3\">\n @if (checkoutState === 'PAYMENT') {\n <div class=\"bg-[#EFF7FF] px-6 py-8 flex flex-col gap-5 col-span-1 rounded-l-xl\">\n <p class=\"text-heading-text text-body-xs font-semibold\">Pay with</p>\n <base-radio-group\n [options]=\"filteredPaymentTypeOptions\"\n (selectedChange)=\"paymentTypeHandler($event)\"\n ></base-radio-group>\n </div>\n }\n\n <div class=\"col-span-2\">\n @if (checkoutState === 'PAYMENT' || checkoutState === 'STABLE_COIN_PAYMENT') {\n @if (checkoutState === 'PAYMENT') {\n <div class=\"flex items-center justify-between px-12 py-8\">\n @if (options?.imageUrl) {\n <base-image\n [src]=\"options?.imageUrl ?? ''\"\n alt=\"Merchant Logo\"\n [width]=\"52\"\n [height]=\"52\"\n class=\"rounded-lg\"\n ></base-image>\n } @else {\n <div\n class=\"bg-heading-text rounded flex flex-col justify-center\"\n style=\"width: 52px; height: 52px\"\n >\n <p class=\"text-white text-center text-body-2xs font-medium\">Logo</p>\n </div>\n }\n\n <div class=\"flex flex-col gap-1\">\n <p class=\"text-body-2xs font-regular text-sub-copy text-right\">\n Raymahni Merchant LLC\n </p>\n <p class=\"text-body-2xs font-regular text-sub-copy text-right\">\n Pay:\n <span class=\"text-orange-500 font-extrabold\">{{ formatAmountHandler }}</span>\n </p>\n </div>\n </div>\n }\n\n <div class=\"overflow-y-scroll px-10 pb-10 pt-2\">\n @if (paymentType === 'CARD') {\n <pay-by-card></pay-by-card>\n } @else if (paymentType === 'BANK_TRANSFER') {\n <pay-by-transfer></pay-by-transfer>\n } @else {\n <pay-by-stable-coin (proceedToPay)=\"payStableCoinHandler()\"></pay-by-stable-coin>\n }\n </div>\n } @else if (checkoutState === 'SUCCESS') {\n <base-success></base-success>\n }\n </div>\n </div>\n</base-card>\n", dependencies: [{ kind: "component", type: RadioGroupComponent, selector: "base-radio-group", inputs: ["options", "type"], outputs: ["selectedChange"] }, { kind: "component", type: ImageComponent, selector: "base-image", inputs: ["src", "alt", "isFullWidth", "width", "height", "customClass"], outputs: ["onClick"] }, { kind: "component", type: PayByCardComponent, selector: "pay-by-card" }, { kind: "component", type: PayByTransferComponent, selector: "pay-by-transfer" }, { kind: "component", type: PayByStableCoinComponent, selector: "pay-by-stable-coin", outputs: ["proceedToPay"] }, { kind: "component", type: SuccessComponent, selector: "base-success" }, { kind: "component", type: CardComponent, selector: "base-card", inputs: ["showBackButton"], outputs: ["back"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
145
- }
146
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: CheckoutCardComponent, decorators: [{
147
- type: Component,
148
- args: [{ selector: 'bzp-checkout-card', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
149
- RadioGroupComponent,
150
- ImageComponent,
151
- PayByCardComponent,
152
- PayByTransferComponent,
153
- PayByStableCoinComponent,
154
- SuccessComponent,
155
- CardComponent,
156
- ], template: "<base-card [showBackButton]=\"checkoutState === 'STABLE_COIN_PAYMENT'\">\n <div class=\"grid grid-cols-3\">\n @if (checkoutState === 'PAYMENT') {\n <div class=\"bg-[#EFF7FF] px-6 py-8 flex flex-col gap-5 col-span-1 rounded-l-xl\">\n <p class=\"text-heading-text text-body-xs font-semibold\">Pay with</p>\n <base-radio-group\n [options]=\"filteredPaymentTypeOptions\"\n (selectedChange)=\"paymentTypeHandler($event)\"\n ></base-radio-group>\n </div>\n }\n\n <div class=\"col-span-2\">\n @if (checkoutState === 'PAYMENT' || checkoutState === 'STABLE_COIN_PAYMENT') {\n @if (checkoutState === 'PAYMENT') {\n <div class=\"flex items-center justify-between px-12 py-8\">\n @if (options?.imageUrl) {\n <base-image\n [src]=\"options?.imageUrl ?? ''\"\n alt=\"Merchant Logo\"\n [width]=\"52\"\n [height]=\"52\"\n class=\"rounded-lg\"\n ></base-image>\n } @else {\n <div\n class=\"bg-heading-text rounded flex flex-col justify-center\"\n style=\"width: 52px; height: 52px\"\n >\n <p class=\"text-white text-center text-body-2xs font-medium\">Logo</p>\n </div>\n }\n\n <div class=\"flex flex-col gap-1\">\n <p class=\"text-body-2xs font-regular text-sub-copy text-right\">\n Raymahni Merchant LLC\n </p>\n <p class=\"text-body-2xs font-regular text-sub-copy text-right\">\n Pay:\n <span class=\"text-orange-500 font-extrabold\">{{ formatAmountHandler }}</span>\n </p>\n </div>\n </div>\n }\n\n <div class=\"overflow-y-scroll px-10 pb-10 pt-2\">\n @if (paymentType === 'CARD') {\n <pay-by-card></pay-by-card>\n } @else if (paymentType === 'BANK_TRANSFER') {\n <pay-by-transfer></pay-by-transfer>\n } @else {\n <pay-by-stable-coin (proceedToPay)=\"payStableCoinHandler()\"></pay-by-stable-coin>\n }\n </div>\n } @else if (checkoutState === 'SUCCESS') {\n <base-success></base-success>\n }\n </div>\n </div>\n</base-card>\n" }]
157
- }], propDecorators: { options: [{
158
- type: Input
159
- }], secretKey: [{
160
- type: Input
161
- }], environment: [{
162
- type: Input
163
- }], paymentObject: [{
164
- type: Input
165
- }], ready: [{
166
- type: Output
167
- }], validityChange: [{
168
- type: Output
169
- }], tokenize: [{
170
- type: Output
171
- }] } });
172
-
173
- class CheckoutIframeComponent {
174
- renderer;
175
- cdr;
176
- checkout;
177
- constructor(renderer, cdr, checkout) {
178
- this.renderer = renderer;
179
- this.cdr = cdr;
180
- this.checkout = checkout;
181
- }
182
- errorMessage = '';
183
- loading = false;
184
- launchUrl = '';
185
- iframe;
186
- secretKey = '';
187
- url = '';
188
- style = {
189
- width: '100%',
190
- height: '100vh',
191
- border: '0',
192
- borderRadius: '6px',
193
- overflow: 'hidden',
194
- };
195
- environment = 'sandbox';
196
- paymentObject = {
197
- amount: 0,
198
- currency: '',
199
- email: '',
200
- phoneNumber: '',
201
- narration: '',
202
- redirectUrl: '',
203
- };
204
- container;
205
- get blockStyle() {
206
- return {
207
- ...(this.style || {}),
208
- };
209
- }
210
- launchIframe(url) {
211
- const host = this.container?.nativeElement;
212
- if (!host)
213
- return; // guard: container not in DOM yet
214
- this.iframe = this.renderer.createElement('iframe');
215
- this.renderer.setAttribute(this.iframe, 'src', url);
216
- this.renderer.setStyle(this.iframe, 'width', this.style.width);
217
- this.renderer.setStyle(this.iframe, 'height', this.style.height);
218
- this.renderer.setStyle(this.iframe, 'border', this.style.border);
219
- this.renderer.setStyle(this.iframe, 'borderRadius', this.style.borderRadius);
220
- this.renderer.setStyle(this.iframe, 'overflow', this.style.overflow);
221
- this.renderer.appendChild(host, this.iframe);
222
- }
223
- async generatePaymentLinkHandler() {
224
- if (this.url) {
225
- this.launchIframe(this.url);
226
- return;
227
- }
228
- if (!this.secretKey) {
229
- return (this.errorMessage = 'Secret key is required.');
230
- }
231
- if (!checkObjectTruthy(this.paymentObject)) {
232
- return (this.errorMessage = 'Kindly ensure you are passing all the required data.');
233
- }
234
- this.loading = true;
235
- this.cdr.markForCheck();
236
- this.checkout
237
- .createPaymentLink(this.paymentObject, this.environment, this.secretKey)
238
- .pipe(tap((res) => {
239
- if (res?.isSuccessful) {
240
- this.launchUrl = res.launchUrl ?? '';
241
- this.errorMessage = 'Payment link created successfully';
242
- if (this.launchUrl) {
243
- this.launchIframe(this.launchUrl);
244
- }
245
- }
246
- else {
247
- this.errorMessage = 'Failed to create payment link';
248
- }
249
- }), finalize(() => {
250
- this.loading = false;
251
- this.cdr.markForCheck();
252
- }))
253
- .subscribe();
254
- }
255
- async ngAfterViewInit() {
256
- await this.generatePaymentLinkHandler();
257
- }
258
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: CheckoutIframeComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i1.CheckoutService }], target: i0.ɵɵFactoryTarget.Component });
259
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: CheckoutIframeComponent, isStandalone: true, selector: "bzp-checkout-iframe", inputs: { secretKey: "secretKey", url: "url", style: "style", environment: "environment", paymentObject: "paymentObject" }, viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true }], ngImport: i0, template: "<div class=\"relative\" [ngStyle]=\"blockStyle\">\n <div #container class=\"w-full h-full\"></div>\n\n @if (loading) {\n <div class=\"absolute inset-0 grid place-items-center bg-white/60\">\n <icon-loader></icon-loader>\n </div>\n }\n</div>\n", dependencies: [{ kind: "component", type: IconLoaderComponent, selector: "icon-loader", inputs: ["color", "size"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
260
- }
261
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: CheckoutIframeComponent, decorators: [{
262
- type: Component,
263
- args: [{ selector: 'bzp-checkout-iframe', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [IconLoaderComponent, CommonModule], template: "<div class=\"relative\" [ngStyle]=\"blockStyle\">\n <div #container class=\"w-full h-full\"></div>\n\n @if (loading) {\n <div class=\"absolute inset-0 grid place-items-center bg-white/60\">\n <icon-loader></icon-loader>\n </div>\n }\n</div>\n" }]
264
- }], ctorParameters: () => [{ type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: i1.CheckoutService }], propDecorators: { secretKey: [{
265
- type: Input
266
- }], url: [{
267
- type: Input
268
- }], style: [{
269
- type: Input
270
- }], environment: [{
271
- type: Input
272
- }], paymentObject: [{
273
- type: Input
274
- }], container: [{
275
- type: ViewChild,
276
- args: ['container', { static: false }]
277
- }] } });
278
-
279
- class CheckoutButtonComponent {
280
- checkout;
281
- cdr;
282
- constructor(checkout, cdr) {
283
- this.checkout = checkout;
284
- this.cdr = cdr;
285
- }
286
- errorMessage = '';
287
- loading = false;
288
- launchUrl = '';
289
- secretKey = '';
290
- timeout = 30000;
291
- environment = 'sandbox';
292
- mode = 'redirect';
293
- paymentObject = {
294
- amount: 0,
295
- currency: '',
296
- email: '',
297
- phoneNumber: '',
298
- narration: '',
299
- redirectUrl: '',
300
- };
301
- async generatePaymentLinkHandler() {
302
- if (!this.secretKey) {
303
- return (this.errorMessage = 'Secret key is required.');
304
- }
305
- if (!checkObjectTruthy(this.paymentObject)) {
306
- return (this.errorMessage = 'Kindly ensure you are passing all the required data.');
307
- }
308
- this.loading = true;
309
- this.cdr.markForCheck();
310
- this.checkout
311
- .createPaymentLink(this.paymentObject, this.environment, this.secretKey)
312
- .pipe(tap((res) => {
313
- if (res?.isSuccessful) {
314
- this.launchUrl = res.launchUrl ?? '';
315
- this.errorMessage = 'Payment link created successfully';
316
- if (this.mode === 'redirect' && this.launchUrl) {
317
- window.open(this.launchUrl, '_blank', 'noopener,noreferrer');
318
- }
319
- }
320
- else {
321
- this.errorMessage = 'Failed to create payment link';
322
- }
323
- }), finalize(() => {
324
- this.loading = false;
325
- this.cdr.markForCheck();
326
- }))
327
- .subscribe();
328
- }
329
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: CheckoutButtonComponent, deps: [{ token: i1.CheckoutService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
330
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: CheckoutButtonComponent, isStandalone: true, selector: "bzp-checkout-button", inputs: { secretKey: "secretKey", timeout: "timeout", environment: "environment", mode: "mode", paymentObject: "paymentObject" }, ngImport: i0, template: "@if (launchUrl && mode === 'iframe') {\n <bzp-checkout-iframe\n [url]=\"launchUrl\"\n [secretKey]=\"secretKey\"\n [environment]=\"environment\"\n ></bzp-checkout-iframe>\n} @else {\n <base-button\n label=\"Pay\"\n type=\"primary\"\n customClass=\"w-full\"\n [loading]=\"loading\"\n (onClick)=\"generatePaymentLinkHandler()\"\n ></base-button>\n <base-input-error [errorMessage]=\"errorMessage\"></base-input-error>\n}\n", dependencies: [{ kind: "component", type: ButtonComponent, selector: "base-button", inputs: ["label", "type", "size", "paddingClassX", "disabled", "loading", "customClass"], outputs: ["onClick"] }, { kind: "component", type: InputErrorComponent, selector: "base-input-error", inputs: ["errorMessage"] }, { kind: "component", type: CheckoutIframeComponent, selector: "bzp-checkout-iframe", inputs: ["secretKey", "url", "style", "environment", "paymentObject"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
331
- }
332
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: CheckoutButtonComponent, decorators: [{
333
- type: Component,
334
- args: [{ selector: 'bzp-checkout-button', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [ButtonComponent, InputErrorComponent, InputErrorComponent, CheckoutIframeComponent], template: "@if (launchUrl && mode === 'iframe') {\n <bzp-checkout-iframe\n [url]=\"launchUrl\"\n [secretKey]=\"secretKey\"\n [environment]=\"environment\"\n ></bzp-checkout-iframe>\n} @else {\n <base-button\n label=\"Pay\"\n type=\"primary\"\n customClass=\"w-full\"\n [loading]=\"loading\"\n (onClick)=\"generatePaymentLinkHandler()\"\n ></base-button>\n <base-input-error [errorMessage]=\"errorMessage\"></base-input-error>\n}\n" }]
335
- }], ctorParameters: () => [{ type: i1.CheckoutService }, { type: i0.ChangeDetectorRef }], propDecorators: { secretKey: [{
336
- type: Input
337
- }], timeout: [{
338
- type: Input
339
- }], environment: [{
340
- type: Input
341
- }], mode: [{
342
- type: Input
343
- }], paymentObject: [{
344
- type: Input
345
- }] } });
346
-
347
- /**
348
- * Generated bundle index. Do not edit.
349
- */
350
-
351
- export { CheckoutButtonComponent, CheckoutCardComponent, CheckoutIframeComponent, PayByCardComponent, PayByStableCoinComponent, PayByTransferComponent };
352
- //# sourceMappingURL=miden-npm-angular-buzapay-checkout.mjs.map