ngx-recipe-forms 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-recipe-forms.mjs","names":[],"sources":["../../../projects/recipe-forms/src/lib/enums/array-display.enum.ts","../../../projects/recipe-forms/src/lib/enums/breakpoint.enum.ts","../../../projects/recipe-forms/src/lib/enums/button-variant.enum.ts","../../../projects/recipe-forms/src/lib/enums/control-type.enum.ts","../../../projects/recipe-forms/src/lib/enums/linked-control-type.enum.ts","../../../projects/recipe-forms/src/lib/enums/node-kind.enum.ts","../../../projects/recipe-forms/src/lib/enums/recipe-ui-part.enum.ts","../../../projects/recipe-forms/src/lib/enums/rule-mode.enum.ts","../../../projects/recipe-forms/src/lib/enums/rule-type.enum.ts","../../../projects/recipe-forms/src/lib/enums/section-display.enum.ts","../../../projects/recipe-forms/src/lib/enums/severity.enum.ts","../../../projects/recipe-forms/src/lib/enums/validation-outcome.enum.ts","../../../projects/recipe-forms/src/lib/constants/form-async-defaults.constants.ts","../../../projects/recipe-forms/src/lib/constants/form-error-messages.constants.ts","../../../projects/recipe-forms/src/lib/constants/form-layout-columns.constants.ts","../../../projects/recipe-forms/src/lib/constants/form-layout-order.constants.ts","../../../projects/recipe-forms/src/lib/constants/form-layout-span.constants.ts","../../../projects/recipe-forms/src/lib/constants/form-server-error-kind.constants.ts","../../../projects/recipe-forms/src/lib/constants/form-server-messages-prefix.constants.ts","../../../projects/recipe-forms/src/lib/constants/form-timing-window.constants.ts","../../../projects/recipe-forms/src/lib/constants/form-unknown-error-message.constants.ts","../../../projects/recipe-forms/src/lib/constants/form-validation-unavailable-key.constants.ts","../../../projects/recipe-forms/src/lib/constants/form-validation-unavailable-message.constants.ts","../../../projects/recipe-forms/src/lib/constants/form-warnings-key.constants.ts","../../../projects/recipe-forms/src/lib/constants/recipe-form-default-keys.constants.ts","../../../projects/recipe-forms/src/lib/constants/section-display-defaults.constants.ts","../../../projects/recipe-forms/src/lib/tokens/form-key-generator.token.ts","../../../projects/recipe-forms/src/lib/tokens/form-validation-timing.token.ts","../../../projects/recipe-forms/src/lib/tokens/recipe-form-rx-resource.token.ts","../../../projects/recipe-forms/src/lib/tokens/recipe-form-translation-changes.token.ts","../../../projects/recipe-forms/src/lib/tokens/recipe-form-translator.token.ts","../../../projects/recipe-forms/src/lib/tokens/recipe-form-ui.token.ts","../../../projects/recipe-forms/src/lib/utils/timing-stats.utils.ts","../../../projects/recipe-forms/src/lib/services/in-memory-validation-timing.service.ts","../../../projects/recipe-forms/src/lib/services/recipe-ui-templates.service.ts","../../../projects/recipe-forms/src/lib/utils/recipe-paths.utils.ts","../../../projects/recipe-forms/src/lib/utils/recipe-rule-context.utils.ts","../../../projects/recipe-forms/src/lib/services/recipe-form-context.service.ts","../../../projects/recipe-forms/src/lib/directives/recipe-button.directive.ts","../../../projects/recipe-forms/src/lib/directives/recipe-checkbox-control.directive.ts","../../../projects/recipe-forms/src/lib/directives/recipe-date-control.directive.ts","../../../projects/recipe-forms/src/lib/directives/recipe-date-multiple-control.directive.ts","../../../projects/recipe-forms/src/lib/directives/recipe-message.directive.ts","../../../projects/recipe-forms/src/lib/directives/recipe-number-control.directive.ts","../../../projects/recipe-forms/src/lib/directives/recipe-panel.directive.ts","../../../projects/recipe-forms/src/lib/directives/recipe-select-control.directive.ts","../../../projects/recipe-forms/src/lib/directives/recipe-tabs.directive.ts","../../../projects/recipe-forms/src/lib/directives/recipe-text-control.directive.ts","../../../projects/recipe-forms/src/lib/ui/button/button.ts","../../../projects/recipe-forms/src/lib/ui/checkbox/checkbox.ts","../../../projects/recipe-forms/src/lib/pipes/recipe-translate.pipe.ts","../../../projects/recipe-forms/src/lib/utils/recipe-dates.utils.ts","../../../projects/recipe-forms/src/lib/ui/input-classes.ts","../../../projects/recipe-forms/src/lib/ui/date-picker-multiple/date-picker-multiple.ts","../../../projects/recipe-forms/src/lib/ui/date-picker/date-picker.ts","../../../projects/recipe-forms/src/lib/ui/input-number/input-number.ts","../../../projects/recipe-forms/src/lib/ui/input-text/input-text.ts","../../../projects/recipe-forms/src/lib/ui/message/message.ts","../../../projects/recipe-forms/src/lib/ui/panel/panel.ts","../../../projects/recipe-forms/src/lib/ui/select/select.ts","../../../projects/recipe-forms/src/lib/ui/tabs/tab-panel.directive.ts","../../../projects/recipe-forms/src/lib/ui/tabs/tabs.ts","../../../projects/recipe-forms/src/lib/ui/recipe-default-ui.ts","../../../projects/recipe-forms/src/lib/services/recipe-ui.service.ts","../../../projects/recipe-forms/src/lib/providers/recipe-forms-ui.provider.ts","../../../projects/recipe-forms/src/lib/providers/recipe-forms.provider.ts","../../../projects/recipe-forms/src/lib/utils/recipe-arrays.utils.ts","../../../projects/recipe-forms/src/lib/utils/recipe-async-rule.utils.ts","../../../projects/recipe-forms/src/lib/utils/recipe-builder.utils.ts","../../../projects/recipe-forms/src/lib/utils/recipe-layout.utils.ts","../../../projects/recipe-forms/src/lib/utils/recipe-messages.utils.ts","../../../projects/recipe-forms/src/lib/utils/recipe-schema.utils.ts","../../../projects/recipe-forms/src/lib/utils/recipe-server-paths.utils.ts","../../../projects/recipe-forms/src/lib/utils/recipe-sections.utils.ts","../../../projects/recipe-forms/src/lib/components/recipe-button/recipe-button.ts","../../../projects/recipe-forms/src/lib/components/recipe-message/recipe-message.ts","../../../projects/recipe-forms/src/lib/components/recipe-field/recipe-field.ts","../../../projects/recipe-forms/src/lib/components/recipe-field/recipe-field.html","../../../projects/recipe-forms/src/lib/directives/recipe-slot.directive.ts","../../../projects/recipe-forms/src/lib/components/recipe-panel/recipe-panel.ts","../../../projects/recipe-forms/src/lib/directives/recipe-tab-panel.directive.ts","../../../projects/recipe-forms/src/lib/components/recipe-tabs/recipe-tabs.ts","../../../projects/recipe-forms/src/lib/components/recipe-section-group/recipe-section-group.ts","../../../projects/recipe-forms/src/lib/components/recipe-section-group/recipe-section-group.html","../../../projects/recipe-forms/src/lib/components/recipe-node/recipe-node.ts","../../../projects/recipe-forms/src/lib/components/recipe-node/recipe-node.html","../../../projects/recipe-forms/src/lib/components/recipe-form/recipe-form.ts"],"sourcesContent":["export enum ArrayDisplayEnum {\n TABLE = 'table',\n LIST = 'list',\n}\n","export enum BreakpointEnum {\n BASE = 'base',\n SM = 'sm',\n MD = 'md',\n LG = 'lg',\n XL = 'xl',\n}\n","export enum ButtonVariantEnum {\n FILLED = 'filled',\n OUTLINED = 'outlined',\n TEXT = 'text',\n}\n","export enum ControlTypeEnum {\n TEXT = 'text',\n NUMBER = 'number',\n SELECT = 'select',\n DATE = 'date',\n DATE_MULTIPLE = 'dateMultiple',\n CHECKBOX = 'checkbox',\n DISPLAY = 'display',\n SLOT = 'slot',\n}\n","export enum LinkedControlTypeEnum {\n DATE_RANGE = 'dateRange',\n GROUP = 'group',\n}\n","export enum NodeKindEnum {\n SECTION_GROUP = 'sectionGroup',\n SECTION = 'section',\n ROW = 'row',\n FIELD = 'field',\n LINKED = 'linked',\n ARRAY = 'array',\n}\n","/** Éléments d'interface du moteur rendus par un gabarit du registre, en plus des contrôles. */\nexport enum RecipeUiPartEnum {\n MESSAGE = 'message',\n BUTTON = 'button',\n PANEL = 'panel',\n TABS = 'tabs',\n}\n","export enum RuleModeEnum {\n SYNC = 'sync',\n ASYNC = 'async',\n}\n","export enum RuleTypeEnum {\n REQUIRED = 'required',\n PATTERN = 'pattern',\n MIN = 'min',\n MAX = 'max',\n MIN_LENGTH = 'minLength',\n MAX_LENGTH = 'maxLength',\n MIN_DATE = 'minDate',\n MAX_DATE = 'maxDate',\n EMAIL = 'email',\n VALIDATE = 'validate',\n WARN = 'warn',\n SERVER = 'server',\n DISABLED = 'disabled',\n HIDDEN = 'hidden',\n READONLY = 'readonly',\n MIN_ITEMS = 'minItems',\n MAX_ITEMS = 'maxItems',\n UNIQUE = 'unique',\n}\n","export enum SectionDisplayEnum {\n PLAIN = 'plain',\n PANEL = 'panel',\n TABS = 'tabs',\n}\n","/** Vocabulaire de sévérité courant des design systems, pour qu'un wrapper de l'application hôte le reçoive tel quel. */\nexport enum SeverityEnum {\n PRIMARY = 'primary',\n SECONDARY = 'secondary',\n SUCCESS = 'success',\n INFO = 'info',\n WARNING = 'warn',\n DANGER = 'danger',\n}\n","export enum ValidationOutcomeEnum {\n VALID = 'valid',\n INVALID = 'invalid',\n FAILURE = 'failure',\n CANCELLED = 'cancelled',\n}\n","import { RuleDebounce } from '../interfaces/rule-debounce.interface';\n\n/** Délais par défaut des règles asynchrones : 300 ms pour un champ texte, `'blur'` pour une date. */\nexport const FORM_ASYNC_DEFAULTS: Readonly<{\n text: RuleDebounce;\n date: RuleDebounce;\n other: RuleDebounce;\n}> = {\n text: 300,\n date: 'blur',\n other: 300,\n};\n","/** Type d'erreur → clé i18n par défaut. Les clés doivent exister dans le fichier i18n de l'hôte. */\nexport const FORM_ERROR_MESSAGES: Readonly<Record<string, string>> = {\n required: 'forms.errors.required',\n pattern: 'forms.errors.pattern',\n min: 'forms.errors.min',\n max: 'forms.errors.max',\n minLength: 'forms.errors.minLength',\n maxLength: 'forms.errors.maxLength',\n minDate: 'forms.errors.minDate',\n maxDate: 'forms.errors.maxDate',\n email: 'forms.errors.email',\n minItems: 'forms.errors.minItems',\n maxItems: 'forms.errors.maxItems',\n unique: 'forms.errors.unique',\n};\n","import { BreakpointEnum } from '../enums/breakpoint.enum';\nimport { GridColumns } from '../interfaces/grid-columns.interface';\n\n/** Classes Tailwind complètes et littérales : une classe construite par concaténation ne serait pas générée. */\nexport const FORM_LAYOUT_COLUMNS: Readonly<\n Record<BreakpointEnum, Readonly<Record<GridColumns, string>>>\n> = {\n [BreakpointEnum.BASE]: { 1: 'grid-cols-1', 2: 'grid-cols-2', 3: 'grid-cols-3', 4: 'grid-cols-4' },\n [BreakpointEnum.SM]: {\n 1: 'sm:grid-cols-1',\n 2: 'sm:grid-cols-2',\n 3: 'sm:grid-cols-3',\n 4: 'sm:grid-cols-4',\n },\n [BreakpointEnum.MD]: {\n 1: 'md:grid-cols-1',\n 2: 'md:grid-cols-2',\n 3: 'md:grid-cols-3',\n 4: 'md:grid-cols-4',\n },\n [BreakpointEnum.LG]: {\n 1: 'lg:grid-cols-1',\n 2: 'lg:grid-cols-2',\n 3: 'lg:grid-cols-3',\n 4: 'lg:grid-cols-4',\n },\n [BreakpointEnum.XL]: {\n 1: 'xl:grid-cols-1',\n 2: 'xl:grid-cols-2',\n 3: 'xl:grid-cols-3',\n 4: 'xl:grid-cols-4',\n },\n};\n","import { BreakpointEnum } from '../enums/breakpoint.enum';\nimport { GridOrder } from '../interfaces/grid-order.interface';\n\nexport const FORM_LAYOUT_ORDER: Readonly<\n Record<BreakpointEnum, Readonly<Record<GridOrder, string>>>\n> = {\n [BreakpointEnum.BASE]: {\n 1: 'order-1',\n 2: 'order-2',\n 3: 'order-3',\n 4: 'order-4',\n 5: 'order-5',\n 6: 'order-6',\n },\n [BreakpointEnum.SM]: {\n 1: 'sm:order-1',\n 2: 'sm:order-2',\n 3: 'sm:order-3',\n 4: 'sm:order-4',\n 5: 'sm:order-5',\n 6: 'sm:order-6',\n },\n [BreakpointEnum.MD]: {\n 1: 'md:order-1',\n 2: 'md:order-2',\n 3: 'md:order-3',\n 4: 'md:order-4',\n 5: 'md:order-5',\n 6: 'md:order-6',\n },\n [BreakpointEnum.LG]: {\n 1: 'lg:order-1',\n 2: 'lg:order-2',\n 3: 'lg:order-3',\n 4: 'lg:order-4',\n 5: 'lg:order-5',\n 6: 'lg:order-6',\n },\n [BreakpointEnum.XL]: {\n 1: 'xl:order-1',\n 2: 'xl:order-2',\n 3: 'xl:order-3',\n 4: 'xl:order-4',\n 5: 'xl:order-5',\n 6: 'xl:order-6',\n },\n};\n","import { BreakpointEnum } from '../enums/breakpoint.enum';\nimport { GridSpan } from '../interfaces/grid-span.interface';\n\nexport const FORM_LAYOUT_SPAN: Readonly<\n Record<BreakpointEnum, Readonly<Record<GridSpan, string>>>\n> = {\n [BreakpointEnum.BASE]: { 1: 'col-span-1', 2: 'col-span-2', 3: 'col-span-3', 4: 'col-span-4' },\n [BreakpointEnum.SM]: {\n 1: 'sm:col-span-1',\n 2: 'sm:col-span-2',\n 3: 'sm:col-span-3',\n 4: 'sm:col-span-4',\n },\n [BreakpointEnum.MD]: {\n 1: 'md:col-span-1',\n 2: 'md:col-span-2',\n 3: 'md:col-span-3',\n 4: 'md:col-span-4',\n },\n [BreakpointEnum.LG]: {\n 1: 'lg:col-span-1',\n 2: 'lg:col-span-2',\n 3: 'lg:col-span-3',\n 4: 'lg:col-span-4',\n },\n [BreakpointEnum.XL]: {\n 1: 'xl:col-span-1',\n 2: 'xl:col-span-2',\n 3: 'xl:col-span-3',\n 4: 'xl:col-span-4',\n },\n};\n","/** Type des erreurs serveur posées sur un champ. */\nexport const FORM_SERVER_ERROR_KIND = 'server';\n","/** Clé `errors.<code>` d'une erreur serveur arrivée sans `message`. */\nexport const FORM_SERVER_MESSAGES_PREFIX = 'errors';\n","/** Nombre de durées conservées par validateur dans le collecteur en mémoire (mémoire bornée). */\nexport const FORM_TIMING_WINDOW = 200;\n","export const FORM_UNKNOWN_ERROR_MESSAGE = 'forms.errors.unknown';\n","import { createMetadataKey, MetadataReducer } from '@angular/forms/signals';\n\n/** Métadonnée « validation indisponible » : vraie quand un validateur serveur du champ est en panne. */\nexport const FORM_VALIDATION_UNAVAILABLE = createMetadataKey<boolean, boolean>(\n MetadataReducer.or(),\n);\n","/** Avertissement affiché quand un validateur serveur est en panne : non bloquant. */\nexport const FORM_VALIDATION_UNAVAILABLE_MESSAGE = 'forms.warnings.validationUnavailable';\n","import { createMetadataKey, MetadataReducer } from '@angular/forms/signals';\nimport { RecipeValidationError } from '../interfaces/recipe-validation-error.interface';\n\n/** Métadonnée des avertissements non bloquants d'un champ : liste des résultats des règles `warn`. */\nexport const FORM_WARNINGS = createMetadataKey<\n RecipeValidationError | undefined,\n RecipeValidationError[]\n>(MetadataReducer.list<RecipeValidationError>());\n","/**\n * Toutes les clés i18n que le moteur demande de lui-même, sans qu'une recette les nomme. L'hôte vérifie dans une spec\n * que son dictionnaire (clés mises à plat) contient chacune.\n * Hors liste : les clés des codes serveur (`errors.<code>`, `<scope>.errors.<code>`), qui dépendent du serveur, et les\n * clés nommées par les recettes (`labelKey`, `legendKey`, `hintKey`, `reasonKey`, `messages`…).\n */\nexport const RECIPE_FORM_DEFAULT_KEYS: readonly string[] = [\n // Message par défaut de chaque type d'erreur (`FORM_ERROR_MESSAGES`).\n 'forms.errors.required',\n 'forms.errors.pattern',\n 'forms.errors.min',\n 'forms.errors.max',\n 'forms.errors.minLength',\n 'forms.errors.maxLength',\n 'forms.errors.minDate',\n 'forms.errors.maxDate',\n 'forms.errors.email',\n 'forms.errors.minItems',\n 'forms.errors.maxItems',\n 'forms.errors.unique',\n // Type d'erreur sans clé ni message brut (`FORM_UNKNOWN_ERROR_MESSAGE`).\n 'forms.errors.unknown',\n // Validateur serveur en panne (`FORM_VALIDATION_UNAVAILABLE_MESSAGE`).\n 'forms.warnings.validationUnavailable',\n // Validation serveur en cours (`app-recipe-field`).\n 'forms.pending',\n // Ajout d'une date (calendrier multiple par défaut) ; retrait d'un élément sans `removeLabelKey` (`app-recipe-node`).\n 'forms.array.add',\n 'forms.array.remove',\n // Compteur d'erreurs d'un volet ou d'un onglet, singulier puis pluriel (`app-recipe-section-group`).\n 'forms.display.errorCountOne',\n 'forms.display.errorCount',\n // Bouton de repli d'un volet (`app-recipe-section-group`).\n 'forms.display.collapsePanel',\n 'forms.display.expandPanel',\n];\n","import { SectionDisplayEnum } from '../enums/section-display.enum';\nimport { PanelDisplayOptions } from '../interfaces/panel-display-options.interface';\n\nexport const SECTION_DISPLAY_DEFAULTS: Readonly<{\n [SectionDisplayEnum.PANEL]: Required<Pick<PanelDisplayOptions, 'multiple'>>;\n}> = {\n [SectionDisplayEnum.PANEL]: { multiple: true },\n};\n","import { InjectionToken } from '@angular/core';\n\n/** Générateur des clés techniques des éléments d'`array`. Les tests injectent un générateur déterministe (`k1`, `k2`…). */\nexport const FORM_KEY_GENERATOR = new InjectionToken<() => string>('FORM_KEY_GENERATOR', {\n providedIn: 'root',\n factory: () => () => crypto.randomUUID(),\n});\n","import { InjectionToken } from '@angular/core';\nimport { ValidationTiming } from '../interfaces/validation-timing.interface';\n\n/**\n * Collecteur des temps de réponse, sans effet par défaut (production).\n * `provideRecipeForms({ production: false })` branche le collecteur en mémoire.\n */\nexport const FORM_VALIDATION_TIMING = new InjectionToken<ValidationTiming>(\n 'FORM_VALIDATION_TIMING',\n {\n providedIn: 'root',\n factory: (): ValidationTiming => ({\n record: () => undefined,\n summary: () => [],\n }),\n },\n);\n","import { InjectionToken } from '@angular/core';\nimport { rxResource } from '@angular/core/rxjs-interop';\nimport { RecipeRxResource } from '../interfaces/recipe-rx-resource.interface';\n\n/**\n * Ressource qui appelle le validateur d'une règle `server` (`provideRecipeForms({ rxResource })`). L'hôte y passe son\n * wrapper (qui remonte par exemple les erreurs à son `ErrorHandler`) ; par défaut, `rxResource`.\n */\nexport const RECIPE_FORM_RX_RESOURCE = new InjectionToken<RecipeRxResource>(\n 'RECIPE_FORM_RX_RESOURCE',\n {\n providedIn: 'root',\n factory: () => rxResource,\n },\n);\n","import { InjectionToken, Signal, signal } from '@angular/core';\n\n/**\n * Signal de l'hôte qui change à chaque chargement ou changement de traductions (par exemple les événements de\n * Transloco, scope chargé en différé ou langue changée). Les textes que le moteur traduit hors d'un gabarit (titres\n * d'onglets, textes des compteurs d'erreurs, options `labelKey` d'un `select`) et le pipe `recipeTranslate` le lisent\n * avant d'appeler le traducteur : ils se recalculent à chaque chargement. Par défaut, un signal constant : ces textes\n * ne sont traduits qu'au rendu et quand leurs propres données changent.\n */\nexport const RECIPE_FORM_TRANSLATION_CHANGES = new InjectionToken<Signal<unknown>>(\n 'RECIPE_FORM_TRANSLATION_CHANGES',\n {\n providedIn: 'root',\n factory: (): Signal<unknown> => signal<unknown>(undefined).asReadonly(),\n },\n);\n","import { InjectionToken } from '@angular/core';\nimport { RecipeTranslator } from '../interfaces/recipe-translator.interface';\n\n/** L'hôte fournit son service i18n (Transloco, par exemple). Par défaut, la clé est affichée telle quelle. */\nexport const RECIPE_FORM_TRANSLATOR = new InjectionToken<RecipeTranslator>(\n 'RECIPE_FORM_TRANSLATOR',\n {\n providedIn: 'root',\n factory: (): RecipeTranslator => (key) => key,\n },\n);\n","import { InjectionToken, Type } from '@angular/core';\n\n/**\n * Composant de gabarits de l'hôte (`provideRecipeForms({ ui })`) : il déclare un `<ng-template appRecipeTextControl>`\n * par contrôle à rendre avec son design system. Un contrôle qu'il ne déclare pas garde le gabarit par défaut.\n */\nexport const RECIPE_FORM_UI = new InjectionToken<Type<unknown> | undefined>('RECIPE_FORM_UI', {\n providedIn: 'root',\n factory: () => undefined,\n});\n","/** Statistiques pures sur des durées. Liste vide → 0. */\nexport class TimingStats {\n static median(values: readonly number[]): number {\n return TimingStats.percentile(values, 50);\n }\n\n /** Centile par rang le plus proche : `p` entre 0 et 100. */\n static percentile(values: readonly number[], p: number): number {\n if (values.length === 0) {\n return 0;\n }\n const sorted = [...values].sort((a, b) => a - b);\n const rank = Math.ceil((p / 100) * sorted.length);\n const index = Math.min(sorted.length - 1, Math.max(0, rank - 1));\n return sorted[index];\n }\n\n static max(values: readonly number[]): number {\n return values.length === 0 ? 0 : Math.max(...values);\n }\n}\n","import { Service } from '@angular/core';\nimport { FORM_TIMING_WINDOW } from '../constants/form-timing-window.constants';\nimport { ValidationOutcomeEnum } from '../enums/validation-outcome.enum';\nimport { ValidationTiming } from '../interfaces/validation-timing.interface';\nimport { ValidationTimingSummary } from '../interfaces/validation-timing-summary.interface';\nimport { TimingStats } from '../utils/timing-stats.utils';\n\ninterface TimingEntry {\n readonly durations: number[];\n calls: number;\n failures: number;\n cancelled: number;\n}\n\n/**\n * Collecteur hors production : agrégats par validateur dans le navigateur, jamais les valeurs saisies.\n * Mémoire bornée aux `FORM_TIMING_WINDOW` dernières durées par validateur.\n */\n@Service({ autoProvided: false })\nexport class InMemoryValidationTiming implements ValidationTiming {\n private readonly entries = new Map<string, TimingEntry>();\n\n record(validator: string, durationMs: number, outcome: ValidationOutcomeEnum): void {\n const entry = this.entries.get(validator) ?? {\n durations: [],\n calls: 0,\n failures: 0,\n cancelled: 0,\n };\n entry.calls += 1;\n if (outcome === ValidationOutcomeEnum.CANCELLED) {\n entry.cancelled += 1;\n } else {\n if (outcome === ValidationOutcomeEnum.FAILURE) {\n entry.failures += 1;\n }\n entry.durations.push(durationMs);\n if (entry.durations.length > FORM_TIMING_WINDOW) {\n entry.durations.shift();\n }\n }\n this.entries.set(validator, entry);\n }\n\n summary(): readonly ValidationTimingSummary[] {\n return [...this.entries.entries()].map(([validator, entry]) => ({\n validator,\n calls: entry.calls,\n medianMs: Math.round(TimingStats.median(entry.durations)),\n p95Ms: Math.round(TimingStats.percentile(entry.durations, 95)),\n maxMs: Math.round(TimingStats.max(entry.durations)),\n failures: entry.failures,\n cancelled: entry.cancelled,\n }));\n }\n\n /** Affiche le résumé en tableau dans la console du navigateur. */\n logSummary(): void {\n console.table(this.summary());\n }\n}\n","import { Service, TemplateRef } from '@angular/core';\nimport { RecipeUiTemplateType } from '../interfaces/recipe-ui-template-type.interface';\n\n/**\n * Gabarits enregistrés par les directives `appRecipe…` à leur création ; le dernier enregistré pour un type\n * l'emporte. Le registre (`RecipeUi`) crée le composant par défaut, puis celui de l'hôte.\n */\n@Service()\nexport class RecipeUiTemplates {\n private readonly templates = new Map<RecipeUiTemplateType, TemplateRef<unknown>>();\n\n register(type: RecipeUiTemplateType, template: TemplateRef<unknown>): void {\n this.templates.set(type, template);\n }\n\n get(type: RecipeUiTemplateType): TemplateRef<unknown> | undefined {\n return this.templates.get(type);\n }\n}\n","import { PathKind, SchemaPath, SchemaPathRules, SchemaPathTree } from '@angular/forms/signals';\nimport { AnyModel } from '../interfaces/any-model.interface';\n\nexport type AnySchemaPath = SchemaPath<unknown, SchemaPathRules.Supported, PathKind>;\nexport type AnySchemaPathTree = SchemaPathTree<AnyModel, PathKind>;\n\n/**\n * Accès dynamique aux chemins Signal Forms. Les transtypages du moteur sont confinés ici, pour contenir le risque\n * d'un accès dynamique par clé.\n */\nexport class RecipePaths {\n static child(path: AnySchemaPathTree, key: string): AnySchemaPath {\n const child = path[key];\n if (child === undefined) {\n throw new Error(`[recipe-forms] la clé « ${key} » n'existe pas dans le modèle du formulaire`);\n }\n return child;\n }\n\n static tree(path: AnySchemaPath): AnySchemaPathTree {\n return path as AnySchemaPathTree;\n }\n\n static asString(path: AnySchemaPath): SchemaPath<string, SchemaPathRules.Supported, PathKind> {\n return path as SchemaPath<string, SchemaPathRules.Supported, PathKind>;\n }\n\n static asNumber(\n path: AnySchemaPath,\n ): SchemaPath<number | null, SchemaPathRules.Supported, PathKind> {\n return path as SchemaPath<number | null, SchemaPathRules.Supported, PathKind>;\n }\n\n static asDate(path: AnySchemaPath): SchemaPath<Date | null, SchemaPathRules.Supported, PathKind> {\n return path as SchemaPath<Date | null, SchemaPathRules.Supported, PathKind>;\n }\n\n static asList(\n path: AnySchemaPath,\n ): SchemaPath<readonly unknown[], SchemaPathRules.Supported, PathKind> {\n return path as SchemaPath<readonly unknown[], SchemaPathRules.Supported, PathKind>;\n }\n}\n","import { isDevMode } from '@angular/core';\nimport { FieldContext, FieldTree, PathKind } from '@angular/forms/signals';\nimport { AnyModel } from '../interfaces/any-model.interface';\nimport { RecipeRuleContext } from '../interfaces/recipe-rule-context.interface';\nimport { AnySchemaPathTree, RecipePaths } from './recipe-paths.utils';\n\ntype AnyFieldContext = FieldContext<unknown, PathKind>;\n\n/**\n * Construit le contexte reçu par les règles de la recette.\n * Dans le schéma, `root(key)` passe par `ctx.valueOf` du chemin racine : la règle est réévaluée quand la valeur change,\n * y compris depuis un élément d'`array` (`applyEach`). Au rendu, il lit le `FieldTree` de la racine.\n */\nexport class RecipeRuleContexts {\n static fromField(root: AnySchemaPathTree, ctx: AnyFieldContext): RecipeRuleContext<AnyModel> {\n return {\n root: (key) => ctx.valueOf(RecipePaths.child(root, String(key))),\n };\n }\n\n static fromTree(tree: FieldTree<AnyModel>): RecipeRuleContext<AnyModel> {\n return {\n root: (key) => {\n const child = tree[String(key)];\n return child === undefined ? undefined : child().value();\n },\n };\n }\n\n /**\n * Lecture des clés de `dependsOn` d'une règle `server`, dans le contexte Signal Forms du champ : appelée dans les\n * paramètres de `validateAsync`, elle fait relancer l'appel quand l'une de ces valeurs change.\n */\n static dependencies(\n root: AnySchemaPathTree,\n keys: readonly PropertyKey[] | undefined,\n ): ((ctx: AnyFieldContext) => Readonly<Record<string, unknown>>) | undefined {\n if (keys === undefined || keys.length === 0) {\n return undefined;\n }\n return (ctx) => {\n const context = RecipeRuleContexts.fromField(root, ctx);\n return Object.fromEntries(keys.map((key) => [String(key), context.root(String(key))]));\n };\n }\n\n /**\n * Contexte d'un validateur serveur : `root(key)` rend la valeur lue avec les paramètres de l'appel. Une clé absente\n * de `dependsOn` lève une erreur (l'appel échoue en panne) plutôt que de valider avec une valeur non suivie.\n */\n static fromDependencies(\n values: Readonly<Record<string, unknown>>,\n rule: string,\n ): RecipeRuleContext<AnyModel> {\n return {\n root: (key) => {\n const name = String(key);\n if (!Object.hasOwn(values, name)) {\n const message = `[recipe-forms] règle server « ${rule} » : ctx.root('${name}') est lu sans figurer dans dependsOn`;\n if (isDevMode()) {\n console.error(message);\n }\n throw new Error(message);\n }\n return values[name];\n },\n };\n }\n}\n","import { computed, Service, signal, TemplateRef } from '@angular/core';\nimport { FieldTree } from '@angular/forms/signals';\nimport { AnyModel } from '../interfaces/any-model.interface';\nimport { RecipeFormContextSource } from '../interfaces/recipe-form-context-source.interface';\nimport { RecipeRuleContext } from '../interfaces/recipe-rule-context.interface';\nimport { RecipeServerValidationError } from '../interfaces/recipe-server-validation-error.interface';\nimport { RecipeSlotContext } from '../interfaces/recipe-slot-context.interface';\nimport { RecipeRuleContexts } from '../utils/recipe-rule-context.utils';\n\nconst EMPTY_SERVER: ReadonlyMap<string, readonly RecipeServerValidationError[]> = new Map();\nconst EMPTY_SLOTS: ReadonlyMap<string, TemplateRef<RecipeSlotContext>> = new Map();\nconst NO_ROOT: RecipeRuleContext<AnyModel> = { root: () => undefined };\n\n/**\n * État d'un formulaire partagé avec ses nœuds, fourni par `app-recipe-form` (`providers`) et connecté dans\n * son constructeur : racine du `FieldTree`, tentative de soumission, messages, slots, erreurs et avertissements\n * serveur placés par chemin.\n */\n@Service({ autoProvided: false })\nexport class RecipeFormContext {\n private readonly source = signal<RecipeFormContextSource | undefined>(undefined);\n\n readonly rootTree = computed((): FieldTree<AnyModel> | undefined => this.source()?.rootTree());\n readonly submitted = computed((): boolean => this.source()?.submitted() ?? false);\n readonly submitCount = computed((): number => this.source()?.submitCount() ?? 0);\n readonly recipeMessages = computed(() => this.source()?.recipeMessages());\n readonly slots = computed(() => this.source()?.slots() ?? EMPTY_SLOTS);\n readonly serverErrors = computed(() => this.source()?.serverErrors() ?? EMPTY_SERVER);\n readonly serverWarnings = computed(() => this.source()?.serverWarnings() ?? EMPTY_SERVER);\n /** Contexte des conditions évaluées au rendu (`hidden`/`readonly` d'une section). */\n readonly ruleContext = computed((): RecipeRuleContext<AnyModel> => {\n const tree = this.rootTree();\n return tree === undefined ? NO_ROOT : RecipeRuleContexts.fromTree(tree);\n });\n\n connect(source: RecipeFormContextSource): void {\n this.source.set(source);\n }\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\nimport { RecipeUiPartEnum } from '../enums/recipe-ui-part.enum';\nimport { RecipeButtonContext } from '../interfaces/recipe-button-context.interface';\nimport { RecipeUiTemplates } from '../services/recipe-ui-templates.service';\n\n/** Gabarit d'un bouton d'ajout ou de retrait d'un élément d'`array` : `let-label let-click=\"click\" …`. */\n@Directive({ selector: 'ng-template[appRecipeButton]' })\nexport class RecipeButtonDirective {\n constructor() {\n inject(RecipeUiTemplates).register(RecipeUiPartEnum.BUTTON, inject(TemplateRef));\n }\n\n static ngTemplateContextGuard(\n _directive: RecipeButtonDirective,\n context: unknown,\n ): context is RecipeButtonContext {\n return typeof context === 'object' && context !== null && '$implicit' in context;\n }\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\r\nimport { ControlTypeEnum } from '../enums/control-type.enum';\r\nimport { RecipeCheckboxControlContext } from '../interfaces/recipe-checkbox-control-context.interface';\r\nimport { RecipeUiTemplates } from '../services/recipe-ui-templates.service';\r\n\r\n/** Gabarit d'un contrôle `checkbox`. */\r\n@Directive({ selector: 'ng-template[appRecipeCheckboxControl]' })\r\nexport class RecipeCheckboxControlDirective {\r\n constructor() {\r\n inject(RecipeUiTemplates).register(ControlTypeEnum.CHECKBOX, inject(TemplateRef));\r\n }\r\n\r\n static ngTemplateContextGuard(\r\n _directive: RecipeCheckboxControlDirective,\r\n context: unknown,\r\n ): context is RecipeCheckboxControlContext {\r\n return typeof context === 'object' && context !== null && '$implicit' in context;\r\n }\r\n}\r\n","import { Directive, inject, TemplateRef } from '@angular/core';\nimport { ControlTypeEnum } from '../enums/control-type.enum';\nimport { RecipeControlContext } from '../interfaces/recipe-control-context.interface';\nimport { RecipeUiTemplates } from '../services/recipe-ui-templates.service';\n\n/** Gabarit d'un contrôle `date`. */\n@Directive({ selector: 'ng-template[appRecipeDateControl]' })\nexport class RecipeDateControlDirective {\n constructor() {\n inject(RecipeUiTemplates).register(ControlTypeEnum.DATE, inject(TemplateRef));\n }\n\n static ngTemplateContextGuard(\n _directive: RecipeDateControlDirective,\n context: unknown,\n ): context is RecipeControlContext<Date | null> {\n return typeof context === 'object' && context !== null && '$implicit' in context;\n }\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\nimport { ControlTypeEnum } from '../enums/control-type.enum';\nimport { RecipeDateMultipleControlContext } from '../interfaces/recipe-date-multiple-control-context.interface';\nimport { RecipeUiTemplates } from '../services/recipe-ui-templates.service';\n\n/** Gabarit d'un contrôle `dateMultiple` ; `ariaLabel` nomme le calendrier. */\n@Directive({ selector: 'ng-template[appRecipeDateMultipleControl]' })\nexport class RecipeDateMultipleControlDirective {\n constructor() {\n inject(RecipeUiTemplates).register(ControlTypeEnum.DATE_MULTIPLE, inject(TemplateRef));\n }\n\n static ngTemplateContextGuard(\n _directive: RecipeDateMultipleControlDirective,\n context: unknown,\n ): context is RecipeDateMultipleControlContext {\n return typeof context === 'object' && context !== null && '$implicit' in context;\n }\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\nimport { RecipeUiPartEnum } from '../enums/recipe-ui-part.enum';\nimport { RecipeMessageContext } from '../interfaces/recipe-message-context.interface';\nimport { RecipeUiTemplates } from '../services/recipe-ui-templates.service';\n\n/** Gabarit d'un message (erreur, avertissement, attente) : `<ng-template appRecipeMessage let-text let-severity=\"severity\" …>`. */\n@Directive({ selector: 'ng-template[appRecipeMessage]' })\nexport class RecipeMessageDirective {\n constructor() {\n inject(RecipeUiTemplates).register(RecipeUiPartEnum.MESSAGE, inject(TemplateRef));\n }\n\n static ngTemplateContextGuard(\n _directive: RecipeMessageDirective,\n context: unknown,\n ): context is RecipeMessageContext {\n return typeof context === 'object' && context !== null && '$implicit' in context;\n }\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\nimport { ControlTypeEnum } from '../enums/control-type.enum';\nimport { RecipeNumberControlContext } from '../interfaces/recipe-number-control-context.interface';\nimport { RecipeUiTemplates } from '../services/recipe-ui-templates.service';\n\n/** Gabarit d'un contrôle `number`. */\n@Directive({ selector: 'ng-template[appRecipeNumberControl]' })\nexport class RecipeNumberControlDirective {\n constructor() {\n inject(RecipeUiTemplates).register(ControlTypeEnum.NUMBER, inject(TemplateRef));\n }\n\n static ngTemplateContextGuard(\n _directive: RecipeNumberControlDirective,\n context: unknown,\n ): context is RecipeNumberControlContext {\n return typeof context === 'object' && context !== null && '$implicit' in context;\n }\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\nimport { RecipeUiPartEnum } from '../enums/recipe-ui-part.enum';\nimport { RecipePanelContext } from '../interfaces/recipe-panel-context.interface';\nimport { RecipeUiTemplates } from '../services/recipe-ui-templates.service';\n\n/** Gabarit d'un volet : `let-content` est le contenu à rendre par `ngTemplateOutlet` dans le volet. */\n@Directive({ selector: 'ng-template[appRecipePanel]' })\nexport class RecipePanelDirective {\n constructor() {\n inject(RecipeUiTemplates).register(RecipeUiPartEnum.PANEL, inject(TemplateRef));\n }\n\n static ngTemplateContextGuard(\n _directive: RecipePanelDirective,\n context: unknown,\n ): context is RecipePanelContext {\n return typeof context === 'object' && context !== null && '$implicit' in context;\n }\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\nimport { ControlTypeEnum } from '../enums/control-type.enum';\nimport { RecipeSelectControlContext } from '../interfaces/recipe-select-control-context.interface';\nimport { RecipeUiTemplates } from '../services/recipe-ui-templates.service';\n\n/** Gabarit d'un contrôle `select` ; `options` arrivent au `label` déjà traduit. */\n@Directive({ selector: 'ng-template[appRecipeSelectControl]' })\nexport class RecipeSelectControlDirective {\n constructor() {\n inject(RecipeUiTemplates).register(ControlTypeEnum.SELECT, inject(TemplateRef));\n }\n\n static ngTemplateContextGuard(\n _directive: RecipeSelectControlDirective,\n context: unknown,\n ): context is RecipeSelectControlContext {\n return typeof context === 'object' && context !== null && '$implicit' in context;\n }\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\nimport { RecipeUiPartEnum } from '../enums/recipe-ui-part.enum';\nimport { RecipeTabsContext } from '../interfaces/recipe-tabs-context.interface';\nimport { RecipeUiTemplates } from '../services/recipe-ui-templates.service';\n\n/** Gabarit des onglets : `let-panels` donne un panneau par section, à rendre sans jamais le détruire. */\n@Directive({ selector: 'ng-template[appRecipeTabs]' })\nexport class RecipeTabsDirective {\n constructor() {\n inject(RecipeUiTemplates).register(RecipeUiPartEnum.TABS, inject(TemplateRef));\n }\n\n static ngTemplateContextGuard(\n _directive: RecipeTabsDirective,\n context: unknown,\n ): context is RecipeTabsContext {\n return typeof context === 'object' && context !== null && '$implicit' in context;\n }\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\nimport { ControlTypeEnum } from '../enums/control-type.enum';\nimport { RecipeTextControlContext } from '../interfaces/recipe-text-control-context.interface';\nimport { RecipeUiTemplates } from '../services/recipe-ui-templates.service';\n\n/** Gabarit d'un contrôle `text` : `<ng-template appRecipeTextControl let-field let-inputId=\"inputId\" …>`. */\n@Directive({ selector: 'ng-template[appRecipeTextControl]' })\nexport class RecipeTextControlDirective {\n constructor() {\n inject(RecipeUiTemplates).register(ControlTypeEnum.TEXT, inject(TemplateRef));\n }\n\n static ngTemplateContextGuard(\n _directive: RecipeTextControlDirective,\n context: unknown,\n ): context is RecipeTextControlContext {\n return typeof context === 'object' && context !== null && '$implicit' in context;\n }\n}\n","import { ChangeDetectionStrategy, Component, computed, input, output } from '@angular/core';\nimport { ButtonVariantEnum } from '../../enums/button-variant.enum';\nimport { SeverityEnum } from '../../enums/severity.enum';\n\nconst BASE =\n 'inline-flex items-center justify-center gap-2 rounded-md px-3 py-1.5 text-sm font-medium focus:outline-none ' +\n 'focus:ring-2 focus:ring-sky-500 disabled:cursor-not-allowed disabled:opacity-50';\nconst FILLED: Readonly<Record<SeverityEnum, string>> = {\n [SeverityEnum.PRIMARY]: 'bg-sky-700 text-white hover:bg-sky-800',\n [SeverityEnum.SECONDARY]: 'bg-slate-600 text-white hover:bg-slate-700',\n [SeverityEnum.SUCCESS]: 'bg-emerald-700 text-white hover:bg-emerald-800',\n [SeverityEnum.INFO]: 'bg-cyan-700 text-white hover:bg-cyan-800',\n [SeverityEnum.WARNING]: 'bg-amber-600 text-white hover:bg-amber-700',\n [SeverityEnum.DANGER]: 'bg-red-700 text-white hover:bg-red-800',\n};\nconst OUTLINED: Readonly<Record<SeverityEnum, string>> = {\n [SeverityEnum.PRIMARY]: 'border border-sky-700 text-sky-800 hover:bg-sky-50',\n [SeverityEnum.SECONDARY]: 'border border-slate-400 text-slate-800 hover:bg-slate-50',\n [SeverityEnum.SUCCESS]: 'border border-emerald-700 text-emerald-800 hover:bg-emerald-50',\n [SeverityEnum.INFO]: 'border border-cyan-700 text-cyan-800 hover:bg-cyan-50',\n [SeverityEnum.WARNING]: 'border border-amber-600 text-amber-800 hover:bg-amber-50',\n [SeverityEnum.DANGER]: 'border border-red-700 text-red-800 hover:bg-red-50',\n};\nconst TEXT: Readonly<Record<SeverityEnum, string>> = {\n [SeverityEnum.PRIMARY]: 'text-sky-800 underline hover:bg-sky-50',\n [SeverityEnum.SECONDARY]: 'text-slate-800 underline hover:bg-slate-50',\n [SeverityEnum.SUCCESS]: 'text-emerald-800 underline hover:bg-emerald-50',\n [SeverityEnum.INFO]: 'text-cyan-800 underline hover:bg-cyan-50',\n [SeverityEnum.WARNING]: 'text-amber-800 underline hover:bg-amber-50',\n [SeverityEnum.DANGER]: 'text-red-800 underline hover:bg-red-50',\n};\n\n/**\n * Wrapper par défaut d'un bouton ; l'application hôte peut le remplacer par celui de son design system, de même\n * sélecteur et de mêmes entrées.\n */\n@Component({\n selector: 'app-button',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <button\n [type]=\"type()\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [class]=\"classes()\"\n (click)=\"clicked.emit()\"\n >\n {{ label() }}<ng-content />\n </button>\n `,\n})\nexport class ButtonComponent {\n readonly label = input<string>();\n readonly type = input<'button' | 'submit'>('button');\n readonly disabled = input(false);\n readonly severity = input<SeverityEnum>(SeverityEnum.PRIMARY);\n readonly variant = input<ButtonVariantEnum>(ButtonVariantEnum.FILLED);\n readonly ariaLabel = input<string>();\n readonly clicked = output<void>();\n\n protected readonly classes = computed((): string => {\n const table =\n this.variant() === ButtonVariantEnum.OUTLINED\n ? OUTLINED\n : this.variant() === ButtonVariantEnum.TEXT\n ? TEXT\n : FILLED;\n return `${BASE} ${table[this.severity()]}`;\n });\n}\n","import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n input,\r\n model,\r\n output,\r\n ElementRef,\r\n viewChild,\r\n} from '@angular/core';\r\nimport { FormCheckboxControl } from '@angular/forms/signals';\r\n\r\n/**\r\n * Wrapper par défaut d'une case à cocher, `FormCheckboxControl` ; l'application hôte peut le remplacer par celui de son\r\n * design system. En lecture seule, la case reste focalisable, porte `aria-readonly` et ne change jamais d'état.\r\n */\r\n@Component({\r\n selector: 'app-checkbox',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n template: `\r\n <input\r\n #control\r\n type=\"checkbox\"\r\n [id]=\"inputId()\"\r\n [attr.name]=\"name()\"\r\n [attr.aria-invalid]=\"invalid() && touched() ? 'true' : null\"\r\n [attr.aria-describedby]=\"describedBy() ?? null\"\r\n [attr.aria-readonly]=\"readonly() ? 'true' : null\"\r\n [disabled]=\"disabled()\"\r\n [checked]=\"checked()\"\r\n class=\"h-4 w-4 rounded border-slate-300 text-sky-600 focus:ring-2 focus:ring-sky-500 disabled:cursor-not-allowed\"\r\n [class.cursor-default]=\"readonly()\"\r\n (click)=\"onClick($event)\"\r\n (change)=\"onChange($event)\"\r\n (blur)=\"touch.emit()\"\r\n />\r\n `,\r\n})\r\nexport class CheckboxComponent implements FormCheckboxControl {\r\n readonly checked = model<boolean>(false);\r\n readonly inputId = input<string>('');\r\n readonly name = input<string>('');\r\n readonly disabled = input<boolean>(false);\r\n readonly readonly = input<boolean>(false);\r\n readonly invalid = input<boolean>(false);\r\n readonly touched = input<boolean>(false);\r\n readonly describedBy = input<string>();\r\n readonly touch = output<void>();\r\n\r\n private readonly control = viewChild.required<ElementRef<HTMLInputElement>>('control');\r\n\r\n /** Focus du contrôle natif pour `focusBoundControl` (premier champ en erreur à la soumission). */\r\n focus(options?: FocusOptions): void {\r\n this.control().nativeElement.focus(options);\r\n }\r\n\r\n /** Un clic annulé ne coche pas la case native ; il couvre aussi le libellé et la touche Espace, qui cliquent la case. */\r\n protected onClick(event: Event): void {\r\n if (this.readonly()) {\r\n event.preventDefault();\r\n }\r\n }\r\n\r\n protected onChange(event: Event): void {\r\n this.checked.set((event.target as HTMLInputElement).checked);\r\n }\r\n}\r\n","import { inject, Pipe, PipeTransform } from '@angular/core';\nimport { RECIPE_FORM_TRANSLATION_CHANGES } from '../tokens/recipe-form-translation-changes.token';\nimport { RECIPE_FORM_TRANSLATOR } from '../tokens/recipe-form-translator.token';\n\n/**\n * `{{ 'forms.errors.required' | recipeTranslate }}` : traduit par le service fourni à `RECIPE_FORM_TRANSLATOR`.\n * Impur : l'hôte peut charger ses scopes de traduction en différé.\n * Il lit `RECIPE_FORM_TRANSLATION_CHANGES` : un composant `OnPush` d'une application sans zone n'est revérifié qu'à un\n * changement qui le concerne, et le chargement d'un scope en devient un.\n * `fallback` est rendu quand la clé est inconnue du traducteur (message brut d'une erreur serveur).\n */\n@Pipe({ name: 'recipeTranslate', pure: false })\nexport class RecipeTranslatePipe implements PipeTransform {\n private readonly translator = inject(RECIPE_FORM_TRANSLATOR);\n private readonly translationChanges = inject(RECIPE_FORM_TRANSLATION_CHANGES);\n\n transform(\n key: string | undefined,\n params?: Readonly<Record<string, unknown>>,\n fallback?: string,\n ): string {\n this.translationChanges();\n if (key === undefined) {\n return fallback ?? '';\n }\n const text = this.translator(key, params);\n return text === key && fallback !== undefined ? fallback : text;\n }\n}\n","/**\n * Conversion entre `Date` et la valeur d'un `<input type=\"date\">`, à partir des composantes locales :\n * ni `toISOString`, ni passage par l'UTC, pour que le jour affiché soit le jour saisi.\n */\nexport class RecipeDates {\n static toInputValue(date: Date | null): string {\n if (date === null || Number.isNaN(date.getTime())) {\n return '';\n }\n const month = String(date.getMonth() + 1).padStart(2, '0');\n const day = String(date.getDate()).padStart(2, '0');\n return `${date.getFullYear()}-${month}-${day}`;\n }\n\n static fromInputValue(value: string): Date | null {\n const match = /^(\\d{4})-(\\d{2})-(\\d{2})$/.exec(value);\n if (match === null) {\n return null;\n }\n return new Date(Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n }\n\n /** Même jour civil (composantes locales), pour retrouver une date dans une liste sans comparer les heures. */\n static sameDay(a: Date, b: Date): boolean {\n return (\n a.getFullYear() === b.getFullYear() &&\n a.getMonth() === b.getMonth() &&\n a.getDate() === b.getDate()\n );\n }\n}\n","/** Classes Tailwind partagées par les wrappers par défaut (complètes et littérales). */\nexport const APP_INPUT_CLASSES =\n 'w-full rounded-md border border-slate-300 bg-white px-3 py-2 text-sm text-slate-900 shadow-sm ' +\n 'focus:outline-none focus:ring-2 focus:ring-sky-500 disabled:cursor-not-allowed disabled:bg-slate-100 ' +\n 'read-only:bg-slate-50 aria-invalid:border-red-600 aria-invalid:ring-red-200';\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n input,\n model,\n output,\n signal,\n ElementRef,\n viewChild,\n} from '@angular/core';\nimport { FormValueControl } from '@angular/forms/signals';\nimport { ButtonVariantEnum } from '../../enums/button-variant.enum';\nimport { SeverityEnum } from '../../enums/severity.enum';\nimport { RecipeTranslatePipe } from '../../pipes/recipe-translate.pipe';\nimport { RecipeDates } from '../../utils/recipe-dates.utils';\nimport { ButtonComponent } from '../button/button';\nimport { APP_INPUT_CLASSES } from '../input-classes';\n\n/**\n * Wrapper par défaut d'une sélection de plusieurs dates, `FormValueControl<readonly Date[]>` ; l'application hôte\n * peut le remplacer par un calendrier de son design system, de même contrat : `value`, `maxDate`,\n * `numberOfMonths`, `ariaLabel` et `describedBy`, sorties `dateAdded` et `dateRemoved` à chaque jour coché ou décoché,\n * méthode `focus()`.\n * Les dates sont gardées dans l'ordre chronologique ; ajouter une date déjà présente la retire. Sans `maxDate`, aucune date n'est exclue. Les boutons sont nommés par `forms.array.add` et\n * `forms.array.remove`.\n */\n@Component({\n selector: 'app-date-picker-multiple',\n imports: [ButtonComponent, RecipeTranslatePipe],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'flex flex-col gap-2', role: 'group', '[attr.aria-label]': 'ariaLabel() ?? null' },\n template: `\n <div class=\"flex items-end gap-2\">\n <input\n #control\n type=\"date\"\n [id]=\"inputId()\"\n [attr.name]=\"name()\"\n [attr.max]=\"maxInputValue()\"\n [attr.aria-invalid]=\"invalid() && touched() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy() ?? null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [value]=\"draft()\"\n [class]=\"classes\"\n (input)=\"draft.set($any($event.target).value)\"\n (keydown.enter)=\"$event.preventDefault(); add()\"\n (blur)=\"touch.emit()\"\n />\n <app-button\n [label]=\"'forms.array.add' | recipeTranslate\"\n [variant]=\"variants.OUTLINED\"\n [severity]=\"severities.SECONDARY\"\n [disabled]=\"disabled() || readonly() || draft() === ''\"\n (clicked)=\"add()\"\n />\n </div>\n @if (items().length > 0) {\n <ul class=\"flex flex-wrap gap-2\" [attr.aria-labelledby]=\"inputId() + '-label'\">\n @for (item of items(); track item.getTime()) {\n <li class=\"flex items-center gap-1 rounded-full bg-slate-100 px-3 py-1 text-sm\">\n {{ item.toLocaleDateString() }}\n @if (!disabled() && !readonly()) {\n <button\n type=\"button\"\n class=\"text-slate-500 hover:text-red-700\"\n [attr.aria-label]=\"\n ('forms.array.remove' | recipeTranslate) + ' ' + item.toLocaleDateString()\n \"\n (click)=\"remove(item)\"\n >\n ×\n </button>\n }\n </li>\n }\n </ul>\n }\n `,\n})\nexport class DatePickerMultipleComponent implements FormValueControl<readonly Date[]> {\n /** Jours retenus, comparés au jour civil près. */\n readonly value = model<readonly Date[]>([]);\n readonly inputId = input<string>('');\n readonly name = input<string>('');\n readonly disabled = input<boolean>(false);\n readonly readonly = input<boolean>(false);\n readonly invalid = input<boolean>(false);\n readonly touched = input<boolean>(false);\n readonly required = input<boolean>(false);\n /** Nom du groupe que forme le contrôle (le libellé du champ), posé en `aria-label`. */\n readonly ariaLabel = input<string>();\n /** Identifiants des textes qui décrivent le contrôle (aide, avertissement, erreur), posés en `aria-describedby`. */\n readonly describedBy = input<string>();\n /** Dernier jour sélectionnable ; aucune limite quand il n'est pas fourni. */\n readonly maxDate = input<Date>();\n /**\n * Mois affichés côte à côte par le calendrier de l'application hôte (3 par défaut). Le wrapper par défaut, un\n * champ date natif sans vue mensuelle, l'accepte sans l'utiliser.\n */\n readonly numberOfMonths = input<number>(3);\n readonly touch = output<void>();\n readonly dateAdded = output<Date>();\n readonly dateRemoved = output<Date>();\n\n private readonly control = viewChild.required<ElementRef<HTMLInputElement>>('control');\n\n /** Focus du contrôle natif pour `focusBoundControl` (premier champ en erreur à la soumission). */\n focus(options?: FocusOptions): void {\n this.control().nativeElement.focus(options);\n }\n\n protected readonly classes = APP_INPUT_CLASSES;\n protected readonly variants = ButtonVariantEnum;\n protected readonly severities = SeverityEnum;\n protected readonly draft = signal('');\n protected readonly maxInputValue = computed(() => {\n const max = this.maxDate();\n return max === undefined ? null : RecipeDates.toInputValue(max);\n });\n\n protected readonly items = computed(() =>\n [...this.value()].sort((a, b) => a.getTime() - b.getTime()),\n );\n\n protected add(): void {\n const date = RecipeDates.fromInputValue(this.draft());\n if (date === null) {\n return;\n }\n const existing = this.value().find((item) => RecipeDates.sameDay(item, date));\n this.draft.set('');\n if (existing === undefined) {\n this.value.set([...this.value(), date].sort((a, b) => a.getTime() - b.getTime()));\n this.dateAdded.emit(date);\n } else {\n this.value.set(this.value().filter((item) => item !== existing));\n this.dateRemoved.emit(existing);\n }\n this.touch.emit();\n }\n\n protected remove(date: Date): void {\n this.value.set(this.value().filter((item) => item !== date));\n this.dateRemoved.emit(date);\n this.touch.emit();\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n input,\n model,\n output,\n ElementRef,\n viewChild,\n} from '@angular/core';\nimport { FormValueControl } from '@angular/forms/signals';\nimport { RecipeDates } from '../../utils/recipe-dates.utils';\nimport { APP_INPUT_CLASSES } from '../input-classes';\n\n/**\n * Wrapper par défaut d'une date, `FormValueControl<Date | null>` ; l'application hôte peut le remplacer par celui de\n * son design system. Conversion par composantes locales : le jour affiché est le jour saisi.\n */\n@Component({\n selector: 'app-date-picker',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <input\n #control\n type=\"date\"\n [id]=\"inputId()\"\n [attr.name]=\"name()\"\n [attr.aria-invalid]=\"invalid() && touched() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy() ?? null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [value]=\"inputValue()\"\n [class]=\"classes\"\n (input)=\"onInput($event)\"\n (blur)=\"touch.emit()\"\n />\n `,\n})\nexport class DatePickerComponent implements FormValueControl<Date | null> {\n readonly value = model<Date | null>(null);\n readonly inputId = input<string>('');\n readonly name = input<string>('');\n readonly disabled = input<boolean>(false);\n readonly readonly = input<boolean>(false);\n readonly invalid = input<boolean>(false);\n readonly touched = input<boolean>(false);\n readonly required = input<boolean>(false);\n readonly describedBy = input<string>();\n readonly touch = output<void>();\n\n private readonly control = viewChild.required<ElementRef<HTMLInputElement>>('control');\n\n /** Focus du contrôle natif pour `focusBoundControl` (premier champ en erreur à la soumission). */\n focus(options?: FocusOptions): void {\n this.control().nativeElement.focus(options);\n }\n\n protected readonly classes = APP_INPUT_CLASSES;\n protected readonly inputValue = computed(() => RecipeDates.toInputValue(this.value()));\n\n protected onInput(event: Event): void {\n this.value.set(RecipeDates.fromInputValue((event.target as HTMLInputElement).value));\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n input,\n linkedSignal,\n model,\n output,\n viewChild,\n} from '@angular/core';\nimport { FormValueControl } from '@angular/forms/signals';\nimport { APP_INPUT_CLASSES } from '../input-classes';\n\n/** Décimales admises à la saisie quand `maxFractionDigits` n'est pas fourni : le défaut d'`Intl.NumberFormat`. */\nconst DEFAULT_MAX_FRACTION_DIGITS = 3;\n\n/**\n * Wrapper par défaut d'un nombre, `FormValueControl<number | null>` ; l'application hôte peut le remplacer par le\n * wrapper de son design system, de même sélecteur et de même contrat. `minFractionDigits` fixe les décimales toujours affichées (« 0.30 »), `maxFractionDigits`\n * celles admises à la saisie : un texte plus long est tronqué. Le champ natif suit la locale du navigateur ;\n * le texte est reformaté à la sortie du champ et quand la valeur change par code.\n */\n@Component({\n selector: 'app-input-number',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <input\n #control\n type=\"number\"\n [id]=\"inputId()\"\n [attr.name]=\"name()\"\n [attr.step]=\"step() ?? null\"\n [attr.aria-invalid]=\"invalid() && touched() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy() ?? null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [value]=\"text()\"\n [class]=\"classes\"\n (input)=\"onInput($event)\"\n (blur)=\"onBlur()\"\n />\n `,\n})\nexport class InputNumberComponent implements FormValueControl<number | null> {\n readonly value = model<number | null>(null);\n readonly inputId = input<string>('');\n readonly name = input<string>('');\n readonly disabled = input<boolean>(false);\n readonly readonly = input<boolean>(false);\n readonly invalid = input<boolean>(false);\n readonly touched = input<boolean>(false);\n readonly required = input<boolean>(false);\n /** Pas des flèches du clavier ; 1 quand il n'est pas fourni. */\n readonly step = input<number>();\n /** Décimales toujours affichées (2 pour un montant : « 0.30 ») ; aucune quand il n'est pas fourni. */\n readonly minFractionDigits = input<number>();\n /** Décimales admises à la saisie ; 3, le défaut d'`Intl.NumberFormat`, quand il n'est pas fourni. */\n readonly maxFractionDigits = input<number>();\n /** Identifiants des textes qui décrivent le champ (aide, avertissement, erreur), posés en `aria-describedby`. */\n readonly describedBy = input<string>();\n readonly touch = output<void>();\n\n private readonly control = viewChild.required<ElementRef<HTMLInputElement>>('control');\n\n /** Texte du champ : la valeur formatée, remplacée par la saisie en cours jusqu'à la sortie du champ. */\n protected readonly text = linkedSignal(() =>\n InputNumberComponent.format(this.value(), this.minFractionDigits(), this.maxFractionDigits()),\n );\n\n protected readonly classes = APP_INPUT_CLASSES;\n\n /** Focus du contrôle natif pour `focusBoundControl` (premier champ en erreur à la soumission). */\n focus(options?: FocusOptions): void {\n this.control().nativeElement.focus(options);\n }\n\n protected onInput(event: Event): void {\n const control = event.target as HTMLInputElement;\n const raw = InputNumberComponent.truncate(\n control.value,\n this.maxFractionDigits() ?? DEFAULT_MAX_FRACTION_DIGITS,\n );\n if (raw !== control.value) {\n control.value = raw;\n }\n const parsed = raw === '' ? Number.NaN : Number(raw);\n this.value.set(Number.isNaN(parsed) ? null : parsed);\n this.text.set(raw);\n }\n\n protected onBlur(): void {\n this.text.set(\n InputNumberComponent.format(this.value(), this.minFractionDigits(), this.maxFractionDigits()),\n );\n this.touch.emit();\n }\n\n /** Texte d'une valeur : au moins `min` décimales, au plus `max` (par défaut le plus grand de `min` et 3). */\n private static format(value: number | null, min?: number, max?: number): string {\n if (value === null || !Number.isFinite(value)) {\n return '';\n }\n const minDigits = min ?? 0;\n const fixed = value.toFixed(Math.max(max ?? DEFAULT_MAX_FRACTION_DIGITS, minDigits));\n if (fixed.includes('e')) {\n return String(value);\n }\n const dot = fixed.indexOf('.');\n if (dot === -1) {\n return fixed;\n }\n const integer = fixed.slice(0, dot);\n const fraction = fixed.slice(dot + 1);\n const trimmed = fraction.replace(/0+$/, '');\n const kept = trimmed.length < minDigits ? fraction.slice(0, minDigits) : trimmed;\n return kept === '' ? integer : `${integer}.${kept}`;\n }\n\n /** Coupe la partie décimale d'un texte saisi à `max` chiffres ; une notation exponentielle reste telle quelle. */\n private static truncate(raw: string, max: number): string {\n const dot = raw.indexOf('.');\n if (dot === -1 || /e/i.test(raw) || raw.length - dot - 1 <= max) {\n return raw;\n }\n return max === 0 ? raw.slice(0, dot) : raw.slice(0, dot + 1 + max);\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n input,\n model,\n output,\n ElementRef,\n viewChild,\n} from '@angular/core';\nimport { FormValueControl } from '@angular/forms/signals';\nimport { TextInputMode } from '../../interfaces/text-input-mode.interface';\nimport { APP_INPUT_CLASSES } from '../input-classes';\n\n/**\n * Wrapper par défaut d'un champ texte, `FormValueControl<string>`.\n * L'application hôte peut le remplacer par celui de son design system, de même sélecteur et de même contrat\n * (`value`, `disabled`, `invalid`, `touched`, `touch`).\n */\n@Component({\n selector: 'app-input-text',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <input\n #control\n type=\"text\"\n [id]=\"inputId()\"\n [attr.name]=\"name()\"\n [attr.inputmode]=\"inputmode()\"\n [attr.maxlength]=\"maxLength() ?? null\"\n [attr.aria-invalid]=\"invalid() && touched() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy() ?? null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [value]=\"value()\"\n [class]=\"classes\"\n (input)=\"onInput($event)\"\n (blur)=\"touch.emit()\"\n />\n `,\n})\nexport class InputTextComponent implements FormValueControl<string> {\n readonly value = model<string>('');\n readonly inputId = input<string>('');\n readonly name = input<string>('');\n readonly disabled = input<boolean>(false);\n readonly readonly = input<boolean>(false);\n readonly invalid = input<boolean>(false);\n readonly touched = input<boolean>(false);\n readonly required = input<boolean>(false);\n readonly placeholder = input('');\n /** Clavier proposé ; `text` quand il n'est pas fourni. */\n readonly inputmode = input<TextInputMode>('text');\n /** Lié par `[formField]` à la règle `maxLength` du schéma. */\n readonly maxLength = input<number>();\n /**\n * Icône de fin de champ, dessinée par un wrapper de l'hôte qui dispose d'un jeu d'icônes. Sans jeu d'icônes,\n * le wrapper par défaut l'accepte sans l'afficher.\n */\n readonly icon = input<string>();\n readonly describedBy = input<string>();\n readonly touch = output<void>();\n\n private readonly control = viewChild.required<ElementRef<HTMLInputElement>>('control');\n\n /** Focus du contrôle natif pour `focusBoundControl` (premier champ en erreur à la soumission). */\n focus(options?: FocusOptions): void {\n this.control().nativeElement.focus(options);\n }\n\n protected readonly classes = APP_INPUT_CLASSES;\n\n protected onInput(event: Event): void {\n this.value.set((event.target as HTMLInputElement).value);\n }\n}\n","import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { SeverityEnum } from '../../enums/severity.enum';\n\n/** Message de champ : texte coloré, sans fond ni bordure (classes complètes et littérales). */\nconst INLINE: Readonly<Record<SeverityEnum, string>> = {\n [SeverityEnum.PRIMARY]: 'text-sm text-sky-800',\n [SeverityEnum.SECONDARY]: 'text-xs text-slate-600',\n [SeverityEnum.SUCCESS]: 'text-sm text-emerald-800',\n [SeverityEnum.INFO]: 'text-sm text-cyan-800',\n [SeverityEnum.WARNING]: 'text-sm text-amber-700',\n [SeverityEnum.DANGER]: 'text-sm text-red-700',\n};\n\n/** Message encadré : fond et bordure de la sévérité. */\nconst BOXED: Readonly<Record<SeverityEnum, string>> = {\n [SeverityEnum.PRIMARY]:\n 'rounded-md border border-sky-300 bg-sky-50 px-3 py-2 text-sm text-sky-900',\n [SeverityEnum.SECONDARY]:\n 'rounded-md border border-slate-300 bg-slate-50 px-3 py-2 text-sm text-slate-800',\n [SeverityEnum.SUCCESS]:\n 'rounded-md border border-emerald-300 bg-emerald-50 px-3 py-2 text-sm text-emerald-900',\n [SeverityEnum.INFO]:\n 'rounded-md border border-cyan-300 bg-cyan-50 px-3 py-2 text-sm text-cyan-900',\n [SeverityEnum.WARNING]:\n 'rounded-md border border-amber-300 bg-amber-50 px-3 py-2 text-sm text-amber-900',\n [SeverityEnum.DANGER]:\n 'rounded-md border border-red-300 bg-red-50 px-3 py-2 text-sm text-red-800',\n};\n\n/**\n * Wrapper par défaut d'un message d'erreur ou de statut ; l'application hôte peut le remplacer par celui de son\n * design system, de même contrat : `severity` (`INFO` par défaut), `inline` pour un message de champ, contenu projeté.\n * Une erreur (`DANGER`) est annoncée par `role=\"alert\"`, les autres sévérités par `role=\"status\"`.\n */\n@Component({\n selector: 'app-message',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { '[class]': 'classes()', '[attr.role]': 'role()' },\n template: `<ng-content />`,\n})\nexport class MessageComponent {\n readonly severity = input<SeverityEnum>(SeverityEnum.INFO);\n readonly inline = input(false);\n\n protected readonly classes = computed(\n () => `block ${(this.inline() ? INLINE : BOXED)[this.severity()]}`,\n );\n\n protected readonly role = computed(() =>\n this.severity() === SeverityEnum.DANGER ? 'alert' : 'status',\n );\n}\n","import { ChangeDetectionStrategy, Component, computed, input, model } from '@angular/core';\n\n/**\n * Wrapper par défaut d'un volet titré (format `panel`) ; l'application hôte peut le remplacer par celui de son design\n * system, de même contrat. `collapsible` ajoute le bouton qui replie le contenu ; ce bouton porte son nom\n * (`collapseLabel` volet ouvert, `expandLabel` volet replié, le titre à défaut) et `aria-expanded`.\n * `badge` affiche un compteur d'erreurs dans l'en-tête ; `badgeLabel` le dit aux lecteurs d'écran.\n * Le contenu reste rendu quand le volet est replié (`hidden`) : la validation ne dépend pas de l'affichage.\n * Le contenu ne peut pas élargir le volet : ce qui est plus large que lui défile dans son propre conteneur.\n */\n@Component({\n selector: 'app-panel',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'block min-w-0' },\n template: `\n <section class=\"min-w-0 rounded-lg border border-slate-200\">\n <div class=\"flex items-center justify-between gap-2 px-4 py-2\">\n <h3 class=\"text-base font-semibold text-slate-900\">\n @if (collapsible()) {\n <button\n type=\"button\"\n class=\"flex items-center gap-2 text-left\"\n [attr.aria-label]=\"toggleLabel()\"\n [attr.aria-expanded]=\"!collapsed()\"\n [attr.aria-controls]=\"contentId\"\n (click)=\"collapsed.set(!collapsed())\"\n >\n <span aria-hidden=\"true\" class=\"inline-block w-3 text-xs\">{{\n collapsed() ? '▸' : '▾'\n }}</span>\n {{ header() }}\n </button>\n } @else {\n {{ header() }}\n }\n </h3>\n @let count = badge();\n @if (count !== undefined) {\n <span class=\"flex items-center\">\n @if (badgeLabel(); as label) {\n <span class=\"sr-only\">{{ label }}</span>\n }\n <span\n aria-hidden=\"true\"\n class=\"rounded-full bg-red-700 px-2 py-0.5 text-xs font-semibold text-white\"\n >{{ count }}</span\n >\n </span>\n }\n </div>\n <div [id]=\"contentId\" [hidden]=\"collapsed()\" class=\"min-w-0 border-t border-slate-200 p-4\">\n <ng-content />\n </div>\n </section>\n `,\n})\nexport class PanelComponent {\n private static nextId = 0;\n\n readonly header = input.required<string>();\n readonly collapsible = input(false);\n readonly collapsed = model(false);\n /** Compteur d'erreurs de l'en-tête ; aucun compteur quand il n'est pas fourni. */\n readonly badge = input<number>();\n /** Texte du compteur pour les lecteurs d'écran (« 2 erreurs »). */\n readonly badgeLabel = input<string>();\n /** Nom du bouton quand le volet est ouvert (« Replier le volet Adresse »). */\n readonly collapseLabel = input<string>();\n /** Nom du bouton quand le volet est replié (« Déplier le volet Adresse »). */\n readonly expandLabel = input<string>();\n\n /** Identifiant du contenu, relié au bouton par `aria-controls`. */\n protected readonly contentId = `app-panel-${(PanelComponent.nextId += 1)}-content`;\n\n protected readonly toggleLabel = computed(\n () => (this.collapsed() ? this.expandLabel() : this.collapseLabel()) ?? this.header(),\n );\n}\n","import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n computed,\r\n input,\r\n model,\r\n output,\r\n ElementRef,\r\n viewChild,\r\n} from '@angular/core';\r\nimport { FormValueControl } from '@angular/forms/signals';\r\nimport { SelectOption } from '../../interfaces/select-option.interface';\r\nimport { APP_INPUT_CLASSES } from '../input-classes';\r\n\r\n/**\r\n * Wrapper par défaut d'une liste déroulante, `FormValueControl<T | null>` ; l'application hôte peut le remplacer par\r\n * celui de son design system, de même contrat (`options`, `ariaLabelledBy`, `describedBy`, `showClear`, `filter`,\r\n * `placeholder`, `focus()`).\r\n * La valeur de chaque `<option>` est sa position, pour accepter tout type de valeur.\r\n * Une valeur absente des options est affichée comme option inconnue, non sélectionnable à nouveau.\r\n * En lecture seule, la liste reste focalisable, porte `aria-readonly`, ne s'ouvre pas et n'a ni chevron ni curseur main.\r\n */\r\n@Component({\r\n selector: 'app-select',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n template: `\r\n <select\r\n #control\r\n [id]=\"inputId()\"\r\n [attr.name]=\"name()\"\r\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\r\n [attr.aria-invalid]=\"invalid() && touched() ? 'true' : null\"\r\n [attr.aria-describedby]=\"describedBy() ?? null\"\r\n [attr.aria-required]=\"required() ? 'true' : null\"\r\n [attr.aria-readonly]=\"readonly() ? 'true' : null\"\r\n [disabled]=\"disabled()\"\r\n [value]=\"selectedIndex()\"\r\n [class]=\"classes\"\r\n [class.appearance-none]=\"readonly()\"\r\n [class.cursor-default]=\"readonly()\"\r\n [class.bg-slate-50]=\"readonly()\"\r\n (mousedown)=\"blockWhenReadonly($event)\"\r\n (keydown)=\"blockKeyWhenReadonly($event)\"\r\n (change)=\"onChange($event)\"\r\n (blur)=\"touch.emit()\"\r\n >\r\n @if (showClear() || value() === null) {\r\n <option value=\"\">{{ placeholder() }}</option>\r\n }\r\n @if (unknownValue()) {\r\n <option value=\"?\" disabled>{{ unknownLabel() }}</option>\r\n }\r\n @for (option of options(); track $index) {\r\n <option [value]=\"$index\" [disabled]=\"option.disabled ?? false\">{{ option.label }}</option>\r\n }\r\n </select>\r\n `,\r\n})\r\nexport class SelectComponent<T> implements FormValueControl<T | null> {\r\n readonly value = model<T | null>(null);\r\n readonly options = input<SelectOption<T>[]>([]);\r\n readonly inputId = input<string>('');\r\n readonly name = input<string>('');\r\n readonly disabled = input<boolean>(false);\r\n readonly readonly = input<boolean>(false);\r\n readonly invalid = input<boolean>(false);\r\n readonly touched = input<boolean>(false);\r\n readonly required = input<boolean>(false);\r\n readonly showClear = input<boolean>(false);\r\n /**\r\n * Recherche dans la liste, pour un wrapper de l'hôte qui la propose. Le `<select>` natif l'ignore : il garde la\r\n * recherche du navigateur, qui va à l'option dont le libellé commence par les lettres tapées.\r\n */\r\n readonly filter = input<boolean>(false);\r\n readonly placeholder = input<string>('');\r\n readonly unknownLabel = input<string>('?');\r\n /** Identifiant du libellé de la liste, posé en `aria-labelledby`. */\r\n readonly ariaLabelledBy = input<string>();\r\n /** Identifiants des textes qui décrivent le champ (aide, avertissement, erreur), posés en `aria-describedby`. */\r\n readonly describedBy = input<string>();\r\n readonly touch = output<void>();\r\n\r\n private readonly control = viewChild.required<ElementRef<HTMLSelectElement>>('control');\r\n\r\n /** Focus du contrôle natif pour `focusBoundControl` (premier champ en erreur à la soumission). */\r\n focus(options?: FocusOptions): void {\r\n this.control().nativeElement.focus(options);\r\n }\r\n\r\n protected readonly classes = APP_INPUT_CLASSES;\r\n\r\n protected readonly selectedIndex = computed(() => {\r\n const current = this.value();\r\n if (current === null) {\r\n return '';\r\n }\r\n const index = this.options().findIndex((option) => option.value === current);\r\n return index === -1 ? '?' : String(index);\r\n });\r\n\r\n protected readonly unknownValue = computed(() => this.selectedIndex() === '?');\r\n\r\n protected blockWhenReadonly(event: Event): void {\r\n if (this.readonly()) {\r\n event.preventDefault();\r\n }\r\n }\r\n\r\n /** Les flèches et les lettres changent la valeur d'un `<select>` fermé : seule la tabulation passe. */\r\n protected blockKeyWhenReadonly(event: KeyboardEvent): void {\r\n if (this.readonly() && event.key !== 'Tab') {\r\n event.preventDefault();\r\n }\r\n }\r\n\r\n protected onChange(event: Event): void {\r\n const target = event.target as HTMLSelectElement;\r\n if (this.readonly()) {\r\n target.value = this.selectedIndex();\r\n return;\r\n }\r\n const raw = target.value;\r\n if (raw === '' || raw === '?') {\r\n this.value.set(null);\r\n return;\r\n }\r\n const option = this.options()[Number(raw)];\r\n this.value.set(option === undefined ? null : option.value);\r\n }\r\n}\r\n","import { Directive, inject, input, TemplateRef } from '@angular/core';\n\n/**\n * Contenu d'un onglet d'`app-tabs` : `<ng-template [appTabPanel]=\"valeur\">…</ng-template>` dans `<app-tabs>`.\n * Le wrapper rend un panneau par gabarit et ne fait que masquer ceux des onglets inactifs : le contenu n'est\n * jamais détruit.\n */\n@Directive({ selector: 'ng-template[appTabPanel]' })\nexport class TabPanelDirective {\n /** Valeur de l'onglet dont ce gabarit est le contenu. */\n readonly value = input.required<string>({ alias: 'appTabPanel' });\n readonly template = inject<TemplateRef<unknown>>(TemplateRef);\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChildren,\n ElementRef,\n inject,\n Injector,\n input,\n model,\n viewChild,\n viewChildren,\n} from '@angular/core';\nimport { TabOption } from '../../interfaces/tab-option.interface';\nimport { TabPanelDirective } from './tab-panel.directive';\n\nconst TAB_BASE =\n '-mb-px inline-flex items-center gap-2 border-b-2 px-3 py-2 text-sm font-medium focus:outline-none ' +\n 'focus-visible:ring-2 focus-visible:ring-sky-500 disabled:cursor-not-allowed disabled:opacity-50';\nconst TAB_SELECTED = `${TAB_BASE} border-sky-700 text-sky-800`;\nconst TAB_IDLE = `${TAB_BASE} border-transparent text-slate-700 hover:border-slate-300 hover:text-slate-900`;\n/**\n * `fill` sous 768 px : largeur partagée à parts égales, titre centré qui passe à la ligne entre les mots, marges et\n * texte réduits ; l'espace haut (`pt-6`) est réservé à la pastille même sans compteur : même hauteur d'onglet.\n */\nconst TAB_FILL =\n 'max-md:relative max-md:min-w-0 max-md:flex-1 max-md:basis-0 max-md:justify-center max-md:px-2 max-md:pt-6 ' +\n 'max-md:text-center max-md:text-xs';\n/** Conteneur de la pastille, de la hauteur de la ligne du titre (`text-sm`). */\nconst BADGE_SLOT = 'flex h-5 shrink-0 items-center';\n/** `fill` sous 768 px : pastille au coin haut droit de l'onglet, hors du flux, le titre garde toute la largeur. */\nconst BADGE_SLOT_FILL = 'max-md:absolute max-md:top-0.5 max-md:right-0.5';\n\n/**\n * Wrapper par défaut d'une barre d'onglets (format `tabs`) ; l'application hôte peut le remplacer par celui de son\n * design system, de même contrat (`value` en modèle, `options`, `fill`), avec le compteur `badge` de chaque onglet.\n * Chaque `<ng-template [appTabPanel]=\"valeur\">` projeté devient un panneau, dans l'ordre des gabarits ; sans gabarit,\n * le wrapper n'affiche que la barre et le parent rend le contenu. Les panneaux inactifs restent rendus (`hidden`) :\n * la validation ne dépend pas de l'affichage, et une section n'est jamais recréée.\n * La barre colle en haut du conteneur qui défile (`sticky`, fond opaque) tant que les panneaux, dans le même bloc\n * (l'élément hôte), défilent dessous. Elle colle à `top: var(--app-sticky-top, 0px)` : un conteneur qui défile avec\n * une marge haute (`padding-top`) pose `--app-sticky-top` au négatif de cette marge (`-20px` pour 20 px), sinon le\n * contenu reste visible dans la bande au-dessus de la barre collée.\n * Quand l'utilisateur change d'onglet (clic ou clavier) alors que la barre est collée, l'hôte défile au début de la\n * zone qui défile (`scrollIntoView({ block: 'start' })`, après le rendu) : le nouveau panneau s'affiche depuis son\n * haut, pas à la position de défilement de l'ancien. Un changement de `value` venu du parent ne fait pas défiler :\n * le focus du premier champ en erreur pilote alors le défilement.\n * Le nom d'un onglet est son seul titre : le texte du compteur (`badgeLabel`) le décrit (`aria-describedby`), si\n * bien que le panneau, nommé par l'onglet, ne porte que le titre. La pastille tient dans la hauteur de la ligne du\n * titre : un onglet a la même hauteur avec ou sans compteur.\n * Clavier (motif ARIA des onglets) : seul l'onglet actif est dans l'ordre de tabulation ; flèches gauche et droite\n * (en boucle), Début et Fin déplacent le focus en sautant les onglets désactivés, et l'onglet atteint devient actif.\n */\n@Component({\n selector: 'app-tabs',\n imports: [NgTemplateOutlet],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'block min-w-0' },\n template: `\n <div\n #tablist\n role=\"tablist\"\n class=\"sticky top-[var(--app-sticky-top,0px)] z-10 flex flex-wrap border-b border-slate-200 bg-white\"\n >\n @for (option of options(); track option.value) {\n <button\n #tab\n type=\"button\"\n role=\"tab\"\n [id]=\"tabId(option.value)\"\n [attr.aria-selected]=\"option.value === value()\"\n [attr.aria-controls]=\"panelValues().has(option.value) ? panelId(option.value) : null\"\n [attr.aria-describedby]=\"described(option) ? descriptionId(option.value) : null\"\n [attr.tabindex]=\"option.value === focusable() ? 0 : -1\"\n [disabled]=\"option.disabled ?? false\"\n [class]=\"option.value === value() ? tabClasses().selected : tabClasses().idle\"\n (click)=\"select(option.value)\"\n (keydown)=\"onKeydown($event, $index)\"\n >\n <span class=\"min-w-0\">{{ option.label }}</span>\n @if (option.badge !== undefined) {\n <span [class]=\"tabClasses().badge\">\n <span\n aria-hidden=\"true\"\n class=\"rounded-full bg-red-700 px-2 py-0.5 text-xs leading-none font-semibold text-white\"\n >{{ option.badge }}</span\n >\n </span>\n }\n </button>\n }\n </div>\n @for (option of options(); track option.value) {\n @if (described(option)) {\n <span hidden [id]=\"descriptionId(option.value)\">{{ option.badgeLabel }}</span>\n }\n }\n @for (panel of panels(); track panel) {\n @let panelValue = panel.value();\n <div\n role=\"tabpanel\"\n tabindex=\"0\"\n [id]=\"panelId(panelValue)\"\n [attr.aria-labelledby]=\"tabValues().has(panelValue) ? tabId(panelValue) : null\"\n [hidden]=\"panelValue !== value()\"\n class=\"min-w-0 pt-4 focus:outline-none focus-visible:ring-2 focus-visible:ring-sky-500\"\n >\n <ng-container [ngTemplateOutlet]=\"panel.template\" />\n </div>\n }\n `,\n})\nexport class TabsComponent {\n private static nextId = 0;\n\n /** Valeur de l'onglet actif. */\n readonly value = model.required<string>();\n readonly options = input.required<TabOption[]>();\n /**\n * Sous 768 px, les onglets se partagent toute la largeur et leur titre passe à la ligne entre les mots, la pastille\n * au coin haut droit : aucun onglet n'est hors de vue.\n */\n readonly fill = input(false);\n\n protected readonly panels = contentChildren(TabPanelDirective);\n private readonly tabs = viewChildren<ElementRef<HTMLButtonElement>>('tab');\n private readonly tablist = viewChild.required<ElementRef<HTMLElement>>('tablist');\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly injector = inject(Injector);\n\n protected readonly tabClasses = computed(() => {\n const fill = this.fill();\n return {\n selected: fill ? `${TAB_SELECTED} ${TAB_FILL}` : TAB_SELECTED,\n idle: fill ? `${TAB_IDLE} ${TAB_FILL}` : TAB_IDLE,\n badge: fill ? `${BADGE_SLOT} ${BADGE_SLOT_FILL}` : BADGE_SLOT,\n };\n });\n\n /** Préfixe des identifiants qui relient chaque onglet à son panneau (`aria-controls`, `aria-labelledby`). */\n private readonly baseId = `app-tabs-${(TabsComponent.nextId += 1)}`;\n\n protected readonly panelValues = computed(\n (): ReadonlySet<string> => new Set(this.panels().map((panel) => panel.value())),\n );\n protected readonly tabValues = computed(\n (): ReadonlySet<string> => new Set(this.options().map((option) => option.value)),\n );\n\n /** Seul onglet atteint par Tab (focus mobile) : l'onglet actif, ou le premier onglet activable à défaut. */\n protected readonly focusable = computed((): string | undefined => {\n const enabled = this.options().filter((option) => option.disabled !== true);\n const value = this.value();\n return (enabled.find((option) => option.value === value) ?? enabled[0])?.value;\n });\n\n protected tabId(value: string): string {\n return `${this.baseId}-tab-${value}`;\n }\n\n protected panelId(value: string): string {\n return `${this.baseId}-panel-${value}`;\n }\n\n protected descriptionId(value: string): string {\n return `${this.baseId}-description-${value}`;\n }\n\n /** Onglet décrit par le texte de son compteur : un compteur affiché, et son texte fourni. */\n protected described(option: TabOption): boolean {\n return option.badge !== undefined && (option.badgeLabel ?? '') !== '';\n }\n\n /**\n * Onglet choisi par l'utilisateur (clic ou clavier). Seul ce chemin fait défiler : un changement de `value` venu du\n * parent (onglet du premier champ en erreur) laisse le focus du champ piloter le défilement.\n */\n protected select(value: string): void {\n if (value === this.value()) {\n return;\n }\n this.value.set(value);\n afterNextRender(() => this.scrollToStartIfStuck(), { injector: this.injector });\n }\n\n /** L'activation suit le focus : les panneaux sont déjà rendus, afficher l'onglet atteint ne coûte rien. */\n protected onKeydown(event: KeyboardEvent, index: number): void {\n const target = this.target(event.key, index);\n if (target === undefined) {\n return;\n }\n event.preventDefault();\n const option = this.options()[target];\n if (option !== undefined) {\n this.select(option.value);\n this.tabs()[target]?.nativeElement.focus();\n }\n }\n\n /**\n * Barre collée (le haut de l'hôte est passé au-dessus du haut de la barre) : le nouveau panneau garde la position de\n * défilement de l'ancien et son haut est caché sous la barre ; l'hôte défile au début de la zone qui défile.\n * Sans défilement préalable, la barre est à sa place, au haut de l'hôte, et rien ne bouge.\n */\n private scrollToStartIfStuck(): void {\n const host = this.host.nativeElement;\n const barTop = this.tablist().nativeElement.getBoundingClientRect().top;\n if (host.getBoundingClientRect().top < barTop) {\n host.scrollIntoView({ block: 'start' });\n }\n }\n\n /** Rang de l'onglet atteint par la touche depuis le rang `index`, onglets désactivés sautés, en boucle aux bouts. */\n private target(key: string, index: number): number | undefined {\n const enabled = this.options().flatMap((option, position) =>\n option.disabled === true ? [] : [position],\n );\n switch (key) {\n case 'ArrowRight':\n return enabled.find((position) => position > index) ?? enabled[0];\n case 'ArrowLeft':\n return [...enabled].reverse().find((position) => position < index) ?? enabled.at(-1);\n case 'Home':\n return enabled[0];\n case 'End':\n return enabled.at(-1);\n default:\n return undefined;\n }\n }\n}\n","import { NgTemplateOutlet } from '@angular/common';\r\nimport { ChangeDetectionStrategy, Component } from '@angular/core';\r\nimport { FormField } from '@angular/forms/signals';\r\nimport { RecipeButtonDirective } from '../directives/recipe-button.directive';\r\nimport { RecipeCheckboxControlDirective } from '../directives/recipe-checkbox-control.directive';\r\nimport { RecipeDateControlDirective } from '../directives/recipe-date-control.directive';\r\nimport { RecipeDateMultipleControlDirective } from '../directives/recipe-date-multiple-control.directive';\r\nimport { RecipeMessageDirective } from '../directives/recipe-message.directive';\r\nimport { RecipeNumberControlDirective } from '../directives/recipe-number-control.directive';\r\nimport { RecipePanelDirective } from '../directives/recipe-panel.directive';\r\nimport { RecipeSelectControlDirective } from '../directives/recipe-select-control.directive';\r\nimport { RecipeTabsDirective } from '../directives/recipe-tabs.directive';\r\nimport { RecipeTextControlDirective } from '../directives/recipe-text-control.directive';\r\nimport { ButtonComponent } from './button/button';\r\nimport { CheckboxComponent } from './checkbox/checkbox';\r\nimport { DatePickerMultipleComponent } from './date-picker-multiple/date-picker-multiple';\r\nimport { DatePickerComponent } from './date-picker/date-picker';\r\nimport { InputNumberComponent } from './input-number/input-number';\r\nimport { InputTextComponent } from './input-text/input-text';\r\nimport { MessageComponent } from './message/message';\r\nimport { PanelComponent } from './panel/panel';\r\nimport { SelectComponent } from './select/select';\r\nimport { TabPanelDirective } from './tabs/tab-panel.directive';\r\nimport { TabsComponent } from './tabs/tabs';\r\n\r\n/**\r\n * Gabarits par défaut des contrôles, des messages, des boutons, des volets et des onglets, avec les wrappers HTML de `ui/`. Le registre le crée avant le composant de\r\n * l'hôte : un contrôle que l'hôte ne déclare pas garde ce gabarit. Il sert aussi de modèle à celui de l'hôte.\r\n */\r\n@Component({\r\n selector: 'app-recipe-default-ui',\r\n imports: [\r\n FormField,\r\n NgTemplateOutlet,\r\n ButtonComponent,\r\n CheckboxComponent,\r\n DatePickerComponent,\r\n DatePickerMultipleComponent,\r\n InputNumberComponent,\r\n InputTextComponent,\r\n MessageComponent,\r\n PanelComponent,\r\n SelectComponent,\r\n TabPanelDirective,\r\n TabsComponent,\r\n RecipeButtonDirective,\r\n RecipeCheckboxControlDirective,\r\n RecipeDateControlDirective,\r\n RecipeDateMultipleControlDirective,\r\n RecipeMessageDirective,\r\n RecipeNumberControlDirective,\r\n RecipePanelDirective,\r\n RecipeSelectControlDirective,\r\n RecipeTabsDirective,\r\n RecipeTextControlDirective,\r\n ],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n template: `\r\n <ng-template\r\n appRecipeTextControl\r\n let-field\r\n let-inputId=\"inputId\"\r\n let-describedBy=\"describedBy\"\r\n let-placeholder=\"placeholder\"\r\n let-inputmode=\"inputmode\"\r\n let-icon=\"icon\"\r\n >\r\n <app-input-text\r\n [formField]=\"field\"\r\n [inputId]=\"inputId\"\r\n [describedBy]=\"describedBy\"\r\n [placeholder]=\"placeholder\"\r\n [inputmode]=\"inputmode\"\r\n [icon]=\"icon\"\r\n />\r\n </ng-template>\r\n <ng-template\r\n appRecipeNumberControl\r\n let-field\r\n let-inputId=\"inputId\"\r\n let-describedBy=\"describedBy\"\r\n let-step=\"step\"\r\n let-minFractionDigits=\"minFractionDigits\"\r\n let-maxFractionDigits=\"maxFractionDigits\"\r\n >\r\n <app-input-number\r\n [formField]=\"field\"\r\n [inputId]=\"inputId\"\r\n [describedBy]=\"describedBy\"\r\n [step]=\"step\"\r\n [minFractionDigits]=\"minFractionDigits\"\r\n [maxFractionDigits]=\"maxFractionDigits\"\r\n />\r\n </ng-template>\r\n <ng-template\r\n appRecipeSelectControl\r\n let-field\r\n let-inputId=\"inputId\"\r\n let-describedBy=\"describedBy\"\r\n let-labelId=\"labelId\"\r\n let-options=\"options\"\r\n let-filter=\"filter\"\r\n let-showClear=\"showClear\"\r\n let-placeholder=\"placeholder\"\r\n >\r\n <app-select\r\n [formField]=\"field\"\r\n [inputId]=\"inputId\"\r\n [ariaLabelledBy]=\"labelId\"\r\n [describedBy]=\"describedBy\"\r\n [options]=\"options\"\r\n [filter]=\"filter\"\r\n [showClear]=\"showClear\"\r\n [placeholder]=\"placeholder\"\r\n />\r\n </ng-template>\r\n <ng-template appRecipeDateControl let-field let-inputId=\"inputId\" let-describedBy=\"describedBy\">\r\n <app-date-picker [formField]=\"field\" [inputId]=\"inputId\" [describedBy]=\"describedBy\" />\r\n </ng-template>\r\n <ng-template\r\n appRecipeDateMultipleControl\r\n let-field\r\n let-inputId=\"inputId\"\r\n let-describedBy=\"describedBy\"\r\n let-ariaLabel=\"ariaLabel\"\r\n let-maxDate=\"maxDate\"\r\n let-months=\"months\"\r\n >\r\n <app-date-picker-multiple\r\n [formField]=\"field\"\r\n [inputId]=\"inputId\"\r\n [ariaLabel]=\"ariaLabel\"\r\n [describedBy]=\"describedBy\"\r\n [maxDate]=\"maxDate\"\r\n [numberOfMonths]=\"months\"\r\n />\r\n </ng-template>\r\n <ng-template\r\n appRecipeCheckboxControl\r\n let-field\r\n let-inputId=\"inputId\"\r\n let-describedBy=\"describedBy\"\r\n >\r\n <app-checkbox [formField]=\"field\" [inputId]=\"inputId\" [describedBy]=\"describedBy\" />\r\n </ng-template>\r\n <ng-template appRecipeMessage let-text let-severity=\"severity\" let-inline=\"inline\">\r\n <app-message [severity]=\"severity\" [inline]=\"inline\">{{ text }}</app-message>\r\n </ng-template>\r\n <ng-template\r\n appRecipeButton\r\n let-label\r\n let-variant=\"variant\"\r\n let-severity=\"severity\"\r\n let-click=\"click\"\r\n >\r\n <app-button [label]=\"label\" [variant]=\"variant\" [severity]=\"severity\" (clicked)=\"click()\" />\r\n </ng-template>\r\n <ng-template\r\n appRecipePanel\r\n let-content\r\n let-header=\"header\"\r\n let-collapsible=\"collapsible\"\r\n let-collapsed=\"collapsed\"\r\n let-toggle=\"toggle\"\r\n let-badge=\"badge\"\r\n let-badgeLabel=\"badgeLabel\"\r\n let-collapseLabel=\"collapseLabel\"\r\n let-expandLabel=\"expandLabel\"\r\n >\r\n <app-panel\r\n [header]=\"header\"\r\n [collapsible]=\"collapsible\"\r\n [collapsed]=\"collapsed\"\r\n (collapsedChange)=\"toggle($event)\"\r\n [badge]=\"badge\"\r\n [badgeLabel]=\"badgeLabel\"\r\n [collapseLabel]=\"collapseLabel\"\r\n [expandLabel]=\"expandLabel\"\r\n >\r\n <ng-container [ngTemplateOutlet]=\"content\" />\r\n </app-panel>\r\n </ng-template>\r\n <ng-template\r\n appRecipeTabs\r\n let-panels\r\n let-options=\"options\"\r\n let-value=\"value\"\r\n let-select=\"select\"\r\n let-fill=\"fill\"\r\n >\r\n <app-tabs [options]=\"options\" [value]=\"value\" (valueChange)=\"select($event)\" [fill]=\"fill\">\r\n <!-- Suivi par valeur : le contexte recrée la liste à chaque calcul, un panneau n'est jamais détruit. -->\r\n @for (panel of panels; track panel.value) {\r\n <ng-template [appTabPanel]=\"panel.value\">\r\n <ng-container [ngTemplateOutlet]=\"panel.template\" />\r\n </ng-template>\r\n }\r\n </app-tabs>\r\n </ng-template>\r\n `,\r\n})\r\nexport class RecipeDefaultUiComponent {}\r\n","import {\r\n ComponentRef,\r\n createComponent,\r\n DestroyRef,\r\n EnvironmentInjector,\r\n inject,\r\n Injector,\r\n Service,\r\n TemplateRef,\r\n} from '@angular/core';\r\nimport { RecipeUiTemplateType } from '../interfaces/recipe-ui-template-type.interface';\r\nimport { RECIPE_FORM_UI } from '../tokens/recipe-form-ui.token';\r\nimport { RecipeDefaultUiComponent } from '../ui/recipe-default-ui';\r\nimport { RecipeUiTemplates } from './recipe-ui-templates.service';\r\n\r\n/**\r\n * Registre des gabarits de contrôle et d'interface. Au premier gabarit demandé, il crée le composant par défaut puis celui de\r\n * l'hôte (`RECIPE_FORM_UI`), une fois, hors de l'arbre de l'application : leurs directives `appRecipe…`\r\n * enregistrent leurs gabarits, ceux de l'hôte en dernier. Les vues rendues depuis ces gabarits sont attachées au\r\n * champ qui les insère et se rafraîchissent avec lui.\r\n */\r\n@Service()\r\nexport class RecipeUi {\r\n private readonly templates = inject(RecipeUiTemplates);\r\n private readonly environmentInjector = inject(EnvironmentInjector);\r\n /** Injecteur où le registre est fourni : les directives des gabarits y trouvent `RecipeUiTemplates`. */\r\n private readonly injector = inject(Injector);\r\n private readonly hostUi = inject(RECIPE_FORM_UI);\r\n private readonly created: ComponentRef<unknown>[] = [];\r\n\r\n constructor() {\r\n inject(DestroyRef).onDestroy(() => this.created.forEach((ref) => ref.destroy()));\r\n }\r\n\r\n template(type: RecipeUiTemplateType): TemplateRef<unknown> {\r\n this.createOnce();\r\n const template = this.templates.get(type);\r\n if (template === undefined) {\r\n throw new Error(`[recipe-forms] aucun gabarit pour le contrôle « ${type} »`);\r\n }\r\n return template;\r\n }\r\n\r\n private createOnce(): void {\r\n if (this.created.length > 0) {\r\n return;\r\n }\r\n for (const ui of [RecipeDefaultUiComponent, this.hostUi]) {\r\n if (ui !== undefined) {\r\n const ref = createComponent(ui, {\r\n environmentInjector: this.environmentInjector,\r\n elementInjector: this.injector,\r\n });\r\n // La création des vues pose les directives, qui enregistrent leurs gabarits.\r\n ref.changeDetectorRef.detectChanges();\r\n this.created.push(ref);\r\n }\r\n }\r\n }\r\n}\r\n","import { Provider, Type } from '@angular/core';\r\nimport { RecipeUi } from '../services/recipe-ui.service';\r\nimport { RecipeUiTemplates } from '../services/recipe-ui-templates.service';\r\nimport { RECIPE_FORM_UI } from '../tokens/recipe-form-ui.token';\r\n\r\n/**\r\n * Gabarits de l'hôte pour les formulaires d'un composant : à poser dans les `providers` du composant qui affiche les\r\n * formulaires (ou d'une route). Le composant de gabarits reste ainsi dans le chunk chargé à la demande, au lieu\r\n * d'entrer dans le bundle initial par `provideRecipeForms({ ui })`. Le registre et ses gabarits sont propres à\r\n * ce composant et détruits avec lui.\r\n */\r\nexport const provideRecipeFormsUi = (ui: Type<unknown>): Provider[] => [\r\n { provide: RECIPE_FORM_UI, useValue: ui },\r\n RecipeUi,\r\n RecipeUiTemplates,\r\n];\r\n","import {\n EnvironmentProviders,\n inject,\n makeEnvironmentProviders,\n Provider,\n provideEnvironmentInitializer,\n} from '@angular/core';\nimport { RecipeFormsOptions } from '../interfaces/recipe-forms-options.interface';\nimport { InMemoryValidationTiming } from '../services/in-memory-validation-timing.service';\nimport { FORM_KEY_GENERATOR } from '../tokens/form-key-generator.token';\nimport { FORM_VALIDATION_TIMING } from '../tokens/form-validation-timing.token';\nimport { RECIPE_FORM_TRANSLATION_CHANGES } from '../tokens/recipe-form-translation-changes.token';\nimport { RECIPE_FORM_TRANSLATOR } from '../tokens/recipe-form-translator.token';\nimport { RECIPE_FORM_RX_RESOURCE } from '../tokens/recipe-form-rx-resource.token';\nimport { RECIPE_FORM_UI } from '../tokens/recipe-form-ui.token';\n\n/** Nom de la commande exposée hors production : `rfValidationTiming()` dans la console du navigateur. */\nexport const RECIPE_FORMS_TIMING_COMMAND = 'rfValidationTiming';\n\n/**\n * Branche le moteur dans l'application hôte. Hors production, le collecteur en mémoire remplace\n * le collecteur sans effet et la commande d'affichage du résumé est exposée.\n * Le traducteur et le signal des changements de traductions sont des fabriques (`useFactory`) : l'hôte y injecte\n * son service i18n (par exemple `TranslocoService`).\n */\nexport const provideRecipeForms = (options: RecipeFormsOptions): EnvironmentProviders => {\n const providers: Provider[] = [];\n if (!options.production) {\n providers.push({ provide: FORM_VALIDATION_TIMING, useClass: InMemoryValidationTiming });\n }\n if (options.translator !== undefined) {\n providers.push({ provide: RECIPE_FORM_TRANSLATOR, useFactory: options.translator });\n }\n if (options.translationChanges !== undefined) {\n providers.push({\n provide: RECIPE_FORM_TRANSLATION_CHANGES,\n useFactory: options.translationChanges,\n });\n }\n if (options.ui !== undefined) {\n providers.push({ provide: RECIPE_FORM_UI, useValue: options.ui });\n }\n if (options.rxResource !== undefined) {\n providers.push({ provide: RECIPE_FORM_RX_RESOURCE, useValue: options.rxResource });\n }\n if (options.keyGenerator !== undefined) {\n providers.push({ provide: FORM_KEY_GENERATOR, useValue: options.keyGenerator });\n }\n return makeEnvironmentProviders([\n ...providers,\n options.production\n ? []\n : provideEnvironmentInitializer(() => {\n const timing = inject(FORM_VALIDATION_TIMING);\n const scope = globalThis as Record<string, unknown>;\n scope[RECIPE_FORMS_TIMING_COMMAND] = () => console.table(timing.summary());\n }),\n ]);\n};\n","import { FieldState } from '@angular/forms/signals';\nimport { AnyModel } from '../interfaces/any-model.interface';\nimport { ArrayItem } from '../interfaces/array-item.interface';\nimport { ArrayNode } from '../interfaces/array-node.interface';\nimport { RecipeArrayApi } from '../interfaces/recipe-array-api.interface';\n\ntype AnyArrayItem = ArrayItem & AnyModel;\n\n/**\n * API d'un `array` sur l'état de la liste : ajout par `emptyItem(key)` fusionné avec les valeurs données,\n * tri déclaré dans le nœud appliqué après chaque ajout, retrait par clé.\n */\nexport class RecipeArrays {\n static api(\n node: ArrayNode<AnyModel>,\n state: () => FieldState<readonly AnyArrayItem[]> | undefined,\n keyGenerator: () => string,\n ): RecipeArrayApi<AnyArrayItem> {\n const items = (): readonly AnyArrayItem[] => state()?.value() ?? [];\n return {\n items,\n addItem: (item) => {\n const key = keyGenerator();\n const created: AnyArrayItem = { ...node.emptyItem(key), ...item, key };\n state()?.value.update((current) => RecipeArrays.sorted(node, [...current, created]));\n return key;\n },\n removeItem: (key) => {\n state()?.value.update((current) => current.filter((item) => item.key !== key));\n },\n has: (predicate) => items().some(predicate),\n };\n }\n\n private static sorted(\n node: ArrayNode<AnyModel>,\n items: readonly AnyArrayItem[],\n ): readonly AnyArrayItem[] {\n const sort = node.sort;\n return sort === undefined ? items : [...items].sort(sort);\n }\n}\n","import { effect, inject, signal } from '@angular/core';\nimport { debounce, FieldContext, metadata, PathKind, validateAsync } from '@angular/forms/signals';\nimport { defer, finalize, Observable, tap } from 'rxjs';\nimport { FORM_VALIDATION_UNAVAILABLE } from '../constants/form-validation-unavailable-key.constants';\nimport { ValidationOutcomeEnum } from '../enums/validation-outcome.enum';\nimport { AsyncRuleInput } from '../interfaces/async-rule-input.interface';\nimport { LinkedValidationError } from '../interfaces/linked-validation-error.interface';\nimport { RecipeValidationError } from '../interfaces/recipe-validation-error.interface';\nimport { ServerValidationResult } from '../interfaces/server-validation-result.interface';\nimport { ValidationTiming } from '../interfaces/validation-timing.interface';\nimport { RECIPE_FORM_RX_RESOURCE } from '../tokens/recipe-form-rx-resource.token';\nimport { AnySchemaPath } from './recipe-paths.utils';\nimport { RecipeRuleContexts } from './recipe-rule-context.utils';\n\ntype AnyFieldContext = FieldContext<unknown, PathKind>;\n\n/**\n * Paramètres de la ressource : la valeur à valider, le champ propriétaire (pour relier la panne au bon champ) et les\n * valeurs des clés de `dependsOn`, dont le changement relance l'appel.\n */\ninterface AsyncParams {\n readonly value: unknown;\n readonly owner: object;\n readonly dependencies: Readonly<Record<string, unknown>>;\n}\n\nconst NO_DEPENDENCIES: Readonly<Record<string, unknown>> = {};\n\n/**\n * Règle asynchrone : `validateAsync` sur le chemin, validateur appelé par la ressource de\n * `RECIPE_FORM_RX_RESOURCE` (`rxResource` par défaut, ou le wrapper de l'hôte passé à `provideRecipeForms`).\n * - un délai numérique passe par le `debounce` de `validateAsync` ; `'blur'` passe par `debounce(path, 'blur')`\n * de Signal Forms, qui retarde la propagation de la valeur du champ ;\n * - une valeur modifiée pendant l'appel annule l'appel en cours (comportement de la ressource) ;\n * - une panne du validateur n'est pas une erreur de validation : elle pose la métadonnée\n * `FORM_VALIDATION_UNAVAILABLE` du champ, affichée en avertissement, et le formulaire reste soumissible ;\n * - les clés de `dependsOn` sont lues dans les paramètres : leur changement relance l'appel, une fois par champ,\n * et le validateur les reçoit par `ctx.root` ;\n * - durée et résultat sont transmis au collecteur, sans la valeur saisie.\n */\nexport class RecipeAsyncRule {\n static apply(\n path: AnySchemaPath,\n rule: AsyncRuleInput,\n timing: ValidationTiming,\n params: (ctx: AnyFieldContext) => unknown = (ctx) => ctx.value(),\n ): void {\n if (rule.debounce === 'blur') {\n debounce(path, 'blur');\n }\n const failed = signal<ReadonlySet<object>>(new Set());\n const when = rule.when;\n const dependencies = rule.dependencies;\n validateAsync(path, {\n params: (ctx): AsyncParams => ({\n value: params(ctx),\n owner: ctx.fieldTree,\n dependencies: dependencies === undefined ? NO_DEPENDENCIES : dependencies(ctx),\n }),\n debounce: typeof rule.debounce === 'number' ? rule.debounce : undefined,\n factory: (resourceParams) => {\n const resource = inject(RECIPE_FORM_RX_RESOURCE)({\n params: () => resourceParams(),\n stream: ({ params: current }) =>\n RecipeAsyncRule.measured(\n () =>\n rule.validator(\n current.value,\n RecipeRuleContexts.fromDependencies(current.dependencies, rule.name),\n ),\n rule.name,\n timing,\n ),\n });\n let owner: object | undefined;\n effect(() => {\n owner = resourceParams()?.owner ?? owner;\n const isFailed = resource.error() !== undefined;\n const current = owner;\n if (current !== undefined) {\n failed.update((set) => RecipeAsyncRule.toggled(set, current, isFailed));\n }\n });\n return resource;\n },\n onSuccess: (result) => RecipeAsyncRule.toError(result, rule.linkedId),\n onError: () => undefined,\n when: when === undefined ? undefined : (ctx) => when(ctx),\n });\n metadata(path, FORM_VALIDATION_UNAVAILABLE, (ctx) => failed().has(ctx.fieldTree));\n }\n\n private static toggled(\n set: ReadonlySet<object>,\n owner: object,\n present: boolean,\n ): ReadonlySet<object> {\n if (set.has(owner) === present) {\n return set;\n }\n const next = new Set(set);\n if (present) {\n next.add(owner);\n } else {\n next.delete(owner);\n }\n return next;\n }\n\n private static toError(\n result: ServerValidationResult,\n linkedId: string | undefined,\n ): RecipeValidationError | undefined {\n if (result.valid) {\n return undefined;\n }\n const error: RecipeValidationError = { kind: result.kind ?? 'server', message: result.message };\n if (linkedId === undefined) {\n return error;\n }\n const tagged: LinkedValidationError = { ...error, linkedId };\n return tagged;\n }\n\n /** `source` est appelé à la souscription : une erreur levée par le validateur devient une panne mesurée. */\n private static measured(\n source: () => Observable<ServerValidationResult>,\n name: string,\n timing: ValidationTiming,\n ): Observable<ServerValidationResult> {\n return defer(() => {\n const start = performance.now();\n let settled = false;\n return defer(source).pipe(\n tap({\n next: (result) => {\n settled = true;\n timing.record(\n name,\n performance.now() - start,\n result.valid ? ValidationOutcomeEnum.VALID : ValidationOutcomeEnum.INVALID,\n );\n },\n error: () => {\n settled = true;\n timing.record(name, performance.now() - start, ValidationOutcomeEnum.FAILURE);\n },\n }),\n finalize(() => {\n if (!settled) {\n timing.record(name, performance.now() - start, ValidationOutcomeEnum.CANCELLED);\n }\n }),\n );\n });\n }\n}\n","import { NodeKindEnum } from '../enums/node-kind.enum';\nimport { ArrayNode } from '../interfaces/array-node.interface';\nimport { FieldNode } from '../interfaces/field-node.interface';\nimport { LinkedControlDef } from '../interfaces/linked-control-def.interface';\nimport { LinkedNode } from '../interfaces/linked-node.interface';\nimport { RecipeBuilder } from '../interfaces/recipe-builder.interface';\nimport { SectionDef } from '../interfaces/section-def.interface';\nimport { SectionGroupNode } from '../interfaces/section-group-node.interface';\nimport { SectionNode } from '../interfaces/section-node.interface';\n\n/**\n * Crée les utilitaires typés d'une recette : `const b = recipeBuilder<MyFormData>()`, puis `b.field('code', …)`.\n * Un fragment d'élément d'`array` se construit avec `recipeBuilder<ItemModel, RootModel>()`.\n * Les vérifications sont faites par les types ; l'exécution ne fait qu'assembler les nœuds.\n */\nexport const recipeBuilder = <TModel, TRoot = TModel>(): RecipeBuilder<TModel, TRoot> => ({\n field: (key, def) =>\n ({ kind: NodeKindEnum.FIELD, key, ...def }) as FieldNode<TModel, typeof key, TRoot>,\n linked: (keys, def) =>\n ({\n kind: NodeKindEnum.LINKED,\n keys,\n ...def,\n control: def.control as LinkedControlDef<TModel, (typeof keys)[number], TRoot>,\n }) as LinkedNode<TModel, (typeof keys)[number], TRoot>,\n array: (key, def) =>\n ({ kind: NodeKindEnum.ARRAY, key, ...def }) as ArrayNode<TModel, typeof key, TRoot>,\n row: (def) => ({ kind: NodeKindEnum.ROW, ...def }),\n section: ((id: string, def: SectionDef<TModel, TRoot>): SectionNode<TModel, TRoot> => ({\n kind: NodeKindEnum.SECTION,\n id,\n ...def,\n })) as RecipeBuilder<TModel, TRoot>['section'],\n sectionGroup: (id, def) =>\n ({ kind: NodeKindEnum.SECTION_GROUP, id, ...def }) as SectionGroupNode<\n TModel,\n typeof def.display,\n TRoot\n >,\n recipe: (id, def) => ({ id, ...def }),\n});\n","import { FORM_LAYOUT_COLUMNS } from '../constants/form-layout-columns.constants';\nimport { FORM_LAYOUT_ORDER } from '../constants/form-layout-order.constants';\nimport { FORM_LAYOUT_SPAN } from '../constants/form-layout-span.constants';\nimport { BreakpointEnum } from '../enums/breakpoint.enum';\nimport { GridColumns } from '../interfaces/grid-columns.interface';\nimport { GridOrder } from '../interfaces/grid-order.interface';\nimport { GridSpan } from '../interfaces/grid-span.interface';\nimport { NodeLayout } from '../interfaces/node-layout.interface';\nimport { Responsive } from '../interfaces/responsive.interface';\nimport { ResponsiveMap } from '../interfaces/responsive-map.interface';\n\nconst BREAKPOINTS: readonly BreakpointEnum[] = [\n BreakpointEnum.BASE,\n BreakpointEnum.SM,\n BreakpointEnum.MD,\n BreakpointEnum.LG,\n BreakpointEnum.XL,\n];\n\n/** Traduit les jetons de mise en page en classes Tailwind complètes. */\nexport class RecipeLayout {\n static columns(value: Responsive<GridColumns> | undefined): string {\n return RecipeLayout.classes(value, FORM_LAYOUT_COLUMNS);\n }\n\n static span(value: Responsive<GridSpan> | undefined): string {\n return RecipeLayout.classes(value, FORM_LAYOUT_SPAN);\n }\n\n static order(value: Responsive<GridOrder> | undefined): string {\n return RecipeLayout.classes(value, FORM_LAYOUT_ORDER);\n }\n\n /** Classes du conteneur d'une section ou d'une ligne : grille si `columns` ou `areas` sont donnés, colonne sinon. */\n static container(columns: Responsive<GridColumns> | undefined, areas?: string): string {\n if (columns === undefined && areas === undefined) {\n return 'flex flex-col gap-4';\n }\n return RecipeLayout.join(['grid gap-4', RecipeLayout.columns(columns), areas]);\n }\n\n /** Classes d'un nœud placé dans une grille : largeur, ordre, zone et classes libres. */\n static item(layout: NodeLayout): string {\n return RecipeLayout.join([\n RecipeLayout.span(layout.span),\n RecipeLayout.order(layout.order),\n layout.area,\n layout.class,\n ]);\n }\n\n private static classes<T extends number>(\n value: Responsive<T> | undefined,\n table: Readonly<Record<BreakpointEnum, Readonly<Record<T, string>>>>,\n ): string {\n if (value === undefined) {\n return '';\n }\n const map = RecipeLayout.expand(value);\n return RecipeLayout.join(\n BREAKPOINTS.map((bp) => (map[bp] === undefined ? undefined : table[bp][map[bp]])),\n );\n }\n\n private static expand<T extends number>(value: Responsive<T>): ResponsiveMap<T> {\n return typeof value === 'number' ? { base: value } : value;\n }\n\n private static join(parts: readonly (string | undefined)[]): string {\n return parts.filter((part): part is string => part !== undefined && part !== '').join(' ');\n }\n}\n","import { FORM_ERROR_MESSAGES } from '../constants/form-error-messages.constants';\nimport { FORM_SERVER_ERROR_KIND } from '../constants/form-server-error-kind.constants';\nimport { FORM_SERVER_MESSAGES_PREFIX } from '../constants/form-server-messages-prefix.constants';\nimport { FORM_UNKNOWN_ERROR_MESSAGE } from '../constants/form-unknown-error-message.constants';\nimport { FieldMessage } from '../interfaces/field-message.interface';\nimport { RecipeValidationError } from '../interfaces/recipe-validation-error.interface';\nimport { ResolveMessageInput } from '../interfaces/resolve-message-input.interface';\n\nconst RESERVED_KEYS: ReadonlySet<string> = new Set([\n 'kind',\n 'message',\n 'fieldTree',\n 'formField',\n 'linkedId',\n 'error',\n]);\n\n/**\n * Erreur serveur posée par l'application hôte (`{ kind: 'server', error: { code, constraint, message } }`),\n * lisible telle quelle.\n */\ninterface HostServerError {\n readonly code: string | null;\n readonly constraint?: string | null;\n readonly message: string | null;\n}\n\n/**\n * Résolution des messages. Priorités : champ, puis recette, puis défaut, puis message brut, puis `unknown`.\n * Un champ non touché n'affiche rien avant une tentative de soumission ; seule la première erreur est affichée.\n * Erreur serveur : son `message`, que l'appelant a déjà traduit ; sans message, la clé `errors.<code>`.\n */\nexport class RecipeMessages {\n static resolve(input: ResolveMessageInput): FieldMessage | undefined {\n if (!input.touched && !input.submitted) {\n return undefined;\n }\n const [first] = input.errors;\n return first === undefined\n ? undefined\n : RecipeMessages.forError(first, input.fieldMessages, input.recipeMessages);\n }\n\n /** Tous les messages, dans l'ordre (avertissements : chacun est affiché). */\n static forAll(\n errors: readonly RecipeValidationError[],\n fieldMessages?: Readonly<Partial<Record<string, string>>>,\n recipeMessages?: Readonly<Partial<Record<string, string>>>,\n ): readonly FieldMessage[] {\n return errors.map((error) => RecipeMessages.forError(error, fieldMessages, recipeMessages));\n }\n\n static forError(\n error: RecipeValidationError,\n fieldMessages?: Readonly<Partial<Record<string, string>>>,\n recipeMessages?: Readonly<Partial<Record<string, string>>>,\n ): FieldMessage {\n if (error.kind === FORM_SERVER_ERROR_KIND) {\n return RecipeMessages.forServerError(error);\n }\n const key =\n fieldMessages?.[error.kind] ??\n recipeMessages?.[error.kind] ??\n FORM_ERROR_MESSAGES[error.kind];\n if (key !== undefined) {\n return { key, params: RecipeMessages.params(error) };\n }\n if (error.message !== undefined && error.message !== '') {\n return { text: error.message };\n }\n return { key: FORM_UNKNOWN_ERROR_MESSAGE, params: { kind: error.kind } };\n }\n\n /** Code d'une erreur serveur : `code` du moteur, ou `error.code` puis `error.constraint` d'une erreur de l'hôte. */\n static serverCode(error: RecipeValidationError): string | undefined {\n if ('code' in error && typeof error.code === 'string') {\n return error.code;\n }\n if ('error' in error && typeof error.error === 'object' && error.error !== null) {\n const host = error.error as HostServerError;\n return host.code ?? host.constraint ?? undefined;\n }\n return undefined;\n }\n\n private static forServerError(error: RecipeValidationError): FieldMessage {\n const text = RecipeMessages.serverMessage(error);\n if (text !== undefined) {\n return { text };\n }\n const code = RecipeMessages.serverCode(error);\n return code === undefined\n ? { key: FORM_UNKNOWN_ERROR_MESSAGE, params: { kind: error.kind } }\n : { key: `${FORM_SERVER_MESSAGES_PREFIX}.${code}`, params: { code } };\n }\n\n private static serverMessage(error: RecipeValidationError): string | undefined {\n if (error.message !== undefined && error.message !== '') {\n return error.message;\n }\n if ('error' in error && typeof error.error === 'object' && error.error !== null) {\n const message = (error.error as HostServerError).message;\n return message === null || message === '' ? undefined : message;\n }\n return undefined;\n }\n\n /** Les bornes portées par l'erreur (`min`, `maxLength`…) servent de paramètres d'interpolation. */\n private static params(error: RecipeValidationError): Readonly<Record<string, unknown>> {\n const params: Record<string, unknown> = {};\n for (const [name, value] of Object.entries(error)) {\n if (!RESERVED_KEYS.has(name) && typeof value !== 'function' && typeof value !== 'object') {\n params[name] = value;\n } else if (value instanceof Date) {\n params[name] = value;\n }\n }\n return params;\n }\n}\n","import {\n applyEach,\n disabled,\n email,\n FieldContext,\n hidden,\n max,\n maxDate,\n maxLength,\n metadata,\n min,\n minDate,\n minLength,\n PathKind,\n pattern,\n readonly,\n required,\n SchemaFn,\n SchemaPathTree,\n validate,\n validateTree,\n} from '@angular/forms/signals';\nimport { FORM_WARNINGS } from '../constants/form-warnings-key.constants';\nimport { LinkedControlTypeEnum } from '../enums/linked-control-type.enum';\nimport { NodeKindEnum } from '../enums/node-kind.enum';\nimport { RuleModeEnum } from '../enums/rule-mode.enum';\nimport { RuleTypeEnum } from '../enums/rule-type.enum';\nimport { AnyModel } from '../interfaces/any-model.interface';\nimport { AnyRuleDef } from '../interfaces/any-rule-def.interface';\nimport { ArrayItem } from '../interfaces/array-item.interface';\nimport { ArrayNode } from '../interfaces/array-node.interface';\nimport { ArrayRuleDef } from '../interfaces/array-rule-def.interface';\nimport { AsyncRuleInput } from '../interfaces/async-rule-input.interface';\nimport { FormNode } from '../interfaces/form-node.interface';\nimport { FormRecipe } from '../interfaces/form-recipe.interface';\nimport { LinkedNode } from '../interfaces/linked-node.interface';\nimport { LinkedValidationError } from '../interfaces/linked-validation-error.interface';\nimport { RecipeRuleContext } from '../interfaces/recipe-rule-context.interface';\nimport { RecipeSchemaOptions } from '../interfaces/recipe-schema-options.interface';\nimport { RecipeValidationError } from '../interfaces/recipe-validation-error.interface';\nimport { ValidationTiming } from '../interfaces/validation-timing.interface';\nimport { RecipeAsyncRule } from './recipe-async-rule.utils';\nimport { AnySchemaPath, AnySchemaPathTree, RecipePaths } from './recipe-paths.utils';\nimport { RecipeRuleContexts } from './recipe-rule-context.utils';\n\ntype AnyFieldContext = FieldContext<unknown, PathKind>;\ntype RuleWhen = (ctx: RecipeRuleContext<AnyModel>) => boolean;\ntype FieldWhen = (ctx: AnyFieldContext) => boolean;\n\n/** Conditions `readonly` et `hidden` héritées de la recette et des sections englobantes. */\ninterface Inherited {\n readonly readonly: readonly RuleWhen[];\n readonly hidden: readonly RuleWhen[];\n}\n\nconst NOOP_TIMING: ValidationTiming = { record: () => undefined, summary: () => [] };\nconst NO_INHERITED: Inherited = { readonly: [], hidden: [] };\n\n/**\n * Construit le schéma Signal Forms d'une recette : `form(signal(model), RecipeSchema.build(recipe))`.\n * Chaque règle devient une fonction native ; `extraRules` s'exécute après les règles déclaratives.\n * Le modèle est effacé une seule fois ici ; les chemins sont manipulés par `RecipePaths`.\n * Les règles reçoivent un `RecipeRuleContext` dont `root(key)` lit la racine par `ctx.valueOf`.\n */\nexport class RecipeSchema {\n static build<TModel>(\n recipe: FormRecipe<TModel>,\n options: RecipeSchemaOptions = {},\n ): SchemaFn<TModel> {\n const timing = options.timing ?? NOOP_TIMING;\n const nodes = recipe.nodes as unknown as readonly FormNode<AnyModel>[];\n const recipeReadonly = recipe.readonly as RuleWhen | undefined;\n return (path: SchemaPathTree<TModel>) => {\n const root = path as unknown as AnySchemaPathTree;\n const inherited = RecipeSchema.extend(NO_INHERITED, recipeReadonly, undefined);\n RecipeSchema.applyNodes(root, root, nodes, timing, inherited);\n recipe.extraRules?.(path);\n };\n }\n\n /** Identifiant d'un nœud `linked`, porté par ses erreurs pour les retrouver sous le bon groupe. */\n static linkedId(node: { readonly keys: readonly string[] }): string {\n return node.keys.join('+');\n }\n\n private static applyNodes(\n root: AnySchemaPathTree,\n path: AnySchemaPathTree,\n nodes: readonly FormNode<AnyModel>[],\n timing: ValidationTiming,\n inherited: Inherited,\n ): void {\n for (const node of nodes) {\n switch (node.kind) {\n case NodeKindEnum.SECTION:\n RecipeSchema.applyNodes(\n root,\n path,\n node.nodes,\n timing,\n RecipeSchema.extend(inherited, node.readonly, node.hidden),\n );\n break;\n case NodeKindEnum.ROW:\n RecipeSchema.applyNodes(root, path, node.nodes, timing, inherited);\n break;\n case NodeKindEnum.SECTION_GROUP:\n for (const section of node.sections) {\n RecipeSchema.applyNodes(\n root,\n path,\n section.nodes,\n timing,\n RecipeSchema.extend(inherited, section.readonly, section.hidden),\n );\n }\n break;\n case NodeKindEnum.FIELD: {\n const child = RecipePaths.child(path, node.key);\n RecipeSchema.applyRules(root, child, node.rules, node.key, timing);\n RecipeSchema.applyInherited(root, child, inherited);\n break;\n }\n case NodeKindEnum.LINKED:\n RecipeSchema.applyLinked(root, path, node, timing, inherited);\n break;\n case NodeKindEnum.ARRAY: {\n const list = RecipePaths.child(path, node.key);\n RecipeSchema.applyArrayRules(root, list, node);\n RecipeSchema.applyInherited(root, list, inherited);\n applyEach(RecipePaths.asList(list), (item) =>\n RecipeSchema.applyNodes(root, RecipePaths.tree(item), node.item, timing, inherited),\n );\n break;\n }\n }\n }\n }\n\n private static extend(\n inherited: Inherited,\n readonlyWhen: RuleWhen | undefined,\n hiddenWhen: RuleWhen | undefined,\n ): Inherited {\n if (readonlyWhen === undefined && hiddenWhen === undefined) {\n return inherited;\n }\n return {\n readonly:\n readonlyWhen === undefined ? inherited.readonly : [...inherited.readonly, readonlyWhen],\n hidden: hiddenWhen === undefined ? inherited.hidden : [...inherited.hidden, hiddenWhen],\n };\n }\n\n /** Lecture seule et masquage hérités : posés sur chaque champ, chaque clé liée et chaque liste. */\n private static applyInherited(\n root: AnySchemaPathTree,\n path: AnySchemaPath,\n inherited: Inherited,\n ): void {\n if (inherited.readonly.length > 0) {\n const whens = inherited.readonly;\n readonly(path, {\n when: (ctx) => whens.some((when) => when(RecipeRuleContexts.fromField(root, ctx))),\n });\n }\n if (inherited.hidden.length > 0) {\n const whens = inherited.hidden;\n hidden(path, {\n when: (ctx) => whens.some((when) => when(RecipeRuleContexts.fromField(root, ctx))),\n });\n }\n }\n\n private static bind(root: AnySchemaPathTree, when: RuleWhen): FieldWhen {\n return (ctx) => when(RecipeRuleContexts.fromField(root, ctx));\n }\n\n private static bindOptional(\n root: AnySchemaPathTree,\n when: RuleWhen | undefined,\n ): FieldWhen | undefined {\n return when === undefined ? undefined : RecipeSchema.bind(root, when);\n }\n\n private static applyRules(\n root: AnySchemaPathTree,\n path: AnySchemaPath,\n rules: readonly AnyRuleDef<unknown, AnyModel>[] | undefined,\n name: string,\n timing: ValidationTiming,\n ): void {\n for (const rule of rules ?? []) {\n const asyncRule = RecipeSchema.asyncVariant(root, rule, name);\n if (asyncRule !== undefined) {\n RecipeAsyncRule.apply(path, asyncRule, timing);\n continue;\n }\n RecipeSchema.applySyncRule(root, path, rule, name, timing);\n }\n }\n\n /** Une règle de forme déclarée `mode: 'async'` est remplacée par son validateur serveur. */\n private static asyncVariant(\n root: AnySchemaPathTree,\n rule: AnyRuleDef<unknown, AnyModel>,\n name: string,\n ): AsyncRuleInput | undefined {\n if ('mode' in rule && rule.mode === RuleModeEnum.ASYNC) {\n return {\n name: `${name}.${rule.rule}`,\n validator: rule.validator,\n debounce: rule.debounce,\n when: RecipeSchema.bindOptional(root, 'when' in rule ? rule.when : undefined),\n };\n }\n return undefined;\n }\n\n private static applySyncRule(\n root: AnySchemaPathTree,\n path: AnySchemaPath,\n rule: AnyRuleDef<unknown, AnyModel>,\n name: string,\n timing: ValidationTiming,\n ): void {\n switch (rule.rule) {\n case RuleTypeEnum.REQUIRED: {\n const when = RecipeSchema.bindOptional(root, rule.when);\n required(path, when === undefined ? undefined : { when });\n break;\n }\n case RuleTypeEnum.PATTERN:\n pattern(RecipePaths.asString(path), rule.value);\n break;\n case RuleTypeEnum.MIN: {\n const value = rule.value;\n min(RecipePaths.asNumber(path), typeof value === 'function' ? () => value() : value);\n break;\n }\n case RuleTypeEnum.MAX: {\n const value = rule.value;\n max(RecipePaths.asNumber(path), typeof value === 'function' ? () => value() : value);\n break;\n }\n case RuleTypeEnum.MIN_LENGTH: {\n const value = rule.value;\n minLength(RecipePaths.asString(path), typeof value === 'function' ? () => value() : value);\n break;\n }\n case RuleTypeEnum.MAX_LENGTH: {\n const value = rule.value;\n maxLength(RecipePaths.asString(path), typeof value === 'function' ? () => value() : value);\n break;\n }\n case RuleTypeEnum.MIN_DATE: {\n const value = rule.value;\n minDate(RecipePaths.asDate(path), typeof value === 'function' ? () => value() : value);\n break;\n }\n case RuleTypeEnum.MAX_DATE: {\n const value = rule.value;\n maxDate(RecipePaths.asDate(path), typeof value === 'function' ? () => value() : value);\n break;\n }\n case RuleTypeEnum.EMAIL:\n email(RecipePaths.asString(path));\n break;\n case RuleTypeEnum.VALIDATE: {\n const when = RecipeSchema.bindOptional(root, rule.when);\n const fn = rule.fn;\n validate(path, (ctx) =>\n when !== undefined && !when(ctx)\n ? undefined\n : fn(ctx.value(), RecipeRuleContexts.fromField(root, ctx)),\n );\n break;\n }\n case RuleTypeEnum.WARN: {\n const when = RecipeSchema.bindOptional(root, rule.when);\n const fn = rule.fn;\n metadata(path, FORM_WARNINGS, (ctx) =>\n when !== undefined && !when(ctx)\n ? undefined\n : fn(ctx.value(), RecipeRuleContexts.fromField(root, ctx)),\n );\n break;\n }\n case RuleTypeEnum.SERVER:\n RecipeAsyncRule.apply(\n path,\n {\n name: rule.name ?? `${name}.server`,\n validator: rule.validator,\n debounce: rule.debounce,\n when: RecipeSchema.bindOptional(root, rule.when),\n dependencies: RecipeRuleContexts.dependencies(root, rule.dependsOn),\n },\n timing,\n );\n break;\n case RuleTypeEnum.DISABLED: {\n const when = RecipeSchema.bind(root, rule.when);\n const reason = rule.reasonKey;\n disabled(path, { when: (ctx) => (when(ctx) ? (reason ?? true) : false) });\n break;\n }\n case RuleTypeEnum.HIDDEN: {\n const when = RecipeSchema.bind(root, rule.when);\n hidden(path, { when });\n break;\n }\n case RuleTypeEnum.READONLY: {\n const when = RecipeSchema.bind(root, rule.when);\n readonly(path, { when });\n break;\n }\n }\n }\n\n /**\n * Règles portées par la liste entière : un `validateTree` sur le chemin de la liste ; les erreurs,\n * sans `fieldTree`, se posent sur la liste elle-même et comptent dans `invalid()` du formulaire.\n */\n private static applyArrayRules(\n root: AnySchemaPathTree,\n list: AnySchemaPath,\n node: ArrayNode<AnyModel>,\n ): void {\n const rules = node.rules;\n if (rules === undefined || rules.length === 0) {\n return;\n }\n validateTree(list, (ctx) => {\n const ruleContext = RecipeRuleContexts.fromField(root, ctx);\n const items = ctx.value() as readonly ArrayItem[];\n const errors: RecipeValidationError[] = [];\n for (const rule of rules) {\n if (rule.when !== undefined && !rule.when(ruleContext)) {\n continue;\n }\n const error = RecipeSchema.arrayRuleError(rule, items, ruleContext);\n if (error !== undefined) {\n errors.push(error);\n }\n }\n return errors;\n });\n }\n\n private static arrayRuleError(\n rule: ArrayRuleDef<unknown, AnyModel>,\n items: readonly ArrayItem[],\n ctx: RecipeRuleContext<AnyModel>,\n ): RecipeValidationError | undefined {\n switch (rule.rule) {\n case RuleTypeEnum.MIN_ITEMS:\n return items.length < rule.value\n ? RecipeSchema.error(RuleTypeEnum.MIN_ITEMS, { minItems: rule.value })\n : undefined;\n case RuleTypeEnum.MAX_ITEMS:\n return items.length > rule.value\n ? RecipeSchema.error(RuleTypeEnum.MAX_ITEMS, { maxItems: rule.value })\n : undefined;\n case RuleTypeEnum.UNIQUE: {\n const seen = new Set<string>();\n for (const item of items) {\n const value = rule.by(item);\n if (seen.has(value)) {\n return RecipeSchema.error(RuleTypeEnum.UNIQUE, { duplicate: value });\n }\n seen.add(value);\n }\n return undefined;\n }\n case RuleTypeEnum.VALIDATE: {\n const kind = rule.fn(items, ctx);\n return kind === null ? undefined : { kind };\n }\n }\n }\n\n /** Erreur dont les bornes servent de paramètres d'interpolation au message (`{{minItems}}`). */\n private static error(kind: string, params: Record<string, unknown>): RecipeValidationError {\n return { kind, ...params };\n }\n\n /**\n * Contrôles liés. Les règles propres à chaque champ d'un `group` restent sur le champ.\n * Règle synchrone : `validate` sur `errorTarget`, ou `validateTree` sur le parent (`'group'`), en lisant\n * toutes les valeurs liées par `ctx.valueOf` pour se relancer dès que l'une change.\n */\n private static applyLinked(\n root: AnySchemaPathTree,\n parent: AnySchemaPathTree,\n node: LinkedNode<AnyModel>,\n timing: ValidationTiming,\n inherited: Inherited,\n ): void {\n const linkedId = RecipeSchema.linkedId(node);\n for (const key of node.keys) {\n const child = RecipePaths.child(parent, key);\n if (node.control.type === LinkedControlTypeEnum.GROUP) {\n RecipeSchema.applyRules(root, child, node.control.fields[key]?.rules, key, timing);\n } else if (node.control.required === true) {\n required(child);\n }\n RecipeSchema.applyInherited(root, child, inherited);\n }\n const collect = (ctx: AnyFieldContext): Record<string, unknown> =>\n Object.fromEntries(\n node.keys.map((key) => [key, ctx.valueOf(RecipePaths.child(parent, key))]),\n );\n const target =\n node.errorTarget === undefined || node.errorTarget === 'group'\n ? undefined\n : RecipePaths.child(parent, node.errorTarget);\n for (const rule of node.rules ?? []) {\n const when = RecipeSchema.bindOptional(root, rule.when);\n if (rule.rule === RuleTypeEnum.SERVER) {\n const validator = rule.validator as AsyncRuleInput['validator'];\n RecipeAsyncRule.apply(\n target ?? parent,\n {\n name: rule.name ?? `${linkedId}.server`,\n validator,\n debounce: rule.debounce,\n when,\n dependencies: RecipeRuleContexts.dependencies(root, rule.dependsOn),\n linkedId,\n },\n timing,\n collect,\n );\n continue;\n }\n const fn = rule.fn;\n const logic = (ctx: AnyFieldContext): LinkedValidationError | undefined => {\n if (when !== undefined && !when(ctx)) {\n return undefined;\n }\n const error = fn(collect(ctx), RecipeRuleContexts.fromField(root, ctx));\n return error === undefined ? undefined : { ...error, linkedId };\n };\n if (target === undefined) {\n validateTree(parent, logic);\n } else {\n validate(target, logic);\n }\n }\n }\n}\n","import { NodeKindEnum } from '../enums/node-kind.enum';\nimport { AnyModel } from '../interfaces/any-model.interface';\nimport { ArrayItem } from '../interfaces/array-item.interface';\nimport { FormNode } from '../interfaces/form-node.interface';\nimport { RecipeServerError } from '../interfaces/recipe-server-error.interface';\nimport { RecipeServerSnapshot } from '../interfaces/recipe-server-snapshot.interface';\nimport { RecipeServerValidationError } from '../interfaces/recipe-server-validation-error.interface';\nimport { FORM_SERVER_ERROR_KIND } from '../constants/form-server-error-kind.constants';\n\nconst SEGMENT = /([^.[\\]]+)|\\[(\\d+)\\]/g;\n\n/**\n * Erreurs serveur par chemin. Un chemin du corps envoyé (`dates[2].date`) est normalisé\n * en remplaçant chaque position par la clé de l'élément mémorisée à l'envoi (`dates[k3].date`), puis comparé aux\n * chemins déclarés par les champs (`serverPaths`, défaut `[key]`, préfixés par `dates[k3].` dans un élément).\n */\nexport class RecipeServerPaths {\n /** Clés des éléments de chaque liste au moment de l'envoi, par chemin normalisé (`dates`, `dates[k1].slots`…). */\n static snapshot(nodes: readonly FormNode<AnyModel>[], model: AnyModel): RecipeServerSnapshot {\n const snapshot = new Map<string, readonly string[]>();\n RecipeServerPaths.collect(nodes, model, '', snapshot);\n return snapshot;\n }\n\n /** Formes statiques des chemins que la recette sait placer : `name`, `dates`, `dates[].date`, `address.postalCode`. */\n static shapes(nodes: readonly FormNode<AnyModel>[]): ReadonlySet<string> {\n const shapes = new Set<string>();\n RecipeServerPaths.collectShapes(nodes, '', shapes);\n return shapes;\n }\n\n /** `dates[k3].date` → `dates[].date`. */\n static shapeOf(path: string): string {\n return path.replace(/\\[[^\\]]*\\]/g, '[]');\n }\n\n /**\n * Remplace chaque position par la clé mémorisée ; sans mémoire pour cette liste (appel hors soumission),\n * les clés actuelles servent. Renvoie `undefined` quand une position est hors limites.\n */\n static normalize(\n field: string,\n snapshot: RecipeServerSnapshot,\n current: () => RecipeServerSnapshot,\n ): string | undefined {\n let path = '';\n for (const match of field.matchAll(SEGMENT)) {\n const [, name, index] = match;\n if (name !== undefined) {\n path = path === '' ? name : `${path}.${name}`;\n continue;\n }\n const keys = snapshot.get(path) ?? current().get(path);\n const key = keys?.[Number(index)];\n if (key === undefined) {\n return undefined;\n }\n path = `${path}[${key}]`;\n }\n return path;\n }\n\n /**\n * Répartit les erreurs : par chemin normalisé quand la forme du chemin est connue de la recette,\n * sinon dans `unplaced` (affichées par l'appelant). Une erreur n'est « non placée » que si aucun de ses chemins ne l'est.\n */\n static place(\n errors: readonly RecipeServerError[],\n shapes: ReadonlySet<string>,\n snapshot: RecipeServerSnapshot,\n current: () => RecipeServerSnapshot,\n ): {\n readonly placed: ReadonlyMap<string, readonly RecipeServerValidationError[]>;\n readonly unplaced: readonly RecipeServerError[];\n } {\n const placed = new Map<string, RecipeServerValidationError[]>();\n const unplaced: RecipeServerError[] = [];\n for (const error of errors) {\n let count = 0;\n for (const field of error.fields) {\n const path = RecipeServerPaths.normalize(field, snapshot, current);\n if (path === undefined || !shapes.has(RecipeServerPaths.shapeOf(path))) {\n continue;\n }\n count += 1;\n const list = placed.get(path) ?? [];\n list.push({ kind: FORM_SERVER_ERROR_KIND, code: error.code, message: error.message });\n placed.set(path, list);\n }\n if (count === 0) {\n unplaced.push(error);\n }\n }\n return { placed, unplaced };\n }\n\n /** Même contenu (type, code, message), pour ne pas relancer la règle de vie quand la carte est reconstruite. */\n static sameErrors(\n a: readonly RecipeServerValidationError[],\n b: readonly RecipeServerValidationError[],\n ): boolean {\n return (\n a.length === b.length &&\n a.every((error, index) => {\n const other = b[index];\n return (\n other !== undefined &&\n error.kind === other.kind &&\n error.code === other.code &&\n error.message === other.message\n );\n })\n );\n }\n\n /** Erreurs d'un champ dont les chemins complets (`préfixe.chemin`) sont donnés. */\n static errorsFor(\n placed: ReadonlyMap<string, readonly RecipeServerValidationError[]>,\n paths: readonly string[],\n ): readonly RecipeServerValidationError[] {\n return paths.flatMap((path) => placed.get(path) ?? []);\n }\n\n /** Chemins complets d'un nœud : `serverPaths` (défaut `[key]`), préfixés par celui de l'élément conteneur. */\n static fullPaths(\n prefix: string,\n key: string,\n serverPaths: readonly string[] | undefined,\n ): readonly string[] {\n return (serverPaths ?? [key]).map((path) => (prefix === '' ? path : `${prefix}.${path}`));\n }\n\n private static collect(\n nodes: readonly FormNode<AnyModel>[],\n model: AnyModel,\n prefix: string,\n snapshot: Map<string, readonly string[]>,\n ): void {\n for (const node of nodes) {\n switch (node.kind) {\n case NodeKindEnum.SECTION:\n case NodeKindEnum.ROW:\n RecipeServerPaths.collect(node.nodes, model, prefix, snapshot);\n break;\n case NodeKindEnum.SECTION_GROUP:\n for (const section of node.sections) {\n RecipeServerPaths.collect(section.nodes, model, prefix, snapshot);\n }\n break;\n case NodeKindEnum.ARRAY: {\n const items = (model[node.key] as readonly (ArrayItem & AnyModel)[] | undefined) ?? [];\n const keys = items.map((item) => item.key);\n for (const path of RecipeServerPaths.fullPaths(prefix, node.key, node.serverPaths)) {\n snapshot.set(path, keys);\n for (const item of items) {\n RecipeServerPaths.collect(node.item, item, `${path}[${item.key}]`, snapshot);\n }\n }\n break;\n }\n default:\n break;\n }\n }\n }\n\n private static collectShapes(\n nodes: readonly FormNode<AnyModel>[],\n prefix: string,\n shapes: Set<string>,\n ): void {\n for (const node of nodes) {\n switch (node.kind) {\n case NodeKindEnum.SECTION:\n case NodeKindEnum.ROW:\n RecipeServerPaths.collectShapes(node.nodes, prefix, shapes);\n break;\n case NodeKindEnum.SECTION_GROUP:\n for (const section of node.sections) {\n RecipeServerPaths.collectShapes(section.nodes, prefix, shapes);\n }\n break;\n case NodeKindEnum.FIELD:\n RecipeServerPaths.fullPaths(prefix, node.key, node.serverPaths).forEach((p) =>\n shapes.add(p),\n );\n break;\n case NodeKindEnum.LINKED:\n for (const key of node.keys) {\n const def = 'fields' in node.control ? node.control.fields[key] : undefined;\n RecipeServerPaths.fullPaths(prefix, key, def?.serverPaths).forEach((p) =>\n shapes.add(p),\n );\n }\n break;\n case NodeKindEnum.ARRAY:\n for (const path of RecipeServerPaths.fullPaths(prefix, node.key, node.serverPaths)) {\n shapes.add(path);\n RecipeServerPaths.collectShapes(node.item, `${path}[]`, shapes);\n }\n break;\n }\n }\n }\n}\n","import { FieldTree } from '@angular/forms/signals';\r\nimport { NodeKindEnum } from '../enums/node-kind.enum';\r\nimport { AnyModel } from '../interfaces/any-model.interface';\r\nimport { FirstInvalidField } from '../interfaces/first-invalid-field.interface';\r\nimport { FormNode } from '../interfaces/form-node.interface';\r\nimport { SectionErrorCountInput } from '../interfaces/section-error-count-input.interface';\r\nimport { RecipeServerPaths } from './recipe-server-paths.utils';\r\n\r\ntype Visit = (key: string, sections: readonly string[]) => void;\r\n\r\n/** Chemin serveur déclaré par un nœud, avec la clé du modèle qu'il vise ; `list` : ses éléments en dépendent aussi. */\r\ninterface ServerClaim {\r\n readonly path: string;\r\n readonly key: string;\r\n readonly list: boolean;\r\n}\r\n\r\n/**\r\n * Sections d'une recette : index des clés par section, compteur de champs en erreur, premier champ\r\n * en erreur avec les sections à ouvrir. Pur : travaille sur les nœuds et le `FieldTree`.\r\n */\r\nexport class RecipeSections {\r\n /** Clés de chaque section (identifiant → clés), sous-sections comprises ; une section sans champ a une liste vide. */\r\n static index(nodes: readonly FormNode<AnyModel>[]): ReadonlyMap<string, readonly string[]> {\r\n const index = new Map<string, string[]>();\r\n RecipeSections.walk(\r\n nodes,\r\n [],\r\n (key, sections) => {\r\n for (const id of sections) {\r\n index.get(id)?.push(key);\r\n }\r\n },\r\n (id) => {\r\n if (!index.has(id)) {\r\n index.set(id, []);\r\n }\r\n },\r\n );\r\n return index;\r\n }\r\n\r\n /**\r\n * Nombre de champs en erreur : champs touchés ou après une tentative de soumission, champs cachés ignorés,\r\n * erreur d'un groupe lié comptée une fois, erreurs serveur comprises.\r\n */\r\n static errorCount(input: SectionErrorCountInput): number {\r\n const found = new Set<unknown>();\r\n const keys = new Set(input.keys);\r\n for (const key of input.keys) {\r\n const child = input.tree[key];\r\n if (child === undefined) {\r\n continue;\r\n }\r\n const state = child();\r\n if (state.hidden()) {\r\n continue;\r\n }\r\n for (const error of state.errorSummary()) {\r\n const errorState = error.fieldTree();\r\n if (!errorState.hidden() && (errorState.touched() || input.submitted)) {\r\n found.add(error.fieldTree);\r\n }\r\n }\r\n }\r\n for (const error of input.tree().errors()) {\r\n if ('linkedId' in error && typeof error.linkedId === 'string') {\r\n const linkedKeys = error.linkedId.split('+');\r\n const touched =\r\n input.submitted || linkedKeys.every((key) => input.tree[key]?.().touched() === true);\r\n if (touched && linkedKeys.every((key) => keys.has(key))) {\r\n found.add(error.linkedId);\r\n }\r\n }\r\n }\r\n for (const [path, key] of input.serverErrorKeys ?? []) {\r\n if (keys.has(key)) {\r\n found.add(`server:${path}`);\r\n }\r\n }\r\n return found.size;\r\n }\r\n\r\n /** Premier champ invalide (ou visé par une erreur serveur), dans l'ordre de la recette, avec ses sections parentes. */\r\n static firstInvalid(\r\n nodes: readonly FormNode<AnyModel>[],\r\n tree: FieldTree<AnyModel>,\r\n serverErrorPaths: Iterable<string> = [],\r\n ): FirstInvalidField | undefined {\r\n const serverKeys = new Set(RecipeSections.serverKeys(nodes, serverErrorPaths).values());\r\n let found: FirstInvalidField | undefined;\r\n const stacks = new Map<string, readonly string[]>();\r\n RecipeSections.walk(nodes, [], (key, sections) => {\r\n stacks.set(key, sections);\r\n if (found !== undefined) {\r\n return;\r\n }\r\n const child = tree[key];\r\n if (child === undefined) {\r\n return;\r\n }\r\n const state = child();\r\n if (!state.hidden() && (state.invalid() || serverKeys.has(key))) {\r\n found = { key, sections };\r\n }\r\n });\r\n if (found !== undefined) {\r\n return found;\r\n }\r\n for (const error of tree().errors()) {\r\n if ('linkedId' in error && typeof error.linkedId === 'string') {\r\n const [key] = error.linkedId.split('+');\r\n if (key !== undefined) {\r\n return { key, sections: stacks.get(key) ?? [] };\r\n }\r\n }\r\n }\r\n return undefined;\r\n }\r\n\r\n /**\r\n * Clé du modèle visée par chaque chemin serveur normalisé : celle du nœud qui déclare ce chemin (`serverPaths`,\r\n * par défaut la clé : `address.street` → `street`), ou celle de la liste dont il désigne un élément\r\n * (`dates[k3].date` → `dates`). Un chemin qu'aucun nœud ne déclare est absent de la carte.\r\n */\r\n static serverKeys(\r\n nodes: readonly FormNode<AnyModel>[],\r\n paths: Iterable<string>,\r\n ): ReadonlyMap<string, string> {\r\n const claims = RecipeSections.claims(nodes);\r\n const keys = new Map<string, string>();\r\n for (const path of paths) {\r\n const claim = claims.find(\r\n (candidate) =>\r\n candidate.path === path || (candidate.list && path.startsWith(`${candidate.path}[`)),\r\n );\r\n if (claim !== undefined) {\r\n keys.set(path, claim.key);\r\n }\r\n }\r\n return keys;\r\n }\r\n\r\n private static claims(nodes: readonly FormNode<AnyModel>[]): ServerClaim[] {\r\n return nodes.flatMap((node): ServerClaim[] => {\r\n switch (node.kind) {\r\n case NodeKindEnum.SECTION:\r\n case NodeKindEnum.ROW:\r\n return RecipeSections.claims(node.nodes);\r\n case NodeKindEnum.SECTION_GROUP:\r\n return node.sections.flatMap((section) => RecipeSections.claims(section.nodes));\r\n case NodeKindEnum.FIELD:\r\n return RecipeServerPaths.fullPaths('', node.key, node.serverPaths).map((path) => ({\r\n path,\r\n key: node.key,\r\n list: false,\r\n }));\r\n case NodeKindEnum.ARRAY:\r\n return RecipeServerPaths.fullPaths('', node.key, node.serverPaths).map((path) => ({\r\n path,\r\n key: node.key,\r\n list: true,\r\n }));\r\n case NodeKindEnum.LINKED:\r\n return node.keys.flatMap((key) => {\r\n const def = 'fields' in node.control ? node.control.fields[key] : undefined;\r\n return RecipeServerPaths.fullPaths('', key, def?.serverPaths).map((path) => ({\r\n path,\r\n key,\r\n list: false,\r\n }));\r\n });\r\n }\r\n });\r\n }\r\n\r\n private static walk(\r\n nodes: readonly FormNode<AnyModel>[],\r\n sections: readonly string[],\r\n visit: Visit,\r\n enter?: (id: string) => void,\r\n ): void {\r\n for (const node of nodes) {\r\n switch (node.kind) {\r\n case NodeKindEnum.SECTION:\r\n enter?.(node.id);\r\n RecipeSections.walk(node.nodes, [...sections, node.id], visit, enter);\r\n break;\r\n case NodeKindEnum.ROW:\r\n RecipeSections.walk(node.nodes, sections, visit, enter);\r\n break;\r\n case NodeKindEnum.SECTION_GROUP:\r\n for (const section of node.sections) {\r\n enter?.(section.id);\r\n RecipeSections.walk(section.nodes, [...sections, section.id], visit, enter);\r\n }\r\n break;\r\n case NodeKindEnum.FIELD:\r\n case NodeKindEnum.ARRAY:\r\n visit(node.key, sections);\r\n break;\r\n case NodeKindEnum.LINKED:\r\n for (const key of node.keys) {\r\n visit(key, sections);\r\n }\r\n break;\r\n }\r\n }\r\n }\r\n}\r\n","import { NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, inject, input, output } from '@angular/core';\nimport { ButtonVariantEnum } from '../../enums/button-variant.enum';\nimport { RecipeUiPartEnum } from '../../enums/recipe-ui-part.enum';\nimport { SeverityEnum } from '../../enums/severity.enum';\nimport { RecipeButtonContext } from '../../interfaces/recipe-button-context.interface';\nimport { RecipeUi } from '../../services/recipe-ui.service';\n\n/** Bouton du moteur (ajout et retrait d'un élément d'`array`), rendu par le gabarit `appRecipeButton` du registre. */\n@Component({\n selector: 'app-recipe-button',\n imports: [NgTemplateOutlet],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `<ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"context()\" />`,\n})\nexport class RecipeButtonComponent {\n readonly label = input.required<string>();\n readonly variant = input<ButtonVariantEnum>(ButtonVariantEnum.FILLED);\n readonly severity = input<SeverityEnum>(SeverityEnum.PRIMARY);\n readonly clicked = output<void>();\n\n protected readonly template = inject(RecipeUi).template(RecipeUiPartEnum.BUTTON);\n protected readonly context = computed((): RecipeButtonContext => ({\n $implicit: this.label(),\n variant: this.variant(),\n severity: this.severity(),\n click: () => this.clicked.emit(),\n }));\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, inject, input } from '@angular/core';\nimport { RecipeUiPartEnum } from '../../enums/recipe-ui-part.enum';\nimport { SeverityEnum } from '../../enums/severity.enum';\nimport { RecipeMessageContext } from '../../interfaces/recipe-message-context.interface';\nimport { RecipeUi } from '../../services/recipe-ui.service';\n\n/**\n * Message du moteur rendu par le gabarit `appRecipeMessage` du registre. L'élément porte l'identifiant que le champ\n * vise par `aria-describedby` et les classes de placement du moteur ; le texte arrive traduit.\n */\n@Component({\n selector: 'app-recipe-message',\n imports: [NgTemplateOutlet],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'block' },\n template: `<ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"context()\" />`,\n})\nexport class RecipeMessageComponent {\n readonly text = input.required<string>();\n readonly severity = input<SeverityEnum>(SeverityEnum.INFO);\n readonly inline = input(false);\n\n protected readonly template = inject(RecipeUi).template(RecipeUiPartEnum.MESSAGE);\n protected readonly context = computed((): RecipeMessageContext => ({\n $implicit: this.text(),\n severity: this.severity(),\n inline: this.inline(),\n }));\n}\n","import { NgTemplateOutlet } from '@angular/common';\r\nimport {\r\n ChangeDetectionStrategy,\r\n Component,\r\n computed,\r\n inject,\r\n input,\r\n isDevMode,\r\n linkedSignal,\r\n Signal,\r\n TemplateRef,\r\n untracked,\r\n} from '@angular/core';\r\nimport { FieldTree } from '@angular/forms/signals';\r\nimport { FORM_VALIDATION_UNAVAILABLE } from '../../constants/form-validation-unavailable-key.constants';\r\nimport { FORM_VALIDATION_UNAVAILABLE_MESSAGE } from '../../constants/form-validation-unavailable-message.constants';\r\nimport { FORM_WARNINGS } from '../../constants/form-warnings-key.constants';\r\nimport { ControlTypeEnum } from '../../enums/control-type.enum';\r\nimport { SeverityEnum } from '../../enums/severity.enum';\r\nimport { AnyModel } from '../../interfaces/any-model.interface';\r\nimport { FieldHintDef } from '../../interfaces/field-hint-def.interface';\r\nimport { FieldMessage } from '../../interfaces/field-message.interface';\r\nimport { FieldNode } from '../../interfaces/field-node.interface';\r\nimport { RecipeCheckboxControlContext } from '../../interfaces/recipe-checkbox-control-context.interface';\r\nimport { RecipeControlContext } from '../../interfaces/recipe-control-context.interface';\r\nimport { RecipeDateMultipleControlContext } from '../../interfaces/recipe-date-multiple-control-context.interface';\r\nimport { RecipeNumberControlContext } from '../../interfaces/recipe-number-control-context.interface';\r\nimport { RecipeSelectControlContext } from '../../interfaces/recipe-select-control-context.interface';\r\nimport { RecipeSelectOption } from '../../interfaces/recipe-select-option.interface';\r\nimport { RecipeServerValidationError } from '../../interfaces/recipe-server-validation-error.interface';\r\nimport { RecipeSlotContext } from '../../interfaces/recipe-slot-context.interface';\r\nimport { RecipeTextControlContext } from '../../interfaces/recipe-text-control-context.interface';\r\nimport { SelectOption } from '../../interfaces/select-option.interface';\r\nimport { RecipeTranslatePipe } from '../../pipes/recipe-translate.pipe';\r\nimport { RecipeFormContext } from '../../services/recipe-form-context.service';\r\nimport { RecipeUi } from '../../services/recipe-ui.service';\r\nimport { RECIPE_FORM_TRANSLATION_CHANGES } from '../../tokens/recipe-form-translation-changes.token';\r\nimport { RECIPE_FORM_TRANSLATOR } from '../../tokens/recipe-form-translator.token';\r\nimport { RecipeMessageComponent } from '../recipe-message/recipe-message';\r\nimport { RecipeLayout } from '../../utils/recipe-layout.utils';\r\nimport { RecipeMessages } from '../../utils/recipe-messages.utils';\r\nimport { RecipeServerPaths } from '../../utils/recipe-server-paths.utils';\r\n\r\n/**\r\n * Un champ : libellé relié par `for`/`id`, contrôle rendu par le gabarit du registre (`RecipeUi` : celui de l'hôte,\r\n * sinon celui par défaut), qui lie le wrapper par `[formField]`, message d'erreur relié par `aria-describedby`, avertissements non\r\n * bloquants, erreurs et avertissements serveur placés par chemin et effacés dès que la valeur change.\r\n * La liste et le calendrier ne sont pas des champs natifs : `aria-labelledby` et `aria-label` les nomment.\r\n * Un champ `hidden` n'est pas rendu ; `hideLabel` masque visuellement le libellé (cellule d'un `array` en table).\r\n * Sous le contrôle : l'aide (`hintKey`), puis la raison d'une règle `disabled` active (`reasonKey`), au même style ;\r\n * l'aide reste en place quand la raison apparaît ou disparaît. Un champ en lecture seule n'a ni astérisque ni aide.\r\n */\r\n@Component({\r\n selector: 'app-recipe-field',\r\n imports: [NgTemplateOutlet, RecipeTranslatePipe, RecipeMessageComponent],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n host: { '[class]': 'hostClasses()' },\r\n templateUrl: './recipe-field.html',\r\n})\r\nexport class RecipeFieldComponent {\r\n readonly node = input.required<FieldNode<AnyModel>>();\r\n readonly field = input.required<FieldTree<unknown>>();\r\n readonly idPrefix = input.required<string>();\r\n /** Chemin serveur de l'élément conteneur (`dates[k3]`), vide à la racine. */\r\n readonly serverPrefix = input<string>('');\r\n readonly hideLabel = input<boolean>(false);\r\n /** Message du groupe lié dont ce champ est la cible (`errorTarget`). */\r\n readonly extraMessage = input<FieldMessage>();\r\n /** Identifiant d'un message de groupe affiché ailleurs, à relier au champ. */\r\n readonly extraDescribedBy = input<string>();\r\n\r\n private readonly context =\r\n inject(RecipeFormContext, { optional: true }) ?? new RecipeFormContext();\r\n\r\n private readonly translator = inject(RECIPE_FORM_TRANSLATOR);\r\n private readonly translationChanges = inject(RECIPE_FORM_TRANSLATION_CHANGES);\r\n private readonly ui = inject(RecipeUi);\r\n\r\n protected readonly types = ControlTypeEnum;\r\n protected readonly severities = SeverityEnum;\r\n\r\n /**\r\n * Options d'un `select`, copiées dans un tableau (la recette les donne en lecture seule) ; une option `labelKey`\r\n * devient une `SelectOption` dont `label` est sa traduction. Recalculées à chaque changement des options et à\r\n * chaque chargement de traductions de l'hôte (`RECIPE_FORM_TRANSLATION_CHANGES`).\r\n */\r\n protected readonly selectOptions = computed((): SelectOption<unknown>[] => {\r\n const control = this.node().control;\r\n if (control.type !== ControlTypeEnum.SELECT) {\r\n return [];\r\n }\r\n this.translationChanges();\r\n return control.options().map((option) => this.wrapperOption(option));\r\n });\r\n\r\n protected readonly state = computed(() => this.field()());\r\n protected readonly inputId = computed(() => `${this.idPrefix()}-${this.node().key}`);\r\n protected readonly labelId = computed(() => `${this.inputId()}-label`);\r\n protected readonly messageId = computed(() => `${this.inputId()}-message`);\r\n protected readonly hintId = computed(() => `${this.inputId()}-hint`);\r\n protected readonly reasonId = computed(() => `${this.inputId()}-reason`);\r\n protected readonly warningsId = computed(() => `${this.inputId()}-warnings`);\r\n\r\n /** Clés `reasonKey` des règles `disabled` actives, sans doublon ; vide dès que le champ est réactivé. */\r\n protected readonly disabledReasonKeys = computed((): readonly string[] => [\r\n ...new Set(\r\n this.state()\r\n .disabledReasons()\r\n .flatMap((reason) => (reason.message === undefined ? [] : [reason.message])),\r\n ),\r\n ]);\r\n\r\n protected readonly hostClasses = computed(\r\n () =>\r\n `${RecipeLayout.item(this.node())} ${this.state().hidden() ? 'hidden' : 'flex min-w-0 flex-col gap-1.5'}`,\r\n );\r\n\r\n /** Les erreurs d'un groupe lié (`linkedId`) sont affichées par le groupe, pas par le champ. */\r\n protected readonly ownErrors = computed(() =>\r\n this.state()\r\n .errors()\r\n .filter((error) => !('linkedId' in error)),\r\n );\r\n\r\n private readonly serverPaths = computed(() =>\r\n RecipeServerPaths.fullPaths(this.serverPrefix(), this.node().key, this.node().serverPaths),\r\n );\r\n\r\n private readonly serverErrors = this.untilValueChanges(\r\n computed(() => RecipeServerPaths.errorsFor(this.context.serverErrors(), this.serverPaths()), {\r\n equal: RecipeServerPaths.sameErrors,\r\n }),\r\n );\r\n\r\n private readonly serverWarnings = this.untilValueChanges(\r\n computed(() => RecipeServerPaths.errorsFor(this.context.serverWarnings(), this.serverPaths()), {\r\n equal: RecipeServerPaths.sameErrors,\r\n }),\r\n );\r\n\r\n protected readonly message = computed((): FieldMessage | undefined => {\r\n const server = this.serverErrors();\r\n return (\r\n RecipeMessages.resolve({\r\n errors: [...this.ownErrors(), ...server],\r\n touched: this.state().touched() || server.length > 0,\r\n submitted: this.context.submitted(),\r\n fieldMessages: this.node().messages,\r\n recipeMessages: this.context.recipeMessages(),\r\n }) ?? this.extraMessage()\r\n );\r\n });\r\n\r\n /** Avertissements : règles `warn` (après interaction), avertissements serveur, validateur indisponible. */\r\n protected readonly warnings = computed((): readonly FieldMessage[] => {\r\n const state = this.state();\r\n const shown = state.touched() || this.context.submitted();\r\n const ruleWarnings = shown ? (state.metadata(FORM_WARNINGS)?.() ?? []) : [];\r\n const messages = RecipeMessages.forAll(\r\n [...ruleWarnings, ...this.serverWarnings()],\r\n this.node().messages,\r\n this.context.recipeMessages(),\r\n );\r\n return state.metadata(FORM_VALIDATION_UNAVAILABLE)?.() === true\r\n ? [...messages, { key: FORM_VALIDATION_UNAVAILABLE_MESSAGE }]\r\n : messages;\r\n });\r\n\r\n /**\r\n * Clé de l'aide affichée : absente sur un champ en lecture seule (sauf `showWhenReadonly`) et quand la condition\r\n * `when` est fausse ; `when` lit la racine au rendu, par le contexte du formulaire.\r\n */\r\n protected readonly hintKey = computed((): string | undefined => {\r\n const hint = this.node().hintKey;\r\n if (hint === undefined) {\r\n return undefined;\r\n }\r\n const def: FieldHintDef<AnyModel> = typeof hint === 'string' ? { key: hint } : hint;\r\n if (this.state().readonly() && def.showWhenReadonly !== true) {\r\n return undefined;\r\n }\r\n if (def.when !== undefined && !def.when(this.context.ruleContext())) {\r\n return undefined;\r\n }\r\n return def.key;\r\n });\r\n\r\n protected readonly describedBy = computed((): string | undefined => {\r\n const ids: string[] = [];\r\n if (this.hintKey() !== undefined) {\r\n ids.push(this.hintId());\r\n }\r\n if (this.disabledReasonKeys().length > 0) {\r\n ids.push(this.reasonId());\r\n }\r\n if (this.message() !== undefined) {\r\n ids.push(this.messageId());\r\n }\r\n if (this.warnings().length > 0) {\r\n ids.push(this.warningsId());\r\n }\r\n const extra = this.extraDescribedBy();\r\n if (extra !== undefined) {\r\n ids.push(extra);\r\n }\r\n return ids.length === 0 ? undefined : ids.join(' ');\r\n });\r\n\r\n /** `display` : valeur calculée depuis la racine (`compute`), valeur formatée (`format`), ou valeur brute. */\r\n protected readonly displayValue = computed((): string => {\r\n const control = this.node().control;\r\n if (control.type === ControlTypeEnum.DISPLAY && control.compute !== undefined) {\r\n return control.compute(this.context.rootTree()?.().value() ?? {});\r\n }\r\n const value = this.state().value();\r\n if (control.type === ControlTypeEnum.DISPLAY && control.format !== undefined) {\r\n return control.format(value);\r\n }\r\n if (value instanceof Date) {\r\n return value.toLocaleDateString();\r\n }\r\n return value === null || value === undefined ? '' : String(value);\r\n });\r\n\r\n /**\r\n * Gabarit du contrôle et son contexte, pour tout type sauf `display` et `slot`. Le contexte change d'objet à chaque\r\n * recalcul ; `ngTemplateOutlet` met alors la vue à jour sans la recréer, si bien que le contrôle garde son focus.\r\n */\r\n protected readonly control = computed(\r\n (): { readonly template: TemplateRef<unknown>; readonly context: object } | undefined => {\r\n const control = this.node().control;\r\n const base = {\r\n $implicit: this.field() as FieldTree<never>,\r\n inputId: this.inputId(),\r\n describedBy: this.describedBy(),\r\n };\r\n switch (control.type) {\r\n case ControlTypeEnum.TEXT:\r\n return {\r\n template: this.ui.template(control.type),\r\n context: {\r\n ...base,\r\n placeholder: control.placeholder ?? '',\r\n inputmode: control.inputmode ?? 'text',\r\n icon: control.icon,\r\n } satisfies RecipeTextControlContext,\r\n };\r\n case ControlTypeEnum.NUMBER:\r\n return {\r\n template: this.ui.template(control.type),\r\n context: {\r\n ...base,\r\n step: control.step,\r\n minFractionDigits: control.minFractionDigits,\r\n maxFractionDigits: control.maxFractionDigits,\r\n } satisfies RecipeNumberControlContext,\r\n };\r\n case ControlTypeEnum.SELECT:\r\n return {\r\n template: this.ui.template(control.type),\r\n context: {\r\n ...base,\r\n labelId: this.labelId(),\r\n options: this.selectOptions(),\r\n filter: control.filter ?? false,\r\n showClear: control.showClear ?? false,\r\n placeholder:\r\n control.placeholderKey === undefined ? '' : this.translator(control.placeholderKey),\r\n readonly: this.state().readonly(),\r\n } satisfies RecipeSelectControlContext,\r\n };\r\n case ControlTypeEnum.DATE_MULTIPLE:\r\n this.translationChanges();\r\n return {\r\n template: this.ui.template(control.type),\r\n context: {\r\n ...base,\r\n ariaLabel: this.translator(this.node().labelKey),\r\n maxDate: control.maxDate,\r\n months: control.months ?? 3,\r\n } satisfies RecipeDateMultipleControlContext,\r\n };\r\n case ControlTypeEnum.CHECKBOX:\r\n return {\r\n template: this.ui.template(control.type),\r\n context: {\r\n ...base,\r\n readonly: this.state().readonly(),\r\n } satisfies RecipeCheckboxControlContext,\r\n };\r\n case ControlTypeEnum.DATE:\r\n return {\r\n template: this.ui.template(control.type),\r\n context: base satisfies RecipeControlContext<never>,\r\n };\r\n default:\r\n return undefined;\r\n }\r\n },\r\n );\r\n\r\n protected readonly slotTemplate = computed((): TemplateRef<RecipeSlotContext> | undefined => {\r\n const control = this.node().control;\r\n if (control.type !== ControlTypeEnum.SLOT) {\r\n return undefined;\r\n }\r\n const template = this.context.slots().get(control.name);\r\n if (template === undefined && isDevMode()) {\r\n const slot = `<ng-template appRecipeSlot=\"${control.name}\">`;\r\n throw new Error(\r\n `[recipe-forms] slot « ${control.name} » introuvable : ajoutez ${slot} dans <app-recipe-form>`,\r\n );\r\n }\r\n return template;\r\n });\r\n\r\n protected readonly slotContext = computed((): RecipeSlotContext => ({\r\n $implicit: this.field(),\r\n inputId: this.inputId(),\r\n describedBy: this.describedBy(),\r\n }));\r\n\r\n /** Règle de vie du result pattern : les erreurs serveur reçues s'effacent dès que la valeur du champ change. */\r\n private untilValueChanges(\r\n source: Signal<readonly RecipeServerValidationError[]>,\r\n ): Signal<readonly RecipeServerValidationError[]> {\r\n const receipt = linkedSignal(() => ({\r\n errors: source(),\r\n value: untracked(() => this.state().value()),\r\n }));\r\n return computed(() => {\r\n const received = receipt();\r\n return received.errors.length > 0 &&\r\n RecipeFieldComponent.sameValue(received.value, this.state().value())\r\n ? received.errors\r\n : [];\r\n });\r\n }\r\n\r\n /** Option passée au wrapper : `label` tel quel, ou traduction de `labelKey` (prioritaire si les deux sont donnés). */\r\n private wrapperOption(option: RecipeSelectOption<unknown>): SelectOption<unknown> {\r\n if (!('labelKey' in option)) {\r\n return option;\r\n }\r\n const { labelKey, ...rest } = option;\r\n return { ...rest, label: this.translator(labelKey) };\r\n }\r\n\r\n private static sameValue(a: unknown, b: unknown): boolean {\r\n if (a instanceof Date && b instanceof Date) {\r\n return a.getTime() === b.getTime();\r\n }\r\n return Object.is(a, b);\r\n }\r\n}\r\n","@let n = node();\r\n@let s = state();\r\n@if (!s.hidden()) {\r\n <label\r\n [for]=\"inputId()\"\r\n [id]=\"labelId()\"\r\n [class]=\"hideLabel() ? 'sr-only' : 'text-sm font-semibold text-slate-800'\"\r\n >\r\n {{ n.labelKey | recipeTranslate }}\r\n @if (s.required() && !s.readonly()) {\r\n <span aria-hidden=\"true\" class=\"text-red-600\">*</span>\r\n }\r\n </label>\r\n @switch (n.control.type) {\r\n @case (types.DISPLAY) {\r\n <output [id]=\"inputId()\" class=\"rounded-md bg-slate-50 px-3 py-2 text-sm text-slate-700\">{{\r\n displayValue()\r\n }}</output>\r\n }\r\n @case (types.SLOT) {\r\n @if (slotTemplate(); as template) {\r\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"slotContext()\" />\r\n }\r\n }\r\n @default {\r\n <!-- Gabarit du registre : celui de l'hôte (`provideRecipeForms({ ui })`), sinon celui par défaut. -->\r\n @if (control(); as c) {\r\n <ng-container [ngTemplateOutlet]=\"c.template\" [ngTemplateOutletContext]=\"c.context\" />\r\n }\r\n }\r\n }\r\n @if (hintKey(); as hint) {\r\n <p [id]=\"hintId()\" class=\"text-xs text-slate-500\">{{ hint | recipeTranslate }}</p>\r\n }\r\n <!-- Raison d'une règle `disabled` active : comme l'aide, après elle, retirée dès que le champ est réactivé. -->\r\n @if (disabledReasonKeys().length > 0) {\r\n <p [id]=\"reasonId()\" class=\"text-xs text-slate-500\">\r\n @for (reasonKey of disabledReasonKeys(); track reasonKey) {\r\n <span class=\"block\">{{ reasonKey | recipeTranslate }}</span>\r\n }\r\n </p>\r\n }\r\n @if (s.pending()) {\r\n <app-recipe-message\r\n [severity]=\"severities.SECONDARY\"\r\n [inline]=\"true\"\r\n [text]=\"'forms.pending' | recipeTranslate\"\r\n />\r\n }\r\n @if (warnings().length > 0) {\r\n <div [id]=\"warningsId()\" role=\"status\" class=\"flex flex-col gap-0.5\">\r\n @for (w of warnings(); track $index) {\r\n <app-recipe-message\r\n [severity]=\"severities.WARNING\"\r\n [inline]=\"true\"\r\n [text]=\"w.key | recipeTranslate: w.params : w.text\"\r\n />\r\n }\r\n </div>\r\n }\r\n @if (message(); as m) {\r\n <app-recipe-message\r\n [id]=\"messageId()\"\r\n [severity]=\"severities.DANGER\"\r\n [inline]=\"true\"\r\n [text]=\"m.key | recipeTranslate: m.params : m.text\"\r\n />\r\n }\r\n}\r\n","import { Directive, inject, input, TemplateRef } from '@angular/core';\nimport { RecipeSlotContext } from '../interfaces/recipe-slot-context.interface';\n\n/**\n * Échappatoire pour un contrôle hors catalogue, ou gabarit d'un `array` :\n * `<ng-template appRecipeSlot=\"nom\" let-field let-inputId=\"inputId\" let-api=\"api\">…</ng-template>` dans `<app-recipe-form>`.\n */\n@Directive({ selector: 'ng-template[appRecipeSlot]' })\nexport class RecipeSlotDirective {\n readonly name = input.required<string>({ alias: 'appRecipeSlot' });\n readonly template = inject<TemplateRef<RecipeSlotContext>>(TemplateRef);\n\n static ngTemplateContextGuard(\n _directive: RecipeSlotDirective,\n context: unknown,\n ): context is RecipeSlotContext {\n return typeof context === 'object' && context !== null && '$implicit' in context;\n }\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n input,\n model,\n TemplateRef,\n viewChild,\n} from '@angular/core';\nimport { RecipeUiPartEnum } from '../../enums/recipe-ui-part.enum';\nimport { RecipePanelContext } from '../../interfaces/recipe-panel-context.interface';\nimport { RecipeUi } from '../../services/recipe-ui.service';\n\n/**\n * Volet d'un groupe de sections, rendu par le gabarit `appRecipePanel` du registre. Le contenu projeté passe au\n * gabarit comme un `TemplateRef` ; l'état replié reste au moteur, qui ouvre le volet du premier champ en erreur.\n */\n@Component({\n selector: 'app-recipe-panel',\n imports: [NgTemplateOutlet],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'block min-w-0' },\n template: `\n <ng-template #content><ng-content /></ng-template>\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"context()\" />\n `,\n})\nexport class RecipePanelComponent {\n readonly header = input.required<string>();\n readonly collapsible = input(false);\n readonly collapsed = model(false);\n readonly badge = input<number>();\n readonly badgeLabel = input<string>();\n readonly collapseLabel = input.required<string>();\n readonly expandLabel = input.required<string>();\n\n private readonly content = viewChild.required<TemplateRef<unknown>>('content');\n protected readonly template = inject(RecipeUi).template(RecipeUiPartEnum.PANEL);\n protected readonly context = computed((): RecipePanelContext => ({\n $implicit: this.content(),\n header: this.header(),\n collapsible: this.collapsible(),\n collapsed: this.collapsed(),\n toggle: (collapsed) => this.collapsed.set(collapsed),\n badge: this.badge(),\n badgeLabel: this.badgeLabel(),\n collapseLabel: this.collapseLabel(),\n expandLabel: this.expandLabel(),\n }));\n}\n","import { Directive, inject, input, TemplateRef } from '@angular/core';\n\n/**\n * Contenu d'un onglet d'`app-recipe-tabs` : `<ng-template [appRecipeTabPanel]=\"valeur\">`. `app-recipe-tabs` le passe\n * au gabarit des onglets du registre, qui le rend dans le panneau de l'onglet.\n */\n@Directive({ selector: 'ng-template[appRecipeTabPanel]' })\nexport class RecipeTabPanelDirective {\n readonly value = input.required<string>({ alias: 'appRecipeTabPanel' });\n readonly template = inject<TemplateRef<unknown>>(TemplateRef);\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChildren,\n inject,\n input,\n model,\n} from '@angular/core';\nimport { RecipeTabPanelDirective } from '../../directives/recipe-tab-panel.directive';\nimport { RecipeUiPartEnum } from '../../enums/recipe-ui-part.enum';\nimport { RecipeTabsContext } from '../../interfaces/recipe-tabs-context.interface';\nimport { TabOption } from '../../interfaces/tab-option.interface';\nimport { RecipeUi } from '../../services/recipe-ui.service';\n\n/**\n * Onglets d'un groupe de sections, rendus par le gabarit `appRecipeTabs` du registre : un panneau par\n * `<ng-template [appRecipeTabPanel]>` projeté, dans l'ordre des gabarits. L'onglet actif reste au moteur.\n */\n@Component({\n selector: 'app-recipe-tabs',\n imports: [NgTemplateOutlet],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'block min-w-0' },\n template: `<ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"context()\" />`,\n})\nexport class RecipeTabsComponent {\n readonly value = model.required<string>();\n readonly options = input.required<TabOption[]>();\n readonly fill = input(false);\n\n private readonly panels = contentChildren(RecipeTabPanelDirective);\n protected readonly template = inject(RecipeUi).template(RecipeUiPartEnum.TABS);\n protected readonly context = computed((): RecipeTabsContext => ({\n $implicit: this.panels().map((panel) => ({ value: panel.value(), template: panel.template })),\n options: this.options(),\n value: this.value(),\n select: (value) => this.value.set(value),\n fill: this.fill(),\n }));\n}\n","import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n computed,\r\n effect,\r\n forwardRef,\r\n inject,\r\n input,\r\n linkedSignal,\r\n untracked,\r\n} from '@angular/core';\r\nimport { FieldTree } from '@angular/forms/signals';\r\nimport { SECTION_DISPLAY_DEFAULTS } from '../../constants/section-display-defaults.constants';\r\nimport { SectionDisplayEnum } from '../../enums/section-display.enum';\r\nimport { AnyModel } from '../../interfaces/any-model.interface';\r\nimport { SectionBadge } from '../../interfaces/section-badge.interface';\r\nimport { SectionGroupNode } from '../../interfaces/section-group-node.interface';\r\nimport { SectionNode } from '../../interfaces/section-node.interface';\r\nimport { TabOption } from '../../interfaces/tab-option.interface';\r\nimport { RecipeTranslatePipe } from '../../pipes/recipe-translate.pipe';\r\nimport { RecipeFormContext } from '../../services/recipe-form-context.service';\r\nimport { RECIPE_FORM_TRANSLATION_CHANGES } from '../../tokens/recipe-form-translation-changes.token';\r\nimport { RECIPE_FORM_TRANSLATOR } from '../../tokens/recipe-form-translator.token';\r\nimport { RecipePanelComponent } from '../recipe-panel/recipe-panel';\r\nimport { RecipeTabPanelDirective } from '../../directives/recipe-tab-panel.directive';\r\nimport { RecipeTabsComponent } from '../recipe-tabs/recipe-tabs';\r\nimport { RecipeSections } from '../../utils/recipe-sections.utils';\r\nimport { RecipeNodeComponent } from '../recipe-node/recipe-node';\r\n\r\n/**\r\n * Un groupe de sections, au format de la recette : `plain` (sections à la suite), `panel` (un volet\r\n * `app-panel` par section) ou `tabs` (un onglet `app-tabs` par section, le premier actif au départ, onglets en `fill`\r\n * pour qu'aucun ne sorte de la vue sur petit écran), avec le compteur d'erreurs de chaque section, masqué à zéro.\r\n * La soumission, ou l'arrivée d'erreurs serveur, ouvre le volet ou active\r\n * l'onglet du premier champ en erreur. Aucun format ne détruit une section : un volet replié ou un onglet inactif\r\n * reste rendu (`hidden`). La validation ne dépend pas de l'affichage : les règles vivent dans le `FieldTree`.\r\n */\r\n@Component({\r\n selector: 'app-recipe-section-group',\r\n imports: [\r\n RecipeTranslatePipe,\r\n RecipePanelComponent,\r\n RecipeTabsComponent,\r\n RecipeTabPanelDirective,\r\n forwardRef(() => RecipeNodeComponent),\r\n ],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n host: { class: 'block' },\r\n templateUrl: './recipe-section-group.html',\r\n})\r\nexport class RecipeSectionGroupComponent {\r\n readonly node = input.required<SectionGroupNode<AnyModel>>();\r\n readonly tree = input.required<FieldTree<AnyModel>>();\r\n readonly idPrefix = input.required<string>();\r\n readonly serverPrefix = input<string>('');\r\n\r\n private readonly context =\r\n inject(RecipeFormContext, { optional: true }) ?? new RecipeFormContext();\r\n private readonly translator = inject(RECIPE_FORM_TRANSLATOR);\r\n private readonly translationChanges = inject(RECIPE_FORM_TRANSLATION_CHANGES);\r\n\r\n protected readonly displays = SectionDisplayEnum;\r\n protected readonly sections = computed(\r\n (): readonly SectionNode<AnyModel>[] => this.node().sections,\r\n );\r\n private readonly options = computed(() => this.node().options);\r\n protected readonly collapsible = computed(() => this.options()?.collapsible ?? true);\r\n private readonly multiple = computed(\r\n () => this.options()?.multiple ?? SECTION_DISPLAY_DEFAULTS[SectionDisplayEnum.PANEL].multiple,\r\n );\r\n\r\n /** Clés de chaque section du groupe, sous-sections comprises. */\r\n private readonly index = computed(() => RecipeSections.index([this.node()]));\r\n\r\n /** Chemins des erreurs serveur placées, relatifs à l'arbre de ce groupe. */\r\n private readonly localServerPaths = computed((): readonly string[] => {\r\n const prefix = this.serverPrefix();\r\n const paths = [...this.context.serverErrors().keys()];\r\n return prefix === ''\r\n ? paths\r\n : paths\r\n .filter((path) => path.startsWith(`${prefix}.`))\r\n .map((path) => path.slice(prefix.length + 1));\r\n });\r\n\r\n /**\r\n * Compteur d'erreurs de chaque section, volets et onglets compris. Le traducteur n'a pas de pluriel : le texte vient\r\n * de `forms.display.errorCountOne` pour une erreur (« 1 erreur »), de `forms.display.errorCount` sinon (« 4 erreurs »).\r\n * Recalculé à chaque chargement de traductions de l'hôte (`RECIPE_FORM_TRANSLATION_CHANGES`).\r\n */\r\n protected readonly badges = computed((): ReadonlyMap<string, SectionBadge> => {\r\n this.translationChanges();\r\n const tree = this.tree();\r\n const submitted = this.context.submitted();\r\n const serverErrorKeys = RecipeSections.serverKeys([this.node()], this.localServerPaths());\r\n return new Map(\r\n [...this.index()].map(([id, keys]) => {\r\n const count = RecipeSections.errorCount({ keys, tree, submitted, serverErrorKeys });\r\n const key = count === 1 ? 'forms.display.errorCountOne' : 'forms.display.errorCount';\r\n return [id, { count, label: this.translator(key, { count }) }];\r\n }),\r\n );\r\n });\r\n\r\n /** Volets ouverts (format `panel`). */\r\n protected readonly open = linkedSignal(\r\n (): ReadonlySet<string> =>\r\n new Set(this.options()?.initiallyOpen ?? this.sections().map((section) => section.id)),\r\n );\r\n\r\n /** Onglet actif (format `tabs`) : la première section au départ. */\r\n protected readonly activeTab = linkedSignal((): string => this.sections()[0]?.id ?? '');\r\n\r\n /**\r\n * Onglets (format `tabs`) : titre traduit de la section, compteur d'erreurs seulement s'il dépasse zéro. Recalculés\r\n * à chaque chargement de traductions de l'hôte (`RECIPE_FORM_TRANSLATION_CHANGES`).\r\n */\r\n protected readonly tabOptions = computed((): TabOption[] => {\r\n this.translationChanges();\r\n const badges = this.badges();\r\n return this.sections().map((section): TabOption => {\r\n const badge = badges.get(section.id);\r\n const counted = badge !== undefined && badge.count > 0 ? badge : undefined;\r\n return {\r\n value: section.id,\r\n label: this.translator(section.legendKey ?? section.id),\r\n badge: counted?.count,\r\n badgeLabel: counted?.label,\r\n };\r\n });\r\n });\r\n\r\n constructor() {\r\n effect(() => {\r\n if (this.context.submitCount() === 0) {\r\n return;\r\n }\r\n untracked(() => {\r\n const first = RecipeSections.firstInvalid(\r\n [this.node()],\r\n this.tree(),\r\n this.localServerPaths(),\r\n );\r\n if (first !== undefined) {\r\n this.reveal(first.sections);\r\n }\r\n });\r\n });\r\n effect(() => {\r\n const paths = this.localServerPaths();\r\n if (paths.length === 0) {\r\n return;\r\n }\r\n untracked(() => this.revealServerError(paths));\r\n });\r\n }\r\n\r\n protected togglePanel(id: string, collapsed: boolean): void {\r\n this.open.update((set) => {\r\n const next = this.multiple() ? new Set(set) : new Set<string>();\r\n if (collapsed) {\r\n next.delete(id);\r\n } else {\r\n next.add(id);\r\n }\r\n return next;\r\n });\r\n }\r\n\r\n /**\r\n * Rend visible la section de tête d'un champ : ouvre son volet (`panel`) ou active son onglet (`tabs`) ;\r\n * en `plain`, toutes les sections sont déjà visibles. Le focus différé du formulaire arrive après ce rendu.\r\n */\r\n private reveal(sections: readonly string[]): void {\r\n const [top] = sections;\r\n if (top === undefined) {\r\n return;\r\n }\r\n const display = this.node().display;\r\n if (display === SectionDisplayEnum.PANEL) {\r\n this.open.update((set) => (this.multiple() ? new Set([...set, top]) : new Set([top])));\r\n } else if (display === SectionDisplayEnum.TABS) {\r\n this.activeTab.set(top);\r\n }\r\n }\r\n\r\n private revealServerError(paths: readonly string[]): void {\r\n const targets = new Set(RecipeSections.serverKeys([this.node()], paths).values());\r\n for (const section of this.sections()) {\r\n const keys = this.index().get(section.id) ?? [];\r\n if (keys.some((key) => targets.has(key))) {\r\n this.reveal([section.id]);\r\n return;\r\n }\r\n }\r\n }\r\n}\r\n","@switch (node().display) {\n @case (displays.PANEL) {\n <div class=\"flex flex-col gap-4\">\n @for (section of sections(); track section.id) {\n @let badge = badges().get(section.id);\n @let title = section.legendKey ?? section.id | recipeTranslate;\n <app-recipe-panel\n [header]=\"title\"\n [collapseLabel]=\"'forms.display.collapsePanel' | recipeTranslate: { title }\"\n [expandLabel]=\"'forms.display.expandPanel' | recipeTranslate: { title }\"\n [collapsible]=\"collapsible()\"\n [collapsed]=\"!open().has(section.id)\"\n (collapsedChange)=\"togglePanel(section.id, $event)\"\n [badge]=\"badge !== undefined && badge.count > 0 ? badge.count : undefined\"\n [badgeLabel]=\"badge?.label\"\n >\n <app-recipe-node\n [node]=\"section\"\n [tree]=\"tree()\"\n [idPrefix]=\"idPrefix()\"\n [serverPrefix]=\"serverPrefix()\"\n [hideLegend]=\"true\"\n />\n </app-recipe-panel>\n }\n </div>\n }\n @case (displays.TABS) {\n <app-recipe-tabs\n [options]=\"tabOptions()\"\n [value]=\"activeTab()\"\n (valueChange)=\"activeTab.set($event)\"\n [fill]=\"true\"\n >\n @for (section of sections(); track section.id) {\n <ng-template [appRecipeTabPanel]=\"section.id\">\n <app-recipe-node\n [node]=\"section\"\n [tree]=\"tree()\"\n [idPrefix]=\"idPrefix()\"\n [serverPrefix]=\"serverPrefix()\"\n [hideLegend]=\"true\"\n />\n </ng-template>\n }\n </app-recipe-tabs>\n }\n @default {\n <div class=\"flex flex-col gap-6\">\n @for (section of sections(); track section.id) {\n <app-recipe-node\n [node]=\"section\"\n [tree]=\"tree()\"\n [idPrefix]=\"idPrefix()\"\n [serverPrefix]=\"serverPrefix()\"\n />\n }\n </div>\n }\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n forwardRef,\n inject,\n input,\n isDevMode,\n linkedSignal,\n Signal,\n TemplateRef,\n untracked,\n} from '@angular/core';\nimport { FieldState, FieldTree } from '@angular/forms/signals';\nimport { ArrayDisplayEnum } from '../../enums/array-display.enum';\nimport { ButtonVariantEnum } from '../../enums/button-variant.enum';\nimport { ControlTypeEnum } from '../../enums/control-type.enum';\nimport { LinkedControlTypeEnum } from '../../enums/linked-control-type.enum';\nimport { NodeKindEnum } from '../../enums/node-kind.enum';\nimport { SeverityEnum } from '../../enums/severity.enum';\nimport { AnyModel } from '../../interfaces/any-model.interface';\nimport { ArrayItem } from '../../interfaces/array-item.interface';\nimport { FieldMessage } from '../../interfaces/field-message.interface';\nimport { FieldNode } from '../../interfaces/field-node.interface';\nimport { FormNode } from '../../interfaces/form-node.interface';\nimport { RecipeArrayApi } from '../../interfaces/recipe-array-api.interface';\nimport { RecipeServerValidationError } from '../../interfaces/recipe-server-validation-error.interface';\nimport { RecipeSlotContext } from '../../interfaces/recipe-slot-context.interface';\nimport { RecipeTranslatePipe } from '../../pipes/recipe-translate.pipe';\nimport { RecipeFormContext } from '../../services/recipe-form-context.service';\nimport { FORM_KEY_GENERATOR } from '../../tokens/form-key-generator.token';\nimport { RecipeButtonComponent } from '../recipe-button/recipe-button';\nimport { RecipeMessageComponent } from '../recipe-message/recipe-message';\nimport { RecipeArrays } from '../../utils/recipe-arrays.utils';\nimport { RecipeLayout } from '../../utils/recipe-layout.utils';\nimport { RecipeMessages } from '../../utils/recipe-messages.utils';\nimport { RecipeSchema } from '../../utils/recipe-schema.utils';\nimport { RecipeServerPaths } from '../../utils/recipe-server-paths.utils';\nimport { RecipeFieldComponent } from '../recipe-field/recipe-field';\nimport { RecipeSectionGroupComponent } from '../recipe-section-group/recipe-section-group';\n\ntype AnyArrayItem = ArrayItem & AnyModel;\n\n/**\n * Rendu récursif d'un nœud : section, ligne, groupe de sections (`app-recipe-section-group`), champ,\n * contrôle lié, `array` en liste ou en table avec son slot et son API, ses règles de liste\n * et ses erreurs serveur. L'état partagé du formulaire vient de `RecipeFormContext`.\n */\n@Component({\n selector: 'app-recipe-node',\n imports: [\n NgTemplateOutlet,\n RecipeTranslatePipe,\n RecipeFieldComponent,\n RecipeButtonComponent,\n RecipeMessageComponent,\n forwardRef(() => RecipeSectionGroupComponent),\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { '[class]': 'hostClasses()' },\n templateUrl: './recipe-node.html',\n})\nexport class RecipeNodeComponent {\n readonly node = input.required<FormNode<AnyModel>>();\n readonly tree = input.required<FieldTree<AnyModel>>();\n readonly idPrefix = input.required<string>();\n /** Chemin serveur de l'élément conteneur (`dates[k3]`), vide à la racine. */\n readonly serverPrefix = input<string>('');\n /** Section rendue dans un volet, un onglet, une étape ou un arbre : le titre est déjà affiché par le conteneur. */\n readonly hideLegend = input<boolean>(false);\n /** Champ rendu dans une cellule d'`array` en table : le libellé est l'en-tête de colonne. */\n readonly hideLabel = input<boolean>(false);\n\n private readonly keyGenerator = inject(FORM_KEY_GENERATOR);\n private readonly context =\n inject(RecipeFormContext, { optional: true }) ?? new RecipeFormContext();\n\n protected readonly kinds = NodeKindEnum;\n protected readonly displays = ArrayDisplayEnum;\n protected readonly variants = ButtonVariantEnum;\n protected readonly severities = SeverityEnum;\n\n /** Section masquée par sa condition `hidden`, évaluée au rendu sur la racine. */\n protected readonly sectionHidden = computed((): boolean => {\n const node = this.node();\n return (\n node.kind === NodeKindEnum.SECTION &&\n node.hidden !== undefined &&\n node.hidden(this.context.ruleContext())\n );\n });\n\n protected readonly hostClasses = computed((): string => {\n const node = this.node();\n if (node.kind === NodeKindEnum.SECTION_GROUP) {\n return node.class ?? '';\n }\n const hidden =\n (node.kind === NodeKindEnum.FIELD && this.fieldTreeOf(node.key)().hidden()) ||\n (node.kind === NodeKindEnum.SECTION && this.sectionHidden()) ||\n (node.kind === NodeKindEnum.ARRAY && this.arrayHidden());\n return `${RecipeLayout.item(node)} ${hidden ? 'hidden' : 'block min-w-0'}`;\n });\n\n protected readonly containerClasses = computed((): string => {\n const node = this.node();\n if (node.kind === NodeKindEnum.SECTION) {\n return RecipeLayout.container(node.columns, node.areas);\n }\n if (node.kind === NodeKindEnum.ROW) {\n return node.columns === undefined\n ? 'flex flex-wrap items-end gap-4'\n : RecipeLayout.container(node.columns);\n }\n return '';\n });\n\n protected fieldTreeOf(key: string): FieldTree<unknown> {\n const child = this.tree()[key];\n if (child === undefined) {\n throw new Error(`[recipe-forms] la clé « ${key} » n'existe pas dans le modèle du formulaire`);\n }\n return child;\n }\n\n // ---- contrôles liés ----\n\n protected readonly linked = computed(() => {\n const node = this.node();\n return node.kind === NodeKindEnum.LINKED ? node : undefined;\n });\n\n protected readonly linkedId = computed(() => {\n const linked = this.linked();\n return linked === undefined ? '' : RecipeSchema.linkedId(linked);\n });\n\n protected readonly linkedMessageId = computed(\n () => `${this.idPrefix()}-${this.linkedId()}-message`,\n );\n\n /** Cible de l'erreur du groupe : une clé liée, ou `undefined` pour le groupe entier. */\n protected readonly linkedTarget = computed((): string | undefined => {\n const linked = this.linked();\n return linked === undefined ||\n linked.errorTarget === undefined ||\n linked.errorTarget === 'group'\n ? undefined\n : linked.errorTarget;\n });\n\n protected readonly linkedContainerClasses = computed((): string => {\n const linked = this.linked();\n if (linked === undefined) {\n return '';\n }\n const columns =\n linked.control.type === LinkedControlTypeEnum.GROUP ? linked.control.columns : undefined;\n return RecipeLayout.container(columns ?? { base: 1, md: 2 });\n });\n\n /** Les champs d'un contrôle lié sont rendus comme des champs ordinaires, construits à partir du contrôle. */\n protected readonly linkedFieldNodes = computed((): readonly FieldNode<AnyModel>[] => {\n const linked = this.linked();\n if (linked === undefined) {\n return [];\n }\n if (linked.control.type === LinkedControlTypeEnum.DATE_RANGE) {\n const labels = [linked.control.startLabelKey, linked.control.endLabelKey];\n return linked.keys.map((key, index) => ({\n kind: NodeKindEnum.FIELD,\n key,\n labelKey: labels[index] ?? key,\n control: { type: ControlTypeEnum.DATE },\n }));\n }\n const fields = linked.control.fields;\n return linked.keys.flatMap((key): readonly FieldNode<AnyModel>[] => {\n const def = fields[key];\n return def === undefined\n ? []\n : [\n {\n kind: NodeKindEnum.FIELD,\n key,\n labelKey: def.labelKey,\n control: def.control,\n rules: def.rules,\n span: def.span,\n messages: def.messages,\n serverPaths: def.serverPaths,\n },\n ];\n });\n });\n\n /**\n * L'erreur posée sur `errorTarget` apparaît dès que ce champ est touché, comme la bordure rouge de son wrapper\n * (`showInvalid` = invalide et touché) ; celle du groupe, quand tous les champs liés ont été touchés.\n * Après une soumission, elle apparaît dans les deux cas.\n */\n protected readonly linkedMessage = computed((): FieldMessage | undefined => {\n const linked = this.linked();\n if (linked === undefined) {\n return undefined;\n }\n const linkedId = this.linkedId();\n const target = this.linkedTarget();\n const source: FieldState<unknown> =\n target === undefined ? this.tree()() : this.fieldTreeOf(target)();\n const errors = source\n .errors()\n .filter((error) => 'linkedId' in error && error.linkedId === linkedId);\n const touched =\n target === undefined\n ? linked.keys.every((key) => this.fieldTreeOf(key)().touched())\n : source.touched();\n return RecipeMessages.resolve({\n errors,\n touched,\n submitted: this.context.submitted(),\n fieldMessages: linked.messages,\n recipeMessages: this.context.recipeMessages(),\n });\n });\n\n // ---- array ----\n\n protected readonly array = computed(() => {\n const node = this.node();\n return node.kind === NodeKindEnum.ARRAY ? node : undefined;\n });\n\n protected readonly listState = computed((): FieldState<readonly AnyArrayItem[]> | undefined => {\n const array = this.array();\n if (array === undefined) {\n return undefined;\n }\n const list = this.tree()[array.key];\n return list === undefined\n ? undefined\n : (list() as unknown as FieldState<readonly AnyArrayItem[]>);\n });\n\n protected readonly arrayItems = computed((): readonly FieldTree<AnyModel>[] => {\n const array = this.array();\n if (array === undefined) {\n return [];\n }\n const list = this.tree()[array.key] as unknown as FieldTree<readonly ArrayItem[]> | undefined;\n return list === undefined ? [] : ([...list] as unknown as readonly FieldTree<AnyModel>[]);\n });\n\n protected readonly arrayHidden = computed(() => this.listState()?.hidden() ?? false);\n protected readonly listReadonly = computed(() => this.listState()?.readonly() ?? false);\n protected readonly listId = computed(() => `${this.idPrefix()}-${this.array()?.key ?? ''}`);\n protected readonly listMessageId = computed(() => `${this.listId()}-message`);\n\n /** API du nœud, partagée par ses boutons et par son slot. */\n protected readonly arrayApi = computed((): RecipeArrayApi<AnyArrayItem> | undefined => {\n const array = this.array();\n return array === undefined\n ? undefined\n : RecipeArrays.api(array, () => this.listState(), this.keyGenerator);\n });\n\n private readonly listServerPaths = computed((): readonly string[] => {\n const array = this.array();\n return array === undefined\n ? []\n : RecipeServerPaths.fullPaths(this.serverPrefix(), array.key, array.serverPaths);\n });\n\n private readonly listServerErrors = this.untilListChanges(\n computed(\n () => RecipeServerPaths.errorsFor(this.context.serverErrors(), this.listServerPaths()),\n { equal: RecipeServerPaths.sameErrors },\n ),\n );\n\n /** Erreurs de la liste entière et erreurs serveur qui visent la liste, sous la liste. */\n protected readonly listMessage = computed((): FieldMessage | undefined => {\n const array = this.array();\n const state = this.listState();\n if (array === undefined || state === undefined) {\n return undefined;\n }\n const server = this.listServerErrors();\n const own = state.errors().filter((error) => !('linkedId' in error));\n return RecipeMessages.resolve({\n errors: [...own, ...server],\n touched: state.touched() || server.length > 0,\n submitted: this.context.submitted(),\n fieldMessages: array.messages,\n recipeMessages: this.context.recipeMessages(),\n });\n });\n\n /** Colonnes d'un `array` en table : les nœuds feuilles de `item`, sections et lignes aplaties. */\n protected readonly tableColumns = computed((): readonly FormNode<AnyModel>[] => {\n const array = this.array();\n return array === undefined ? [] : RecipeNodeComponent.leaves(array.item);\n });\n\n protected readonly arraySlotTemplate = computed(\n (): TemplateRef<RecipeSlotContext> | undefined => {\n const slot = this.array()?.slot;\n if (slot === undefined) {\n return undefined;\n }\n const template = this.context.slots().get(slot.name);\n if (template === undefined && isDevMode()) {\n throw new Error(\n `[recipe-forms] slot « ${slot.name} » introuvable : ajoutez <ng-template appRecipeSlot=\"${slot.name}\"> dans <app-recipe-form>`,\n );\n }\n return template;\n },\n );\n\n protected readonly arraySlotContext = computed((): RecipeSlotContext => ({\n $implicit: this.tree()[this.array()?.key ?? ''] as FieldTree<unknown>,\n inputId: this.listId(),\n describedBy: this.listMessage() === undefined ? undefined : this.listMessageId(),\n api: this.arrayApi(),\n }));\n\n protected columnLabel(node: FormNode<AnyModel>): string {\n switch (node.kind) {\n case NodeKindEnum.FIELD:\n return node.labelKey;\n case NodeKindEnum.LINKED:\n return node.legendKey;\n case NodeKindEnum.ARRAY:\n return node.legendKey ?? node.key;\n case NodeKindEnum.SECTION:\n return node.legendKey ?? node.id;\n case NodeKindEnum.SECTION_GROUP:\n return node.id;\n case NodeKindEnum.ROW:\n return '';\n }\n }\n\n protected itemKey(item: FieldTree<AnyModel>): string {\n return String(item().value()['key']);\n }\n\n /** Identifiants HTML d'un élément : `<préfixe>-<array>-<clé>`, jamais la position. */\n protected itemPrefix(item: FieldTree<AnyModel>): string {\n return `${this.listId()}-${this.itemKey(item)}`;\n }\n\n /** Chemin serveur d'un élément : `dates[k3]`, premier chemin de la liste. */\n protected itemServerPrefix(item: FieldTree<AnyModel>): string {\n const [path] = this.listServerPaths();\n return `${path ?? this.array()?.key ?? ''}[${this.itemKey(item)}]`;\n }\n\n protected addItem(): void {\n this.arrayApi()?.addItem();\n }\n\n protected removeItem(key: string): void {\n this.arrayApi()?.removeItem(key);\n }\n\n private untilListChanges(\n source: Signal<readonly RecipeServerValidationError[]>,\n ): Signal<readonly RecipeServerValidationError[]> {\n const receipt = linkedSignal(() => ({\n errors: source(),\n value: untracked(() => this.listState()?.value()),\n }));\n return computed(() => {\n const received = receipt();\n return received.errors.length > 0 && received.value === this.listState()?.value()\n ? received.errors\n : [];\n });\n }\n\n private static leaves(nodes: readonly FormNode<AnyModel>[]): readonly FormNode<AnyModel>[] {\n return nodes.flatMap((node) =>\n node.kind === NodeKindEnum.SECTION || node.kind === NodeKindEnum.ROW\n ? RecipeNodeComponent.leaves(node.nodes)\n : [node],\n );\n }\n}\n","@let n = node();\n@switch (n.kind) {\n @case (kinds.SECTION) {\n @if (!sectionHidden()) {\n <fieldset\n [id]=\"idPrefix() + '-' + n.id\"\n [class]=\"hideLegend() ? 'min-w-0' : 'min-w-0 rounded-lg border border-slate-200 p-4'\"\n >\n @if (n.legendKey; as legendKey) {\n <legend\n [class]=\"hideLegend() ? 'sr-only' : 'px-1 text-base font-semibold text-slate-900'\"\n >\n {{ legendKey | recipeTranslate }}\n </legend>\n }\n <div [class]=\"containerClasses()\">\n @for (child of n.nodes; track $index) {\n <app-recipe-node\n [node]=\"child\"\n [tree]=\"tree()\"\n [idPrefix]=\"idPrefix()\"\n [serverPrefix]=\"serverPrefix()\"\n />\n }\n </div>\n </fieldset>\n }\n }\n @case (kinds.ROW) {\n <div [class]=\"containerClasses()\">\n @for (child of n.nodes; track $index) {\n <app-recipe-node\n [node]=\"child\"\n [tree]=\"tree()\"\n [idPrefix]=\"idPrefix()\"\n [serverPrefix]=\"serverPrefix()\"\n />\n }\n </div>\n }\n @case (kinds.SECTION_GROUP) {\n <app-recipe-section-group\n [node]=\"n\"\n [tree]=\"tree()\"\n [idPrefix]=\"idPrefix()\"\n [serverPrefix]=\"serverPrefix()\"\n />\n }\n @case (kinds.FIELD) {\n <app-recipe-field\n [node]=\"n\"\n [field]=\"fieldTreeOf(n.key)\"\n [idPrefix]=\"idPrefix()\"\n [serverPrefix]=\"serverPrefix()\"\n [hideLabel]=\"hideLabel()\"\n />\n }\n @case (kinds.LINKED) {\n <fieldset\n class=\"min-w-0 rounded-lg border border-slate-200 p-3\"\n [attr.aria-describedby]=\"\n linkedTarget() === undefined && linkedMessage() ? linkedMessageId() : null\n \"\n >\n <legend [class]=\"hideLabel() ? 'sr-only' : 'px-1 text-sm font-semibold text-slate-800'\">\n {{ n.legendKey | recipeTranslate }}\n </legend>\n <div [class]=\"linkedContainerClasses()\">\n @for (fieldNode of linkedFieldNodes(); track fieldNode.key) {\n <app-recipe-field\n [node]=\"fieldNode\"\n [field]=\"fieldTreeOf(fieldNode.key)\"\n [idPrefix]=\"idPrefix()\"\n [serverPrefix]=\"serverPrefix()\"\n [extraMessage]=\"fieldNode.key === linkedTarget() ? linkedMessage() : undefined\"\n [extraDescribedBy]=\"\n linkedTarget() === undefined && linkedMessage() ? linkedMessageId() : undefined\n \"\n />\n }\n </div>\n @if (linkedTarget() === undefined) {\n @if (linkedMessage(); as m) {\n <app-recipe-message\n [id]=\"linkedMessageId()\"\n class=\"mt-2\"\n [severity]=\"severities.DANGER\"\n [inline]=\"true\"\n [text]=\"m.key | recipeTranslate: m.params : m.text\"\n />\n }\n }\n </fieldset>\n }\n @case (kinds.ARRAY) {\n @if (!arrayHidden()) {\n <fieldset\n class=\"min-w-0 rounded-lg border border-slate-200 p-3\"\n [attr.aria-describedby]=\"listMessage() ? listMessageId() : null\"\n >\n @if (n.legendKey; as legendKey) {\n <legend class=\"px-1 text-sm font-semibold text-slate-800\">\n {{ legendKey | recipeTranslate }}\n </legend>\n }\n @if (n.slot?.position === 'before') {\n <ng-container\n [ngTemplateOutlet]=\"arraySlotTemplate()\"\n [ngTemplateOutletContext]=\"arraySlotContext()\"\n />\n }\n @if (n.display === displays.TABLE) {\n <!-- Sur un écran étroit, le tableau défile dans son conteneur au lieu d'élargir la page ou de passer ses en-têtes à la ligne. -->\n <div class=\"overflow-x-auto\">\n <table [id]=\"listId()\" class=\"w-full border-collapse text-sm\">\n <thead>\n <tr class=\"text-left\">\n @for (column of tableColumns(); track $index) {\n <th\n scope=\"col\"\n class=\"px-2 py-1 font-semibold whitespace-nowrap text-slate-800\"\n >\n {{ columnLabel(column) | recipeTranslate }}\n </th>\n }\n @if (n.removable !== false && !listReadonly()) {\n <th scope=\"col\" class=\"px-2 py-1\">\n <span class=\"sr-only\">{{\n n.removeLabelKey ?? 'forms.array.remove' | recipeTranslate\n }}</span>\n </th>\n }\n </tr>\n </thead>\n <tbody>\n @for (item of arrayItems(); track item) {\n <tr class=\"border-t border-slate-100 align-top\">\n @for (column of tableColumns(); track $index) {\n <!-- Un message de la cellule ne compte pas dans la largeur de la colonne : il passe à la ligne. -->\n <td\n class=\"px-2 py-1 [&_app-recipe-message]:w-0 [&_app-recipe-message]:min-w-full\"\n >\n <app-recipe-node\n [node]=\"column\"\n [tree]=\"item\"\n [idPrefix]=\"itemPrefix(item)\"\n [serverPrefix]=\"itemServerPrefix(item)\"\n [hideLabel]=\"true\"\n />\n </td>\n }\n @if (n.removable !== false && !listReadonly()) {\n <td class=\"px-2 py-1 text-right\">\n <app-recipe-button\n [label]=\"n.removeLabelKey ?? 'forms.array.remove' | recipeTranslate\"\n [variant]=\"variants.TEXT\"\n [severity]=\"severities.DANGER\"\n (clicked)=\"removeItem(itemKey(item))\"\n />\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n </div>\n } @else {\n <ol [id]=\"listId()\" class=\"flex flex-col gap-3\">\n @for (item of arrayItems(); track item) {\n <li class=\"flex flex-col gap-3 rounded-md border border-slate-100 bg-slate-50 p-3\">\n <div class=\"flex flex-wrap items-end gap-4\">\n @for (child of n.item; track $index) {\n <app-recipe-node\n [node]=\"child\"\n [tree]=\"item\"\n [idPrefix]=\"itemPrefix(item)\"\n [serverPrefix]=\"itemServerPrefix(item)\"\n />\n }\n </div>\n @if (n.removable !== false && !listReadonly()) {\n <app-recipe-button\n class=\"self-end\"\n [label]=\"n.removeLabelKey ?? 'forms.array.remove' | recipeTranslate\"\n [variant]=\"variants.TEXT\"\n [severity]=\"severities.DANGER\"\n (clicked)=\"removeItem(itemKey(item))\"\n />\n }\n </li>\n }\n </ol>\n }\n @if (n.slot?.position === 'after') {\n <ng-container\n [ngTemplateOutlet]=\"arraySlotTemplate()\"\n [ngTemplateOutletContext]=\"arraySlotContext()\"\n />\n }\n @if (listMessage(); as m) {\n <app-recipe-message\n [id]=\"listMessageId()\"\n class=\"mt-2\"\n [severity]=\"severities.DANGER\"\n [inline]=\"true\"\n [text]=\"m.key | recipeTranslate: m.params : m.text\"\n />\n }\n @if (n.addLabelKey; as addLabelKey) {\n @if (!listReadonly()) {\n <app-recipe-button\n class=\"mt-3 block\"\n [label]=\"addLabelKey | recipeTranslate\"\n [variant]=\"variants.OUTLINED\"\n [severity]=\"severities.SECONDARY\"\n (clicked)=\"addItem()\"\n />\n }\n }\n </fieldset>\n }\n }\n}\n","import {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChildren,\n effect,\n ElementRef,\n inject,\n Injector,\n input,\n output,\n signal,\n untracked,\n} from '@angular/core';\nimport { FieldState, FieldTree } from '@angular/forms/signals';\nimport { RecipeSlotDirective } from '../../directives/recipe-slot.directive';\nimport { AnyModel } from '../../interfaces/any-model.interface';\nimport { FormNode } from '../../interfaces/form-node.interface';\nimport { FormRecipe } from '../../interfaces/form-recipe.interface';\nimport { RecipeServerError } from '../../interfaces/recipe-server-error.interface';\nimport { RecipeServerSnapshot } from '../../interfaces/recipe-server-snapshot.interface';\nimport { RecipeFormContext } from '../../services/recipe-form-context.service';\nimport { RecipeServerPaths } from '../../utils/recipe-server-paths.utils';\nimport { RecipeNodeComponent } from '../recipe-node/recipe-node';\n\n/**\n * Le formulaire : balise `<form>`, soumission, slots et zone d'actions projetée (`[appRecipeActions]`).\n * Le `FieldTree` est créé par l'appelant : `form(signal(model), RecipeSchema.build(recipe))`.\n * `submitted` émet la valeur du modèle, clés techniques comprises : c'est le mapper `*ToDto` qui les ignore ;\n * à cet instant, la correspondance position → clé des `array` est mémorisée pour les erreurs serveur.\n * `serverErrors` et `serverWarnings` (`RecipeServerError`) sont placés par chemin sur les champs ;\n * ce qui ne se place pas sort par `unplacedServerErrors` et `unplacedServerWarnings`, à afficher par l'appelant.\n */\n@Component({\n selector: 'app-recipe-form',\n imports: [RecipeNodeComponent],\n providers: [RecipeFormContext],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <form\n [id]=\"recipe().id\"\n [attr.name]=\"recipe().id\"\n novalidate\n class=\"flex flex-col gap-6\"\n (submit)=\"onSubmit($event)\"\n >\n @for (node of nodes(); track $index) {\n <app-recipe-node [node]=\"node\" [tree]=\"tree()\" [idPrefix]=\"recipe().id\" />\n }\n <div class=\"flex flex-wrap items-center justify-end gap-2\">\n <ng-content select=\"[appRecipeActions]\" />\n </div>\n </form>\n `,\n})\nexport class RecipeFormComponent<TModel extends object> {\n readonly recipe = input.required<FormRecipe<TModel>>();\n readonly form = input.required<FieldTree<TModel>>();\n readonly serverErrors = input<readonly RecipeServerError[]>([]);\n readonly serverWarnings = input<readonly RecipeServerError[]>([]);\n readonly submitted = output<TModel>();\n readonly invalidSubmit = output<void>();\n readonly unplacedServerErrors = output<readonly RecipeServerError[]>();\n readonly unplacedServerWarnings = output<readonly RecipeServerError[]>();\n\n private readonly context = inject(RecipeFormContext);\n private readonly injector = inject(Injector);\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly slotTemplates = contentChildren(RecipeSlotDirective);\n\n protected readonly slotMap = computed(\n () => new Map(this.slotTemplates().map((slot) => [slot.name(), slot.template])),\n );\n protected readonly submitAttempted = signal(false);\n protected readonly submitCount = signal(0);\n protected readonly nodes = computed(\n () => this.recipe().nodes as unknown as readonly FormNode<AnyModel>[],\n );\n protected readonly tree = computed(() => this.form() as unknown as FieldTree<AnyModel>);\n\n /** Clés des éléments d'`array` au moment du dernier `submitted`. */\n private readonly snapshot = signal<RecipeServerSnapshot>(new Map());\n private readonly currentKeys = computed(() =>\n RecipeServerPaths.snapshot(this.nodes(), this.tree()().value()),\n );\n private readonly shapes = computed(() => RecipeServerPaths.shapes(this.nodes()));\n private readonly placedErrors = computed(() =>\n RecipeServerPaths.place(this.serverErrors(), this.shapes(), this.snapshot(), () =>\n this.currentKeys(),\n ),\n );\n private readonly placedWarnings = computed(() =>\n RecipeServerPaths.place(this.serverWarnings(), this.shapes(), this.snapshot(), () =>\n this.currentKeys(),\n ),\n );\n\n constructor() {\n this.context.connect({\n rootTree: this.tree,\n submitted: this.submitAttempted,\n submitCount: this.submitCount,\n recipeMessages: computed(() => this.recipe().messages),\n slots: this.slotMap,\n serverErrors: computed(() => this.placedErrors().placed),\n serverWarnings: computed(() => this.placedWarnings().placed),\n });\n effect(() => {\n this.serverErrors();\n this.unplacedServerErrors.emit(untracked(() => this.placedErrors().unplaced));\n });\n effect(() => {\n this.serverWarnings();\n this.unplacedServerWarnings.emit(untracked(() => this.placedWarnings().unplaced));\n });\n }\n\n /** Après un `reset` du formulaire par l'appelant, les messages redeviennent conditionnés au `touched`. */\n resetSubmitAttempt(): void {\n this.submitAttempted.set(false);\n }\n\n /** Pas de `submit()` de Signal Forms : il renvoie une Promise, que les règles du dépôt interdisent. */\n protected onSubmit(event: Event): void {\n event.preventDefault();\n this.submitAttempted.set(true);\n this.submitCount.update((count) => count + 1);\n const state = this.tree()();\n state.markAsTouched();\n if (state.invalid() || state.pending()) {\n // Le focus attend le rendu : la section du premier champ en erreur vient d'être ouverte.\n afterNextRender(() => this.focusFirstError(state), { injector: this.injector });\n this.invalidSubmit.emit();\n return;\n }\n const value = state.value();\n this.snapshot.set(RecipeServerPaths.snapshot(this.nodes(), value));\n this.submitted.emit(value as unknown as TModel);\n }\n\n /**\n * Focus du premier champ en erreur, puis défilement de son conteneur (libellé, contrôle et messages) au centre de\n * la zone qui défile : ni une barre collante en haut (onglets) ni un pied fixe en bas (modale) ne cachent le champ\n * ou son message. Le conteneur est `app-recipe-field`, ou la liste (`fieldset`) pour un contrôle rendu par le\n * slot d'un `array`. `preventScroll` évite un premier défilement du navigateur au moment du focus.\n */\n private focusFirstError(state: FieldState<AnyModel>): void {\n state.errorSummary()[0]?.fieldTree().focusBoundControl({ preventScroll: true });\n const host = this.host.nativeElement;\n const focused = host.ownerDocument.activeElement;\n const container = focused?.closest('app-recipe-field') ?? focused?.closest('fieldset') ?? null;\n if (container !== null && host.contains(container)) {\n container.scrollIntoView({ block: 'center' });\n }\n }\n}\n"],"mappings":";;;;;;AAAA,IAAY;CAAZ,SAAY,kBAAgB;CAC1B,iBAAA,WAAA;CACA,iBAAA,UAAA;AACF,EAAA,CAHY,qBAAA,mBAAgB,CAAA,EAAA;ACA5B,IAAY;CAAZ,SAAY,gBAAc;CACxB,eAAA,UAAA;CACA,eAAA,QAAA;CACA,eAAA,QAAA;CACA,eAAA,QAAA;CACA,eAAA,QAAA;AACF,EAAA,CANY,mBAAA,iBAAc,CAAA,EAAA;ACA1B,IAAY;CAAZ,SAAY,mBAAiB;CAC3B,kBAAA,YAAA;CACA,kBAAA,cAAA;CACA,kBAAA,UAAA;AACF,EAAA,CAJY,sBAAA,oBAAiB,CAAA,EAAA;ACA7B,IAAY;CAAZ,SAAY,iBAAe;CACzB,gBAAA,UAAA;CACA,gBAAA,YAAA;CACA,gBAAA,YAAA;CACA,gBAAA,UAAA;CACA,gBAAA,mBAAA;CACA,gBAAA,cAAA;CACA,gBAAA,aAAA;CACA,gBAAA,UAAA;AACF,EAAA,CATY,oBAAA,kBAAe,CAAA,EAAA;ACA3B,IAAY;CAAZ,SAAY,uBAAqB;CAC/B,sBAAA,gBAAA;CACA,sBAAA,WAAA;AACF,EAAA,CAHY,0BAAA,wBAAqB,CAAA,EAAA;ACAjC,IAAY;CAAZ,SAAY,cAAY;CACtB,aAAA,mBAAA;CACA,aAAA,aAAA;CACA,aAAA,SAAA;CACA,aAAA,WAAA;CACA,aAAA,YAAA;CACA,aAAA,WAAA;AACF,EAAA,CAPY,iBAAA,eAAY,CAAA,EAAA;ACCxB,IAAY;CAAZ,SAAY,kBAAgB;CAC1B,iBAAA,aAAA;CACA,iBAAA,YAAA;CACA,iBAAA,WAAA;CACA,iBAAA,UAAA;AACF,EAAA,CALY,qBAAA,mBAAgB,CAAA,EAAA;ACD5B,IAAY;CAAZ,SAAY,cAAY;CACtB,aAAA,UAAA;CACA,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,CAAA;EAAA,gBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,WAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,WAAA;EAAA,CAAA;EAAA,eAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,eAAA;EAAA,CAAA;EAAA,sBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,sBAAA;EAAA,CAAA;EAAA,wBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,wBAAA;EAAA,CAAA;EAAA,eAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,GAAA,iBAAA,mBAAmB,GAAA,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
1
+ {"version":3,"file":"ngx-recipe-forms.mjs","names":[],"sources":["../../../projects/recipe-forms/src/lib/enums/array-display.enum.ts","../../../projects/recipe-forms/src/lib/enums/breakpoint.enum.ts","../../../projects/recipe-forms/src/lib/enums/button-variant.enum.ts","../../../projects/recipe-forms/src/lib/enums/control-type.enum.ts","../../../projects/recipe-forms/src/lib/enums/linked-control-type.enum.ts","../../../projects/recipe-forms/src/lib/enums/node-kind.enum.ts","../../../projects/recipe-forms/src/lib/enums/recipe-ui-part.enum.ts","../../../projects/recipe-forms/src/lib/enums/rule-mode.enum.ts","../../../projects/recipe-forms/src/lib/enums/rule-type.enum.ts","../../../projects/recipe-forms/src/lib/enums/section-display.enum.ts","../../../projects/recipe-forms/src/lib/enums/severity.enum.ts","../../../projects/recipe-forms/src/lib/enums/validation-outcome.enum.ts","../../../projects/recipe-forms/src/lib/constants/form-async-defaults.constants.ts","../../../projects/recipe-forms/src/lib/constants/form-error-messages.constants.ts","../../../projects/recipe-forms/src/lib/constants/form-layout-columns.constants.ts","../../../projects/recipe-forms/src/lib/constants/form-layout-order.constants.ts","../../../projects/recipe-forms/src/lib/constants/form-layout-span.constants.ts","../../../projects/recipe-forms/src/lib/constants/form-server-error-kind.constants.ts","../../../projects/recipe-forms/src/lib/constants/form-server-messages-prefix.constants.ts","../../../projects/recipe-forms/src/lib/constants/form-timing-window.constants.ts","../../../projects/recipe-forms/src/lib/constants/form-unknown-error-message.constants.ts","../../../projects/recipe-forms/src/lib/constants/form-validation-unavailable-key.constants.ts","../../../projects/recipe-forms/src/lib/constants/form-validation-unavailable-message.constants.ts","../../../projects/recipe-forms/src/lib/constants/form-warnings-key.constants.ts","../../../projects/recipe-forms/src/lib/constants/recipe-form-default-keys.constants.ts","../../../projects/recipe-forms/src/lib/constants/section-display-defaults.constants.ts","../../../projects/recipe-forms/src/lib/tokens/form-key-generator.token.ts","../../../projects/recipe-forms/src/lib/tokens/form-validation-timing.token.ts","../../../projects/recipe-forms/src/lib/tokens/recipe-form-rx-resource.token.ts","../../../projects/recipe-forms/src/lib/tokens/recipe-form-translation-changes.token.ts","../../../projects/recipe-forms/src/lib/tokens/recipe-form-translator.token.ts","../../../projects/recipe-forms/src/lib/tokens/recipe-form-ui.token.ts","../../../projects/recipe-forms/src/lib/utils/timing-stats.utils.ts","../../../projects/recipe-forms/src/lib/services/in-memory-validation-timing.service.ts","../../../projects/recipe-forms/src/lib/services/recipe-ui-templates.service.ts","../../../projects/recipe-forms/src/lib/utils/recipe-paths.utils.ts","../../../projects/recipe-forms/src/lib/utils/recipe-rule-context.utils.ts","../../../projects/recipe-forms/src/lib/services/recipe-form-context.service.ts","../../../projects/recipe-forms/src/lib/directives/recipe-button.directive.ts","../../../projects/recipe-forms/src/lib/directives/recipe-checkbox-control.directive.ts","../../../projects/recipe-forms/src/lib/directives/recipe-date-control.directive.ts","../../../projects/recipe-forms/src/lib/directives/recipe-date-multiple-control.directive.ts","../../../projects/recipe-forms/src/lib/directives/recipe-message.directive.ts","../../../projects/recipe-forms/src/lib/directives/recipe-number-control.directive.ts","../../../projects/recipe-forms/src/lib/directives/recipe-panel.directive.ts","../../../projects/recipe-forms/src/lib/directives/recipe-select-control.directive.ts","../../../projects/recipe-forms/src/lib/directives/recipe-tabs.directive.ts","../../../projects/recipe-forms/src/lib/directives/recipe-text-control.directive.ts","../../../projects/recipe-forms/src/lib/ui/button/button.ts","../../../projects/recipe-forms/src/lib/ui/checkbox/checkbox.ts","../../../projects/recipe-forms/src/lib/pipes/recipe-translate.pipe.ts","../../../projects/recipe-forms/src/lib/utils/recipe-dates.utils.ts","../../../projects/recipe-forms/src/lib/ui/input-classes.ts","../../../projects/recipe-forms/src/lib/ui/date-picker-multiple/date-picker-multiple.ts","../../../projects/recipe-forms/src/lib/ui/date-picker/date-picker.ts","../../../projects/recipe-forms/src/lib/ui/input-number/input-number.ts","../../../projects/recipe-forms/src/lib/ui/input-text/input-text.ts","../../../projects/recipe-forms/src/lib/ui/message/message.ts","../../../projects/recipe-forms/src/lib/ui/panel/panel.ts","../../../projects/recipe-forms/src/lib/ui/select/select.ts","../../../projects/recipe-forms/src/lib/ui/tabs/tab-panel.directive.ts","../../../projects/recipe-forms/src/lib/ui/tabs/tabs.ts","../../../projects/recipe-forms/src/lib/ui/recipe-default-ui.ts","../../../projects/recipe-forms/src/lib/services/recipe-ui.service.ts","../../../projects/recipe-forms/src/lib/providers/recipe-forms-ui.provider.ts","../../../projects/recipe-forms/src/lib/providers/recipe-forms.provider.ts","../../../projects/recipe-forms/src/lib/utils/recipe-arrays.utils.ts","../../../projects/recipe-forms/src/lib/utils/recipe-async-rule.utils.ts","../../../projects/recipe-forms/src/lib/utils/recipe-builder.utils.ts","../../../projects/recipe-forms/src/lib/utils/recipe-layout.utils.ts","../../../projects/recipe-forms/src/lib/utils/recipe-messages.utils.ts","../../../projects/recipe-forms/src/lib/utils/recipe-schema.utils.ts","../../../projects/recipe-forms/src/lib/utils/recipe-server-paths.utils.ts","../../../projects/recipe-forms/src/lib/utils/recipe-sections.utils.ts","../../../projects/recipe-forms/src/lib/components/recipe-button/recipe-button.ts","../../../projects/recipe-forms/src/lib/components/recipe-message/recipe-message.ts","../../../projects/recipe-forms/src/lib/components/recipe-field/recipe-field.ts","../../../projects/recipe-forms/src/lib/components/recipe-field/recipe-field.html","../../../projects/recipe-forms/src/lib/directives/recipe-slot.directive.ts","../../../projects/recipe-forms/src/lib/components/recipe-panel/recipe-panel.ts","../../../projects/recipe-forms/src/lib/directives/recipe-tab-panel.directive.ts","../../../projects/recipe-forms/src/lib/components/recipe-tabs/recipe-tabs.ts","../../../projects/recipe-forms/src/lib/components/recipe-section-group/recipe-section-group.ts","../../../projects/recipe-forms/src/lib/components/recipe-section-group/recipe-section-group.html","../../../projects/recipe-forms/src/lib/components/recipe-node/recipe-node.ts","../../../projects/recipe-forms/src/lib/components/recipe-node/recipe-node.html","../../../projects/recipe-forms/src/lib/components/recipe-form/recipe-form.ts"],"sourcesContent":["export enum ArrayDisplayEnum {\n TABLE = 'table',\n LIST = 'list',\n}\n","export enum BreakpointEnum {\n BASE = 'base',\n SM = 'sm',\n MD = 'md',\n LG = 'lg',\n XL = 'xl',\n}\n","export enum ButtonVariantEnum {\n FILLED = 'filled',\n OUTLINED = 'outlined',\n TEXT = 'text',\n}\n","export enum ControlTypeEnum {\n TEXT = 'text',\n NUMBER = 'number',\n SELECT = 'select',\n DATE = 'date',\n DATE_MULTIPLE = 'dateMultiple',\n CHECKBOX = 'checkbox',\n DISPLAY = 'display',\n SLOT = 'slot',\n}\n","export enum LinkedControlTypeEnum {\n DATE_RANGE = 'dateRange',\n GROUP = 'group',\n}\n","export enum NodeKindEnum {\n SECTION_GROUP = 'sectionGroup',\n SECTION = 'section',\n ROW = 'row',\n FIELD = 'field',\n LINKED = 'linked',\n ARRAY = 'array',\n}\n","/** Éléments d'interface du moteur rendus par un gabarit du registre, en plus des contrôles. */\nexport enum RecipeUiPartEnum {\n MESSAGE = 'message',\n BUTTON = 'button',\n PANEL = 'panel',\n TABS = 'tabs',\n}\n","export enum RuleModeEnum {\n SYNC = 'sync',\n ASYNC = 'async',\n}\n","export enum RuleTypeEnum {\n REQUIRED = 'required',\n PATTERN = 'pattern',\n MIN = 'min',\n MAX = 'max',\n MIN_LENGTH = 'minLength',\n MAX_LENGTH = 'maxLength',\n MIN_DATE = 'minDate',\n MAX_DATE = 'maxDate',\n EMAIL = 'email',\n VALIDATE = 'validate',\n WARN = 'warn',\n SERVER = 'server',\n DISABLED = 'disabled',\n HIDDEN = 'hidden',\n READONLY = 'readonly',\n MIN_ITEMS = 'minItems',\n MAX_ITEMS = 'maxItems',\n UNIQUE = 'unique',\n}\n","export enum SectionDisplayEnum {\n PLAIN = 'plain',\n PANEL = 'panel',\n TABS = 'tabs',\n}\n","/** Vocabulaire de sévérité courant des design systems, pour qu'un wrapper de l'application hôte le reçoive tel quel. */\nexport enum SeverityEnum {\n PRIMARY = 'primary',\n SECONDARY = 'secondary',\n SUCCESS = 'success',\n INFO = 'info',\n WARNING = 'warn',\n DANGER = 'danger',\n}\n","export enum ValidationOutcomeEnum {\n VALID = 'valid',\n INVALID = 'invalid',\n FAILURE = 'failure',\n CANCELLED = 'cancelled',\n}\n","import { RuleDebounce } from '../interfaces/rule-debounce.interface';\n\n/** Délais par défaut des règles asynchrones : 300 ms pour un champ texte, `'blur'` pour une date. */\nexport const FORM_ASYNC_DEFAULTS: Readonly<{\n text: RuleDebounce;\n date: RuleDebounce;\n other: RuleDebounce;\n}> = {\n text: 300,\n date: 'blur',\n other: 300,\n};\n","/** Type d'erreur → clé i18n par défaut. Les clés doivent exister dans le fichier i18n de l'hôte. */\nexport const FORM_ERROR_MESSAGES: Readonly<Record<string, string>> = {\n required: 'forms.errors.required',\n pattern: 'forms.errors.pattern',\n min: 'forms.errors.min',\n max: 'forms.errors.max',\n minLength: 'forms.errors.minLength',\n maxLength: 'forms.errors.maxLength',\n minDate: 'forms.errors.minDate',\n maxDate: 'forms.errors.maxDate',\n email: 'forms.errors.email',\n minItems: 'forms.errors.minItems',\n maxItems: 'forms.errors.maxItems',\n unique: 'forms.errors.unique',\n};\n","import { BreakpointEnum } from '../enums/breakpoint.enum';\nimport { GridColumns } from '../interfaces/grid-columns.interface';\n\n/** Classes Tailwind complètes et littérales : une classe construite par concaténation ne serait pas générée. */\nexport const FORM_LAYOUT_COLUMNS: Readonly<\n Record<BreakpointEnum, Readonly<Record<GridColumns, string>>>\n> = {\n [BreakpointEnum.BASE]: { 1: 'grid-cols-1', 2: 'grid-cols-2', 3: 'grid-cols-3', 4: 'grid-cols-4' },\n [BreakpointEnum.SM]: {\n 1: 'sm:grid-cols-1',\n 2: 'sm:grid-cols-2',\n 3: 'sm:grid-cols-3',\n 4: 'sm:grid-cols-4',\n },\n [BreakpointEnum.MD]: {\n 1: 'md:grid-cols-1',\n 2: 'md:grid-cols-2',\n 3: 'md:grid-cols-3',\n 4: 'md:grid-cols-4',\n },\n [BreakpointEnum.LG]: {\n 1: 'lg:grid-cols-1',\n 2: 'lg:grid-cols-2',\n 3: 'lg:grid-cols-3',\n 4: 'lg:grid-cols-4',\n },\n [BreakpointEnum.XL]: {\n 1: 'xl:grid-cols-1',\n 2: 'xl:grid-cols-2',\n 3: 'xl:grid-cols-3',\n 4: 'xl:grid-cols-4',\n },\n};\n","import { BreakpointEnum } from '../enums/breakpoint.enum';\nimport { GridOrder } from '../interfaces/grid-order.interface';\n\nexport const FORM_LAYOUT_ORDER: Readonly<\n Record<BreakpointEnum, Readonly<Record<GridOrder, string>>>\n> = {\n [BreakpointEnum.BASE]: {\n 1: 'order-1',\n 2: 'order-2',\n 3: 'order-3',\n 4: 'order-4',\n 5: 'order-5',\n 6: 'order-6',\n },\n [BreakpointEnum.SM]: {\n 1: 'sm:order-1',\n 2: 'sm:order-2',\n 3: 'sm:order-3',\n 4: 'sm:order-4',\n 5: 'sm:order-5',\n 6: 'sm:order-6',\n },\n [BreakpointEnum.MD]: {\n 1: 'md:order-1',\n 2: 'md:order-2',\n 3: 'md:order-3',\n 4: 'md:order-4',\n 5: 'md:order-5',\n 6: 'md:order-6',\n },\n [BreakpointEnum.LG]: {\n 1: 'lg:order-1',\n 2: 'lg:order-2',\n 3: 'lg:order-3',\n 4: 'lg:order-4',\n 5: 'lg:order-5',\n 6: 'lg:order-6',\n },\n [BreakpointEnum.XL]: {\n 1: 'xl:order-1',\n 2: 'xl:order-2',\n 3: 'xl:order-3',\n 4: 'xl:order-4',\n 5: 'xl:order-5',\n 6: 'xl:order-6',\n },\n};\n","import { BreakpointEnum } from '../enums/breakpoint.enum';\nimport { GridSpan } from '../interfaces/grid-span.interface';\n\nexport const FORM_LAYOUT_SPAN: Readonly<\n Record<BreakpointEnum, Readonly<Record<GridSpan, string>>>\n> = {\n [BreakpointEnum.BASE]: { 1: 'col-span-1', 2: 'col-span-2', 3: 'col-span-3', 4: 'col-span-4' },\n [BreakpointEnum.SM]: {\n 1: 'sm:col-span-1',\n 2: 'sm:col-span-2',\n 3: 'sm:col-span-3',\n 4: 'sm:col-span-4',\n },\n [BreakpointEnum.MD]: {\n 1: 'md:col-span-1',\n 2: 'md:col-span-2',\n 3: 'md:col-span-3',\n 4: 'md:col-span-4',\n },\n [BreakpointEnum.LG]: {\n 1: 'lg:col-span-1',\n 2: 'lg:col-span-2',\n 3: 'lg:col-span-3',\n 4: 'lg:col-span-4',\n },\n [BreakpointEnum.XL]: {\n 1: 'xl:col-span-1',\n 2: 'xl:col-span-2',\n 3: 'xl:col-span-3',\n 4: 'xl:col-span-4',\n },\n};\n","/** Type des erreurs serveur posées sur un champ. */\nexport const FORM_SERVER_ERROR_KIND = 'server';\n","/** Clé `errors.<code>` d'une erreur serveur arrivée sans `message`. */\nexport const FORM_SERVER_MESSAGES_PREFIX = 'errors';\n","/** Nombre de durées conservées par validateur dans le collecteur en mémoire (mémoire bornée). */\nexport const FORM_TIMING_WINDOW = 200;\n","export const FORM_UNKNOWN_ERROR_MESSAGE = 'forms.errors.unknown';\n","import { createMetadataKey, MetadataReducer } from '@angular/forms/signals';\n\n/** Métadonnée « validation indisponible » : vraie quand un validateur serveur du champ est en panne. */\nexport const FORM_VALIDATION_UNAVAILABLE = createMetadataKey<boolean, boolean>(\n MetadataReducer.or(),\n);\n","/** Avertissement affiché quand un validateur serveur est en panne : non bloquant. */\nexport const FORM_VALIDATION_UNAVAILABLE_MESSAGE = 'forms.warnings.validationUnavailable';\n","import { createMetadataKey, MetadataReducer } from '@angular/forms/signals';\nimport { RecipeValidationError } from '../interfaces/recipe-validation-error.interface';\n\n/** Métadonnée des avertissements non bloquants d'un champ : liste des résultats des règles `warn`. */\nexport const FORM_WARNINGS = createMetadataKey<\n RecipeValidationError | undefined,\n RecipeValidationError[]\n>(MetadataReducer.list<RecipeValidationError>());\n","/**\n * Toutes les clés i18n que le moteur demande de lui-même, sans qu'une recette les nomme. L'hôte vérifie dans une spec\n * que son dictionnaire (clés mises à plat) contient chacune.\n * Hors liste : les clés des codes serveur (`errors.<code>`, `<scope>.errors.<code>`), qui dépendent du serveur, et les\n * clés nommées par les recettes (`labelKey`, `legendKey`, `hintKey`, `reasonKey`, `messages`…).\n */\nexport const RECIPE_FORM_DEFAULT_KEYS: readonly string[] = [\n // Message par défaut de chaque type d'erreur (`FORM_ERROR_MESSAGES`).\n 'forms.errors.required',\n 'forms.errors.pattern',\n 'forms.errors.min',\n 'forms.errors.max',\n 'forms.errors.minLength',\n 'forms.errors.maxLength',\n 'forms.errors.minDate',\n 'forms.errors.maxDate',\n 'forms.errors.email',\n 'forms.errors.minItems',\n 'forms.errors.maxItems',\n 'forms.errors.unique',\n // Type d'erreur sans clé ni message brut (`FORM_UNKNOWN_ERROR_MESSAGE`).\n 'forms.errors.unknown',\n // Validateur serveur en panne (`FORM_VALIDATION_UNAVAILABLE_MESSAGE`).\n 'forms.warnings.validationUnavailable',\n // Validation serveur en cours (`app-recipe-field`).\n 'forms.pending',\n // Ajout d'une date (calendrier multiple par défaut) ; retrait d'un élément sans `removeLabelKey` (`app-recipe-node`).\n 'forms.array.add',\n 'forms.array.remove',\n // Compteur d'erreurs d'un volet ou d'un onglet, singulier puis pluriel (`app-recipe-section-group`).\n 'forms.display.errorCountOne',\n 'forms.display.errorCount',\n // Bouton de repli d'un volet (`app-recipe-section-group`).\n 'forms.display.collapsePanel',\n 'forms.display.expandPanel',\n];\n","import { SectionDisplayEnum } from '../enums/section-display.enum';\nimport { PanelDisplayOptions } from '../interfaces/panel-display-options.interface';\n\nexport const SECTION_DISPLAY_DEFAULTS: Readonly<{\n [SectionDisplayEnum.PANEL]: Required<Pick<PanelDisplayOptions, 'multiple'>>;\n}> = {\n [SectionDisplayEnum.PANEL]: { multiple: true },\n};\n","import { InjectionToken } from '@angular/core';\n\n/** Générateur des clés techniques des éléments d'`array`. Les tests injectent un générateur déterministe (`k1`, `k2`…). */\nexport const FORM_KEY_GENERATOR = new InjectionToken<() => string>('FORM_KEY_GENERATOR', {\n providedIn: 'root',\n factory: () => () => crypto.randomUUID(),\n});\n","import { InjectionToken } from '@angular/core';\nimport { ValidationTiming } from '../interfaces/validation-timing.interface';\n\n/**\n * Collecteur des temps de réponse, sans effet par défaut (production).\n * `provideRecipeForms({ production: false })` branche le collecteur en mémoire.\n */\nexport const FORM_VALIDATION_TIMING = new InjectionToken<ValidationTiming>(\n 'FORM_VALIDATION_TIMING',\n {\n providedIn: 'root',\n factory: (): ValidationTiming => ({\n record: () => undefined,\n summary: () => [],\n }),\n },\n);\n","import { InjectionToken } from '@angular/core';\nimport { rxResource } from '@angular/core/rxjs-interop';\nimport { RecipeRxResource } from '../interfaces/recipe-rx-resource.interface';\n\n/**\n * Ressource qui appelle le validateur d'une règle `server` (`provideRecipeForms({ rxResource })`). L'hôte y passe son\n * wrapper (qui remonte par exemple les erreurs à son `ErrorHandler`) ; par défaut, `rxResource`.\n */\nexport const RECIPE_FORM_RX_RESOURCE = new InjectionToken<RecipeRxResource>(\n 'RECIPE_FORM_RX_RESOURCE',\n {\n providedIn: 'root',\n factory: () => rxResource,\n },\n);\n","import { InjectionToken, Signal, signal } from '@angular/core';\n\n/**\n * Signal de l'hôte qui change à chaque chargement ou changement de traductions (par exemple les événements de\n * Transloco, scope chargé en différé ou langue changée). Les textes que le moteur traduit hors d'un gabarit (titres\n * d'onglets, textes des compteurs d'erreurs, options `labelKey` d'un `select`) et le pipe `recipeTranslate` le lisent\n * avant d'appeler le traducteur : ils se recalculent à chaque chargement. Par défaut, un signal constant : ces textes\n * ne sont traduits qu'au rendu et quand leurs propres données changent.\n */\nexport const RECIPE_FORM_TRANSLATION_CHANGES = new InjectionToken<Signal<unknown>>(\n 'RECIPE_FORM_TRANSLATION_CHANGES',\n {\n providedIn: 'root',\n factory: (): Signal<unknown> => signal<unknown>(undefined).asReadonly(),\n },\n);\n","import { InjectionToken } from '@angular/core';\nimport { RecipeTranslator } from '../interfaces/recipe-translator.interface';\n\n/** L'hôte fournit son service i18n (Transloco, par exemple). Par défaut, la clé est affichée telle quelle. */\nexport const RECIPE_FORM_TRANSLATOR = new InjectionToken<RecipeTranslator>(\n 'RECIPE_FORM_TRANSLATOR',\n {\n providedIn: 'root',\n factory: (): RecipeTranslator => (key) => key,\n },\n);\n","import { InjectionToken, Type } from '@angular/core';\n\n/**\n * Composant de gabarits de l'hôte (`provideRecipeForms({ ui })`) : il déclare un `<ng-template appRecipeTextControl>`\n * par contrôle à rendre avec son design system. Un contrôle qu'il ne déclare pas garde le gabarit par défaut.\n */\nexport const RECIPE_FORM_UI = new InjectionToken<Type<unknown> | undefined>('RECIPE_FORM_UI', {\n providedIn: 'root',\n factory: () => undefined,\n});\n","/** Statistiques pures sur des durées. Liste vide → 0. */\nexport class TimingStats {\n static median(values: readonly number[]): number {\n return TimingStats.percentile(values, 50);\n }\n\n /** Centile par rang le plus proche : `p` entre 0 et 100. */\n static percentile(values: readonly number[], p: number): number {\n if (values.length === 0) {\n return 0;\n }\n const sorted = [...values].sort((a, b) => a - b);\n const rank = Math.ceil((p / 100) * sorted.length);\n const index = Math.min(sorted.length - 1, Math.max(0, rank - 1));\n return sorted[index];\n }\n\n static max(values: readonly number[]): number {\n return values.length === 0 ? 0 : Math.max(...values);\n }\n}\n","import { Service } from '@angular/core';\nimport { FORM_TIMING_WINDOW } from '../constants/form-timing-window.constants';\nimport { ValidationOutcomeEnum } from '../enums/validation-outcome.enum';\nimport { ValidationTiming } from '../interfaces/validation-timing.interface';\nimport { ValidationTimingSummary } from '../interfaces/validation-timing-summary.interface';\nimport { TimingStats } from '../utils/timing-stats.utils';\n\ninterface TimingEntry {\n readonly durations: number[];\n calls: number;\n failures: number;\n cancelled: number;\n}\n\n/**\n * Collecteur hors production : agrégats par validateur dans le navigateur, jamais les valeurs saisies.\n * Mémoire bornée aux `FORM_TIMING_WINDOW` dernières durées par validateur.\n */\n@Service({ autoProvided: false })\nexport class InMemoryValidationTiming implements ValidationTiming {\n private readonly entries = new Map<string, TimingEntry>();\n\n record(validator: string, durationMs: number, outcome: ValidationOutcomeEnum): void {\n const entry = this.entries.get(validator) ?? {\n durations: [],\n calls: 0,\n failures: 0,\n cancelled: 0,\n };\n entry.calls += 1;\n if (outcome === ValidationOutcomeEnum.CANCELLED) {\n entry.cancelled += 1;\n } else {\n if (outcome === ValidationOutcomeEnum.FAILURE) {\n entry.failures += 1;\n }\n entry.durations.push(durationMs);\n if (entry.durations.length > FORM_TIMING_WINDOW) {\n entry.durations.shift();\n }\n }\n this.entries.set(validator, entry);\n }\n\n summary(): readonly ValidationTimingSummary[] {\n return [...this.entries.entries()].map(([validator, entry]) => ({\n validator,\n calls: entry.calls,\n medianMs: Math.round(TimingStats.median(entry.durations)),\n p95Ms: Math.round(TimingStats.percentile(entry.durations, 95)),\n maxMs: Math.round(TimingStats.max(entry.durations)),\n failures: entry.failures,\n cancelled: entry.cancelled,\n }));\n }\n\n /** Affiche le résumé en tableau dans la console du navigateur. */\n logSummary(): void {\n console.table(this.summary());\n }\n}\n","import { Service, TemplateRef } from '@angular/core';\nimport { RecipeUiTemplateType } from '../interfaces/recipe-ui-template-type.interface';\n\n/**\n * Gabarits enregistrés par les directives `appRecipe…` à leur création ; le dernier enregistré pour un type\n * l'emporte. Le registre (`RecipeUi`) crée le composant par défaut, puis celui de l'hôte.\n */\n@Service()\nexport class RecipeUiTemplates {\n private readonly templates = new Map<RecipeUiTemplateType, TemplateRef<unknown>>();\n\n register(type: RecipeUiTemplateType, template: TemplateRef<unknown>): void {\n this.templates.set(type, template);\n }\n\n get(type: RecipeUiTemplateType): TemplateRef<unknown> | undefined {\n return this.templates.get(type);\n }\n}\n","import { PathKind, SchemaPath, SchemaPathRules, SchemaPathTree } from '@angular/forms/signals';\nimport { AnyModel } from '../interfaces/any-model.interface';\n\nexport type AnySchemaPath = SchemaPath<unknown, SchemaPathRules.Supported, PathKind>;\nexport type AnySchemaPathTree = SchemaPathTree<AnyModel, PathKind>;\n\n/**\n * Accès dynamique aux chemins Signal Forms. Les transtypages du moteur sont confinés ici, pour contenir le risque\n * d'un accès dynamique par clé.\n */\nexport class RecipePaths {\n static child(path: AnySchemaPathTree, key: string): AnySchemaPath {\n const child = path[key];\n if (child === undefined) {\n throw new Error(`[recipe-forms] la clé « ${key} » n'existe pas dans le modèle du formulaire`);\n }\n return child;\n }\n\n static tree(path: AnySchemaPath): AnySchemaPathTree {\n return path as AnySchemaPathTree;\n }\n\n static asString(path: AnySchemaPath): SchemaPath<string, SchemaPathRules.Supported, PathKind> {\n return path as SchemaPath<string, SchemaPathRules.Supported, PathKind>;\n }\n\n static asNumber(\n path: AnySchemaPath,\n ): SchemaPath<number | null, SchemaPathRules.Supported, PathKind> {\n return path as SchemaPath<number | null, SchemaPathRules.Supported, PathKind>;\n }\n\n static asDate(path: AnySchemaPath): SchemaPath<Date | null, SchemaPathRules.Supported, PathKind> {\n return path as SchemaPath<Date | null, SchemaPathRules.Supported, PathKind>;\n }\n\n static asList(\n path: AnySchemaPath,\n ): SchemaPath<readonly unknown[], SchemaPathRules.Supported, PathKind> {\n return path as SchemaPath<readonly unknown[], SchemaPathRules.Supported, PathKind>;\n }\n}\n","import { isDevMode } from '@angular/core';\nimport { FieldContext, FieldTree, PathKind } from '@angular/forms/signals';\nimport { AnyModel } from '../interfaces/any-model.interface';\nimport { RecipeRuleContext } from '../interfaces/recipe-rule-context.interface';\nimport { AnySchemaPathTree, RecipePaths } from './recipe-paths.utils';\n\ntype AnyFieldContext = FieldContext<unknown, PathKind>;\n\n/**\n * Construit le contexte reçu par les règles de la recette.\n * Dans le schéma, `root(key)` passe par `ctx.valueOf` du chemin racine : la règle est réévaluée quand la valeur change,\n * y compris depuis un élément d'`array` (`applyEach`). Au rendu, il lit le `FieldTree` de la racine.\n */\nexport class RecipeRuleContexts {\n static fromField(root: AnySchemaPathTree, ctx: AnyFieldContext): RecipeRuleContext<AnyModel> {\n return {\n root: (key) => ctx.valueOf(RecipePaths.child(root, String(key))),\n };\n }\n\n static fromTree(tree: FieldTree<AnyModel>): RecipeRuleContext<AnyModel> {\n return {\n root: (key) => {\n const child = tree[String(key)];\n return child === undefined ? undefined : child().value();\n },\n };\n }\n\n /**\n * Lecture des clés de `dependsOn` d'une règle `server`, dans le contexte Signal Forms du champ : appelée dans les\n * paramètres de `validateAsync`, elle fait relancer l'appel quand l'une de ces valeurs change.\n */\n static dependencies(\n root: AnySchemaPathTree,\n keys: readonly PropertyKey[] | undefined,\n ): ((ctx: AnyFieldContext) => Readonly<Record<string, unknown>>) | undefined {\n if (keys === undefined || keys.length === 0) {\n return undefined;\n }\n return (ctx) => {\n const context = RecipeRuleContexts.fromField(root, ctx);\n return Object.fromEntries(keys.map((key) => [String(key), context.root(String(key))]));\n };\n }\n\n /**\n * Contexte d'un validateur serveur : `root(key)` rend la valeur lue avec les paramètres de l'appel. Une clé absente\n * de `dependsOn` lève une erreur (l'appel échoue en panne) plutôt que de valider avec une valeur non suivie.\n */\n static fromDependencies(\n values: Readonly<Record<string, unknown>>,\n rule: string,\n ): RecipeRuleContext<AnyModel> {\n return {\n root: (key) => {\n const name = String(key);\n if (!Object.hasOwn(values, name)) {\n const message = `[recipe-forms] règle server « ${rule} » : ctx.root('${name}') est lu sans figurer dans dependsOn`;\n if (isDevMode()) {\n console.error(message);\n }\n throw new Error(message);\n }\n return values[name];\n },\n };\n }\n}\n","import { computed, Service, signal, TemplateRef } from '@angular/core';\nimport { FieldTree } from '@angular/forms/signals';\nimport { AnyModel } from '../interfaces/any-model.interface';\nimport { RecipeFormContextSource } from '../interfaces/recipe-form-context-source.interface';\nimport { RecipeRuleContext } from '../interfaces/recipe-rule-context.interface';\nimport { RecipeServerValidationError } from '../interfaces/recipe-server-validation-error.interface';\nimport { RecipeSlotContext } from '../interfaces/recipe-slot-context.interface';\nimport { RecipeRuleContexts } from '../utils/recipe-rule-context.utils';\n\nconst EMPTY_SERVER: ReadonlyMap<string, readonly RecipeServerValidationError[]> = new Map();\nconst EMPTY_SLOTS: ReadonlyMap<string, TemplateRef<RecipeSlotContext>> = new Map();\nconst NO_ROOT: RecipeRuleContext<AnyModel> = { root: () => undefined };\n\n/**\n * État d'un formulaire partagé avec ses nœuds, fourni par `app-recipe-form` (`providers`) et connecté dans\n * son constructeur : racine du `FieldTree`, tentative de soumission, messages, slots, erreurs et avertissements\n * serveur placés par chemin.\n */\n@Service({ autoProvided: false })\nexport class RecipeFormContext {\n private readonly source = signal<RecipeFormContextSource | undefined>(undefined);\n\n readonly rootTree = computed((): FieldTree<AnyModel> | undefined => this.source()?.rootTree());\n readonly submitted = computed((): boolean => this.source()?.submitted() ?? false);\n readonly submitCount = computed((): number => this.source()?.submitCount() ?? 0);\n readonly recipeMessages = computed(() => this.source()?.recipeMessages());\n readonly slots = computed(() => this.source()?.slots() ?? EMPTY_SLOTS);\n readonly serverErrors = computed(() => this.source()?.serverErrors() ?? EMPTY_SERVER);\n readonly serverWarnings = computed(() => this.source()?.serverWarnings() ?? EMPTY_SERVER);\n /** Contexte des conditions évaluées au rendu (`hidden`/`readonly` d'une section). */\n readonly ruleContext = computed((): RecipeRuleContext<AnyModel> => {\n const tree = this.rootTree();\n return tree === undefined ? NO_ROOT : RecipeRuleContexts.fromTree(tree);\n });\n\n connect(source: RecipeFormContextSource): void {\n this.source.set(source);\n }\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\nimport { RecipeUiPartEnum } from '../enums/recipe-ui-part.enum';\nimport { RecipeButtonContext } from '../interfaces/recipe-button-context.interface';\nimport { RecipeUiTemplates } from '../services/recipe-ui-templates.service';\n\n/** Gabarit d'un bouton d'ajout ou de retrait d'un élément d'`array` : `let-label let-click=\"click\" …`. */\n@Directive({ selector: 'ng-template[appRecipeButton]' })\nexport class RecipeButtonDirective {\n constructor() {\n inject(RecipeUiTemplates).register(RecipeUiPartEnum.BUTTON, inject(TemplateRef));\n }\n\n static ngTemplateContextGuard(\n _directive: RecipeButtonDirective,\n context: unknown,\n ): context is RecipeButtonContext {\n return typeof context === 'object' && context !== null && '$implicit' in context;\n }\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\nimport { ControlTypeEnum } from '../enums/control-type.enum';\nimport { RecipeCheckboxControlContext } from '../interfaces/recipe-checkbox-control-context.interface';\nimport { RecipeUiTemplates } from '../services/recipe-ui-templates.service';\n\n/** Gabarit d'un contrôle `checkbox`. */\n@Directive({ selector: 'ng-template[appRecipeCheckboxControl]' })\nexport class RecipeCheckboxControlDirective {\n constructor() {\n inject(RecipeUiTemplates).register(ControlTypeEnum.CHECKBOX, inject(TemplateRef));\n }\n\n static ngTemplateContextGuard(\n _directive: RecipeCheckboxControlDirective,\n context: unknown,\n ): context is RecipeCheckboxControlContext {\n return typeof context === 'object' && context !== null && '$implicit' in context;\n }\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\nimport { ControlTypeEnum } from '../enums/control-type.enum';\nimport { RecipeControlContext } from '../interfaces/recipe-control-context.interface';\nimport { RecipeUiTemplates } from '../services/recipe-ui-templates.service';\n\n/** Gabarit d'un contrôle `date`. */\n@Directive({ selector: 'ng-template[appRecipeDateControl]' })\nexport class RecipeDateControlDirective {\n constructor() {\n inject(RecipeUiTemplates).register(ControlTypeEnum.DATE, inject(TemplateRef));\n }\n\n static ngTemplateContextGuard(\n _directive: RecipeDateControlDirective,\n context: unknown,\n ): context is RecipeControlContext<Date | null> {\n return typeof context === 'object' && context !== null && '$implicit' in context;\n }\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\nimport { ControlTypeEnum } from '../enums/control-type.enum';\nimport { RecipeDateMultipleControlContext } from '../interfaces/recipe-date-multiple-control-context.interface';\nimport { RecipeUiTemplates } from '../services/recipe-ui-templates.service';\n\n/** Gabarit d'un contrôle `dateMultiple` ; `ariaLabel` nomme le calendrier. */\n@Directive({ selector: 'ng-template[appRecipeDateMultipleControl]' })\nexport class RecipeDateMultipleControlDirective {\n constructor() {\n inject(RecipeUiTemplates).register(ControlTypeEnum.DATE_MULTIPLE, inject(TemplateRef));\n }\n\n static ngTemplateContextGuard(\n _directive: RecipeDateMultipleControlDirective,\n context: unknown,\n ): context is RecipeDateMultipleControlContext {\n return typeof context === 'object' && context !== null && '$implicit' in context;\n }\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\nimport { RecipeUiPartEnum } from '../enums/recipe-ui-part.enum';\nimport { RecipeMessageContext } from '../interfaces/recipe-message-context.interface';\nimport { RecipeUiTemplates } from '../services/recipe-ui-templates.service';\n\n/** Gabarit d'un message (erreur, avertissement, attente) : `<ng-template appRecipeMessage let-text let-severity=\"severity\" …>`. */\n@Directive({ selector: 'ng-template[appRecipeMessage]' })\nexport class RecipeMessageDirective {\n constructor() {\n inject(RecipeUiTemplates).register(RecipeUiPartEnum.MESSAGE, inject(TemplateRef));\n }\n\n static ngTemplateContextGuard(\n _directive: RecipeMessageDirective,\n context: unknown,\n ): context is RecipeMessageContext {\n return typeof context === 'object' && context !== null && '$implicit' in context;\n }\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\nimport { ControlTypeEnum } from '../enums/control-type.enum';\nimport { RecipeNumberControlContext } from '../interfaces/recipe-number-control-context.interface';\nimport { RecipeUiTemplates } from '../services/recipe-ui-templates.service';\n\n/** Gabarit d'un contrôle `number`. */\n@Directive({ selector: 'ng-template[appRecipeNumberControl]' })\nexport class RecipeNumberControlDirective {\n constructor() {\n inject(RecipeUiTemplates).register(ControlTypeEnum.NUMBER, inject(TemplateRef));\n }\n\n static ngTemplateContextGuard(\n _directive: RecipeNumberControlDirective,\n context: unknown,\n ): context is RecipeNumberControlContext {\n return typeof context === 'object' && context !== null && '$implicit' in context;\n }\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\nimport { RecipeUiPartEnum } from '../enums/recipe-ui-part.enum';\nimport { RecipePanelContext } from '../interfaces/recipe-panel-context.interface';\nimport { RecipeUiTemplates } from '../services/recipe-ui-templates.service';\n\n/** Gabarit d'un volet : `let-content` est le contenu à rendre par `ngTemplateOutlet` dans le volet. */\n@Directive({ selector: 'ng-template[appRecipePanel]' })\nexport class RecipePanelDirective {\n constructor() {\n inject(RecipeUiTemplates).register(RecipeUiPartEnum.PANEL, inject(TemplateRef));\n }\n\n static ngTemplateContextGuard(\n _directive: RecipePanelDirective,\n context: unknown,\n ): context is RecipePanelContext {\n return typeof context === 'object' && context !== null && '$implicit' in context;\n }\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\nimport { ControlTypeEnum } from '../enums/control-type.enum';\nimport { RecipeSelectControlContext } from '../interfaces/recipe-select-control-context.interface';\nimport { RecipeUiTemplates } from '../services/recipe-ui-templates.service';\n\n/** Gabarit d'un contrôle `select` ; `options` arrivent au `label` déjà traduit. */\n@Directive({ selector: 'ng-template[appRecipeSelectControl]' })\nexport class RecipeSelectControlDirective {\n constructor() {\n inject(RecipeUiTemplates).register(ControlTypeEnum.SELECT, inject(TemplateRef));\n }\n\n static ngTemplateContextGuard(\n _directive: RecipeSelectControlDirective,\n context: unknown,\n ): context is RecipeSelectControlContext {\n return typeof context === 'object' && context !== null && '$implicit' in context;\n }\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\nimport { RecipeUiPartEnum } from '../enums/recipe-ui-part.enum';\nimport { RecipeTabsContext } from '../interfaces/recipe-tabs-context.interface';\nimport { RecipeUiTemplates } from '../services/recipe-ui-templates.service';\n\n/** Gabarit des onglets : `let-panels` donne un panneau par section, à rendre sans jamais le détruire. */\n@Directive({ selector: 'ng-template[appRecipeTabs]' })\nexport class RecipeTabsDirective {\n constructor() {\n inject(RecipeUiTemplates).register(RecipeUiPartEnum.TABS, inject(TemplateRef));\n }\n\n static ngTemplateContextGuard(\n _directive: RecipeTabsDirective,\n context: unknown,\n ): context is RecipeTabsContext {\n return typeof context === 'object' && context !== null && '$implicit' in context;\n }\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\nimport { ControlTypeEnum } from '../enums/control-type.enum';\nimport { RecipeTextControlContext } from '../interfaces/recipe-text-control-context.interface';\nimport { RecipeUiTemplates } from '../services/recipe-ui-templates.service';\n\n/** Gabarit d'un contrôle `text` : `<ng-template appRecipeTextControl let-field let-inputId=\"inputId\" …>`. */\n@Directive({ selector: 'ng-template[appRecipeTextControl]' })\nexport class RecipeTextControlDirective {\n constructor() {\n inject(RecipeUiTemplates).register(ControlTypeEnum.TEXT, inject(TemplateRef));\n }\n\n static ngTemplateContextGuard(\n _directive: RecipeTextControlDirective,\n context: unknown,\n ): context is RecipeTextControlContext {\n return typeof context === 'object' && context !== null && '$implicit' in context;\n }\n}\n","import { ChangeDetectionStrategy, Component, computed, input, output } from '@angular/core';\nimport { ButtonVariantEnum } from '../../enums/button-variant.enum';\nimport { SeverityEnum } from '../../enums/severity.enum';\n\nconst BASE =\n 'inline-flex items-center justify-center gap-2 rounded-md px-3 py-1.5 text-sm font-medium focus:outline-none ' +\n 'focus:ring-2 focus:ring-sky-500 disabled:cursor-not-allowed disabled:opacity-50';\nconst FILLED: Readonly<Record<SeverityEnum, string>> = {\n [SeverityEnum.PRIMARY]: 'bg-sky-700 text-white hover:bg-sky-800',\n [SeverityEnum.SECONDARY]: 'bg-slate-600 text-white hover:bg-slate-700',\n [SeverityEnum.SUCCESS]: 'bg-emerald-700 text-white hover:bg-emerald-800',\n [SeverityEnum.INFO]: 'bg-cyan-700 text-white hover:bg-cyan-800',\n [SeverityEnum.WARNING]: 'bg-amber-600 text-white hover:bg-amber-700',\n [SeverityEnum.DANGER]: 'bg-red-700 text-white hover:bg-red-800',\n};\nconst OUTLINED: Readonly<Record<SeverityEnum, string>> = {\n [SeverityEnum.PRIMARY]: 'border border-sky-700 text-sky-800 hover:bg-sky-50',\n [SeverityEnum.SECONDARY]: 'border border-slate-400 text-slate-800 hover:bg-slate-50',\n [SeverityEnum.SUCCESS]: 'border border-emerald-700 text-emerald-800 hover:bg-emerald-50',\n [SeverityEnum.INFO]: 'border border-cyan-700 text-cyan-800 hover:bg-cyan-50',\n [SeverityEnum.WARNING]: 'border border-amber-600 text-amber-800 hover:bg-amber-50',\n [SeverityEnum.DANGER]: 'border border-red-700 text-red-800 hover:bg-red-50',\n};\nconst TEXT: Readonly<Record<SeverityEnum, string>> = {\n [SeverityEnum.PRIMARY]: 'text-sky-800 underline hover:bg-sky-50',\n [SeverityEnum.SECONDARY]: 'text-slate-800 underline hover:bg-slate-50',\n [SeverityEnum.SUCCESS]: 'text-emerald-800 underline hover:bg-emerald-50',\n [SeverityEnum.INFO]: 'text-cyan-800 underline hover:bg-cyan-50',\n [SeverityEnum.WARNING]: 'text-amber-800 underline hover:bg-amber-50',\n [SeverityEnum.DANGER]: 'text-red-800 underline hover:bg-red-50',\n};\n\n/**\n * Wrapper par défaut d'un bouton ; l'application hôte peut le remplacer par celui de son design system, de même\n * sélecteur et de mêmes entrées.\n */\n@Component({\n selector: 'app-button',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <button\n [type]=\"type()\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [class]=\"classes()\"\n (click)=\"clicked.emit()\"\n >\n {{ label() }}<ng-content />\n </button>\n `,\n})\nexport class ButtonComponent {\n readonly label = input<string>();\n readonly type = input<'button' | 'submit'>('button');\n readonly disabled = input(false);\n readonly severity = input<SeverityEnum>(SeverityEnum.PRIMARY);\n readonly variant = input<ButtonVariantEnum>(ButtonVariantEnum.FILLED);\n readonly ariaLabel = input<string>();\n readonly clicked = output<void>();\n\n protected readonly classes = computed((): string => {\n const table =\n this.variant() === ButtonVariantEnum.OUTLINED\n ? OUTLINED\n : this.variant() === ButtonVariantEnum.TEXT\n ? TEXT\n : FILLED;\n return `${BASE} ${table[this.severity()]}`;\n });\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n input,\n model,\n output,\n ElementRef,\n viewChild,\n} from '@angular/core';\nimport { FormCheckboxControl } from '@angular/forms/signals';\n\n/**\n * Wrapper par défaut d'une case à cocher, `FormCheckboxControl` ; l'application hôte peut le remplacer par celui de son\n * design system. En lecture seule, la case reste focalisable, porte `aria-readonly` et ne change jamais d'état.\n */\n@Component({\n selector: 'app-checkbox',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <input\n #control\n type=\"checkbox\"\n [id]=\"inputId()\"\n [attr.name]=\"name()\"\n [attr.aria-invalid]=\"invalid() && touched() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy() ?? null\"\n [attr.aria-readonly]=\"readonly() ? 'true' : null\"\n [disabled]=\"disabled()\"\n [checked]=\"checked()\"\n class=\"h-4 w-4 rounded border-slate-300 text-sky-600 focus:ring-2 focus:ring-sky-500 disabled:cursor-not-allowed\"\n [class.cursor-default]=\"readonly()\"\n (click)=\"onClick($event)\"\n (change)=\"onChange($event)\"\n (blur)=\"touch.emit()\"\n />\n `,\n})\nexport class CheckboxComponent implements FormCheckboxControl {\n readonly checked = model<boolean>(false);\n readonly inputId = input<string>('');\n readonly name = input<string>('');\n readonly disabled = input<boolean>(false);\n readonly readonly = input<boolean>(false);\n readonly invalid = input<boolean>(false);\n readonly touched = input<boolean>(false);\n readonly describedBy = input<string>();\n readonly touch = output<void>();\n\n private readonly control = viewChild.required<ElementRef<HTMLInputElement>>('control');\n\n /** Focus du contrôle natif pour `focusBoundControl` (premier champ en erreur à la soumission). */\n focus(options?: FocusOptions): void {\n this.control().nativeElement.focus(options);\n }\n\n /** Un clic annulé ne coche pas la case native ; il couvre aussi le libellé et la touche Espace, qui cliquent la case. */\n protected onClick(event: Event): void {\n if (this.readonly()) {\n event.preventDefault();\n }\n }\n\n protected onChange(event: Event): void {\n this.checked.set((event.target as HTMLInputElement).checked);\n }\n}\n","import { inject, Pipe, PipeTransform } from '@angular/core';\nimport { RECIPE_FORM_TRANSLATION_CHANGES } from '../tokens/recipe-form-translation-changes.token';\nimport { RECIPE_FORM_TRANSLATOR } from '../tokens/recipe-form-translator.token';\n\n/**\n * `{{ 'forms.errors.required' | recipeTranslate }}` : traduit par le service fourni à `RECIPE_FORM_TRANSLATOR`.\n * Impur : l'hôte peut charger ses scopes de traduction en différé.\n * Il lit `RECIPE_FORM_TRANSLATION_CHANGES` : un composant `OnPush` d'une application sans zone n'est revérifié qu'à un\n * changement qui le concerne, et le chargement d'un scope en devient un.\n * `fallback` est rendu quand la clé est inconnue du traducteur (message brut d'une erreur serveur).\n */\n@Pipe({ name: 'recipeTranslate', pure: false })\nexport class RecipeTranslatePipe implements PipeTransform {\n private readonly translator = inject(RECIPE_FORM_TRANSLATOR);\n private readonly translationChanges = inject(RECIPE_FORM_TRANSLATION_CHANGES);\n\n transform(\n key: string | undefined,\n params?: Readonly<Record<string, unknown>>,\n fallback?: string,\n ): string {\n this.translationChanges();\n if (key === undefined) {\n return fallback ?? '';\n }\n const text = this.translator(key, params);\n return text === key && fallback !== undefined ? fallback : text;\n }\n}\n","/**\n * Conversion entre `Date` et la valeur d'un `<input type=\"date\">`, à partir des composantes locales :\n * ni `toISOString`, ni passage par l'UTC, pour que le jour affiché soit le jour saisi.\n */\nexport class RecipeDates {\n static toInputValue(date: Date | null): string {\n if (date === null || Number.isNaN(date.getTime())) {\n return '';\n }\n const month = String(date.getMonth() + 1).padStart(2, '0');\n const day = String(date.getDate()).padStart(2, '0');\n return `${date.getFullYear()}-${month}-${day}`;\n }\n\n static fromInputValue(value: string): Date | null {\n const match = /^(\\d{4})-(\\d{2})-(\\d{2})$/.exec(value);\n if (match === null) {\n return null;\n }\n return new Date(Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n }\n\n /** Même jour civil (composantes locales), pour retrouver une date dans une liste sans comparer les heures. */\n static sameDay(a: Date, b: Date): boolean {\n return (\n a.getFullYear() === b.getFullYear() &&\n a.getMonth() === b.getMonth() &&\n a.getDate() === b.getDate()\n );\n }\n}\n","/** Classes Tailwind partagées par les wrappers par défaut (complètes et littérales). */\nexport const APP_INPUT_CLASSES =\n 'w-full rounded-md border border-slate-300 bg-white px-3 py-2 text-sm text-slate-900 shadow-sm ' +\n 'focus:outline-none focus:ring-2 focus:ring-sky-500 disabled:cursor-not-allowed disabled:bg-slate-100 ' +\n 'read-only:bg-slate-50 aria-invalid:border-red-600 aria-invalid:ring-red-200';\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n input,\n model,\n output,\n signal,\n ElementRef,\n viewChild,\n} from '@angular/core';\nimport { FormValueControl } from '@angular/forms/signals';\nimport { ButtonVariantEnum } from '../../enums/button-variant.enum';\nimport { SeverityEnum } from '../../enums/severity.enum';\nimport { RecipeTranslatePipe } from '../../pipes/recipe-translate.pipe';\nimport { RecipeDates } from '../../utils/recipe-dates.utils';\nimport { ButtonComponent } from '../button/button';\nimport { APP_INPUT_CLASSES } from '../input-classes';\n\n/**\n * Wrapper par défaut d'une sélection de plusieurs dates, `FormValueControl<readonly Date[]>` ; l'application hôte\n * peut le remplacer par un calendrier de son design system, de même contrat : `value`, `maxDate`,\n * `numberOfMonths`, `ariaLabel` et `describedBy`, sorties `dateAdded` et `dateRemoved` à chaque jour coché ou décoché,\n * méthode `focus()`.\n * Les dates sont gardées dans l'ordre chronologique ; ajouter une date déjà présente la retire. Sans `maxDate`, aucune date n'est exclue. Les boutons sont nommés par `forms.array.add` et\n * `forms.array.remove`.\n */\n@Component({\n selector: 'app-date-picker-multiple',\n imports: [ButtonComponent, RecipeTranslatePipe],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'flex flex-col gap-2', role: 'group', '[attr.aria-label]': 'ariaLabel() ?? null' },\n template: `\n <div class=\"flex items-end gap-2\">\n <input\n #control\n type=\"date\"\n [id]=\"inputId()\"\n [attr.name]=\"name()\"\n [attr.max]=\"maxInputValue()\"\n [attr.aria-invalid]=\"invalid() && touched() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy() ?? null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [value]=\"draft()\"\n [class]=\"classes\"\n (input)=\"draft.set($any($event.target).value)\"\n (keydown.enter)=\"$event.preventDefault(); add()\"\n (blur)=\"touch.emit()\"\n />\n <app-button\n [label]=\"'forms.array.add' | recipeTranslate\"\n [variant]=\"variants.OUTLINED\"\n [severity]=\"severities.SECONDARY\"\n [disabled]=\"disabled() || readonly() || draft() === ''\"\n (clicked)=\"add()\"\n />\n </div>\n @if (items().length > 0) {\n <ul class=\"flex flex-wrap gap-2\" [attr.aria-labelledby]=\"inputId() + '-label'\">\n @for (item of items(); track item.getTime()) {\n <li class=\"flex items-center gap-1 rounded-full bg-slate-100 px-3 py-1 text-sm\">\n {{ item.toLocaleDateString() }}\n @if (!disabled() && !readonly()) {\n <button\n type=\"button\"\n class=\"text-slate-500 hover:text-red-700\"\n [attr.aria-label]=\"\n ('forms.array.remove' | recipeTranslate) + ' ' + item.toLocaleDateString()\n \"\n (click)=\"remove(item)\"\n >\n ×\n </button>\n }\n </li>\n }\n </ul>\n }\n `,\n})\nexport class DatePickerMultipleComponent implements FormValueControl<readonly Date[]> {\n /** Jours retenus, comparés au jour civil près. */\n readonly value = model<readonly Date[]>([]);\n readonly inputId = input<string>('');\n readonly name = input<string>('');\n readonly disabled = input<boolean>(false);\n readonly readonly = input<boolean>(false);\n readonly invalid = input<boolean>(false);\n readonly touched = input<boolean>(false);\n readonly required = input<boolean>(false);\n /** Nom du groupe que forme le contrôle (le libellé du champ), posé en `aria-label`. */\n readonly ariaLabel = input<string>();\n /** Identifiants des textes qui décrivent le contrôle (aide, avertissement, erreur), posés en `aria-describedby`. */\n readonly describedBy = input<string>();\n /** Dernier jour sélectionnable ; aucune limite quand il n'est pas fourni. */\n readonly maxDate = input<Date>();\n /**\n * Mois affichés côte à côte par le calendrier de l'application hôte (3 par défaut). Le wrapper par défaut, un\n * champ date natif sans vue mensuelle, l'accepte sans l'utiliser.\n */\n readonly numberOfMonths = input<number>(3);\n readonly touch = output<void>();\n readonly dateAdded = output<Date>();\n readonly dateRemoved = output<Date>();\n\n private readonly control = viewChild.required<ElementRef<HTMLInputElement>>('control');\n\n /** Focus du contrôle natif pour `focusBoundControl` (premier champ en erreur à la soumission). */\n focus(options?: FocusOptions): void {\n this.control().nativeElement.focus(options);\n }\n\n protected readonly classes = APP_INPUT_CLASSES;\n protected readonly variants = ButtonVariantEnum;\n protected readonly severities = SeverityEnum;\n protected readonly draft = signal('');\n protected readonly maxInputValue = computed(() => {\n const max = this.maxDate();\n return max === undefined ? null : RecipeDates.toInputValue(max);\n });\n\n protected readonly items = computed(() =>\n [...this.value()].sort((a, b) => a.getTime() - b.getTime()),\n );\n\n protected add(): void {\n const date = RecipeDates.fromInputValue(this.draft());\n if (date === null) {\n return;\n }\n const existing = this.value().find((item) => RecipeDates.sameDay(item, date));\n this.draft.set('');\n if (existing === undefined) {\n this.value.set([...this.value(), date].sort((a, b) => a.getTime() - b.getTime()));\n this.dateAdded.emit(date);\n } else {\n this.value.set(this.value().filter((item) => item !== existing));\n this.dateRemoved.emit(existing);\n }\n this.touch.emit();\n }\n\n protected remove(date: Date): void {\n this.value.set(this.value().filter((item) => item !== date));\n this.dateRemoved.emit(date);\n this.touch.emit();\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n input,\n model,\n output,\n ElementRef,\n viewChild,\n} from '@angular/core';\nimport { FormValueControl } from '@angular/forms/signals';\nimport { RecipeDates } from '../../utils/recipe-dates.utils';\nimport { APP_INPUT_CLASSES } from '../input-classes';\n\n/**\n * Wrapper par défaut d'une date, `FormValueControl<Date | null>` ; l'application hôte peut le remplacer par celui de\n * son design system. Conversion par composantes locales : le jour affiché est le jour saisi.\n */\n@Component({\n selector: 'app-date-picker',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <input\n #control\n type=\"date\"\n [id]=\"inputId()\"\n [attr.name]=\"name()\"\n [attr.aria-invalid]=\"invalid() && touched() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy() ?? null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [value]=\"inputValue()\"\n [class]=\"classes\"\n (input)=\"onInput($event)\"\n (blur)=\"touch.emit()\"\n />\n `,\n})\nexport class DatePickerComponent implements FormValueControl<Date | null> {\n readonly value = model<Date | null>(null);\n readonly inputId = input<string>('');\n readonly name = input<string>('');\n readonly disabled = input<boolean>(false);\n readonly readonly = input<boolean>(false);\n readonly invalid = input<boolean>(false);\n readonly touched = input<boolean>(false);\n readonly required = input<boolean>(false);\n readonly describedBy = input<string>();\n readonly touch = output<void>();\n\n private readonly control = viewChild.required<ElementRef<HTMLInputElement>>('control');\n\n /** Focus du contrôle natif pour `focusBoundControl` (premier champ en erreur à la soumission). */\n focus(options?: FocusOptions): void {\n this.control().nativeElement.focus(options);\n }\n\n protected readonly classes = APP_INPUT_CLASSES;\n protected readonly inputValue = computed(() => RecipeDates.toInputValue(this.value()));\n\n protected onInput(event: Event): void {\n this.value.set(RecipeDates.fromInputValue((event.target as HTMLInputElement).value));\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n input,\n linkedSignal,\n model,\n output,\n viewChild,\n} from '@angular/core';\nimport { FormValueControl } from '@angular/forms/signals';\nimport { APP_INPUT_CLASSES } from '../input-classes';\n\n/** Décimales admises à la saisie quand `maxFractionDigits` n'est pas fourni : le défaut d'`Intl.NumberFormat`. */\nconst DEFAULT_MAX_FRACTION_DIGITS = 3;\n\n/**\n * Wrapper par défaut d'un nombre, `FormValueControl<number | null>` ; l'application hôte peut le remplacer par le\n * wrapper de son design system, de même sélecteur et de même contrat. `minFractionDigits` fixe les décimales toujours affichées (« 0.30 »), `maxFractionDigits`\n * celles admises à la saisie : un texte plus long est tronqué. Le champ natif suit la locale du navigateur ;\n * le texte est reformaté à la sortie du champ et quand la valeur change par code.\n */\n@Component({\n selector: 'app-input-number',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <input\n #control\n type=\"number\"\n [id]=\"inputId()\"\n [attr.name]=\"name()\"\n [attr.step]=\"step() ?? null\"\n [attr.aria-invalid]=\"invalid() && touched() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy() ?? null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [value]=\"text()\"\n [class]=\"classes\"\n (input)=\"onInput($event)\"\n (blur)=\"onBlur()\"\n />\n `,\n})\nexport class InputNumberComponent implements FormValueControl<number | null> {\n readonly value = model<number | null>(null);\n readonly inputId = input<string>('');\n readonly name = input<string>('');\n readonly disabled = input<boolean>(false);\n readonly readonly = input<boolean>(false);\n readonly invalid = input<boolean>(false);\n readonly touched = input<boolean>(false);\n readonly required = input<boolean>(false);\n /** Pas des flèches du clavier ; 1 quand il n'est pas fourni. */\n readonly step = input<number>();\n /** Décimales toujours affichées (2 pour un montant : « 0.30 ») ; aucune quand il n'est pas fourni. */\n readonly minFractionDigits = input<number>();\n /** Décimales admises à la saisie ; 3, le défaut d'`Intl.NumberFormat`, quand il n'est pas fourni. */\n readonly maxFractionDigits = input<number>();\n /** Identifiants des textes qui décrivent le champ (aide, avertissement, erreur), posés en `aria-describedby`. */\n readonly describedBy = input<string>();\n readonly touch = output<void>();\n\n private readonly control = viewChild.required<ElementRef<HTMLInputElement>>('control');\n\n /** Texte du champ : la valeur formatée, remplacée par la saisie en cours jusqu'à la sortie du champ. */\n protected readonly text = linkedSignal(() =>\n InputNumberComponent.format(this.value(), this.minFractionDigits(), this.maxFractionDigits()),\n );\n\n protected readonly classes = APP_INPUT_CLASSES;\n\n /** Focus du contrôle natif pour `focusBoundControl` (premier champ en erreur à la soumission). */\n focus(options?: FocusOptions): void {\n this.control().nativeElement.focus(options);\n }\n\n protected onInput(event: Event): void {\n const control = event.target as HTMLInputElement;\n const raw = InputNumberComponent.truncate(\n control.value,\n this.maxFractionDigits() ?? DEFAULT_MAX_FRACTION_DIGITS,\n );\n if (raw !== control.value) {\n control.value = raw;\n }\n const parsed = raw === '' ? Number.NaN : Number(raw);\n this.value.set(Number.isNaN(parsed) ? null : parsed);\n this.text.set(raw);\n }\n\n protected onBlur(): void {\n this.text.set(\n InputNumberComponent.format(this.value(), this.minFractionDigits(), this.maxFractionDigits()),\n );\n this.touch.emit();\n }\n\n /** Texte d'une valeur : au moins `min` décimales, au plus `max` (par défaut le plus grand de `min` et 3). */\n private static format(value: number | null, min?: number, max?: number): string {\n if (value === null || !Number.isFinite(value)) {\n return '';\n }\n const minDigits = min ?? 0;\n const fixed = value.toFixed(Math.max(max ?? DEFAULT_MAX_FRACTION_DIGITS, minDigits));\n if (fixed.includes('e')) {\n return String(value);\n }\n const dot = fixed.indexOf('.');\n if (dot === -1) {\n return fixed;\n }\n const integer = fixed.slice(0, dot);\n const fraction = fixed.slice(dot + 1);\n const trimmed = fraction.replace(/0+$/, '');\n const kept = trimmed.length < minDigits ? fraction.slice(0, minDigits) : trimmed;\n return kept === '' ? integer : `${integer}.${kept}`;\n }\n\n /** Coupe la partie décimale d'un texte saisi à `max` chiffres ; une notation exponentielle reste telle quelle. */\n private static truncate(raw: string, max: number): string {\n const dot = raw.indexOf('.');\n if (dot === -1 || /e/i.test(raw) || raw.length - dot - 1 <= max) {\n return raw;\n }\n return max === 0 ? raw.slice(0, dot) : raw.slice(0, dot + 1 + max);\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n input,\n model,\n output,\n ElementRef,\n viewChild,\n} from '@angular/core';\nimport { FormValueControl } from '@angular/forms/signals';\nimport { TextInputMode } from '../../interfaces/text-input-mode.interface';\nimport { APP_INPUT_CLASSES } from '../input-classes';\n\n/**\n * Wrapper par défaut d'un champ texte, `FormValueControl<string>`.\n * L'application hôte peut le remplacer par celui de son design system, de même sélecteur et de même contrat\n * (`value`, `disabled`, `invalid`, `touched`, `touch`).\n */\n@Component({\n selector: 'app-input-text',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <input\n #control\n type=\"text\"\n [id]=\"inputId()\"\n [attr.name]=\"name()\"\n [attr.inputmode]=\"inputmode()\"\n [attr.maxlength]=\"maxLength() ?? null\"\n [attr.aria-invalid]=\"invalid() && touched() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy() ?? null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [value]=\"value()\"\n [class]=\"classes\"\n (input)=\"onInput($event)\"\n (blur)=\"touch.emit()\"\n />\n `,\n})\nexport class InputTextComponent implements FormValueControl<string> {\n readonly value = model<string>('');\n readonly inputId = input<string>('');\n readonly name = input<string>('');\n readonly disabled = input<boolean>(false);\n readonly readonly = input<boolean>(false);\n readonly invalid = input<boolean>(false);\n readonly touched = input<boolean>(false);\n readonly required = input<boolean>(false);\n readonly placeholder = input('');\n /** Clavier proposé ; `text` quand il n'est pas fourni. */\n readonly inputmode = input<TextInputMode>('text');\n /** Lié par `[formField]` à la règle `maxLength` du schéma. */\n readonly maxLength = input<number>();\n /**\n * Icône de fin de champ, dessinée par un wrapper de l'hôte qui dispose d'un jeu d'icônes. Sans jeu d'icônes,\n * le wrapper par défaut l'accepte sans l'afficher.\n */\n readonly icon = input<string>();\n readonly describedBy = input<string>();\n readonly touch = output<void>();\n\n private readonly control = viewChild.required<ElementRef<HTMLInputElement>>('control');\n\n /** Focus du contrôle natif pour `focusBoundControl` (premier champ en erreur à la soumission). */\n focus(options?: FocusOptions): void {\n this.control().nativeElement.focus(options);\n }\n\n protected readonly classes = APP_INPUT_CLASSES;\n\n protected onInput(event: Event): void {\n this.value.set((event.target as HTMLInputElement).value);\n }\n}\n","import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { SeverityEnum } from '../../enums/severity.enum';\n\n/** Message de champ : texte coloré, sans fond ni bordure (classes complètes et littérales). */\nconst INLINE: Readonly<Record<SeverityEnum, string>> = {\n [SeverityEnum.PRIMARY]: 'text-sm text-sky-800',\n [SeverityEnum.SECONDARY]: 'text-xs text-slate-600',\n [SeverityEnum.SUCCESS]: 'text-sm text-emerald-800',\n [SeverityEnum.INFO]: 'text-sm text-cyan-800',\n [SeverityEnum.WARNING]: 'text-sm text-amber-700',\n [SeverityEnum.DANGER]: 'text-sm text-red-700',\n};\n\n/** Message encadré : fond et bordure de la sévérité. */\nconst BOXED: Readonly<Record<SeverityEnum, string>> = {\n [SeverityEnum.PRIMARY]:\n 'rounded-md border border-sky-300 bg-sky-50 px-3 py-2 text-sm text-sky-900',\n [SeverityEnum.SECONDARY]:\n 'rounded-md border border-slate-300 bg-slate-50 px-3 py-2 text-sm text-slate-800',\n [SeverityEnum.SUCCESS]:\n 'rounded-md border border-emerald-300 bg-emerald-50 px-3 py-2 text-sm text-emerald-900',\n [SeverityEnum.INFO]:\n 'rounded-md border border-cyan-300 bg-cyan-50 px-3 py-2 text-sm text-cyan-900',\n [SeverityEnum.WARNING]:\n 'rounded-md border border-amber-300 bg-amber-50 px-3 py-2 text-sm text-amber-900',\n [SeverityEnum.DANGER]:\n 'rounded-md border border-red-300 bg-red-50 px-3 py-2 text-sm text-red-800',\n};\n\n/**\n * Wrapper par défaut d'un message d'erreur ou de statut ; l'application hôte peut le remplacer par celui de son\n * design system, de même contrat : `severity` (`INFO` par défaut), `inline` pour un message de champ, contenu projeté.\n * Une erreur (`DANGER`) est annoncée par `role=\"alert\"`, les autres sévérités par `role=\"status\"`.\n */\n@Component({\n selector: 'app-message',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { '[class]': 'classes()', '[attr.role]': 'role()' },\n template: `<ng-content />`,\n})\nexport class MessageComponent {\n readonly severity = input<SeverityEnum>(SeverityEnum.INFO);\n readonly inline = input(false);\n\n protected readonly classes = computed(\n () => `block ${(this.inline() ? INLINE : BOXED)[this.severity()]}`,\n );\n\n protected readonly role = computed(() =>\n this.severity() === SeverityEnum.DANGER ? 'alert' : 'status',\n );\n}\n","import { ChangeDetectionStrategy, Component, computed, input, model } from '@angular/core';\n\n/**\n * Wrapper par défaut d'un volet titré (format `panel`) ; l'application hôte peut le remplacer par celui de son design\n * system, de même contrat. `collapsible` ajoute le bouton qui replie le contenu ; ce bouton porte son nom\n * (`collapseLabel` volet ouvert, `expandLabel` volet replié, le titre à défaut) et `aria-expanded`.\n * `badge` affiche un compteur d'erreurs dans l'en-tête ; `badgeLabel` le dit aux lecteurs d'écran.\n * Le contenu reste rendu quand le volet est replié (`hidden`) : la validation ne dépend pas de l'affichage.\n * Le contenu ne peut pas élargir le volet : ce qui est plus large que lui défile dans son propre conteneur.\n */\n@Component({\n selector: 'app-panel',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'block min-w-0' },\n template: `\n <section class=\"min-w-0 rounded-lg border border-slate-200\">\n <div class=\"flex items-center justify-between gap-2 px-4 py-2\">\n <h3 class=\"text-base font-semibold text-slate-900\">\n @if (collapsible()) {\n <button\n type=\"button\"\n class=\"flex items-center gap-2 text-left\"\n [attr.aria-label]=\"toggleLabel()\"\n [attr.aria-expanded]=\"!collapsed()\"\n [attr.aria-controls]=\"contentId\"\n (click)=\"collapsed.set(!collapsed())\"\n >\n <span aria-hidden=\"true\" class=\"inline-block w-3 text-xs\">{{\n collapsed() ? '▸' : '▾'\n }}</span>\n {{ header() }}\n </button>\n } @else {\n {{ header() }}\n }\n </h3>\n @let count = badge();\n @if (count !== undefined) {\n <span class=\"flex items-center\">\n @if (badgeLabel(); as label) {\n <span class=\"sr-only\">{{ label }}</span>\n }\n <span\n aria-hidden=\"true\"\n class=\"rounded-full bg-red-700 px-2 py-0.5 text-xs font-semibold text-white\"\n >{{ count }}</span\n >\n </span>\n }\n </div>\n <div [id]=\"contentId\" [hidden]=\"collapsed()\" class=\"min-w-0 border-t border-slate-200 p-4\">\n <ng-content />\n </div>\n </section>\n `,\n})\nexport class PanelComponent {\n private static nextId = 0;\n\n readonly header = input.required<string>();\n readonly collapsible = input(false);\n readonly collapsed = model(false);\n /** Compteur d'erreurs de l'en-tête ; aucun compteur quand il n'est pas fourni. */\n readonly badge = input<number>();\n /** Texte du compteur pour les lecteurs d'écran (« 2 erreurs »). */\n readonly badgeLabel = input<string>();\n /** Nom du bouton quand le volet est ouvert (« Replier le volet Adresse »). */\n readonly collapseLabel = input<string>();\n /** Nom du bouton quand le volet est replié (« Déplier le volet Adresse »). */\n readonly expandLabel = input<string>();\n\n /** Identifiant du contenu, relié au bouton par `aria-controls`. */\n protected readonly contentId = `app-panel-${(PanelComponent.nextId += 1)}-content`;\n\n protected readonly toggleLabel = computed(\n () => (this.collapsed() ? this.expandLabel() : this.collapseLabel()) ?? this.header(),\n );\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n input,\n model,\n output,\n ElementRef,\n viewChild,\n} from '@angular/core';\nimport { FormValueControl } from '@angular/forms/signals';\nimport { SelectOption } from '../../interfaces/select-option.interface';\nimport { APP_INPUT_CLASSES } from '../input-classes';\n\n/**\n * Wrapper par défaut d'une liste déroulante, `FormValueControl<T | null>` ; l'application hôte peut le remplacer par\n * celui de son design system, de même contrat (`options`, `ariaLabelledBy`, `describedBy`, `showClear`, `filter`,\n * `placeholder`, `focus()`).\n * La valeur de chaque `<option>` est sa position, pour accepter tout type de valeur.\n * Une valeur absente des options est affichée comme option inconnue, non sélectionnable à nouveau.\n * En lecture seule, la liste reste focalisable, porte `aria-readonly`, ne s'ouvre pas et n'a ni chevron ni curseur main.\n */\n@Component({\n selector: 'app-select',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <select\n #control\n [id]=\"inputId()\"\n [attr.name]=\"name()\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n [attr.aria-invalid]=\"invalid() && touched() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy() ?? null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-readonly]=\"readonly() ? 'true' : null\"\n [disabled]=\"disabled()\"\n [value]=\"selectedIndex()\"\n [class]=\"classes\"\n [class.appearance-none]=\"readonly()\"\n [class.cursor-default]=\"readonly()\"\n [class.bg-slate-50]=\"readonly()\"\n (mousedown)=\"blockWhenReadonly($event)\"\n (keydown)=\"blockKeyWhenReadonly($event)\"\n (change)=\"onChange($event)\"\n (blur)=\"touch.emit()\"\n >\n @if (showClear() || value() === null) {\n <option value=\"\">{{ placeholder() }}</option>\n }\n @if (unknownValue()) {\n <option value=\"?\" disabled>{{ unknownLabel() }}</option>\n }\n @for (option of options(); track $index) {\n <option [value]=\"$index\" [disabled]=\"option.disabled ?? false\">{{ option.label }}</option>\n }\n </select>\n `,\n})\nexport class SelectComponent<T> implements FormValueControl<T | null> {\n readonly value = model<T | null>(null);\n readonly options = input<SelectOption<T>[]>([]);\n readonly inputId = input<string>('');\n readonly name = input<string>('');\n readonly disabled = input<boolean>(false);\n readonly readonly = input<boolean>(false);\n readonly invalid = input<boolean>(false);\n readonly touched = input<boolean>(false);\n readonly required = input<boolean>(false);\n readonly showClear = input<boolean>(false);\n /**\n * Recherche dans la liste, pour un wrapper de l'hôte qui la propose. Le `<select>` natif l'ignore : il garde la\n * recherche du navigateur, qui va à l'option dont le libellé commence par les lettres tapées.\n */\n readonly filter = input<boolean>(false);\n readonly placeholder = input<string>('');\n readonly unknownLabel = input<string>('?');\n /** Identifiant du libellé de la liste, posé en `aria-labelledby`. */\n readonly ariaLabelledBy = input<string>();\n /** Identifiants des textes qui décrivent le champ (aide, avertissement, erreur), posés en `aria-describedby`. */\n readonly describedBy = input<string>();\n readonly touch = output<void>();\n\n private readonly control = viewChild.required<ElementRef<HTMLSelectElement>>('control');\n\n /** Focus du contrôle natif pour `focusBoundControl` (premier champ en erreur à la soumission). */\n focus(options?: FocusOptions): void {\n this.control().nativeElement.focus(options);\n }\n\n protected readonly classes = APP_INPUT_CLASSES;\n\n protected readonly selectedIndex = computed(() => {\n const current = this.value();\n if (current === null) {\n return '';\n }\n const index = this.options().findIndex((option) => option.value === current);\n return index === -1 ? '?' : String(index);\n });\n\n protected readonly unknownValue = computed(() => this.selectedIndex() === '?');\n\n protected blockWhenReadonly(event: Event): void {\n if (this.readonly()) {\n event.preventDefault();\n }\n }\n\n /** Les flèches et les lettres changent la valeur d'un `<select>` fermé : seule la tabulation passe. */\n protected blockKeyWhenReadonly(event: KeyboardEvent): void {\n if (this.readonly() && event.key !== 'Tab') {\n event.preventDefault();\n }\n }\n\n protected onChange(event: Event): void {\n const target = event.target as HTMLSelectElement;\n if (this.readonly()) {\n target.value = this.selectedIndex();\n return;\n }\n const raw = target.value;\n if (raw === '' || raw === '?') {\n this.value.set(null);\n return;\n }\n const option = this.options()[Number(raw)];\n this.value.set(option === undefined ? null : option.value);\n }\n}\n","import { Directive, inject, input, TemplateRef } from '@angular/core';\n\n/**\n * Contenu d'un onglet d'`app-tabs` : `<ng-template [appTabPanel]=\"valeur\">…</ng-template>` dans `<app-tabs>`.\n * Le wrapper rend un panneau par gabarit et ne fait que masquer ceux des onglets inactifs : le contenu n'est\n * jamais détruit.\n */\n@Directive({ selector: 'ng-template[appTabPanel]' })\nexport class TabPanelDirective {\n /** Valeur de l'onglet dont ce gabarit est le contenu. */\n readonly value = input.required<string>({ alias: 'appTabPanel' });\n readonly template = inject<TemplateRef<unknown>>(TemplateRef);\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChildren,\n ElementRef,\n inject,\n Injector,\n input,\n model,\n viewChild,\n viewChildren,\n} from '@angular/core';\nimport { TabOption } from '../../interfaces/tab-option.interface';\nimport { TabPanelDirective } from './tab-panel.directive';\n\nconst TAB_BASE =\n '-mb-px inline-flex items-center gap-2 border-b-2 px-3 py-2 text-sm font-medium focus:outline-none ' +\n 'focus-visible:ring-2 focus-visible:ring-sky-500 disabled:cursor-not-allowed disabled:opacity-50';\nconst TAB_SELECTED = `${TAB_BASE} border-sky-700 text-sky-800`;\nconst TAB_IDLE = `${TAB_BASE} border-transparent text-slate-700 hover:border-slate-300 hover:text-slate-900`;\n/**\n * `fill` sous 768 px : largeur partagée à parts égales, titre centré qui passe à la ligne entre les mots, marges et\n * texte réduits ; l'espace haut (`pt-6`) est réservé à la pastille même sans compteur : même hauteur d'onglet.\n */\nconst TAB_FILL =\n 'max-md:relative max-md:min-w-0 max-md:flex-1 max-md:basis-0 max-md:justify-center max-md:px-2 max-md:pt-6 ' +\n 'max-md:text-center max-md:text-xs';\n/** Conteneur de la pastille, de la hauteur de la ligne du titre (`text-sm`). */\nconst BADGE_SLOT = 'flex h-5 shrink-0 items-center';\n/** `fill` sous 768 px : pastille au coin haut droit de l'onglet, hors du flux, le titre garde toute la largeur. */\nconst BADGE_SLOT_FILL = 'max-md:absolute max-md:top-0.5 max-md:right-0.5';\n\n/**\n * Wrapper par défaut d'une barre d'onglets (format `tabs`) ; l'application hôte peut le remplacer par celui de son\n * design system, de même contrat (`value` en modèle, `options`, `fill`), avec le compteur `badge` de chaque onglet.\n * Chaque `<ng-template [appTabPanel]=\"valeur\">` projeté devient un panneau, dans l'ordre des gabarits ; sans gabarit,\n * le wrapper n'affiche que la barre et le parent rend le contenu. Les panneaux inactifs restent rendus (`hidden`) :\n * la validation ne dépend pas de l'affichage, et une section n'est jamais recréée.\n * La barre colle en haut du conteneur qui défile (`sticky`, fond opaque) tant que les panneaux, dans le même bloc\n * (l'élément hôte), défilent dessous. Elle colle à `top: var(--app-sticky-top, 0px)` : un conteneur qui défile avec\n * une marge haute (`padding-top`) pose `--app-sticky-top` au négatif de cette marge (`-20px` pour 20 px), sinon le\n * contenu reste visible dans la bande au-dessus de la barre collée.\n * Quand l'utilisateur change d'onglet (clic ou clavier) alors que la barre est collée, l'hôte défile au début de la\n * zone qui défile (`scrollIntoView({ block: 'start' })`, après le rendu) : le nouveau panneau s'affiche depuis son\n * haut, pas à la position de défilement de l'ancien. Un changement de `value` venu du parent ne fait pas défiler :\n * le focus du premier champ en erreur pilote alors le défilement.\n * Le nom d'un onglet est son seul titre : le texte du compteur (`badgeLabel`) le décrit (`aria-describedby`), si\n * bien que le panneau, nommé par l'onglet, ne porte que le titre. La pastille tient dans la hauteur de la ligne du\n * titre : un onglet a la même hauteur avec ou sans compteur.\n * Clavier (motif ARIA des onglets) : seul l'onglet actif est dans l'ordre de tabulation ; flèches gauche et droite\n * (en boucle), Début et Fin déplacent le focus en sautant les onglets désactivés, et l'onglet atteint devient actif.\n */\n@Component({\n selector: 'app-tabs',\n imports: [NgTemplateOutlet],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'block min-w-0' },\n template: `\n <div\n #tablist\n role=\"tablist\"\n class=\"sticky top-[var(--app-sticky-top,0px)] z-10 flex flex-wrap border-b border-slate-200 bg-white\"\n >\n @for (option of options(); track option.value) {\n <button\n #tab\n type=\"button\"\n role=\"tab\"\n [id]=\"tabId(option.value)\"\n [attr.aria-selected]=\"option.value === value()\"\n [attr.aria-controls]=\"panelValues().has(option.value) ? panelId(option.value) : null\"\n [attr.aria-describedby]=\"described(option) ? descriptionId(option.value) : null\"\n [attr.tabindex]=\"option.value === focusable() ? 0 : -1\"\n [disabled]=\"option.disabled ?? false\"\n [class]=\"option.value === value() ? tabClasses().selected : tabClasses().idle\"\n (click)=\"select(option.value)\"\n (keydown)=\"onKeydown($event, $index)\"\n >\n <span class=\"min-w-0\">{{ option.label }}</span>\n @if (option.badge !== undefined) {\n <span [class]=\"tabClasses().badge\">\n <span\n aria-hidden=\"true\"\n class=\"rounded-full bg-red-700 px-2 py-0.5 text-xs leading-none font-semibold text-white\"\n >{{ option.badge }}</span\n >\n </span>\n }\n </button>\n }\n </div>\n @for (option of options(); track option.value) {\n @if (described(option)) {\n <span hidden [id]=\"descriptionId(option.value)\">{{ option.badgeLabel }}</span>\n }\n }\n @for (panel of panels(); track panel) {\n @let panelValue = panel.value();\n <div\n role=\"tabpanel\"\n tabindex=\"0\"\n [id]=\"panelId(panelValue)\"\n [attr.aria-labelledby]=\"tabValues().has(panelValue) ? tabId(panelValue) : null\"\n [hidden]=\"panelValue !== value()\"\n class=\"min-w-0 pt-4 focus:outline-none focus-visible:ring-2 focus-visible:ring-sky-500\"\n >\n <ng-container [ngTemplateOutlet]=\"panel.template\" />\n </div>\n }\n `,\n})\nexport class TabsComponent {\n private static nextId = 0;\n\n /** Valeur de l'onglet actif. */\n readonly value = model.required<string>();\n readonly options = input.required<TabOption[]>();\n /**\n * Sous 768 px, les onglets se partagent toute la largeur et leur titre passe à la ligne entre les mots, la pastille\n * au coin haut droit : aucun onglet n'est hors de vue.\n */\n readonly fill = input(false);\n\n protected readonly panels = contentChildren(TabPanelDirective);\n private readonly tabs = viewChildren<ElementRef<HTMLButtonElement>>('tab');\n private readonly tablist = viewChild.required<ElementRef<HTMLElement>>('tablist');\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly injector = inject(Injector);\n\n protected readonly tabClasses = computed(() => {\n const fill = this.fill();\n return {\n selected: fill ? `${TAB_SELECTED} ${TAB_FILL}` : TAB_SELECTED,\n idle: fill ? `${TAB_IDLE} ${TAB_FILL}` : TAB_IDLE,\n badge: fill ? `${BADGE_SLOT} ${BADGE_SLOT_FILL}` : BADGE_SLOT,\n };\n });\n\n /** Préfixe des identifiants qui relient chaque onglet à son panneau (`aria-controls`, `aria-labelledby`). */\n private readonly baseId = `app-tabs-${(TabsComponent.nextId += 1)}`;\n\n protected readonly panelValues = computed(\n (): ReadonlySet<string> => new Set(this.panels().map((panel) => panel.value())),\n );\n protected readonly tabValues = computed(\n (): ReadonlySet<string> => new Set(this.options().map((option) => option.value)),\n );\n\n /** Seul onglet atteint par Tab (focus mobile) : l'onglet actif, ou le premier onglet activable à défaut. */\n protected readonly focusable = computed((): string | undefined => {\n const enabled = this.options().filter((option) => option.disabled !== true);\n const value = this.value();\n return (enabled.find((option) => option.value === value) ?? enabled[0])?.value;\n });\n\n protected tabId(value: string): string {\n return `${this.baseId}-tab-${value}`;\n }\n\n protected panelId(value: string): string {\n return `${this.baseId}-panel-${value}`;\n }\n\n protected descriptionId(value: string): string {\n return `${this.baseId}-description-${value}`;\n }\n\n /** Onglet décrit par le texte de son compteur : un compteur affiché, et son texte fourni. */\n protected described(option: TabOption): boolean {\n return option.badge !== undefined && (option.badgeLabel ?? '') !== '';\n }\n\n /**\n * Onglet choisi par l'utilisateur (clic ou clavier). Seul ce chemin fait défiler : un changement de `value` venu du\n * parent (onglet du premier champ en erreur) laisse le focus du champ piloter le défilement.\n */\n protected select(value: string): void {\n if (value === this.value()) {\n return;\n }\n this.value.set(value);\n afterNextRender(() => this.scrollToStartIfStuck(), { injector: this.injector });\n }\n\n /** L'activation suit le focus : les panneaux sont déjà rendus, afficher l'onglet atteint ne coûte rien. */\n protected onKeydown(event: KeyboardEvent, index: number): void {\n const target = this.target(event.key, index);\n if (target === undefined) {\n return;\n }\n event.preventDefault();\n const option = this.options()[target];\n if (option !== undefined) {\n this.select(option.value);\n this.tabs()[target]?.nativeElement.focus();\n }\n }\n\n /**\n * Barre collée (le haut de l'hôte est passé au-dessus du haut de la barre) : le nouveau panneau garde la position de\n * défilement de l'ancien et son haut est caché sous la barre ; l'hôte défile au début de la zone qui défile.\n * Sans défilement préalable, la barre est à sa place, au haut de l'hôte, et rien ne bouge.\n */\n private scrollToStartIfStuck(): void {\n const host = this.host.nativeElement;\n const barTop = this.tablist().nativeElement.getBoundingClientRect().top;\n if (host.getBoundingClientRect().top < barTop) {\n host.scrollIntoView({ block: 'start' });\n }\n }\n\n /** Rang de l'onglet atteint par la touche depuis le rang `index`, onglets désactivés sautés, en boucle aux bouts. */\n private target(key: string, index: number): number | undefined {\n const enabled = this.options().flatMap((option, position) =>\n option.disabled === true ? [] : [position],\n );\n switch (key) {\n case 'ArrowRight':\n return enabled.find((position) => position > index) ?? enabled[0];\n case 'ArrowLeft':\n return [...enabled].reverse().find((position) => position < index) ?? enabled.at(-1);\n case 'Home':\n return enabled[0];\n case 'End':\n return enabled.at(-1);\n default:\n return undefined;\n }\n }\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { FormField } from '@angular/forms/signals';\nimport { RecipeButtonDirective } from '../directives/recipe-button.directive';\nimport { RecipeCheckboxControlDirective } from '../directives/recipe-checkbox-control.directive';\nimport { RecipeDateControlDirective } from '../directives/recipe-date-control.directive';\nimport { RecipeDateMultipleControlDirective } from '../directives/recipe-date-multiple-control.directive';\nimport { RecipeMessageDirective } from '../directives/recipe-message.directive';\nimport { RecipeNumberControlDirective } from '../directives/recipe-number-control.directive';\nimport { RecipePanelDirective } from '../directives/recipe-panel.directive';\nimport { RecipeSelectControlDirective } from '../directives/recipe-select-control.directive';\nimport { RecipeTabsDirective } from '../directives/recipe-tabs.directive';\nimport { RecipeTextControlDirective } from '../directives/recipe-text-control.directive';\nimport { ButtonComponent } from './button/button';\nimport { CheckboxComponent } from './checkbox/checkbox';\nimport { DatePickerMultipleComponent } from './date-picker-multiple/date-picker-multiple';\nimport { DatePickerComponent } from './date-picker/date-picker';\nimport { InputNumberComponent } from './input-number/input-number';\nimport { InputTextComponent } from './input-text/input-text';\nimport { MessageComponent } from './message/message';\nimport { PanelComponent } from './panel/panel';\nimport { SelectComponent } from './select/select';\nimport { TabPanelDirective } from './tabs/tab-panel.directive';\nimport { TabsComponent } from './tabs/tabs';\n\n/**\n * Gabarits par défaut des contrôles, des messages, des boutons, des volets et des onglets, avec les wrappers HTML de `ui/`. Le registre le crée avant le composant de\n * l'hôte : un contrôle que l'hôte ne déclare pas garde ce gabarit. Il sert aussi de modèle à celui de l'hôte.\n */\n@Component({\n selector: 'app-recipe-default-ui',\n imports: [\n FormField,\n NgTemplateOutlet,\n ButtonComponent,\n CheckboxComponent,\n DatePickerComponent,\n DatePickerMultipleComponent,\n InputNumberComponent,\n InputTextComponent,\n MessageComponent,\n PanelComponent,\n SelectComponent,\n TabPanelDirective,\n TabsComponent,\n RecipeButtonDirective,\n RecipeCheckboxControlDirective,\n RecipeDateControlDirective,\n RecipeDateMultipleControlDirective,\n RecipeMessageDirective,\n RecipeNumberControlDirective,\n RecipePanelDirective,\n RecipeSelectControlDirective,\n RecipeTabsDirective,\n RecipeTextControlDirective,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <ng-template\n appRecipeTextControl\n let-field\n let-inputId=\"inputId\"\n let-describedBy=\"describedBy\"\n let-placeholder=\"placeholder\"\n let-inputmode=\"inputmode\"\n let-icon=\"icon\"\n >\n <app-input-text\n [formField]=\"field\"\n [inputId]=\"inputId\"\n [describedBy]=\"describedBy\"\n [placeholder]=\"placeholder\"\n [inputmode]=\"inputmode\"\n [icon]=\"icon\"\n />\n </ng-template>\n <ng-template\n appRecipeNumberControl\n let-field\n let-inputId=\"inputId\"\n let-describedBy=\"describedBy\"\n let-step=\"step\"\n let-minFractionDigits=\"minFractionDigits\"\n let-maxFractionDigits=\"maxFractionDigits\"\n >\n <app-input-number\n [formField]=\"field\"\n [inputId]=\"inputId\"\n [describedBy]=\"describedBy\"\n [step]=\"step\"\n [minFractionDigits]=\"minFractionDigits\"\n [maxFractionDigits]=\"maxFractionDigits\"\n />\n </ng-template>\n <ng-template\n appRecipeSelectControl\n let-field\n let-inputId=\"inputId\"\n let-describedBy=\"describedBy\"\n let-labelId=\"labelId\"\n let-options=\"options\"\n let-filter=\"filter\"\n let-showClear=\"showClear\"\n let-placeholder=\"placeholder\"\n >\n <app-select\n [formField]=\"field\"\n [inputId]=\"inputId\"\n [ariaLabelledBy]=\"labelId\"\n [describedBy]=\"describedBy\"\n [options]=\"options\"\n [filter]=\"filter\"\n [showClear]=\"showClear\"\n [placeholder]=\"placeholder\"\n />\n </ng-template>\n <ng-template appRecipeDateControl let-field let-inputId=\"inputId\" let-describedBy=\"describedBy\">\n <app-date-picker [formField]=\"field\" [inputId]=\"inputId\" [describedBy]=\"describedBy\" />\n </ng-template>\n <ng-template\n appRecipeDateMultipleControl\n let-field\n let-inputId=\"inputId\"\n let-describedBy=\"describedBy\"\n let-ariaLabel=\"ariaLabel\"\n let-maxDate=\"maxDate\"\n let-months=\"months\"\n >\n <app-date-picker-multiple\n [formField]=\"field\"\n [inputId]=\"inputId\"\n [ariaLabel]=\"ariaLabel\"\n [describedBy]=\"describedBy\"\n [maxDate]=\"maxDate\"\n [numberOfMonths]=\"months\"\n />\n </ng-template>\n <ng-template\n appRecipeCheckboxControl\n let-field\n let-inputId=\"inputId\"\n let-describedBy=\"describedBy\"\n >\n <app-checkbox [formField]=\"field\" [inputId]=\"inputId\" [describedBy]=\"describedBy\" />\n </ng-template>\n <ng-template appRecipeMessage let-text let-severity=\"severity\" let-inline=\"inline\">\n <app-message [severity]=\"severity\" [inline]=\"inline\">{{ text }}</app-message>\n </ng-template>\n <ng-template\n appRecipeButton\n let-label\n let-variant=\"variant\"\n let-severity=\"severity\"\n let-click=\"click\"\n >\n <app-button [label]=\"label\" [variant]=\"variant\" [severity]=\"severity\" (clicked)=\"click()\" />\n </ng-template>\n <ng-template\n appRecipePanel\n let-content\n let-header=\"header\"\n let-collapsible=\"collapsible\"\n let-collapsed=\"collapsed\"\n let-toggle=\"toggle\"\n let-badge=\"badge\"\n let-badgeLabel=\"badgeLabel\"\n let-collapseLabel=\"collapseLabel\"\n let-expandLabel=\"expandLabel\"\n >\n <app-panel\n [header]=\"header\"\n [collapsible]=\"collapsible\"\n [collapsed]=\"collapsed\"\n (collapsedChange)=\"toggle($event)\"\n [badge]=\"badge\"\n [badgeLabel]=\"badgeLabel\"\n [collapseLabel]=\"collapseLabel\"\n [expandLabel]=\"expandLabel\"\n >\n <ng-container [ngTemplateOutlet]=\"content\" />\n </app-panel>\n </ng-template>\n <ng-template\n appRecipeTabs\n let-panels\n let-options=\"options\"\n let-value=\"value\"\n let-select=\"select\"\n let-fill=\"fill\"\n >\n <app-tabs [options]=\"options\" [value]=\"value\" (valueChange)=\"select($event)\" [fill]=\"fill\">\n <!-- Suivi par valeur : le contexte recrée la liste à chaque calcul, un panneau n'est jamais détruit. -->\n @for (panel of panels; track panel.value) {\n <ng-template [appTabPanel]=\"panel.value\">\n <ng-container [ngTemplateOutlet]=\"panel.template\" />\n </ng-template>\n }\n </app-tabs>\n </ng-template>\n `,\n})\nexport class RecipeDefaultUiComponent {}\n","import {\n ComponentRef,\n createComponent,\n DestroyRef,\n EnvironmentInjector,\n inject,\n Injector,\n Service,\n TemplateRef,\n} from '@angular/core';\nimport { RecipeUiTemplateType } from '../interfaces/recipe-ui-template-type.interface';\nimport { RECIPE_FORM_UI } from '../tokens/recipe-form-ui.token';\nimport { RecipeDefaultUiComponent } from '../ui/recipe-default-ui';\nimport { RecipeUiTemplates } from './recipe-ui-templates.service';\n\n/**\n * Registre des gabarits de contrôle et d'interface. Au premier gabarit demandé, il crée le composant par défaut puis celui de\n * l'hôte (`RECIPE_FORM_UI`), une fois, hors de l'arbre de l'application : leurs directives `appRecipe…`\n * enregistrent leurs gabarits, ceux de l'hôte en dernier. Les vues rendues depuis ces gabarits sont attachées au\n * champ qui les insère et se rafraîchissent avec lui.\n */\n@Service()\nexport class RecipeUi {\n private readonly templates = inject(RecipeUiTemplates);\n private readonly environmentInjector = inject(EnvironmentInjector);\n /** Injecteur où le registre est fourni : les directives des gabarits y trouvent `RecipeUiTemplates`. */\n private readonly injector = inject(Injector);\n private readonly hostUi = inject(RECIPE_FORM_UI);\n private readonly created: ComponentRef<unknown>[] = [];\n\n constructor() {\n inject(DestroyRef).onDestroy(() => this.created.forEach((ref) => ref.destroy()));\n }\n\n template(type: RecipeUiTemplateType): TemplateRef<unknown> {\n this.createOnce();\n const template = this.templates.get(type);\n if (template === undefined) {\n throw new Error(`[recipe-forms] aucun gabarit pour le contrôle « ${type} »`);\n }\n return template;\n }\n\n private createOnce(): void {\n if (this.created.length > 0) {\n return;\n }\n for (const ui of [RecipeDefaultUiComponent, this.hostUi]) {\n if (ui !== undefined) {\n const ref = createComponent(ui, {\n environmentInjector: this.environmentInjector,\n elementInjector: this.injector,\n });\n // La création des vues pose les directives, qui enregistrent leurs gabarits.\n ref.changeDetectorRef.detectChanges();\n this.created.push(ref);\n }\n }\n }\n}\n","import { Provider, Type } from '@angular/core';\nimport { RecipeUi } from '../services/recipe-ui.service';\nimport { RecipeUiTemplates } from '../services/recipe-ui-templates.service';\nimport { RECIPE_FORM_UI } from '../tokens/recipe-form-ui.token';\n\n/**\n * Gabarits de l'hôte pour les formulaires d'un composant : à poser dans les `providers` du composant qui affiche les\n * formulaires (ou d'une route). Le composant de gabarits reste ainsi dans le chunk chargé à la demande, au lieu\n * d'entrer dans le bundle initial par `provideRecipeForms({ ui })`. Le registre et ses gabarits sont propres à\n * ce composant et détruits avec lui.\n */\nexport const provideRecipeFormsUi = (ui: Type<unknown>): Provider[] => [\n { provide: RECIPE_FORM_UI, useValue: ui },\n RecipeUi,\n RecipeUiTemplates,\n];\n","import {\n EnvironmentProviders,\n inject,\n makeEnvironmentProviders,\n Provider,\n provideEnvironmentInitializer,\n} from '@angular/core';\nimport { RecipeFormsOptions } from '../interfaces/recipe-forms-options.interface';\nimport { InMemoryValidationTiming } from '../services/in-memory-validation-timing.service';\nimport { FORM_KEY_GENERATOR } from '../tokens/form-key-generator.token';\nimport { FORM_VALIDATION_TIMING } from '../tokens/form-validation-timing.token';\nimport { RECIPE_FORM_TRANSLATION_CHANGES } from '../tokens/recipe-form-translation-changes.token';\nimport { RECIPE_FORM_TRANSLATOR } from '../tokens/recipe-form-translator.token';\nimport { RECIPE_FORM_RX_RESOURCE } from '../tokens/recipe-form-rx-resource.token';\nimport { RECIPE_FORM_UI } from '../tokens/recipe-form-ui.token';\n\n/** Nom de la commande exposée hors production : `rfValidationTiming()` dans la console du navigateur. */\nexport const RECIPE_FORMS_TIMING_COMMAND = 'rfValidationTiming';\n\n/**\n * Branche le moteur dans l'application hôte. Hors production, le collecteur en mémoire remplace\n * le collecteur sans effet et la commande d'affichage du résumé est exposée.\n * Le traducteur et le signal des changements de traductions sont des fabriques (`useFactory`) : l'hôte y injecte\n * son service i18n (par exemple `TranslocoService`).\n */\nexport const provideRecipeForms = (options: RecipeFormsOptions): EnvironmentProviders => {\n const providers: Provider[] = [];\n if (!options.production) {\n providers.push({ provide: FORM_VALIDATION_TIMING, useClass: InMemoryValidationTiming });\n }\n if (options.translator !== undefined) {\n providers.push({ provide: RECIPE_FORM_TRANSLATOR, useFactory: options.translator });\n }\n if (options.translationChanges !== undefined) {\n providers.push({\n provide: RECIPE_FORM_TRANSLATION_CHANGES,\n useFactory: options.translationChanges,\n });\n }\n if (options.ui !== undefined) {\n providers.push({ provide: RECIPE_FORM_UI, useValue: options.ui });\n }\n if (options.rxResource !== undefined) {\n providers.push({ provide: RECIPE_FORM_RX_RESOURCE, useValue: options.rxResource });\n }\n if (options.keyGenerator !== undefined) {\n providers.push({ provide: FORM_KEY_GENERATOR, useValue: options.keyGenerator });\n }\n return makeEnvironmentProviders([\n ...providers,\n options.production\n ? []\n : provideEnvironmentInitializer(() => {\n const timing = inject(FORM_VALIDATION_TIMING);\n const scope = globalThis as Record<string, unknown>;\n scope[RECIPE_FORMS_TIMING_COMMAND] = () => console.table(timing.summary());\n }),\n ]);\n};\n","import { FieldState } from '@angular/forms/signals';\nimport { AnyModel } from '../interfaces/any-model.interface';\nimport { ArrayItem } from '../interfaces/array-item.interface';\nimport { ArrayNode } from '../interfaces/array-node.interface';\nimport { RecipeArrayApi } from '../interfaces/recipe-array-api.interface';\n\ntype AnyArrayItem = ArrayItem & AnyModel;\n\n/**\n * API d'un `array` sur l'état de la liste : ajout par `emptyItem(key)` fusionné avec les valeurs données,\n * tri déclaré dans le nœud appliqué après chaque ajout, retrait par clé.\n */\nexport class RecipeArrays {\n static api(\n node: ArrayNode<AnyModel>,\n state: () => FieldState<readonly AnyArrayItem[]> | undefined,\n keyGenerator: () => string,\n ): RecipeArrayApi<AnyArrayItem> {\n const items = (): readonly AnyArrayItem[] => state()?.value() ?? [];\n return {\n items,\n addItem: (item) => {\n const key = keyGenerator();\n const created: AnyArrayItem = { ...node.emptyItem(key), ...item, key };\n state()?.value.update((current) => RecipeArrays.sorted(node, [...current, created]));\n return key;\n },\n removeItem: (key) => {\n state()?.value.update((current) => current.filter((item) => item.key !== key));\n },\n has: (predicate) => items().some(predicate),\n };\n }\n\n private static sorted(\n node: ArrayNode<AnyModel>,\n items: readonly AnyArrayItem[],\n ): readonly AnyArrayItem[] {\n const sort = node.sort;\n return sort === undefined ? items : [...items].sort(sort);\n }\n}\n","import { effect, inject, signal } from '@angular/core';\nimport { debounce, FieldContext, metadata, PathKind, validateAsync } from '@angular/forms/signals';\nimport { defer, finalize, Observable, tap } from 'rxjs';\nimport { FORM_VALIDATION_UNAVAILABLE } from '../constants/form-validation-unavailable-key.constants';\nimport { ValidationOutcomeEnum } from '../enums/validation-outcome.enum';\nimport { AsyncRuleInput } from '../interfaces/async-rule-input.interface';\nimport { LinkedValidationError } from '../interfaces/linked-validation-error.interface';\nimport { RecipeValidationError } from '../interfaces/recipe-validation-error.interface';\nimport { ServerValidationResult } from '../interfaces/server-validation-result.interface';\nimport { ValidationTiming } from '../interfaces/validation-timing.interface';\nimport { RECIPE_FORM_RX_RESOURCE } from '../tokens/recipe-form-rx-resource.token';\nimport { AnySchemaPath } from './recipe-paths.utils';\nimport { RecipeRuleContexts } from './recipe-rule-context.utils';\n\ntype AnyFieldContext = FieldContext<unknown, PathKind>;\n\n/**\n * Paramètres de la ressource : la valeur à valider, le champ propriétaire (pour relier la panne au bon champ) et les\n * valeurs des clés de `dependsOn`, dont le changement relance l'appel.\n */\ninterface AsyncParams {\n readonly value: unknown;\n readonly owner: object;\n readonly dependencies: Readonly<Record<string, unknown>>;\n}\n\nconst NO_DEPENDENCIES: Readonly<Record<string, unknown>> = {};\n\n/**\n * Règle asynchrone : `validateAsync` sur le chemin, validateur appelé par la ressource de\n * `RECIPE_FORM_RX_RESOURCE` (`rxResource` par défaut, ou le wrapper de l'hôte passé à `provideRecipeForms`).\n * - un délai numérique passe par le `debounce` de `validateAsync` ; `'blur'` passe par `debounce(path, 'blur')`\n * de Signal Forms, qui retarde la propagation de la valeur du champ ;\n * - une valeur modifiée pendant l'appel annule l'appel en cours (comportement de la ressource) ;\n * - une panne du validateur n'est pas une erreur de validation : elle pose la métadonnée\n * `FORM_VALIDATION_UNAVAILABLE` du champ, affichée en avertissement, et le formulaire reste soumissible ;\n * - les clés de `dependsOn` sont lues dans les paramètres : leur changement relance l'appel, une fois par champ,\n * et le validateur les reçoit par `ctx.root` ;\n * - durée et résultat sont transmis au collecteur, sans la valeur saisie.\n */\nexport class RecipeAsyncRule {\n static apply(\n path: AnySchemaPath,\n rule: AsyncRuleInput,\n timing: ValidationTiming,\n params: (ctx: AnyFieldContext) => unknown = (ctx) => ctx.value(),\n ): void {\n if (rule.debounce === 'blur') {\n debounce(path, 'blur');\n }\n const failed = signal<ReadonlySet<object>>(new Set());\n const when = rule.when;\n const dependencies = rule.dependencies;\n validateAsync(path, {\n params: (ctx): AsyncParams => ({\n value: params(ctx),\n owner: ctx.fieldTree,\n dependencies: dependencies === undefined ? NO_DEPENDENCIES : dependencies(ctx),\n }),\n debounce: typeof rule.debounce === 'number' ? rule.debounce : undefined,\n factory: (resourceParams) => {\n const resource = inject(RECIPE_FORM_RX_RESOURCE)({\n params: () => resourceParams(),\n stream: ({ params: current }) =>\n RecipeAsyncRule.measured(\n () =>\n rule.validator(\n current.value,\n RecipeRuleContexts.fromDependencies(current.dependencies, rule.name),\n ),\n rule.name,\n timing,\n ),\n });\n let owner: object | undefined;\n effect(() => {\n owner = resourceParams()?.owner ?? owner;\n const isFailed = resource.error() !== undefined;\n const current = owner;\n if (current !== undefined) {\n failed.update((set) => RecipeAsyncRule.toggled(set, current, isFailed));\n }\n });\n return resource;\n },\n onSuccess: (result) => RecipeAsyncRule.toError(result, rule.linkedId),\n onError: () => undefined,\n when: when === undefined ? undefined : (ctx) => when(ctx),\n });\n metadata(path, FORM_VALIDATION_UNAVAILABLE, (ctx) => failed().has(ctx.fieldTree));\n }\n\n private static toggled(\n set: ReadonlySet<object>,\n owner: object,\n present: boolean,\n ): ReadonlySet<object> {\n if (set.has(owner) === present) {\n return set;\n }\n const next = new Set(set);\n if (present) {\n next.add(owner);\n } else {\n next.delete(owner);\n }\n return next;\n }\n\n private static toError(\n result: ServerValidationResult,\n linkedId: string | undefined,\n ): RecipeValidationError | undefined {\n if (result.valid) {\n return undefined;\n }\n const error: RecipeValidationError = { kind: result.kind ?? 'server', message: result.message };\n if (linkedId === undefined) {\n return error;\n }\n const tagged: LinkedValidationError = { ...error, linkedId };\n return tagged;\n }\n\n /** `source` est appelé à la souscription : une erreur levée par le validateur devient une panne mesurée. */\n private static measured(\n source: () => Observable<ServerValidationResult>,\n name: string,\n timing: ValidationTiming,\n ): Observable<ServerValidationResult> {\n return defer(() => {\n const start = performance.now();\n let settled = false;\n return defer(source).pipe(\n tap({\n next: (result) => {\n settled = true;\n timing.record(\n name,\n performance.now() - start,\n result.valid ? ValidationOutcomeEnum.VALID : ValidationOutcomeEnum.INVALID,\n );\n },\n error: () => {\n settled = true;\n timing.record(name, performance.now() - start, ValidationOutcomeEnum.FAILURE);\n },\n }),\n finalize(() => {\n if (!settled) {\n timing.record(name, performance.now() - start, ValidationOutcomeEnum.CANCELLED);\n }\n }),\n );\n });\n }\n}\n","import { NodeKindEnum } from '../enums/node-kind.enum';\nimport { ArrayNode } from '../interfaces/array-node.interface';\nimport { FieldNode } from '../interfaces/field-node.interface';\nimport { LinkedControlDef } from '../interfaces/linked-control-def.interface';\nimport { LinkedNode } from '../interfaces/linked-node.interface';\nimport { RecipeBuilder } from '../interfaces/recipe-builder.interface';\nimport { SectionDef } from '../interfaces/section-def.interface';\nimport { SectionGroupNode } from '../interfaces/section-group-node.interface';\nimport { SectionNode } from '../interfaces/section-node.interface';\n\n/**\n * Crée les utilitaires typés d'une recette : `const b = recipeBuilder<MyFormData>()`, puis `b.field('code', …)`.\n * Un fragment d'élément d'`array` se construit avec `recipeBuilder<ItemModel, RootModel>()`.\n * Les vérifications sont faites par les types ; l'exécution ne fait qu'assembler les nœuds.\n */\nexport const recipeBuilder = <TModel, TRoot = TModel>(): RecipeBuilder<TModel, TRoot> => ({\n field: (key, def) =>\n ({ kind: NodeKindEnum.FIELD, key, ...def }) as FieldNode<TModel, typeof key, TRoot>,\n linked: (keys, def) =>\n ({\n kind: NodeKindEnum.LINKED,\n keys,\n ...def,\n control: def.control as LinkedControlDef<TModel, (typeof keys)[number], TRoot>,\n }) as LinkedNode<TModel, (typeof keys)[number], TRoot>,\n array: (key, def) =>\n ({ kind: NodeKindEnum.ARRAY, key, ...def }) as ArrayNode<TModel, typeof key, TRoot>,\n row: (def) => ({ kind: NodeKindEnum.ROW, ...def }),\n section: ((id: string, def: SectionDef<TModel, TRoot>): SectionNode<TModel, TRoot> => ({\n kind: NodeKindEnum.SECTION,\n id,\n ...def,\n })) as RecipeBuilder<TModel, TRoot>['section'],\n sectionGroup: (id, def) =>\n ({ kind: NodeKindEnum.SECTION_GROUP, id, ...def }) as SectionGroupNode<\n TModel,\n typeof def.display,\n TRoot\n >,\n recipe: (id, def) => ({ id, ...def }),\n});\n","import { FORM_LAYOUT_COLUMNS } from '../constants/form-layout-columns.constants';\nimport { FORM_LAYOUT_ORDER } from '../constants/form-layout-order.constants';\nimport { FORM_LAYOUT_SPAN } from '../constants/form-layout-span.constants';\nimport { BreakpointEnum } from '../enums/breakpoint.enum';\nimport { GridColumns } from '../interfaces/grid-columns.interface';\nimport { GridOrder } from '../interfaces/grid-order.interface';\nimport { GridSpan } from '../interfaces/grid-span.interface';\nimport { NodeLayout } from '../interfaces/node-layout.interface';\nimport { Responsive } from '../interfaces/responsive.interface';\nimport { ResponsiveMap } from '../interfaces/responsive-map.interface';\n\nconst BREAKPOINTS: readonly BreakpointEnum[] = [\n BreakpointEnum.BASE,\n BreakpointEnum.SM,\n BreakpointEnum.MD,\n BreakpointEnum.LG,\n BreakpointEnum.XL,\n];\n\n/** Traduit les jetons de mise en page en classes Tailwind complètes. */\nexport class RecipeLayout {\n static columns(value: Responsive<GridColumns> | undefined): string {\n return RecipeLayout.classes(value, FORM_LAYOUT_COLUMNS);\n }\n\n static span(value: Responsive<GridSpan> | undefined): string {\n return RecipeLayout.classes(value, FORM_LAYOUT_SPAN);\n }\n\n static order(value: Responsive<GridOrder> | undefined): string {\n return RecipeLayout.classes(value, FORM_LAYOUT_ORDER);\n }\n\n /** Classes du conteneur d'une section ou d'une ligne : grille si `columns` ou `areas` sont donnés, colonne sinon. */\n static container(columns: Responsive<GridColumns> | undefined, areas?: string): string {\n if (columns === undefined && areas === undefined) {\n return 'flex flex-col gap-4';\n }\n return RecipeLayout.join(['grid gap-4', RecipeLayout.columns(columns), areas]);\n }\n\n /** Classes d'un nœud placé dans une grille : largeur, ordre, zone et classes libres. */\n static item(layout: NodeLayout): string {\n return RecipeLayout.join([\n RecipeLayout.span(layout.span),\n RecipeLayout.order(layout.order),\n layout.area,\n layout.class,\n ]);\n }\n\n private static classes<T extends number>(\n value: Responsive<T> | undefined,\n table: Readonly<Record<BreakpointEnum, Readonly<Record<T, string>>>>,\n ): string {\n if (value === undefined) {\n return '';\n }\n const map = RecipeLayout.expand(value);\n return RecipeLayout.join(\n BREAKPOINTS.map((bp) => (map[bp] === undefined ? undefined : table[bp][map[bp]])),\n );\n }\n\n private static expand<T extends number>(value: Responsive<T>): ResponsiveMap<T> {\n return typeof value === 'number' ? { base: value } : value;\n }\n\n private static join(parts: readonly (string | undefined)[]): string {\n return parts.filter((part): part is string => part !== undefined && part !== '').join(' ');\n }\n}\n","import { FORM_ERROR_MESSAGES } from '../constants/form-error-messages.constants';\nimport { FORM_SERVER_ERROR_KIND } from '../constants/form-server-error-kind.constants';\nimport { FORM_SERVER_MESSAGES_PREFIX } from '../constants/form-server-messages-prefix.constants';\nimport { FORM_UNKNOWN_ERROR_MESSAGE } from '../constants/form-unknown-error-message.constants';\nimport { FieldMessage } from '../interfaces/field-message.interface';\nimport { RecipeValidationError } from '../interfaces/recipe-validation-error.interface';\nimport { ResolveMessageInput } from '../interfaces/resolve-message-input.interface';\n\nconst RESERVED_KEYS: ReadonlySet<string> = new Set([\n 'kind',\n 'message',\n 'fieldTree',\n 'formField',\n 'linkedId',\n 'error',\n]);\n\n/**\n * Erreur serveur posée par l'application hôte (`{ kind: 'server', error: { code, constraint, message } }`),\n * lisible telle quelle.\n */\ninterface HostServerError {\n readonly code: string | null;\n readonly constraint?: string | null;\n readonly message: string | null;\n}\n\n/**\n * Résolution des messages. Priorités : champ, puis recette, puis défaut, puis message brut, puis `unknown`.\n * Un champ non touché n'affiche rien avant une tentative de soumission ; seule la première erreur est affichée.\n * Erreur serveur : son `message`, que l'appelant a déjà traduit ; sans message, la clé `errors.<code>`.\n */\nexport class RecipeMessages {\n static resolve(input: ResolveMessageInput): FieldMessage | undefined {\n if (!input.touched && !input.submitted) {\n return undefined;\n }\n const [first] = input.errors;\n return first === undefined\n ? undefined\n : RecipeMessages.forError(first, input.fieldMessages, input.recipeMessages);\n }\n\n /** Tous les messages, dans l'ordre (avertissements : chacun est affiché). */\n static forAll(\n errors: readonly RecipeValidationError[],\n fieldMessages?: Readonly<Partial<Record<string, string>>>,\n recipeMessages?: Readonly<Partial<Record<string, string>>>,\n ): readonly FieldMessage[] {\n return errors.map((error) => RecipeMessages.forError(error, fieldMessages, recipeMessages));\n }\n\n static forError(\n error: RecipeValidationError,\n fieldMessages?: Readonly<Partial<Record<string, string>>>,\n recipeMessages?: Readonly<Partial<Record<string, string>>>,\n ): FieldMessage {\n if (error.kind === FORM_SERVER_ERROR_KIND) {\n return RecipeMessages.forServerError(error);\n }\n const key =\n fieldMessages?.[error.kind] ??\n recipeMessages?.[error.kind] ??\n FORM_ERROR_MESSAGES[error.kind];\n if (key !== undefined) {\n return { key, params: RecipeMessages.params(error) };\n }\n if (error.message !== undefined && error.message !== '') {\n return { text: error.message };\n }\n return { key: FORM_UNKNOWN_ERROR_MESSAGE, params: { kind: error.kind } };\n }\n\n /** Code d'une erreur serveur : `code` du moteur, ou `error.code` puis `error.constraint` d'une erreur de l'hôte. */\n static serverCode(error: RecipeValidationError): string | undefined {\n if ('code' in error && typeof error.code === 'string') {\n return error.code;\n }\n if ('error' in error && typeof error.error === 'object' && error.error !== null) {\n const host = error.error as HostServerError;\n return host.code ?? host.constraint ?? undefined;\n }\n return undefined;\n }\n\n private static forServerError(error: RecipeValidationError): FieldMessage {\n const text = RecipeMessages.serverMessage(error);\n if (text !== undefined) {\n return { text };\n }\n const code = RecipeMessages.serverCode(error);\n return code === undefined\n ? { key: FORM_UNKNOWN_ERROR_MESSAGE, params: { kind: error.kind } }\n : { key: `${FORM_SERVER_MESSAGES_PREFIX}.${code}`, params: { code } };\n }\n\n private static serverMessage(error: RecipeValidationError): string | undefined {\n if (error.message !== undefined && error.message !== '') {\n return error.message;\n }\n if ('error' in error && typeof error.error === 'object' && error.error !== null) {\n const message = (error.error as HostServerError).message;\n return message === null || message === '' ? undefined : message;\n }\n return undefined;\n }\n\n /** Les bornes portées par l'erreur (`min`, `maxLength`…) servent de paramètres d'interpolation. */\n private static params(error: RecipeValidationError): Readonly<Record<string, unknown>> {\n const params: Record<string, unknown> = {};\n for (const [name, value] of Object.entries(error)) {\n if (!RESERVED_KEYS.has(name) && typeof value !== 'function' && typeof value !== 'object') {\n params[name] = value;\n } else if (value instanceof Date) {\n params[name] = value;\n }\n }\n return params;\n }\n}\n","import {\n applyEach,\n disabled,\n email,\n FieldContext,\n hidden,\n max,\n maxDate,\n maxLength,\n metadata,\n min,\n minDate,\n minLength,\n PathKind,\n pattern,\n readonly,\n required,\n SchemaFn,\n SchemaPathTree,\n validate,\n validateTree,\n} from '@angular/forms/signals';\nimport { FORM_WARNINGS } from '../constants/form-warnings-key.constants';\nimport { LinkedControlTypeEnum } from '../enums/linked-control-type.enum';\nimport { NodeKindEnum } from '../enums/node-kind.enum';\nimport { RuleModeEnum } from '../enums/rule-mode.enum';\nimport { RuleTypeEnum } from '../enums/rule-type.enum';\nimport { AnyModel } from '../interfaces/any-model.interface';\nimport { AnyRuleDef } from '../interfaces/any-rule-def.interface';\nimport { ArrayItem } from '../interfaces/array-item.interface';\nimport { ArrayNode } from '../interfaces/array-node.interface';\nimport { ArrayRuleDef } from '../interfaces/array-rule-def.interface';\nimport { AsyncRuleInput } from '../interfaces/async-rule-input.interface';\nimport { FormNode } from '../interfaces/form-node.interface';\nimport { FormRecipe } from '../interfaces/form-recipe.interface';\nimport { LinkedNode } from '../interfaces/linked-node.interface';\nimport { LinkedValidationError } from '../interfaces/linked-validation-error.interface';\nimport { RecipeRuleContext } from '../interfaces/recipe-rule-context.interface';\nimport { RecipeSchemaOptions } from '../interfaces/recipe-schema-options.interface';\nimport { RecipeValidationError } from '../interfaces/recipe-validation-error.interface';\nimport { ValidationTiming } from '../interfaces/validation-timing.interface';\nimport { RecipeAsyncRule } from './recipe-async-rule.utils';\nimport { AnySchemaPath, AnySchemaPathTree, RecipePaths } from './recipe-paths.utils';\nimport { RecipeRuleContexts } from './recipe-rule-context.utils';\n\ntype AnyFieldContext = FieldContext<unknown, PathKind>;\ntype RuleWhen = (ctx: RecipeRuleContext<AnyModel>) => boolean;\ntype FieldWhen = (ctx: AnyFieldContext) => boolean;\n\n/** Conditions `readonly` et `hidden` héritées de la recette et des sections englobantes. */\ninterface Inherited {\n readonly readonly: readonly RuleWhen[];\n readonly hidden: readonly RuleWhen[];\n}\n\nconst NOOP_TIMING: ValidationTiming = { record: () => undefined, summary: () => [] };\nconst NO_INHERITED: Inherited = { readonly: [], hidden: [] };\n\n/**\n * Construit le schéma Signal Forms d'une recette : `form(signal(model), RecipeSchema.build(recipe))`.\n * Chaque règle devient une fonction native ; `extraRules` s'exécute après les règles déclaratives.\n * Le modèle est effacé une seule fois ici ; les chemins sont manipulés par `RecipePaths`.\n * Les règles reçoivent un `RecipeRuleContext` dont `root(key)` lit la racine par `ctx.valueOf`.\n */\nexport class RecipeSchema {\n static build<TModel>(\n recipe: FormRecipe<TModel>,\n options: RecipeSchemaOptions = {},\n ): SchemaFn<TModel> {\n const timing = options.timing ?? NOOP_TIMING;\n const nodes = recipe.nodes as unknown as readonly FormNode<AnyModel>[];\n const recipeReadonly = recipe.readonly as RuleWhen | undefined;\n return (path: SchemaPathTree<TModel>) => {\n const root = path as unknown as AnySchemaPathTree;\n const inherited = RecipeSchema.extend(NO_INHERITED, recipeReadonly, undefined);\n RecipeSchema.applyNodes(root, root, nodes, timing, inherited);\n recipe.extraRules?.(path);\n };\n }\n\n /** Identifiant d'un nœud `linked`, porté par ses erreurs pour les retrouver sous le bon groupe. */\n static linkedId(node: { readonly keys: readonly string[] }): string {\n return node.keys.join('+');\n }\n\n private static applyNodes(\n root: AnySchemaPathTree,\n path: AnySchemaPathTree,\n nodes: readonly FormNode<AnyModel>[],\n timing: ValidationTiming,\n inherited: Inherited,\n ): void {\n for (const node of nodes) {\n switch (node.kind) {\n case NodeKindEnum.SECTION:\n RecipeSchema.applyNodes(\n root,\n path,\n node.nodes,\n timing,\n RecipeSchema.extend(inherited, node.readonly, node.hidden),\n );\n break;\n case NodeKindEnum.ROW:\n RecipeSchema.applyNodes(root, path, node.nodes, timing, inherited);\n break;\n case NodeKindEnum.SECTION_GROUP:\n for (const section of node.sections) {\n RecipeSchema.applyNodes(\n root,\n path,\n section.nodes,\n timing,\n RecipeSchema.extend(inherited, section.readonly, section.hidden),\n );\n }\n break;\n case NodeKindEnum.FIELD: {\n const child = RecipePaths.child(path, node.key);\n RecipeSchema.applyRules(root, child, node.rules, node.key, timing);\n RecipeSchema.applyInherited(root, child, inherited);\n break;\n }\n case NodeKindEnum.LINKED:\n RecipeSchema.applyLinked(root, path, node, timing, inherited);\n break;\n case NodeKindEnum.ARRAY: {\n const list = RecipePaths.child(path, node.key);\n RecipeSchema.applyArrayRules(root, list, node);\n RecipeSchema.applyInherited(root, list, inherited);\n applyEach(RecipePaths.asList(list), (item) =>\n RecipeSchema.applyNodes(root, RecipePaths.tree(item), node.item, timing, inherited),\n );\n break;\n }\n }\n }\n }\n\n private static extend(\n inherited: Inherited,\n readonlyWhen: RuleWhen | undefined,\n hiddenWhen: RuleWhen | undefined,\n ): Inherited {\n if (readonlyWhen === undefined && hiddenWhen === undefined) {\n return inherited;\n }\n return {\n readonly:\n readonlyWhen === undefined ? inherited.readonly : [...inherited.readonly, readonlyWhen],\n hidden: hiddenWhen === undefined ? inherited.hidden : [...inherited.hidden, hiddenWhen],\n };\n }\n\n /** Lecture seule et masquage hérités : posés sur chaque champ, chaque clé liée et chaque liste. */\n private static applyInherited(\n root: AnySchemaPathTree,\n path: AnySchemaPath,\n inherited: Inherited,\n ): void {\n if (inherited.readonly.length > 0) {\n const whens = inherited.readonly;\n readonly(path, {\n when: (ctx) => whens.some((when) => when(RecipeRuleContexts.fromField(root, ctx))),\n });\n }\n if (inherited.hidden.length > 0) {\n const whens = inherited.hidden;\n hidden(path, {\n when: (ctx) => whens.some((when) => when(RecipeRuleContexts.fromField(root, ctx))),\n });\n }\n }\n\n private static bind(root: AnySchemaPathTree, when: RuleWhen): FieldWhen {\n return (ctx) => when(RecipeRuleContexts.fromField(root, ctx));\n }\n\n private static bindOptional(\n root: AnySchemaPathTree,\n when: RuleWhen | undefined,\n ): FieldWhen | undefined {\n return when === undefined ? undefined : RecipeSchema.bind(root, when);\n }\n\n private static applyRules(\n root: AnySchemaPathTree,\n path: AnySchemaPath,\n rules: readonly AnyRuleDef<unknown, AnyModel>[] | undefined,\n name: string,\n timing: ValidationTiming,\n ): void {\n for (const rule of rules ?? []) {\n const asyncRule = RecipeSchema.asyncVariant(root, rule, name);\n if (asyncRule !== undefined) {\n RecipeAsyncRule.apply(path, asyncRule, timing);\n continue;\n }\n RecipeSchema.applySyncRule(root, path, rule, name, timing);\n }\n }\n\n /** Une règle de forme déclarée `mode: 'async'` est remplacée par son validateur serveur. */\n private static asyncVariant(\n root: AnySchemaPathTree,\n rule: AnyRuleDef<unknown, AnyModel>,\n name: string,\n ): AsyncRuleInput | undefined {\n if ('mode' in rule && rule.mode === RuleModeEnum.ASYNC) {\n return {\n name: `${name}.${rule.rule}`,\n validator: rule.validator,\n debounce: rule.debounce,\n when: RecipeSchema.bindOptional(root, 'when' in rule ? rule.when : undefined),\n };\n }\n return undefined;\n }\n\n private static applySyncRule(\n root: AnySchemaPathTree,\n path: AnySchemaPath,\n rule: AnyRuleDef<unknown, AnyModel>,\n name: string,\n timing: ValidationTiming,\n ): void {\n switch (rule.rule) {\n case RuleTypeEnum.REQUIRED: {\n const when = RecipeSchema.bindOptional(root, rule.when);\n required(path, when === undefined ? undefined : { when });\n break;\n }\n case RuleTypeEnum.PATTERN:\n pattern(RecipePaths.asString(path), rule.value);\n break;\n case RuleTypeEnum.MIN: {\n const value = rule.value;\n min(RecipePaths.asNumber(path), typeof value === 'function' ? () => value() : value);\n break;\n }\n case RuleTypeEnum.MAX: {\n const value = rule.value;\n max(RecipePaths.asNumber(path), typeof value === 'function' ? () => value() : value);\n break;\n }\n case RuleTypeEnum.MIN_LENGTH: {\n const value = rule.value;\n minLength(RecipePaths.asString(path), typeof value === 'function' ? () => value() : value);\n break;\n }\n case RuleTypeEnum.MAX_LENGTH: {\n const value = rule.value;\n maxLength(RecipePaths.asString(path), typeof value === 'function' ? () => value() : value);\n break;\n }\n case RuleTypeEnum.MIN_DATE: {\n const value = rule.value;\n minDate(RecipePaths.asDate(path), typeof value === 'function' ? () => value() : value);\n break;\n }\n case RuleTypeEnum.MAX_DATE: {\n const value = rule.value;\n maxDate(RecipePaths.asDate(path), typeof value === 'function' ? () => value() : value);\n break;\n }\n case RuleTypeEnum.EMAIL:\n email(RecipePaths.asString(path));\n break;\n case RuleTypeEnum.VALIDATE: {\n const when = RecipeSchema.bindOptional(root, rule.when);\n const fn = rule.fn;\n validate(path, (ctx) =>\n when !== undefined && !when(ctx)\n ? undefined\n : fn(ctx.value(), RecipeRuleContexts.fromField(root, ctx)),\n );\n break;\n }\n case RuleTypeEnum.WARN: {\n const when = RecipeSchema.bindOptional(root, rule.when);\n const fn = rule.fn;\n metadata(path, FORM_WARNINGS, (ctx) =>\n when !== undefined && !when(ctx)\n ? undefined\n : fn(ctx.value(), RecipeRuleContexts.fromField(root, ctx)),\n );\n break;\n }\n case RuleTypeEnum.SERVER:\n RecipeAsyncRule.apply(\n path,\n {\n name: rule.name ?? `${name}.server`,\n validator: rule.validator,\n debounce: rule.debounce,\n when: RecipeSchema.bindOptional(root, rule.when),\n dependencies: RecipeRuleContexts.dependencies(root, rule.dependsOn),\n },\n timing,\n );\n break;\n case RuleTypeEnum.DISABLED: {\n const when = RecipeSchema.bind(root, rule.when);\n const reason = rule.reasonKey;\n disabled(path, { when: (ctx) => (when(ctx) ? (reason ?? true) : false) });\n break;\n }\n case RuleTypeEnum.HIDDEN: {\n const when = RecipeSchema.bind(root, rule.when);\n hidden(path, { when });\n break;\n }\n case RuleTypeEnum.READONLY: {\n const when = RecipeSchema.bind(root, rule.when);\n readonly(path, { when });\n break;\n }\n }\n }\n\n /**\n * Règles portées par la liste entière : un `validateTree` sur le chemin de la liste ; les erreurs,\n * sans `fieldTree`, se posent sur la liste elle-même et comptent dans `invalid()` du formulaire.\n */\n private static applyArrayRules(\n root: AnySchemaPathTree,\n list: AnySchemaPath,\n node: ArrayNode<AnyModel>,\n ): void {\n const rules = node.rules;\n if (rules === undefined || rules.length === 0) {\n return;\n }\n validateTree(list, (ctx) => {\n const ruleContext = RecipeRuleContexts.fromField(root, ctx);\n const items = ctx.value() as readonly ArrayItem[];\n const errors: RecipeValidationError[] = [];\n for (const rule of rules) {\n if (rule.when !== undefined && !rule.when(ruleContext)) {\n continue;\n }\n const error = RecipeSchema.arrayRuleError(rule, items, ruleContext);\n if (error !== undefined) {\n errors.push(error);\n }\n }\n return errors;\n });\n }\n\n private static arrayRuleError(\n rule: ArrayRuleDef<unknown, AnyModel>,\n items: readonly ArrayItem[],\n ctx: RecipeRuleContext<AnyModel>,\n ): RecipeValidationError | undefined {\n switch (rule.rule) {\n case RuleTypeEnum.MIN_ITEMS:\n return items.length < rule.value\n ? RecipeSchema.error(RuleTypeEnum.MIN_ITEMS, { minItems: rule.value })\n : undefined;\n case RuleTypeEnum.MAX_ITEMS:\n return items.length > rule.value\n ? RecipeSchema.error(RuleTypeEnum.MAX_ITEMS, { maxItems: rule.value })\n : undefined;\n case RuleTypeEnum.UNIQUE: {\n const seen = new Set<string>();\n for (const item of items) {\n const value = rule.by(item);\n if (seen.has(value)) {\n return RecipeSchema.error(RuleTypeEnum.UNIQUE, { duplicate: value });\n }\n seen.add(value);\n }\n return undefined;\n }\n case RuleTypeEnum.VALIDATE: {\n const kind = rule.fn(items, ctx);\n return kind === null ? undefined : { kind };\n }\n }\n }\n\n /** Erreur dont les bornes servent de paramètres d'interpolation au message (`{{minItems}}`). */\n private static error(kind: string, params: Record<string, unknown>): RecipeValidationError {\n return { kind, ...params };\n }\n\n /**\n * Contrôles liés. Les règles propres à chaque champ d'un `group` restent sur le champ.\n * Règle synchrone : `validate` sur `errorTarget`, ou `validateTree` sur le parent (`'group'`), en lisant\n * toutes les valeurs liées par `ctx.valueOf` pour se relancer dès que l'une change.\n */\n private static applyLinked(\n root: AnySchemaPathTree,\n parent: AnySchemaPathTree,\n node: LinkedNode<AnyModel>,\n timing: ValidationTiming,\n inherited: Inherited,\n ): void {\n const linkedId = RecipeSchema.linkedId(node);\n for (const key of node.keys) {\n const child = RecipePaths.child(parent, key);\n if (node.control.type === LinkedControlTypeEnum.GROUP) {\n RecipeSchema.applyRules(root, child, node.control.fields[key]?.rules, key, timing);\n } else if (node.control.required === true) {\n required(child);\n }\n RecipeSchema.applyInherited(root, child, inherited);\n }\n const collect = (ctx: AnyFieldContext): Record<string, unknown> =>\n Object.fromEntries(\n node.keys.map((key) => [key, ctx.valueOf(RecipePaths.child(parent, key))]),\n );\n const target =\n node.errorTarget === undefined || node.errorTarget === 'group'\n ? undefined\n : RecipePaths.child(parent, node.errorTarget);\n for (const rule of node.rules ?? []) {\n const when = RecipeSchema.bindOptional(root, rule.when);\n if (rule.rule === RuleTypeEnum.SERVER) {\n const validator = rule.validator as AsyncRuleInput['validator'];\n RecipeAsyncRule.apply(\n target ?? parent,\n {\n name: rule.name ?? `${linkedId}.server`,\n validator,\n debounce: rule.debounce,\n when,\n dependencies: RecipeRuleContexts.dependencies(root, rule.dependsOn),\n linkedId,\n },\n timing,\n collect,\n );\n continue;\n }\n const fn = rule.fn;\n const logic = (ctx: AnyFieldContext): LinkedValidationError | undefined => {\n if (when !== undefined && !when(ctx)) {\n return undefined;\n }\n const error = fn(collect(ctx), RecipeRuleContexts.fromField(root, ctx));\n return error === undefined ? undefined : { ...error, linkedId };\n };\n if (target === undefined) {\n validateTree(parent, logic);\n } else {\n validate(target, logic);\n }\n }\n }\n}\n","import { NodeKindEnum } from '../enums/node-kind.enum';\nimport { AnyModel } from '../interfaces/any-model.interface';\nimport { ArrayItem } from '../interfaces/array-item.interface';\nimport { FormNode } from '../interfaces/form-node.interface';\nimport { RecipeServerError } from '../interfaces/recipe-server-error.interface';\nimport { RecipeServerSnapshot } from '../interfaces/recipe-server-snapshot.interface';\nimport { RecipeServerValidationError } from '../interfaces/recipe-server-validation-error.interface';\nimport { FORM_SERVER_ERROR_KIND } from '../constants/form-server-error-kind.constants';\n\nconst SEGMENT = /([^.[\\]]+)|\\[(\\d+)\\]/g;\n\n/**\n * Erreurs serveur par chemin. Un chemin du corps envoyé (`dates[2].date`) est normalisé\n * en remplaçant chaque position par la clé de l'élément mémorisée à l'envoi (`dates[k3].date`), puis comparé aux\n * chemins déclarés par les champs (`serverPaths`, défaut `[key]`, préfixés par `dates[k3].` dans un élément).\n */\nexport class RecipeServerPaths {\n /** Clés des éléments de chaque liste au moment de l'envoi, par chemin normalisé (`dates`, `dates[k1].slots`…). */\n static snapshot(nodes: readonly FormNode<AnyModel>[], model: AnyModel): RecipeServerSnapshot {\n const snapshot = new Map<string, readonly string[]>();\n RecipeServerPaths.collect(nodes, model, '', snapshot);\n return snapshot;\n }\n\n /** Formes statiques des chemins que la recette sait placer : `name`, `dates`, `dates[].date`, `address.postalCode`. */\n static shapes(nodes: readonly FormNode<AnyModel>[]): ReadonlySet<string> {\n const shapes = new Set<string>();\n RecipeServerPaths.collectShapes(nodes, '', shapes);\n return shapes;\n }\n\n /** `dates[k3].date` → `dates[].date`. */\n static shapeOf(path: string): string {\n return path.replace(/\\[[^\\]]*\\]/g, '[]');\n }\n\n /**\n * Remplace chaque position par la clé mémorisée ; sans mémoire pour cette liste (appel hors soumission),\n * les clés actuelles servent. Renvoie `undefined` quand une position est hors limites.\n */\n static normalize(\n field: string,\n snapshot: RecipeServerSnapshot,\n current: () => RecipeServerSnapshot,\n ): string | undefined {\n let path = '';\n for (const match of field.matchAll(SEGMENT)) {\n const [, name, index] = match;\n if (name !== undefined) {\n path = path === '' ? name : `${path}.${name}`;\n continue;\n }\n const keys = snapshot.get(path) ?? current().get(path);\n const key = keys?.[Number(index)];\n if (key === undefined) {\n return undefined;\n }\n path = `${path}[${key}]`;\n }\n return path;\n }\n\n /**\n * Répartit les erreurs : par chemin normalisé quand la forme du chemin est connue de la recette,\n * sinon dans `unplaced` (affichées par l'appelant). Une erreur n'est « non placée » que si aucun de ses chemins ne l'est.\n */\n static place(\n errors: readonly RecipeServerError[],\n shapes: ReadonlySet<string>,\n snapshot: RecipeServerSnapshot,\n current: () => RecipeServerSnapshot,\n ): {\n readonly placed: ReadonlyMap<string, readonly RecipeServerValidationError[]>;\n readonly unplaced: readonly RecipeServerError[];\n } {\n const placed = new Map<string, RecipeServerValidationError[]>();\n const unplaced: RecipeServerError[] = [];\n for (const error of errors) {\n let count = 0;\n for (const field of error.fields) {\n const path = RecipeServerPaths.normalize(field, snapshot, current);\n if (path === undefined || !shapes.has(RecipeServerPaths.shapeOf(path))) {\n continue;\n }\n count += 1;\n const list = placed.get(path) ?? [];\n list.push({ kind: FORM_SERVER_ERROR_KIND, code: error.code, message: error.message });\n placed.set(path, list);\n }\n if (count === 0) {\n unplaced.push(error);\n }\n }\n return { placed, unplaced };\n }\n\n /** Même contenu (type, code, message), pour ne pas relancer la règle de vie quand la carte est reconstruite. */\n static sameErrors(\n a: readonly RecipeServerValidationError[],\n b: readonly RecipeServerValidationError[],\n ): boolean {\n return (\n a.length === b.length &&\n a.every((error, index) => {\n const other = b[index];\n return (\n other !== undefined &&\n error.kind === other.kind &&\n error.code === other.code &&\n error.message === other.message\n );\n })\n );\n }\n\n /** Erreurs d'un champ dont les chemins complets (`préfixe.chemin`) sont donnés. */\n static errorsFor(\n placed: ReadonlyMap<string, readonly RecipeServerValidationError[]>,\n paths: readonly string[],\n ): readonly RecipeServerValidationError[] {\n return paths.flatMap((path) => placed.get(path) ?? []);\n }\n\n /** Chemins complets d'un nœud : `serverPaths` (défaut `[key]`), préfixés par celui de l'élément conteneur. */\n static fullPaths(\n prefix: string,\n key: string,\n serverPaths: readonly string[] | undefined,\n ): readonly string[] {\n return (serverPaths ?? [key]).map((path) => (prefix === '' ? path : `${prefix}.${path}`));\n }\n\n private static collect(\n nodes: readonly FormNode<AnyModel>[],\n model: AnyModel,\n prefix: string,\n snapshot: Map<string, readonly string[]>,\n ): void {\n for (const node of nodes) {\n switch (node.kind) {\n case NodeKindEnum.SECTION:\n case NodeKindEnum.ROW:\n RecipeServerPaths.collect(node.nodes, model, prefix, snapshot);\n break;\n case NodeKindEnum.SECTION_GROUP:\n for (const section of node.sections) {\n RecipeServerPaths.collect(section.nodes, model, prefix, snapshot);\n }\n break;\n case NodeKindEnum.ARRAY: {\n const items = (model[node.key] as readonly (ArrayItem & AnyModel)[] | undefined) ?? [];\n const keys = items.map((item) => item.key);\n for (const path of RecipeServerPaths.fullPaths(prefix, node.key, node.serverPaths)) {\n snapshot.set(path, keys);\n for (const item of items) {\n RecipeServerPaths.collect(node.item, item, `${path}[${item.key}]`, snapshot);\n }\n }\n break;\n }\n default:\n break;\n }\n }\n }\n\n private static collectShapes(\n nodes: readonly FormNode<AnyModel>[],\n prefix: string,\n shapes: Set<string>,\n ): void {\n for (const node of nodes) {\n switch (node.kind) {\n case NodeKindEnum.SECTION:\n case NodeKindEnum.ROW:\n RecipeServerPaths.collectShapes(node.nodes, prefix, shapes);\n break;\n case NodeKindEnum.SECTION_GROUP:\n for (const section of node.sections) {\n RecipeServerPaths.collectShapes(section.nodes, prefix, shapes);\n }\n break;\n case NodeKindEnum.FIELD:\n RecipeServerPaths.fullPaths(prefix, node.key, node.serverPaths).forEach((p) =>\n shapes.add(p),\n );\n break;\n case NodeKindEnum.LINKED:\n for (const key of node.keys) {\n const def = 'fields' in node.control ? node.control.fields[key] : undefined;\n RecipeServerPaths.fullPaths(prefix, key, def?.serverPaths).forEach((p) =>\n shapes.add(p),\n );\n }\n break;\n case NodeKindEnum.ARRAY:\n for (const path of RecipeServerPaths.fullPaths(prefix, node.key, node.serverPaths)) {\n shapes.add(path);\n RecipeServerPaths.collectShapes(node.item, `${path}[]`, shapes);\n }\n break;\n }\n }\n }\n}\n","import { FieldTree } from '@angular/forms/signals';\nimport { NodeKindEnum } from '../enums/node-kind.enum';\nimport { AnyModel } from '../interfaces/any-model.interface';\nimport { FirstInvalidField } from '../interfaces/first-invalid-field.interface';\nimport { FormNode } from '../interfaces/form-node.interface';\nimport { SectionErrorCountInput } from '../interfaces/section-error-count-input.interface';\nimport { RecipeServerPaths } from './recipe-server-paths.utils';\n\ntype Visit = (key: string, sections: readonly string[]) => void;\n\n/** Chemin serveur déclaré par un nœud, avec la clé du modèle qu'il vise ; `list` : ses éléments en dépendent aussi. */\ninterface ServerClaim {\n readonly path: string;\n readonly key: string;\n readonly list: boolean;\n}\n\n/**\n * Sections d'une recette : index des clés par section, compteur de champs en erreur, premier champ\n * en erreur avec les sections à ouvrir. Pur : travaille sur les nœuds et le `FieldTree`.\n */\nexport class RecipeSections {\n /** Clés de chaque section (identifiant → clés), sous-sections comprises ; une section sans champ a une liste vide. */\n static index(nodes: readonly FormNode<AnyModel>[]): ReadonlyMap<string, readonly string[]> {\n const index = new Map<string, string[]>();\n RecipeSections.walk(\n nodes,\n [],\n (key, sections) => {\n for (const id of sections) {\n index.get(id)?.push(key);\n }\n },\n (id) => {\n if (!index.has(id)) {\n index.set(id, []);\n }\n },\n );\n return index;\n }\n\n /**\n * Nombre de champs en erreur : champs touchés ou après une tentative de soumission, champs cachés ignorés,\n * erreur d'un groupe lié comptée une fois, erreurs serveur comprises.\n */\n static errorCount(input: SectionErrorCountInput): number {\n const found = new Set<unknown>();\n const keys = new Set(input.keys);\n for (const key of input.keys) {\n const child = input.tree[key];\n if (child === undefined) {\n continue;\n }\n const state = child();\n if (state.hidden()) {\n continue;\n }\n for (const error of state.errorSummary()) {\n const errorState = error.fieldTree();\n if (!errorState.hidden() && (errorState.touched() || input.submitted)) {\n found.add(error.fieldTree);\n }\n }\n }\n for (const error of input.tree().errors()) {\n if ('linkedId' in error && typeof error.linkedId === 'string') {\n const linkedKeys = error.linkedId.split('+');\n const touched =\n input.submitted || linkedKeys.every((key) => input.tree[key]?.().touched() === true);\n if (touched && linkedKeys.every((key) => keys.has(key))) {\n found.add(error.linkedId);\n }\n }\n }\n for (const [path, key] of input.serverErrorKeys ?? []) {\n if (keys.has(key)) {\n found.add(`server:${path}`);\n }\n }\n return found.size;\n }\n\n /** Premier champ invalide (ou visé par une erreur serveur), dans l'ordre de la recette, avec ses sections parentes. */\n static firstInvalid(\n nodes: readonly FormNode<AnyModel>[],\n tree: FieldTree<AnyModel>,\n serverErrorPaths: Iterable<string> = [],\n ): FirstInvalidField | undefined {\n const serverKeys = new Set(RecipeSections.serverKeys(nodes, serverErrorPaths).values());\n let found: FirstInvalidField | undefined;\n const stacks = new Map<string, readonly string[]>();\n RecipeSections.walk(nodes, [], (key, sections) => {\n stacks.set(key, sections);\n if (found !== undefined) {\n return;\n }\n const child = tree[key];\n if (child === undefined) {\n return;\n }\n const state = child();\n if (!state.hidden() && (state.invalid() || serverKeys.has(key))) {\n found = { key, sections };\n }\n });\n if (found !== undefined) {\n return found;\n }\n for (const error of tree().errors()) {\n if ('linkedId' in error && typeof error.linkedId === 'string') {\n const [key] = error.linkedId.split('+');\n if (key !== undefined) {\n return { key, sections: stacks.get(key) ?? [] };\n }\n }\n }\n return undefined;\n }\n\n /**\n * Clé du modèle visée par chaque chemin serveur normalisé : celle du nœud qui déclare ce chemin (`serverPaths`,\n * par défaut la clé : `address.street` → `street`), ou celle de la liste dont il désigne un élément\n * (`dates[k3].date` → `dates`). Un chemin qu'aucun nœud ne déclare est absent de la carte.\n */\n static serverKeys(\n nodes: readonly FormNode<AnyModel>[],\n paths: Iterable<string>,\n ): ReadonlyMap<string, string> {\n const claims = RecipeSections.claims(nodes);\n const keys = new Map<string, string>();\n for (const path of paths) {\n const claim = claims.find(\n (candidate) =>\n candidate.path === path || (candidate.list && path.startsWith(`${candidate.path}[`)),\n );\n if (claim !== undefined) {\n keys.set(path, claim.key);\n }\n }\n return keys;\n }\n\n private static claims(nodes: readonly FormNode<AnyModel>[]): ServerClaim[] {\n return nodes.flatMap((node): ServerClaim[] => {\n switch (node.kind) {\n case NodeKindEnum.SECTION:\n case NodeKindEnum.ROW:\n return RecipeSections.claims(node.nodes);\n case NodeKindEnum.SECTION_GROUP:\n return node.sections.flatMap((section) => RecipeSections.claims(section.nodes));\n case NodeKindEnum.FIELD:\n return RecipeServerPaths.fullPaths('', node.key, node.serverPaths).map((path) => ({\n path,\n key: node.key,\n list: false,\n }));\n case NodeKindEnum.ARRAY:\n return RecipeServerPaths.fullPaths('', node.key, node.serverPaths).map((path) => ({\n path,\n key: node.key,\n list: true,\n }));\n case NodeKindEnum.LINKED:\n return node.keys.flatMap((key) => {\n const def = 'fields' in node.control ? node.control.fields[key] : undefined;\n return RecipeServerPaths.fullPaths('', key, def?.serverPaths).map((path) => ({\n path,\n key,\n list: false,\n }));\n });\n }\n });\n }\n\n private static walk(\n nodes: readonly FormNode<AnyModel>[],\n sections: readonly string[],\n visit: Visit,\n enter?: (id: string) => void,\n ): void {\n for (const node of nodes) {\n switch (node.kind) {\n case NodeKindEnum.SECTION:\n enter?.(node.id);\n RecipeSections.walk(node.nodes, [...sections, node.id], visit, enter);\n break;\n case NodeKindEnum.ROW:\n RecipeSections.walk(node.nodes, sections, visit, enter);\n break;\n case NodeKindEnum.SECTION_GROUP:\n for (const section of node.sections) {\n enter?.(section.id);\n RecipeSections.walk(section.nodes, [...sections, section.id], visit, enter);\n }\n break;\n case NodeKindEnum.FIELD:\n case NodeKindEnum.ARRAY:\n visit(node.key, sections);\n break;\n case NodeKindEnum.LINKED:\n for (const key of node.keys) {\n visit(key, sections);\n }\n break;\n }\n }\n }\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, inject, input, output } from '@angular/core';\nimport { ButtonVariantEnum } from '../../enums/button-variant.enum';\nimport { RecipeUiPartEnum } from '../../enums/recipe-ui-part.enum';\nimport { SeverityEnum } from '../../enums/severity.enum';\nimport { RecipeButtonContext } from '../../interfaces/recipe-button-context.interface';\nimport { RecipeUi } from '../../services/recipe-ui.service';\n\n/** Bouton du moteur (ajout et retrait d'un élément d'`array`), rendu par le gabarit `appRecipeButton` du registre. */\n@Component({\n selector: 'app-recipe-button',\n imports: [NgTemplateOutlet],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `<ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"context()\" />`,\n})\nexport class RecipeButtonComponent {\n readonly label = input.required<string>();\n readonly variant = input<ButtonVariantEnum>(ButtonVariantEnum.FILLED);\n readonly severity = input<SeverityEnum>(SeverityEnum.PRIMARY);\n readonly clicked = output<void>();\n\n protected readonly template = inject(RecipeUi).template(RecipeUiPartEnum.BUTTON);\n protected readonly context = computed((): RecipeButtonContext => ({\n $implicit: this.label(),\n variant: this.variant(),\n severity: this.severity(),\n click: () => this.clicked.emit(),\n }));\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, inject, input } from '@angular/core';\nimport { RecipeUiPartEnum } from '../../enums/recipe-ui-part.enum';\nimport { SeverityEnum } from '../../enums/severity.enum';\nimport { RecipeMessageContext } from '../../interfaces/recipe-message-context.interface';\nimport { RecipeUi } from '../../services/recipe-ui.service';\n\n/**\n * Message du moteur rendu par le gabarit `appRecipeMessage` du registre. L'élément porte l'identifiant que le champ\n * vise par `aria-describedby` et les classes de placement du moteur ; le texte arrive traduit.\n */\n@Component({\n selector: 'app-recipe-message',\n imports: [NgTemplateOutlet],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'block' },\n template: `<ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"context()\" />`,\n})\nexport class RecipeMessageComponent {\n readonly text = input.required<string>();\n readonly severity = input<SeverityEnum>(SeverityEnum.INFO);\n readonly inline = input(false);\n\n protected readonly template = inject(RecipeUi).template(RecipeUiPartEnum.MESSAGE);\n protected readonly context = computed((): RecipeMessageContext => ({\n $implicit: this.text(),\n severity: this.severity(),\n inline: this.inline(),\n }));\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n input,\n isDevMode,\n linkedSignal,\n Signal,\n TemplateRef,\n untracked,\n} from '@angular/core';\nimport { FieldTree } from '@angular/forms/signals';\nimport { FORM_VALIDATION_UNAVAILABLE } from '../../constants/form-validation-unavailable-key.constants';\nimport { FORM_VALIDATION_UNAVAILABLE_MESSAGE } from '../../constants/form-validation-unavailable-message.constants';\nimport { FORM_WARNINGS } from '../../constants/form-warnings-key.constants';\nimport { ControlTypeEnum } from '../../enums/control-type.enum';\nimport { SeverityEnum } from '../../enums/severity.enum';\nimport { AnyModel } from '../../interfaces/any-model.interface';\nimport { FieldHintDef } from '../../interfaces/field-hint-def.interface';\nimport { FieldMessage } from '../../interfaces/field-message.interface';\nimport { FieldNode } from '../../interfaces/field-node.interface';\nimport { RecipeCheckboxControlContext } from '../../interfaces/recipe-checkbox-control-context.interface';\nimport { RecipeControlContext } from '../../interfaces/recipe-control-context.interface';\nimport { RecipeDateMultipleControlContext } from '../../interfaces/recipe-date-multiple-control-context.interface';\nimport { RecipeNumberControlContext } from '../../interfaces/recipe-number-control-context.interface';\nimport { RecipeSelectControlContext } from '../../interfaces/recipe-select-control-context.interface';\nimport { RecipeSelectOption } from '../../interfaces/recipe-select-option.interface';\nimport { RecipeServerValidationError } from '../../interfaces/recipe-server-validation-error.interface';\nimport { RecipeSlotContext } from '../../interfaces/recipe-slot-context.interface';\nimport { RecipeTextControlContext } from '../../interfaces/recipe-text-control-context.interface';\nimport { SelectOption } from '../../interfaces/select-option.interface';\nimport { RecipeTranslatePipe } from '../../pipes/recipe-translate.pipe';\nimport { RecipeFormContext } from '../../services/recipe-form-context.service';\nimport { RecipeUi } from '../../services/recipe-ui.service';\nimport { RECIPE_FORM_TRANSLATION_CHANGES } from '../../tokens/recipe-form-translation-changes.token';\nimport { RECIPE_FORM_TRANSLATOR } from '../../tokens/recipe-form-translator.token';\nimport { RecipeMessageComponent } from '../recipe-message/recipe-message';\nimport { RecipeLayout } from '../../utils/recipe-layout.utils';\nimport { RecipeMessages } from '../../utils/recipe-messages.utils';\nimport { RecipeServerPaths } from '../../utils/recipe-server-paths.utils';\n\n/**\n * Un champ : libellé relié par `for`/`id`, contrôle rendu par le gabarit du registre (`RecipeUi` : celui de l'hôte,\n * sinon celui par défaut), qui lie le wrapper par `[formField]`, message d'erreur relié par `aria-describedby`, avertissements non\n * bloquants, erreurs et avertissements serveur placés par chemin et effacés dès que la valeur change.\n * La liste et le calendrier ne sont pas des champs natifs : `aria-labelledby` et `aria-label` les nomment.\n * Un champ `hidden` n'est pas rendu ; `hideLabel` masque visuellement le libellé (cellule d'un `array` en table).\n * Sous le contrôle : l'aide (`hintKey`), puis la raison d'une règle `disabled` active (`reasonKey`), au même style ;\n * l'aide reste en place quand la raison apparaît ou disparaît. Un champ en lecture seule n'a ni astérisque ni aide.\n */\n@Component({\n selector: 'app-recipe-field',\n imports: [NgTemplateOutlet, RecipeTranslatePipe, RecipeMessageComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { '[class]': 'hostClasses()' },\n templateUrl: './recipe-field.html',\n})\nexport class RecipeFieldComponent {\n readonly node = input.required<FieldNode<AnyModel>>();\n readonly field = input.required<FieldTree<unknown>>();\n readonly idPrefix = input.required<string>();\n /** Chemin serveur de l'élément conteneur (`dates[k3]`), vide à la racine. */\n readonly serverPrefix = input<string>('');\n readonly hideLabel = input<boolean>(false);\n /** Cellule de tableau : le contrôle puis son libellé sur une ligne, centrés sur la hauteur d'un champ de saisie. */\n readonly inline = input<boolean>(false);\n /** Message du groupe lié dont ce champ est la cible (`errorTarget`). */\n readonly extraMessage = input<FieldMessage>();\n /** Identifiant d'un message de groupe affiché ailleurs, à relier au champ. */\n readonly extraDescribedBy = input<string>();\n\n private readonly context =\n inject(RecipeFormContext, { optional: true }) ?? new RecipeFormContext();\n\n private readonly translator = inject(RECIPE_FORM_TRANSLATOR);\n private readonly translationChanges = inject(RECIPE_FORM_TRANSLATION_CHANGES);\n private readonly ui = inject(RecipeUi);\n\n protected readonly types = ControlTypeEnum;\n protected readonly severities = SeverityEnum;\n\n /**\n * Options d'un `select`, copiées dans un tableau (la recette les donne en lecture seule) ; une option `labelKey`\n * devient une `SelectOption` dont `label` est sa traduction. Recalculées à chaque changement des options et à\n * chaque chargement de traductions de l'hôte (`RECIPE_FORM_TRANSLATION_CHANGES`).\n */\n protected readonly selectOptions = computed((): SelectOption<unknown>[] => {\n const control = this.node().control;\n if (control.type !== ControlTypeEnum.SELECT) {\n return [];\n }\n this.translationChanges();\n return control.options().map((option) => this.wrapperOption(option));\n });\n\n protected readonly state = computed(() => this.field()());\n protected readonly inputId = computed(() => `${this.idPrefix()}-${this.node().key}`);\n protected readonly labelId = computed(() => `${this.inputId()}-label`);\n protected readonly messageId = computed(() => `${this.inputId()}-message`);\n protected readonly hintId = computed(() => `${this.inputId()}-hint`);\n protected readonly reasonId = computed(() => `${this.inputId()}-reason`);\n protected readonly warningsId = computed(() => `${this.inputId()}-warnings`);\n\n /** Clés `reasonKey` des règles `disabled` actives, sans doublon ; vide dès que le champ est réactivé. */\n protected readonly disabledReasonKeys = computed((): readonly string[] => [\n ...new Set(\n this.state()\n .disabledReasons()\n .flatMap((reason) => (reason.message === undefined ? [] : [reason.message])),\n ),\n ]);\n\n protected readonly hostClasses = computed(\n () =>\n `${RecipeLayout.item(this.node())} ${this.state().hidden() ? 'hidden' : 'flex min-w-0 flex-col gap-1.5'}`,\n );\n\n /** Les erreurs d'un groupe lié (`linkedId`) sont affichées par le groupe, pas par le champ. */\n protected readonly ownErrors = computed(() =>\n this.state()\n .errors()\n .filter((error) => !('linkedId' in error)),\n );\n\n private readonly serverPaths = computed(() =>\n RecipeServerPaths.fullPaths(this.serverPrefix(), this.node().key, this.node().serverPaths),\n );\n\n private readonly serverErrors = this.untilValueChanges(\n computed(() => RecipeServerPaths.errorsFor(this.context.serverErrors(), this.serverPaths()), {\n equal: RecipeServerPaths.sameErrors,\n }),\n );\n\n private readonly serverWarnings = this.untilValueChanges(\n computed(() => RecipeServerPaths.errorsFor(this.context.serverWarnings(), this.serverPaths()), {\n equal: RecipeServerPaths.sameErrors,\n }),\n );\n\n protected readonly message = computed((): FieldMessage | undefined => {\n const server = this.serverErrors();\n return (\n RecipeMessages.resolve({\n errors: [...this.ownErrors(), ...server],\n touched: this.state().touched() || server.length > 0,\n submitted: this.context.submitted(),\n fieldMessages: this.node().messages,\n recipeMessages: this.context.recipeMessages(),\n }) ?? this.extraMessage()\n );\n });\n\n /** Avertissements : règles `warn` (après interaction), avertissements serveur, validateur indisponible. */\n protected readonly warnings = computed((): readonly FieldMessage[] => {\n const state = this.state();\n const shown = state.touched() || this.context.submitted();\n const ruleWarnings = shown ? (state.metadata(FORM_WARNINGS)?.() ?? []) : [];\n const messages = RecipeMessages.forAll(\n [...ruleWarnings, ...this.serverWarnings()],\n this.node().messages,\n this.context.recipeMessages(),\n );\n return state.metadata(FORM_VALIDATION_UNAVAILABLE)?.() === true\n ? [...messages, { key: FORM_VALIDATION_UNAVAILABLE_MESSAGE }]\n : messages;\n });\n\n /**\n * Clé de l'aide affichée : absente sur un champ en lecture seule (sauf `showWhenReadonly`) et quand la condition\n * `when` est fausse ; `when` lit la racine au rendu, par le contexte du formulaire.\n */\n protected readonly hintKey = computed((): string | undefined => {\n const hint = this.node().hintKey;\n if (hint === undefined) {\n return undefined;\n }\n const def: FieldHintDef<AnyModel> = typeof hint === 'string' ? { key: hint } : hint;\n if (this.state().readonly() && def.showWhenReadonly !== true) {\n return undefined;\n }\n if (def.when !== undefined && !def.when(this.context.ruleContext())) {\n return undefined;\n }\n return def.key;\n });\n\n protected readonly describedBy = computed((): string | undefined => {\n const ids: string[] = [];\n if (this.hintKey() !== undefined) {\n ids.push(this.hintId());\n }\n if (this.disabledReasonKeys().length > 0) {\n ids.push(this.reasonId());\n }\n if (this.message() !== undefined) {\n ids.push(this.messageId());\n }\n if (this.warnings().length > 0) {\n ids.push(this.warningsId());\n }\n const extra = this.extraDescribedBy();\n if (extra !== undefined) {\n ids.push(extra);\n }\n return ids.length === 0 ? undefined : ids.join(' ');\n });\n\n /** `display` : valeur calculée depuis la racine (`compute`), valeur formatée (`format`), ou valeur brute. */\n protected readonly displayValue = computed((): string => {\n const control = this.node().control;\n if (control.type === ControlTypeEnum.DISPLAY && control.compute !== undefined) {\n return control.compute(this.context.rootTree()?.().value() ?? {});\n }\n const value = this.state().value();\n if (control.type === ControlTypeEnum.DISPLAY && control.format !== undefined) {\n return control.format(value);\n }\n if (value instanceof Date) {\n return value.toLocaleDateString();\n }\n return value === null || value === undefined ? '' : String(value);\n });\n\n /**\n * Gabarit du contrôle et son contexte, pour tout type sauf `display` et `slot`. Le contexte change d'objet à chaque\n * recalcul ; `ngTemplateOutlet` met alors la vue à jour sans la recréer, si bien que le contrôle garde son focus.\n */\n protected readonly control = computed(\n (): { readonly template: TemplateRef<unknown>; readonly context: object } | undefined => {\n const control = this.node().control;\n const base = {\n $implicit: this.field() as FieldTree<never>,\n inputId: this.inputId(),\n describedBy: this.describedBy(),\n };\n switch (control.type) {\n case ControlTypeEnum.TEXT:\n return {\n template: this.ui.template(control.type),\n context: {\n ...base,\n placeholder: control.placeholder ?? '',\n inputmode: control.inputmode ?? 'text',\n icon: control.icon,\n } satisfies RecipeTextControlContext,\n };\n case ControlTypeEnum.NUMBER:\n return {\n template: this.ui.template(control.type),\n context: {\n ...base,\n step: control.step,\n minFractionDigits: control.minFractionDigits,\n maxFractionDigits: control.maxFractionDigits,\n } satisfies RecipeNumberControlContext,\n };\n case ControlTypeEnum.SELECT:\n return {\n template: this.ui.template(control.type),\n context: {\n ...base,\n labelId: this.labelId(),\n options: this.selectOptions(),\n filter: control.filter ?? false,\n showClear: control.showClear ?? false,\n placeholder:\n control.placeholderKey === undefined ? '' : this.translator(control.placeholderKey),\n readonly: this.state().readonly(),\n } satisfies RecipeSelectControlContext,\n };\n case ControlTypeEnum.DATE_MULTIPLE:\n this.translationChanges();\n return {\n template: this.ui.template(control.type),\n context: {\n ...base,\n ariaLabel: this.translator(this.node().labelKey),\n maxDate: control.maxDate,\n months: control.months ?? 3,\n } satisfies RecipeDateMultipleControlContext,\n };\n case ControlTypeEnum.CHECKBOX:\n return {\n template: this.ui.template(control.type),\n context: {\n ...base,\n readonly: this.state().readonly(),\n } satisfies RecipeCheckboxControlContext,\n };\n case ControlTypeEnum.DATE:\n return {\n template: this.ui.template(control.type),\n context: base satisfies RecipeControlContext<never>,\n };\n default:\n return undefined;\n }\n },\n );\n\n protected readonly slotTemplate = computed((): TemplateRef<RecipeSlotContext> | undefined => {\n const control = this.node().control;\n if (control.type !== ControlTypeEnum.SLOT) {\n return undefined;\n }\n const template = this.context.slots().get(control.name);\n if (template === undefined && isDevMode()) {\n const slot = `<ng-template appRecipeSlot=\"${control.name}\">`;\n throw new Error(\n `[recipe-forms] slot « ${control.name} » introuvable : ajoutez ${slot} dans <app-recipe-form>`,\n );\n }\n return template;\n });\n\n protected readonly slotContext = computed((): RecipeSlotContext => ({\n $implicit: this.field(),\n inputId: this.inputId(),\n describedBy: this.describedBy(),\n }));\n\n /** Règle de vie du result pattern : les erreurs serveur reçues s'effacent dès que la valeur du champ change. */\n private untilValueChanges(\n source: Signal<readonly RecipeServerValidationError[]>,\n ): Signal<readonly RecipeServerValidationError[]> {\n const receipt = linkedSignal(() => ({\n errors: source(),\n value: untracked(() => this.state().value()),\n }));\n return computed(() => {\n const received = receipt();\n return received.errors.length > 0 &&\n RecipeFieldComponent.sameValue(received.value, this.state().value())\n ? received.errors\n : [];\n });\n }\n\n /** Option passée au wrapper : `label` tel quel, ou traduction de `labelKey` (prioritaire si les deux sont donnés). */\n private wrapperOption(option: RecipeSelectOption<unknown>): SelectOption<unknown> {\n if (!('labelKey' in option)) {\n return option;\n }\n const { labelKey, ...rest } = option;\n return { ...rest, label: this.translator(labelKey) };\n }\n\n private static sameValue(a: unknown, b: unknown): boolean {\n if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime();\n }\n return Object.is(a, b);\n }\n}\n","@let n = node();\n@let s = state();\n@if (!s.hidden()) {\n @if (inline()) {\n <!-- En ligne (cellule de tableau) : le contrôle, centré sur la hauteur d'un champ de saisie, puis son libellé. -->\n <div class=\"flex min-h-9 items-center gap-1.5\">\n <ng-container [ngTemplateOutlet]=\"controlTemplate\" />\n <ng-container [ngTemplateOutlet]=\"labelTemplate\" />\n </div>\n } @else {\n <ng-container [ngTemplateOutlet]=\"labelTemplate\" />\n <ng-container [ngTemplateOutlet]=\"controlTemplate\" />\n }\n @if (hintKey(); as hint) {\n <p [id]=\"hintId()\" class=\"text-xs text-slate-500\">{{ hint | recipeTranslate }}</p>\n }\n <!-- Raison d'une règle `disabled` active : comme l'aide, après elle, retirée dès que le champ est réactivé. -->\n @if (disabledReasonKeys().length > 0) {\n <p [id]=\"reasonId()\" class=\"text-xs text-slate-500\">\n @for (reasonKey of disabledReasonKeys(); track reasonKey) {\n <span class=\"block\">{{ reasonKey | recipeTranslate }}</span>\n }\n </p>\n }\n @if (s.pending()) {\n <app-recipe-message\n [severity]=\"severities.SECONDARY\"\n [inline]=\"true\"\n [text]=\"'forms.pending' | recipeTranslate\"\n />\n }\n @if (warnings().length > 0) {\n <div [id]=\"warningsId()\" role=\"status\" class=\"flex flex-col gap-0.5\">\n @for (w of warnings(); track $index) {\n <app-recipe-message\n [severity]=\"severities.WARNING\"\n [inline]=\"true\"\n [text]=\"w.key | recipeTranslate: w.params : w.text\"\n />\n }\n </div>\n }\n @if (message(); as m) {\n <app-recipe-message\n [id]=\"messageId()\"\n [severity]=\"severities.DANGER\"\n [inline]=\"true\"\n [text]=\"m.key | recipeTranslate: m.params : m.text\"\n />\n }\n}\n\n<ng-template #labelTemplate>\n <label\n [for]=\"inputId()\"\n [id]=\"labelId()\"\n [class]=\"hideLabel() ? 'sr-only' : 'text-sm font-semibold text-slate-800'\"\n >\n {{ n.labelKey | recipeTranslate }}\n @if (s.required() && !s.readonly()) {\n <span aria-hidden=\"true\" class=\"text-red-600\">*</span>\n }\n </label>\n</ng-template>\n\n<ng-template #controlTemplate>\n @switch (n.control.type) {\n @case (types.DISPLAY) {\n <output [id]=\"inputId()\" class=\"rounded-md bg-slate-50 px-3 py-2 text-sm text-slate-700\">{{\n displayValue()\n }}</output>\n }\n @case (types.SLOT) {\n @if (slotTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"slotContext()\" />\n }\n }\n @default {\n <!-- Gabarit du registre : celui de l'hôte (`provideRecipeForms({ ui })`), sinon celui par défaut. -->\n @if (control(); as c) {\n <ng-container [ngTemplateOutlet]=\"c.template\" [ngTemplateOutletContext]=\"c.context\" />\n }\n }\n }\n</ng-template>\n","import { Directive, inject, input, TemplateRef } from '@angular/core';\nimport { RecipeSlotContext } from '../interfaces/recipe-slot-context.interface';\n\n/**\n * Échappatoire pour un contrôle hors catalogue, ou gabarit d'un `array` :\n * `<ng-template appRecipeSlot=\"nom\" let-field let-inputId=\"inputId\" let-api=\"api\">…</ng-template>` dans `<app-recipe-form>`.\n */\n@Directive({ selector: 'ng-template[appRecipeSlot]' })\nexport class RecipeSlotDirective {\n readonly name = input.required<string>({ alias: 'appRecipeSlot' });\n readonly template = inject<TemplateRef<RecipeSlotContext>>(TemplateRef);\n\n static ngTemplateContextGuard(\n _directive: RecipeSlotDirective,\n context: unknown,\n ): context is RecipeSlotContext {\n return typeof context === 'object' && context !== null && '$implicit' in context;\n }\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n input,\n model,\n TemplateRef,\n viewChild,\n} from '@angular/core';\nimport { RecipeUiPartEnum } from '../../enums/recipe-ui-part.enum';\nimport { RecipePanelContext } from '../../interfaces/recipe-panel-context.interface';\nimport { RecipeUi } from '../../services/recipe-ui.service';\n\n/**\n * Volet d'un groupe de sections, rendu par le gabarit `appRecipePanel` du registre. Le contenu projeté passe au\n * gabarit comme un `TemplateRef` ; l'état replié reste au moteur, qui ouvre le volet du premier champ en erreur.\n */\n@Component({\n selector: 'app-recipe-panel',\n imports: [NgTemplateOutlet],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'block min-w-0' },\n template: `\n <ng-template #content><ng-content /></ng-template>\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"context()\" />\n `,\n})\nexport class RecipePanelComponent {\n readonly header = input.required<string>();\n readonly collapsible = input(false);\n readonly collapsed = model(false);\n readonly badge = input<number>();\n readonly badgeLabel = input<string>();\n readonly collapseLabel = input.required<string>();\n readonly expandLabel = input.required<string>();\n\n private readonly content = viewChild.required<TemplateRef<unknown>>('content');\n protected readonly template = inject(RecipeUi).template(RecipeUiPartEnum.PANEL);\n protected readonly context = computed((): RecipePanelContext => ({\n $implicit: this.content(),\n header: this.header(),\n collapsible: this.collapsible(),\n collapsed: this.collapsed(),\n toggle: (collapsed) => this.collapsed.set(collapsed),\n badge: this.badge(),\n badgeLabel: this.badgeLabel(),\n collapseLabel: this.collapseLabel(),\n expandLabel: this.expandLabel(),\n }));\n}\n","import { Directive, inject, input, TemplateRef } from '@angular/core';\n\n/**\n * Contenu d'un onglet d'`app-recipe-tabs` : `<ng-template [appRecipeTabPanel]=\"valeur\">`. `app-recipe-tabs` le passe\n * au gabarit des onglets du registre, qui le rend dans le panneau de l'onglet.\n */\n@Directive({ selector: 'ng-template[appRecipeTabPanel]' })\nexport class RecipeTabPanelDirective {\n readonly value = input.required<string>({ alias: 'appRecipeTabPanel' });\n readonly template = inject<TemplateRef<unknown>>(TemplateRef);\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChildren,\n inject,\n input,\n model,\n} from '@angular/core';\nimport { RecipeTabPanelDirective } from '../../directives/recipe-tab-panel.directive';\nimport { RecipeUiPartEnum } from '../../enums/recipe-ui-part.enum';\nimport { RecipeTabsContext } from '../../interfaces/recipe-tabs-context.interface';\nimport { TabOption } from '../../interfaces/tab-option.interface';\nimport { RecipeUi } from '../../services/recipe-ui.service';\n\n/**\n * Onglets d'un groupe de sections, rendus par le gabarit `appRecipeTabs` du registre : un panneau par\n * `<ng-template [appRecipeTabPanel]>` projeté, dans l'ordre des gabarits. L'onglet actif reste au moteur.\n */\n@Component({\n selector: 'app-recipe-tabs',\n imports: [NgTemplateOutlet],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'block min-w-0' },\n template: `<ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"context()\" />`,\n})\nexport class RecipeTabsComponent {\n readonly value = model.required<string>();\n readonly options = input.required<TabOption[]>();\n readonly fill = input(false);\n\n private readonly panels = contentChildren(RecipeTabPanelDirective);\n protected readonly template = inject(RecipeUi).template(RecipeUiPartEnum.TABS);\n protected readonly context = computed((): RecipeTabsContext => ({\n $implicit: this.panels().map((panel) => ({ value: panel.value(), template: panel.template })),\n options: this.options(),\n value: this.value(),\n select: (value) => this.value.set(value),\n fill: this.fill(),\n }));\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n forwardRef,\n inject,\n input,\n linkedSignal,\n untracked,\n} from '@angular/core';\nimport { FieldTree } from '@angular/forms/signals';\nimport { SECTION_DISPLAY_DEFAULTS } from '../../constants/section-display-defaults.constants';\nimport { SectionDisplayEnum } from '../../enums/section-display.enum';\nimport { AnyModel } from '../../interfaces/any-model.interface';\nimport { SectionBadge } from '../../interfaces/section-badge.interface';\nimport { SectionGroupNode } from '../../interfaces/section-group-node.interface';\nimport { SectionNode } from '../../interfaces/section-node.interface';\nimport { TabOption } from '../../interfaces/tab-option.interface';\nimport { RecipeTranslatePipe } from '../../pipes/recipe-translate.pipe';\nimport { RecipeFormContext } from '../../services/recipe-form-context.service';\nimport { RECIPE_FORM_TRANSLATION_CHANGES } from '../../tokens/recipe-form-translation-changes.token';\nimport { RECIPE_FORM_TRANSLATOR } from '../../tokens/recipe-form-translator.token';\nimport { RecipePanelComponent } from '../recipe-panel/recipe-panel';\nimport { RecipeTabPanelDirective } from '../../directives/recipe-tab-panel.directive';\nimport { RecipeTabsComponent } from '../recipe-tabs/recipe-tabs';\nimport { RecipeSections } from '../../utils/recipe-sections.utils';\nimport { RecipeNodeComponent } from '../recipe-node/recipe-node';\n\n/**\n * Un groupe de sections, au format de la recette : `plain` (sections à la suite), `panel` (un volet\n * `app-panel` par section) ou `tabs` (un onglet `app-tabs` par section, le premier actif au départ, onglets en `fill`\n * pour qu'aucun ne sorte de la vue sur petit écran), avec le compteur d'erreurs de chaque section, masqué à zéro.\n * La soumission, ou l'arrivée d'erreurs serveur, ouvre le volet ou active\n * l'onglet du premier champ en erreur. Aucun format ne détruit une section : un volet replié ou un onglet inactif\n * reste rendu (`hidden`). La validation ne dépend pas de l'affichage : les règles vivent dans le `FieldTree`.\n */\n@Component({\n selector: 'app-recipe-section-group',\n imports: [\n RecipeTranslatePipe,\n RecipePanelComponent,\n RecipeTabsComponent,\n RecipeTabPanelDirective,\n forwardRef(() => RecipeNodeComponent),\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'block' },\n templateUrl: './recipe-section-group.html',\n})\nexport class RecipeSectionGroupComponent {\n readonly node = input.required<SectionGroupNode<AnyModel>>();\n readonly tree = input.required<FieldTree<AnyModel>>();\n readonly idPrefix = input.required<string>();\n readonly serverPrefix = input<string>('');\n\n private readonly context =\n inject(RecipeFormContext, { optional: true }) ?? new RecipeFormContext();\n private readonly translator = inject(RECIPE_FORM_TRANSLATOR);\n private readonly translationChanges = inject(RECIPE_FORM_TRANSLATION_CHANGES);\n\n protected readonly displays = SectionDisplayEnum;\n protected readonly sections = computed(\n (): readonly SectionNode<AnyModel>[] => this.node().sections,\n );\n private readonly options = computed(() => this.node().options);\n protected readonly collapsible = computed(() => this.options()?.collapsible ?? true);\n private readonly multiple = computed(\n () => this.options()?.multiple ?? SECTION_DISPLAY_DEFAULTS[SectionDisplayEnum.PANEL].multiple,\n );\n\n /** Clés de chaque section du groupe, sous-sections comprises. */\n private readonly index = computed(() => RecipeSections.index([this.node()]));\n\n /** Chemins des erreurs serveur placées, relatifs à l'arbre de ce groupe. */\n private readonly localServerPaths = computed((): readonly string[] => {\n const prefix = this.serverPrefix();\n const paths = [...this.context.serverErrors().keys()];\n return prefix === ''\n ? paths\n : paths\n .filter((path) => path.startsWith(`${prefix}.`))\n .map((path) => path.slice(prefix.length + 1));\n });\n\n /**\n * Compteur d'erreurs de chaque section, volets et onglets compris. Le traducteur n'a pas de pluriel : le texte vient\n * de `forms.display.errorCountOne` pour une erreur (« 1 erreur »), de `forms.display.errorCount` sinon (« 4 erreurs »).\n * Recalculé à chaque chargement de traductions de l'hôte (`RECIPE_FORM_TRANSLATION_CHANGES`).\n */\n protected readonly badges = computed((): ReadonlyMap<string, SectionBadge> => {\n this.translationChanges();\n const tree = this.tree();\n const submitted = this.context.submitted();\n const serverErrorKeys = RecipeSections.serverKeys([this.node()], this.localServerPaths());\n return new Map(\n [...this.index()].map(([id, keys]) => {\n const count = RecipeSections.errorCount({ keys, tree, submitted, serverErrorKeys });\n const key = count === 1 ? 'forms.display.errorCountOne' : 'forms.display.errorCount';\n return [id, { count, label: this.translator(key, { count }) }];\n }),\n );\n });\n\n /** Volets ouverts (format `panel`). */\n protected readonly open = linkedSignal(\n (): ReadonlySet<string> =>\n new Set(this.options()?.initiallyOpen ?? this.sections().map((section) => section.id)),\n );\n\n /** Onglet actif (format `tabs`) : la première section au départ. */\n protected readonly activeTab = linkedSignal((): string => this.sections()[0]?.id ?? '');\n\n /**\n * Onglets (format `tabs`) : titre traduit de la section, compteur d'erreurs seulement s'il dépasse zéro. Recalculés\n * à chaque chargement de traductions de l'hôte (`RECIPE_FORM_TRANSLATION_CHANGES`).\n */\n protected readonly tabOptions = computed((): TabOption[] => {\n this.translationChanges();\n const badges = this.badges();\n return this.sections().map((section): TabOption => {\n const badge = badges.get(section.id);\n const counted = badge !== undefined && badge.count > 0 ? badge : undefined;\n return {\n value: section.id,\n label: this.translator(section.legendKey ?? section.id),\n badge: counted?.count,\n badgeLabel: counted?.label,\n };\n });\n });\n\n constructor() {\n effect(() => {\n if (this.context.submitCount() === 0) {\n return;\n }\n untracked(() => {\n const first = RecipeSections.firstInvalid(\n [this.node()],\n this.tree(),\n this.localServerPaths(),\n );\n if (first !== undefined) {\n this.reveal(first.sections);\n }\n });\n });\n effect(() => {\n const paths = this.localServerPaths();\n if (paths.length === 0) {\n return;\n }\n untracked(() => this.revealServerError(paths));\n });\n }\n\n protected togglePanel(id: string, collapsed: boolean): void {\n this.open.update((set) => {\n const next = this.multiple() ? new Set(set) : new Set<string>();\n if (collapsed) {\n next.delete(id);\n } else {\n next.add(id);\n }\n return next;\n });\n }\n\n /**\n * Rend visible la section de tête d'un champ : ouvre son volet (`panel`) ou active son onglet (`tabs`) ;\n * en `plain`, toutes les sections sont déjà visibles. Le focus différé du formulaire arrive après ce rendu.\n */\n private reveal(sections: readonly string[]): void {\n const [top] = sections;\n if (top === undefined) {\n return;\n }\n const display = this.node().display;\n if (display === SectionDisplayEnum.PANEL) {\n this.open.update((set) => (this.multiple() ? new Set([...set, top]) : new Set([top])));\n } else if (display === SectionDisplayEnum.TABS) {\n this.activeTab.set(top);\n }\n }\n\n private revealServerError(paths: readonly string[]): void {\n const targets = new Set(RecipeSections.serverKeys([this.node()], paths).values());\n for (const section of this.sections()) {\n const keys = this.index().get(section.id) ?? [];\n if (keys.some((key) => targets.has(key))) {\n this.reveal([section.id]);\n return;\n }\n }\n }\n}\n","@switch (node().display) {\n @case (displays.PANEL) {\n <div class=\"flex flex-col gap-4\">\n @for (section of sections(); track section.id) {\n @let badge = badges().get(section.id);\n @let title = section.legendKey ?? section.id | recipeTranslate;\n <app-recipe-panel\n [header]=\"title\"\n [collapseLabel]=\"'forms.display.collapsePanel' | recipeTranslate: { title }\"\n [expandLabel]=\"'forms.display.expandPanel' | recipeTranslate: { title }\"\n [collapsible]=\"collapsible()\"\n [collapsed]=\"!open().has(section.id)\"\n (collapsedChange)=\"togglePanel(section.id, $event)\"\n [badge]=\"badge !== undefined && badge.count > 0 ? badge.count : undefined\"\n [badgeLabel]=\"badge?.label\"\n >\n <app-recipe-node\n [node]=\"section\"\n [tree]=\"tree()\"\n [idPrefix]=\"idPrefix()\"\n [serverPrefix]=\"serverPrefix()\"\n [hideLegend]=\"true\"\n />\n </app-recipe-panel>\n }\n </div>\n }\n @case (displays.TABS) {\n <app-recipe-tabs\n [options]=\"tabOptions()\"\n [value]=\"activeTab()\"\n (valueChange)=\"activeTab.set($event)\"\n [fill]=\"true\"\n >\n @for (section of sections(); track section.id) {\n <ng-template [appRecipeTabPanel]=\"section.id\">\n <app-recipe-node\n [node]=\"section\"\n [tree]=\"tree()\"\n [idPrefix]=\"idPrefix()\"\n [serverPrefix]=\"serverPrefix()\"\n [hideLegend]=\"true\"\n />\n </ng-template>\n }\n </app-recipe-tabs>\n }\n @default {\n <div class=\"flex flex-col gap-6\">\n @for (section of sections(); track section.id) {\n <app-recipe-node\n [node]=\"section\"\n [tree]=\"tree()\"\n [idPrefix]=\"idPrefix()\"\n [serverPrefix]=\"serverPrefix()\"\n />\n }\n </div>\n }\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n forwardRef,\n inject,\n input,\n isDevMode,\n linkedSignal,\n Signal,\n TemplateRef,\n untracked,\n} from '@angular/core';\nimport { FieldState, FieldTree } from '@angular/forms/signals';\nimport { ArrayDisplayEnum } from '../../enums/array-display.enum';\nimport { ButtonVariantEnum } from '../../enums/button-variant.enum';\nimport { ControlTypeEnum } from '../../enums/control-type.enum';\nimport { LinkedControlTypeEnum } from '../../enums/linked-control-type.enum';\nimport { NodeKindEnum } from '../../enums/node-kind.enum';\nimport { SeverityEnum } from '../../enums/severity.enum';\nimport { AnyModel } from '../../interfaces/any-model.interface';\nimport { ArrayItem } from '../../interfaces/array-item.interface';\nimport { FieldMessage } from '../../interfaces/field-message.interface';\nimport { FieldNode } from '../../interfaces/field-node.interface';\nimport { FormNode } from '../../interfaces/form-node.interface';\nimport { RecipeArrayApi } from '../../interfaces/recipe-array-api.interface';\nimport { RecipeServerValidationError } from '../../interfaces/recipe-server-validation-error.interface';\nimport { RecipeSlotContext } from '../../interfaces/recipe-slot-context.interface';\nimport { RecipeTranslatePipe } from '../../pipes/recipe-translate.pipe';\nimport { RecipeFormContext } from '../../services/recipe-form-context.service';\nimport { FORM_KEY_GENERATOR } from '../../tokens/form-key-generator.token';\nimport { RecipeButtonComponent } from '../recipe-button/recipe-button';\nimport { RecipeMessageComponent } from '../recipe-message/recipe-message';\nimport { RecipeArrays } from '../../utils/recipe-arrays.utils';\nimport { RecipeLayout } from '../../utils/recipe-layout.utils';\nimport { RecipeMessages } from '../../utils/recipe-messages.utils';\nimport { RecipeSchema } from '../../utils/recipe-schema.utils';\nimport { RecipeServerPaths } from '../../utils/recipe-server-paths.utils';\nimport { RecipeFieldComponent } from '../recipe-field/recipe-field';\nimport { RecipeSectionGroupComponent } from '../recipe-section-group/recipe-section-group';\n\ntype AnyArrayItem = ArrayItem & AnyModel;\n\n/**\n * Rendu récursif d'un nœud : section, ligne, groupe de sections (`app-recipe-section-group`), champ,\n * contrôle lié, `array` en liste ou en table avec son slot et son API, ses règles de liste\n * et ses erreurs serveur. L'état partagé du formulaire vient de `RecipeFormContext`.\n */\n@Component({\n selector: 'app-recipe-node',\n imports: [\n NgTemplateOutlet,\n RecipeTranslatePipe,\n RecipeFieldComponent,\n RecipeButtonComponent,\n RecipeMessageComponent,\n forwardRef(() => RecipeSectionGroupComponent),\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { '[class]': 'hostClasses()' },\n templateUrl: './recipe-node.html',\n})\nexport class RecipeNodeComponent {\n readonly node = input.required<FormNode<AnyModel>>();\n readonly tree = input.required<FieldTree<AnyModel>>();\n readonly idPrefix = input.required<string>();\n /** Chemin serveur de l'élément conteneur (`dates[k3]`), vide à la racine. */\n readonly serverPrefix = input<string>('');\n /** Section rendue dans un volet, un onglet, une étape ou un arbre : le titre est déjà affiché par le conteneur. */\n readonly hideLegend = input<boolean>(false);\n /** Champ rendu dans une cellule d'`array` en table : le libellé est l'en-tête de colonne. */\n readonly hideLabel = input<boolean>(false);\n\n private readonly keyGenerator = inject(FORM_KEY_GENERATOR);\n private readonly context =\n inject(RecipeFormContext, { optional: true }) ?? new RecipeFormContext();\n\n protected readonly kinds = NodeKindEnum;\n protected readonly displays = ArrayDisplayEnum;\n protected readonly variants = ButtonVariantEnum;\n protected readonly severities = SeverityEnum;\n\n /** Section masquée par sa condition `hidden`, évaluée au rendu sur la racine. */\n protected readonly sectionHidden = computed((): boolean => {\n const node = this.node();\n return (\n node.kind === NodeKindEnum.SECTION &&\n node.hidden !== undefined &&\n node.hidden(this.context.ruleContext())\n );\n });\n\n protected readonly hostClasses = computed((): string => {\n const node = this.node();\n if (node.kind === NodeKindEnum.SECTION_GROUP) {\n return node.class ?? '';\n }\n const hidden =\n (node.kind === NodeKindEnum.FIELD && this.fieldTreeOf(node.key)().hidden()) ||\n (node.kind === NodeKindEnum.SECTION && this.sectionHidden()) ||\n (node.kind === NodeKindEnum.ARRAY && this.arrayHidden());\n return `${RecipeLayout.item(node)} ${hidden ? 'hidden' : 'block min-w-0'}`;\n });\n\n protected readonly containerClasses = computed((): string => {\n const node = this.node();\n if (node.kind === NodeKindEnum.SECTION) {\n return RecipeLayout.container(node.columns, node.areas);\n }\n if (node.kind === NodeKindEnum.ROW) {\n return node.columns === undefined\n ? 'flex flex-wrap items-end gap-4'\n : RecipeLayout.container(node.columns);\n }\n return '';\n });\n\n protected fieldTreeOf(key: string): FieldTree<unknown> {\n const child = this.tree()[key];\n if (child === undefined) {\n throw new Error(`[recipe-forms] la clé « ${key} » n'existe pas dans le modèle du formulaire`);\n }\n return child;\n }\n\n // ---- contrôles liés ----\n\n protected readonly linked = computed(() => {\n const node = this.node();\n return node.kind === NodeKindEnum.LINKED ? node : undefined;\n });\n\n protected readonly linkedId = computed(() => {\n const linked = this.linked();\n return linked === undefined ? '' : RecipeSchema.linkedId(linked);\n });\n\n protected readonly linkedMessageId = computed(\n () => `${this.idPrefix()}-${this.linkedId()}-message`,\n );\n\n /** Cible de l'erreur du groupe : une clé liée, ou `undefined` pour le groupe entier. */\n protected readonly linkedTarget = computed((): string | undefined => {\n const linked = this.linked();\n return linked === undefined ||\n linked.errorTarget === undefined ||\n linked.errorTarget === 'group'\n ? undefined\n : linked.errorTarget;\n });\n\n protected readonly linkedContainerClasses = computed((): string => {\n const linked = this.linked();\n if (linked === undefined) {\n return '';\n }\n const columns =\n linked.control.type === LinkedControlTypeEnum.GROUP ? linked.control.columns : undefined;\n return RecipeLayout.container(columns ?? { base: 1, md: 2 });\n });\n\n /** Les champs d'un contrôle lié sont rendus comme des champs ordinaires, construits à partir du contrôle. */\n protected readonly linkedFieldNodes = computed((): readonly FieldNode<AnyModel>[] => {\n const linked = this.linked();\n if (linked === undefined) {\n return [];\n }\n if (linked.control.type === LinkedControlTypeEnum.DATE_RANGE) {\n const labels = [linked.control.startLabelKey, linked.control.endLabelKey];\n return linked.keys.map((key, index) => ({\n kind: NodeKindEnum.FIELD,\n key,\n labelKey: labels[index] ?? key,\n control: { type: ControlTypeEnum.DATE },\n }));\n }\n const fields = linked.control.fields;\n return linked.keys.flatMap((key): readonly FieldNode<AnyModel>[] => {\n const def = fields[key];\n return def === undefined\n ? []\n : [\n {\n kind: NodeKindEnum.FIELD,\n key,\n labelKey: def.labelKey,\n control: def.control,\n rules: def.rules,\n span: def.span,\n messages: def.messages,\n serverPaths: def.serverPaths,\n },\n ];\n });\n });\n\n /**\n * L'erreur posée sur `errorTarget` apparaît dès que ce champ est touché, comme la bordure rouge de son wrapper\n * (`showInvalid` = invalide et touché) ; celle du groupe, quand tous les champs liés ont été touchés.\n * Après une soumission, elle apparaît dans les deux cas.\n */\n protected readonly linkedMessage = computed((): FieldMessage | undefined => {\n const linked = this.linked();\n if (linked === undefined) {\n return undefined;\n }\n const linkedId = this.linkedId();\n const target = this.linkedTarget();\n const source: FieldState<unknown> =\n target === undefined ? this.tree()() : this.fieldTreeOf(target)();\n const errors = source\n .errors()\n .filter((error) => 'linkedId' in error && error.linkedId === linkedId);\n const touched =\n target === undefined\n ? linked.keys.every((key) => this.fieldTreeOf(key)().touched())\n : source.touched();\n return RecipeMessages.resolve({\n errors,\n touched,\n submitted: this.context.submitted(),\n fieldMessages: linked.messages,\n recipeMessages: this.context.recipeMessages(),\n });\n });\n\n // ---- array ----\n\n protected readonly array = computed(() => {\n const node = this.node();\n return node.kind === NodeKindEnum.ARRAY ? node : undefined;\n });\n\n protected readonly listState = computed((): FieldState<readonly AnyArrayItem[]> | undefined => {\n const array = this.array();\n if (array === undefined) {\n return undefined;\n }\n const list = this.tree()[array.key];\n return list === undefined\n ? undefined\n : (list() as unknown as FieldState<readonly AnyArrayItem[]>);\n });\n\n protected readonly arrayItems = computed((): readonly FieldTree<AnyModel>[] => {\n const array = this.array();\n if (array === undefined) {\n return [];\n }\n const list = this.tree()[array.key] as unknown as FieldTree<readonly ArrayItem[]> | undefined;\n return list === undefined ? [] : ([...list] as unknown as readonly FieldTree<AnyModel>[]);\n });\n\n protected readonly arrayHidden = computed(() => this.listState()?.hidden() ?? false);\n protected readonly listReadonly = computed(() => this.listState()?.readonly() ?? false);\n protected readonly listId = computed(() => `${this.idPrefix()}-${this.array()?.key ?? ''}`);\n protected readonly listMessageId = computed(() => `${this.listId()}-message`);\n\n /** API du nœud, partagée par ses boutons et par son slot. */\n protected readonly arrayApi = computed((): RecipeArrayApi<AnyArrayItem> | undefined => {\n const array = this.array();\n return array === undefined\n ? undefined\n : RecipeArrays.api(array, () => this.listState(), this.keyGenerator);\n });\n\n private readonly listServerPaths = computed((): readonly string[] => {\n const array = this.array();\n return array === undefined\n ? []\n : RecipeServerPaths.fullPaths(this.serverPrefix(), array.key, array.serverPaths);\n });\n\n private readonly listServerErrors = this.untilListChanges(\n computed(\n () => RecipeServerPaths.errorsFor(this.context.serverErrors(), this.listServerPaths()),\n { equal: RecipeServerPaths.sameErrors },\n ),\n );\n\n /** Erreurs de la liste entière et erreurs serveur qui visent la liste, sous la liste. */\n protected readonly listMessage = computed((): FieldMessage | undefined => {\n const array = this.array();\n const state = this.listState();\n if (array === undefined || state === undefined) {\n return undefined;\n }\n const server = this.listServerErrors();\n const own = state.errors().filter((error) => !('linkedId' in error));\n return RecipeMessages.resolve({\n errors: [...own, ...server],\n touched: state.touched() || server.length > 0,\n submitted: this.context.submitted(),\n fieldMessages: array.messages,\n recipeMessages: this.context.recipeMessages(),\n });\n });\n\n /** Colonnes d'un `array` en table : les nœuds feuilles de `item`, sections et lignes aplaties. */\n protected readonly tableColumns = computed((): readonly FormNode<AnyModel>[] => {\n const array = this.array();\n return array === undefined ? [] : RecipeNodeComponent.leaves(array.item);\n });\n\n protected readonly arraySlotTemplate = computed(\n (): TemplateRef<RecipeSlotContext> | undefined => {\n const slot = this.array()?.slot;\n if (slot === undefined) {\n return undefined;\n }\n const template = this.context.slots().get(slot.name);\n if (template === undefined && isDevMode()) {\n throw new Error(\n `[recipe-forms] slot « ${slot.name} » introuvable : ajoutez <ng-template appRecipeSlot=\"${slot.name}\"> dans <app-recipe-form>`,\n );\n }\n return template;\n },\n );\n\n protected readonly arraySlotContext = computed((): RecipeSlotContext => ({\n $implicit: this.tree()[this.array()?.key ?? ''] as FieldTree<unknown>,\n inputId: this.listId(),\n describedBy: this.listMessage() === undefined ? undefined : this.listMessageId(),\n api: this.arrayApi(),\n }));\n\n protected columnLabel(node: FormNode<AnyModel>): string {\n switch (node.kind) {\n case NodeKindEnum.FIELD:\n return node.labelKey;\n case NodeKindEnum.LINKED:\n return node.legendKey;\n case NodeKindEnum.ARRAY:\n return node.legendKey ?? node.key;\n case NodeKindEnum.SECTION:\n return node.legendKey ?? node.id;\n case NodeKindEnum.SECTION_GROUP:\n return node.id;\n case NodeKindEnum.ROW:\n return '';\n }\n }\n\n protected itemKey(item: FieldTree<AnyModel>): string {\n return String(item().value()['key']);\n }\n\n /** Identifiants HTML d'un élément : `<préfixe>-<array>-<clé>`, jamais la position. */\n protected itemPrefix(item: FieldTree<AnyModel>): string {\n return `${this.listId()}-${this.itemKey(item)}`;\n }\n\n /** Chemin serveur d'un élément : `dates[k3]`, premier chemin de la liste. */\n protected itemServerPrefix(item: FieldTree<AnyModel>): string {\n const [path] = this.listServerPaths();\n return `${path ?? this.array()?.key ?? ''}[${this.itemKey(item)}]`;\n }\n\n protected addItem(): void {\n this.arrayApi()?.addItem();\n }\n\n protected removeItem(key: string): void {\n this.arrayApi()?.removeItem(key);\n }\n\n private untilListChanges(\n source: Signal<readonly RecipeServerValidationError[]>,\n ): Signal<readonly RecipeServerValidationError[]> {\n const receipt = linkedSignal(() => ({\n errors: source(),\n value: untracked(() => this.listState()?.value()),\n }));\n return computed(() => {\n const received = receipt();\n return received.errors.length > 0 && received.value === this.listState()?.value()\n ? received.errors\n : [];\n });\n }\n\n private static leaves(nodes: readonly FormNode<AnyModel>[]): readonly FormNode<AnyModel>[] {\n return nodes.flatMap((node) =>\n node.kind === NodeKindEnum.SECTION || node.kind === NodeKindEnum.ROW\n ? RecipeNodeComponent.leaves(node.nodes)\n : [node],\n );\n }\n}\n","@let n = node();\n@switch (n.kind) {\n @case (kinds.SECTION) {\n @if (!sectionHidden()) {\n <fieldset\n [id]=\"idPrefix() + '-' + n.id\"\n [class]=\"\n hideLegend()\n ? 'relative min-w-0'\n : 'relative min-w-0 rounded-lg border border-slate-200 p-4'\n \"\n >\n @if (n.legendKey; as legendKey) {\n <legend\n [class]=\"hideLegend() ? 'sr-only' : 'px-1 text-base font-semibold text-slate-900'\"\n >\n {{ legendKey | recipeTranslate }}\n </legend>\n }\n <div [class]=\"containerClasses()\">\n @for (child of n.nodes; track $index) {\n <app-recipe-node\n [node]=\"child\"\n [tree]=\"tree()\"\n [idPrefix]=\"idPrefix()\"\n [serverPrefix]=\"serverPrefix()\"\n />\n }\n </div>\n </fieldset>\n }\n }\n @case (kinds.ROW) {\n <div [class]=\"containerClasses()\">\n @for (child of n.nodes; track $index) {\n <app-recipe-node\n [node]=\"child\"\n [tree]=\"tree()\"\n [idPrefix]=\"idPrefix()\"\n [serverPrefix]=\"serverPrefix()\"\n />\n }\n </div>\n }\n @case (kinds.SECTION_GROUP) {\n <app-recipe-section-group\n [node]=\"n\"\n [tree]=\"tree()\"\n [idPrefix]=\"idPrefix()\"\n [serverPrefix]=\"serverPrefix()\"\n />\n }\n @case (kinds.FIELD) {\n <app-recipe-field\n [node]=\"n\"\n [field]=\"fieldTreeOf(n.key)\"\n [idPrefix]=\"idPrefix()\"\n [serverPrefix]=\"serverPrefix()\"\n [hideLabel]=\"hideLabel()\"\n [inline]=\"hideLabel()\"\n />\n }\n @case (kinds.LINKED) {\n <!-- Dans une cellule de tableau, l'en-tête de colonne titre le groupe : ni cadre ni légende visible, champs en ligne. -->\n <fieldset\n [class]=\"\n hideLabel() ? 'relative min-w-0' : 'relative min-w-0 rounded-lg border border-slate-200 p-3'\n \"\n [attr.aria-describedby]=\"\n linkedTarget() === undefined && linkedMessage() ? linkedMessageId() : null\n \"\n >\n <legend [class]=\"hideLabel() ? 'sr-only' : 'px-1 text-sm font-semibold text-slate-800'\">\n {{ n.legendKey | recipeTranslate }}\n </legend>\n <div [class]=\"hideLabel() ? 'flex items-start gap-x-4' : linkedContainerClasses()\">\n @for (fieldNode of linkedFieldNodes(); track fieldNode.key) {\n <app-recipe-field\n [node]=\"fieldNode\"\n [field]=\"fieldTreeOf(fieldNode.key)\"\n [idPrefix]=\"idPrefix()\"\n [serverPrefix]=\"serverPrefix()\"\n [inline]=\"hideLabel()\"\n [extraMessage]=\"fieldNode.key === linkedTarget() ? linkedMessage() : undefined\"\n [extraDescribedBy]=\"\n linkedTarget() === undefined && linkedMessage() ? linkedMessageId() : undefined\n \"\n />\n }\n </div>\n @if (linkedTarget() === undefined) {\n @if (linkedMessage(); as m) {\n <app-recipe-message\n [id]=\"linkedMessageId()\"\n class=\"mt-2\"\n [severity]=\"severities.DANGER\"\n [inline]=\"true\"\n [text]=\"m.key | recipeTranslate: m.params : m.text\"\n />\n }\n }\n </fieldset>\n }\n @case (kinds.ARRAY) {\n @if (!arrayHidden()) {\n <fieldset\n class=\"relative min-w-0 rounded-lg border border-slate-200 p-3\"\n [attr.aria-describedby]=\"listMessage() ? listMessageId() : null\"\n >\n @if (n.legendKey; as legendKey) {\n <legend class=\"px-1 text-sm font-semibold text-slate-800\">\n {{ legendKey | recipeTranslate }}\n </legend>\n }\n @if (n.slot?.position === 'before') {\n <ng-container\n [ngTemplateOutlet]=\"arraySlotTemplate()\"\n [ngTemplateOutletContext]=\"arraySlotContext()\"\n />\n }\n @if (n.display === displays.TABLE) {\n <!-- Sur un écran étroit, le tableau défile dans son conteneur au lieu d'élargir la page ou de passer ses en-têtes à la ligne.\n `relative` garde dans ce conteneur le titre `sr-only` de la colonne de retrait, sinon placé hors de la page. -->\n <div class=\"relative overflow-x-auto\">\n <table [id]=\"listId()\" class=\"w-full border-collapse text-sm\">\n <thead>\n <tr class=\"text-left\">\n @for (column of tableColumns(); track $index) {\n <th\n scope=\"col\"\n class=\"px-2 py-1 font-semibold whitespace-nowrap text-slate-800\"\n >\n {{ columnLabel(column) | recipeTranslate }}\n </th>\n }\n @if (n.removable !== false && !listReadonly()) {\n <th scope=\"col\" class=\"px-2 py-1\">\n <span class=\"sr-only\">{{\n n.removeLabelKey ?? 'forms.array.remove' | recipeTranslate\n }}</span>\n </th>\n }\n </tr>\n </thead>\n <tbody>\n @for (item of arrayItems(); track item) {\n <tr class=\"border-t border-slate-100 align-top\">\n @for (column of tableColumns(); track $index) {\n <!-- Un message de la cellule ne compte pas dans la largeur de la colonne : il passe à la ligne. -->\n <td\n class=\"px-2 py-1 [&_app-recipe-message]:w-0 [&_app-recipe-message]:min-w-full\"\n >\n <app-recipe-node\n [node]=\"column\"\n [tree]=\"item\"\n [idPrefix]=\"itemPrefix(item)\"\n [serverPrefix]=\"itemServerPrefix(item)\"\n [hideLabel]=\"true\"\n />\n </td>\n }\n @if (n.removable !== false && !listReadonly()) {\n <td class=\"px-2 py-1 text-right\">\n <app-recipe-button\n [label]=\"n.removeLabelKey ?? 'forms.array.remove' | recipeTranslate\"\n [variant]=\"variants.TEXT\"\n [severity]=\"severities.DANGER\"\n (clicked)=\"removeItem(itemKey(item))\"\n />\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n </div>\n } @else {\n <ol [id]=\"listId()\" class=\"flex flex-col gap-3\">\n @for (item of arrayItems(); track item) {\n <li class=\"flex flex-col gap-3 rounded-md border border-slate-100 bg-slate-50 p-3\">\n <div class=\"flex flex-wrap items-end gap-4\">\n @for (child of n.item; track $index) {\n <app-recipe-node\n [node]=\"child\"\n [tree]=\"item\"\n [idPrefix]=\"itemPrefix(item)\"\n [serverPrefix]=\"itemServerPrefix(item)\"\n />\n }\n </div>\n @if (n.removable !== false && !listReadonly()) {\n <app-recipe-button\n class=\"self-end\"\n [label]=\"n.removeLabelKey ?? 'forms.array.remove' | recipeTranslate\"\n [variant]=\"variants.TEXT\"\n [severity]=\"severities.DANGER\"\n (clicked)=\"removeItem(itemKey(item))\"\n />\n }\n </li>\n }\n </ol>\n }\n @if (n.slot?.position === 'after') {\n <ng-container\n [ngTemplateOutlet]=\"arraySlotTemplate()\"\n [ngTemplateOutletContext]=\"arraySlotContext()\"\n />\n }\n @if (listMessage(); as m) {\n <app-recipe-message\n [id]=\"listMessageId()\"\n class=\"mt-2\"\n [severity]=\"severities.DANGER\"\n [inline]=\"true\"\n [text]=\"m.key | recipeTranslate: m.params : m.text\"\n />\n }\n @if (n.addLabelKey; as addLabelKey) {\n @if (!listReadonly()) {\n <app-recipe-button\n class=\"mt-3 block\"\n [label]=\"addLabelKey | recipeTranslate\"\n [variant]=\"variants.OUTLINED\"\n [severity]=\"severities.SECONDARY\"\n (clicked)=\"addItem()\"\n />\n }\n }\n </fieldset>\n }\n }\n}\n","import {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChildren,\n effect,\n ElementRef,\n inject,\n Injector,\n input,\n output,\n signal,\n untracked,\n} from '@angular/core';\nimport { FieldState, FieldTree } from '@angular/forms/signals';\nimport { RecipeSlotDirective } from '../../directives/recipe-slot.directive';\nimport { AnyModel } from '../../interfaces/any-model.interface';\nimport { FormNode } from '../../interfaces/form-node.interface';\nimport { FormRecipe } from '../../interfaces/form-recipe.interface';\nimport { RecipeServerError } from '../../interfaces/recipe-server-error.interface';\nimport { RecipeServerSnapshot } from '../../interfaces/recipe-server-snapshot.interface';\nimport { RecipeFormContext } from '../../services/recipe-form-context.service';\nimport { RecipeServerPaths } from '../../utils/recipe-server-paths.utils';\nimport { RecipeNodeComponent } from '../recipe-node/recipe-node';\n\n/**\n * Le formulaire : balise `<form>`, soumission, slots et zone d'actions projetée (`[appRecipeActions]`).\n * Le `FieldTree` est créé par l'appelant : `form(signal(model), RecipeSchema.build(recipe))`.\n * `submitted` émet la valeur du modèle, clés techniques comprises : c'est le mapper `*ToDto` qui les ignore ;\n * à cet instant, la correspondance position → clé des `array` est mémorisée pour les erreurs serveur.\n * `serverErrors` et `serverWarnings` (`RecipeServerError`) sont placés par chemin sur les champs ;\n * ce qui ne se place pas sort par `unplacedServerErrors` et `unplacedServerWarnings`, à afficher par l'appelant.\n */\n@Component({\n selector: 'app-recipe-form',\n imports: [RecipeNodeComponent],\n providers: [RecipeFormContext],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <form\n [id]=\"recipe().id\"\n [attr.name]=\"recipe().id\"\n novalidate\n class=\"flex flex-col gap-6\"\n (submit)=\"onSubmit($event)\"\n >\n @for (node of nodes(); track $index) {\n <app-recipe-node [node]=\"node\" [tree]=\"tree()\" [idPrefix]=\"recipe().id\" />\n }\n <div class=\"flex flex-wrap items-center justify-end gap-2\">\n <ng-content select=\"[appRecipeActions]\" />\n </div>\n </form>\n `,\n})\nexport class RecipeFormComponent<TModel extends object> {\n readonly recipe = input.required<FormRecipe<TModel>>();\n readonly form = input.required<FieldTree<TModel>>();\n readonly serverErrors = input<readonly RecipeServerError[]>([]);\n readonly serverWarnings = input<readonly RecipeServerError[]>([]);\n readonly submitted = output<TModel>();\n readonly invalidSubmit = output<void>();\n readonly unplacedServerErrors = output<readonly RecipeServerError[]>();\n readonly unplacedServerWarnings = output<readonly RecipeServerError[]>();\n\n private readonly context = inject(RecipeFormContext);\n private readonly injector = inject(Injector);\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly slotTemplates = contentChildren(RecipeSlotDirective);\n\n protected readonly slotMap = computed(\n () => new Map(this.slotTemplates().map((slot) => [slot.name(), slot.template])),\n );\n protected readonly submitAttempted = signal(false);\n protected readonly submitCount = signal(0);\n protected readonly nodes = computed(\n () => this.recipe().nodes as unknown as readonly FormNode<AnyModel>[],\n );\n protected readonly tree = computed(() => this.form() as unknown as FieldTree<AnyModel>);\n\n /** Clés des éléments d'`array` au moment du dernier `submitted`. */\n private readonly snapshot = signal<RecipeServerSnapshot>(new Map());\n private readonly currentKeys = computed(() =>\n RecipeServerPaths.snapshot(this.nodes(), this.tree()().value()),\n );\n private readonly shapes = computed(() => RecipeServerPaths.shapes(this.nodes()));\n private readonly placedErrors = computed(() =>\n RecipeServerPaths.place(this.serverErrors(), this.shapes(), this.snapshot(), () =>\n this.currentKeys(),\n ),\n );\n private readonly placedWarnings = computed(() =>\n RecipeServerPaths.place(this.serverWarnings(), this.shapes(), this.snapshot(), () =>\n this.currentKeys(),\n ),\n );\n\n constructor() {\n this.context.connect({\n rootTree: this.tree,\n submitted: this.submitAttempted,\n submitCount: this.submitCount,\n recipeMessages: computed(() => this.recipe().messages),\n slots: this.slotMap,\n serverErrors: computed(() => this.placedErrors().placed),\n serverWarnings: computed(() => this.placedWarnings().placed),\n });\n effect(() => {\n this.serverErrors();\n this.unplacedServerErrors.emit(untracked(() => this.placedErrors().unplaced));\n });\n effect(() => {\n this.serverWarnings();\n this.unplacedServerWarnings.emit(untracked(() => this.placedWarnings().unplaced));\n });\n }\n\n /** Après un `reset` du formulaire par l'appelant, les messages redeviennent conditionnés au `touched`. */\n resetSubmitAttempt(): void {\n this.submitAttempted.set(false);\n }\n\n /** Pas de `submit()` de Signal Forms : il renvoie une Promise, que les règles du dépôt interdisent. */\n protected onSubmit(event: Event): void {\n event.preventDefault();\n this.submitAttempted.set(true);\n this.submitCount.update((count) => count + 1);\n const state = this.tree()();\n state.markAsTouched();\n if (state.invalid() || state.pending()) {\n // Le focus attend le rendu : la section du premier champ en erreur vient d'être ouverte.\n afterNextRender(() => this.focusFirstError(state), { injector: this.injector });\n this.invalidSubmit.emit();\n return;\n }\n const value = state.value();\n this.snapshot.set(RecipeServerPaths.snapshot(this.nodes(), value));\n this.submitted.emit(value as unknown as TModel);\n }\n\n /**\n * Focus du premier champ en erreur, puis défilement de son conteneur (libellé, contrôle et messages) au centre de\n * la zone qui défile : ni une barre collante en haut (onglets) ni un pied fixe en bas (modale) ne cachent le champ\n * ou son message. Le conteneur est `app-recipe-field`, ou la liste (`fieldset`) pour un contrôle rendu par le\n * slot d'un `array`. `preventScroll` évite un premier défilement du navigateur au moment du focus.\n */\n private focusFirstError(state: FieldState<AnyModel>): void {\n state.errorSummary()[0]?.fieldTree().focusBoundControl({ preventScroll: true });\n const host = this.host.nativeElement;\n const focused = host.ownerDocument.activeElement;\n const container = focused?.closest('app-recipe-field') ?? focused?.closest('fieldset') ?? null;\n if (container !== null && host.contains(container)) {\n container.scrollIntoView({ block: 'center' });\n }\n }\n}\n"],"mappings":";;;;;;AAAA,IAAY;CAAZ,SAAY,kBAAgB;CAC1B,iBAAA,WAAA;CACA,iBAAA,UAAA;AACF,EAAA,CAHY,qBAAA,mBAAgB,CAAA,EAAA;ACA5B,IAAY;CAAZ,SAAY,gBAAc;CACxB,eAAA,UAAA;CACA,eAAA,QAAA;CACA,eAAA,QAAA;CACA,eAAA,QAAA;CACA,eAAA,QAAA;AACF,EAAA,CANY,mBAAA,iBAAc,CAAA,EAAA;ACA1B,IAAY;CAAZ,SAAY,mBAAiB;CAC3B,kBAAA,YAAA;CACA,kBAAA,cAAA;CACA,kBAAA,UAAA;AACF,EAAA,CAJY,sBAAA,oBAAiB,CAAA,EAAA;ACA7B,IAAY;CAAZ,SAAY,iBAAe;CACzB,gBAAA,UAAA;CACA,gBAAA,YAAA;CACA,gBAAA,YAAA;CACA,gBAAA,UAAA;CACA,gBAAA,mBAAA;CACA,gBAAA,cAAA;CACA,gBAAA,aAAA;CACA,gBAAA,UAAA;AACF,EAAA,CATY,oBAAA,kBAAe,CAAA,EAAA;ACA3B,IAAY;CAAZ,SAAY,uBAAqB;CAC/B,sBAAA,gBAAA;CACA,sBAAA,WAAA;AACF,EAAA,CAHY,0BAAA,wBAAqB,CAAA,EAAA;ACAjC,IAAY;C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