@ng-web-apis/payment-request
Advanced tools
Comparing version 4.0.1 to 4.1.0
import * as i0 from "@angular/core"; | ||
export declare class PaymentItemDirective implements PaymentItem { | ||
export declare class WaPaymentItem implements PaymentItem { | ||
amount: PaymentCurrencyAmount; | ||
label: string; | ||
pending?: boolean; | ||
static ɵfac: i0.ɵɵFactoryDeclaration<PaymentItemDirective, never>; | ||
static ɵdir: i0.ɵɵDirectiveDeclaration<PaymentItemDirective, "[waPaymentItem][paymentAmount][paymentLabel]", never, { "amount": { "alias": "paymentAmount"; "required": false; }; "label": { "alias": "paymentLabel"; "required": false; }; "pending": { "alias": "paymentPending"; "required": false; }; }, {}, never, never, true, never>; | ||
static ɵfac: i0.ɵɵFactoryDeclaration<WaPaymentItem, never>; | ||
static ɵdir: i0.ɵɵDirectiveDeclaration<WaPaymentItem, "[waPaymentItem][paymentAmount][paymentLabel]", never, { "amount": { "alias": "paymentAmount"; "required": false; }; "label": { "alias": "paymentLabel"; "required": false; }; "pending": { "alias": "paymentPending"; "required": false; }; }, {}, never, never, true, never>; | ||
} | ||
/** | ||
* @deprecated: use {@link WaPaymentItem} | ||
*/ | ||
export declare const PaymentItemDirective: typeof WaPaymentItem; |
import type { Observable } from 'rxjs'; | ||
import * as i0 from "@angular/core"; | ||
export declare class PaymentSubmitDirective { | ||
export declare class WaPaymentSubmit { | ||
private readonly paymentHost; | ||
@@ -12,4 +12,8 @@ private readonly paymentRequest; | ||
constructor(); | ||
static ɵfac: i0.ɵɵFactoryDeclaration<PaymentSubmitDirective, never>; | ||
static ɵdir: i0.ɵɵDirectiveDeclaration<PaymentSubmitDirective, "[waPaymentSubmit]", never, {}, { "waPaymentSubmit": "waPaymentSubmit"; "waPaymentError": "waPaymentError"; }, never, never, true, never>; | ||
static ɵfac: i0.ɵɵFactoryDeclaration<WaPaymentSubmit, never>; | ||
static ɵdir: i0.ɵɵDirectiveDeclaration<WaPaymentSubmit, "[waPaymentSubmit]", never, {}, { "waPaymentSubmit": "waPaymentSubmit"; "waPaymentError": "waPaymentError"; }, never, never, true, never>; | ||
} | ||
/** | ||
* @deprecated: use {@link WaPaymentSubmit} | ||
*/ | ||
export declare const PaymentSubmitDirective: typeof WaPaymentSubmit; |
import type { QueryList } from '@angular/core'; | ||
import type { PaymentShippingOption } from '../../tokens/payment-options'; | ||
import * as i0 from "@angular/core"; | ||
export declare class PaymentDirective implements PaymentDetailsInit { | ||
export declare class WaPayment implements PaymentDetailsInit { | ||
total: PaymentItem; | ||
@@ -11,4 +11,8 @@ id?: string; | ||
protected set paymentItems(items: QueryList<PaymentItem>); | ||
static ɵfac: i0.ɵɵFactoryDeclaration<PaymentDirective, never>; | ||
static ɵdir: i0.ɵɵDirectiveDeclaration<PaymentDirective, "[waPayment][paymentTotal]", never, { "total": { "alias": "paymentTotal"; "required": false; }; "id": { "alias": "paymentId"; "required": false; }; "modifiers": { "alias": "paymentModifiers"; "required": false; }; "shippingOptions": { "alias": "paymentShippingOptions"; "required": false; }; }, {}, ["paymentItems"], never, true, never>; | ||
static ɵfac: i0.ɵɵFactoryDeclaration<WaPayment, never>; | ||
static ɵdir: i0.ɵɵDirectiveDeclaration<WaPayment, "[waPayment][paymentTotal]", never, { "total": { "alias": "paymentTotal"; "required": false; }; "id": { "alias": "paymentId"; "required": false; }; "modifiers": { "alias": "paymentModifiers"; "required": false; }; "shippingOptions": { "alias": "paymentShippingOptions"; "required": false; }; }, {}, ["paymentItems"], never, true, never>; | ||
} | ||
/** | ||
* @deprecated use {@link WaPayment} | ||
*/ | ||
export declare const PaymentDirective: typeof WaPayment; |
@@ -1,9 +0,8 @@ | ||
import * as i0 from "@angular/core"; | ||
import * as i1 from "./directives/payment/payment.directive"; | ||
import * as i2 from "./directives/payment-item/payment-item.directive"; | ||
import * as i3 from "./directives/payment-submit/payment-submit.directive"; | ||
export declare class PaymentRequestModule { | ||
static ɵfac: i0.ɵɵFactoryDeclaration<PaymentRequestModule, never>; | ||
static ɵmod: i0.ɵɵNgModuleDeclaration<PaymentRequestModule, never, [typeof i1.PaymentDirective, typeof i2.PaymentItemDirective, typeof i3.PaymentSubmitDirective], [typeof i1.PaymentDirective, typeof i2.PaymentItemDirective, typeof i3.PaymentSubmitDirective]>; | ||
static ɵinj: i0.ɵɵInjectorDeclaration<PaymentRequestModule>; | ||
} | ||
import { WaPayment } from './directives/payment/payment.directive'; | ||
import { WaPaymentItem } from './directives/payment-item/payment-item.directive'; | ||
import { WaPaymentSubmit } from './directives/payment-submit/payment-submit.directive'; | ||
export declare const WaPaymentRequest: (typeof WaPaymentItem | typeof WaPayment | typeof WaPaymentSubmit)[]; | ||
/** | ||
* @deprecated: use {@link WaPaymentRequest} | ||
*/ | ||
export declare const PaymentRequestModule: (typeof WaPaymentItem | typeof WaPayment | typeof WaPaymentSubmit)[]; |
{ | ||
"name": "@ng-web-apis/payment-request", | ||
"version": "4.0.1", | ||
"version": "4.1.0", | ||
"description": "This is a library for declarative use of Payment Request API with Angular", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -197,7 +197,5 @@ # ![ng-web-apis logo](https://raw.githubusercontent.com/taiga-family/ng-web-apis/main/libs/payment-request/logo.svg) Payment Request API for Angular | ||
```ts | ||
export class YourComponent { | ||
constructor( | ||
@Inject(PAYMENT_REQUEST_SUPPORT) private readonly canRequest: boolean | ||
) {} | ||
... | ||
export class Example { | ||
constructor(@Inject(PAYMENT_REQUEST_SUPPORT) private readonly canRequest: boolean) {} | ||
} | ||
``` | ||
@@ -210,16 +208,16 @@ | ||
@Component({ | ||
... | ||
providers: [ | ||
{ | ||
provide: [PAYMENT_METHODS], | ||
useValue: [ | ||
// a sample with Google Pay from https://developers.google.com/pay/api/web/guides/paymentrequest/tutorial?hl=en | ||
{supportedMethods: 'https://google.com/pay', data: googlePaymentDataRequest}, | ||
{supportedMethods: 'basic-card'} | ||
] | ||
} | ||
] | ||
// ... | ||
providers: [ | ||
{ | ||
provide: [PAYMENT_METHODS], | ||
useValue: [ | ||
// a sample with Google Pay from https://developers.google.com/pay/api/web/guides/paymentrequest/tutorial?hl=en | ||
{supportedMethods: 'https://google.com/pay', data: googlePaymentDataRequest}, | ||
{supportedMethods: 'basic-card'}, | ||
], | ||
}, | ||
], | ||
}) | ||
export class YourComponentThatMakesPaymentRequests { | ||
... | ||
export class Example { | ||
// ... | ||
} | ||
@@ -232,17 +230,17 @@ ``` | ||
@Component({ | ||
... | ||
providers: [ | ||
{ | ||
provide: [PAYMENT_OPTIONS], | ||
useValue: { | ||
shippingType: 'express', | ||
requestPayerName: true, | ||
requestShipping: true, | ||
requestPayerEmail: true, | ||
} | ||
} | ||
] | ||
// ... | ||
providers: [ | ||
{ | ||
provide: [PAYMENT_OPTIONS], | ||
useValue: { | ||
shippingType: 'express', | ||
requestPayerName: true, | ||
requestShipping: true, | ||
requestPayerEmail: true, | ||
}, | ||
}, | ||
], | ||
}) | ||
export class YourComponentThatMakesPaymentRequests { | ||
... | ||
export class Example { | ||
// ... | ||
} | ||
@@ -249,0 +247,0 @@ ``` |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
448
78173
255