@chargebee/chargebee-js-angular-wrapper
Advanced tools
Comparing version 4.0.0 to 5.0.0
@@ -40,4 +40,4 @@ import { EventEmitter, ElementRef, OnInit, OnChanges, SimpleChanges } from "@angular/core"; | ||
static ɵfac: i0.ɵɵFactoryDeclaration<CardFieldDirective, never>; | ||
static ɵdir: i0.ɵɵDirectiveDeclaration<CardFieldDirective, "[cbCardField]", never, { "icon": { "alias": "icon"; "required": false; }; "classes": { "alias": "classes"; "required": false; }; "fonts": { "alias": "fonts"; "required": false; }; "styles": { "alias": "styles"; "required": false; }; "locale": { "alias": "locale"; "required": false; }; "showTestCards": { "alias": "showTestCards"; "required": false; }; "currency": { "alias": "currency"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; }, { "ready": "ready"; "focus": "focus"; "blur": "blur"; "change": "change"; }, ["numberComponent", "expiryComponent", "cvvComponent"], never, false, never>; | ||
static ɵdir: i0.ɵɵDirectiveDeclaration<CardFieldDirective, "[cbCardField]", never, { "icon": { "alias": "icon"; "required": false; }; "classes": { "alias": "classes"; "required": false; }; "fonts": { "alias": "fonts"; "required": false; }; "styles": { "alias": "styles"; "required": false; }; "locale": { "alias": "locale"; "required": false; }; "showTestCards": { "alias": "showTestCards"; "required": false; }; "currency": { "alias": "currency"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; }, { "ready": "ready"; "focus": "focus"; "blur": "blur"; "change": "change"; }, ["numberComponent", "expiryComponent", "cvvComponent"], never, true, never>; | ||
} | ||
//# sourceMappingURL=card-field.directive.d.ts.map |
@@ -21,4 +21,4 @@ import { ElementRef, EventEmitter, OnChanges, SimpleChanges } from '@angular/core'; | ||
static ɵfac: i0.ɵɵFactoryDeclaration<CvvFieldDirective, never>; | ||
static ɵdir: i0.ɵɵDirectiveDeclaration<CvvFieldDirective, "[cbCvvField]", never, { "styles": { "alias": "styles"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; }, { "ready": "ready"; "focus": "focus"; "blur": "blur"; "change": "change"; }, never, never, false, never>; | ||
static ɵdir: i0.ɵɵDirectiveDeclaration<CvvFieldDirective, "[cbCvvField]", never, { "styles": { "alias": "styles"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; }, { "ready": "ready"; "focus": "focus"; "blur": "blur"; "change": "change"; }, never, never, true, never>; | ||
} | ||
//# sourceMappingURL=cvv-field.directive.d.ts.map |
@@ -21,4 +21,4 @@ import { EventEmitter, ElementRef, OnChanges, SimpleChanges } from '@angular/core'; | ||
static ɵfac: i0.ɵɵFactoryDeclaration<ExpiryFieldDirective, never>; | ||
static ɵdir: i0.ɵɵDirectiveDeclaration<ExpiryFieldDirective, "[cbExpiryField]", never, { "cbComponent": { "alias": "cbComponent"; "required": false; }; "styles": { "alias": "styles"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; }, { "ready": "ready"; "focus": "focus"; "blur": "blur"; "change": "change"; }, never, never, false, never>; | ||
static ɵdir: i0.ɵɵDirectiveDeclaration<ExpiryFieldDirective, "[cbExpiryField]", never, { "cbComponent": { "alias": "cbComponent"; "required": false; }; "styles": { "alias": "styles"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; }, { "ready": "ready"; "focus": "focus"; "blur": "blur"; "change": "change"; }, never, never, true, never>; | ||
} | ||
//# sourceMappingURL=expiry-field.directive.d.ts.map |
@@ -20,4 +20,4 @@ import { EventEmitter, ElementRef, OnChanges, SimpleChanges } from '@angular/core'; | ||
static ɵfac: i0.ɵɵFactoryDeclaration<NumberFieldDirective, never>; | ||
static ɵdir: i0.ɵɵDirectiveDeclaration<NumberFieldDirective, "[cbNumberField]", never, { "styles": { "alias": "styles"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; }, { "ready": "ready"; "focus": "focus"; "blur": "blur"; "change": "change"; }, never, never, false, never>; | ||
static ɵdir: i0.ɵɵDirectiveDeclaration<NumberFieldDirective, "[cbNumberField]", never, { "styles": { "alias": "styles"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; }, { "ready": "ready"; "focus": "focus"; "blur": "blur"; "change": "change"; }, never, never, true, never>; | ||
} | ||
//# sourceMappingURL=number-field.directive.d.ts.map |
{ | ||
"name": "@chargebee/chargebee-js-angular-wrapper", | ||
"version": "4.0.0", | ||
"version": "5.0.0", | ||
"description": "Angular wrapper for Chargebee.js Components", | ||
@@ -28,4 +28,4 @@ "homepage": "https://github.com/chargebee/chargebee-js-wrappers/tree/master/chargebee-js-angular#readme", | ||
"peerDependencies": { | ||
"@angular/common": "^17.3.11", | ||
"@angular/core": "^17.3.11" | ||
"@angular/common": "^18.2.13", | ||
"@angular/core": "^18.2.13" | ||
}, | ||
@@ -32,0 +32,0 @@ "module": "fesm2022/chargebee-chargebee-js-angular-wrapper.mjs", |
@@ -1,2 +0,1 @@ | ||
export * from './lib/chargebee-js-angular-wrapper.module'; | ||
export * from './lib/directives/card-field.directive'; | ||
@@ -3,0 +2,0 @@ export * from './lib/directives/number-field.directive'; |
@@ -34,8 +34,2 @@ # Chargebee JS Angular Wrapper | ||
<script src="https://js.chargebee.com/v2/chargebee.js"></script> | ||
<script> | ||
Chargebee.init({ | ||
site: "your-site", | ||
publishableKey: "your-publishable-key", | ||
}); | ||
</script> | ||
</head> | ||
@@ -66,8 +60,17 @@ <body> | ||
```js | ||
import { Component } from "@angular/core"; | ||
import { Component } from '@angular/core'; | ||
declare var Chargebee; | ||
@Component({ | ||
selector: "app-root", | ||
templateUrl: "./app.component.html", | ||
styleUrls: ["./app.component.css"], | ||
selector: 'app-root', | ||
templateUrl: './app.component.html', | ||
styleUrls: ['./app.component.css'], | ||
standalone: true, | ||
imports: [ | ||
RouterOutlet, | ||
CardFieldDirective, | ||
CvvFieldDirective, | ||
NumberFieldDirective, | ||
ExpiryFieldDirective, | ||
], | ||
}) | ||
@@ -77,5 +80,13 @@ export class AppComponent { | ||
constructor(...) { | ||
... | ||
Chargebee.init({ | ||
site: 'your-site' | ||
publishableKey: 'your-publishable-key' | ||
}) | ||
} | ||
onReady = (cardComponent) => { | ||
this.cardComponent = cardComponent; | ||
}; | ||
} | ||
@@ -85,7 +96,8 @@ onTokenize = (event) => { | ||
this.cardComponent.tokenize().then((data) => { | ||
console.log("chargebee token", data.token); | ||
this.cardComponent.tokenize().then(data => { | ||
console.log('chargebee token', data.token) | ||
}); | ||
}; | ||
} | ||
} | ||
``` | ||
@@ -121,2 +133,10 @@ | ||
styleUrls: ["./app.component.css"], | ||
standalone: true, | ||
imports: [ | ||
RouterOutlet, | ||
CardFieldDirective, | ||
CvvFieldDirective, | ||
NumberFieldDirective, | ||
ExpiryFieldDirective, | ||
], | ||
}) | ||
@@ -202,2 +222,3 @@ export class AppComponent { | ||
### 3DS Authorization | ||
@@ -227,2 +248,10 @@ | ||
styleUrls: ['./app.component.css'], | ||
standalone: true, | ||
imports: [ | ||
RouterOutlet, | ||
CardFieldDirective, | ||
CvvFieldDirective, | ||
NumberFieldDirective, | ||
ExpiryFieldDirective, | ||
], | ||
}) | ||
@@ -229,0 +258,0 @@ export class AppComponent { |
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
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
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
328
134858
32
1173