@arsedizioni/ars-utils 22.5.27 → 22.5.30

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.
Files changed (24) hide show
  1. package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs +14 -2
  2. package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs.map +1 -1
  3. package/fesm2022/arsedizioni-ars-utils-core.validators.mjs +358 -115
  4. package/fesm2022/arsedizioni-ars-utils-core.validators.mjs.map +1 -1
  5. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.auth.mjs +18 -12
  6. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.auth.mjs.map +1 -1
  7. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.mjs +5 -2
  8. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.mjs.map +1 -1
  9. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.prompt.mjs +23 -8
  10. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.prompt.mjs.map +1 -1
  11. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.select.mjs +6 -4
  12. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.select.mjs.map +1 -1
  13. package/fesm2022/arsedizioni-ars-utils-ui.files.mjs +8 -12
  14. package/fesm2022/arsedizioni-ars-utils-ui.files.mjs.map +1 -1
  15. package/fesm2022/arsedizioni-ars-utils-ui.shell.mjs +2 -2
  16. package/fesm2022/arsedizioni-ars-utils-ui.shell.mjs.map +1 -1
  17. package/package.json +1 -1
  18. package/types/arsedizioni-ars-utils-clipper.ui.d.ts +16 -0
  19. package/types/arsedizioni-ars-utils-core.validators.d.ts +167 -52
  20. package/types/arsedizioni-ars-utils-ui.dialogs.auth.d.ts +7 -0
  21. package/types/arsedizioni-ars-utils-ui.dialogs.d.ts +3 -0
  22. package/types/arsedizioni-ars-utils-ui.dialogs.prompt.d.ts +20 -0
  23. package/types/arsedizioni-ars-utils-ui.dialogs.select.d.ts +3 -0
  24. package/types/arsedizioni-ars-utils-ui.files.d.ts +3 -0
@@ -1,8 +1,11 @@
1
1
  import * as _angular_forms_signals from '@angular/forms/signals';
2
2
  import * as _angular_core from '@angular/core';
3
3
  import { PromptDialogResult, PromptDialogData, PromptDateDialogResult, PromptTimeDialogData } from '@arsedizioni/ars-utils/ui';
4
+ import { SignalsUtils } from '@arsedizioni/ars-utils/core.validators';
4
5
 
5
6
  declare class PromptDialogComponent {
7
+ /** Error text of a field: the message declared in the schema, or the shared fallback. */
8
+ protected readonly getFieldErrorMessage: typeof SignalsUtils.getFieldErrorMessage;
6
9
  readonly done: _angular_core.OutputEmitterRef<PromptDialogResult>;
7
10
  private readonly dialogService;
8
11
  protected readonly dialogData: _angular_core.WritableSignal<PromptDialogData>;
@@ -24,6 +27,21 @@ declare class PromptDialogComponent {
24
27
  }
25
28
 
26
29
  declare class PromptDateDialogComponent {
30
+ /** Error text of a field: the message declared in the schema, or the shared fallback. */
31
+ protected readonly getFieldErrorMessage: typeof SignalsUtils.getFieldErrorMessage;
32
+ /**
33
+ * Error text for a date range: whichever end is in error speaks for the pair.
34
+ * @param from - Errors of the start field, from `f.from().errors()`.
35
+ * @param to - Errors of the end field, from `f.to().errors()`.
36
+ * @returns The text to show under the range, or `undefined` when neither end is in error.
37
+ */
38
+ protected rangeErrorMessage(from: readonly {
39
+ kind: string;
40
+ message?: string;
41
+ }[], to: readonly {
42
+ kind: string;
43
+ message?: string;
44
+ }[]): string | undefined;
27
45
  readonly done: _angular_core.OutputEmitterRef<PromptDateDialogResult>;
28
46
  private readonly dialogService;
29
47
  protected readonly dialogData: _angular_core.WritableSignal<PromptDialogData>;
@@ -73,6 +91,8 @@ declare class PromptDateDialogComponent {
73
91
  }
74
92
 
75
93
  declare class PromptTimeDialogComponent {
94
+ /** Error text of a field: the message declared in the schema, or the shared fallback. */
95
+ protected readonly getFieldErrorMessage: typeof SignalsUtils.getFieldErrorMessage;
76
96
  readonly done: _angular_core.OutputEmitterRef<PromptDialogResult>;
77
97
  private readonly dialogService;
78
98
  protected readonly dialogData: _angular_core.WritableSignal<PromptTimeDialogData>;
@@ -9,6 +9,7 @@ import { SelectDialogData, SelectDialogResult, SelectDialogEdit, SelectableItem,
9
9
  import * as rxjs from 'rxjs';
10
10
  import { MatTree } from '@angular/material/tree';
11
11
  import { MatFormFieldAppearance } from '@angular/material/form-field';
12
+ import { SignalsUtils } from '@arsedizioni/ars-utils/core.validators';
12
13
 
13
14
  declare class SelectDialogComponent {
14
15
  readonly paginator: _angular_core.Signal<MatPaginator>;
@@ -283,6 +284,8 @@ interface SendToDialogData {
283
284
  options?: any;
284
285
  }
285
286
  declare class SendToDialogComponent implements ISendToDialog {
287
+ /** Error text of a field: the message declared in the schema, or the shared fallback. */
288
+ protected readonly getFieldErrorMessage: typeof SignalsUtils.getFieldErrorMessage;
286
289
  /** Emitted when the user confirms and sends the message. */
287
290
  readonly done: _angular_core.OutputEmitterRef<SendToDialogResult>;
288
291
  /** Emitted when the user requests to populate the recipient list. */
@@ -2,6 +2,7 @@ import * as _angular_forms_signals from '@angular/forms/signals';
2
2
  import * as _angular_core from '@angular/core';
3
3
  import { OnDestroy, DoCheck, ElementRef } from '@angular/core';
4
4
  import { ControlValueAccessor, NgControl } from '@angular/forms';
5
+ import { SignalsUtils } from '@arsedizioni/ars-utils/core.validators';
5
6
  import { MatFormFieldControl } from '@angular/material/form-field';
6
7
  import { FileInfo } from '@arsedizioni/ars-utils/core';
7
8
  import { Subject } from 'rxjs';
@@ -9,6 +10,8 @@ import { SelectFile, SelectFileDialogData, SelectPictureFileDialogData } from '@
9
10
 
10
11
  declare class FileInputComponent implements OnDestroy, DoCheck, MatFormFieldControl<FileInfo>, ControlValueAccessor {
11
12
  ngControl: NgControl;
13
+ /** Error text of a field: the message declared in the schema, or the shared fallback. */
14
+ protected readonly getFieldErrorMessage: typeof SignalsUtils.getFieldErrorMessage;
12
15
  /** Reference to the hidden native file input element. */
13
16
  protected readonly __file: _angular_core.Signal<ElementRef<any>>;
14
17
  private readonly renderer;