aeb-ui-kit 2.2.0-preview.525 → 2.2.0-preview.542

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.
@@ -3,7 +3,7 @@ import { Component, ViewEncapsulation, Input, ViewChild, NgModule, EventEmitter,
3
3
  import * as i1 from '@angular/common';
4
4
  import { CommonModule, DOCUMENT, formatDate, formatNumber } from '@angular/common';
5
5
  import * as i1$1 from '@angular/forms';
6
- import { NG_VALUE_ACCESSOR, FormControl, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
6
+ import { NG_VALUE_ACCESSOR, FormControl, Validators, FormsModule, ReactiveFormsModule, FormGroup, FormArray } from '@angular/forms';
7
7
  import * as i2 from '@angular/platform-browser';
8
8
  import * as i1$2 from 'ngx-mask';
9
9
  import { NgxMaskModule } from 'ngx-mask';
@@ -254,18 +254,44 @@ class CodeInputComponent {
254
254
  this.codeSet = new EventEmitter();
255
255
  this.timeOut = new EventEmitter();
256
256
  this.resendClick = new EventEmitter();
257
- this.inputs = ['', '', '', '', '', ''];
258
- this.isPaste = false;
259
257
  this.sendAgain = false;
260
- this.showLoader = false;
261
- this.wrongCode = false;
262
258
  this.showTimer = false;
263
- this.isDisabled = true;
264
259
  }
265
260
  get classes() {
266
261
  const mode = this.wrongCode ? 'input-wrong' : '';
267
262
  return `code-input__${mode}`;
268
263
  }
264
+ get inputs() {
265
+ return this.form.get('inputs');
266
+ }
267
+ ngOnInit() {
268
+ this.form = new FormGroup({
269
+ inputs: new FormArray([
270
+ new FormControl(),
271
+ new FormControl(),
272
+ new FormControl(),
273
+ new FormControl(),
274
+ new FormControl(),
275
+ new FormControl()
276
+ ])
277
+ });
278
+ for (let i = 0; i < this.inputs.length; i++) {
279
+ if (i > 0) {
280
+ this.inputs.get(`${i}`)?.disable();
281
+ }
282
+ }
283
+ }
284
+ writeValue(value) {
285
+ if (value) {
286
+ this.form.setValue(value, { emitEvent: false });
287
+ }
288
+ }
289
+ registerOnChange(fn) {
290
+ this.form.valueChanges.subscribe(fn);
291
+ }
292
+ registerOnTouched(fn) {
293
+ this.onTouch = fn;
294
+ }
269
295
  startTimer() {
270
296
  clearInterval(this.interval);
271
297
  this.time = this.secondsUntilRetry;
@@ -281,17 +307,14 @@ class CodeInputComponent {
281
307
  }
282
308
  }, 1000);
283
309
  }
284
- trackByInput(index) {
285
- return index;
286
- }
287
310
  onMove(e, i) {
288
- this.isPaste = true;
289
- const value = this.inputs[i];
311
+ const value = this.inputs.controls[i].value;
290
312
  if (value.length > 0) {
291
313
  const nextIndex = i < 5 ? i + 1 : 5;
292
314
  const nextInput = document.getElementById(`${nextIndex}`);
293
315
  if (nextIndex <= 5) {
294
316
  nextInput.disabled = false;
317
+ this.inputs.get(`${i}`)?.enable();
295
318
  nextInput.focus();
296
319
  }
297
320
  }
@@ -309,10 +332,14 @@ class CodeInputComponent {
309
332
  }
310
333
  }
311
334
  onPaste(e) {
335
+ for (let i = 0; i < this.inputs.length; i++) {
336
+ this.inputs.get(`${i}`)?.enable();
337
+ }
312
338
  const data = e.clipboardData.getData('text');
313
339
  const slicedData = data.split('');
314
- for (const i of this.inputs.keys()) {
315
- this.inputs[i] = slicedData[i];
340
+ for (let i = 0; i < slicedData.length; i++) {
341
+ const input = this.inputs.controls[i];
342
+ input.setValue(slicedData[i]);
316
343
  }
317
344
  if (!isFinite(Number(data))) {
318
345
  this.clear();
@@ -323,14 +350,13 @@ class CodeInputComponent {
323
350
  }
324
351
  }
325
352
  onSubmit() {
326
- this.wrongCode = true;
327
353
  this.showTimer = true;
328
354
  this.startTimer();
329
355
  this.codeSet.emit();
330
356
  }
331
357
  clear() {
332
- for (const i of this.inputs.keys()) {
333
- this.inputs[i] = '';
358
+ for (const control of this.inputs.controls) {
359
+ control.setValue('');
334
360
  }
335
361
  }
336
362
  resend() {
@@ -350,16 +376,30 @@ class CodeInputComponent {
350
376
  }
351
377
  }
352
378
  CodeInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CodeInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
353
- CodeInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: CodeInputComponent, selector: "aeb-code-input", inputs: { title: "title", secondsUntilRetry: "secondsUntilRetry", tip: "tip" }, outputs: { codeSet: "codeSet", timeOut: "timeOut", resendClick: "resendClick" }, ngImport: i0, template: "<div class=\"code-input\">\n <h1>{{ title }}</h1>\n <span class=\"code-input__tip\">{{ tip }}</span>\n <div class=\"code-input__inputs\" *ngIf=\"!showLoader\" [ngClass]=\"classes\">\n <ng-container\n *ngFor=\"let input of inputs; let i = index; trackBy: trackByInput\"\n >\n <input\n [(ngModel)]=\"inputs[i]\"\n autocomplete=\"off\"\n (keypress)=\"numberOnly($event)\"\n (keyup)=\"onMove($event, i)\"\n (paste)=\"onPaste($event)\"\n value=\"input\"\n id=\"{{ i }}\"\n maxlength=\"1\"\n [disabled]=\"i === 0 ? false : true\"\n />\n </ng-container>\n </div>\n <div *ngIf=\"showLoader\" class=\"code-input__loader\">\n <svg\n width=\"48\"\n height=\"48\"\n viewBox=\"0 0 48 48\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M30.2101 27.1713L27.2663 30.0952L29.223 34.7905L34.9375 29.1148L30.2101 27.1713ZM26.1754 30.5423H22.0021L20.0454 35.2376H28.1148L26.1754 30.5423ZM30.6776 21.9428V26.0706L35.3877 28.0141V19.9994L30.6776 21.9428ZM20.8939 30.0952L17.9501 27.1713L13.24 29.1148L18.9544 34.7905L20.8939 30.0952ZM29.223 13.223L27.2663 17.9183L30.2101 20.8421L34.9375 18.8986L29.223 13.223ZM22.0021 17.4539H26.1754L28.1148 12.7758H20.0454L22.0021 17.4539ZM17.4999 26.0706V21.9428L12.7898 19.9994V28.0141L17.4999 26.0706ZM17.9501 20.8421L20.8939 17.9183L18.9544 13.223L13.24 18.8986L17.9501 20.8421ZM26.4005 29.5448L29.656 26.2942V21.7021L26.4005 18.4687H21.777L18.5042 21.7021V26.2942L21.777 29.5448H26.4005ZM18.9891 36.2352C16.2011 35.2154 12.7898 31.6463 11.7681 29.0804C10.7465 26.5145 10.7414 21.9428 11.7681 18.933C12.7948 15.9232 15.875 12.7758 18.9891 11.7611C22.1031 10.7463 26.5877 10.7463 29.1884 11.7611C31.7891 12.7758 35.896 16.9272 36.4094 18.933C36.9227 20.9389 37.431 26.5145 36.4094 29.0804C35.3877 31.6463 31.7213 35.2154 29.1884 36.2352C26.6556 37.2549 21.777 37.2549 18.9891 36.2352Z\"\n fill=\"url(#paint0_linear_8482_9268)\"\n />\n <path\n d=\"M20 4C10.871 5.85308 4 13.9241 4 23.5999C4 32.183 9.40666 39.5032 17 42.3407\"\n stroke=\"url(#paint1_linear_8482_9268)\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n />\n <path\n d=\"M28 43.1998C37.129 41.3467 44 33.2757 44 23.5999C44 14.6446 38.1142 7.06403 30 4.5155\"\n stroke=\"url(#paint2_linear_8482_9268)\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n />\n <defs>\n <linearGradient\n id=\"paint0_linear_8482_9268\"\n x1=\"24.9013\"\n y1=\"37\"\n x2=\"24.9013\"\n y2=\"11\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop stop-color=\"#00B8FF\" />\n <stop offset=\"1\" stop-color=\"#0079D6\" />\n </linearGradient>\n <linearGradient\n id=\"paint1_linear_8482_9268\"\n x1=\"12.5547\"\n y1=\"42.3407\"\n x2=\"12.5547\"\n y2=\"4\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop stop-color=\"#00B8FF\" />\n <stop offset=\"1\" stop-color=\"#0079D6\" />\n </linearGradient>\n <linearGradient\n id=\"paint2_linear_8482_9268\"\n x1=\"36.5547\"\n y1=\"43.1998\"\n x2=\"36.5547\"\n y2=\"4.5155\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop stop-color=\"#00B8FF\" />\n <stop offset=\"1\" stop-color=\"#0079D6\" />\n </linearGradient>\n </defs>\n </svg>\n </div>\n <div class=\"code-input__text\">\n <span *ngIf=\"wrongCode\" class=\"code-input__text-wrong\">\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043E\u0434</span>\n <div *ngIf=\"showTimer\">\n <span class=\"code-input__text-info\"\n >\u0417\u0430\u043F\u0440\u043E\u0441\u0438\u0442\u044C \u043F\u043E\u0432\u0442\u043E\u0440\u043D\u0443\u044E \u043E\u0442\u043F\u0440\u0430\u0432\u043A\u0443 \u043C\u043E\u0436\u043D\u043E \u0447\u0435\u0440\u0435\u0437\n </span>\n <span class=\"code-input__text-time\">{{ time }}</span>\n </div>\n <span *ngIf=\"sendAgain\" class=\"code-input__text-again\" (click)=\"resend()\"\n >\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u043A\u043E\u0434 \u043F\u043E\u0432\u0442\u043E\u0440\u043D\u043E</span\n >\n </div>\n</div>\n", styles: [".code-input{display:flex;flex-direction:column;align-items:center;width:632px;padding:48px;color:var(--darkblue);background-color:#fff}.code-input h1{width:-moz-fit-content;width:fit-content;margin:0 0 40px;font-size:24px}.code-input span{text-align:center}.code-input__tip{margin-bottom:40px}.code-input__inputs{display:flex;gap:16px}.code-input__inputs input{width:51px;height:56px;font-size:32px;text-align:center;border:solid 2px var(--gray);border-radius:10px;outline:none}.code-input__inputs input:focus{border:solid 2px var(--blue)}.code-input__inputs input:disabled{background-color:inherit}.code-input__input-wrong input{border:solid 2px var(--red)}.code-input__input-wrong input:focus{border:solid 2px var(--red)}.code-input__text{display:flex;flex-direction:column;margin-top:24px;font-size:16px;line-height:20px}.code-input__text-info{color:var(--gray)}.code-input__text-time{color:var(--blue)}.code-input__text-again{color:var(--blue);text-decoration:underline;cursor:pointer}.code-input__text-wrong{margin-bottom:8px;color:var(--red)}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.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: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
379
+ CodeInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: CodeInputComponent, selector: "aeb-code-input", inputs: { title: "title", secondsUntilRetry: "secondsUntilRetry", tip: "tip", wrongCode: "wrongCode" }, outputs: { codeSet: "codeSet", timeOut: "timeOut", resendClick: "resendClick" }, providers: [
380
+ {
381
+ provide: NG_VALUE_ACCESSOR,
382
+ useExisting: forwardRef(() => CodeInputComponent),
383
+ multi: true
384
+ }
385
+ ], ngImport: i0, template: "<div class=\"code-input\">\n <h1>{{ title }}</h1>\n <span class=\"code-input__tip\">{{ tip }}</span>\n <div class=\"code-input__inputs\"[ngClass]=\"classes\">\n <form [formGroup]=\"form\">\n <ng-container formArrayName=\"inputs\">\n <ng-container *ngFor=\"let input of inputs.controls; let i = index\">\n <input\n [formControlName]=\"i\"\n autocomplete=\"off\"\n (keypress)=\"numberOnly($event)\"\n (keyup)=\"onMove($event, i)\"\n (paste)=\"onPaste($event)\"\n [maxLength]=\"1\"\n id=\"{{ i }}\"\n />\n </ng-container>\n </ng-container>\n </form>\n </div>\n <div class=\"code-input__text\">\n <span *ngIf=\"wrongCode\" class=\"code-input__text-wrong\">\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043E\u0434</span>\n <div *ngIf=\"showTimer\">\n <span class=\"code-input__text-info\"\n >\u0417\u0430\u043F\u0440\u043E\u0441\u0438\u0442\u044C \u043F\u043E\u0432\u0442\u043E\u0440\u043D\u0443\u044E \u043E\u0442\u043F\u0440\u0430\u0432\u043A\u0443 \u043C\u043E\u0436\u043D\u043E \u0447\u0435\u0440\u0435\u0437\n </span>\n <span class=\"code-input__text-time\">{{ time }}</span>\n </div>\n <span *ngIf=\"sendAgain\" class=\"code-input__text-again\" (click)=\"resend()\"\n >\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u043A\u043E\u0434 \u043F\u043E\u0432\u0442\u043E\u0440\u043D\u043E</span\n >\n </div>\n</div>\n", styles: [".code-input{display:flex;flex-direction:column;align-items:center;width:632px;padding:48px;color:var(--darkblue);background-color:#fff}.code-input h1{width:-moz-fit-content;width:fit-content;margin:0 0 40px;font-size:24px}.code-input span{text-align:center}.code-input__tip{margin-bottom:40px}.code-input__inputs form{display:flex;gap:16px}.code-input__inputs input{width:51px;height:56px;font-size:32px;text-align:center;border:solid 2px var(--gray);border-radius:10px;outline:none}.code-input__inputs input:focus{border:solid 2px var(--blue)}.code-input__inputs input:disabled{background-color:inherit}.code-input__input-wrong input{border:solid 2px var(--red)}.code-input__input-wrong input:focus{border:solid 2px var(--red)}.code-input__text{display:flex;flex-direction:column;margin-top:24px;font-size:16px;line-height:20px}.code-input__text-info{color:var(--gray)}.code-input__text-time{color:var(--blue)}.code-input__text-again{color:var(--blue);text-decoration:underline;cursor:pointer}.code-input__text-wrong{margin-bottom:8px;color:var(--red)}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.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: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }] });
354
386
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CodeInputComponent, decorators: [{
355
387
  type: Component,
356
- args: [{ selector: 'aeb-code-input', template: "<div class=\"code-input\">\n <h1>{{ title }}</h1>\n <span class=\"code-input__tip\">{{ tip }}</span>\n <div class=\"code-input__inputs\" *ngIf=\"!showLoader\" [ngClass]=\"classes\">\n <ng-container\n *ngFor=\"let input of inputs; let i = index; trackBy: trackByInput\"\n >\n <input\n [(ngModel)]=\"inputs[i]\"\n autocomplete=\"off\"\n (keypress)=\"numberOnly($event)\"\n (keyup)=\"onMove($event, i)\"\n (paste)=\"onPaste($event)\"\n value=\"input\"\n id=\"{{ i }}\"\n maxlength=\"1\"\n [disabled]=\"i === 0 ? false : true\"\n />\n </ng-container>\n </div>\n <div *ngIf=\"showLoader\" class=\"code-input__loader\">\n <svg\n width=\"48\"\n height=\"48\"\n viewBox=\"0 0 48 48\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M30.2101 27.1713L27.2663 30.0952L29.223 34.7905L34.9375 29.1148L30.2101 27.1713ZM26.1754 30.5423H22.0021L20.0454 35.2376H28.1148L26.1754 30.5423ZM30.6776 21.9428V26.0706L35.3877 28.0141V19.9994L30.6776 21.9428ZM20.8939 30.0952L17.9501 27.1713L13.24 29.1148L18.9544 34.7905L20.8939 30.0952ZM29.223 13.223L27.2663 17.9183L30.2101 20.8421L34.9375 18.8986L29.223 13.223ZM22.0021 17.4539H26.1754L28.1148 12.7758H20.0454L22.0021 17.4539ZM17.4999 26.0706V21.9428L12.7898 19.9994V28.0141L17.4999 26.0706ZM17.9501 20.8421L20.8939 17.9183L18.9544 13.223L13.24 18.8986L17.9501 20.8421ZM26.4005 29.5448L29.656 26.2942V21.7021L26.4005 18.4687H21.777L18.5042 21.7021V26.2942L21.777 29.5448H26.4005ZM18.9891 36.2352C16.2011 35.2154 12.7898 31.6463 11.7681 29.0804C10.7465 26.5145 10.7414 21.9428 11.7681 18.933C12.7948 15.9232 15.875 12.7758 18.9891 11.7611C22.1031 10.7463 26.5877 10.7463 29.1884 11.7611C31.7891 12.7758 35.896 16.9272 36.4094 18.933C36.9227 20.9389 37.431 26.5145 36.4094 29.0804C35.3877 31.6463 31.7213 35.2154 29.1884 36.2352C26.6556 37.2549 21.777 37.2549 18.9891 36.2352Z\"\n fill=\"url(#paint0_linear_8482_9268)\"\n />\n <path\n d=\"M20 4C10.871 5.85308 4 13.9241 4 23.5999C4 32.183 9.40666 39.5032 17 42.3407\"\n stroke=\"url(#paint1_linear_8482_9268)\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n />\n <path\n d=\"M28 43.1998C37.129 41.3467 44 33.2757 44 23.5999C44 14.6446 38.1142 7.06403 30 4.5155\"\n stroke=\"url(#paint2_linear_8482_9268)\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n />\n <defs>\n <linearGradient\n id=\"paint0_linear_8482_9268\"\n x1=\"24.9013\"\n y1=\"37\"\n x2=\"24.9013\"\n y2=\"11\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop stop-color=\"#00B8FF\" />\n <stop offset=\"1\" stop-color=\"#0079D6\" />\n </linearGradient>\n <linearGradient\n id=\"paint1_linear_8482_9268\"\n x1=\"12.5547\"\n y1=\"42.3407\"\n x2=\"12.5547\"\n y2=\"4\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop stop-color=\"#00B8FF\" />\n <stop offset=\"1\" stop-color=\"#0079D6\" />\n </linearGradient>\n <linearGradient\n id=\"paint2_linear_8482_9268\"\n x1=\"36.5547\"\n y1=\"43.1998\"\n x2=\"36.5547\"\n y2=\"4.5155\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop stop-color=\"#00B8FF\" />\n <stop offset=\"1\" stop-color=\"#0079D6\" />\n </linearGradient>\n </defs>\n </svg>\n </div>\n <div class=\"code-input__text\">\n <span *ngIf=\"wrongCode\" class=\"code-input__text-wrong\">\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043E\u0434</span>\n <div *ngIf=\"showTimer\">\n <span class=\"code-input__text-info\"\n >\u0417\u0430\u043F\u0440\u043E\u0441\u0438\u0442\u044C \u043F\u043E\u0432\u0442\u043E\u0440\u043D\u0443\u044E \u043E\u0442\u043F\u0440\u0430\u0432\u043A\u0443 \u043C\u043E\u0436\u043D\u043E \u0447\u0435\u0440\u0435\u0437\n </span>\n <span class=\"code-input__text-time\">{{ time }}</span>\n </div>\n <span *ngIf=\"sendAgain\" class=\"code-input__text-again\" (click)=\"resend()\"\n >\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u043A\u043E\u0434 \u043F\u043E\u0432\u0442\u043E\u0440\u043D\u043E</span\n >\n </div>\n</div>\n", styles: [".code-input{display:flex;flex-direction:column;align-items:center;width:632px;padding:48px;color:var(--darkblue);background-color:#fff}.code-input h1{width:-moz-fit-content;width:fit-content;margin:0 0 40px;font-size:24px}.code-input span{text-align:center}.code-input__tip{margin-bottom:40px}.code-input__inputs{display:flex;gap:16px}.code-input__inputs input{width:51px;height:56px;font-size:32px;text-align:center;border:solid 2px var(--gray);border-radius:10px;outline:none}.code-input__inputs input:focus{border:solid 2px var(--blue)}.code-input__inputs input:disabled{background-color:inherit}.code-input__input-wrong input{border:solid 2px var(--red)}.code-input__input-wrong input:focus{border:solid 2px var(--red)}.code-input__text{display:flex;flex-direction:column;margin-top:24px;font-size:16px;line-height:20px}.code-input__text-info{color:var(--gray)}.code-input__text-time{color:var(--blue)}.code-input__text-again{color:var(--blue);text-decoration:underline;cursor:pointer}.code-input__text-wrong{margin-bottom:8px;color:var(--red)}\n"] }]
388
+ args: [{ selector: 'aeb-code-input', providers: [
389
+ {
390
+ provide: NG_VALUE_ACCESSOR,
391
+ useExisting: forwardRef(() => CodeInputComponent),
392
+ multi: true
393
+ }
394
+ ], template: "<div class=\"code-input\">\n <h1>{{ title }}</h1>\n <span class=\"code-input__tip\">{{ tip }}</span>\n <div class=\"code-input__inputs\"[ngClass]=\"classes\">\n <form [formGroup]=\"form\">\n <ng-container formArrayName=\"inputs\">\n <ng-container *ngFor=\"let input of inputs.controls; let i = index\">\n <input\n [formControlName]=\"i\"\n autocomplete=\"off\"\n (keypress)=\"numberOnly($event)\"\n (keyup)=\"onMove($event, i)\"\n (paste)=\"onPaste($event)\"\n [maxLength]=\"1\"\n id=\"{{ i }}\"\n />\n </ng-container>\n </ng-container>\n </form>\n </div>\n <div class=\"code-input__text\">\n <span *ngIf=\"wrongCode\" class=\"code-input__text-wrong\">\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043E\u0434</span>\n <div *ngIf=\"showTimer\">\n <span class=\"code-input__text-info\"\n >\u0417\u0430\u043F\u0440\u043E\u0441\u0438\u0442\u044C \u043F\u043E\u0432\u0442\u043E\u0440\u043D\u0443\u044E \u043E\u0442\u043F\u0440\u0430\u0432\u043A\u0443 \u043C\u043E\u0436\u043D\u043E \u0447\u0435\u0440\u0435\u0437\n </span>\n <span class=\"code-input__text-time\">{{ time }}</span>\n </div>\n <span *ngIf=\"sendAgain\" class=\"code-input__text-again\" (click)=\"resend()\"\n >\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u043A\u043E\u0434 \u043F\u043E\u0432\u0442\u043E\u0440\u043D\u043E</span\n >\n </div>\n</div>\n", styles: [".code-input{display:flex;flex-direction:column;align-items:center;width:632px;padding:48px;color:var(--darkblue);background-color:#fff}.code-input h1{width:-moz-fit-content;width:fit-content;margin:0 0 40px;font-size:24px}.code-input span{text-align:center}.code-input__tip{margin-bottom:40px}.code-input__inputs form{display:flex;gap:16px}.code-input__inputs input{width:51px;height:56px;font-size:32px;text-align:center;border:solid 2px var(--gray);border-radius:10px;outline:none}.code-input__inputs input:focus{border:solid 2px var(--blue)}.code-input__inputs input:disabled{background-color:inherit}.code-input__input-wrong input{border:solid 2px var(--red)}.code-input__input-wrong input:focus{border:solid 2px var(--red)}.code-input__text{display:flex;flex-direction:column;margin-top:24px;font-size:16px;line-height:20px}.code-input__text-info{color:var(--gray)}.code-input__text-time{color:var(--blue)}.code-input__text-again{color:var(--blue);text-decoration:underline;cursor:pointer}.code-input__text-wrong{margin-bottom:8px;color:var(--red)}\n"] }]
357
395
  }], propDecorators: { title: [{
358
396
  type: Input
359
397
  }], secondsUntilRetry: [{
360
398
  type: Input
361
399
  }], tip: [{
362
400
  type: Input
401
+ }], wrongCode: [{
402
+ type: Input
363
403
  }], codeSet: [{
364
404
  type: Output
365
405
  }], timeOut: [{
@@ -371,13 +411,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
371
411
  class CodeInputModule {
372
412
  }
373
413
  CodeInputModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CodeInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
374
- CodeInputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: CodeInputModule, declarations: [CodeInputComponent], imports: [CommonModule, FormsModule], exports: [CodeInputComponent] });
375
- CodeInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CodeInputModule, imports: [CommonModule, FormsModule] });
414
+ CodeInputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: CodeInputModule, declarations: [CodeInputComponent], imports: [CommonModule, FormsModule, ReactiveFormsModule], exports: [CodeInputComponent] });
415
+ CodeInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CodeInputModule, imports: [CommonModule, FormsModule, ReactiveFormsModule] });
376
416
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CodeInputModule, decorators: [{
377
417
  type: NgModule,
378
418
  args: [{
379
419
  declarations: [CodeInputComponent],
380
- imports: [CommonModule, FormsModule],
420
+ imports: [CommonModule, FormsModule, ReactiveFormsModule],
381
421
  exports: [CodeInputComponent]
382
422
  }]
383
423
  }] });
@@ -3835,6 +3875,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
3835
3875
  }]
3836
3876
  }] });
3837
3877
 
3878
+ class ResponseComponent {
3879
+ constructor() {
3880
+ this.mode = 'light';
3881
+ }
3882
+ ngOnInit() { }
3883
+ }
3884
+ ResponseComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ResponseComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3885
+ ResponseComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ResponseComponent, selector: "aeb-response", inputs: { code: "code", mode: "mode" }, ngImport: i0, template: "<img\n *ngIf=\"code\"\n [src]=\"'/images/responses/' + code + '-' + mode + '.svg'\"\n [alt]=\"code\"\n/>\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
3886
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ResponseComponent, decorators: [{
3887
+ type: Component,
3888
+ args: [{ selector: 'aeb-response', template: "<img\n *ngIf=\"code\"\n [src]=\"'/images/responses/' + code + '-' + mode + '.svg'\"\n [alt]=\"code\"\n/>\n" }]
3889
+ }], ctorParameters: function () { return []; }, propDecorators: { code: [{
3890
+ type: Input
3891
+ }], mode: [{
3892
+ type: Input
3893
+ }] } });
3894
+
3895
+ class ResponseModule {
3896
+ }
3897
+ ResponseModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ResponseModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3898
+ ResponseModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: ResponseModule, declarations: [ResponseComponent], imports: [CommonModule] });
3899
+ ResponseModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ResponseModule, imports: [CommonModule] });
3900
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ResponseModule, decorators: [{
3901
+ type: NgModule,
3902
+ args: [{
3903
+ declarations: [ResponseComponent],
3904
+ imports: [CommonModule]
3905
+ }]
3906
+ }] });
3907
+
3838
3908
  class HighlightPipe {
3839
3909
  transform(value, ...args) {
3840
3910
  return `${value.replace(RegExp(args[0]), `<b>${args[0]}</b>`)}`;
@@ -4759,7 +4829,8 @@ AebUiKitModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version:
4759
4829
  NewsCardModule,
4760
4830
  DropdownModule,
4761
4831
  TableModule,
4762
- ModalModule], exports: [NewButtonModule,
4832
+ ModalModule,
4833
+ ResponseModule], exports: [NewButtonModule,
4763
4834
  CheckboxModule,
4764
4835
  HeaderModule,
4765
4836
  SidebarModule,
@@ -4791,7 +4862,8 @@ AebUiKitModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version:
4791
4862
  NewsCardModule,
4792
4863
  DropdownModule,
4793
4864
  TableModule,
4794
- ModalModule] });
4865
+ ModalModule,
4866
+ ResponseModule] });
4795
4867
  AebUiKitModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AebUiKitModule, imports: [CodeInputModule,
4796
4868
  NewButtonModule,
4797
4869
  CheckboxModule,
@@ -4825,7 +4897,8 @@ AebUiKitModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version:
4825
4897
  NewsCardModule,
4826
4898
  DropdownModule,
4827
4899
  TableModule,
4828
- ModalModule, NewButtonModule,
4900
+ ModalModule,
4901
+ ResponseModule, NewButtonModule,
4829
4902
  CheckboxModule,
4830
4903
  HeaderModule,
4831
4904
  SidebarModule,
@@ -4857,7 +4930,8 @@ AebUiKitModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version:
4857
4930
  NewsCardModule,
4858
4931
  DropdownModule,
4859
4932
  TableModule,
4860
- ModalModule] });
4933
+ ModalModule,
4934
+ ResponseModule] });
4861
4935
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AebUiKitModule, decorators: [{
4862
4936
  type: NgModule,
4863
4937
  args: [{
@@ -4896,7 +4970,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
4896
4970
  NewsCardModule,
4897
4971
  DropdownModule,
4898
4972
  TableModule,
4899
- ModalModule
4973
+ ModalModule,
4974
+ ResponseModule
4900
4975
  ],
4901
4976
  exports: [
4902
4977
  NewButtonModule,
@@ -4931,7 +5006,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
4931
5006
  NewsCardModule,
4932
5007
  DropdownModule,
4933
5008
  TableModule,
4934
- ModalModule
5009
+ ModalModule,
5010
+ ResponseModule
4935
5011
  ]
4936
5012
  }]
4937
5013
  }] });
@@ -5178,5 +5254,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
5178
5254
  * Generated bundle index. Do not edit.
5179
5255
  */
5180
5256
 
5181
- export { AccordionComponent, AccordionModule, ActionBarComponent, ActionBarModule, AebUiKitModule, BreadcrumpsComponent, CheckboxComponent, CheckboxGroupComponent, CheckboxModule, ClickOutsideDirective, ClickOutsideModule, CommentComponent, CommentModule, CreditItemCardComponent, CreditItemCardModule, DateToStrPipe, DatepickerComponent, DatepickerCoreComponent, DatepickerModule, DatepickerMonthComponent, DatepickerTilesComponent, DragAndDropDirective, DropdownComponent, DropdownModule, FieldSliderComponent, FieldSliderModule, FileAttachComponent, FileAttachModule, FilterTagComponent, FilterTagsComponent, FilterTagsModule, FooterBottomComponent, FooterComponent, FooterMenuComponent, FooterModule, FooterTopComponent, FormFieldComponent, FormFieldModule, HeaderComponent, HeaderModule, HeadingComponent, HeadingModule, IconDirective, InputDirective, LabelComponent, LabelDirective, LabelModule, LogoComponent, ModalComponent, ModalModule, NewButtonComponent, NewButtonModule, NewsCardComponent, NewsCardModule, NotificationComponent, NotificationsComponent, NotificationsModule, OptionComponent, PaginationComponent, PaginationModule, PaginationOldComponent, PaginationOldModule, PopUpComponent, PopUpDirective, PopUpModule, ProductTitleComponent, RadioButtonsComponent, RadioButtonsModule, SearchComponent, SearchModule, SelectComponent, SelectModule, SidebarComponent, SidebarModule, SliderComponent, SliderModule, SpanSubtitleDirective, SpanTitleDirective, SpinnerComponent, SpinnerModule, StepperComponent, StepperModule, StepperStepComponent, TabDirective, TableComponent, TableModule, TabsComponent, TabsModule, TagTabComponent, TagTabModule, TextareaDirective, TooltipComponent, TooltipDirective, TooltipModule, VisaComponent, VisaItemComponent, VisaModule };
5257
+ export { AccordionComponent, AccordionModule, ActionBarComponent, ActionBarModule, AebUiKitModule, BreadcrumpsComponent, CheckboxComponent, CheckboxGroupComponent, CheckboxModule, ClickOutsideDirective, ClickOutsideModule, CodeInputComponent, CodeInputModule, CommentComponent, CommentModule, CreditItemCardComponent, CreditItemCardModule, DateToStrPipe, DatepickerComponent, DatepickerCoreComponent, DatepickerModule, DatepickerMonthComponent, DatepickerTilesComponent, DragAndDropDirective, DropdownComponent, DropdownModule, FieldSliderComponent, FieldSliderModule, FileAttachComponent, FileAttachModule, FilterTagComponent, FilterTagsComponent, FilterTagsModule, FooterBottomComponent, FooterComponent, FooterMenuComponent, FooterModule, FooterTopComponent, FormFieldComponent, FormFieldModule, HeaderComponent, HeaderModule, HeadingComponent, HeadingModule, IconDirective, InputDirective, LabelComponent, LabelDirective, LabelModule, LogoComponent, ModalComponent, ModalModule, NewButtonComponent, NewButtonModule, NewsCardComponent, NewsCardModule, NotificationComponent, NotificationsComponent, NotificationsModule, OptionComponent, PaginationComponent, PaginationModule, PaginationOldComponent, PaginationOldModule, PopUpComponent, PopUpDirective, PopUpModule, ProductTitleComponent, RadioButtonsComponent, RadioButtonsModule, ResponseComponent, ResponseModule, SearchComponent, SearchModule, SelectComponent, SelectModule, SidebarComponent, SidebarModule, SliderComponent, SliderModule, SpanSubtitleDirective, SpanTitleDirective, SpinnerComponent, SpinnerModule, StepperComponent, StepperModule, StepperStepComponent, TabDirective, TableComponent, TableModule, TabsComponent, TabsModule, TagTabComponent, TagTabModule, TextareaDirective, TooltipComponent, TooltipDirective, TooltipModule, VisaComponent, VisaItemComponent, VisaModule };
5182
5258
  //# sourceMappingURL=aeb-ui-kit.mjs.map