@recursyve/nice-stripe-kit.v2 12.0.0-beta.2 → 13.0.0-beta.3
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/esm2020/lib/components/card-element/stripe-card-element.component.mjs +130 -0
- package/esm2020/lib/components/card-form/stripe-card-form.component.mjs +139 -0
- package/{esm2015/lib/components/card-form/stripe-card-form.form.js → esm2020/lib/components/card-form/stripe-card-form.form.mjs} +0 -0
- package/{esm2015/lib/nice-stripe-kit.constant.js → esm2020/lib/nice-stripe-kit.constant.mjs} +0 -0
- package/{esm2015/lib/nice-stripe-kit.module.js → esm2020/lib/nice-stripe-kit.module.mjs} +4 -4
- package/{esm2015/lib/nice-stripe-kit.options.js → esm2020/lib/nice-stripe-kit.options.mjs} +0 -0
- package/{esm2015/public-api.js → esm2020/public-api.mjs} +0 -0
- package/{esm2015/recursyve-nice-stripe-kit.v2.js → esm2020/recursyve-nice-stripe-kit.v2.mjs} +0 -0
- package/fesm2015/{recursyve-nice-stripe-kit.v2.js → recursyve-nice-stripe-kit.v2.mjs} +32 -41
- package/fesm2015/recursyve-nice-stripe-kit.v2.mjs.map +1 -0
- package/fesm2020/recursyve-nice-stripe-kit.v2.mjs +354 -0
- package/fesm2020/recursyve-nice-stripe-kit.v2.mjs.map +1 -0
- package/package.json +25 -12
- package/bundles/recursyve-nice-stripe-kit.v2.umd.js +0 -755
- package/bundles/recursyve-nice-stripe-kit.v2.umd.js.map +0 -1
- package/esm2015/lib/components/card-element/stripe-card-element.component.js +0 -141
- package/esm2015/lib/components/card-form/stripe-card-form.component.js +0 -144
- package/fesm2015/recursyve-nice-stripe-kit.v2.js.map +0 -1
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { coerceBooleanProperty } from "@angular/cdk/coercion";
|
|
2
|
+
import { Component, ElementRef, HostBinding, Input, Optional, Self, ViewChild, ViewEncapsulation } from "@angular/core";
|
|
3
|
+
import { NgControl } from "@angular/forms";
|
|
4
|
+
import { MatFormFieldControl } from "@angular/material/form-field";
|
|
5
|
+
import { Subject } from "rxjs";
|
|
6
|
+
import { v4 as uuidv4 } from "uuid";
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
import * as i1 from "@angular/forms";
|
|
9
|
+
export class NiceStripeCardElementComponent {
|
|
10
|
+
constructor(ngControl) {
|
|
11
|
+
this.ngControl = ngControl;
|
|
12
|
+
this._focused = false;
|
|
13
|
+
this._required = false;
|
|
14
|
+
this._disabled = false;
|
|
15
|
+
this.stateChanges = new Subject();
|
|
16
|
+
this.empty = true;
|
|
17
|
+
this.errorState = false;
|
|
18
|
+
this.complete = false;
|
|
19
|
+
this.describedBy = "";
|
|
20
|
+
this.id = uuidv4();
|
|
21
|
+
}
|
|
22
|
+
set placeholder(placeholder) {
|
|
23
|
+
this._placeholder = placeholder;
|
|
24
|
+
this.stateChanges.next();
|
|
25
|
+
}
|
|
26
|
+
get placeholder() {
|
|
27
|
+
return this._placeholder;
|
|
28
|
+
}
|
|
29
|
+
set focused(focused) {
|
|
30
|
+
this._focused = focused;
|
|
31
|
+
this.stateChanges.next();
|
|
32
|
+
}
|
|
33
|
+
get focused() {
|
|
34
|
+
return this._focused;
|
|
35
|
+
}
|
|
36
|
+
get required() {
|
|
37
|
+
return this._required;
|
|
38
|
+
}
|
|
39
|
+
set required(req) {
|
|
40
|
+
this._required = coerceBooleanProperty(req);
|
|
41
|
+
this.stateChanges.next();
|
|
42
|
+
}
|
|
43
|
+
get disabled() {
|
|
44
|
+
return this._disabled;
|
|
45
|
+
}
|
|
46
|
+
set disabled(value) {
|
|
47
|
+
this._disabled = coerceBooleanProperty(value);
|
|
48
|
+
this.stateChanges.next();
|
|
49
|
+
}
|
|
50
|
+
get shouldLabelFloat() {
|
|
51
|
+
return this.focused || !this.empty;
|
|
52
|
+
}
|
|
53
|
+
setDescribedByIds(ids) {
|
|
54
|
+
this.describedBy = ids.join(" ");
|
|
55
|
+
}
|
|
56
|
+
async ngAfterViewInit() {
|
|
57
|
+
if (this.elementRef) {
|
|
58
|
+
this.empty = !this.value;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
async init(element) {
|
|
62
|
+
this.element = element;
|
|
63
|
+
this.element.mount(this.elementRef.nativeElement);
|
|
64
|
+
this.stateChanges.next();
|
|
65
|
+
this.element.update({
|
|
66
|
+
placeholder: this.placeholder
|
|
67
|
+
});
|
|
68
|
+
this.element.on("blur", () => {
|
|
69
|
+
this.focused = false;
|
|
70
|
+
if (this.empty && this._required) {
|
|
71
|
+
this.errorState = true;
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
this.element.on("focus", () => {
|
|
75
|
+
this.focused = true;
|
|
76
|
+
});
|
|
77
|
+
this.element.on("change", event => {
|
|
78
|
+
this.empty = event.empty;
|
|
79
|
+
this.errorState = !!event.error;
|
|
80
|
+
this.complete = event.complete;
|
|
81
|
+
this.stateChanges.next();
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
markAsTouched() {
|
|
85
|
+
this.errorState = !!this.empty;
|
|
86
|
+
this.stateChanges.next();
|
|
87
|
+
}
|
|
88
|
+
onContainerClick(event) {
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
NiceStripeCardElementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NiceStripeCardElementComponent, deps: [{ token: i1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
92
|
+
NiceStripeCardElementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: NiceStripeCardElementComponent, selector: "nice-stripe-card-element", inputs: { placeholder: "placeholder", focused: "focused", required: "required", disabled: "disabled" }, host: { properties: { "attr.aria-describedby": "this.describedBy", "id": "this.id", "class.floating": "this.shouldLabelFloat" } }, providers: [
|
|
93
|
+
{
|
|
94
|
+
provide: MatFormFieldControl,
|
|
95
|
+
useExisting: NiceStripeCardElementComponent
|
|
96
|
+
}
|
|
97
|
+
], viewQueries: [{ propertyName: "elementRef", first: true, predicate: ["element"], descendants: true }], ngImport: i0, template: "<div class='stripe-element' #element></div>", isInline: true, styles: ["nice-stripe-card-element .stripe-element{height:15px}\n"], encapsulation: i0.ViewEncapsulation.None });
|
|
98
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NiceStripeCardElementComponent, decorators: [{
|
|
99
|
+
type: Component,
|
|
100
|
+
args: [{ selector: "nice-stripe-card-element", template: "<div class='stripe-element' #element></div>", encapsulation: ViewEncapsulation.None, providers: [
|
|
101
|
+
{
|
|
102
|
+
provide: MatFormFieldControl,
|
|
103
|
+
useExisting: NiceStripeCardElementComponent
|
|
104
|
+
}
|
|
105
|
+
], styles: ["nice-stripe-card-element .stripe-element{height:15px}\n"] }]
|
|
106
|
+
}], ctorParameters: function () { return [{ type: i1.NgControl, decorators: [{
|
|
107
|
+
type: Optional
|
|
108
|
+
}, {
|
|
109
|
+
type: Self
|
|
110
|
+
}] }]; }, propDecorators: { elementRef: [{
|
|
111
|
+
type: ViewChild,
|
|
112
|
+
args: ["element"]
|
|
113
|
+
}], describedBy: [{
|
|
114
|
+
type: HostBinding,
|
|
115
|
+
args: ["attr.aria-describedby"]
|
|
116
|
+
}], id: [{
|
|
117
|
+
type: HostBinding
|
|
118
|
+
}], placeholder: [{
|
|
119
|
+
type: Input
|
|
120
|
+
}], focused: [{
|
|
121
|
+
type: Input
|
|
122
|
+
}], required: [{
|
|
123
|
+
type: Input
|
|
124
|
+
}], disabled: [{
|
|
125
|
+
type: Input
|
|
126
|
+
}], shouldLabelFloat: [{
|
|
127
|
+
type: HostBinding,
|
|
128
|
+
args: ["class.floating"]
|
|
129
|
+
}] } });
|
|
130
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RyaXBlLWNhcmQtZWxlbWVudC5jb21wb25lbnQuanMiLCJzb3VyY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0KCk7XG4gICAgICAgIH0pO1xuICAgIH1cblxuICAgIHB1YmxpYyBtYXJrQXNUb3VjaGVkKCk6IHZvaWQge1xuICAgICAgICB0aGlzLmVycm9yU3RhdGUgPSAhIXRoaXMuZW1wdHk7XG4gICAgICAgIHRoaXMuc3RhdGVDaGFuZ2VzLm5leHQoKTtcbiAgICB9XG5cbiAgICBwdWJsaWMgb25Db250YWluZXJDbGljayhldmVudDogTW91c2VFdmVudCk6IHZvaWQge1xuICAgIH1cbn1cbiJdfQ==
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { Component, Inject, Input, Optional, ViewChild, ViewEncapsulation } from "@angular/core";
|
|
2
|
+
import { TranslateService } from "@ngx-translate/core";
|
|
3
|
+
import { GeneratedFormGroup, ngxFormGeneratorFactory } from "@recursyve/ngx-form-generator";
|
|
4
|
+
import { niceAnimations } from "@recursyve/nice-ui-kit.v2";
|
|
5
|
+
import { StripeService } from "ngx-stripe";
|
|
6
|
+
import { map } from "rxjs/operators";
|
|
7
|
+
import { NICE_STRIPE_OPTIONS } from "../../nice-stripe-kit.constant";
|
|
8
|
+
import { NiceStripeCardElementComponent } from "../card-element/stripe-card-element.component";
|
|
9
|
+
import { StripeForm } from "./stripe-card-form.form";
|
|
10
|
+
import * as i0 from "@angular/core";
|
|
11
|
+
import * as i1 from "@recursyve/ngx-form-generator";
|
|
12
|
+
import * as i2 from "ngx-stripe";
|
|
13
|
+
import * as i3 from "@ngx-translate/core";
|
|
14
|
+
import * as i4 from "@angular/material/list";
|
|
15
|
+
import * as i5 from "@angular/material/form-field";
|
|
16
|
+
import * as i6 from "../card-element/stripe-card-element.component";
|
|
17
|
+
import * as i7 from "@angular/forms";
|
|
18
|
+
import * as i8 from "@recursyve/nice-ui-kit.v2";
|
|
19
|
+
import * as i9 from "@angular/material/input";
|
|
20
|
+
import * as i10 from "@angular/common";
|
|
21
|
+
import * as i11 from "@angular/flex-layout";
|
|
22
|
+
export class NiceStripeCardFormComponent {
|
|
23
|
+
constructor(options, formGroup, stripeService, translateService) {
|
|
24
|
+
this.options = options;
|
|
25
|
+
this.formGroup = formGroup;
|
|
26
|
+
this.stripeService = stripeService;
|
|
27
|
+
this.translateService = translateService;
|
|
28
|
+
this.showIcons = false;
|
|
29
|
+
}
|
|
30
|
+
get isValid() {
|
|
31
|
+
return this.cardNumberInput.complete &&
|
|
32
|
+
this.cardExpiryInput.complete &&
|
|
33
|
+
this.cardCvcInput.complete &&
|
|
34
|
+
this.formGroup.valid;
|
|
35
|
+
}
|
|
36
|
+
get cardToken() {
|
|
37
|
+
if (!this.isValid) {
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
return this.stripeService.createToken(this.cardNumberElement, {
|
|
41
|
+
name: this.formGroup.get("name").value
|
|
42
|
+
}).pipe(map(x => x?.token?.id)).toPromise();
|
|
43
|
+
}
|
|
44
|
+
async ngOnInit() {
|
|
45
|
+
this.stripeOptions = {
|
|
46
|
+
placeholder: "",
|
|
47
|
+
style: {
|
|
48
|
+
base: this.options.styling
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
this.elements = await this.stripeService.elements({
|
|
52
|
+
locale: this.translateService.currentLang,
|
|
53
|
+
fonts: this.options?.fonts ?? []
|
|
54
|
+
}).toPromise();
|
|
55
|
+
this.initCardNumber();
|
|
56
|
+
this.initCardExpiry();
|
|
57
|
+
this.initCardCvc();
|
|
58
|
+
}
|
|
59
|
+
initCardNumber() {
|
|
60
|
+
this.cardNumberElement = this.elements.create("cardNumber", {
|
|
61
|
+
...this.stripeOptions,
|
|
62
|
+
});
|
|
63
|
+
this.cardNumberElement.on("change", event => {
|
|
64
|
+
this.cardNumberError = event.error ? event.error.message : null;
|
|
65
|
+
});
|
|
66
|
+
this.cardNumberInput.init(this.cardNumberElement);
|
|
67
|
+
}
|
|
68
|
+
initCardExpiry() {
|
|
69
|
+
this.cardExpiryElement = this.elements.create("cardExpiry", {
|
|
70
|
+
...this.stripeOptions,
|
|
71
|
+
});
|
|
72
|
+
this.cardExpiryElement.on("change", event => {
|
|
73
|
+
this.cardExpiryError = event.error ? event.error.message : null;
|
|
74
|
+
});
|
|
75
|
+
this.cardExpiryInput.init(this.cardExpiryElement);
|
|
76
|
+
}
|
|
77
|
+
initCardCvc() {
|
|
78
|
+
this.cardCvcElement = this.elements.create("cardCvc", {
|
|
79
|
+
...this.stripeOptions,
|
|
80
|
+
});
|
|
81
|
+
this.cardCvcElement.on("change", event => {
|
|
82
|
+
this.cardCvcError = event.error ? event.error.message : null;
|
|
83
|
+
});
|
|
84
|
+
this.cardCvcInput.init(this.cardCvcElement);
|
|
85
|
+
}
|
|
86
|
+
ngOnDestroy() {
|
|
87
|
+
this.cardNumberElement.unmount();
|
|
88
|
+
this.cardExpiryElement.unmount();
|
|
89
|
+
this.cardCvcElement.unmount();
|
|
90
|
+
}
|
|
91
|
+
patchName(name) {
|
|
92
|
+
this.formGroup.get("name").patchValue(name);
|
|
93
|
+
}
|
|
94
|
+
markAllAsTouched() {
|
|
95
|
+
this.formGroup.markAllAsTouched();
|
|
96
|
+
this.cardCvcInput.markAsTouched();
|
|
97
|
+
this.cardNumberInput.markAsTouched();
|
|
98
|
+
this.cardExpiryInput.markAsTouched();
|
|
99
|
+
}
|
|
100
|
+
getYear() {
|
|
101
|
+
const date = new Date();
|
|
102
|
+
return +date.getFullYear().toString().substr(-2);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
NiceStripeCardFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NiceStripeCardFormComponent, deps: [{ token: NICE_STRIPE_OPTIONS, optional: true }, { token: i1.GeneratedFormGroup }, { token: i2.StripeService }, { token: i3.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
106
|
+
NiceStripeCardFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: NiceStripeCardFormComponent, selector: "nice-stripe-card-form", inputs: { appearance: "appearance", showIcons: "showIcons" }, providers: [
|
|
107
|
+
{
|
|
108
|
+
provide: GeneratedFormGroup,
|
|
109
|
+
useFactory: ngxFormGeneratorFactory(StripeForm)
|
|
110
|
+
}
|
|
111
|
+
], viewQueries: [{ propertyName: "cardNumberInput", first: true, predicate: ["cardNumber"], descendants: true }, { propertyName: "cardExpiryInput", first: true, predicate: ["cardExpiry"], descendants: true }, { propertyName: "cardCvcInput", first: true, predicate: ["cardCvc"], descendants: true }], ngImport: i0, template: "<mat-list [formGroup]=\"formGroup\">\n <mat-list-item>\n <mat-form-field [appearance]=\"appearance\" niceControlStatus floatLabel=\"always\">\n <mat-label>{{ \"nice_ui_kit.stripe.name_on_card.label\" | translate}}</mat-label>\n <input [placeholder]=\"'nice_ui_kit.stripe.name_on_card.placeholder' | translate\" matInput type=\"text\"\n formControlName=\"name\" required/>\n <div matPrefix class=\"pr-2\" *ngIf=\"showIcons\">\n <i class=\"fad fa-user-circle text-accent form-icons\"></i>\n </div>\n </mat-form-field>\n </mat-list-item>\n <mat-list-item>\n <div fxLayout=\"column\" class=\"w-full\">\n <div fxLayout=\"row\">\n <mat-form-field fxFlex=\"100\" [appearance]=\"appearance\" floatLabel=\"always\">\n <mat-label>{{ \"nice_ui_kit.stripe.card_number.label\" | translate}}</mat-label>\n <div matPrefix class=\"pr-2\" *ngIf=\"showIcons\">\n <i class=\"fad fa-credit-card text-accent form-icons\"></i>\n </div>\n <nice-stripe-card-element [placeholder]=\"'nice_ui_kit.stripe.card_number.placeholder' | translate\"\n #cardNumber required></nice-stripe-card-element>\n <mat-error [@slideInBottom] *ngIf=\"cardNumberError\">{{ cardNumberError }}</mat-error>\n </mat-form-field>\n </div>\n <div fxLayout=\"row\" fxLayoutGap=\"15px\">\n <mat-form-field fxFlex=\"50\" fxFlex.lt-md=\"48\" [appearance]=\"appearance\" floatLabel=\"always\">\n <mat-label>{{ \"nice_ui_kit.stripe.expiration.label\" | translate}}</mat-label>\n <nice-stripe-card-element [placeholder]=\"'nice_ui_kit.stripe.expiration.placeholder' | translate\"\n #cardExpiry required></nice-stripe-card-element>\n <mat-error [@slideInBottom] *ngIf=\"cardExpiryError\">{{ cardExpiryError }}</mat-error>\n </mat-form-field>\n <mat-form-field fxFlex=\"50\" fxFlex.lt-md=\"48\" [appearance]=\"appearance\" floatLabel=\"always\">\n <mat-label>{{ \"nice_ui_kit.stripe.cvc.label\" | translate}}</mat-label>\n <nice-stripe-card-element [placeholder]=\"'nice_ui_kit.stripe.cvc.placeholder' | translate\" #cardCvc\n required></nice-stripe-card-element>\n <mat-error [@slideInBottom] *ngIf=\"cardCvcError\">{{ cardCvcError }}</mat-error>\n </mat-form-field>\n </div>\n </div>\n </mat-list-item>\n</mat-list>\n", styles: ["nice-stripe-card-form mat-list-item{height:auto!important}nice-stripe-card-form .form-icons{font-size:24px!important;width:24px!important;height:24px!important;line-height:24px!important}\n"], components: [{ type: i4.MatList, selector: "mat-list, mat-action-list", inputs: ["disableRipple", "disabled"], exportAs: ["matList"] }, { type: i4.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["disableRipple", "disabled"], exportAs: ["matListItem"] }, { type: i5.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { type: i6.NiceStripeCardElementComponent, selector: "nice-stripe-card-element", inputs: ["placeholder", "focused", "required", "disabled"] }], directives: [{ type: i7.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i7.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i8.NiceControlStatusDirective, selector: "[niceControlStatus]" }, { type: i5.MatLabel, selector: "mat-label" }, { type: i9.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { type: i7.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i7.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i7.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.MatPrefix, selector: "[matPrefix]" }, { type: i11.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i11.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i5.MatError, selector: "mat-error", inputs: ["id"] }, { type: i11.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }], pipes: { "translate": i3.TranslatePipe }, animations: niceAnimations, encapsulation: i0.ViewEncapsulation.None });
|
|
112
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NiceStripeCardFormComponent, decorators: [{
|
|
113
|
+
type: Component,
|
|
114
|
+
args: [{ selector: "nice-stripe-card-form", encapsulation: ViewEncapsulation.None, providers: [
|
|
115
|
+
{
|
|
116
|
+
provide: GeneratedFormGroup,
|
|
117
|
+
useFactory: ngxFormGeneratorFactory(StripeForm)
|
|
118
|
+
}
|
|
119
|
+
], animations: niceAnimations, template: "<mat-list [formGroup]=\"formGroup\">\n <mat-list-item>\n <mat-form-field [appearance]=\"appearance\" niceControlStatus floatLabel=\"always\">\n <mat-label>{{ \"nice_ui_kit.stripe.name_on_card.label\" | translate}}</mat-label>\n <input [placeholder]=\"'nice_ui_kit.stripe.name_on_card.placeholder' | translate\" matInput type=\"text\"\n formControlName=\"name\" required/>\n <div matPrefix class=\"pr-2\" *ngIf=\"showIcons\">\n <i class=\"fad fa-user-circle text-accent form-icons\"></i>\n </div>\n </mat-form-field>\n </mat-list-item>\n <mat-list-item>\n <div fxLayout=\"column\" class=\"w-full\">\n <div fxLayout=\"row\">\n <mat-form-field fxFlex=\"100\" [appearance]=\"appearance\" floatLabel=\"always\">\n <mat-label>{{ \"nice_ui_kit.stripe.card_number.label\" | translate}}</mat-label>\n <div matPrefix class=\"pr-2\" *ngIf=\"showIcons\">\n <i class=\"fad fa-credit-card text-accent form-icons\"></i>\n </div>\n <nice-stripe-card-element [placeholder]=\"'nice_ui_kit.stripe.card_number.placeholder' | translate\"\n #cardNumber required></nice-stripe-card-element>\n <mat-error [@slideInBottom] *ngIf=\"cardNumberError\">{{ cardNumberError }}</mat-error>\n </mat-form-field>\n </div>\n <div fxLayout=\"row\" fxLayoutGap=\"15px\">\n <mat-form-field fxFlex=\"50\" fxFlex.lt-md=\"48\" [appearance]=\"appearance\" floatLabel=\"always\">\n <mat-label>{{ \"nice_ui_kit.stripe.expiration.label\" | translate}}</mat-label>\n <nice-stripe-card-element [placeholder]=\"'nice_ui_kit.stripe.expiration.placeholder' | translate\"\n #cardExpiry required></nice-stripe-card-element>\n <mat-error [@slideInBottom] *ngIf=\"cardExpiryError\">{{ cardExpiryError }}</mat-error>\n </mat-form-field>\n <mat-form-field fxFlex=\"50\" fxFlex.lt-md=\"48\" [appearance]=\"appearance\" floatLabel=\"always\">\n <mat-label>{{ \"nice_ui_kit.stripe.cvc.label\" | translate}}</mat-label>\n <nice-stripe-card-element [placeholder]=\"'nice_ui_kit.stripe.cvc.placeholder' | translate\" #cardCvc\n required></nice-stripe-card-element>\n <mat-error [@slideInBottom] *ngIf=\"cardCvcError\">{{ cardCvcError }}</mat-error>\n </mat-form-field>\n </div>\n </div>\n </mat-list-item>\n</mat-list>\n", styles: ["nice-stripe-card-form mat-list-item{height:auto!important}nice-stripe-card-form .form-icons{font-size:24px!important;width:24px!important;height:24px!important;line-height:24px!important}\n"] }]
|
|
120
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
121
|
+
type: Optional
|
|
122
|
+
}, {
|
|
123
|
+
type: Inject,
|
|
124
|
+
args: [NICE_STRIPE_OPTIONS]
|
|
125
|
+
}] }, { type: i1.GeneratedFormGroup }, { type: i2.StripeService }, { type: i3.TranslateService }]; }, propDecorators: { appearance: [{
|
|
126
|
+
type: Input
|
|
127
|
+
}], showIcons: [{
|
|
128
|
+
type: Input
|
|
129
|
+
}], cardNumberInput: [{
|
|
130
|
+
type: ViewChild,
|
|
131
|
+
args: ["cardNumber"]
|
|
132
|
+
}], cardExpiryInput: [{
|
|
133
|
+
type: ViewChild,
|
|
134
|
+
args: ["cardExpiry"]
|
|
135
|
+
}], cardCvcInput: [{
|
|
136
|
+
type: ViewChild,
|
|
137
|
+
args: ["cardCvc"]
|
|
138
|
+
}] } });
|
|
139
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RyaXBlLWNhcmQtZm9ybS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uaWNlLXN0cmlwZS1raXQtdjIvc3JjL2xpYi9jb21wb25lbnRzL2NhcmQtZm9ybS9zdHJpcGUtY2FyZC1mb3JtLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25pY2Utc3RyaXBlLWtpdC12Mi9zcmMvbGliL2NvbXBvbmVudHMvY2FyZC1mb3JtL3N0cmlwZS1jYXJkLWZvcm0udGVtcGxhdGUuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sRUFBRSxLQUFLLEVBQXFCLFFBQVEsRUFBRSxTQUFTLEVBQUUsaUJBQWlCLEVBQUUsTUFB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gICAgICAgIHJldHVybiB0aGlzLnN0cmlwZVNlcnZpY2UuY3JlYXRlVG9rZW4odGhpcy5jYXJkTnVtYmVyRWxlbWVudCwge1xuICAgICAgICAgICAgbmFtZTogdGhpcy5mb3JtR3JvdXAuZ2V0KFwibmFtZVwiKS52YWx1ZVxuICAgICAgICB9KS5waXBlKFxuICAgICAgICAgICAgbWFwKHggPT4geD8udG9rZW4/LmlkKVxuICAgICAgICApLnRvUHJvbWlzZSgpO1xuICAgIH1cblxuICAgIGNvbnN0cnVjdG9yKFxuICAgICAgICBAT3B0aW9uYWwoKSBASW5qZWN0KE5JQ0VfU1RSSVBFX09QVElPTlMpIHB1YmxpYyBvcHRpb25zOiBOaWNlU3RyaXBlS2l0T3B0aW9ucyxcbiAgICAgICAgcHVibGljIGZvcm1Hcm91cDogR2VuZXJhdGVkRm9ybUdyb3VwPFN0cmlwZUZvcm0+LFxuICAgICAgICBwcml2YXRlIHN0cmlwZVNlcnZpY2U6IFN0cmlwZVNlcnZpY2UsXG4gICAgICAgIHByaXZhdGUgdHJhbnNsYXRlU2VydmljZTogVHJhbnNsYXRlU2VydmljZVxuICAgICkge1xuICAgIH1cblxuICAgIHB1YmxpYyBhc3luYyBuZ09uSW5pdCgpOiBQcm9taXNlPHZvaWQ+IHtcbiAgICAgICAgdGhpcy5zdHJpcGVPcHRpb25zID0ge1xuICAgICAgICAgICAgcGxhY2Vob2xkZXI6IFwiXCIsXG4gICAgICAgICAgICBzdHlsZToge1xuICAgICAgICAgICAgICAgIGJhc2U6IHRoaXMub3B0aW9ucy5zdHlsaW5nXG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG5cbiAgICAgICAgdGhpcy5lbGVtZW50cyA9IGF3YWl0IHRoaXMuc3RyaXBlU2VydmljZS5lbGVtZW50cyh7XG4gICAgICAgICAgICBsb2NhbGU6IHRoaXMudHJhbnNsYXRlU2VydmljZS5jdXJyZW50TGFuZyBhcyBhbnksXG4gICAgICAgICAgICBmb250czogdGhpcy5vc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ICAgICAgICAgICAgICAgICAgIDxtYXQtbGFiZWw+e3sgXCJuaWNlX3VpX2tpdC5zdHJpcGUuY3ZjLmxhYmVsXCIgIHwgdHJhbnNsYXRlfX08L21hdC1sYWJlbD5cbiAgICAgICAgICAgICAgICAgICAgPG5pY2Utc3RyaXBlLWNhcmQtZWxlbWVudCBbcGxhY2Vob2xkZXJdPVwiJ25pY2VfdWlfa2l0LnN0cmlwZS5jdmMucGxhY2Vob2xkZXInIHwgdHJhbnNsYXRlXCIgI2NhcmRDdmNcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXF1aXJlZD48L25pY2Utc3RyaXBlLWNhcmQtZWxlbWVudD5cbiAgICAgICAgICAgICAgICAgICAgPG1hdC1lcnJvciBbQHNsaWRlSW5Cb3R0b21dICpuZ0lmPVwiY2FyZEN2Y0Vycm9yXCI+e3sgY2FyZEN2Y0Vycm9yIH19PC9tYXQtZXJyb3I+XG4gICAgICAgICAgICAgICAgPC9tYXQtZm9ybS1maWVsZD5cbiAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICA8L2Rpdj5cbiAgICA8L21hdC1saXN0LWl0ZW0+XG48L21hdC1saXN0PlxuIl19
|
|
File without changes
|
package/{esm2015/lib/nice-stripe-kit.constant.js → esm2020/lib/nice-stripe-kit.constant.mjs}
RENAMED
|
File without changes
|
|
@@ -26,8 +26,8 @@ export class NiceStripeModule {
|
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
NiceStripeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
30
|
-
NiceStripeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
29
|
+
NiceStripeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NiceStripeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
30
|
+
NiceStripeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NiceStripeModule, declarations: [NiceStripeCardElementComponent,
|
|
31
31
|
NiceStripeCardFormComponent], imports: [FlexModule,
|
|
32
32
|
NgxStripeModule,
|
|
33
33
|
ReactiveFormsModule,
|
|
@@ -39,7 +39,7 @@ NiceStripeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versio
|
|
|
39
39
|
MatButtonModule,
|
|
40
40
|
CommonModule,
|
|
41
41
|
ExtendedModule], exports: [NiceStripeCardFormComponent] });
|
|
42
|
-
NiceStripeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
42
|
+
NiceStripeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NiceStripeModule, imports: [[
|
|
43
43
|
FlexModule,
|
|
44
44
|
NgxStripeModule,
|
|
45
45
|
ReactiveFormsModule,
|
|
@@ -52,7 +52,7 @@ NiceStripeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", versio
|
|
|
52
52
|
CommonModule,
|
|
53
53
|
ExtendedModule
|
|
54
54
|
]] });
|
|
55
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
55
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NiceStripeModule, decorators: [{
|
|
56
56
|
type: NgModule,
|
|
57
57
|
args: [{
|
|
58
58
|
imports: [
|
|
File without changes
|
|
File without changes
|
package/{esm2015/recursyve-nice-stripe-kit.v2.js → esm2020/recursyve-nice-stripe-kit.v2.mjs}
RENAMED
|
File without changes
|
|
@@ -113,32 +113,28 @@ class NiceStripeCardElementComponent {
|
|
|
113
113
|
onContainerClick(event) {
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
|
-
NiceStripeCardElementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
117
|
-
NiceStripeCardElementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "
|
|
116
|
+
NiceStripeCardElementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NiceStripeCardElementComponent, deps: [{ token: i7.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
117
|
+
NiceStripeCardElementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: NiceStripeCardElementComponent, selector: "nice-stripe-card-element", inputs: { placeholder: "placeholder", focused: "focused", required: "required", disabled: "disabled" }, host: { properties: { "attr.aria-describedby": "this.describedBy", "id": "this.id", "class.floating": "this.shouldLabelFloat" } }, providers: [
|
|
118
118
|
{
|
|
119
119
|
provide: MatFormFieldControl,
|
|
120
120
|
useExisting: NiceStripeCardElementComponent
|
|
121
121
|
}
|
|
122
|
-
], viewQueries: [{ propertyName: "elementRef", first: true, predicate: ["element"], descendants: true }], ngImport: i0, template: "<div class='stripe-element' #element></div>", isInline: true, styles: ["nice-stripe-card-element .stripe-element{height:15px}"], encapsulation: i0.ViewEncapsulation.None });
|
|
123
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
122
|
+
], viewQueries: [{ propertyName: "elementRef", first: true, predicate: ["element"], descendants: true }], ngImport: i0, template: "<div class='stripe-element' #element></div>", isInline: true, styles: ["nice-stripe-card-element .stripe-element{height:15px}\n"], encapsulation: i0.ViewEncapsulation.None });
|
|
123
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NiceStripeCardElementComponent, decorators: [{
|
|
124
124
|
type: Component,
|
|
125
|
-
args: [{
|
|
126
|
-
selector: "nice-stripe-card-element",
|
|
127
|
-
template: "<div class='stripe-element' #element></div>",
|
|
128
|
-
styleUrls: ["./stripe-card-element.style.scss"],
|
|
129
|
-
encapsulation: ViewEncapsulation.None,
|
|
130
|
-
providers: [
|
|
125
|
+
args: [{ selector: "nice-stripe-card-element", template: "<div class='stripe-element' #element></div>", encapsulation: ViewEncapsulation.None, providers: [
|
|
131
126
|
{
|
|
132
127
|
provide: MatFormFieldControl,
|
|
133
128
|
useExisting: NiceStripeCardElementComponent
|
|
134
129
|
}
|
|
135
|
-
]
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
130
|
+
], styles: ["nice-stripe-card-element .stripe-element{height:15px}\n"] }]
|
|
131
|
+
}], ctorParameters: function () {
|
|
132
|
+
return [{ type: i7.NgControl, decorators: [{
|
|
133
|
+
type: Optional
|
|
134
|
+
}, {
|
|
135
|
+
type: Self
|
|
136
|
+
}] }];
|
|
137
|
+
}, propDecorators: { elementRef: [{
|
|
142
138
|
type: ViewChild,
|
|
143
139
|
args: ["element"]
|
|
144
140
|
}], describedBy: [{
|
|
@@ -249,34 +245,29 @@ class NiceStripeCardFormComponent {
|
|
|
249
245
|
return +date.getFullYear().toString().substr(-2);
|
|
250
246
|
}
|
|
251
247
|
}
|
|
252
|
-
NiceStripeCardFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
253
|
-
NiceStripeCardFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "
|
|
248
|
+
NiceStripeCardFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NiceStripeCardFormComponent, deps: [{ token: NICE_STRIPE_OPTIONS, optional: true }, { token: i1.GeneratedFormGroup }, { token: i2.StripeService }, { token: i3.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
249
|
+
NiceStripeCardFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: NiceStripeCardFormComponent, selector: "nice-stripe-card-form", inputs: { appearance: "appearance", showIcons: "showIcons" }, providers: [
|
|
254
250
|
{
|
|
255
251
|
provide: GeneratedFormGroup,
|
|
256
252
|
useFactory: ngxFormGeneratorFactory(StripeForm)
|
|
257
253
|
}
|
|
258
|
-
], viewQueries: [{ propertyName: "cardNumberInput", first: true, predicate: ["cardNumber"], descendants: true }, { propertyName: "cardExpiryInput", first: true, predicate: ["cardExpiry"], descendants: true }, { propertyName: "cardCvcInput", first: true, predicate: ["cardCvc"], descendants: true }], ngImport: i0, template: "<mat-list [formGroup]=\"formGroup\">\n <mat-list-item>\n <mat-form-field [appearance]=\"appearance\" niceControlStatus floatLabel=\"always\">\n <mat-label>{{ \"nice_ui_kit.stripe.name_on_card.label\" | translate}}</mat-label>\n <input [placeholder]=\"'nice_ui_kit.stripe.name_on_card.placeholder' | translate\" matInput type=\"text\"\n formControlName=\"name\" required/>\n <div matPrefix class=\"pr-2\" *ngIf=\"showIcons\">\n <i class=\"fad fa-user-circle text-accent form-icons\"></i>\n </div>\n </mat-form-field>\n </mat-list-item>\n <mat-list-item>\n <div fxLayout=\"column\" class=\"w-full\">\n <div fxLayout=\"row\">\n <mat-form-field fxFlex=\"100\" [appearance]=\"appearance\" floatLabel=\"always\">\n <mat-label>{{ \"nice_ui_kit.stripe.card_number.label\" | translate}}</mat-label>\n <div matPrefix class=\"pr-2\" *ngIf=\"showIcons\">\n <i class=\"fad fa-credit-card text-accent form-icons\"></i>\n </div>\n <nice-stripe-card-element [placeholder]=\"'nice_ui_kit.stripe.card_number.placeholder' | translate\"\n #cardNumber required></nice-stripe-card-element>\n <mat-error [@slideInBottom] *ngIf=\"cardNumberError\">{{ cardNumberError }}</mat-error>\n </mat-form-field>\n </div>\n <div fxLayout=\"row\" fxLayoutGap=\"15px\">\n <mat-form-field fxFlex=\"50\" fxFlex.lt-md=\"48\" [appearance]=\"appearance\" floatLabel=\"always\">\n <mat-label>{{ \"nice_ui_kit.stripe.expiration.label\" | translate}}</mat-label>\n <nice-stripe-card-element [placeholder]=\"'nice_ui_kit.stripe.expiration.placeholder' | translate\"\n #cardExpiry required></nice-stripe-card-element>\n <mat-error [@slideInBottom] *ngIf=\"cardExpiryError\">{{ cardExpiryError }}</mat-error>\n </mat-form-field>\n <mat-form-field fxFlex=\"50\" fxFlex.lt-md=\"48\" [appearance]=\"appearance\" floatLabel=\"always\">\n <mat-label>{{ \"nice_ui_kit.stripe.cvc.label\" | translate}}</mat-label>\n <nice-stripe-card-element [placeholder]=\"'nice_ui_kit.stripe.cvc.placeholder' | translate\" #cardCvc\n required></nice-stripe-card-element>\n <mat-error [@slideInBottom] *ngIf=\"cardCvcError\">{{ cardCvcError }}</mat-error>\n </mat-form-field>\n </div>\n </div>\n </mat-list-item>\n</mat-list>\n", styles: ["nice-stripe-card-form mat-list-item{height:auto!important}nice-stripe-card-form .form-icons{font-size:24px!important;width:24px!important;height:24px!important;line-height:24px!important}"], components: [{ type: i4.MatList, selector: "mat-list, mat-action-list", inputs: ["disableRipple", "disabled"], exportAs: ["matList"] }, { type: i4.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["disableRipple", "disabled"], exportAs: ["matListItem"] }, { type: i5.MatFormField, selector: "mat-form-field", inputs: ["color", "
|
|
259
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
254
|
+
], viewQueries: [{ propertyName: "cardNumberInput", first: true, predicate: ["cardNumber"], descendants: true }, { propertyName: "cardExpiryInput", first: true, predicate: ["cardExpiry"], descendants: true }, { propertyName: "cardCvcInput", first: true, predicate: ["cardCvc"], descendants: true }], ngImport: i0, template: "<mat-list [formGroup]=\"formGroup\">\n <mat-list-item>\n <mat-form-field [appearance]=\"appearance\" niceControlStatus floatLabel=\"always\">\n <mat-label>{{ \"nice_ui_kit.stripe.name_on_card.label\" | translate}}</mat-label>\n <input [placeholder]=\"'nice_ui_kit.stripe.name_on_card.placeholder' | translate\" matInput type=\"text\"\n formControlName=\"name\" required/>\n <div matPrefix class=\"pr-2\" *ngIf=\"showIcons\">\n <i class=\"fad fa-user-circle text-accent form-icons\"></i>\n </div>\n </mat-form-field>\n </mat-list-item>\n <mat-list-item>\n <div fxLayout=\"column\" class=\"w-full\">\n <div fxLayout=\"row\">\n <mat-form-field fxFlex=\"100\" [appearance]=\"appearance\" floatLabel=\"always\">\n <mat-label>{{ \"nice_ui_kit.stripe.card_number.label\" | translate}}</mat-label>\n <div matPrefix class=\"pr-2\" *ngIf=\"showIcons\">\n <i class=\"fad fa-credit-card text-accent form-icons\"></i>\n </div>\n <nice-stripe-card-element [placeholder]=\"'nice_ui_kit.stripe.card_number.placeholder' | translate\"\n #cardNumber required></nice-stripe-card-element>\n <mat-error [@slideInBottom] *ngIf=\"cardNumberError\">{{ cardNumberError }}</mat-error>\n </mat-form-field>\n </div>\n <div fxLayout=\"row\" fxLayoutGap=\"15px\">\n <mat-form-field fxFlex=\"50\" fxFlex.lt-md=\"48\" [appearance]=\"appearance\" floatLabel=\"always\">\n <mat-label>{{ \"nice_ui_kit.stripe.expiration.label\" | translate}}</mat-label>\n <nice-stripe-card-element [placeholder]=\"'nice_ui_kit.stripe.expiration.placeholder' | translate\"\n #cardExpiry required></nice-stripe-card-element>\n <mat-error [@slideInBottom] *ngIf=\"cardExpiryError\">{{ cardExpiryError }}</mat-error>\n </mat-form-field>\n <mat-form-field fxFlex=\"50\" fxFlex.lt-md=\"48\" [appearance]=\"appearance\" floatLabel=\"always\">\n <mat-label>{{ \"nice_ui_kit.stripe.cvc.label\" | translate}}</mat-label>\n <nice-stripe-card-element [placeholder]=\"'nice_ui_kit.stripe.cvc.placeholder' | translate\" #cardCvc\n required></nice-stripe-card-element>\n <mat-error [@slideInBottom] *ngIf=\"cardCvcError\">{{ cardCvcError }}</mat-error>\n </mat-form-field>\n </div>\n </div>\n </mat-list-item>\n</mat-list>\n", styles: ["nice-stripe-card-form mat-list-item{height:auto!important}nice-stripe-card-form .form-icons{font-size:24px!important;width:24px!important;height:24px!important;line-height:24px!important}\n"], components: [{ type: i4.MatList, selector: "mat-list, mat-action-list", inputs: ["disableRipple", "disabled"], exportAs: ["matList"] }, { type: i4.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["disableRipple", "disabled"], exportAs: ["matListItem"] }, { type: i5.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { type: NiceStripeCardElementComponent, selector: "nice-stripe-card-element", inputs: ["placeholder", "focused", "required", "disabled"] }], directives: [{ type: i7.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i7.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i8.NiceControlStatusDirective, selector: "[niceControlStatus]" }, { type: i5.MatLabel, selector: "mat-label" }, { type: i9.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { type: i7.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i7.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i7.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.MatPrefix, selector: "[matPrefix]" }, { type: i11.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i11.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i5.MatError, selector: "mat-error", inputs: ["id"] }, { type: i11.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }], pipes: { "translate": i3.TranslatePipe }, animations: niceAnimations, encapsulation: i0.ViewEncapsulation.None });
|
|
255
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NiceStripeCardFormComponent, decorators: [{
|
|
260
256
|
type: Component,
|
|
261
|
-
args: [{
|
|
262
|
-
selector: "nice-stripe-card-form",
|
|
263
|
-
templateUrl: "stripe-card-form.template.html",
|
|
264
|
-
styleUrls: ["stripe-card-form.style.scss"],
|
|
265
|
-
encapsulation: ViewEncapsulation.None,
|
|
266
|
-
providers: [
|
|
257
|
+
args: [{ selector: "nice-stripe-card-form", encapsulation: ViewEncapsulation.None, providers: [
|
|
267
258
|
{
|
|
268
259
|
provide: GeneratedFormGroup,
|
|
269
260
|
useFactory: ngxFormGeneratorFactory(StripeForm)
|
|
270
261
|
}
|
|
271
|
-
],
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
262
|
+
], animations: niceAnimations, template: "<mat-list [formGroup]=\"formGroup\">\n <mat-list-item>\n <mat-form-field [appearance]=\"appearance\" niceControlStatus floatLabel=\"always\">\n <mat-label>{{ \"nice_ui_kit.stripe.name_on_card.label\" | translate}}</mat-label>\n <input [placeholder]=\"'nice_ui_kit.stripe.name_on_card.placeholder' | translate\" matInput type=\"text\"\n formControlName=\"name\" required/>\n <div matPrefix class=\"pr-2\" *ngIf=\"showIcons\">\n <i class=\"fad fa-user-circle text-accent form-icons\"></i>\n </div>\n </mat-form-field>\n </mat-list-item>\n <mat-list-item>\n <div fxLayout=\"column\" class=\"w-full\">\n <div fxLayout=\"row\">\n <mat-form-field fxFlex=\"100\" [appearance]=\"appearance\" floatLabel=\"always\">\n <mat-label>{{ \"nice_ui_kit.stripe.card_number.label\" | translate}}</mat-label>\n <div matPrefix class=\"pr-2\" *ngIf=\"showIcons\">\n <i class=\"fad fa-credit-card text-accent form-icons\"></i>\n </div>\n <nice-stripe-card-element [placeholder]=\"'nice_ui_kit.stripe.card_number.placeholder' | translate\"\n #cardNumber required></nice-stripe-card-element>\n <mat-error [@slideInBottom] *ngIf=\"cardNumberError\">{{ cardNumberError }}</mat-error>\n </mat-form-field>\n </div>\n <div fxLayout=\"row\" fxLayoutGap=\"15px\">\n <mat-form-field fxFlex=\"50\" fxFlex.lt-md=\"48\" [appearance]=\"appearance\" floatLabel=\"always\">\n <mat-label>{{ \"nice_ui_kit.stripe.expiration.label\" | translate}}</mat-label>\n <nice-stripe-card-element [placeholder]=\"'nice_ui_kit.stripe.expiration.placeholder' | translate\"\n #cardExpiry required></nice-stripe-card-element>\n <mat-error [@slideInBottom] *ngIf=\"cardExpiryError\">{{ cardExpiryError }}</mat-error>\n </mat-form-field>\n <mat-form-field fxFlex=\"50\" fxFlex.lt-md=\"48\" [appearance]=\"appearance\" floatLabel=\"always\">\n <mat-label>{{ \"nice_ui_kit.stripe.cvc.label\" | translate}}</mat-label>\n <nice-stripe-card-element [placeholder]=\"'nice_ui_kit.stripe.cvc.placeholder' | translate\" #cardCvc\n required></nice-stripe-card-element>\n <mat-error [@slideInBottom] *ngIf=\"cardCvcError\">{{ cardCvcError }}</mat-error>\n </mat-form-field>\n </div>\n </div>\n </mat-list-item>\n</mat-list>\n", styles: ["nice-stripe-card-form mat-list-item{height:auto!important}nice-stripe-card-form .form-icons{font-size:24px!important;width:24px!important;height:24px!important;line-height:24px!important}\n"] }]
|
|
263
|
+
}], ctorParameters: function () {
|
|
264
|
+
return [{ type: undefined, decorators: [{
|
|
265
|
+
type: Optional
|
|
266
|
+
}, {
|
|
267
|
+
type: Inject,
|
|
268
|
+
args: [NICE_STRIPE_OPTIONS]
|
|
269
|
+
}] }, { type: i1.GeneratedFormGroup }, { type: i2.StripeService }, { type: i3.TranslateService }];
|
|
270
|
+
}, propDecorators: { appearance: [{
|
|
280
271
|
type: Input
|
|
281
272
|
}], showIcons: [{
|
|
282
273
|
type: Input
|
|
@@ -304,8 +295,8 @@ class NiceStripeModule {
|
|
|
304
295
|
};
|
|
305
296
|
}
|
|
306
297
|
}
|
|
307
|
-
NiceStripeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
308
|
-
NiceStripeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
298
|
+
NiceStripeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NiceStripeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
299
|
+
NiceStripeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NiceStripeModule, declarations: [NiceStripeCardElementComponent,
|
|
309
300
|
NiceStripeCardFormComponent], imports: [FlexModule,
|
|
310
301
|
NgxStripeModule,
|
|
311
302
|
ReactiveFormsModule,
|
|
@@ -317,7 +308,7 @@ NiceStripeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versio
|
|
|
317
308
|
MatButtonModule,
|
|
318
309
|
CommonModule,
|
|
319
310
|
ExtendedModule], exports: [NiceStripeCardFormComponent] });
|
|
320
|
-
NiceStripeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
311
|
+
NiceStripeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NiceStripeModule, imports: [[
|
|
321
312
|
FlexModule,
|
|
322
313
|
NgxStripeModule,
|
|
323
314
|
ReactiveFormsModule,
|
|
@@ -330,7 +321,7 @@ NiceStripeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", versio
|
|
|
330
321
|
CommonModule,
|
|
331
322
|
ExtendedModule
|
|
332
323
|
]] });
|
|
333
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
324
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NiceStripeModule, decorators: [{
|
|
334
325
|
type: NgModule,
|
|
335
326
|
args: [{
|
|
336
327
|
imports: [
|
|
@@ -365,4 +356,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImpor
|
|
|
365
356
|
*/
|
|
366
357
|
|
|
367
358
|
export { NiceStripeCardElementComponent, NiceStripeCardFormComponent, NiceStripeModule };
|
|
368
|
-
//# sourceMappingURL=recursyve-nice-stripe-kit.v2.
|
|
359
|
+
//# sourceMappingURL=recursyve-nice-stripe-kit.v2.mjs.map
|