@arsedizioni/ars-utils 20.2.1 → 20.2.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/ui/index.d.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  import * as i0 from '@angular/core';
2
- import { OnInit } from '@angular/core';
2
+ import { OnInit, QueryList, ElementRef } from '@angular/core';
3
3
  import * as i1 from '@arsedizioni/ars-utils/core';
4
4
  import { PasswordStrength } from '@arsedizioni/ars-utils/core';
5
+ import { ControlValueAccessor } from '@angular/forms';
5
6
  import { MatPaginatorIntl } from '@angular/material/paginator';
6
7
  import { MatDialogConfig, MatDialogRef } from '@angular/material/dialog';
7
8
  import { MatSnackBarRef } from '@angular/material/snack-bar';
@@ -32,6 +33,7 @@ interface CredentialsDialogResult {
32
33
  user?: string;
33
34
  password?: string;
34
35
  rememberMe?: boolean;
36
+ code?: string;
35
37
  }
36
38
 
37
39
  declare class PaginatorIntl extends MatPaginatorIntl {
@@ -312,16 +314,22 @@ interface CredentialsDialogData {
312
314
  recoverPasswordUrl?: string;
313
315
  user?: string;
314
316
  okCaption?: string;
315
- mode?: number;
317
+ mode?: 'email' | 'user' | 'otp';
316
318
  appearance?: string;
317
319
  }
318
320
  declare class CredentialsDialogComponent implements OnInit {
319
321
  readonly done: i0.OutputEmitterRef<CredentialsDialogResult>;
320
322
  readonly recoveringPassword: i0.OutputEmitterRef<CredentialsDialogResult>;
323
+ private changeDetector;
321
324
  protected dialogData: CredentialsDialogData;
322
325
  protected item: CredentialsDialogResult;
323
326
  protected showPassword: boolean;
324
327
  ngOnInit(): void;
328
+ /**
329
+ * Change mode
330
+ * @param mode: the new mode
331
+ */
332
+ changeMode(mode: 'email' | 'user' | 'otp'): void;
325
333
  /**
326
334
  * Done
327
335
  */
@@ -390,5 +398,26 @@ declare class PasswordStrengthComponent {
390
398
  static ɵcmp: i0.ɵɵComponentDeclaration<PasswordStrengthComponent, "password-strength", never, { "password": { "alias": "password"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
391
399
  }
392
400
 
393
- export { ArsUIModule, BusyDialogComponent, ConfirmDialogComponent, CredentialsDialogComponent, DialogService, InfoDialogComponent, PaginatorIntl, PasswordStrengthComponent, RecoverPasswordDialogComponent, ResetPasswordDialogComponent, ToastComponent, UIService };
401
+ declare class OtpInputComponent implements ControlValueAccessor {
402
+ otpFields: QueryList<ElementRef<HTMLInputElement>>;
403
+ isValid: i0.Signal<boolean>;
404
+ otpArray: i0.WritableSignal<string[]>;
405
+ disabled: boolean;
406
+ private onChange;
407
+ private onTouched;
408
+ writeValue(value: string): void;
409
+ registerOnChange(fn: (val: string) => void): void;
410
+ registerOnTouched(fn: () => void): void;
411
+ setDisabledState(isDisabled: boolean): void;
412
+ onBeforeInput(event: InputEvent): void;
413
+ onInput(event: Event, index: number): void;
414
+ onKeyDown(event: KeyboardEvent, index: number): void;
415
+ onPaste(event: ClipboardEvent): void;
416
+ private focusField;
417
+ private updateModel;
418
+ static ɵfac: i0.ɵɵFactoryDeclaration<OtpInputComponent, never>;
419
+ static ɵcmp: i0.ɵɵComponentDeclaration<OtpInputComponent, "otp-input", never, {}, {}, never, never, true, never>;
420
+ }
421
+
422
+ export { ArsUIModule, BusyDialogComponent, ConfirmDialogComponent, CredentialsDialogComponent, DialogService, InfoDialogComponent, OtpInputComponent, PaginatorIntl, PasswordStrengthComponent, RecoverPasswordDialogComponent, ResetPasswordDialogComponent, ToastComponent, UIService };
394
423
  export type { ConfirmDialogData, ConfirmDialogOption, CredentialsDialogData, CredentialsDialogResult, DialogOption, DialogResult, IDialogService, InfoDialogData, RecoverPasswordDialogData, RecoverPasswordDialogResult, ResetPasswordDialogData, ResetPasswordDialogResult, ToastData };