@recursyve/nice-stripe-kit.v2 15.0.0-beta.6 → 17.0.0-beta.8

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.
@@ -1,355 +0,0 @@
1
- import * as i9 from '@angular/common';
2
- import { CommonModule } from '@angular/common';
3
- import * as i0 from '@angular/core';
4
- import { Component, ViewEncapsulation, Optional, Self, ViewChild, HostBinding, Input, InjectionToken, Inject, NgModule } from '@angular/core';
5
- import * as i4 from '@angular/forms';
6
- import { ReactiveFormsModule } from '@angular/forms';
7
- import { MatButtonModule } from '@angular/material/button';
8
- import * as i5 from '@angular/material/form-field';
9
- import { MatFormFieldControl, MatFormFieldModule } from '@angular/material/form-field';
10
- import * as i6 from '@angular/material/input';
11
- import { MatInputModule } from '@angular/material/input';
12
- import * as i7 from '@angular/material/list';
13
- import { MatListModule } from '@angular/material/list';
14
- import * as i3 from '@ngx-translate/core';
15
- import { TranslateModule } from '@ngx-translate/core';
16
- import * as i8 from '@recursyve/nice-ui-kit.v2';
17
- import { niceAnimations, NiceFormErrorModule } from '@recursyve/nice-ui-kit.v2';
18
- import * as i2 from 'ngx-stripe';
19
- import { NgxStripeModule } from 'ngx-stripe';
20
- import { __awaiter, __decorate, __metadata } from 'tslib';
21
- import { coerceBooleanProperty } from '@angular/cdk/coercion';
22
- import { Subject, lastValueFrom } from 'rxjs';
23
- import { v4 } from 'uuid';
24
- import * as i1 from '@recursyve/ngx-form-generator';
25
- import { Control, Required, GeneratedFormGroup, ngxFormGeneratorFactory } from '@recursyve/ngx-form-generator';
26
- import { map } from 'rxjs/operators';
27
-
28
- class NiceStripeCardElementComponent {
29
- set placeholder(placeholder) {
30
- this._placeholder = placeholder;
31
- this.stateChanges.next();
32
- }
33
- get placeholder() {
34
- return this._placeholder;
35
- }
36
- set focused(focused) {
37
- this._focused = focused;
38
- this.stateChanges.next();
39
- }
40
- get focused() {
41
- return this._focused;
42
- }
43
- get required() {
44
- return this._required;
45
- }
46
- set required(req) {
47
- this._required = coerceBooleanProperty(req);
48
- this.stateChanges.next();
49
- }
50
- get disabled() {
51
- return this._disabled;
52
- }
53
- set disabled(value) {
54
- this._disabled = coerceBooleanProperty(value);
55
- this.stateChanges.next();
56
- }
57
- get shouldLabelFloat() {
58
- return this.focused || !this.empty;
59
- }
60
- setDescribedByIds(ids) {
61
- this.describedBy = ids.join(" ");
62
- }
63
- constructor(ngControl) {
64
- this.ngControl = ngControl;
65
- this._focused = false;
66
- this._required = false;
67
- this._disabled = false;
68
- this.stateChanges = new Subject();
69
- this.empty = true;
70
- this.errorState = false;
71
- this.complete = false;
72
- this.describedBy = "";
73
- this.id = v4();
74
- }
75
- ngAfterViewInit() {
76
- return __awaiter(this, void 0, void 0, function* () {
77
- if (this.elementRef) {
78
- this.empty = !this.value;
79
- }
80
- });
81
- }
82
- init(element) {
83
- return __awaiter(this, void 0, void 0, function* () {
84
- this.element = element;
85
- this.element.mount(this.elementRef.nativeElement);
86
- this.stateChanges.next();
87
- this.element.update({
88
- placeholder: this.placeholder
89
- });
90
- this.element.on("blur", () => {
91
- this.focused = false;
92
- if (this.empty && this._required) {
93
- this.errorState = true;
94
- }
95
- });
96
- this.element.on("focus", () => {
97
- this.focused = true;
98
- });
99
- this.element.on("change", event => {
100
- this.empty = event.empty;
101
- this.errorState = !!event.error;
102
- this.complete = event.complete;
103
- this.stateChanges.next();
104
- });
105
- });
106
- }
107
- markAsTouched() {
108
- this.errorState = !!this.empty;
109
- this.stateChanges.next();
110
- }
111
- onContainerClick(event) {
112
- }
113
- }
114
- NiceStripeCardElementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NiceStripeCardElementComponent, deps: [{ token: i4.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
115
- NiceStripeCardElementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", 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: [
116
- {
117
- provide: MatFormFieldControl,
118
- useExisting: NiceStripeCardElementComponent
119
- }
120
- ], 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 });
121
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NiceStripeCardElementComponent, decorators: [{
122
- type: Component,
123
- args: [{ selector: "nice-stripe-card-element", template: "<div class='stripe-element' #element></div>", encapsulation: ViewEncapsulation.None, providers: [
124
- {
125
- provide: MatFormFieldControl,
126
- useExisting: NiceStripeCardElementComponent
127
- }
128
- ], styles: ["nice-stripe-card-element .stripe-element{height:15px}\n"] }]
129
- }], ctorParameters: function () {
130
- return [{ type: i4.NgControl, decorators: [{
131
- type: Optional
132
- }, {
133
- type: Self
134
- }] }];
135
- }, propDecorators: { elementRef: [{
136
- type: ViewChild,
137
- args: ["element"]
138
- }], describedBy: [{
139
- type: HostBinding,
140
- args: ["attr.aria-describedby"]
141
- }], id: [{
142
- type: HostBinding
143
- }], placeholder: [{
144
- type: Input
145
- }], focused: [{
146
- type: Input
147
- }], required: [{
148
- type: Input
149
- }], disabled: [{
150
- type: Input
151
- }], shouldLabelFloat: [{
152
- type: HostBinding,
153
- args: ["class.floating"]
154
- }] } });
155
-
156
- const NICE_STRIPE_OPTIONS = new InjectionToken("nice_stripe_options");
157
-
158
- class StripeForm {
159
- }
160
- __decorate([
161
- Control(),
162
- Required(),
163
- __metadata("design:type", String)
164
- ], StripeForm.prototype, "name", void 0);
165
-
166
- class NiceStripeCardFormComponent {
167
- get isValid() {
168
- return this.cardNumberInput.complete &&
169
- this.cardExpiryInput.complete &&
170
- this.cardCvcInput.complete &&
171
- this.formGroup.valid;
172
- }
173
- get cardToken() {
174
- if (!this.isValid) {
175
- return null;
176
- }
177
- return this.stripeService.createToken(this.cardNumberElement, {
178
- name: this.formGroup.get("name").value
179
- }).pipe(map(x => { var _a; return (_a = x === null || x === void 0 ? void 0 : x.token) === null || _a === void 0 ? void 0 : _a.id; })).toPromise();
180
- }
181
- constructor(options, formGroup, stripeService, translateService) {
182
- this.options = options;
183
- this.formGroup = formGroup;
184
- this.stripeService = stripeService;
185
- this.translateService = translateService;
186
- this.showIcons = false;
187
- }
188
- ngOnInit() {
189
- var _a, _b;
190
- return __awaiter(this, void 0, void 0, function* () {
191
- this.stripeOptions = {
192
- placeholder: "",
193
- style: {
194
- base: this.options.styling
195
- }
196
- };
197
- this.elements = yield lastValueFrom(this.stripeService.elements({
198
- locale: this.translateService.currentLang,
199
- fonts: (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.fonts) !== null && _b !== void 0 ? _b : []
200
- }));
201
- this.initCardNumber();
202
- this.initCardExpiry();
203
- this.initCardCvc();
204
- });
205
- }
206
- initCardNumber() {
207
- this.cardNumberElement = this.elements.create("cardNumber", Object.assign({}, this.stripeOptions));
208
- this.cardNumberElement.on("change", event => {
209
- this.cardNumberError = event.error ? event.error.message : null;
210
- });
211
- this.cardNumberInput.init(this.cardNumberElement);
212
- }
213
- initCardExpiry() {
214
- this.cardExpiryElement = this.elements.create("cardExpiry", Object.assign({}, this.stripeOptions));
215
- this.cardExpiryElement.on("change", event => {
216
- this.cardExpiryError = event.error ? event.error.message : null;
217
- });
218
- this.cardExpiryInput.init(this.cardExpiryElement);
219
- }
220
- initCardCvc() {
221
- this.cardCvcElement = this.elements.create("cardCvc", Object.assign({}, this.stripeOptions));
222
- this.cardCvcElement.on("change", event => {
223
- this.cardCvcError = event.error ? event.error.message : null;
224
- });
225
- this.cardCvcInput.init(this.cardCvcElement);
226
- }
227
- ngOnDestroy() {
228
- if (this.cardNumberElement) {
229
- this.cardNumberElement.unmount();
230
- }
231
- if (this.cardExpiryElement) {
232
- this.cardExpiryElement.unmount();
233
- }
234
- if (this.cardCvcElement) {
235
- this.cardCvcElement.unmount();
236
- }
237
- }
238
- patchName(name) {
239
- this.formGroup.get("name").patchValue(name);
240
- }
241
- markAllAsTouched() {
242
- this.formGroup.markAllAsTouched();
243
- this.cardCvcInput.markAsTouched();
244
- this.cardNumberInput.markAsTouched();
245
- this.cardExpiryInput.markAsTouched();
246
- }
247
- getYear() {
248
- const date = new Date();
249
- return +date.getFullYear().toString().substr(-2);
250
- }
251
- }
252
- NiceStripeCardFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NiceStripeCardFormComponent, deps: [{ token: NICE_STRIPE_OPTIONS, optional: true }, { token: i1.GeneratedFormGroup }, { token: i2.StripeService }, { token: i3.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
253
- NiceStripeCardFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: NiceStripeCardFormComponent, selector: "nice-stripe-card-form", inputs: { appearance: "appearance", showIcons: "showIcons" }, providers: [
254
- {
255
- provide: GeneratedFormGroup,
256
- useFactory: ngxFormGeneratorFactory(StripeForm)
257
- }
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=\"pl-2\" *ngIf=\"showIcons\">\n <i class=\"fad fa-user-circle accent-fg\"></i>\n </div>\n </mat-form-field>\n </mat-list-item>\n <mat-list-item>\n <div class=\"flex flex-col w-full\">\n <div class=\"flex flex-row\">\n <mat-form-field class=\"flex-full max-w-full\" [appearance]=\"appearance\" floatLabel=\"always\">\n <mat-label>{{ \"nice_ui_kit.stripe.card_number.label\" | translate }}</mat-label>\n <div matPrefix class=\"pl-2\" *ngIf=\"showIcons\">\n <i class=\"fad fa-credit-card accent-fg\"></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 class=\"flex flex-row gap-4\">\n <mat-form-field class=\"flex flex-full max-w-1/2\" [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 class=\"flex flex-full max-w-1/2\" [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"], dependencies: [{ kind: "directive", type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i4.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i5.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5.MatLabel, selector: "mat-label" }, { kind: "directive", type: i5.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i5.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i6.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i7.MatList, selector: "mat-list", exportAs: ["matList"] }, { kind: "component", type: i7.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "directive", type: i8.NiceControlStatusDirective, selector: "[niceControlStatus]" }, { kind: "directive", type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: NiceStripeCardElementComponent, selector: "nice-stripe-card-element", inputs: ["placeholder", "focused", "required", "disabled"] }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], animations: niceAnimations, encapsulation: i0.ViewEncapsulation.None });
259
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NiceStripeCardFormComponent, decorators: [{
260
- type: Component,
261
- args: [{ selector: "nice-stripe-card-form", encapsulation: ViewEncapsulation.None, providers: [
262
- {
263
- provide: GeneratedFormGroup,
264
- useFactory: ngxFormGeneratorFactory(StripeForm)
265
- }
266
- ], 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=\"pl-2\" *ngIf=\"showIcons\">\n <i class=\"fad fa-user-circle accent-fg\"></i>\n </div>\n </mat-form-field>\n </mat-list-item>\n <mat-list-item>\n <div class=\"flex flex-col w-full\">\n <div class=\"flex flex-row\">\n <mat-form-field class=\"flex-full max-w-full\" [appearance]=\"appearance\" floatLabel=\"always\">\n <mat-label>{{ \"nice_ui_kit.stripe.card_number.label\" | translate }}</mat-label>\n <div matPrefix class=\"pl-2\" *ngIf=\"showIcons\">\n <i class=\"fad fa-credit-card accent-fg\"></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 class=\"flex flex-row gap-4\">\n <mat-form-field class=\"flex flex-full max-w-1/2\" [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 class=\"flex flex-full max-w-1/2\" [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"] }]
267
- }], ctorParameters: function () {
268
- return [{ type: undefined, decorators: [{
269
- type: Optional
270
- }, {
271
- type: Inject,
272
- args: [NICE_STRIPE_OPTIONS]
273
- }] }, { type: i1.GeneratedFormGroup }, { type: i2.StripeService }, { type: i3.TranslateService }];
274
- }, propDecorators: { appearance: [{
275
- type: Input
276
- }], showIcons: [{
277
- type: Input
278
- }], cardNumberInput: [{
279
- type: ViewChild,
280
- args: ["cardNumber"]
281
- }], cardExpiryInput: [{
282
- type: ViewChild,
283
- args: ["cardExpiry"]
284
- }], cardCvcInput: [{
285
- type: ViewChild,
286
- args: ["cardCvc"]
287
- }] } });
288
-
289
- class NiceStripeModule {
290
- static forRoot(options) {
291
- return {
292
- ngModule: NiceStripeModule,
293
- providers: [
294
- {
295
- provide: NICE_STRIPE_OPTIONS,
296
- useValue: options
297
- }
298
- ]
299
- };
300
- }
301
- }
302
- NiceStripeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NiceStripeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
303
- NiceStripeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: NiceStripeModule, declarations: [NiceStripeCardElementComponent,
304
- NiceStripeCardFormComponent], imports: [NgxStripeModule,
305
- ReactiveFormsModule,
306
- TranslateModule,
307
- MatFormFieldModule,
308
- MatInputModule,
309
- MatListModule,
310
- NiceFormErrorModule,
311
- MatButtonModule,
312
- CommonModule], exports: [NiceStripeCardFormComponent] });
313
- NiceStripeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NiceStripeModule, imports: [NgxStripeModule,
314
- ReactiveFormsModule,
315
- TranslateModule,
316
- MatFormFieldModule,
317
- MatInputModule,
318
- MatListModule,
319
- NiceFormErrorModule,
320
- MatButtonModule,
321
- CommonModule] });
322
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NiceStripeModule, decorators: [{
323
- type: NgModule,
324
- args: [{
325
- imports: [
326
- NgxStripeModule,
327
- ReactiveFormsModule,
328
- TranslateModule,
329
- MatFormFieldModule,
330
- MatInputModule,
331
- MatListModule,
332
- NiceFormErrorModule,
333
- MatButtonModule,
334
- CommonModule
335
- ],
336
- declarations: [
337
- NiceStripeCardElementComponent,
338
- NiceStripeCardFormComponent
339
- ],
340
- exports: [
341
- NiceStripeCardFormComponent
342
- ]
343
- }]
344
- }] });
345
-
346
- /*
347
- * Public API Surface of nice-stripe-kit
348
- */
349
-
350
- /**
351
- * Generated bundle index. Do not edit.
352
- */
353
-
354
- export { NiceStripeCardElementComponent, NiceStripeCardFormComponent, NiceStripeModule };
355
- //# sourceMappingURL=recursyve-nice-stripe-kit.v2.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"recursyve-nice-stripe-kit.v2.mjs","sources":["../../../projects/nice-stripe-kit-v2/src/lib/components/card-element/stripe-card-element.component.ts","../../../projects/nice-stripe-kit-v2/src/lib/nice-stripe-kit.constant.ts","../../../projects/nice-stripe-kit-v2/src/lib/components/card-form/stripe-card-form.form.ts","../../../projects/nice-stripe-kit-v2/src/lib/components/card-form/stripe-card-form.component.ts","../../../projects/nice-stripe-kit-v2/src/lib/components/card-form/stripe-card-form.template.html","../../../projects/nice-stripe-kit-v2/src/lib/nice-stripe-kit.module.ts","../../../projects/nice-stripe-kit-v2/src/public-api.ts","../../../projects/nice-stripe-kit-v2/src/recursyve-nice-stripe-kit.v2.ts"],"sourcesContent":["import { coerceBooleanProperty } from \"@angular/cdk/coercion\";\nimport {\n AfterViewInit,\n Component,\n ElementRef,\n HostBinding,\n Input,\n Optional,\n Self,\n ViewChild,\n ViewEncapsulation\n} from \"@angular/core\";\nimport { NgControl } from \"@angular/forms\";\nimport { MatFormFieldControl } from \"@angular/material/form-field\";\nimport { StripeCardCvcElement, StripeCardExpiryElement, StripeCardNumberElement } from \"@stripe/stripe-js\";\nimport { Subject } from \"rxjs\";\nimport { v4 as uuidv4 } from \"uuid\";\n\n@Component({\n selector: \"nice-stripe-card-element\",\n template: \"<div class='stripe-element' #element></div>\",\n styleUrls: [\"./stripe-card-element.style.scss\"],\n encapsulation: ViewEncapsulation.None,\n providers: [\n {\n provide: MatFormFieldControl,\n useExisting: NiceStripeCardElementComponent\n }\n ]\n})\nexport class NiceStripeCardElementComponent implements AfterViewInit, MatFormFieldControl<string> {\n private _placeholder: string;\n private _focused = false;\n private _required = false;\n private _disabled = false;\n\n @ViewChild(\"element\")\n private elementRef?: ElementRef;\n\n public element?: StripeCardNumberElement | StripeCardExpiryElement | StripeCardCvcElement;\n public value: string;\n public stateChanges = new Subject<void>();\n public empty = true;\n public errorState = false;\n public complete = false;\n\n @HostBinding(\"attr.aria-describedby\")\n public describedBy = \"\";\n\n @HostBinding()\n public id: string = uuidv4();\n\n @Input()\n public set placeholder(placeholder: string) {\n this._placeholder = placeholder;\n this.stateChanges.next();\n }\n\n public get placeholder() {\n return this._placeholder;\n }\n\n @Input()\n public set focused(focused: boolean) {\n this._focused = focused;\n this.stateChanges.next();\n }\n\n public get focused() {\n return this._focused;\n }\n\n @Input()\n public get required() {\n return this._required;\n }\n\n public set required(req) {\n this._required = coerceBooleanProperty(req);\n this.stateChanges.next();\n }\n\n @Input()\n public get disabled(): boolean {\n return this._disabled;\n }\n\n public set disabled(value: boolean) {\n this._disabled = coerceBooleanProperty(value);\n this.stateChanges.next();\n }\n\n @HostBinding(\"class.floating\")\n public get shouldLabelFloat() {\n return this.focused || !this.empty;\n }\n\n public setDescribedByIds(ids: string[]) {\n this.describedBy = ids.join(\" \");\n }\n\n constructor(@Optional() @Self() public ngControl: NgControl) {\n }\n\n public async ngAfterViewInit() {\n if (this.elementRef) {\n this.empty = !this.value;\n }\n }\n\n public async init(element: StripeCardNumberElement | StripeCardExpiryElement | StripeCardCvcElement) {\n this.element = element;\n this.element.mount(this.elementRef.nativeElement);\n this.stateChanges.next();\n\n this.element.update({\n placeholder: this.placeholder\n });\n\n (this.element as StripeCardNumberElement).on(\"blur\", () => {\n this.focused = false;\n if (this.empty && this._required) {\n this.errorState = true;\n }\n });\n (this.element as StripeCardNumberElement).on(\"focus\", () => {\n this.focused = true;\n });\n\n (this.element as StripeCardNumberElement).on(\"change\", event => {\n this.empty = event.empty;\n this.errorState = !!event.error;\n this.complete = event.complete;\n this.stateChanges.next();\n });\n }\n\n public markAsTouched(): void {\n this.errorState = !!this.empty;\n this.stateChanges.next();\n }\n\n public onContainerClick(event: MouseEvent): void {\n }\n}\n","import { InjectionToken } from \"@angular/core\";\n\nexport const NICE_STRIPE_OPTIONS = new InjectionToken(\"nice_stripe_options\");\n","import { Control, Required } from \"@recursyve/ngx-form-generator\";\n\nexport class StripeForm {\n @Control()\n @Required()\n public name: string;\n}\n","import { Component, Inject, Input, OnDestroy, OnInit, Optional, ViewChild, ViewEncapsulation } from \"@angular/core\";\nimport { MatFormFieldAppearance } from \"@angular/material/form-field\";\nimport { TranslateService } from \"@ngx-translate/core\";\nimport { GeneratedFormGroup, ngxFormGeneratorFactory } from \"@recursyve/ngx-form-generator\";\nimport { niceAnimations } from \"@recursyve/nice-ui-kit.v2\";\nimport {\n StripeCardCvcElement,\n StripeCardExpiryElement,\n StripeCardNumberElement,\n StripeCardNumberElementOptions,\n StripeElements\n} from \"@stripe/stripe-js\";\nimport { StripeService } from \"ngx-stripe\";\nimport { lastValueFrom } from \"rxjs\";\nimport { map } from \"rxjs/operators\";\nimport { NICE_STRIPE_OPTIONS } from \"../../nice-stripe-kit.constant\";\nimport { NiceStripeKitOptions } from \"../../nice-stripe-kit.options\";\nimport { NiceStripeCardElementComponent } from \"../card-element/stripe-card-element.component\";\nimport { StripeForm } from \"./stripe-card-form.form\";\n\n@Component({\n selector: \"nice-stripe-card-form\",\n templateUrl: \"stripe-card-form.template.html\",\n styleUrls: [\"stripe-card-form.style.scss\"],\n encapsulation: ViewEncapsulation.None,\n providers: [\n {\n provide: GeneratedFormGroup,\n useFactory: ngxFormGeneratorFactory(StripeForm)\n }\n ],\n animations: niceAnimations\n})\nexport class NiceStripeCardFormComponent implements OnInit, OnDestroy {\n @Input()\n public appearance: MatFormFieldAppearance;\n\n @Input()\n public showIcons = false;\n\n @ViewChild(\"cardNumber\")\n public cardNumberInput: NiceStripeCardElementComponent;\n\n @ViewChild(\"cardExpiry\")\n public cardExpiryInput: NiceStripeCardElementComponent;\n\n @ViewChild(\"cardCvc\")\n public cardCvcInput: NiceStripeCardElementComponent;\n\n public cardNumberElement: StripeCardNumberElement;\n public cardNumberError: string;\n public cardExpiryElement: StripeCardExpiryElement;\n public cardExpiryError: string;\n public cardCvcElement: StripeCardCvcElement;\n public cardCvcError: string;\n\n public stripeOptions: StripeCardNumberElementOptions;\n\n private elements: StripeElements;\n\n public get isValid(): boolean {\n return this.cardNumberInput.complete &&\n this.cardExpiryInput.complete &&\n this.cardCvcInput.complete &&\n this.formGroup.valid;\n }\n\n public get cardToken(): Promise<string> {\n if (!this.isValid) {\n return null;\n }\n\n return this.stripeService.createToken(this.cardNumberElement, {\n name: this.formGroup.get(\"name\").value\n }).pipe(\n map(x => x?.token?.id)\n ).toPromise();\n }\n\n constructor(\n @Optional() @Inject(NICE_STRIPE_OPTIONS) public options: NiceStripeKitOptions,\n public formGroup: GeneratedFormGroup<StripeForm>,\n private stripeService: StripeService,\n private translateService: TranslateService\n ) {\n }\n\n public async ngOnInit(): Promise<void> {\n this.stripeOptions = {\n placeholder: \"\",\n style: {\n base: this.options.styling\n }\n };\n\n this.elements = await lastValueFrom(\n this.stripeService.elements({\n locale: this.translateService.currentLang as any,\n fonts: this.options?.fonts ?? []\n })\n );\n\n this.initCardNumber();\n this.initCardExpiry();\n this.initCardCvc();\n }\n\n public initCardNumber() {\n this.cardNumberElement = this.elements.create(\"cardNumber\", {\n ...this.stripeOptions,\n });\n this.cardNumberElement.on(\"change\", event => {\n this.cardNumberError = event.error ? event.error.message : null;\n });\n this.cardNumberInput.init(this.cardNumberElement);\n }\n\n public initCardExpiry() {\n this.cardExpiryElement = this.elements.create(\"cardExpiry\", {\n ...this.stripeOptions,\n });\n this.cardExpiryElement.on(\"change\", event => {\n this.cardExpiryError = event.error ? event.error.message : null;\n });\n this.cardExpiryInput.init(this.cardExpiryElement);\n }\n\n public initCardCvc() {\n this.cardCvcElement = this.elements.create(\"cardCvc\", {\n ...this.stripeOptions,\n });\n this.cardCvcElement.on(\"change\", event => {\n this.cardCvcError = event.error ? event.error.message : null;\n });\n this.cardCvcInput.init(this.cardCvcElement);\n }\n\n public ngOnDestroy(): void {\n if (this.cardNumberElement) {\n this.cardNumberElement.unmount();\n }\n\n if (this.cardExpiryElement) {\n this.cardExpiryElement.unmount();\n }\n\n if (this.cardCvcElement) {\n this.cardCvcElement.unmount();\n }\n }\n\n public patchName(name: string) {\n this.formGroup.get(\"name\").patchValue(name);\n }\n\n public markAllAsTouched(): void {\n this.formGroup.markAllAsTouched();\n this.cardCvcInput.markAsTouched();\n this.cardNumberInput.markAsTouched();\n this.cardExpiryInput.markAsTouched();\n }\n\n private getYear(): number {\n const date = new Date();\n return +date.getFullYear().toString().substr(-2);\n }\n}\n","<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=\"pl-2\" *ngIf=\"showIcons\">\n <i class=\"fad fa-user-circle accent-fg\"></i>\n </div>\n </mat-form-field>\n </mat-list-item>\n <mat-list-item>\n <div class=\"flex flex-col w-full\">\n <div class=\"flex flex-row\">\n <mat-form-field class=\"flex-full max-w-full\" [appearance]=\"appearance\" floatLabel=\"always\">\n <mat-label>{{ \"nice_ui_kit.stripe.card_number.label\" | translate }}</mat-label>\n <div matPrefix class=\"pl-2\" *ngIf=\"showIcons\">\n <i class=\"fad fa-credit-card accent-fg\"></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 class=\"flex flex-row gap-4\">\n <mat-form-field class=\"flex flex-full max-w-1/2\" [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 class=\"flex flex-full max-w-1/2\" [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","import { CommonModule } from \"@angular/common\";\nimport { ModuleWithProviders, NgModule } from \"@angular/core\";\nimport { ReactiveFormsModule } from \"@angular/forms\";\nimport { MatButtonModule } from \"@angular/material/button\";\nimport { MatFormFieldModule } from \"@angular/material/form-field\";\nimport { MatInputModule } from \"@angular/material/input\";\nimport { MatListModule } from \"@angular/material/list\";\nimport { TranslateModule } from \"@ngx-translate/core\";\nimport { NiceFormErrorModule } from \"@recursyve/nice-ui-kit.v2\";\nimport { NgxStripeModule } from \"ngx-stripe\";\nimport { NiceStripeCardElementComponent } from \"./components/card-element/stripe-card-element.component\";\nimport { NiceStripeCardFormComponent } from \"./components/card-form/stripe-card-form.component\";\nimport { NICE_STRIPE_OPTIONS } from \"./nice-stripe-kit.constant\";\nimport { NiceStripeKitOptions } from \"./nice-stripe-kit.options\";\n\n@NgModule({\n imports: [\n NgxStripeModule,\n ReactiveFormsModule,\n TranslateModule,\n\n MatFormFieldModule,\n MatInputModule,\n MatListModule,\n NiceFormErrorModule,\n MatButtonModule,\n CommonModule\n ],\n declarations: [\n NiceStripeCardElementComponent,\n NiceStripeCardFormComponent\n ],\n exports: [\n NiceStripeCardFormComponent\n ]\n})\nexport class NiceStripeModule {\n public static forRoot(options?: NiceStripeKitOptions): ModuleWithProviders<NiceStripeModule> {\n return {\n ngModule: NiceStripeModule,\n providers: [\n {\n provide: NICE_STRIPE_OPTIONS,\n useValue: options\n }\n ]\n };\n }\n}\n","/*\n * Public API Surface of nice-stripe-kit\n */\n\nexport * from \"./lib/nice-stripe-kit.module\";\nexport * from \"./lib/components/card-element/stripe-card-element.component\";\nexport * from \"./lib/components/card-form/stripe-card-form.component\";\n","/**\n * Generated b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