recur-tw 0.9.7 → 0.9.9
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/dist/index.cjs +641 -719
- package/dist/index.d.cts +49 -38
- package/dist/index.d.ts +49 -38
- package/dist/index.js +641 -719
- package/dist/recur.umd.js +1027 -636
- package/dist/server.cjs +1 -1
- package/dist/server.d.cts +194 -0
- package/dist/server.d.ts +194 -0
- package/dist/server.js +1 -1
- package/package.json +4 -1
package/dist/index.d.cts
CHANGED
|
@@ -97,6 +97,12 @@ declare global {
|
|
|
97
97
|
declare class RecurPaymentFormSkeleton extends HTMLElement {
|
|
98
98
|
constructor();
|
|
99
99
|
connectedCallback(): void;
|
|
100
|
+
private renderHeader;
|
|
101
|
+
private renderOrderSummary;
|
|
102
|
+
private renderCustomerInfo;
|
|
103
|
+
private renderCardFields;
|
|
104
|
+
private renderSubmitButton;
|
|
105
|
+
private renderSecurityNote;
|
|
100
106
|
private render;
|
|
101
107
|
}
|
|
102
108
|
declare global {
|
|
@@ -487,64 +493,69 @@ declare class RecurPaymentForm extends HTMLElement {
|
|
|
487
493
|
private customStyles;
|
|
488
494
|
private _isInitializing;
|
|
489
495
|
private _initializationAborted;
|
|
496
|
+
private _showCouponInput;
|
|
497
|
+
private _couponCode;
|
|
498
|
+
private _couponLoading;
|
|
499
|
+
private _couponError;
|
|
500
|
+
private _appliedCoupon;
|
|
490
501
|
constructor();
|
|
491
502
|
connectedCallback(): void;
|
|
492
503
|
disconnectedCallback(): void;
|
|
493
504
|
static get observedAttributes(): string[];
|
|
494
505
|
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
|
506
|
+
private getShadowDOMStyles;
|
|
507
|
+
private getLightDOMStyles;
|
|
495
508
|
private render;
|
|
496
|
-
private
|
|
497
|
-
private
|
|
509
|
+
private renderShadowDOM;
|
|
510
|
+
private renderLightDOM;
|
|
511
|
+
private getCustomStyles;
|
|
498
512
|
private updateCustomStyles;
|
|
499
|
-
private
|
|
500
|
-
private
|
|
501
|
-
private
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
513
|
+
private renderOrderSummary;
|
|
514
|
+
private renderCoupon;
|
|
515
|
+
private showCouponInput;
|
|
516
|
+
private cancelCouponInput;
|
|
517
|
+
private handleCouponInputChange;
|
|
518
|
+
private handleCouponKeydown;
|
|
519
|
+
private updateApplyButtonState;
|
|
520
|
+
private updateCouponSectionDOM;
|
|
521
|
+
private getCouponTriggerHTML;
|
|
522
|
+
private getCouponInputHTML;
|
|
523
|
+
private getCouponAppliedHTML;
|
|
524
|
+
private bindCouponTriggerEvents;
|
|
525
|
+
private bindCouponInputEvents;
|
|
526
|
+
private bindCouponAppliedEvents;
|
|
527
|
+
private updateOrderSummaryDOM;
|
|
528
|
+
private applyCoupon;
|
|
529
|
+
private removeCoupon;
|
|
530
|
+
/**
|
|
531
|
+
* Get applied coupon (for external use)
|
|
532
|
+
*/
|
|
533
|
+
getAppliedCoupon(): {
|
|
534
|
+
code: string;
|
|
535
|
+
couponName: string;
|
|
536
|
+
discountType: string;
|
|
537
|
+
discountAmount: number;
|
|
538
|
+
duration?: string;
|
|
539
|
+
durationMonths?: number;
|
|
540
|
+
bonusTrialDays?: number;
|
|
541
|
+
bonusMonths?: number;
|
|
542
|
+
} | null;
|
|
543
|
+
private renderCustomerInfo;
|
|
544
|
+
private renderCardFields;
|
|
505
545
|
private hideCardSkeletons;
|
|
506
|
-
private
|
|
507
|
-
/**
|
|
508
|
-
* 初始化 PAYUNi SDK
|
|
509
|
-
* 這個方法會在外部調用,傳入 SDK token
|
|
510
|
-
*/
|
|
546
|
+
private renderActions;
|
|
511
547
|
initializePayment(sdkToken: string, environment: 'SANDBOX' | 'PRODUCTION'): Promise<UniPaymentInstance | null>;
|
|
512
548
|
private setupFormSubmission;
|
|
513
|
-
/**
|
|
514
|
-
* Set button loading state
|
|
515
|
-
*/
|
|
516
549
|
private setButtonLoading;
|
|
517
|
-
/**
|
|
518
|
-
* Reset button to normal state (call this when payment completes or fails)
|
|
519
|
-
*/
|
|
520
550
|
resetButton(): void;
|
|
521
|
-
/**
|
|
522
|
-
* Set verifying state (for 3D Secure verification)
|
|
523
|
-
* Shows a "verifying" message while polling for 3D result
|
|
524
|
-
*/
|
|
525
551
|
setVerifying(verifying: boolean): void;
|
|
526
|
-
/**
|
|
527
|
-
* Show error message using RecurErrorDisplay component
|
|
528
|
-
*/
|
|
529
552
|
private showError;
|
|
530
|
-
/**
|
|
531
|
-
* Clear any displayed errors
|
|
532
|
-
*/
|
|
533
553
|
private clearError;
|
|
534
|
-
/**
|
|
535
|
-
* 等待組件完全連接到 DOM
|
|
536
|
-
*/
|
|
537
554
|
private updateComplete;
|
|
538
|
-
/**
|
|
539
|
-
* 獲取表單數據
|
|
540
|
-
*/
|
|
541
555
|
getFormData(): {
|
|
542
556
|
email: string;
|
|
543
557
|
name: string;
|
|
544
558
|
};
|
|
545
|
-
/**
|
|
546
|
-
* 設置表單數據
|
|
547
|
-
*/
|
|
548
559
|
setFormData(data: {
|
|
549
560
|
email?: string;
|
|
550
561
|
name?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -97,6 +97,12 @@ declare global {
|
|
|
97
97
|
declare class RecurPaymentFormSkeleton extends HTMLElement {
|
|
98
98
|
constructor();
|
|
99
99
|
connectedCallback(): void;
|
|
100
|
+
private renderHeader;
|
|
101
|
+
private renderOrderSummary;
|
|
102
|
+
private renderCustomerInfo;
|
|
103
|
+
private renderCardFields;
|
|
104
|
+
private renderSubmitButton;
|
|
105
|
+
private renderSecurityNote;
|
|
100
106
|
private render;
|
|
101
107
|
}
|
|
102
108
|
declare global {
|
|
@@ -487,64 +493,69 @@ declare class RecurPaymentForm extends HTMLElement {
|
|
|
487
493
|
private customStyles;
|
|
488
494
|
private _isInitializing;
|
|
489
495
|
private _initializationAborted;
|
|
496
|
+
private _showCouponInput;
|
|
497
|
+
private _couponCode;
|
|
498
|
+
private _couponLoading;
|
|
499
|
+
private _couponError;
|
|
500
|
+
private _appliedCoupon;
|
|
490
501
|
constructor();
|
|
491
502
|
connectedCallback(): void;
|
|
492
503
|
disconnectedCallback(): void;
|
|
493
504
|
static get observedAttributes(): string[];
|
|
494
505
|
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
|
506
|
+
private getShadowDOMStyles;
|
|
507
|
+
private getLightDOMStyles;
|
|
495
508
|
private render;
|
|
496
|
-
private
|
|
497
|
-
private
|
|
509
|
+
private renderShadowDOM;
|
|
510
|
+
private renderLightDOM;
|
|
511
|
+
private getCustomStyles;
|
|
498
512
|
private updateCustomStyles;
|
|
499
|
-
private
|
|
500
|
-
private
|
|
501
|
-
private
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
513
|
+
private renderOrderSummary;
|
|
514
|
+
private renderCoupon;
|
|
515
|
+
private showCouponInput;
|
|
516
|
+
private cancelCouponInput;
|
|
517
|
+
private handleCouponInputChange;
|
|
518
|
+
private handleCouponKeydown;
|
|
519
|
+
private updateApplyButtonState;
|
|
520
|
+
private updateCouponSectionDOM;
|
|
521
|
+
private getCouponTriggerHTML;
|
|
522
|
+
private getCouponInputHTML;
|
|
523
|
+
private getCouponAppliedHTML;
|
|
524
|
+
private bindCouponTriggerEvents;
|
|
525
|
+
private bindCouponInputEvents;
|
|
526
|
+
private bindCouponAppliedEvents;
|
|
527
|
+
private updateOrderSummaryDOM;
|
|
528
|
+
private applyCoupon;
|
|
529
|
+
private removeCoupon;
|
|
530
|
+
/**
|
|
531
|
+
* Get applied coupon (for external use)
|
|
532
|
+
*/
|
|
533
|
+
getAppliedCoupon(): {
|
|
534
|
+
code: string;
|
|
535
|
+
couponName: string;
|
|
536
|
+
discountType: string;
|
|
537
|
+
discountAmount: number;
|
|
538
|
+
duration?: string;
|
|
539
|
+
durationMonths?: number;
|
|
540
|
+
bonusTrialDays?: number;
|
|
541
|
+
bonusMonths?: number;
|
|
542
|
+
} | null;
|
|
543
|
+
private renderCustomerInfo;
|
|
544
|
+
private renderCardFields;
|
|
505
545
|
private hideCardSkeletons;
|
|
506
|
-
private
|
|
507
|
-
/**
|
|
508
|
-
* 初始化 PAYUNi SDK
|
|
509
|
-
* 這個方法會在外部調用,傳入 SDK token
|
|
510
|
-
*/
|
|
546
|
+
private renderActions;
|
|
511
547
|
initializePayment(sdkToken: string, environment: 'SANDBOX' | 'PRODUCTION'): Promise<UniPaymentInstance | null>;
|
|
512
548
|
private setupFormSubmission;
|
|
513
|
-
/**
|
|
514
|
-
* Set button loading state
|
|
515
|
-
*/
|
|
516
549
|
private setButtonLoading;
|
|
517
|
-
/**
|
|
518
|
-
* Reset button to normal state (call this when payment completes or fails)
|
|
519
|
-
*/
|
|
520
550
|
resetButton(): void;
|
|
521
|
-
/**
|
|
522
|
-
* Set verifying state (for 3D Secure verification)
|
|
523
|
-
* Shows a "verifying" message while polling for 3D result
|
|
524
|
-
*/
|
|
525
551
|
setVerifying(verifying: boolean): void;
|
|
526
|
-
/**
|
|
527
|
-
* Show error message using RecurErrorDisplay component
|
|
528
|
-
*/
|
|
529
552
|
private showError;
|
|
530
|
-
/**
|
|
531
|
-
* Clear any displayed errors
|
|
532
|
-
*/
|
|
533
553
|
private clearError;
|
|
534
|
-
/**
|
|
535
|
-
* 等待組件完全連接到 DOM
|
|
536
|
-
*/
|
|
537
554
|
private updateComplete;
|
|
538
|
-
/**
|
|
539
|
-
* 獲取表單數據
|
|
540
|
-
*/
|
|
541
555
|
getFormData(): {
|
|
542
556
|
email: string;
|
|
543
557
|
name: string;
|
|
544
558
|
};
|
|
545
|
-
/**
|
|
546
|
-
* 設置表單數據
|
|
547
|
-
*/
|
|
548
559
|
setFormData(data: {
|
|
549
560
|
email?: string;
|
|
550
561
|
name?: string;
|