diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..d5a1596 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +20.10.0 diff --git a/README.md b/README.md index e3fa0b2..d0645f8 100644 --- a/README.md +++ b/README.md @@ -161,15 +161,15 @@ declare const headlessCheckout: { ### Regular components | **Component** | **Selector** | **Status** | -| --------------------- | -------------------- | ---------- | +| --------------------- |----------------------|-----------| | Payment Methods | psdk-payment-methods | βœ… | -| Saved Methods | ❔ | πŸ•‘ | -| Payment Form Messages | ❔ | πŸ•‘ | +| Saved Methods | psdk-saved-methods | βœ… | +| Payment Form Messages | ❔ | πŸ•‘ | | Checkbox | psdk-checkbox | βœ… | | Select | psdk-select | βœ… | -| Apple Pay Button | ❔ | πŸ•‘ | -| Google Pay Button | ❔ | πŸ•‘ | -| Delete Account Button | ❔ | πŸ•‘ | +| Apple Pay Button | ❔ | πŸ•‘ | +| Google Pay Button | ❔ | πŸ•‘ | +| Delete Account Button | ❔ | πŸ•‘ | | Submit Button | psdk-submit-button | βœ… | | User Balance | psdk-user-balance | βœ… | | Finance Details | psdk-finance-details | βœ… | diff --git a/examples/saved-methods/index.html b/examples/saved-methods/index.html new file mode 100644 index 0000000..2a83773 --- /dev/null +++ b/examples/saved-methods/index.html @@ -0,0 +1,91 @@ + + + + + + + Document + + + + + +

Pay Station SDK

+ + + + + + + + diff --git a/src/core/web-components/web-component-tag-name.enum.ts b/src/core/web-components/web-component-tag-name.enum.ts index daecac0..1bf271d 100644 --- a/src/core/web-components/web-component-tag-name.enum.ts +++ b/src/core/web-components/web-component-tag-name.enum.ts @@ -2,6 +2,7 @@ export enum WebComponentTagName { TextComponent = 'psdk-text', SubmitButtonComponent = 'psdk-submit-button', PaymentMethodsComponent = 'psdk-payment-methods', + SavedMethodsComponent = 'psdk-saved-methods', PriceTextComponent = 'psdk-price-text', FinanceDetailsComponent = 'psdk-finance-details', LegalComponent = 'psdk-legal', diff --git a/src/core/web-components/web-components.map.ts b/src/core/web-components/web-components.map.ts index 9ba8561..9ce631c 100644 --- a/src/core/web-components/web-components.map.ts +++ b/src/core/web-components/web-components.map.ts @@ -12,6 +12,7 @@ import { ThreeDsComponent } from '../../features/headless-checkout/web-component import { PhoneComponent } from '../../features/headless-checkout/web-components/phone-component/phone.component'; import { SelectComponent } from '../../features/headless-checkout/web-components/select/select.component'; import { CheckboxComponent } from '../../features/headless-checkout/web-components/checkbox/checkbox.component'; +import { SavedMethodsComponent } from '../../features/headless-checkout/web-components/saved-methods/saved-methods.component'; import { UserBalanceComponent } from '../../features/headless-checkout/web-components/user-balance-component/user-balance-component'; export const webComponents: { @@ -20,6 +21,7 @@ export const webComponents: { [WebComponentTagName.TextComponent]: TextComponent, [WebComponentTagName.SubmitButtonComponent]: SubmitButtonComponent, [WebComponentTagName.PaymentMethodsComponent]: PaymentMethodsComponent, + [WebComponentTagName.SavedMethodsComponent]: SavedMethodsComponent, [WebComponentTagName.PriceTextComponent]: PriceTextComponent, [WebComponentTagName.FinanceDetailsComponent]: FinanceDetailsComponent, [WebComponentTagName.LegalComponent]: LegalComponent, diff --git a/src/features/headless-checkout/web-components/payment-methods/payment-methods.component.ts b/src/features/headless-checkout/web-components/payment-methods/payment-methods.component.ts index 6626838..b5b6c72 100644 --- a/src/features/headless-checkout/web-components/payment-methods/payment-methods.component.ts +++ b/src/features/headless-checkout/web-components/payment-methods/payment-methods.component.ts @@ -50,8 +50,8 @@ export class PaymentMethodsComponent extends WebComponentAbstract { protected getHtml(): string { const paymentMethodsHtml = this.getMethodsHtml(); return ` - -