@arsedizioni/ars-utils 22.5.45 → 22.5.46

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.
@@ -756,7 +756,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
756
756
  * It raises the very errors those two rules raise — `required` when the value is missing, an
757
757
  * empty string or an empty array, `notEmpty` when a value is there but made of whitespace alone —
758
758
  * so existing error messages and `getFieldErrorMessage` keep working untouched, and the user
759
- * still reads "Obbligatorio" rather than the vaguer "Non può contenere solo spazi".
759
+ * still reads "Obbligatorio" rather than the vaguer "Non può essere vuoto".
760
760
  *
761
761
  * IMPORTANT, on a Material field: this directive does NOT draw the asterisk. `MatInput` reads its
762
762
  * own `required` input first and falls back to `hasValidator(Validators.required)`, which no
@@ -827,7 +827,7 @@ const ARS_VALIDATOR_MESSAGES = {
827
827
  required: 'Obbligatorio',
828
828
  guid: 'Ticket non riconosciuto',
829
829
  password: 'Password non sufficientemente robusta',
830
- notEmpty: 'Non può contenere solo spazi',
830
+ notEmpty: 'Non può essere vuoto o contenere solo spazi.',
831
831
  notEqual: 'Deve essere diverso dall\'altro valore',
832
832
  sqlDate: 'Data non valida',
833
833
  date: 'Data non valida',
@@ -1 +1 @@
1
- {"version":3,"file":"arsedizioni-ars-utils-core.validators.mjs","sources":["../../../projects/ars-utils/core.validators/validatorDirective.ts","../../../projects/ars-utils/core.validators/validIfDirective.ts","../../../projects/ars-utils/core.validators/equalsValidatorDirective.ts","../../../projects/ars-utils/core.validators/notEqualValidatorDirective.ts","../../../projects/ars-utils/core.validators/emailsValidatorDirective.ts","../../../projects/ars-utils/core.validators/guidValidatorDirective.ts","../../../projects/ars-utils/core.validators/sqlDateValidatorDirective.ts","../../../projects/ars-utils/core.validators/notFutureValidatorDirective.ts","../../../projects/ars-utils/core.validators/urlValidatorDirective.ts","../../../projects/ars-utils/core.validators/fileSizeValidatorDirective.ts","../../../projects/ars-utils/core.validators/maxTermsValidatorDirective.ts","../../../projects/ars-utils/core.validators/passwordValidatorDirective.ts","../../../projects/ars-utils/core.validators/timeValidatorDirective.ts","../../../projects/ars-utils/core.validators/emptiness.ts","../../../projects/ars-utils/core.validators/notEmptyValidatorDirective.ts","../../../projects/ars-utils/core.validators/requiredNotEmptyValidatorDirective.ts","../../../projects/ars-utils/core.validators/signals.ts","../../../projects/ars-utils/core.validators/public_api.ts","../../../projects/ars-utils/core.validators/arsedizioni-ars-utils-core.validators.ts"],"sourcesContent":["import { Directive, input } from \"@angular/core\";\r\nimport {\r\n AbstractControl,\r\n NG_VALIDATORS,\r\n ValidationErrors,\r\n Validator,\r\n} from \"@angular/forms\";\r\n\r\n/**\r\n * Directive that delegates validation to an externally provided validator function.\r\n * Bind `[validator]=\"myFn\"` where `myFn` is `(c: AbstractControl) => ValidationErrors | null`.\r\n */\r\n@Directive({\r\n selector: '[validator]',\r\n providers: [{ provide: NG_VALIDATORS, useExisting: ValidatorDirective, multi: true }],\r\n standalone: true,\r\n})\r\nexport class ValidatorDirective implements Validator {\r\n\r\n /** The custom validator function to apply. */\r\n readonly validator = input<((control: AbstractControl) => ValidationErrors | null) | undefined>(undefined);\r\n\r\n /**\r\n * Invokes the provided validator function against the given control.\r\n * Returns `null` (valid) when no function is bound.\r\n * @param control - The form control to validate.\r\n */\r\n validate(control: AbstractControl): ValidationErrors | null {\r\n const fn = this.validator();\r\n return fn ? fn(control) : null;\r\n }\r\n}\r\n","import { Directive, forwardRef, input } from \"@angular/core\";\r\nimport {\r\n AbstractControl,\r\n NG_VALIDATORS,\r\n ValidationErrors,\r\n Validator,\r\n} from \"@angular/forms\";\r\nimport { Validated } from '@arsedizioni/ars-utils/core';\r\n\r\n/**\r\n * Directive that validates a control using the host object's `isValid()` method\r\n * or a boolean expression passed via `[validIf]`.\r\n */\r\n@Directive({\r\n selector: \"[validIf]\",\r\n providers: [\r\n {\r\n provide: NG_VALIDATORS,\r\n useExisting: forwardRef(() => ValidIfDirective),\r\n multi: true,\r\n },\r\n ],\r\n standalone: true,\r\n})\r\nexport class ValidIfDirective implements Validator {\r\n\r\n /** When `true`, the control is considered valid regardless of the bound value. */\r\n readonly validIf = input<boolean>(false);\r\n\r\n /**\r\n * Validates the control value against a boolean flag or the value's own `isValid()` method.\r\n * @param control - The form control to validate.\r\n */\r\n validate(control: AbstractControl): ValidationErrors | null {\r\n let isValid = false;\r\n const c = control.value ? (control.value as Validated) : null;\r\n if (!c) {\r\n isValid = this.validIf() === true;\r\n } else {\r\n try {\r\n isValid = c.isValid();\r\n } catch { }\r\n }\r\n return isValid ? null : { validIf: \"Non valido.\" };\r\n }\r\n}\r\n","import { DestroyRef, Directive, effect, forwardRef, inject, input } from \"@angular/core\";\nimport {\n AbstractControl,\n NG_VALIDATORS,\n ValidationErrors,\n Validator,\n} from \"@angular/forms\";\nimport { Subscription } from \"rxjs\";\n\n/**\n * Directive that validates that the host control's value equals the value of another control.\n * Bind `[equals]=\"otherControl\"`.\n *\n * The host control is re-validated whenever the OTHER control's value changes:\n * without this, typing a new password AFTER the confirmation field was filled\n * left the form incorrectly valid (the classic password/confirm bug).\n *\n * IMPORTANT (reciprocal-binding safety): the re-validation triggered from the\n * other control's `valueChanges` runs with `{ emitEvent: false }`. Calling\n * Angular's `onValidatorChange` instead would re-emit valueChanges, so a\n * reciprocal setup (A [equals]=B and B [equals]=A) would overflow the stack.\n */\n@Directive({\n selector: \"[equals]\",\n providers: [\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => EqualsValidatorDirective),\n multi: true,\n },\n ],\n standalone: true,\n})\nexport class EqualsValidatorDirective implements Validator {\n\n /** The control whose value must match the host control's value. */\n readonly equals = input<AbstractControl | undefined>(undefined);\n\n /** The host control, captured on the first validate() call. */\n private hostControl?: AbstractControl;\n\n /** Subscription to the other control's valueChanges. */\n private subscription?: Subscription;\n\n constructor() {\n // Re-subscribe whenever the [equals] binding points to a different control,\n // and re-validate the host on every change of the other control.\n effect(() => {\n const other = this.equals();\n this.subscription?.unsubscribe();\n this.subscription = other?.valueChanges.subscribe(() =>\n // emitEvent:false breaks the reciprocal valueChanges loop (see class doc).\n this.hostControl?.updateValueAndValidity({ emitEvent: false })\n );\n // Re-validate the host when the bound control itself is swapped.\n this.hostControl?.updateValueAndValidity({ emitEvent: false });\n });\n inject(DestroyRef).onDestroy(() => this.subscription?.unsubscribe());\n }\n\n /**\n * Validates that the host control value equals the bound control's value.\n * Returns `null` (valid) when no control is bound.\n * @param control - The form control to validate.\n * @returns `null` when valid, `{ equals: ... }` otherwise.\n */\n validate(control: AbstractControl): ValidationErrors | null {\n this.hostControl = control;\n const eq = this.equals();\n if (!eq) return null;\n return eq.value === control.value ? null : { equals: \"Non valido.\" };\n }\n}\n","import { DestroyRef, Directive, effect, forwardRef, inject, input } from \"@angular/core\";\nimport {\n AbstractControl,\n NG_VALIDATORS,\n ValidationErrors,\n Validator,\n} from \"@angular/forms\";\nimport { Subscription } from \"rxjs\";\n\n/**\n * Directive that validates that the host control's value is different from another control's value.\n * Bind `[notEqual]=\"otherControl\"`.\n *\n * The host control is re-validated whenever the OTHER control's value changes,\n * so editing either field keeps both error states consistent.\n *\n * IMPORTANT (reciprocal-binding safety): the re-validation triggered from the\n * other control's `valueChanges` is run with `{ emitEvent: false }`. Using\n * Angular's `onValidatorChange` here instead would call `host.updateValueAndValidity()`\n * WITH events, so a reciprocal setup (A [notEqual]=B and B [notEqual]=A) would\n * ping-pong valueChanges between the two controls and overflow the stack.\n */\n@Directive({\n selector: \"[notEqual]\",\n providers: [\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => NotEqualValidatorDirective),\n multi: true,\n },\n ],\n standalone: true,\n})\nexport class NotEqualValidatorDirective implements Validator {\n\n /** The control whose value must differ from the host control's value. */\n readonly notEqual = input<AbstractControl | undefined>(undefined);\n\n /** The host control, captured on the first validate() call. */\n private hostControl?: AbstractControl;\n\n /** Subscription to the other control's valueChanges. */\n private subscription?: Subscription;\n\n constructor() {\n effect(() => {\n const other = this.notEqual();\n this.subscription?.unsubscribe();\n this.subscription = other?.valueChanges.subscribe(() =>\n // Re-validate the host WITHOUT emitting valueChanges, otherwise a\n // reciprocal binding would loop forever (see class doc).\n this.hostControl?.updateValueAndValidity({ emitEvent: false })\n );\n // Re-validate the host when the bound control itself is swapped.\n this.hostControl?.updateValueAndValidity({ emitEvent: false });\n });\n inject(DestroyRef).onDestroy(() => this.subscription?.unsubscribe());\n }\n\n /**\n * Validates that the host control value is not equal to the bound control's value.\n * Also clears the `notequal` error on the other control when the host becomes valid.\n * Returns `null` (valid) when no control is bound.\n * @param control - The form control to validate.\n * @returns `null` when valid, `{ notequal: true }` otherwise.\n */\n validate(control: AbstractControl): ValidationErrors | null {\n this.hostControl = control;\n\n const notEqual = this.notEqual();\n if (!notEqual) return null;\n\n const isValid = (!notEqual.value && !control.value) || (notEqual.value !== control.value);\n const errors: ValidationErrors | null = isValid ? null : { notequal: true };\n\n if (errors) {\n control.markAsTouched();\n } else if (notEqual.hasError('notequal')) {\n const { notequal: _removed, ...rest } = notEqual.errors ?? {};\n // emitEvent:false on both: clearing the partner's error must not feed\n // back through valueChanges/statusChanges into this validator.\n notEqual.setErrors(Object.keys(rest).length > 0 ? rest : null, { emitEvent: false });\n notEqual.updateValueAndValidity({ onlySelf: true, emitEvent: false });\n notEqual.markAsTouched();\n notEqual.markAsDirty();\n }\n return errors;\n }\n}\n","import { Directive, forwardRef } from \"@angular/core\";\r\nimport {\r\n AbstractControl,\r\n NG_VALIDATORS,\r\n ValidationErrors,\r\n Validator,\r\n} from \"@angular/forms\";\r\nimport { SystemUtils } from \"@arsedizioni/ars-utils/core\";\r\n\r\n/**\r\n * Directive that validates a semicolon-separated list of email addresses.\r\n * Apply `emails` to a text input containing one or more addresses separated by `;`.\r\n */\r\n@Directive({\r\n selector: \"[emails]\",\r\n providers: [\r\n {\r\n provide: NG_VALIDATORS,\r\n useExisting: forwardRef(() => EmailsValidatorDirective),\r\n multi: true,\r\n },\r\n ],\r\n standalone: true,\r\n})\r\nexport class EmailsValidatorDirective implements Validator {\r\n\r\n /**\r\n * Validates each address in a semicolon-separated email list.\r\n * Returns `null` when the control is empty.\r\n * @param control - The form control to validate.\r\n */\r\n validate(control: AbstractControl): ValidationErrors | null {\r\n const input: string = control.value;\r\n if (!input || input.length === 0) return null;\r\n const parts = input.replaceAll(/\\r\\n/g, '').split(';');\r\n const isValid = parts.every(part => part.length === 0 || !!SystemUtils.parseEmail(part));\r\n return isValid ? null : { emails: \"Elenco non valido.\" };\r\n }\r\n}\r\n","import { Directive, forwardRef } from \"@angular/core\";\r\nimport {\r\n AbstractControl,\r\n NG_VALIDATORS,\r\n ValidationErrors,\r\n Validator,\r\n} from \"@angular/forms\";\r\nimport { SystemUtils } from \"@arsedizioni/ars-utils/core\";\r\n\r\n/**\r\n * Directive that validates a control value as a GUID / UUID string.\r\n * Apply `guid` to a text input that expects a valid UUID.\r\n */\r\n@Directive({\r\n selector: \"[guid]\",\r\n providers: [\r\n {\r\n provide: NG_VALIDATORS,\r\n useExisting: forwardRef(() => GuidValidatorDirective),\r\n multi: true,\r\n },\r\n ],\r\n standalone: true,\r\n})\r\nexport class GuidValidatorDirective implements Validator {\r\n\r\n /**\r\n * Validates that the control value is a well-formed GUID / UUID.\r\n * Returns `null` when the control is empty.\r\n * @param control - The form control to validate.\r\n */\r\n validate(control: AbstractControl): ValidationErrors | null {\r\n const input: string = control.value;\r\n if (!input || input.length === 0) return null;\r\n return SystemUtils.parseUUID(input) ? null : { guid: \"Non valido.\" };\r\n }\r\n}\r\n","import { Directive, forwardRef } from \"@angular/core\";\nimport {\n AbstractControl,\n NG_VALIDATORS,\n ValidationErrors,\n Validator,\n} from \"@angular/forms\";\nimport { endOfDay } from 'date-fns';\nimport { SystemUtils } from \"@arsedizioni/ars-utils/core\";\n\n/**\n * Directive that validates a control value as a parseable SQL-compatible date string.\n * Apply `sqlDate` to a text input that expects a date after year 1750.\n */\n@Directive({\n selector: \"[sqlDate]\",\n providers: [\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => SqlDateValidatorDirective),\n multi: true,\n },\n ],\n standalone: true,\n})\nexport class SqlDateValidatorDirective implements Validator {\n\n /**\n * Validates that the control value can be parsed as a date after 1750.\n * Returns `null` when the control is empty.\n * @param control - The form control to validate.\n */\n validate(control: AbstractControl): ValidationErrors | null {\n const input: string = control.value;\n if (!input || input.length === 0) return null;\n const parsed = SystemUtils.parseDate(input);\n if (!parsed) return { sqlDate: \"Non valido.\" };\n const d = endOfDay(parsed);\n return d.getFullYear() > 1750 ? null : { sqlDate: \"Non valido.\" };\n }\n}\n","import { Directive, forwardRef } from \"@angular/core\";\nimport {\n AbstractControl,\n NG_VALIDATORS,\n ValidationErrors,\n Validator,\n} from \"@angular/forms\";\nimport { endOfDay } from 'date-fns';\nimport { SystemUtils } from \"@arsedizioni/ars-utils/core\";\n\n/**\n * Directive that validates that a control value is not a future date.\n * Apply `notFuture` to a text input that expects a date on or before today.\n */\n@Directive({\n selector: \"[notFuture]\",\n providers: [\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => NotFutureValidatorDirective),\n multi: true,\n },\n ],\n standalone: true,\n})\nexport class NotFutureValidatorDirective implements Validator {\n\n /**\n * Validates that the control value represents a date that is not in the future.\n * Returns `null` when the control is empty.\n * @param control - The form control to validate.\n */\n validate(control: AbstractControl): ValidationErrors | null {\n const input: string = control.value;\n if (!input || input.length === 0) return null;\n const parsed = SystemUtils.parseDate(input);\n if (!parsed) return { notFuture: \"Non valido.\" };\n const today = endOfDay(new Date());\n const d = endOfDay(parsed);\n return d <= today ? null : { notFuture: \"Non valido.\" };\n }\n}\n","import { Directive, forwardRef } from \"@angular/core\";\r\nimport {\r\n AbstractControl,\r\n NG_VALIDATORS,\r\n ValidationErrors,\r\n Validator,\r\n} from \"@angular/forms\";\r\nimport { SystemUtils } from \"@arsedizioni/ars-utils/core\";\r\n\r\n/**\r\n * Directive that validates a control value as a well-formed URL.\r\n * Apply `url` to a text input that expects a URL.\r\n */\r\n@Directive({\r\n selector: \"[url]\",\r\n providers: [\r\n {\r\n provide: NG_VALIDATORS,\r\n useExisting: forwardRef(() => UrlValidatorDirective),\r\n multi: true,\r\n },\r\n ],\r\n standalone: true,\r\n})\r\nexport class UrlValidatorDirective implements Validator {\r\n\r\n /**\r\n * Validates that the control value is a well-formed URL.\r\n * Returns `null` (valid) when the control is empty.\r\n * @param control - The form control to validate.\r\n */\r\n validate(control: AbstractControl): ValidationErrors | null {\r\n const input: string = control.value;\r\n if (!input || input.length === 0) return null;\r\n return SystemUtils.parseUrl(input) ? null : { url: \"Non valido.\" };\r\n }\r\n}\r\n","import { Directive, forwardRef, input } from \"@angular/core\";\r\nimport {\r\n AbstractControl,\r\n NG_VALIDATORS,\r\n ValidationErrors,\r\n Validator,\r\n} from \"@angular/forms\";\r\n\r\n/**\r\n * Directive that validates a file size against configurable minimum and maximum bounds.\r\n * Bind `[fileSize]` together with `[size]=\"fileSizeInMb\"`, `[maxSizeMb]`, and `[minSizeMb]`.\r\n */\r\n@Directive({\r\n selector: \"[fileSize]\",\r\n providers: [\r\n {\r\n provide: NG_VALIDATORS,\r\n useExisting: forwardRef(() => FileSizeValidatorDirective),\r\n multi: true,\r\n },\r\n ],\r\n standalone: true,\r\n})\r\nexport class FileSizeValidatorDirective implements Validator {\r\n\r\n /** Maximum allowed file size in megabytes. Defaults to 5. */\r\n readonly maxSizeMb = input<number>(5);\r\n\r\n /** Minimum required file size in megabytes. Defaults to 0. */\r\n readonly minSizeMb = input<number>(0);\r\n\r\n /** The actual file size in megabytes to validate against the bounds. */\r\n readonly size = input<number | undefined>(undefined);\r\n\r\n /**\r\n * Validates that the bound file size falls within the configured min/max range.\r\n * Returns `null` when no control value is present.\r\n * @param control - The form control to validate.\r\n */\r\n validate(control: AbstractControl): ValidationErrors | null {\r\n const input = control.value;\r\n if (!input) return null;\r\n const s = this.size() ?? 0;\r\n const isValid = s <= this.maxSizeMb() && s >= this.minSizeMb();\r\n return isValid ? null : { fileSize: \"Non valido.\" };\r\n }\r\n}\r\n","import { Directive, forwardRef, input } from \"@angular/core\";\r\nimport {\r\n AbstractControl,\r\n NG_VALIDATORS,\r\n ValidationErrors,\r\n Validator,\r\n} from \"@angular/forms\";\r\n\r\n/**\r\n * Directive that validates that a control value does not exceed a maximum word count.\r\n * Bind `[maxTerms]=\"10\"` to allow at most 10 whitespace-separated terms.\r\n */\r\n@Directive({\r\n selector: \"[maxTerms]\",\r\n providers: [\r\n {\r\n provide: NG_VALIDATORS,\r\n useExisting: forwardRef(() => MaxTermsValidatorDirective),\r\n multi: true,\r\n },\r\n ],\r\n standalone: true,\r\n})\r\nexport class MaxTermsValidatorDirective implements Validator {\r\n\r\n /** The maximum number of whitespace-separated terms allowed. */\r\n readonly maxTerms = input<number>(0);\r\n\r\n /**\r\n * Validates that the control value contains no more than the configured number of terms.\r\n * Returns `null` when the control is empty.\r\n * @param control - The form control to validate.\r\n */\r\n validate(control: AbstractControl): ValidationErrors | null {\r\n const input: string = control.value;\r\n if (!input) return null;\r\n const terms = input.match(/\\S+/g)?.length ?? 0;\r\n return terms <= this.maxTerms() ? null : { maxTerms: \"Non valido.\" };\r\n }\r\n}\r\n","import { Directive, forwardRef } from \"@angular/core\";\r\nimport {\r\n AbstractControl,\r\n NG_VALIDATORS,\r\n ValidationErrors,\r\n Validator,\r\n} from \"@angular/forms\";\r\nimport { SystemUtils } from \"@arsedizioni/ars-utils/core\";\r\n\r\n/**\r\n * Directive that validates a control value as a sufficiently strong password.\r\n * Apply `password` to a password input.\r\n */\r\n@Directive({\r\n selector: \"[password]\",\r\n providers: [\r\n {\r\n provide: NG_VALIDATORS,\r\n useExisting: forwardRef(() => PasswordValidatorDirective),\r\n multi: true,\r\n },\r\n ],\r\n standalone: true,\r\n})\r\nexport class PasswordValidatorDirective implements Validator {\r\n\r\n /**\r\n * Validates that the control value meets the minimum password-strength requirements.\r\n * @param control - The form control to validate.\r\n */\r\n validate(control: AbstractControl): ValidationErrors | null {\r\n const input: string = control.value ?? '';\r\n const strength = SystemUtils.calculatePasswordStrength(input);\r\n return strength.isValid ? null : { password: \"Non valido.\" };\r\n }\r\n}\r\n","import { Directive, forwardRef, input } from \"@angular/core\";\nimport {\n AbstractControl,\n NG_VALIDATORS,\n ValidationErrors,\n Validator,\n} from \"@angular/forms\";\n\n/**\n * Directive that validates a time string against optional allowed time slot ranges.\n * Bind `[time]` and optionally `[slots]=\"'08:00-12:00|14:00-18:00'\"` (pipe-separated ranges).\n */\n@Directive({\n selector: \"[time]\",\n providers: [\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => TimeValidatorDirective),\n multi: true,\n },\n ],\n standalone: true,\n})\nexport class TimeValidatorDirective implements Validator {\n\n /** Optional pipe-separated list of allowed time ranges, e.g. `\"08:00-12:00|14:00-18:00\"`. */\n readonly slots = input<string | undefined>(undefined);\n\n /**\n * Parses a `\"HH:MM\"` time string into a comparable integer (e.g. `\"09:30\"` -> `930`).\n * Returns `-1` when the string is not a valid time.\n * @param value - The time string to parse.\n */\n private getTime(value: string): number {\n const p = value.split(':');\n if (p.length !== 2) return -1;\n const hh = parseInt(p[0], 10);\n if (isNaN(hh) || hh < 0 || hh > 23) return -1;\n const mm = parseInt(p[1], 10);\n if (isNaN(mm) || mm < 0 || mm > 59) return -1;\n return hh * 100 + mm;\n }\n\n /**\n * Validates that the control value is a valid time string and, when slots are configured,\n * that it falls within at least one of the allowed ranges.\n * Returns `null` when the control is empty.\n * @param control - The form control to validate.\n */\n validate(control: AbstractControl): ValidationErrors | null {\n const input: string = control.value;\n if (!input || input.length === 0) return null;\n\n const t = this.getTime(input);\n if (t === -1) return { time: \"Non valido.\" };\n\n const slotsValue = this.slots();\n if (slotsValue) {\n const isValid = slotsValue.split('|').some(s => {\n const t1 = this.getTime(s.substring(0, 5));\n const t2 = this.getTime(s.substring(6));\n return t1 !== -1 && t2 !== -1 && t1 <= t && t2 >= t;\n });\n return isValid ? null : { time: \"Non valido.\" };\n }\n\n return null;\n }\n}\n","/**\n * @file emptiness.ts\n *\n * The single definition of \"empty\" shared by the `notEmpty` / `requiredNotEmpty` rules, in both\n * their flavours: the template-driven directives and the signal-form validators. It lives apart\n * from either of them so that the two faces of the same rule cannot drift, and it pulls in\n * nothing — not `@angular/forms`, not `@angular/core`.\n */\n\n/**\n * Tells whether a value carries nothing at all.\n *\n * Nullish, the empty string and the empty array all count as missing; anything else does not,\n * including `0` and `false`, which are legitimate values a form can hold.\n *\n * @param value - The value to inspect.\n * @returns `true` when the value is absent, an empty string or an empty array.\n */\nexport function isMissingValue(value: unknown): boolean {\n if (value === undefined || value === null) return true;\n if (typeof value === 'string') return value.length === 0;\n if (Array.isArray(value)) return value.length === 0;\n return false;\n}\n\n/**\n * Tells whether a value is what the `notEmpty` rule rejects: a string made of whitespace alone,\n * or an array with no elements.\n *\n * An absent value and an empty string are deliberately NOT rejected: declaring a field mandatory\n * is the job of `required()` (or of `requiredNotEmpty`), and a blank field would otherwise raise\n * two errors saying the same thing. The empty array is the one exception, because there it IS the\n * only shape emptiness can take — a multi-select never holds `''`.\n *\n * @param value - The value to inspect.\n * @returns `true` when the value is a whitespace-only string or an empty array.\n */\nexport function isBlankValue(value: unknown): boolean {\n if (Array.isArray(value)) return value.length === 0;\n if (typeof value !== 'string') return false;\n return value.length > 0 && value.trim().length === 0;\n}\n","import { Directive, forwardRef } from \"@angular/core\";\nimport {\n AbstractControl,\n NG_VALIDATORS,\n ValidationErrors,\n Validator,\n} from \"@angular/forms\";\nimport { isBlankValue } from \"./emptiness\";\n\n/**\n * Directive that validates that a control value is not blank: neither a whitespace-only string\n * nor an empty array. Apply `notEmpty` to a text input where non-blank content is required, or\n * to a multi-value control that must carry at least one entry.\n *\n * A value that is simply absent passes: saying \"obbligatorio\" is the job of `required`, or of\n * `requiredNotEmpty` when both rules belong on the same control.\n */\n@Directive({\n selector: \"[notEmpty]\",\n providers: [\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => NotEmptyValidatorDirective),\n multi: true,\n },\n ],\n standalone: true,\n})\nexport class NotEmptyValidatorDirective implements Validator {\n\n /**\n * Validates that the control value carries content.\n * Returns `null` when the control is absent or holds a type this rule says nothing about.\n * @param control - The form control to validate.\n * @returns `{ notEmpty: true }` when the value is a blank string or an empty array, `null` otherwise.\n */\n validate(control: AbstractControl): ValidationErrors | null {\n return isBlankValue(control?.value) ? { notEmpty: true } : null;\n }\n}\n","import { Directive, forwardRef } from \"@angular/core\";\nimport {\n AbstractControl,\n NG_VALIDATORS,\n ValidationErrors,\n Validator,\n} from \"@angular/forms\";\nimport { isBlankValue, isMissingValue } from \"./emptiness\";\n\n/**\n * Directive that validates that a control carries actual content: present AND not blank.\n * Apply `requiredNotEmpty` where `required notEmpty` would otherwise be spelled out together.\n *\n * It raises the very errors those two rules raise — `required` when the value is missing, an\n * empty string or an empty array, `notEmpty` when a value is there but made of whitespace alone —\n * so existing error messages and `getFieldErrorMessage` keep working untouched, and the user\n * still reads \"Obbligatorio\" rather than the vaguer \"Non può contenere solo spazi\".\n *\n * IMPORTANT, on a Material field: this directive does NOT draw the asterisk. `MatInput` reads its\n * own `required` input first and falls back to `hasValidator(Validators.required)`, which no\n * directive-provided validator can satisfy — the validators of a template-driven control are\n * merged into one composed function before they get there. Keep writing `required` on the\n * control next to this one: the two produce the same `{ required: true }` key, so the errors\n * merge and nothing is reported twice.\n *\n * `aria-required` is set here so that assistive technology is told the truth even where the\n * `required` attribute is absent.\n */\n@Directive({\n selector: \"[requiredNotEmpty]\",\n host: { '[attr.aria-required]': 'true' },\n providers: [\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => RequiredNotEmptyValidatorDirective),\n multi: true,\n },\n ],\n standalone: true,\n})\nexport class RequiredNotEmptyValidatorDirective implements Validator {\n\n /**\n * Validates that the control value is present and carries content.\n * @param control - The form control to validate.\n * @returns `{ required: true }` when nothing was entered, `{ notEmpty: true }` when the value\n * is blank, `null` when the value is acceptable.\n */\n validate(control: AbstractControl): ValidationErrors | null {\n const input = control?.value;\n if (isMissingValue(input)) return { required: true };\n return isBlankValue(input) ? { notEmpty: true } : null;\n }\n}\n","import { LogicFn, PathKind, required, SchemaPath, SchemaPathRules, validate } from '@angular/forms/signals';\nimport { SystemUtils, Validated } from '@arsedizioni/ars-utils/core';\nimport { endOfDay } from 'date-fns';\nimport { isBlankValue, isMissingValue } from './emptiness';\n\n/**\n * Options shared by the ARS signal-form validators.\n *\n * Mirrors the `config` argument of the Angular built-ins (`required`, `email`, ...) but carries\n * only what these validators need: the message shown to the user in place of the default one.\n */\nexport interface ArsValidatorConfig<TValue = string, TPathKind extends PathKind = PathKind.Root> {\n /** Message attached to the error, in place of the default Italian text. */\n message?: string;\n /**\n * Applies the rule only while this returns `true`, exactly like the `when` of `required()`\n * and of the other Angular built-ins.\n *\n * It exists because these validators are meant to be paired with `required()` on the same\n * field, and a field that is only required in one mode of a dialog must only be validated in\n * that mode: without this, a leftover value would keep a form invalid in a mode where the\n * field is not even shown.\n */\n when?: NoInfer<LogicFn<TValue, boolean, TPathKind>>;\n}\n\n/**\n * Default texts of the rules declared here, in one place so that the validators and the fallback\n * map of `SignalsUtils.getFieldErrorMessage` cannot drift apart: a rule added below without a\n * message here would show \"Errore\", and one renamed here without touching the validator would\n * leave the map with a kind nobody produces.\n */\n/**\n * Earliest date {@link date} and {@link dateRange} accept: 1 January 1970.\n *\n * Everything this application stores — events, certificates, payments, communications — happened\n * after it, so an earlier value is always a typo (a two-digit year, a slipped keystroke) and never\n * real data. The floor is deliberately higher than the one of {@link sqlDate}, which only asks\n * what SQL Server can physically store.\n */\nexport const MIN_VALID_YEAR = 1970;\n\nexport const ARS_VALIDATOR_MESSAGES: Record<string, string> = {\n // Produced by the Angular built-in `required()` and by {@link requiredNotEmpty}. It sits here,\n // and no longer among the built-in fallbacks below, so that the text exists exactly once.\n required: 'Obbligatorio',\n guid: 'Ticket non riconosciuto',\n password: 'Password non sufficientemente robusta',\n notEmpty: 'Non può contenere solo spazi',\n notEqual: 'Deve essere diverso dall\\'altro valore',\n sqlDate: 'Data non valida',\n date: 'Data non valida',\n dateRange: 'Intervallo non valido',\n notFuture: 'La data non può essere futura',\n url: 'Indirizzo non valido',\n maxTerms: 'Troppe parole',\n fileSize: 'Dimensione del file non ammessa',\n validIf: 'Non valido',\n emails: 'Elenco non valido',\n time: 'Orario non valido',\n equals: 'I due valori non coincidono',\n otp: 'Codice non valido',\n};\n\n/**\n * Requires the value to be a well-formed GUID / UUID.\n *\n * The signal-form counterpart of `GuidValidatorDirective`, sharing its rule down to the empty\n * case: an empty value is NOT an error here, because saying \"obbligatorio\" is the job of\n * `required()` and two errors on one empty field only ever read as noise.\n *\n * @param path - Path of the field to validate.\n * @param config - Optional message override.\n * @returns void\n * @example\n * const f = form(this.model, p => { required(p.serial); guid(p.serial); });\n */\nexport function guid<TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<string, SchemaPathRules.Supported, TPathKind>,\n config?: ArsValidatorConfig<string, TPathKind>\n): void {\n validate(path, ctx => {\n if (config?.when && !config.when(ctx)) return null;\n const input = ctx.value();\n if (!input || input.length === 0) return null;\n return SystemUtils.parseUUID(input)\n ? null\n : { kind: 'guid', message: config?.message ?? ARS_VALIDATOR_MESSAGES['guid'] };\n });\n}\n\n/**\n * Requires the value to be a password strong enough for {@link SystemUtils.calculatePasswordStrength}.\n *\n * The signal-form counterpart of `PasswordValidatorDirective`. Unlike {@link guid} it does judge\n * the empty value, because an empty password IS a weak one and the directive behaved the same way.\n *\n * @param path - Path of the field to validate.\n * @param config - Optional message override.\n * @returns void\n */\nexport function password<TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<string, SchemaPathRules.Supported, TPathKind>,\n config?: ArsValidatorConfig<string, TPathKind>\n): void {\n validate(path, ctx => {\n if (config?.when && !config.when(ctx)) return null;\n const strength = SystemUtils.calculatePasswordStrength(ctx.value() ?? '');\n return strength.isValid\n ? null\n : { kind: 'password', message: config?.message ?? ARS_VALIDATOR_MESSAGES['password'] };\n });\n}\n\n/**\n * Requires the value not to be made of whitespace alone, and a collection not to be empty.\n *\n * The signal-form counterpart of `NotEmptyValidatorDirective`, sharing its predicate through\n * {@link isBlankValue}: a blank string and an empty array are errors, an absent value is not.\n * That last part is not an oversight — saying \"obbligatorio\" belongs to `required()`, and a field\n * that is merely blank would otherwise raise two errors that mean the same thing. Pair the two,\n * or reach for {@link requiredNotEmpty}, when a field must be both present and non-blank.\n *\n * Replaces the `pattern(p.x, /\\S/)` workaround: same rule, but the intent is in the name and the\n * error kind is `notEmpty` rather than `pattern`.\n *\n * @param path - Path of the field to validate.\n * @param config - Optional message override.\n * @returns void\n * @example\n * const f = form(this.model, p => { required(p.city); notEmpty(p.city); });\n * @example\n * const f = form(this.model, p => { notEmpty(p.tags); }); // at least one tag\n */\nexport function notEmpty<TValue extends string | readonly unknown[] | undefined,\n TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n config?: ArsValidatorConfig<TValue, TPathKind>\n): void {\n validate(path, ctx => {\n if (config?.when && !config.when(ctx)) return null;\n return isBlankValue(ctx.value())\n ? { kind: 'notEmpty', message: config?.message ?? ARS_VALIDATOR_MESSAGES['notEmpty'] }\n : null;\n });\n}\n\n/**\n * Requires the value to be both present and made of something: the two rules a mandatory text\n * field almost always needs together, declared once.\n *\n * The signal-form counterpart of `RequiredNotEmptyValidatorDirective`. It raises the errors the\n * two rules raise on their own rather than a kind of its own — `required` when nothing was\n * entered, `notEmpty` when a value is there but blank — so the message stays as precise as it was\n * and nothing downstream needs to learn a new kind.\n *\n * The presence half is DELEGATED to Angular's own `required()` and is not reimplemented here.\n * That call does more than validate: it writes the `REQUIRED` metadata on the field, and that\n * metadata is the only thing the Material compatibility layer looks at when it answers\n * `hasValidator(Validators.required)` through `field().required()`. A plain `validate()` would\n * reject the empty value just the same and silently drop the asterisk from the label.\n *\n * The empty array is the one case handled here rather than there: Angular's emptiness check is\n * `value === '' || value === false || value == null`, so an empty array walks straight past\n * `required()`. It is reported with the `required` kind all the same, because for a multi-value\n * field \"nothing selected\" is exactly what the user needs to be told.\n *\n * @param path - Path of the field to validate.\n * @param config - Optional message override, applied to whichever of the two errors is raised,\n * and `when` condition, honoured by both halves of the rule.\n * @returns void\n * @example\n * const f = form(this.model, p => { requiredNotEmpty(p.city); });\n */\nexport function requiredNotEmpty<TValue extends string | readonly unknown[] | undefined,\n TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n config?: ArsValidatorConfig<TValue, TPathKind>\n): void {\n required(path, {\n message: config?.message ?? ARS_VALIDATOR_MESSAGES['required'],\n when: config?.when,\n });\n\n validate(path, ctx => {\n if (config?.when && !config.when(ctx)) return null;\n const input = ctx.value();\n // The empty array, which `required()` above does not see.\n if (Array.isArray(input) && input.length === 0) {\n return { kind: 'required', message: config?.message ?? ARS_VALIDATOR_MESSAGES['required'] };\n }\n // Nullish and the empty string have already been reported by `required()`: saying it twice\n // would put two errors on one empty field, which is what this rule exists to avoid.\n if (isMissingValue(input)) return null;\n return isBlankValue(input)\n ? { kind: 'notEmpty', message: config?.message ?? ARS_VALIDATOR_MESSAGES['notEmpty'] }\n : null;\n });\n}\n\n/**\n * Requires the value to differ from the value of another field of the same form.\n *\n * The signal-form counterpart of `NotEqualValidatorDirective`, with its exact rule: two empty\n * values are considered different, so an untouched pair of fields does not start out in error.\n * Reactive on both fields — editing either one re-validates this one, which is what the\n * directive needed a `valueChanges` subscription (and a re-entrancy guard) to achieve.\n *\n * @param path - Path of the field to validate.\n * @param other - Path of the field whose value must differ.\n * @param config - Optional message override and `when` condition.\n * @returns void\n */\nexport function notEqual<TValue, TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n other: SchemaPath<TValue, SchemaPathRules.Supported>,\n config?: ArsValidatorConfig<TValue, TPathKind>\n): void {\n validate(path, ctx => {\n if (config?.when && !config.when(ctx)) return null;\n const mine = ctx.value();\n const theirs = ctx.valueOf(other);\n const isValid = (!theirs && !mine) || theirs !== mine;\n return isValid ? null : { kind: 'notEqual', message: config?.message ?? ARS_VALIDATOR_MESSAGES['notEqual'] };\n });\n}\n\n/**\n * Requires the value to be a date the backend can store: parseable, and after 1750.\n *\n * The signal-form counterpart of `SqlDateValidatorDirective`. The year floor is not arbitrary —\n * it is what separates a real date from the 01/01/0001 that a mistyped year produces, which SQL\n * Server rejects with an error nobody can read.\n *\n * @param path - Path of the field to validate.\n * @param config - Optional message override and `when` condition.\n * @returns void\n */\nexport function sqlDate<TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<string, SchemaPathRules.Supported, TPathKind>,\n config?: ArsValidatorConfig<string, TPathKind>\n): void {\n validate(path, ctx => {\n if (config?.when && !config.when(ctx)) return null;\n const input = ctx.value();\n if (!input || input.length === 0) return null;\n const parsed = SystemUtils.parseDate(input);\n const invalid = { kind: 'sqlDate', message: config?.message ?? ARS_VALIDATOR_MESSAGES['sqlDate'] };\n if (!parsed) return invalid;\n return endOfDay(parsed).getFullYear() > 1750 ? null : invalid;\n });\n}\n\n/**\n * Requires the value to be a real date, as {@link SystemUtils.parseDate} understands one.\n *\n * This is the rule for anything a user picks or types as a date: it accepts both the `Date` a\n * Material datepicker or timepicker writes into the model and the text of a plain input, since\n * `parseDate` handles the shapes this codebase produces (ISO, `dd/MM/yyyy`, `yyyy-MM-dd`, and the\n * shorthand forms). Empty passes — saying \"obbligatorio\" is the job of `required()`.\n *\n * A date earlier than {@link MIN_VALID_YEAR} (1 January 1970) is rejected: nothing this\n * application stores predates it, so an earlier value is a typo rather than data.\n *\n * Distinct from {@link sqlDate} on purpose: that one is about what the DATABASE can store (the\n * 1750 floor), this one is about whether the value is a date at all. Pair them when both matter.\n *\n * @param path - Path of the field to validate.\n * @param config - Optional message override and `when` condition.\n * @returns void\n * @example\n * const f = form(this.model, p => { required(p.expiry); date(p.expiry); });\n */\nexport function date<TValue extends string | Date | null | undefined,\n TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n config?: ArsValidatorConfig<TValue, TPathKind>\n): void {\n validate(path, ctx => {\n if (config?.when && !config.when(ctx)) return null;\n const input = ctx.value();\n if (input === undefined || input === null || input === '') return null;\n const parsed = SystemUtils.parseDate(input);\n return parsed && parsed.getFullYear() >= MIN_VALID_YEAR\n ? null\n : { kind: 'date', message: config?.message ?? ARS_VALIDATOR_MESSAGES['date'] };\n });\n}\n\n/**\n * Requires the two ends of a date range to be real dates and to be in order.\n *\n * Written for the two inputs of a `mat-date-range-input`, whose start and end live in two\n * separate fields of the model. Each end is checked with the same rule as {@link date}, and the\n * ordering is checked only when BOTH ends are filled in — a half-open range (\"from today\n * onwards\") is a legitimate filter, not an error. The 1 January 1970 floor of {@link date}\n * applies to both ends.\n *\n * The rule is bound to BOTH paths, so the error appears on whichever end the user is looking at\n * and a single `<mat-error>` under the range can read either one. Comparison is made on the end\n * of the day, so picking the same day for both ends is valid.\n *\n * @param from - Path of the field holding the start of the range.\n * @param to - Path of the field holding the end of the range.\n * @param config - Optional message override (used for the ordering error) and `when` condition.\n * @returns void\n * @example\n * const f = form(this.model, p => { dateRange(p.sentFrom, p.sentTo); });\n */\nexport function dateRange<TValue extends string | Date | null | undefined,\n TPathKind extends PathKind = PathKind.Root>(\n from: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n to: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n config?: ArsValidatorConfig<TValue, TPathKind>\n): void {\n date(from, config);\n date(to, config);\n\n /**\n * Compares the two ends of the range once both of them are filled in.\n * @param startValue - Raw value of the start field.\n * @param endValue - Raw value of the end field.\n * @returns The ordering error, or `null` when the pair is acceptable.\n */\n const checkOrder = (startValue: TValue, endValue: TValue) => {\n const start = SystemUtils.parseDate(startValue ?? undefined);\n const end = SystemUtils.parseDate(endValue ?? undefined);\n // A half-open range is legitimate: nothing to compare until both ends are there. An end that\n // is not a valid date is already reported by the `date` rule bound above, so it is skipped\n // here rather than reported twice.\n if (!start || !end) return null;\n if (start.getFullYear() < MIN_VALID_YEAR || end.getFullYear() < MIN_VALID_YEAR) return null;\n return endOfDay(start) <= endOfDay(end)\n ? null\n : { kind: 'dateRange', message: config?.message ?? ARS_VALIDATOR_MESSAGES['dateRange'] };\n };\n\n // Reading the opposite end through `valueOf` keeps each rule reactive on the other field, so\n // filling in one end re-validates the other.\n validate(from, ctx => {\n if (config?.when && !config.when(ctx)) return null;\n return checkOrder(ctx.value(), ctx.valueOf(to));\n });\n validate(to, ctx => {\n if (config?.when && !config.when(ctx)) return null;\n return checkOrder(ctx.valueOf(from), ctx.value());\n });\n}\n\n/**\n * Requires the value to be a date that is not in the future.\n *\n * The signal-form counterpart of `NotFutureValidatorDirective`. Today counts as valid: the\n * comparison is made on the end of the day, so a date entered this morning does not become\n * invalid because the clock says 09:00.\n *\n * @param path - Path of the field to validate.\n * @param config - Optional message override and `when` condition.\n * @returns void\n */\nexport function notFuture<TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<string, SchemaPathRules.Supported, TPathKind>,\n config?: ArsValidatorConfig<string, TPathKind>\n): void {\n validate(path, ctx => {\n if (config?.when && !config.when(ctx)) return null;\n const input = ctx.value();\n if (!input || input.length === 0) return null;\n const parsed = SystemUtils.parseDate(input);\n const invalid = { kind: 'notFuture', message: config?.message ?? ARS_VALIDATOR_MESSAGES['notFuture'] };\n if (!parsed) return invalid;\n return endOfDay(parsed) <= endOfDay(new Date()) ? null : invalid;\n });\n}\n\n/**\n * Requires the value to be a well-formed URL. An empty value passes, as everywhere else here.\n *\n * The signal-form counterpart of `UrlValidatorDirective`.\n *\n * @param path - Path of the field to validate.\n * @param config - Optional message override and `when` condition.\n * @returns void\n */\nexport function url<TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<string, SchemaPathRules.Supported, TPathKind>,\n config?: ArsValidatorConfig<string, TPathKind>\n): void {\n validate(path, ctx => {\n if (config?.when && !config.when(ctx)) return null;\n const input = ctx.value();\n if (!input || input.length === 0) return null;\n return SystemUtils.parseUrl(input)\n ? null\n : { kind: 'url', message: config?.message ?? ARS_VALIDATOR_MESSAGES['url'] };\n });\n}\n\n/**\n * Requires the value to hold no more than `max` whitespace-separated terms.\n *\n * The signal-form counterpart of `MaxTermsValidatorDirective`, used on the search boxes where\n * the backend refuses a query past a certain number of words.\n *\n * @param path - Path of the field to validate.\n * @param max - The maximum number of terms, as a number or a reactive function.\n * @param config - Optional message override and `when` condition.\n * @returns void\n */\nexport function maxTerms<TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<string, SchemaPathRules.Supported, TPathKind>,\n max: number | (() => number),\n config?: ArsValidatorConfig<string, TPathKind>\n): void {\n validate(path, ctx => {\n if (config?.when && !config.when(ctx)) return null;\n const input = ctx.value();\n if (!input) return null;\n const terms = input.match(/\\S+/g)?.length ?? 0;\n return terms <= (typeof max === 'function' ? max() : max)\n ? null\n : { kind: 'maxTerms', message: config?.message ?? ARS_VALIDATOR_MESSAGES['maxTerms'] };\n });\n}\n\n/**\n * Requires the size of the picked file to fall within the allowed range.\n *\n * The signal-form counterpart of `FileSizeValidatorDirective`, and it keeps its shape: the field\n * itself holds the file NAME, while the size arrives from outside — the control that picked the\n * file knows it, the form does not. An empty field passes, so \"no file\" is `required()`'s call\n * and not a size error.\n *\n * @param path - Path of the field holding the file name.\n * @param sizeMb - The size of the picked file in megabytes, as a reactive function.\n * @param maxSizeMb - The maximum allowed size in megabytes. Defaults to `5`.\n * @param minSizeMb - The minimum required size in megabytes. Defaults to `0`.\n * @param config - Optional message override and `when` condition.\n * @returns void\n */\nexport function fileSize<TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<string, SchemaPathRules.Supported, TPathKind>,\n sizeMb: () => number | undefined,\n maxSizeMb: number | (() => number) = 5,\n minSizeMb: number | (() => number) = 0,\n config?: ArsValidatorConfig<string, TPathKind>\n): void {\n validate(path, ctx => {\n if (config?.when && !config.when(ctx)) return null;\n if (!ctx.value()) return null;\n const size = sizeMb() ?? 0;\n const max = typeof maxSizeMb === 'function' ? maxSizeMb() : maxSizeMb;\n const min = typeof minSizeMb === 'function' ? minSizeMb() : minSizeMb;\n return size <= max && size >= min\n ? null\n : { kind: 'fileSize', message: config?.message ?? ARS_VALIDATOR_MESSAGES['fileSize'] };\n });\n}\n\n/**\n * Requires the value to declare itself valid.\n *\n * The signal-form counterpart of `ValidIfDirective`: when the field holds an object implementing\n * `Validated` the verdict is its own `isValid()`, and when the field is empty the verdict is the\n * `flag`. It is the escape hatch for the composite controls whose validity only they can judge.\n *\n * @param path - Path of the field to validate.\n * @param flag - Verdict used while the field is empty, as a boolean or a reactive function.\n * Defaults to `false`.\n * @param config - Optional message override and `when` condition.\n * @returns void\n */\nexport function validIf<TValue extends Partial<Validated>, TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n flag: boolean | (() => boolean) = false,\n config?: ArsValidatorConfig<TValue, TPathKind>\n): void {\n validate(path, ctx => {\n if (config?.when && !config.when(ctx)) return null;\n const value = ctx.value();\n let isValid: boolean;\n if (!value) {\n isValid = (typeof flag === 'function' ? flag() : flag) === true;\n } else {\n try {\n isValid = value.isValid?.() === true;\n } catch {\n isValid = false;\n }\n }\n return isValid ? null : { kind: 'validIf', message: config?.message ?? ARS_VALIDATOR_MESSAGES['validIf'] };\n });\n}\n\n/**\n * Requires the value to be a semicolon-separated list of valid e-mail addresses.\n *\n * The signal-form counterpart of `EmailsValidatorDirective`. An empty value passes, and so does\n * an empty entry between two semicolons: the list is typed by hand and a trailing `;` is not a\n * mistake worth an error.\n *\n * @param path - Path of the field to validate.\n * @param config - Optional message override and `when` condition.\n * @returns void\n */\nexport function emails<TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<string, SchemaPathRules.Supported, TPathKind>,\n config?: ArsValidatorConfig<string, TPathKind>\n): void {\n validate(path, ctx => {\n if (config?.when && !config.when(ctx)) return null;\n const input = ctx.value();\n if (!input || input.length === 0) return null;\n const parts = input.replaceAll(/\\r\\n/g, '').split(';');\n const isValid = parts.every(part => part.length === 0 || !!SystemUtils.parseEmail(part));\n return isValid ? null : { kind: 'emails', message: config?.message ?? ARS_VALIDATOR_MESSAGES['emails'] };\n });\n}\n\n/**\n * Requires the value to be a `\"HH:MM\"` time and, when slots are given, to fall inside one of them.\n *\n * The signal-form counterpart of `TimeValidatorDirective`. An empty value passes.\n *\n * @param path - Path of the field to validate.\n * @param slots - Optional reactive function returning the pipe-separated allowed ranges\n * (e.g. `\"08:00-12:00|14:00-18:00\"`), or `undefined` for no restriction.\n * @param config - Optional message override and `when` condition.\n * @returns void\n */\nexport function time<TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<string, SchemaPathRules.Supported, TPathKind>,\n slots?: () => string | undefined,\n config?: ArsValidatorConfig<string, TPathKind>\n): void {\n /**\n * Turns `\"HH:MM\"` into a comparable integer (`\"09:30\"` -> `930`).\n * @param value - The time string to parse.\n * @returns The comparable integer, or `-1` when the string is not a valid time.\n */\n const getTime = (value: string): number => {\n const p = value.split(':');\n if (p.length !== 2) return -1;\n const hh = parseInt(p[0], 10);\n if (isNaN(hh) || hh < 0 || hh > 23) return -1;\n const mm = parseInt(p[1], 10);\n if (isNaN(mm) || mm < 0 || mm > 59) return -1;\n return hh * 100 + mm;\n };\n\n validate(path, ctx => {\n if (config?.when && !config.when(ctx)) return null;\n const input = ctx.value();\n if (!input || input.length === 0) return null;\n const invalid = { kind: 'time', message: config?.message ?? ARS_VALIDATOR_MESSAGES['time'] };\n const t = getTime(input);\n if (t === -1) return invalid;\n const slotsValue = slots?.();\n if (slotsValue) {\n const inSlot = slotsValue.split('|').some(s => {\n const from = getTime(s.substring(0, 5));\n const to = getTime(s.substring(6));\n return from !== -1 && to !== -1 && from <= t && to >= t;\n });\n if (!inSlot) return invalid;\n }\n return null;\n });\n}\n\n/**\n * Requires the value to equal the value of another field of the same form.\n *\n * The signal-form counterpart of `EqualsValidatorDirective`. Reactive on both fields, which is\n * what the directive needed a `valueChanges` subscription to obtain: retyping the first password\n * re-validates the confirmation without anyone wiring the two together.\n *\n * @param path - Path of the field to validate.\n * @param other - Path of the field whose value must match.\n * @param config - Optional message override and `when` condition.\n * @returns void\n */\nexport function equals<TValue, TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n other: SchemaPath<TValue, SchemaPathRules.Supported>,\n config?: ArsValidatorConfig<TValue, TPathKind>\n): void {\n validate(path, ctx => {\n if (config?.when && !config.when(ctx)) return null;\n return ctx.valueOf(other) === ctx.value()\n ? null\n : { kind: 'equals', message: config?.message ?? ARS_VALIDATOR_MESSAGES['equals'] };\n });\n}\n\n/**\n * Requires the value to be either empty or a complete six-digit one-time code.\n *\n * The schema-level counterpart of the validator inside `OtpInputComponent`: a partial code is an\n * error, an empty one is `required()`'s business.\n *\n * @param path - Path of the field to validate.\n * @param config - Optional message override and `when` condition.\n * @returns void\n */\nexport function otp<TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<string, SchemaPathRules.Supported, TPathKind>,\n config?: ArsValidatorConfig<string, TPathKind>\n): void {\n validate(path, ctx => {\n if (config?.when && !config.when(ctx)) return null;\n const input = ctx.value() ?? '';\n if (input.length === 0) return null;\n return /^\\d{6}$/.test(input)\n ? null\n : { kind: 'otp', message: config?.message ?? ARS_VALIDATOR_MESSAGES['otp'] };\n });\n}\n\n/** Helpers around signal forms that are not validators themselves. */\nexport class SignalsUtils {\n\n /**\n * Builds the error text for a signal-forms field.\n *\n * Deliberately dumb: the wording lives in the schema, next to the rule that produces it\n * (`required(p.x, { message: ... })`), so a field says what is wrong with it in one place\n * instead of here in a switch that has to guess from the error kind. The map below is only\n * the safety net for the rules declared without a message — the Angular built-ins, plus\n * {@link ARS_VALIDATOR_MESSAGES} for the ones declared in this file.\n * @param errors - The errors currently on the field, from `f.x().errors()`.\n * @param message - Optional override applied to every error of the field.\n * @returns The first relevant error text, or `undefined` when the field has no errors.\n */\n public static getFieldErrorMessage(\n errors: readonly { kind: string; message?: string }[],\n message?: string\n ): string | undefined {\n if (!errors || errors.length === 0) return undefined;\n\n const fallback: Record<string, string> = {\n // Angular built-ins declared without a message of their own.\n min: 'Valore troppo basso',\n max: 'Valore troppo alto',\n minLength: 'Testo troppo corto',\n maxLength: 'Testo troppo lungo',\n pattern: 'Formato non valido',\n email: 'Indirizzo email non valido',\n minDate: 'Data troppo indietro',\n maxDate: 'Data troppo avanti',\n parse: 'Valore non valido',\n matDatepickerParse: 'Data non valida',\n matDatepickerMin: 'Data troppo indietro',\n matDatepickerMax: 'Data troppo avanti',\n matDatepickerFilter: 'Data non selezionabile',\n matStartDateInvalid: 'Intervallo non valido',\n matEndDateInvalid: 'Intervallo non valido',\n matTimepickerParse: 'Orario non valido',\n matTimepickerMin: 'Orario troppo presto',\n matTimepickerMax: 'Orario troppo tardi',\n // The rules of this file, from the single table above: adding a validator there is enough,\n // and this map can never fall behind it.\n ...ARS_VALIDATOR_MESSAGES,\n };\n\n\n message = message ?? errors[0].message ?? fallback[errors[0].kind] ?? '';\n return message.length > 0 ? message : 'Non valido';\n }\n}\n","/*\n * Public API Surface of @arsedizioni/ars-utils/core.validators\n *\n * Template-driven form validators. Kept OUT of `core` on purpose: every one of them pulls in\n * `@angular/forms` (53 KB), and `core` is on the boot path of every application through\n * `ThemeService`, `BroadcastService` and friends. Importing a validator now costs `@angular/forms`\n * only to the lazy chunk that actually uses one.\n */\nexport * from './validators';\n\n// Signal-form flavour of the same rules. Lives here and not in a separate entry point because\n// `@angular/forms/signals` depends on `@angular/forms` anyway, so the two never travel apart.\nexport * from './signals';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;AAQA;;;AAGG;MAMU,kBAAkB,CAAA;AAL/B,IAAA,WAAA,GAAA;;QAQW,IAAA,CAAA,SAAS,GAAG,KAAK,CAAsE,SAAS;sFAAC;AAW3G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../projects/ars-utils/core.validators/validIfDirective.ts","../../../projects/ars-utils/core.validators/equalsValidatorDirective.ts","../../../projects/ars-utils/core.validators/notEqualValidatorDirective.ts","../../../projects/ars-utils/core.validators/emailsValidatorDirective.ts","../../../projects/ars-utils/core.validators/guidValidatorDirective.ts","../../../projects/ars-utils/core.validators/sqlDateValidatorDirective.ts","../../../projects/ars-utils/core.validators/notFutureValidatorDirective.ts","../../../projects/ars-utils/core.validators/urlValidatorDirective.ts","../../../projects/ars-utils/core.validators/fileSizeValidatorDirective.ts","../../../projects/ars-utils/core.validators/maxTermsValidatorDirective.ts","../../../projects/ars-utils/core.validators/passwordValidatorDirective.ts","../../../projects/ars-utils/core.validators/timeValidatorDirective.ts","../../../projects/ars-utils/core.validators/emptiness.ts","../../../projects/ars-utils/core.validators/notEmptyValidatorDirective.ts","../../../projects/ars-utils/core.validators/requiredNotEmptyValidatorDirective.ts","../../../projects/ars-utils/core.validators/signals.ts","../../../projects/ars-utils/core.validators/public_api.ts","../../../projects/ars-utils/core.validators/arsedizioni-ars-utils-core.validators.ts"],"sourcesContent":["import { Directive, input } from \"@angular/core\";\r\nimport {\r\n AbstractControl,\r\n NG_VALIDATORS,\r\n ValidationErrors,\r\n Validator,\r\n} from \"@angular/forms\";\r\n\r\n/**\r\n * Directive that delegates validation to an externally provided validator function.\r\n * Bind `[validator]=\"myFn\"` where `myFn` is `(c: AbstractControl) => ValidationErrors | null`.\r\n */\r\n@Directive({\r\n selector: '[validator]',\r\n providers: [{ provide: NG_VALIDATORS, useExisting: ValidatorDirective, multi: true }],\r\n standalone: true,\r\n})\r\nexport class ValidatorDirective implements Validator {\r\n\r\n /** The custom validator function to apply. */\r\n readonly validator = input<((control: AbstractControl) => ValidationErrors | null) | undefined>(undefined);\r\n\r\n /**\r\n * Invokes the provided validator function against the given control.\r\n * Returns `null` (valid) when no function is bound.\r\n * @param control - The form control to validate.\r\n */\r\n validate(control: AbstractControl): ValidationErrors | null {\r\n const fn = this.validator();\r\n return fn ? fn(control) : null;\r\n }\r\n}\r\n","import { Directive, forwardRef, input } from \"@angular/core\";\r\nimport {\r\n AbstractControl,\r\n NG_VALIDATORS,\r\n ValidationErrors,\r\n Validator,\r\n} from \"@angular/forms\";\r\nimport { Validated } from '@arsedizioni/ars-utils/core';\r\n\r\n/**\r\n * Directive that validates a control using the host object's `isValid()` method\r\n * or a boolean expression passed via `[validIf]`.\r\n */\r\n@Directive({\r\n selector: \"[validIf]\",\r\n providers: [\r\n {\r\n provide: NG_VALIDATORS,\r\n useExisting: forwardRef(() => ValidIfDirective),\r\n multi: true,\r\n },\r\n ],\r\n standalone: true,\r\n})\r\nexport class ValidIfDirective implements Validator {\r\n\r\n /** When `true`, the control is considered valid regardless of the bound value. */\r\n readonly validIf = input<boolean>(false);\r\n\r\n /**\r\n * Validates the control value against a boolean flag or the value's own `isValid()` method.\r\n * @param control - The form control to validate.\r\n */\r\n validate(control: AbstractControl): ValidationErrors | null {\r\n let isValid = false;\r\n const c = control.value ? (control.value as Validated) : null;\r\n if (!c) {\r\n isValid = this.validIf() === true;\r\n } else {\r\n try {\r\n isValid = c.isValid();\r\n } catch { }\r\n }\r\n return isValid ? null : { validIf: \"Non valido.\" };\r\n }\r\n}\r\n","import { DestroyRef, Directive, effect, forwardRef, inject, input } from \"@angular/core\";\nimport {\n AbstractControl,\n NG_VALIDATORS,\n ValidationErrors,\n Validator,\n} from \"@angular/forms\";\nimport { Subscription } from \"rxjs\";\n\n/**\n * Directive that validates that the host control's value equals the value of another control.\n * Bind `[equals]=\"otherControl\"`.\n *\n * The host control is re-validated whenever the OTHER control's value changes:\n * without this, typing a new password AFTER the confirmation field was filled\n * left the form incorrectly valid (the classic password/confirm bug).\n *\n * IMPORTANT (reciprocal-binding safety): the re-validation triggered from the\n * other control's `valueChanges` runs with `{ emitEvent: false }`. Calling\n * Angular's `onValidatorChange` instead would re-emit valueChanges, so a\n * reciprocal setup (A [equals]=B and B [equals]=A) would overflow the stack.\n */\n@Directive({\n selector: \"[equals]\",\n providers: [\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => EqualsValidatorDirective),\n multi: true,\n },\n ],\n standalone: true,\n})\nexport class EqualsValidatorDirective implements Validator {\n\n /** The control whose value must match the host control's value. */\n readonly equals = input<AbstractControl | undefined>(undefined);\n\n /** The host control, captured on the first validate() call. */\n private hostControl?: AbstractControl;\n\n /** Subscription to the other control's valueChanges. */\n private subscription?: Subscription;\n\n constructor() {\n // Re-subscribe whenever the [equals] binding points to a different control,\n // and re-validate the host on every change of the other control.\n effect(() => {\n const other = this.equals();\n this.subscription?.unsubscribe();\n this.subscription = other?.valueChanges.subscribe(() =>\n // emitEvent:false breaks the reciprocal valueChanges loop (see class doc).\n this.hostControl?.updateValueAndValidity({ emitEvent: false })\n );\n // Re-validate the host when the bound control itself is swapped.\n this.hostControl?.updateValueAndValidity({ emitEvent: false });\n });\n inject(DestroyRef).onDestroy(() => this.subscription?.unsubscribe());\n }\n\n /**\n * Validates that the host control value equals the bound control's value.\n * Returns `null` (valid) when no control is bound.\n * @param control - The form control to validate.\n * @returns `null` when valid, `{ equals: ... }` otherwise.\n */\n validate(control: AbstractControl): ValidationErrors | null {\n this.hostControl = control;\n const eq = this.equals();\n if (!eq) return null;\n return eq.value === control.value ? null : { equals: \"Non valido.\" };\n }\n}\n","import { DestroyRef, Directive, effect, forwardRef, inject, input } from \"@angular/core\";\nimport {\n AbstractControl,\n NG_VALIDATORS,\n ValidationErrors,\n Validator,\n} from \"@angular/forms\";\nimport { Subscription } from \"rxjs\";\n\n/**\n * Directive that validates that the host control's value is different from another control's value.\n * Bind `[notEqual]=\"otherControl\"`.\n *\n * The host control is re-validated whenever the OTHER control's value changes,\n * so editing either field keeps both error states consistent.\n *\n * IMPORTANT (reciprocal-binding safety): the re-validation triggered from the\n * other control's `valueChanges` is run with `{ emitEvent: false }`. Using\n * Angular's `onValidatorChange` here instead would call `host.updateValueAndValidity()`\n * WITH events, so a reciprocal setup (A [notEqual]=B and B [notEqual]=A) would\n * ping-pong valueChanges between the two controls and overflow the stack.\n */\n@Directive({\n selector: \"[notEqual]\",\n providers: [\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => NotEqualValidatorDirective),\n multi: true,\n },\n ],\n standalone: true,\n})\nexport class NotEqualValidatorDirective implements Validator {\n\n /** The control whose value must differ from the host control's value. */\n readonly notEqual = input<AbstractControl | undefined>(undefined);\n\n /** The host control, captured on the first validate() call. */\n private hostControl?: AbstractControl;\n\n /** Subscription to the other control's valueChanges. */\n private subscription?: Subscription;\n\n constructor() {\n effect(() => {\n const other = this.notEqual();\n this.subscription?.unsubscribe();\n this.subscription = other?.valueChanges.subscribe(() =>\n // Re-validate the host WITHOUT emitting valueChanges, otherwise a\n // reciprocal binding would loop forever (see class doc).\n this.hostControl?.updateValueAndValidity({ emitEvent: false })\n );\n // Re-validate the host when the bound control itself is swapped.\n this.hostControl?.updateValueAndValidity({ emitEvent: false });\n });\n inject(DestroyRef).onDestroy(() => this.subscription?.unsubscribe());\n }\n\n /**\n * Validates that the host control value is not equal to the bound control's value.\n * Also clears the `notequal` error on the other control when the host becomes valid.\n * Returns `null` (valid) when no control is bound.\n * @param control - The form control to validate.\n * @returns `null` when valid, `{ notequal: true }` otherwise.\n */\n validate(control: AbstractControl): ValidationErrors | null {\n this.hostControl = control;\n\n const notEqual = this.notEqual();\n if (!notEqual) return null;\n\n const isValid = (!notEqual.value && !control.value) || (notEqual.value !== control.value);\n const errors: ValidationErrors | null = isValid ? null : { notequal: true };\n\n if (errors) {\n control.markAsTouched();\n } else if (notEqual.hasError('notequal')) {\n const { notequal: _removed, ...rest } = notEqual.errors ?? {};\n // emitEvent:false on both: clearing the partner's error must not feed\n // back through valueChanges/statusChanges into this validator.\n notEqual.setErrors(Object.keys(rest).length > 0 ? rest : null, { emitEvent: false });\n notEqual.updateValueAndValidity({ onlySelf: true, emitEvent: false });\n notEqual.markAsTouched();\n notEqual.markAsDirty();\n }\n return errors;\n }\n}\n","import { Directive, forwardRef } from \"@angular/core\";\r\nimport {\r\n AbstractControl,\r\n NG_VALIDATORS,\r\n ValidationErrors,\r\n Validator,\r\n} from \"@angular/forms\";\r\nimport { SystemUtils } from \"@arsedizioni/ars-utils/core\";\r\n\r\n/**\r\n * Directive that validates a semicolon-separated list of email addresses.\r\n * Apply `emails` to a text input containing one or more addresses separated by `;`.\r\n */\r\n@Directive({\r\n selector: \"[emails]\",\r\n providers: [\r\n {\r\n provide: NG_VALIDATORS,\r\n useExisting: forwardRef(() => EmailsValidatorDirective),\r\n multi: true,\r\n },\r\n ],\r\n standalone: true,\r\n})\r\nexport class EmailsValidatorDirective implements Validator {\r\n\r\n /**\r\n * Validates each address in a semicolon-separated email list.\r\n * Returns `null` when the control is empty.\r\n * @param control - The form control to validate.\r\n */\r\n validate(control: AbstractControl): ValidationErrors | null {\r\n const input: string = control.value;\r\n if (!input || input.length === 0) return null;\r\n const parts = input.replaceAll(/\\r\\n/g, '').split(';');\r\n const isValid = parts.every(part => part.length === 0 || !!SystemUtils.parseEmail(part));\r\n return isValid ? null : { emails: \"Elenco non valido.\" };\r\n }\r\n}\r\n","import { Directive, forwardRef } from \"@angular/core\";\r\nimport {\r\n AbstractControl,\r\n NG_VALIDATORS,\r\n ValidationErrors,\r\n Validator,\r\n} from \"@angular/forms\";\r\nimport { SystemUtils } from \"@arsedizioni/ars-utils/core\";\r\n\r\n/**\r\n * Directive that validates a control value as a GUID / UUID string.\r\n * Apply `guid` to a text input that expects a valid UUID.\r\n */\r\n@Directive({\r\n selector: \"[guid]\",\r\n providers: [\r\n {\r\n provide: NG_VALIDATORS,\r\n useExisting: forwardRef(() => GuidValidatorDirective),\r\n multi: true,\r\n },\r\n ],\r\n standalone: true,\r\n})\r\nexport class GuidValidatorDirective implements Validator {\r\n\r\n /**\r\n * Validates that the control value is a well-formed GUID / UUID.\r\n * Returns `null` when the control is empty.\r\n * @param control - The form control to validate.\r\n */\r\n validate(control: AbstractControl): ValidationErrors | null {\r\n const input: string = control.value;\r\n if (!input || input.length === 0) return null;\r\n return SystemUtils.parseUUID(input) ? null : { guid: \"Non valido.\" };\r\n }\r\n}\r\n","import { Directive, forwardRef } from \"@angular/core\";\nimport {\n AbstractControl,\n NG_VALIDATORS,\n ValidationErrors,\n Validator,\n} from \"@angular/forms\";\nimport { endOfDay } from 'date-fns';\nimport { SystemUtils } from \"@arsedizioni/ars-utils/core\";\n\n/**\n * Directive that validates a control value as a parseable SQL-compatible date string.\n * Apply `sqlDate` to a text input that expects a date after year 1750.\n */\n@Directive({\n selector: \"[sqlDate]\",\n providers: [\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => SqlDateValidatorDirective),\n multi: true,\n },\n ],\n standalone: true,\n})\nexport class SqlDateValidatorDirective implements Validator {\n\n /**\n * Validates that the control value can be parsed as a date after 1750.\n * Returns `null` when the control is empty.\n * @param control - The form control to validate.\n */\n validate(control: AbstractControl): ValidationErrors | null {\n const input: string = control.value;\n if (!input || input.length === 0) return null;\n const parsed = SystemUtils.parseDate(input);\n if (!parsed) return { sqlDate: \"Non valido.\" };\n const d = endOfDay(parsed);\n return d.getFullYear() > 1750 ? null : { sqlDate: \"Non valido.\" };\n }\n}\n","import { Directive, forwardRef } from \"@angular/core\";\nimport {\n AbstractControl,\n NG_VALIDATORS,\n ValidationErrors,\n Validator,\n} from \"@angular/forms\";\nimport { endOfDay } from 'date-fns';\nimport { SystemUtils } from \"@arsedizioni/ars-utils/core\";\n\n/**\n * Directive that validates that a control value is not a future date.\n * Apply `notFuture` to a text input that expects a date on or before today.\n */\n@Directive({\n selector: \"[notFuture]\",\n providers: [\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => NotFutureValidatorDirective),\n multi: true,\n },\n ],\n standalone: true,\n})\nexport class NotFutureValidatorDirective implements Validator {\n\n /**\n * Validates that the control value represents a date that is not in the future.\n * Returns `null` when the control is empty.\n * @param control - The form control to validate.\n */\n validate(control: AbstractControl): ValidationErrors | null {\n const input: string = control.value;\n if (!input || input.length === 0) return null;\n const parsed = SystemUtils.parseDate(input);\n if (!parsed) return { notFuture: \"Non valido.\" };\n const today = endOfDay(new Date());\n const d = endOfDay(parsed);\n return d <= today ? null : { notFuture: \"Non valido.\" };\n }\n}\n","import { Directive, forwardRef } from \"@angular/core\";\r\nimport {\r\n AbstractControl,\r\n NG_VALIDATORS,\r\n ValidationErrors,\r\n Validator,\r\n} from \"@angular/forms\";\r\nimport { SystemUtils } from \"@arsedizioni/ars-utils/core\";\r\n\r\n/**\r\n * Directive that validates a control value as a well-formed URL.\r\n * Apply `url` to a text input that expects a URL.\r\n */\r\n@Directive({\r\n selector: \"[url]\",\r\n providers: [\r\n {\r\n provide: NG_VALIDATORS,\r\n useExisting: forwardRef(() => UrlValidatorDirective),\r\n multi: true,\r\n },\r\n ],\r\n standalone: true,\r\n})\r\nexport class UrlValidatorDirective implements Validator {\r\n\r\n /**\r\n * Validates that the control value is a well-formed URL.\r\n * Returns `null` (valid) when the control is empty.\r\n * @param control - The form control to validate.\r\n */\r\n validate(control: AbstractControl): ValidationErrors | null {\r\n const input: string = control.value;\r\n if (!input || input.length === 0) return null;\r\n return SystemUtils.parseUrl(input) ? null : { url: \"Non valido.\" };\r\n }\r\n}\r\n","import { Directive, forwardRef, input } from \"@angular/core\";\r\nimport {\r\n AbstractControl,\r\n NG_VALIDATORS,\r\n ValidationErrors,\r\n Validator,\r\n} from \"@angular/forms\";\r\n\r\n/**\r\n * Directive that validates a file size against configurable minimum and maximum bounds.\r\n * Bind `[fileSize]` together with `[size]=\"fileSizeInMb\"`, `[maxSizeMb]`, and `[minSizeMb]`.\r\n */\r\n@Directive({\r\n selector: \"[fileSize]\",\r\n providers: [\r\n {\r\n provide: NG_VALIDATORS,\r\n useExisting: forwardRef(() => FileSizeValidatorDirective),\r\n multi: true,\r\n },\r\n ],\r\n standalone: true,\r\n})\r\nexport class FileSizeValidatorDirective implements Validator {\r\n\r\n /** Maximum allowed file size in megabytes. Defaults to 5. */\r\n readonly maxSizeMb = input<number>(5);\r\n\r\n /** Minimum required file size in megabytes. Defaults to 0. */\r\n readonly minSizeMb = input<number>(0);\r\n\r\n /** The actual file size in megabytes to validate against the bounds. */\r\n readonly size = input<number | undefined>(undefined);\r\n\r\n /**\r\n * Validates that the bound file size falls within the configured min/max range.\r\n * Returns `null` when no control value is present.\r\n * @param control - The form control to validate.\r\n */\r\n validate(control: AbstractControl): ValidationErrors | null {\r\n const input = control.value;\r\n if (!input) return null;\r\n const s = this.size() ?? 0;\r\n const isValid = s <= this.maxSizeMb() && s >= this.minSizeMb();\r\n return isValid ? null : { fileSize: \"Non valido.\" };\r\n }\r\n}\r\n","import { Directive, forwardRef, input } from \"@angular/core\";\r\nimport {\r\n AbstractControl,\r\n NG_VALIDATORS,\r\n ValidationErrors,\r\n Validator,\r\n} from \"@angular/forms\";\r\n\r\n/**\r\n * Directive that validates that a control value does not exceed a maximum word count.\r\n * Bind `[maxTerms]=\"10\"` to allow at most 10 whitespace-separated terms.\r\n */\r\n@Directive({\r\n selector: \"[maxTerms]\",\r\n providers: [\r\n {\r\n provide: NG_VALIDATORS,\r\n useExisting: forwardRef(() => MaxTermsValidatorDirective),\r\n multi: true,\r\n },\r\n ],\r\n standalone: true,\r\n})\r\nexport class MaxTermsValidatorDirective implements Validator {\r\n\r\n /** The maximum number of whitespace-separated terms allowed. */\r\n readonly maxTerms = input<number>(0);\r\n\r\n /**\r\n * Validates that the control value contains no more than the configured number of terms.\r\n * Returns `null` when the control is empty.\r\n * @param control - The form control to validate.\r\n */\r\n validate(control: AbstractControl): ValidationErrors | null {\r\n const input: string = control.value;\r\n if (!input) return null;\r\n const terms = input.match(/\\S+/g)?.length ?? 0;\r\n return terms <= this.maxTerms() ? null : { maxTerms: \"Non valido.\" };\r\n }\r\n}\r\n","import { Directive, forwardRef } from \"@angular/core\";\r\nimport {\r\n AbstractControl,\r\n NG_VALIDATORS,\r\n ValidationErrors,\r\n Validator,\r\n} from \"@angular/forms\";\r\nimport { SystemUtils } from \"@arsedizioni/ars-utils/core\";\r\n\r\n/**\r\n * Directive that validates a control value as a sufficiently strong password.\r\n * Apply `password` to a password input.\r\n */\r\n@Directive({\r\n selector: \"[password]\",\r\n providers: [\r\n {\r\n provide: NG_VALIDATORS,\r\n useExisting: forwardRef(() => PasswordValidatorDirective),\r\n multi: true,\r\n },\r\n ],\r\n standalone: true,\r\n})\r\nexport class PasswordValidatorDirective implements Validator {\r\n\r\n /**\r\n * Validates that the control value meets the minimum password-strength requirements.\r\n * @param control - The form control to validate.\r\n */\r\n validate(control: AbstractControl): ValidationErrors | null {\r\n const input: string = control.value ?? '';\r\n const strength = SystemUtils.calculatePasswordStrength(input);\r\n return strength.isValid ? null : { password: \"Non valido.\" };\r\n }\r\n}\r\n","import { Directive, forwardRef, input } from \"@angular/core\";\nimport {\n AbstractControl,\n NG_VALIDATORS,\n ValidationErrors,\n Validator,\n} from \"@angular/forms\";\n\n/**\n * Directive that validates a time string against optional allowed time slot ranges.\n * Bind `[time]` and optionally `[slots]=\"'08:00-12:00|14:00-18:00'\"` (pipe-separated ranges).\n */\n@Directive({\n selector: \"[time]\",\n providers: [\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => TimeValidatorDirective),\n multi: true,\n },\n ],\n standalone: true,\n})\nexport class TimeValidatorDirective implements Validator {\n\n /** Optional pipe-separated list of allowed time ranges, e.g. `\"08:00-12:00|14:00-18:00\"`. */\n readonly slots = input<string | undefined>(undefined);\n\n /**\n * Parses a `\"HH:MM\"` time string into a comparable integer (e.g. `\"09:30\"` -> `930`).\n * Returns `-1` when the string is not a valid time.\n * @param value - The time string to parse.\n */\n private getTime(value: string): number {\n const p = value.split(':');\n if (p.length !== 2) return -1;\n const hh = parseInt(p[0], 10);\n if (isNaN(hh) || hh < 0 || hh > 23) return -1;\n const mm = parseInt(p[1], 10);\n if (isNaN(mm) || mm < 0 || mm > 59) return -1;\n return hh * 100 + mm;\n }\n\n /**\n * Validates that the control value is a valid time string and, when slots are configured,\n * that it falls within at least one of the allowed ranges.\n * Returns `null` when the control is empty.\n * @param control - The form control to validate.\n */\n validate(control: AbstractControl): ValidationErrors | null {\n const input: string = control.value;\n if (!input || input.length === 0) return null;\n\n const t = this.getTime(input);\n if (t === -1) return { time: \"Non valido.\" };\n\n const slotsValue = this.slots();\n if (slotsValue) {\n const isValid = slotsValue.split('|').some(s => {\n const t1 = this.getTime(s.substring(0, 5));\n const t2 = this.getTime(s.substring(6));\n return t1 !== -1 && t2 !== -1 && t1 <= t && t2 >= t;\n });\n return isValid ? null : { time: \"Non valido.\" };\n }\n\n return null;\n }\n}\n","/**\n * @file emptiness.ts\n *\n * The single definition of \"empty\" shared by the `notEmpty` / `requiredNotEmpty` rules, in both\n * their flavours: the template-driven directives and the signal-form validators. It lives apart\n * from either of them so that the two faces of the same rule cannot drift, and it pulls in\n * nothing — not `@angular/forms`, not `@angular/core`.\n */\n\n/**\n * Tells whether a value carries nothing at all.\n *\n * Nullish, the empty string and the empty array all count as missing; anything else does not,\n * including `0` and `false`, which are legitimate values a form can hold.\n *\n * @param value - The value to inspect.\n * @returns `true` when the value is absent, an empty string or an empty array.\n */\nexport function isMissingValue(value: unknown): boolean {\n if (value === undefined || value === null) return true;\n if (typeof value === 'string') return value.length === 0;\n if (Array.isArray(value)) return value.length === 0;\n return false;\n}\n\n/**\n * Tells whether a value is what the `notEmpty` rule rejects: a string made of whitespace alone,\n * or an array with no elements.\n *\n * An absent value and an empty string are deliberately NOT rejected: declaring a field mandatory\n * is the job of `required()` (or of `requiredNotEmpty`), and a blank field would otherwise raise\n * two errors saying the same thing. The empty array is the one exception, because there it IS the\n * only shape emptiness can take — a multi-select never holds `''`.\n *\n * @param value - The value to inspect.\n * @returns `true` when the value is a whitespace-only string or an empty array.\n */\nexport function isBlankValue(value: unknown): boolean {\n if (Array.isArray(value)) return value.length === 0;\n if (typeof value !== 'string') return false;\n return value.length > 0 && value.trim().length === 0;\n}\n","import { Directive, forwardRef } from \"@angular/core\";\nimport {\n AbstractControl,\n NG_VALIDATORS,\n ValidationErrors,\n Validator,\n} from \"@angular/forms\";\nimport { isBlankValue } from \"./emptiness\";\n\n/**\n * Directive that validates that a control value is not blank: neither a whitespace-only string\n * nor an empty array. Apply `notEmpty` to a text input where non-blank content is required, or\n * to a multi-value control that must carry at least one entry.\n *\n * A value that is simply absent passes: saying \"obbligatorio\" is the job of `required`, or of\n * `requiredNotEmpty` when both rules belong on the same control.\n */\n@Directive({\n selector: \"[notEmpty]\",\n providers: [\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => NotEmptyValidatorDirective),\n multi: true,\n },\n ],\n standalone: true,\n})\nexport class NotEmptyValidatorDirective implements Validator {\n\n /**\n * Validates that the control value carries content.\n * Returns `null` when the control is absent or holds a type this rule says nothing about.\n * @param control - The form control to validate.\n * @returns `{ notEmpty: true }` when the value is a blank string or an empty array, `null` otherwise.\n */\n validate(control: AbstractControl): ValidationErrors | null {\n return isBlankValue(control?.value) ? { notEmpty: true } : null;\n }\n}\n","import { Directive, forwardRef } from \"@angular/core\";\nimport {\n AbstractControl,\n NG_VALIDATORS,\n ValidationErrors,\n Validator,\n} from \"@angular/forms\";\nimport { isBlankValue, isMissingValue } from \"./emptiness\";\n\n/**\n * Directive that validates that a control carries actual content: present AND not blank.\n * Apply `requiredNotEmpty` where `required notEmpty` would otherwise be spelled out together.\n *\n * It raises the very errors those two rules raise — `required` when the value is missing, an\n * empty string or an empty array, `notEmpty` when a value is there but made of whitespace alone —\n * so existing error messages and `getFieldErrorMessage` keep working untouched, and the user\n * still reads \"Obbligatorio\" rather than the vaguer \"Non può essere vuoto\".\n *\n * IMPORTANT, on a Material field: this directive does NOT draw the asterisk. `MatInput` reads its\n * own `required` input first and falls back to `hasValidator(Validators.required)`, which no\n * directive-provided validator can satisfy — the validators of a template-driven control are\n * merged into one composed function before they get there. Keep writing `required` on the\n * control next to this one: the two produce the same `{ required: true }` key, so the errors\n * merge and nothing is reported twice.\n *\n * `aria-required` is set here so that assistive technology is told the truth even where the\n * `required` attribute is absent.\n */\n@Directive({\n selector: \"[requiredNotEmpty]\",\n host: { '[attr.aria-required]': 'true' },\n providers: [\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => RequiredNotEmptyValidatorDirective),\n multi: true,\n },\n ],\n standalone: true,\n})\nexport class RequiredNotEmptyValidatorDirective implements Validator {\n\n /**\n * Validates that the control value is present and carries content.\n * @param control - The form control to validate.\n * @returns `{ required: true }` when nothing was entered, `{ notEmpty: true }` when the value\n * is blank, `null` when the value is acceptable.\n */\n validate(control: AbstractControl): ValidationErrors | null {\n const input = control?.value;\n if (isMissingValue(input)) return { required: true };\n return isBlankValue(input) ? { notEmpty: true } : null;\n }\n}\n","import { LogicFn, PathKind, required, SchemaPath, SchemaPathRules, validate } from '@angular/forms/signals';\nimport { SystemUtils, Validated } from '@arsedizioni/ars-utils/core';\nimport { endOfDay } from 'date-fns';\nimport { isBlankValue, isMissingValue } from './emptiness';\n\n/**\n * Options shared by the ARS signal-form validators.\n *\n * Mirrors the `config` argument of the Angular built-ins (`required`, `email`, ...) but carries\n * only what these validators need: the message shown to the user in place of the default one.\n */\nexport interface ArsValidatorConfig<TValue = string, TPathKind extends PathKind = PathKind.Root> {\n /** Message attached to the error, in place of the default Italian text. */\n message?: string;\n /**\n * Applies the rule only while this returns `true`, exactly like the `when` of `required()`\n * and of the other Angular built-ins.\n *\n * It exists because these validators are meant to be paired with `required()` on the same\n * field, and a field that is only required in one mode of a dialog must only be validated in\n * that mode: without this, a leftover value would keep a form invalid in a mode where the\n * field is not even shown.\n */\n when?: NoInfer<LogicFn<TValue, boolean, TPathKind>>;\n}\n\n/**\n * Default texts of the rules declared here, in one place so that the validators and the fallback\n * map of `SignalsUtils.getFieldErrorMessage` cannot drift apart: a rule added below without a\n * message here would show \"Errore\", and one renamed here without touching the validator would\n * leave the map with a kind nobody produces.\n */\n/**\n * Earliest date {@link date} and {@link dateRange} accept: 1 January 1970.\n *\n * Everything this application stores — events, certificates, payments, communications — happened\n * after it, so an earlier value is always a typo (a two-digit year, a slipped keystroke) and never\n * real data. The floor is deliberately higher than the one of {@link sqlDate}, which only asks\n * what SQL Server can physically store.\n */\nexport const MIN_VALID_YEAR = 1970;\n\nexport const ARS_VALIDATOR_MESSAGES: Record<string, string> = {\n // Produced by the Angular built-in `required()` and by {@link requiredNotEmpty}. It sits here,\n // and no longer among the built-in fallbacks below, so that the text exists exactly once.\n required: 'Obbligatorio',\n guid: 'Ticket non riconosciuto',\n password: 'Password non sufficientemente robusta',\n notEmpty: 'Non può essere vuoto o contenere solo spazi.',\n notEqual: 'Deve essere diverso dall\\'altro valore',\n sqlDate: 'Data non valida',\n date: 'Data non valida',\n dateRange: 'Intervallo non valido',\n notFuture: 'La data non può essere futura',\n url: 'Indirizzo non valido',\n maxTerms: 'Troppe parole',\n fileSize: 'Dimensione del file non ammessa',\n validIf: 'Non valido',\n emails: 'Elenco non valido',\n time: 'Orario non valido',\n equals: 'I due valori non coincidono',\n otp: 'Codice non valido',\n};\n\n/**\n * Requires the value to be a well-formed GUID / UUID.\n *\n * The signal-form counterpart of `GuidValidatorDirective`, sharing its rule down to the empty\n * case: an empty value is NOT an error here, because saying \"obbligatorio\" is the job of\n * `required()` and two errors on one empty field only ever read as noise.\n *\n * @param path - Path of the field to validate.\n * @param config - Optional message override.\n * @returns void\n * @example\n * const f = form(this.model, p => { required(p.serial); guid(p.serial); });\n */\nexport function guid<TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<string, SchemaPathRules.Supported, TPathKind>,\n config?: ArsValidatorConfig<string, TPathKind>\n): void {\n validate(path, ctx => {\n if (config?.when && !config.when(ctx)) return null;\n const input = ctx.value();\n if (!input || input.length === 0) return null;\n return SystemUtils.parseUUID(input)\n ? null\n : { kind: 'guid', message: config?.message ?? ARS_VALIDATOR_MESSAGES['guid'] };\n });\n}\n\n/**\n * Requires the value to be a password strong enough for {@link SystemUtils.calculatePasswordStrength}.\n *\n * The signal-form counterpart of `PasswordValidatorDirective`. Unlike {@link guid} it does judge\n * the empty value, because an empty password IS a weak one and the directive behaved the same way.\n *\n * @param path - Path of the field to validate.\n * @param config - Optional message override.\n * @returns void\n */\nexport function password<TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<string, SchemaPathRules.Supported, TPathKind>,\n config?: ArsValidatorConfig<string, TPathKind>\n): void {\n validate(path, ctx => {\n if (config?.when && !config.when(ctx)) return null;\n const strength = SystemUtils.calculatePasswordStrength(ctx.value() ?? '');\n return strength.isValid\n ? null\n : { kind: 'password', message: config?.message ?? ARS_VALIDATOR_MESSAGES['password'] };\n });\n}\n\n/**\n * Requires the value not to be made of whitespace alone, and a collection not to be empty.\n *\n * The signal-form counterpart of `NotEmptyValidatorDirective`, sharing its predicate through\n * {@link isBlankValue}: a blank string and an empty array are errors, an absent value is not.\n * That last part is not an oversight — saying \"obbligatorio\" belongs to `required()`, and a field\n * that is merely blank would otherwise raise two errors that mean the same thing. Pair the two,\n * or reach for {@link requiredNotEmpty}, when a field must be both present and non-blank.\n *\n * Replaces the `pattern(p.x, /\\S/)` workaround: same rule, but the intent is in the name and the\n * error kind is `notEmpty` rather than `pattern`.\n *\n * @param path - Path of the field to validate.\n * @param config - Optional message override.\n * @returns void\n * @example\n * const f = form(this.model, p => { required(p.city); notEmpty(p.city); });\n * @example\n * const f = form(this.model, p => { notEmpty(p.tags); }); // at least one tag\n */\nexport function notEmpty<TValue extends string | readonly unknown[] | undefined,\n TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n config?: ArsValidatorConfig<TValue, TPathKind>\n): void {\n validate(path, ctx => {\n if (config?.when && !config.when(ctx)) return null;\n return isBlankValue(ctx.value())\n ? { kind: 'notEmpty', message: config?.message ?? ARS_VALIDATOR_MESSAGES['notEmpty'] }\n : null;\n });\n}\n\n/**\n * Requires the value to be both present and made of something: the two rules a mandatory text\n * field almost always needs together, declared once.\n *\n * The signal-form counterpart of `RequiredNotEmptyValidatorDirective`. It raises the errors the\n * two rules raise on their own rather than a kind of its own — `required` when nothing was\n * entered, `notEmpty` when a value is there but blank — so the message stays as precise as it was\n * and nothing downstream needs to learn a new kind.\n *\n * The presence half is DELEGATED to Angular's own `required()` and is not reimplemented here.\n * That call does more than validate: it writes the `REQUIRED` metadata on the field, and that\n * metadata is the only thing the Material compatibility layer looks at when it answers\n * `hasValidator(Validators.required)` through `field().required()`. A plain `validate()` would\n * reject the empty value just the same and silently drop the asterisk from the label.\n *\n * The empty array is the one case handled here rather than there: Angular's emptiness check is\n * `value === '' || value === false || value == null`, so an empty array walks straight past\n * `required()`. It is reported with the `required` kind all the same, because for a multi-value\n * field \"nothing selected\" is exactly what the user needs to be told.\n *\n * @param path - Path of the field to validate.\n * @param config - Optional message override, applied to whichever of the two errors is raised,\n * and `when` condition, honoured by both halves of the rule.\n * @returns void\n * @example\n * const f = form(this.model, p => { requiredNotEmpty(p.city); });\n */\nexport function requiredNotEmpty<TValue extends string | readonly unknown[] | undefined,\n TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n config?: ArsValidatorConfig<TValue, TPathKind>\n): void {\n required(path, {\n message: config?.message ?? ARS_VALIDATOR_MESSAGES['required'],\n when: config?.when,\n });\n\n validate(path, ctx => {\n if (config?.when && !config.when(ctx)) return null;\n const input = ctx.value();\n // The empty array, which `required()` above does not see.\n if (Array.isArray(input) && input.length === 0) {\n return { kind: 'required', message: config?.message ?? ARS_VALIDATOR_MESSAGES['required'] };\n }\n // Nullish and the empty string have already been reported by `required()`: saying it twice\n // would put two errors on one empty field, which is what this rule exists to avoid.\n if (isMissingValue(input)) return null;\n return isBlankValue(input)\n ? { kind: 'notEmpty', message: config?.message ?? ARS_VALIDATOR_MESSAGES['notEmpty'] }\n : null;\n });\n}\n\n/**\n * Requires the value to differ from the value of another field of the same form.\n *\n * The signal-form counterpart of `NotEqualValidatorDirective`, with its exact rule: two empty\n * values are considered different, so an untouched pair of fields does not start out in error.\n * Reactive on both fields — editing either one re-validates this one, which is what the\n * directive needed a `valueChanges` subscription (and a re-entrancy guard) to achieve.\n *\n * @param path - Path of the field to validate.\n * @param other - Path of the field whose value must differ.\n * @param config - Optional message override and `when` condition.\n * @returns void\n */\nexport function notEqual<TValue, TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n other: SchemaPath<TValue, SchemaPathRules.Supported>,\n config?: ArsValidatorConfig<TValue, TPathKind>\n): void {\n validate(path, ctx => {\n if (config?.when && !config.when(ctx)) return null;\n const mine = ctx.value();\n const theirs = ctx.valueOf(other);\n const isValid = (!theirs && !mine) || theirs !== mine;\n return isValid ? null : { kind: 'notEqual', message: config?.message ?? ARS_VALIDATOR_MESSAGES['notEqual'] };\n });\n}\n\n/**\n * Requires the value to be a date the backend can store: parseable, and after 1750.\n *\n * The signal-form counterpart of `SqlDateValidatorDirective`. The year floor is not arbitrary —\n * it is what separates a real date from the 01/01/0001 that a mistyped year produces, which SQL\n * Server rejects with an error nobody can read.\n *\n * @param path - Path of the field to validate.\n * @param config - Optional message override and `when` condition.\n * @returns void\n */\nexport function sqlDate<TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<string, SchemaPathRules.Supported, TPathKind>,\n config?: ArsValidatorConfig<string, TPathKind>\n): void {\n validate(path, ctx => {\n if (config?.when && !config.when(ctx)) return null;\n const input = ctx.value();\n if (!input || input.length === 0) return null;\n const parsed = SystemUtils.parseDate(input);\n const invalid = { kind: 'sqlDate', message: config?.message ?? ARS_VALIDATOR_MESSAGES['sqlDate'] };\n if (!parsed) return invalid;\n return endOfDay(parsed).getFullYear() > 1750 ? null : invalid;\n });\n}\n\n/**\n * Requires the value to be a real date, as {@link SystemUtils.parseDate} understands one.\n *\n * This is the rule for anything a user picks or types as a date: it accepts both the `Date` a\n * Material datepicker or timepicker writes into the model and the text of a plain input, since\n * `parseDate` handles the shapes this codebase produces (ISO, `dd/MM/yyyy`, `yyyy-MM-dd`, and the\n * shorthand forms). Empty passes — saying \"obbligatorio\" is the job of `required()`.\n *\n * A date earlier than {@link MIN_VALID_YEAR} (1 January 1970) is rejected: nothing this\n * application stores predates it, so an earlier value is a typo rather than data.\n *\n * Distinct from {@link sqlDate} on purpose: that one is about what the DATABASE can store (the\n * 1750 floor), this one is about whether the value is a date at all. Pair them when both matter.\n *\n * @param path - Path of the field to validate.\n * @param config - Optional message override and `when` condition.\n * @returns void\n * @example\n * const f = form(this.model, p => { required(p.expiry); date(p.expiry); });\n */\nexport function date<TValue extends string | Date | null | undefined,\n TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n config?: ArsValidatorConfig<TValue, TPathKind>\n): void {\n validate(path, ctx => {\n if (config?.when && !config.when(ctx)) return null;\n const input = ctx.value();\n if (input === undefined || input === null || input === '') return null;\n const parsed = SystemUtils.parseDate(input);\n return parsed && parsed.getFullYear() >= MIN_VALID_YEAR\n ? null\n : { kind: 'date', message: config?.message ?? ARS_VALIDATOR_MESSAGES['date'] };\n });\n}\n\n/**\n * Requires the two ends of a date range to be real dates and to be in order.\n *\n * Written for the two inputs of a `mat-date-range-input`, whose start and end live in two\n * separate fields of the model. Each end is checked with the same rule as {@link date}, and the\n * ordering is checked only when BOTH ends are filled in — a half-open range (\"from today\n * onwards\") is a legitimate filter, not an error. The 1 January 1970 floor of {@link date}\n * applies to both ends.\n *\n * The rule is bound to BOTH paths, so the error appears on whichever end the user is looking at\n * and a single `<mat-error>` under the range can read either one. Comparison is made on the end\n * of the day, so picking the same day for both ends is valid.\n *\n * @param from - Path of the field holding the start of the range.\n * @param to - Path of the field holding the end of the range.\n * @param config - Optional message override (used for the ordering error) and `when` condition.\n * @returns void\n * @example\n * const f = form(this.model, p => { dateRange(p.sentFrom, p.sentTo); });\n */\nexport function dateRange<TValue extends string | Date | null | undefined,\n TPathKind extends PathKind = PathKind.Root>(\n from: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n to: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n config?: ArsValidatorConfig<TValue, TPathKind>\n): void {\n date(from, config);\n date(to, config);\n\n /**\n * Compares the two ends of the range once both of them are filled in.\n * @param startValue - Raw value of the start field.\n * @param endValue - Raw value of the end field.\n * @returns The ordering error, or `null` when the pair is acceptable.\n */\n const checkOrder = (startValue: TValue, endValue: TValue) => {\n const start = SystemUtils.parseDate(startValue ?? undefined);\n const end = SystemUtils.parseDate(endValue ?? undefined);\n // A half-open range is legitimate: nothing to compare until both ends are there. An end that\n // is not a valid date is already reported by the `date` rule bound above, so it is skipped\n // here rather than reported twice.\n if (!start || !end) return null;\n if (start.getFullYear() < MIN_VALID_YEAR || end.getFullYear() < MIN_VALID_YEAR) return null;\n return endOfDay(start) <= endOfDay(end)\n ? null\n : { kind: 'dateRange', message: config?.message ?? ARS_VALIDATOR_MESSAGES['dateRange'] };\n };\n\n // Reading the opposite end through `valueOf` keeps each rule reactive on the other field, so\n // filling in one end re-validates the other.\n validate(from, ctx => {\n if (config?.when && !config.when(ctx)) return null;\n return checkOrder(ctx.value(), ctx.valueOf(to));\n });\n validate(to, ctx => {\n if (config?.when && !config.when(ctx)) return null;\n return checkOrder(ctx.valueOf(from), ctx.value());\n });\n}\n\n/**\n * Requires the value to be a date that is not in the future.\n *\n * The signal-form counterpart of `NotFutureValidatorDirective`. Today counts as valid: the\n * comparison is made on the end of the day, so a date entered this morning does not become\n * invalid because the clock says 09:00.\n *\n * @param path - Path of the field to validate.\n * @param config - Optional message override and `when` condition.\n * @returns void\n */\nexport function notFuture<TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<string, SchemaPathRules.Supported, TPathKind>,\n config?: ArsValidatorConfig<string, TPathKind>\n): void {\n validate(path, ctx => {\n if (config?.when && !config.when(ctx)) return null;\n const input = ctx.value();\n if (!input || input.length === 0) return null;\n const parsed = SystemUtils.parseDate(input);\n const invalid = { kind: 'notFuture', message: config?.message ?? ARS_VALIDATOR_MESSAGES['notFuture'] };\n if (!parsed) return invalid;\n return endOfDay(parsed) <= endOfDay(new Date()) ? null : invalid;\n });\n}\n\n/**\n * Requires the value to be a well-formed URL. An empty value passes, as everywhere else here.\n *\n * The signal-form counterpart of `UrlValidatorDirective`.\n *\n * @param path - Path of the field to validate.\n * @param config - Optional message override and `when` condition.\n * @returns void\n */\nexport function url<TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<string, SchemaPathRules.Supported, TPathKind>,\n config?: ArsValidatorConfig<string, TPathKind>\n): void {\n validate(path, ctx => {\n if (config?.when && !config.when(ctx)) return null;\n const input = ctx.value();\n if (!input || input.length === 0) return null;\n return SystemUtils.parseUrl(input)\n ? null\n : { kind: 'url', message: config?.message ?? ARS_VALIDATOR_MESSAGES['url'] };\n });\n}\n\n/**\n * Requires the value to hold no more than `max` whitespace-separated terms.\n *\n * The signal-form counterpart of `MaxTermsValidatorDirective`, used on the search boxes where\n * the backend refuses a query past a certain number of words.\n *\n * @param path - Path of the field to validate.\n * @param max - The maximum number of terms, as a number or a reactive function.\n * @param config - Optional message override and `when` condition.\n * @returns void\n */\nexport function maxTerms<TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<string, SchemaPathRules.Supported, TPathKind>,\n max: number | (() => number),\n config?: ArsValidatorConfig<string, TPathKind>\n): void {\n validate(path, ctx => {\n if (config?.when && !config.when(ctx)) return null;\n const input = ctx.value();\n if (!input) return null;\n const terms = input.match(/\\S+/g)?.length ?? 0;\n return terms <= (typeof max === 'function' ? max() : max)\n ? null\n : { kind: 'maxTerms', message: config?.message ?? ARS_VALIDATOR_MESSAGES['maxTerms'] };\n });\n}\n\n/**\n * Requires the size of the picked file to fall within the allowed range.\n *\n * The signal-form counterpart of `FileSizeValidatorDirective`, and it keeps its shape: the field\n * itself holds the file NAME, while the size arrives from outside — the control that picked the\n * file knows it, the form does not. An empty field passes, so \"no file\" is `required()`'s call\n * and not a size error.\n *\n * @param path - Path of the field holding the file name.\n * @param sizeMb - The size of the picked file in megabytes, as a reactive function.\n * @param maxSizeMb - The maximum allowed size in megabytes. Defaults to `5`.\n * @param minSizeMb - The minimum required size in megabytes. Defaults to `0`.\n * @param config - Optional message override and `when` condition.\n * @returns void\n */\nexport function fileSize<TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<string, SchemaPathRules.Supported, TPathKind>,\n sizeMb: () => number | undefined,\n maxSizeMb: number | (() => number) = 5,\n minSizeMb: number | (() => number) = 0,\n config?: ArsValidatorConfig<string, TPathKind>\n): void {\n validate(path, ctx => {\n if (config?.when && !config.when(ctx)) return null;\n if (!ctx.value()) return null;\n const size = sizeMb() ?? 0;\n const max = typeof maxSizeMb === 'function' ? maxSizeMb() : maxSizeMb;\n const min = typeof minSizeMb === 'function' ? minSizeMb() : minSizeMb;\n return size <= max && size >= min\n ? null\n : { kind: 'fileSize', message: config?.message ?? ARS_VALIDATOR_MESSAGES['fileSize'] };\n });\n}\n\n/**\n * Requires the value to declare itself valid.\n *\n * The signal-form counterpart of `ValidIfDirective`: when the field holds an object implementing\n * `Validated` the verdict is its own `isValid()`, and when the field is empty the verdict is the\n * `flag`. It is the escape hatch for the composite controls whose validity only they can judge.\n *\n * @param path - Path of the field to validate.\n * @param flag - Verdict used while the field is empty, as a boolean or a reactive function.\n * Defaults to `false`.\n * @param config - Optional message override and `when` condition.\n * @returns void\n */\nexport function validIf<TValue extends Partial<Validated>, TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n flag: boolean | (() => boolean) = false,\n config?: ArsValidatorConfig<TValue, TPathKind>\n): void {\n validate(path, ctx => {\n if (config?.when && !config.when(ctx)) return null;\n const value = ctx.value();\n let isValid: boolean;\n if (!value) {\n isValid = (typeof flag === 'function' ? flag() : flag) === true;\n } else {\n try {\n isValid = value.isValid?.() === true;\n } catch {\n isValid = false;\n }\n }\n return isValid ? null : { kind: 'validIf', message: config?.message ?? ARS_VALIDATOR_MESSAGES['validIf'] };\n });\n}\n\n/**\n * Requires the value to be a semicolon-separated list of valid e-mail addresses.\n *\n * The signal-form counterpart of `EmailsValidatorDirective`. An empty value passes, and so does\n * an empty entry between two semicolons: the list is typed by hand and a trailing `;` is not a\n * mistake worth an error.\n *\n * @param path - Path of the field to validate.\n * @param config - Optional message override and `when` condition.\n * @returns void\n */\nexport function emails<TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<string, SchemaPathRules.Supported, TPathKind>,\n config?: ArsValidatorConfig<string, TPathKind>\n): void {\n validate(path, ctx => {\n if (config?.when && !config.when(ctx)) return null;\n const input = ctx.value();\n if (!input || input.length === 0) return null;\n const parts = input.replaceAll(/\\r\\n/g, '').split(';');\n const isValid = parts.every(part => part.length === 0 || !!SystemUtils.parseEmail(part));\n return isValid ? null : { kind: 'emails', message: config?.message ?? ARS_VALIDATOR_MESSAGES['emails'] };\n });\n}\n\n/**\n * Requires the value to be a `\"HH:MM\"` time and, when slots are given, to fall inside one of them.\n *\n * The signal-form counterpart of `TimeValidatorDirective`. An empty value passes.\n *\n * @param path - Path of the field to validate.\n * @param slots - Optional reactive function returning the pipe-separated allowed ranges\n * (e.g. `\"08:00-12:00|14:00-18:00\"`), or `undefined` for no restriction.\n * @param config - Optional message override and `when` condition.\n * @returns void\n */\nexport function time<TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<string, SchemaPathRules.Supported, TPathKind>,\n slots?: () => string | undefined,\n config?: ArsValidatorConfig<string, TPathKind>\n): void {\n /**\n * Turns `\"HH:MM\"` into a comparable integer (`\"09:30\"` -> `930`).\n * @param value - The time string to parse.\n * @returns The comparable integer, or `-1` when the string is not a valid time.\n */\n const getTime = (value: string): number => {\n const p = value.split(':');\n if (p.length !== 2) return -1;\n const hh = parseInt(p[0], 10);\n if (isNaN(hh) || hh < 0 || hh > 23) return -1;\n const mm = parseInt(p[1], 10);\n if (isNaN(mm) || mm < 0 || mm > 59) return -1;\n return hh * 100 + mm;\n };\n\n validate(path, ctx => {\n if (config?.when && !config.when(ctx)) return null;\n const input = ctx.value();\n if (!input || input.length === 0) return null;\n const invalid = { kind: 'time', message: config?.message ?? ARS_VALIDATOR_MESSAGES['time'] };\n const t = getTime(input);\n if (t === -1) return invalid;\n const slotsValue = slots?.();\n if (slotsValue) {\n const inSlot = slotsValue.split('|').some(s => {\n const from = getTime(s.substring(0, 5));\n const to = getTime(s.substring(6));\n return from !== -1 && to !== -1 && from <= t && to >= t;\n });\n if (!inSlot) return invalid;\n }\n return null;\n });\n}\n\n/**\n * Requires the value to equal the value of another field of the same form.\n *\n * The signal-form counterpart of `EqualsValidatorDirective`. Reactive on both fields, which is\n * what the directive needed a `valueChanges` subscription to obtain: retyping the first password\n * re-validates the confirmation without anyone wiring the two together.\n *\n * @param path - Path of the field to validate.\n * @param other - Path of the field whose value must match.\n * @param config - Optional message override and `when` condition.\n * @returns void\n */\nexport function equals<TValue, TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n other: SchemaPath<TValue, SchemaPathRules.Supported>,\n config?: ArsValidatorConfig<TValue, TPathKind>\n): void {\n validate(path, ctx => {\n if (config?.when && !config.when(ctx)) return null;\n return ctx.valueOf(other) === ctx.value()\n ? null\n : { kind: 'equals', message: config?.message ?? ARS_VALIDATOR_MESSAGES['equals'] };\n });\n}\n\n/**\n * Requires the value to be either empty or a complete six-digit one-time code.\n *\n * The schema-level counterpart of the validator inside `OtpInputComponent`: a partial code is an\n * error, an empty one is `required()`'s business.\n *\n * @param path - Path of the field to validate.\n * @param config - Optional message override and `when` condition.\n * @returns void\n */\nexport function otp<TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<string, SchemaPathRules.Supported, TPathKind>,\n config?: ArsValidatorConfig<string, TPathKind>\n): void {\n validate(path, ctx => {\n if (config?.when && !config.when(ctx)) return null;\n const input = ctx.value() ?? '';\n if (input.length === 0) return null;\n return /^\\d{6}$/.test(input)\n ? null\n : { kind: 'otp', message: config?.message ?? ARS_VALIDATOR_MESSAGES['otp'] };\n });\n}\n\n/** Helpers around signal forms that are not validators themselves. */\nexport class SignalsUtils {\n\n /**\n * Builds the error text for a signal-forms field.\n *\n * Deliberately dumb: the wording lives in the schema, next to the rule that produces it\n * (`required(p.x, { message: ... })`), so a field says what is wrong with it in one place\n * instead of here in a switch that has to guess from the error kind. The map below is only\n * the safety net for the rules declared without a message — the Angular built-ins, plus\n * {@link ARS_VALIDATOR_MESSAGES} for the ones declared in this file.\n * @param errors - The errors currently on the field, from `f.x().errors()`.\n * @param message - Optional override applied to every error of the field.\n * @returns The first relevant error text, or `undefined` when the field has no errors.\n */\n public static getFieldErrorMessage(\n errors: readonly { kind: string; message?: string }[],\n message?: string\n ): string | undefined {\n if (!errors || errors.length === 0) return undefined;\n\n const fallback: Record<string, string> = {\n // Angular built-ins declared without a message of their own.\n min: 'Valore troppo basso',\n max: 'Valore troppo alto',\n minLength: 'Testo troppo corto',\n maxLength: 'Testo troppo lungo',\n pattern: 'Formato non valido',\n email: 'Indirizzo email non valido',\n minDate: 'Data troppo indietro',\n maxDate: 'Data troppo avanti',\n parse: 'Valore non valido',\n matDatepickerParse: 'Data non valida',\n matDatepickerMin: 'Data troppo indietro',\n matDatepickerMax: 'Data troppo avanti',\n matDatepickerFilter: 'Data non selezionabile',\n matStartDateInvalid: 'Intervallo non valido',\n matEndDateInvalid: 'Intervallo non valido',\n matTimepickerParse: 'Orario non valido',\n matTimepickerMin: 'Orario troppo presto',\n matTimepickerMax: 'Orario troppo tardi',\n // The rules of this file, from the single table above: adding a validator there is enough,\n // and this map can never fall behind it.\n ...ARS_VALIDATOR_MESSAGES,\n };\n\n\n message = message ?? errors[0].message ?? fallback[errors[0].kind] ?? '';\n return message.length > 0 ? message : 'Non valido';\n }\n}\n","/*\n * Public API Surface of @arsedizioni/ars-utils/core.validators\n *\n * Template-driven form validators. Kept OUT of `core` on purpose: every one of them pulls in\n * `@angular/forms` (53 KB), and `core` is on the boot path of every application through\n * `ThemeService`, `BroadcastService` and friends. Importing a validator now costs `@angular/forms`\n * only to the lazy chunk that actually uses one.\n */\nexport * from './validators';\n\n// Signal-form flavour of the same rules. Lives here and not in a separate entry point because\n// `@angular/forms/signals` depends on `@angular/forms` anyway, so the two never travel apart.\nexport * from './signals';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;AAQA;;;AAGG;MAMU,kBAAkB,CAAA;AAL/B,IAAA,WAAA,GAAA;;QAQW,IAAA,CAAA,SAAS,GAAG,KAAK,CAAsE,SAAS;sFAAC;AAW3G,IAAA;AATC;;;;AAIG;AACH,IAAA,QAAQ,CAAC,OAAwB,EAAA;AAC/B,QAAA,MAAM,EAAE,GAAG,IAAI,CAAC,SAAS,EAAE;AAC3B,QAAA,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,IAAI;IAChC;8GAbW,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAlB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,kBAAkB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,EAAA,SAAA,EAAA,EAAA,iBAAA,EAAA,WAAA,EAAA,UAAA,EAAA,WAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,SAAA,EAHlB,CAAC,EAAE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,kBAAkB,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAG1E,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAL9B,SAAS;AAAC,YAA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AC1B;QAGD,OAAO,GAAG,OAAO,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,OAAO,IAAI,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE;AACxE,QAAA,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,GAAG,OAAO,GAAG,YAAY;IACpD;AACD;;AC7pBD;;;;;;;AAOG;;ACPH;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arsedizioni/ars-utils",
3
- "version": "22.5.45",
3
+ "version": "22.5.46",
4
4
  "author": {
5
5
  "email": "software@arsedizioni.it",
6
6
  "name": "Fabio Buscaroli, Alberto Doria"
@@ -279,7 +279,7 @@ declare class NotEmptyValidatorDirective implements Validator {
279
279
  * It raises the very errors those two rules raise — `required` when the value is missing, an
280
280
  * empty string or an empty array, `notEmpty` when a value is there but made of whitespace alone —
281
281
  * so existing error messages and `getFieldErrorMessage` keep working untouched, and the user
282
- * still reads "Obbligatorio" rather than the vaguer "Non può contenere solo spazi".
282
+ * still reads "Obbligatorio" rather than the vaguer "Non può essere vuoto".
283
283
  *
284
284
  * IMPORTANT, on a Material field: this directive does NOT draw the asterisk. `MatInput` reads its
285
285
  * own `required` input first and falls back to `hasValidator(Validators.required)`, which no