@4sh/ui-kit 0.15.0 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.fr.md +8 -0
- package/README.md +8 -0
- package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs +69 -22
- package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs +13 -4
- package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs +12 -4
- package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs +19 -8
- package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs +30 -9
- package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input.mjs +8 -3
- package/fesm2022/4sh-ui-kit-forms-ui-input.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs +10 -4
- package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms.mjs +46 -2
- package/fesm2022/4sh-ui-kit-forms.mjs.map +1 -1
- package/mcp/data/component-api.json +14 -0
- package/mcp/data/text-search-docs.json +29 -9
- package/mcp/package.json +1 -1
- package/package.json +1 -1
- package/styles/utils/_mixins.scss +11 -0
- package/types/4sh-ui-kit-forms-ui-autocomplete.d.ts +16 -3
- package/types/4sh-ui-kit-forms-ui-input-mask.d.ts +2 -0
- package/types/4sh-ui-kit-forms-ui-input-number.d.ts +4 -1
- package/types/4sh-ui-kit-forms-ui-input-otp.d.ts +5 -1
- package/types/4sh-ui-kit-forms-ui-input.d.ts +2 -0
- package/types/4sh-ui-kit-forms-ui-textarea.d.ts +2 -0
- package/types/4sh-ui-kit-forms.d.ts +25 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"4sh-ui-kit-forms.mjs","sources":["../../../projects/ui-kit/forms/src/lib/base-control-value-accessor.ts","../../../projects/ui-kit/forms/src/lib/base-form-field.ts","../../../projects/ui-kit/forms/src/lib/overlay-positions.ts","../../../projects/ui-kit/forms/src/lib/mask-engine.ts","../../../projects/ui-kit/forms/src/lib/date-utils.ts","../../../projects/ui-kit/forms/src/lib/option-resolver.ts","../../../projects/ui-kit/forms/src/lib/format-label.ts","../../../projects/ui-kit/forms/src/lib/warn-missing-accessible-name.ts","../../../projects/ui-kit/forms/src/public-api.ts","../../../projects/ui-kit/forms/src/4sh-ui-kit-forms.ts"],"sourcesContent":["import {\n afterNextRender,\n computed,\n DestroyRef,\n effect,\n inject,\n Injector,\n signal,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport {\n ControlValueAccessor,\n NgControl,\n PristineChangeEvent,\n StatusChangeEvent,\n TouchedChangeEvent,\n ValidationErrors,\n} from '@angular/forms';\n\n/**\n * Base class for form components (`ui-checkbox`, `ui-radio`, `ui-input`…).\n *\n * Implements `ControlValueAccessor` and mirrors the attached `NgControl` state\n * into signals, so templates/styles can react to it declaratively:\n *\n * - `touched` / `dirty` / `pristine` / `untouched` — interaction state\n * - `controlInvalid` / `controlErrors` — validation state\n * - `controlDisabled` — driven by `control.disable()`\n * - `showError` — invalid AND (touched or dirty),\n * the usual \"when to paint red\" rule\n *\n * The subscription is wired automatically after first render and cleaned up on\n * destroy. Subclasses only have to:\n * 1. implement `writeValue()` (form → view),\n * 2. call `emitChange(value)` on user interaction (view → form),\n * 3. call `emitTouch()` on blur,\n * 4. declare the DI provider:\n * `{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => MyComponent), multi: true }`.\n *\n * Works with reactive forms, template-driven forms, or standalone (no form at\n * all — the signals simply keep their defaults).\n */\nexport abstract class BaseControlValueAccessor<T> implements ControlValueAccessor {\n private readonly injector = inject(Injector);\n private readonly destroyRef = inject(DestroyRef);\n\n readonly dirty = signal(false);\n readonly pristine = signal(true);\n readonly touched = signal(false);\n readonly untouched = signal(true);\n /** Validation state of the attached control (false when no control). */\n readonly controlInvalid = signal(false);\n /** Validation errors of the attached control (null when valid / no control). */\n readonly controlErrors = signal<ValidationErrors | null>(null);\n /** Disabled state driven by the forms API (`control.disable()`), not by the `disabled` input. */\n readonly controlDisabled = signal(false);\n /** True when the error state should be surfaced to the user. */\n readonly showError = computed(() => this.controlInvalid() && (this.touched() || this.dirty()));\n\n protected onChange: (value: T) => void = () => {\n /* noop until registered */\n };\n protected onTouched: () => void = () => {\n /* noop until registered */\n };\n\n constructor() {\n // NgControl injects lazily (after the directive tree is built) to avoid\n // the classic NgControl ↔ value-accessor circular dependency.\n afterNextRender(() => this.watchNgControlEvents());\n }\n\n /** Write the form value into the component state (form → view). */\n abstract writeValue(value: T): void;\n\n registerOnChange(fn: (value: T) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.controlDisabled.set(isDisabled);\n }\n\n /** Propagate a user-driven value change to the form (view → form). */\n protected emitChange(value: T): void {\n this.onChange(value);\n }\n\n /** Mark the control as touched (call on blur). */\n protected emitTouch(): void {\n this.onTouched();\n this.touched.set(true);\n this.untouched.set(false);\n }\n\n /** Mirror the NgControl state into the signals. Wired automatically; safe to call once manually if needed. */\n protected watchNgControlEvents(): void {\n const control = this.injector.get(NgControl, null, { optional: true, self: true })?.control;\n if (!control) return;\n\n const mirror = () => {\n this.pristine.set(control.pristine);\n this.dirty.set(control.dirty);\n this.touched.set(control.touched);\n this.untouched.set(control.untouched);\n this.controlInvalid.set(control.invalid);\n this.controlErrors.set(control.errors);\n };\n\n // Signal-forms interop provides a fake NgControl without an `events`\n // stream, but its getters read the field's signals: mirroring inside\n // an effect tracks them and keeps the state live.\n if (!control.events) {\n effect(mirror, { injector: this.injector });\n return;\n }\n\n // Seed with the current state (events only fire on transitions).\n mirror();\n\n control.events.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((event) => {\n if (event instanceof PristineChangeEvent) {\n this.pristine.set(event.pristine);\n this.dirty.set(!event.pristine);\n } else if (event instanceof TouchedChangeEvent) {\n this.touched.set(event.touched);\n this.untouched.set(!event.touched);\n } else if (event instanceof StatusChangeEvent) {\n this.controlInvalid.set(event.status === 'INVALID');\n this.controlErrors.set(control.errors);\n }\n });\n }\n}\n","import { booleanAttribute, computed, Directive, input, signal } from '@angular/core';\nimport { BaseControlValueAccessor } from './base-control-value-accessor';\nimport { UiFeedbackLevel } from '@4sh/ui-kit/types';\n\nexport type FieldSize = 'default' | 'small';\n/** Visual validation status (subset of `UiFeedbackLevel`, shared with `ui-helper`). */\nexport type FieldLevel = Extract<UiFeedbackLevel, 'default' | 'success' | 'error'>;\n/**\n * Placement of the floating label (\"float label\" mode):\n * - `over`: rises above the box, where a classic label sits,\n * - `in`: rises to a band reserved at the top **inside** the box,\n * - `on`: rises **onto** the top border, notching it.\n */\nexport type FieldFloatLabel = 'over' | 'in' | 'on';\n\nlet nextUid = 0;\n\n/**\n * Base class for every standalone form control (`ui-checkbox`, `ui-toggle`,\n * `ui-slider`, `ui-nudger`…): the CVA plumbing shared by all of them, without\n * any \"box\" chrome (no label/helper/error message rendering).\n *\n * Provides the common inputs (aria*, id/name, required/disabled/readonly/\n * invalid, tabindex), the auto-generated id machinery (`resolvedId`,\n * `messageId`), the `modelValue` signal with the default `writeValue`, and the\n * derived `isDisabled` / `isInvalid` states. Extends `BaseControlValueAccessor`:\n * subclasses call `emitChange` / `emitTouch` on user interaction.\n *\n * Decorated with `@Directive()` (no selector) so the signal inputs are inherited\n * correctly by the concrete components.\n */\n@Directive()\nexport abstract class BaseFieldControl<T> extends BaseControlValueAccessor<T> {\n /** Accessible name when no visible label is provided. */\n ariaLabel = input<string>();\n /** id of an external element that labels this control. */\n ariaLabelledBy = input<string>();\n /** id forwarded to the native input (auto-generated when omitted). */\n inputId = input<string>();\n /** name forwarded to the native input. */\n name = input<string>();\n /** Required marker (*) + native required attribute. */\n required = input(false, { transform: booleanAttribute });\n /** Disables the field (native attribute). */\n disabled = input(false, { transform: booleanAttribute });\n /** Read-only (native attribute). */\n readonly = input(false, { transform: booleanAttribute });\n /** Forces the error styling (automatic when the attached control is invalid and touched/dirty). */\n invalid = input(false, { transform: booleanAttribute });\n /** tabindex forwarded to the native input. */\n tabindex = input<number>();\n\n /** @ignore Auto-generated unique id (prefix branded via `uidPrefix`). */\n protected readonly uid = `${this.uidPrefix()}-${nextUid++}`;\n /** @ignore Current value (written by the form or by user input). */\n protected readonly modelValue = signal<T | undefined>(undefined);\n\n /** @ignore */\n protected readonly resolvedId = computed(() => this.inputId() ?? this.uid);\n /** @ignore id of the message (for aria-describedby). */\n protected readonly messageId = computed(() => `${this.resolvedId()}-message`);\n /** @ignore Input disabled OR control disabled (form API). */\n protected readonly isDisabled = computed(() => this.disabled() || this.controlDisabled());\n /** @ignore Explicit error OR invalid control worth surfacing. */\n protected readonly isInvalid = computed(() => this.invalid() || this.showError());\n\n writeValue(value: T): void {\n this.modelValue.set(value);\n }\n\n /** @ignore Prefix of the auto-generated id — override to brand it per component. */\n protected uidPrefix(): string {\n return 'ui-field';\n }\n}\n\n/**\n * Base class for \"box\" form fields (`ui-input`, `ui-input-number`,\n * `ui-input-mask`, `ui-textarea`…).\n *\n * Extends `BaseFieldControl` with the box-specific inputs (label, helper,\n * error, size, level) and the derived state (effective level, displayed\n * message/value). Subclasses only handle their own `<input>` (specific\n * parsing/formatting) and call `emitChange` / `emitTouch`.\n */\n@Directive()\nexport abstract class BaseFormField<T> extends BaseFieldControl<T> {\n /** Label (rendered via `ui-label`). */\n label = input<string>();\n /** Helper text under the field (rendered via `ui-helper`). */\n helperText = input<string>();\n /** Error message shown in place of the helper when the field is in error. */\n errorText = input<string>();\n /** Prefixes the message under the field (helper or error) with a decorative icon. */\n showMessageIcon = input(false, { transform: booleanAttribute });\n /** Overrides the glyph shown by `showMessageIcon`. */\n messageIcon = input<string>();\n /** Size. */\n size = input<FieldSize>('default');\n /** Explicit validation status (`error` is forced when the control is invalid + touched). */\n level = input<FieldLevel>('default');\n /**\n * Floating label placement. Unset = classic label above the box.\n *\n * The label then plays the placeholder role while at rest, so the native\n * `placeholder` is neutralised (see `hasFloatLabel`).\n */\n floatLabel = input<FieldFloatLabel>();\n\n /** @ignore There is a label to float: a `floatLabel` alone has nothing to move. */\n protected readonly hasFloatLabel = computed(() => !!this.floatLabel() && !!this.label());\n\n /** @ignore Effective level: error when invalid, otherwise the requested `level`. */\n protected readonly effectiveLevel = computed<FieldLevel>(() =>\n this.isInvalid() ? 'error' : this.level(),\n );\n /** @ignore Displayed message: errorText when in error (if provided), otherwise helperText. */\n protected readonly displayMessage = computed(() =>\n this.isInvalid() && this.errorText() ? this.errorText() : this.helperText(),\n );\n /** @ignore Value shown in the input (string). Override for specific formatting. */\n protected readonly displayValue = computed(() => {\n const v = this.modelValue();\n return v === undefined || v === null ? '' : String(v);\n });\n}\n","import { ConnectedPosition } from '@angular/cdk/overlay';\n\n/**\n * Standard dropdown-panel anchoring shared by the overlay form fields\n * (`ui-select`, `ui-autocomplete`, `ui-input-tags`, `ui-datepicker`):\n * below the field, flipped above when `autoFlip`, flipped horizontally\n * (right-aligned) whenever there isn't enough room on the right.\n */\nexport function dropdownOverlayPositions(autoFlip: boolean): ConnectedPosition[] {\n const belowStart: ConnectedPosition = {\n originX: 'start',\n originY: 'bottom',\n overlayX: 'start',\n overlayY: 'top',\n offsetY: 8,\n };\n const belowEnd: ConnectedPosition = {\n originX: 'end',\n originY: 'bottom',\n overlayX: 'end',\n overlayY: 'top',\n offsetY: 8,\n };\n const aboveStart: ConnectedPosition = {\n originX: 'start',\n originY: 'top',\n overlayX: 'start',\n overlayY: 'bottom',\n offsetY: -8,\n };\n const aboveEnd: ConnectedPosition = {\n originX: 'end',\n originY: 'top',\n overlayX: 'end',\n overlayY: 'bottom',\n offsetY: -8,\n };\n return autoFlip ? [belowStart, belowEnd, aboveStart, aboveEnd] : [belowStart, belowEnd];\n}\n","/**\n * Pure masking engine shared by `ui-input-mask` and `ui-datepicker` (auto-formatting the typed\n * date). Same precedent as `overlay-positions.ts` in this folder: framework-free functions, no\n * class/Directive/Component, reusable by any form component that needs literal-inserting input\n * masking. Extracted from `ui-input-mask.ts` — behavior is a byte-for-byte copy, only `this.mask()`\n * /`this.ranges()`/`this.slotChar()` become explicit parameters.\n */\n\n/** Mask tokens → accepted character class. */\nexport const MASK_TOKENS: Record<string, RegExp> = {\n '9': /[0-9]/, // digit\n a: /[a-zA-Z]/, // letter\n '*': /[a-zA-Z0-9]/, // alphanumeric\n};\n\nexport interface MaskBounds {\n min: number;\n max: number;\n}\n\nexport interface MaskSlot {\n char: string | null;\n rgx?: RegExp;\n bound?: MaskBounds & { pos: number; len: number };\n}\n\nexport interface MaskBuildResult {\n display: string;\n masked: string;\n data: string;\n tokenIndices: number[];\n}\n\n/** Parse the `ranges` input (`\"1-31 1-12 1900-2100\"`) into one bound per numeric segment. */\nexport function parseMaskRanges(ranges: string): (MaskBounds | null)[] {\n return ranges\n .trim()\n .split(/\\s+/)\n .map((part) => {\n const m = /^(\\d+)-(\\d+)$/.exec(part);\n return m ? { min: Number(m[1]), max: Number(m[2]) } : null;\n });\n}\n\n/**\n * Resolve the mask template into slots: literals, input slots, and the `ranges` bounds attached\n * to every slot of the numeric segment (consecutive `9` tokens) it belongs to.\n */\nexport function buildMaskSlots(\n mask: string,\n bounds: (MaskBounds | null)[],\n tokens: Record<string, RegExp> = MASK_TOKENS,\n): MaskSlot[] {\n const slots: MaskSlot[] = [];\n const segments: MaskSlot[][] = [];\n let segment: MaskSlot[] | null = null;\n\n for (const m of mask) {\n const rgx = tokens[m];\n const slot: MaskSlot = rgx ? { char: null, rgx } : { char: m };\n slots.push(slot);\n if (rgx && m === '9') {\n if (!segment) segments.push((segment = []));\n segment.push(slot);\n } else {\n segment = null;\n }\n }\n\n // Every segment gets a `.bound`, even unranged ones (±Infinity = no-op range): `pos`/`len` are\n // needed for `atSegmentEnd` regardless, else an unranged segment (e.g. ui-datepicker's year)\n // never auto-inserts its own following literal (FSHSP-118).\n segments.forEach((seg, i) => {\n const range = bounds[i] ?? { min: -Infinity, max: Infinity };\n seg.forEach((slot, pos) => (slot.bound = { ...range, pos, len: seg.length }));\n });\n\n return slots;\n}\n\n/** Keep only the data characters (alphanumeric) of a raw input string. */\nexport function extractMaskData(raw: string): string {\n return raw.replace(/[^a-zA-Z0-9]/g, '');\n}\n\n/**\n * Can `ch` fill this slot? It must match the token class and — when the segment is bounded\n * AND `enforceBounds` — the digits typed so far plus `ch` must still admit at least one in-range\n * completion of the remaining positions (`2` then `4` is refused on `0-23`, `2` then `3` is\n * accepted).\n *\n * `enforceBounds = false` skips that second check (still requires the token class to match):\n * meant for re-deriving the mask after characters were REMOVED, not typed. The bounds check\n * exists to reject an invalid *new* leading digit while typing forward (e.g. `8` can never start\n * a valid `1-31` day, so it's skipped rather than accepted) — applied instead to the digits left\n * over after a deletion, that same skip can discard a still-valid residual digit and misalign\n * every segment after it. See `autoFormatSegments`.\n */\nexport function acceptsMaskChar(\n slot: MaskSlot,\n segment: string,\n ch: string,\n enforceBounds = true,\n): boolean {\n if (!slot.rgx?.test(ch)) return false;\n const bound = slot.bound;\n if (!enforceBounds || !bound) return true;\n const scale = 10 ** (bound.len - bound.pos - 1);\n const low = Number(segment + ch) * scale;\n return low <= bound.max && low + scale - 1 >= bound.min;\n}\n\n/** Apply the mask template to a sequence of data characters (fills empty positions with `slotChar`). */\nexport function applyMaskTemplate(\n slots: MaskSlot[],\n data: string,\n slotChar: string,\n): MaskBuildResult {\n let di = 0;\n let display = '';\n let masked = '';\n let lastFilled = 0;\n let used = '';\n const tokenIndices: number[] = [];\n // Characters already accepted in the current numeric segment (drives the bounds check).\n let segment = '';\n\n for (const slot of slots) {\n if (slot.char !== null) {\n display += slot.char;\n masked += slot.char;\n continue;\n }\n tokenIndices.push(display.length); // index of this token position in `display`\n if (!slot.bound || slot.bound.pos === 0) segment = '';\n while (di < data.length && !acceptsMaskChar(slot, segment, data[di])) di++;\n if (di < data.length) {\n display += data[di];\n masked += data[di];\n used += data[di];\n if (slot.bound) segment += data[di];\n di++;\n lastFilled = masked.length;\n } else {\n display += slotChar;\n }\n }\n // Masked value = up to the last typed character (no trailing literals/slots).\n return { display, masked: masked.slice(0, lastFilled), data: used, tokenIndices };\n}\n\n/** Caret position for `n` typed data characters (literals skipped, end-of-text once all filled). */\nexport function caretForMask(tokenIndices: number[], n: number, length: number): number {\n if (n <= 0) return tokenIndices[0] ?? 0;\n if (n >= tokenIndices.length) return length; // all filled → end\n return tokenIndices[n]; // next input position (literals skipped)\n}\n\n/**\n * Auto-format-as-you-type variant of {@link applyMaskTemplate}: inserts a literal separator as\n * soon as the segment right before it is complete, without ever padding unfilled positions with\n * a filler character (unlike `applyMaskTemplate`, meant for a field that displays the full\n * template at rest). Used by `ui-datepicker`'s typeable trigger to auto-insert \"/\" as digits are\n * typed, the same way a card-expiry field auto-inserts its \"/\".\n */\nexport function autoFormatSegments(\n slots: MaskSlot[],\n data: string,\n { enforceBounds = true }: { enforceBounds?: boolean } = {},\n): { text: string; tokenIndices: number[]; dataEnd: number } {\n let di = 0;\n let text = '';\n let segment = '';\n let atSegmentEnd = false;\n const tokenIndices: number[] = [];\n // Position right after the last DATA character appended — unlike `text.length`, never lands\n // after a separator inserted eagerly (see the \"auto-insert\" doc above) with nothing typed past\n // it yet. Landing the caret there instead (see call sites) means a Backspace right after a\n // just-completed segment removes that segment's last digit, not the decorative separator —\n // which would otherwise be silently re-inserted next render, making Backspace look like it did\n // nothing (FSHSP-118).\n let dataEnd = 0;\n\n for (const slot of slots) {\n if (slot.char !== null) {\n // Append EVERY consecutive literal after a completed segment, not just the first — needed\n // for a multi-char separator like range's \" - \" (FSHSP-118). `atSegmentEnd` is left as-is\n // here; the next digit slot always resets it before it's read again.\n if (atSegmentEnd) text += slot.char;\n continue;\n }\n tokenIndices.push(text.length);\n if (!slot.bound || slot.bound.pos === 0) segment = '';\n while (di < data.length && !acceptsMaskChar(slot, segment, data[di], enforceBounds)) di++;\n if (di >= data.length) break; // no more data: stop, no filler\n text += data[di];\n dataEnd = text.length;\n if (slot.bound) segment += data[di];\n atSegmentEnd = !!slot.bound && slot.bound.pos === slot.bound.len - 1;\n di++;\n }\n return { text, tokenIndices, dataEnd };\n}\n","/**\n * Pure date helpers (no framework dependency), shared by every field that has to cross\n * the `Date` ↔ ISO-string boundary — `ui-datepicker`, which parses what the user types,\n * and `ui-input-date`, which reads what the browser's native picker hands back.\n *\n * They lived inside `ui-datepicker`'s entry point while it was the only caller (FSHSP-209\n * moved them here). Two entry points must never import each other, so the second caller\n * left one choice: the shared `forms/` entry point, which exists for exactly this — the\n * helpers a field is built on. Serializing a `Date` from its LOCAL components rather than\n * through `toISOString()` is the subtle part, and it must not be re-derived twice.\n */\n\nexport function startOfDay(d: Date): Date {\n const x = new Date(d);\n x.setHours(0, 0, 0, 0);\n return x;\n}\nexport function firstOfMonth(d: Date): Date {\n return new Date(d.getFullYear(), d.getMonth(), 1);\n}\nexport function isSameDay(a: Date | null | undefined, b: Date | null | undefined): boolean {\n if (!a || !b) return false;\n return (\n a.getFullYear() === b.getFullYear() &&\n a.getMonth() === b.getMonth() &&\n a.getDate() === b.getDate()\n );\n}\nexport function addDays(d: Date, n: number): Date {\n const x = new Date(d);\n x.setDate(x.getDate() + n);\n return x;\n}\nexport function addMonths(d: Date, n: number): Date {\n return new Date(d.getFullYear(), d.getMonth() + n, 1);\n}\n/** Build a Date and reject overflowed components (e.g. 31 Feb). */\nexport function finalizeParsed(\n year: number,\n month: number,\n day: number,\n h: number,\n min: number,\n): Date | null {\n if (month < 0 || month > 11 || day < 1 || day > 31 || h > 23 || min > 59) return null;\n const d = new Date(year, month, day, h, min, 0, 0);\n if (d.getFullYear() !== year || d.getMonth() !== month || d.getDate() !== day) return null;\n return d;\n}\n\nconst ISO_DATE_RE = /^(\\d{4})-(\\d{2})-(\\d{2})$/;\nconst ISO_DATETIME_RE = /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2})$/;\nconst ISO_TIME_RE = /^(\\d{2}):(\\d{2})$/;\n\nfunction pad2(n: number): string {\n return String(n).padStart(2, '0');\n}\n/** Serialize a `Date` to `\"yyyy-MM-dd\"` from its LOCAL components — never `toISOString()`\n * (which converts to UTC and can shift the day by ±1 depending on the timezone). */\nexport function toIsoDate(d: Date): string {\n return `${d.getFullYear()}-${pad2(d.getMonth() + 1)}-${pad2(d.getDate())}`;\n}\n/** `\"HH:mm\"` — the shape a native `<input type=\"time\">` reads and writes. */\nexport function toIsoTime(d: Date): string {\n return `${pad2(d.getHours())}:${pad2(d.getMinutes())}`;\n}\n/** `\"yyyy-MM-ddTHH:mm\"` — date part built the same local, never-UTC way as {@link toIsoDate}. */\nexport function toIsoDateTime(d: Date): string {\n return `${toIsoDate(d)}T${pad2(d.getHours())}:${pad2(d.getMinutes())}`;\n}\n/** Strict `\"yyyy-MM-dd\"` parser (rejects anything else, incl. overflowed dates via `finalizeParsed`). */\nexport function parseIsoDate(s: string): Date | null {\n const m = ISO_DATE_RE.exec(s);\n if (!m) return null;\n return finalizeParsed(Number(m[1]), Number(m[2]) - 1, Number(m[3]), 0, 0);\n}\n/** Strict `\"yyyy-MM-ddTHH:mm\"` parser (`showTime`/`timeOnly` round-trip). */\nexport function parseIsoDateTime(s: string): Date | null {\n const m = ISO_DATETIME_RE.exec(s);\n if (!m) return null;\n return finalizeParsed(Number(m[1]), Number(m[2]) - 1, Number(m[3]), Number(m[4]), Number(m[5]));\n}\n/**\n * Strict `\"HH:mm\"` parser, anchored on `reference` (default: today).\n *\n * A bare time is not a point in time; the caller has to say on which day it lands. Mirrors\n * what `ui-datepicker` does in `timeOnly` mode — it too carries a full `Date` — so both\n * components hand back the same shape.\n */\nexport function parseIsoTime(s: string, reference: Date = new Date()): Date | null {\n const m = ISO_TIME_RE.exec(s);\n if (!m) return null;\n return finalizeParsed(\n reference.getFullYear(),\n reference.getMonth(),\n reference.getDate(),\n Number(m[1]),\n Number(m[2]),\n );\n}\n/** Accepts a `Date` as-is, or parses a `\"yyyy-MM-dd\"` string — used to let config inputs\n * (`minDate`/`maxDate`/`disabledDates`) take either shape. Invalid strings degrade to `null`\n * (no constraint) rather than throwing: a malformed config shouldn't crash the picker. */\nexport function normalizeDateInput(v: Date | string | null | undefined): Date | null {\n if (!v) return null;\n return v instanceof Date ? v : parseIsoDate(v);\n}\n","/**\n * Shared option-resolution helpers for list-based form fields\n * (`ui-select`, `ui-autocomplete`, `ui-input-tags`).\n *\n * Options can be primitives or objects; `optionValue` / `optionLabel` /\n * `optionDisabled` are (dot-path) fields read on object options, and `dataKey`\n * drives object equality. The accessors are passed as thunks so the resolver\n * stays reactive when bound to signal inputs.\n */\n\n/** Normalized option: resolved value/label/disabled + the original option. */\nexport interface OptionEntry {\n value: unknown;\n label: string;\n disabled: boolean;\n original: unknown;\n}\n\n/** Field accessors (typically the component's signal inputs). */\nexport interface OptionResolverFields {\n optionValue: () => string | undefined;\n optionLabel: () => string | undefined;\n optionDisabled: () => string | undefined;\n dataKey: () => string | undefined;\n}\n\nexport interface OptionResolver {\n /** Normalizes an option into an {@link OptionEntry}. */\n toEntry(option: unknown): OptionEntry;\n\n /** Reads a (dot-path) field from an object (`undefined` otherwise). */\n getField(target: unknown, path: string | undefined): unknown;\n\n /** Model value of an option (`optionValue` field, or the option itself). */\n resolveValue(option: unknown): unknown;\n\n /** Display label of an option (`optionLabel` field, `label` key, or text). */\n resolveLabel(option: unknown): string | null;\n\n /** Disabled flag of an option (`optionDisabled` field, or `disabled` key). */\n resolveDisabled(option: unknown): boolean;\n\n /** `String(value)`, or `null` for null/undefined. */\n asText(value: unknown): string | null;\n\n /** Value equality — by `dataKey` for objects, strict otherwise. */\n equals(a: unknown, b: unknown): boolean;\n}\n\nexport function createOptionResolver(fields: OptionResolverFields): OptionResolver {\n const isObject = (option: unknown): option is Record<string, unknown> =>\n typeof option === 'object' && option !== null;\n\n const getField = (target: unknown, path: string | undefined): unknown => {\n if (!path || !isObject(target)) return undefined;\n return path\n .split('.')\n .reduce<unknown>((acc, key) => (isObject(acc) ? acc[key] : undefined), target);\n };\n\n const asText = (value: unknown): string | null =>\n value === null || value === undefined ? null : String(value);\n\n const resolveValue = (option: unknown): unknown => {\n const field = fields.optionValue();\n if (field && isObject(option)) return getField(option, field);\n return option;\n };\n\n const resolveLabel = (option: unknown): string | null => {\n const field = fields.optionLabel();\n if (field && isObject(option)) return asText(getField(option, field));\n if (isObject(option) && 'label' in option) return asText(option['label']);\n return asText(option);\n };\n\n const resolveDisabled = (option: unknown): boolean => {\n const field = fields.optionDisabled();\n if (field && isObject(option)) return !!getField(option, field);\n if (isObject(option) && 'disabled' in option) return !!option['disabled'];\n return false;\n };\n\n const equals = (a: unknown, b: unknown): boolean => {\n const key = fields.dataKey();\n if (key && isObject(a) && isObject(b)) return a[key] === b[key];\n return a === b;\n };\n\n const toEntry = (option: unknown): OptionEntry => ({\n value: resolveValue(option),\n label: resolveLabel(option) ?? '',\n disabled: resolveDisabled(option),\n original: option,\n });\n\n return { toEntry, getField, resolveValue, resolveLabel, resolveDisabled, asText, equals };\n}\n","/**\n * Substitutes the `{0}` token of a (possibly user-overridden) label with a value.\n * Plain split/join — never interprets `$` sequences in `value` (unlike `String.replace`).\n */\nexport function formatLabel(template: string, value: string | number): string {\n return template.split('{0}').join(String(value));\n}\n","import { isDevMode } from '@angular/core';\n\n// Dev-only a11y guard shared by form controls that require an accessible name\n// (`ariaLabel`/`ariaLabelledBy`/`label`). Centralizes the \"how to warn\" (console + dev-mode\n// gating) so each component only supplies its own trigger condition and message text.\nexport function warnMissingAccessibleName(componentTag: string, message: string): void {\n if (isDevMode()) {\n console.warn(`[${componentTag}] ${message}`);\n }\n}\n","/*\n * Public API Surface of ui-kit/forms\n *\n * Shared form infrastructure: the base classes every `ui-*` field inherits\n * from, plus the helpers those fields rely on. Importing a field component\n * (e.g. `@4sh/ui-kit/forms/ui-input`) pulls this in automatically — you only import\n * from here directly when building your OWN field on top of the kit's\n * conventions.\n */\n\nexport * from './lib/base-control-value-accessor';\nexport * from './lib/base-form-field';\nexport * from './lib/overlay-positions';\nexport * from './lib/mask-engine';\nexport * from './lib/date-utils';\nexport * from './lib/option-resolver';\nexport * from './lib/format-label';\nexport * from './lib/warn-missing-accessible-name';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAmBA;;;;;;;;;;;;;;;;;;;;;;AAsBG;MACmB,wBAAwB,CAAA;AAwB5C,IAAA,WAAA,GAAA;AAvBiB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC3B,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;QAEvC,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,KAAK;kFAAC;QACrB,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,IAAI;qFAAC;QACvB,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,KAAK;oFAAC;QACvB,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,IAAI;sFAAC;;QAExB,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,KAAK;2FAAC;;QAE9B,IAAA,CAAA,aAAa,GAAG,MAAM,CAA0B,IAAI;0FAAC;;QAErD,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,KAAK;4FAAC;;QAE/B,IAAA,CAAA,SAAS,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,cAAc,EAAE,KAAK,IAAI,CAAC,OAAO,EAAE,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;sFAAC;QAEpF,IAAA,CAAA,QAAQ,GAAuB,MAAK;;AAE9C,QAAA,CAAC;QACS,IAAA,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AAI,CAAC,CAAA,CAAA,EAAI,YAAY,CAAA,EAAA,EAAK,OAAO,CAAA,CAAE,CAAC;IAC9C;AACF;;ACTA;;;;;;;;AAQG;;ACRH;;AAEG;;"}
|
|
1
|
+
{"version":3,"file":"4sh-ui-kit-forms.mjs","sources":["../../../projects/ui-kit/forms/src/lib/base-control-value-accessor.ts","../../../projects/ui-kit/forms/src/lib/base-form-field.ts","../../../projects/ui-kit/forms/src/lib/overlay-positions.ts","../../../projects/ui-kit/forms/src/lib/mask-engine.ts","../../../projects/ui-kit/forms/src/lib/date-utils.ts","../../../projects/ui-kit/forms/src/lib/option-resolver.ts","../../../projects/ui-kit/forms/src/lib/format-label.ts","../../../projects/ui-kit/forms/src/lib/warn-missing-accessible-name.ts","../../../projects/ui-kit/forms/src/lib/browser-fill.ts","../../../projects/ui-kit/forms/src/public-api.ts","../../../projects/ui-kit/forms/src/4sh-ui-kit-forms.ts"],"sourcesContent":["import {\n afterNextRender,\n computed,\n DestroyRef,\n effect,\n inject,\n Injector,\n signal,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport {\n ControlValueAccessor,\n NgControl,\n PristineChangeEvent,\n StatusChangeEvent,\n TouchedChangeEvent,\n ValidationErrors,\n} from '@angular/forms';\n\n/**\n * Base class for form components (`ui-checkbox`, `ui-radio`, `ui-input`…).\n *\n * Implements `ControlValueAccessor` and mirrors the attached `NgControl` state\n * into signals, so templates/styles can react to it declaratively:\n *\n * - `touched` / `dirty` / `pristine` / `untouched` — interaction state\n * - `controlInvalid` / `controlErrors` — validation state\n * - `controlDisabled` — driven by `control.disable()`\n * - `showError` — invalid AND (touched or dirty),\n * the usual \"when to paint red\" rule\n *\n * The subscription is wired automatically after first render and cleaned up on\n * destroy. Subclasses only have to:\n * 1. implement `writeValue()` (form → view),\n * 2. call `emitChange(value)` on user interaction (view → form),\n * 3. call `emitTouch()` on blur,\n * 4. declare the DI provider:\n * `{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => MyComponent), multi: true }`.\n *\n * Works with reactive forms, template-driven forms, or standalone (no form at\n * all — the signals simply keep their defaults).\n */\nexport abstract class BaseControlValueAccessor<T> implements ControlValueAccessor {\n private readonly injector = inject(Injector);\n private readonly destroyRef = inject(DestroyRef);\n\n readonly dirty = signal(false);\n readonly pristine = signal(true);\n readonly touched = signal(false);\n readonly untouched = signal(true);\n /** Validation state of the attached control (false when no control). */\n readonly controlInvalid = signal(false);\n /** Validation errors of the attached control (null when valid / no control). */\n readonly controlErrors = signal<ValidationErrors | null>(null);\n /** Disabled state driven by the forms API (`control.disable()`), not by the `disabled` input. */\n readonly controlDisabled = signal(false);\n /** True when the error state should be surfaced to the user. */\n readonly showError = computed(() => this.controlInvalid() && (this.touched() || this.dirty()));\n\n protected onChange: (value: T) => void = () => {\n /* noop until registered */\n };\n protected onTouched: () => void = () => {\n /* noop until registered */\n };\n\n constructor() {\n // NgControl injects lazily (after the directive tree is built) to avoid\n // the classic NgControl ↔ value-accessor circular dependency.\n afterNextRender(() => this.watchNgControlEvents());\n }\n\n /** Write the form value into the component state (form → view). */\n abstract writeValue(value: T): void;\n\n registerOnChange(fn: (value: T) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.controlDisabled.set(isDisabled);\n }\n\n /** Propagate a user-driven value change to the form (view → form). */\n protected emitChange(value: T): void {\n this.onChange(value);\n }\n\n /** Mark the control as touched (call on blur). */\n protected emitTouch(): void {\n this.onTouched();\n this.touched.set(true);\n this.untouched.set(false);\n }\n\n /** Mirror the NgControl state into the signals. Wired automatically; safe to call once manually if needed. */\n protected watchNgControlEvents(): void {\n const control = this.injector.get(NgControl, null, { optional: true, self: true })?.control;\n if (!control) return;\n\n const mirror = () => {\n this.pristine.set(control.pristine);\n this.dirty.set(control.dirty);\n this.touched.set(control.touched);\n this.untouched.set(control.untouched);\n this.controlInvalid.set(control.invalid);\n this.controlErrors.set(control.errors);\n };\n\n // Signal-forms interop provides a fake NgControl without an `events`\n // stream, but its getters read the field's signals: mirroring inside\n // an effect tracks them and keeps the state live.\n if (!control.events) {\n effect(mirror, { injector: this.injector });\n return;\n }\n\n // Seed with the current state (events only fire on transitions).\n mirror();\n\n control.events.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((event) => {\n if (event instanceof PristineChangeEvent) {\n this.pristine.set(event.pristine);\n this.dirty.set(!event.pristine);\n } else if (event instanceof TouchedChangeEvent) {\n this.touched.set(event.touched);\n this.untouched.set(!event.touched);\n } else if (event instanceof StatusChangeEvent) {\n this.controlInvalid.set(event.status === 'INVALID');\n this.controlErrors.set(control.errors);\n }\n });\n }\n}\n","import { booleanAttribute, computed, Directive, input, signal } from '@angular/core';\nimport { BaseControlValueAccessor } from './base-control-value-accessor';\nimport { UiFeedbackLevel } from '@4sh/ui-kit/types';\n\nexport type FieldSize = 'default' | 'small';\n/** Visual validation status (subset of `UiFeedbackLevel`, shared with `ui-helper`). */\nexport type FieldLevel = Extract<UiFeedbackLevel, 'default' | 'success' | 'error'>;\n/**\n * Placement of the floating label (\"float label\" mode):\n * - `over`: rises above the box, where a classic label sits,\n * - `in`: rises to a band reserved at the top **inside** the box,\n * - `on`: rises **onto** the top border, notching it.\n */\nexport type FieldFloatLabel = 'over' | 'in' | 'on';\n\nlet nextUid = 0;\n\n/**\n * Base class for every standalone form control (`ui-checkbox`, `ui-toggle`,\n * `ui-slider`, `ui-nudger`…): the CVA plumbing shared by all of them, without\n * any \"box\" chrome (no label/helper/error message rendering).\n *\n * Provides the common inputs (aria*, id/name, required/disabled/readonly/\n * invalid, tabindex), the auto-generated id machinery (`resolvedId`,\n * `messageId`), the `modelValue` signal with the default `writeValue`, and the\n * derived `isDisabled` / `isInvalid` states. Extends `BaseControlValueAccessor`:\n * subclasses call `emitChange` / `emitTouch` on user interaction.\n *\n * Decorated with `@Directive()` (no selector) so the signal inputs are inherited\n * correctly by the concrete components.\n */\n@Directive()\nexport abstract class BaseFieldControl<T> extends BaseControlValueAccessor<T> {\n /** Accessible name when no visible label is provided. */\n ariaLabel = input<string>();\n /** id of an external element that labels this control. */\n ariaLabelledBy = input<string>();\n /** id forwarded to the native input (auto-generated when omitted). */\n inputId = input<string>();\n /** name forwarded to the native input. */\n name = input<string>();\n /** Required marker (*) + native required attribute. */\n required = input(false, { transform: booleanAttribute });\n /** Disables the field (native attribute). */\n disabled = input(false, { transform: booleanAttribute });\n /** Read-only (native attribute). */\n readonly = input(false, { transform: booleanAttribute });\n /** Forces the error styling (automatic when the attached control is invalid and touched/dirty). */\n invalid = input(false, { transform: booleanAttribute });\n /** tabindex forwarded to the native input. */\n tabindex = input<number>();\n\n /** @ignore Auto-generated unique id (prefix branded via `uidPrefix`). */\n protected readonly uid = `${this.uidPrefix()}-${nextUid++}`;\n /** @ignore Current value (written by the form or by user input). */\n protected readonly modelValue = signal<T | undefined>(undefined);\n\n /** @ignore */\n protected readonly resolvedId = computed(() => this.inputId() ?? this.uid);\n /** @ignore id of the message (for aria-describedby). */\n protected readonly messageId = computed(() => `${this.resolvedId()}-message`);\n /** @ignore Input disabled OR control disabled (form API). */\n protected readonly isDisabled = computed(() => this.disabled() || this.controlDisabled());\n /** @ignore Explicit error OR invalid control worth surfacing. */\n protected readonly isInvalid = computed(() => this.invalid() || this.showError());\n\n writeValue(value: T): void {\n this.modelValue.set(value);\n }\n\n /** @ignore Prefix of the auto-generated id — override to brand it per component. */\n protected uidPrefix(): string {\n return 'ui-field';\n }\n}\n\n/**\n * Base class for \"box\" form fields (`ui-input`, `ui-input-number`,\n * `ui-input-mask`, `ui-textarea`…).\n *\n * Extends `BaseFieldControl` with the box-specific inputs (label, helper,\n * error, size, level) and the derived state (effective level, displayed\n * message/value). Subclasses only handle their own `<input>` (specific\n * parsing/formatting) and call `emitChange` / `emitTouch`.\n */\n@Directive()\nexport abstract class BaseFormField<T> extends BaseFieldControl<T> {\n /** Label (rendered via `ui-label`). */\n label = input<string>();\n /** Helper text under the field (rendered via `ui-helper`). */\n helperText = input<string>();\n /** Error message shown in place of the helper when the field is in error. */\n errorText = input<string>();\n /** Prefixes the message under the field (helper or error) with a decorative icon. */\n showMessageIcon = input(false, { transform: booleanAttribute });\n /** Overrides the glyph shown by `showMessageIcon`. */\n messageIcon = input<string>();\n /** Size. */\n size = input<FieldSize>('default');\n /** Explicit validation status (`error` is forced when the control is invalid + touched). */\n level = input<FieldLevel>('default');\n /**\n * Floating label placement. Unset = classic label above the box.\n *\n * The label then plays the placeholder role while at rest, so the native\n * `placeholder` is neutralised (see `hasFloatLabel`).\n */\n floatLabel = input<FieldFloatLabel>();\n\n /** @ignore There is a label to float: a `floatLabel` alone has nothing to move. */\n protected readonly hasFloatLabel = computed(() => !!this.floatLabel() && !!this.label());\n\n /** @ignore Effective level: error when invalid, otherwise the requested `level`. */\n protected readonly effectiveLevel = computed<FieldLevel>(() =>\n this.isInvalid() ? 'error' : this.level(),\n );\n /** @ignore Displayed message: errorText when in error (if provided), otherwise helperText. */\n protected readonly displayMessage = computed(() =>\n this.isInvalid() && this.errorText() ? this.errorText() : this.helperText(),\n );\n /** @ignore Value shown in the input (string). Override for specific formatting. */\n protected readonly displayValue = computed(() => {\n const v = this.modelValue();\n return v === undefined || v === null ? '' : String(v);\n });\n}\n","import { ConnectedPosition } from '@angular/cdk/overlay';\n\n/**\n * Standard dropdown-panel anchoring shared by the overlay form fields\n * (`ui-select`, `ui-autocomplete`, `ui-input-tags`, `ui-datepicker`):\n * below the field, flipped above when `autoFlip`, flipped horizontally\n * (right-aligned) whenever there isn't enough room on the right.\n */\nexport function dropdownOverlayPositions(autoFlip: boolean): ConnectedPosition[] {\n const belowStart: ConnectedPosition = {\n originX: 'start',\n originY: 'bottom',\n overlayX: 'start',\n overlayY: 'top',\n offsetY: 8,\n };\n const belowEnd: ConnectedPosition = {\n originX: 'end',\n originY: 'bottom',\n overlayX: 'end',\n overlayY: 'top',\n offsetY: 8,\n };\n const aboveStart: ConnectedPosition = {\n originX: 'start',\n originY: 'top',\n overlayX: 'start',\n overlayY: 'bottom',\n offsetY: -8,\n };\n const aboveEnd: ConnectedPosition = {\n originX: 'end',\n originY: 'top',\n overlayX: 'end',\n overlayY: 'bottom',\n offsetY: -8,\n };\n return autoFlip ? [belowStart, belowEnd, aboveStart, aboveEnd] : [belowStart, belowEnd];\n}\n","/**\n * Pure masking engine shared by `ui-input-mask` and `ui-datepicker` (auto-formatting the typed\n * date). Same precedent as `overlay-positions.ts` in this folder: framework-free functions, no\n * class/Directive/Component, reusable by any form component that needs literal-inserting input\n * masking. Extracted from `ui-input-mask.ts` — behavior is a byte-for-byte copy, only `this.mask()`\n * /`this.ranges()`/`this.slotChar()` become explicit parameters.\n */\n\n/** Mask tokens → accepted character class. */\nexport const MASK_TOKENS: Record<string, RegExp> = {\n '9': /[0-9]/, // digit\n a: /[a-zA-Z]/, // letter\n '*': /[a-zA-Z0-9]/, // alphanumeric\n};\n\nexport interface MaskBounds {\n min: number;\n max: number;\n}\n\nexport interface MaskSlot {\n char: string | null;\n rgx?: RegExp;\n bound?: MaskBounds & { pos: number; len: number };\n}\n\nexport interface MaskBuildResult {\n display: string;\n masked: string;\n data: string;\n tokenIndices: number[];\n}\n\n/** Parse the `ranges` input (`\"1-31 1-12 1900-2100\"`) into one bound per numeric segment. */\nexport function parseMaskRanges(ranges: string): (MaskBounds | null)[] {\n return ranges\n .trim()\n .split(/\\s+/)\n .map((part) => {\n const m = /^(\\d+)-(\\d+)$/.exec(part);\n return m ? { min: Number(m[1]), max: Number(m[2]) } : null;\n });\n}\n\n/**\n * Resolve the mask template into slots: literals, input slots, and the `ranges` bounds attached\n * to every slot of the numeric segment (consecutive `9` tokens) it belongs to.\n */\nexport function buildMaskSlots(\n mask: string,\n bounds: (MaskBounds | null)[],\n tokens: Record<string, RegExp> = MASK_TOKENS,\n): MaskSlot[] {\n const slots: MaskSlot[] = [];\n const segments: MaskSlot[][] = [];\n let segment: MaskSlot[] | null = null;\n\n for (const m of mask) {\n const rgx = tokens[m];\n const slot: MaskSlot = rgx ? { char: null, rgx } : { char: m };\n slots.push(slot);\n if (rgx && m === '9') {\n if (!segment) segments.push((segment = []));\n segment.push(slot);\n } else {\n segment = null;\n }\n }\n\n // Every segment gets a `.bound`, even unranged ones (±Infinity = no-op range): `pos`/`len` are\n // needed for `atSegmentEnd` regardless, else an unranged segment (e.g. ui-datepicker's year)\n // never auto-inserts its own following literal (FSHSP-118).\n segments.forEach((seg, i) => {\n const range = bounds[i] ?? { min: -Infinity, max: Infinity };\n seg.forEach((slot, pos) => (slot.bound = { ...range, pos, len: seg.length }));\n });\n\n return slots;\n}\n\n/** Keep only the data characters (alphanumeric) of a raw input string. */\nexport function extractMaskData(raw: string): string {\n return raw.replace(/[^a-zA-Z0-9]/g, '');\n}\n\n/**\n * Can `ch` fill this slot? It must match the token class and — when the segment is bounded\n * AND `enforceBounds` — the digits typed so far plus `ch` must still admit at least one in-range\n * completion of the remaining positions (`2` then `4` is refused on `0-23`, `2` then `3` is\n * accepted).\n *\n * `enforceBounds = false` skips that second check (still requires the token class to match):\n * meant for re-deriving the mask after characters were REMOVED, not typed. The bounds check\n * exists to reject an invalid *new* leading digit while typing forward (e.g. `8` can never start\n * a valid `1-31` day, so it's skipped rather than accepted) — applied instead to the digits left\n * over after a deletion, that same skip can discard a still-valid residual digit and misalign\n * every segment after it. See `autoFormatSegments`.\n */\nexport function acceptsMaskChar(\n slot: MaskSlot,\n segment: string,\n ch: string,\n enforceBounds = true,\n): boolean {\n if (!slot.rgx?.test(ch)) return false;\n const bound = slot.bound;\n if (!enforceBounds || !bound) return true;\n const scale = 10 ** (bound.len - bound.pos - 1);\n const low = Number(segment + ch) * scale;\n return low <= bound.max && low + scale - 1 >= bound.min;\n}\n\n/** Apply the mask template to a sequence of data characters (fills empty positions with `slotChar`). */\nexport function applyMaskTemplate(\n slots: MaskSlot[],\n data: string,\n slotChar: string,\n): MaskBuildResult {\n let di = 0;\n let display = '';\n let masked = '';\n let lastFilled = 0;\n let used = '';\n const tokenIndices: number[] = [];\n // Characters already accepted in the current numeric segment (drives the bounds check).\n let segment = '';\n\n for (const slot of slots) {\n if (slot.char !== null) {\n display += slot.char;\n masked += slot.char;\n continue;\n }\n tokenIndices.push(display.length); // index of this token position in `display`\n if (!slot.bound || slot.bound.pos === 0) segment = '';\n while (di < data.length && !acceptsMaskChar(slot, segment, data[di])) di++;\n if (di < data.length) {\n display += data[di];\n masked += data[di];\n used += data[di];\n if (slot.bound) segment += data[di];\n di++;\n lastFilled = masked.length;\n } else {\n display += slotChar;\n }\n }\n // Masked value = up to the last typed character (no trailing literals/slots).\n return { display, masked: masked.slice(0, lastFilled), data: used, tokenIndices };\n}\n\n/** Caret position for `n` typed data characters (literals skipped, end-of-text once all filled). */\nexport function caretForMask(tokenIndices: number[], n: number, length: number): number {\n if (n <= 0) return tokenIndices[0] ?? 0;\n if (n >= tokenIndices.length) return length; // all filled → end\n return tokenIndices[n]; // next input position (literals skipped)\n}\n\n/**\n * Auto-format-as-you-type variant of {@link applyMaskTemplate}: inserts a literal separator as\n * soon as the segment right before it is complete, without ever padding unfilled positions with\n * a filler character (unlike `applyMaskTemplate`, meant for a field that displays the full\n * template at rest). Used by `ui-datepicker`'s typeable trigger to auto-insert \"/\" as digits are\n * typed, the same way a card-expiry field auto-inserts its \"/\".\n */\nexport function autoFormatSegments(\n slots: MaskSlot[],\n data: string,\n { enforceBounds = true }: { enforceBounds?: boolean } = {},\n): { text: string; tokenIndices: number[]; dataEnd: number } {\n let di = 0;\n let text = '';\n let segment = '';\n let atSegmentEnd = false;\n const tokenIndices: number[] = [];\n // Position right after the last DATA character appended — unlike `text.length`, never lands\n // after a separator inserted eagerly (see the \"auto-insert\" doc above) with nothing typed past\n // it yet. Landing the caret there instead (see call sites) means a Backspace right after a\n // just-completed segment removes that segment's last digit, not the decorative separator —\n // which would otherwise be silently re-inserted next render, making Backspace look like it did\n // nothing (FSHSP-118).\n let dataEnd = 0;\n\n for (const slot of slots) {\n if (slot.char !== null) {\n // Append EVERY consecutive literal after a completed segment, not just the first — needed\n // for a multi-char separator like range's \" - \" (FSHSP-118). `atSegmentEnd` is left as-is\n // here; the next digit slot always resets it before it's read again.\n if (atSegmentEnd) text += slot.char;\n continue;\n }\n tokenIndices.push(text.length);\n if (!slot.bound || slot.bound.pos === 0) segment = '';\n while (di < data.length && !acceptsMaskChar(slot, segment, data[di], enforceBounds)) di++;\n if (di >= data.length) break; // no more data: stop, no filler\n text += data[di];\n dataEnd = text.length;\n if (slot.bound) segment += data[di];\n atSegmentEnd = !!slot.bound && slot.bound.pos === slot.bound.len - 1;\n di++;\n }\n return { text, tokenIndices, dataEnd };\n}\n","/**\n * Pure date helpers (no framework dependency), shared by every field that has to cross\n * the `Date` ↔ ISO-string boundary — `ui-datepicker`, which parses what the user types,\n * and `ui-input-date`, which reads what the browser's native picker hands back.\n *\n * They lived inside `ui-datepicker`'s entry point while it was the only caller (FSHSP-209\n * moved them here). Two entry points must never import each other, so the second caller\n * left one choice: the shared `forms/` entry point, which exists for exactly this — the\n * helpers a field is built on. Serializing a `Date` from its LOCAL components rather than\n * through `toISOString()` is the subtle part, and it must not be re-derived twice.\n */\n\nexport function startOfDay(d: Date): Date {\n const x = new Date(d);\n x.setHours(0, 0, 0, 0);\n return x;\n}\nexport function firstOfMonth(d: Date): Date {\n return new Date(d.getFullYear(), d.getMonth(), 1);\n}\nexport function isSameDay(a: Date | null | undefined, b: Date | null | undefined): boolean {\n if (!a || !b) return false;\n return (\n a.getFullYear() === b.getFullYear() &&\n a.getMonth() === b.getMonth() &&\n a.getDate() === b.getDate()\n );\n}\nexport function addDays(d: Date, n: number): Date {\n const x = new Date(d);\n x.setDate(x.getDate() + n);\n return x;\n}\nexport function addMonths(d: Date, n: number): Date {\n return new Date(d.getFullYear(), d.getMonth() + n, 1);\n}\n/** Build a Date and reject overflowed components (e.g. 31 Feb). */\nexport function finalizeParsed(\n year: number,\n month: number,\n day: number,\n h: number,\n min: number,\n): Date | null {\n if (month < 0 || month > 11 || day < 1 || day > 31 || h > 23 || min > 59) return null;\n const d = new Date(year, month, day, h, min, 0, 0);\n if (d.getFullYear() !== year || d.getMonth() !== month || d.getDate() !== day) return null;\n return d;\n}\n\nconst ISO_DATE_RE = /^(\\d{4})-(\\d{2})-(\\d{2})$/;\nconst ISO_DATETIME_RE = /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2})$/;\nconst ISO_TIME_RE = /^(\\d{2}):(\\d{2})$/;\n\nfunction pad2(n: number): string {\n return String(n).padStart(2, '0');\n}\n/** Serialize a `Date` to `\"yyyy-MM-dd\"` from its LOCAL components — never `toISOString()`\n * (which converts to UTC and can shift the day by ±1 depending on the timezone). */\nexport function toIsoDate(d: Date): string {\n return `${d.getFullYear()}-${pad2(d.getMonth() + 1)}-${pad2(d.getDate())}`;\n}\n/** `\"HH:mm\"` — the shape a native `<input type=\"time\">` reads and writes. */\nexport function toIsoTime(d: Date): string {\n return `${pad2(d.getHours())}:${pad2(d.getMinutes())}`;\n}\n/** `\"yyyy-MM-ddTHH:mm\"` — date part built the same local, never-UTC way as {@link toIsoDate}. */\nexport function toIsoDateTime(d: Date): string {\n return `${toIsoDate(d)}T${pad2(d.getHours())}:${pad2(d.getMinutes())}`;\n}\n/** Strict `\"yyyy-MM-dd\"` parser (rejects anything else, incl. overflowed dates via `finalizeParsed`). */\nexport function parseIsoDate(s: string): Date | null {\n const m = ISO_DATE_RE.exec(s);\n if (!m) return null;\n return finalizeParsed(Number(m[1]), Number(m[2]) - 1, Number(m[3]), 0, 0);\n}\n/** Strict `\"yyyy-MM-ddTHH:mm\"` parser (`showTime`/`timeOnly` round-trip). */\nexport function parseIsoDateTime(s: string): Date | null {\n const m = ISO_DATETIME_RE.exec(s);\n if (!m) return null;\n return finalizeParsed(Number(m[1]), Number(m[2]) - 1, Number(m[3]), Number(m[4]), Number(m[5]));\n}\n/**\n * Strict `\"HH:mm\"` parser, anchored on `reference` (default: today).\n *\n * A bare time is not a point in time; the caller has to say on which day it lands. Mirrors\n * what `ui-datepicker` does in `timeOnly` mode — it too carries a full `Date` — so both\n * components hand back the same shape.\n */\nexport function parseIsoTime(s: string, reference: Date = new Date()): Date | null {\n const m = ISO_TIME_RE.exec(s);\n if (!m) return null;\n return finalizeParsed(\n reference.getFullYear(),\n reference.getMonth(),\n reference.getDate(),\n Number(m[1]),\n Number(m[2]),\n );\n}\n/** Accepts a `Date` as-is, or parses a `\"yyyy-MM-dd\"` string — used to let config inputs\n * (`minDate`/`maxDate`/`disabledDates`) take either shape. Invalid strings degrade to `null`\n * (no constraint) rather than throwing: a malformed config shouldn't crash the picker. */\nexport function normalizeDateInput(v: Date | string | null | undefined): Date | null {\n if (!v) return null;\n return v instanceof Date ? v : parseIsoDate(v);\n}\n","/**\n * Shared option-resolution helpers for list-based form fields\n * (`ui-select`, `ui-autocomplete`, `ui-input-tags`).\n *\n * Options can be primitives or objects; `optionValue` / `optionLabel` /\n * `optionDisabled` are (dot-path) fields read on object options, and `dataKey`\n * drives object equality. The accessors are passed as thunks so the resolver\n * stays reactive when bound to signal inputs.\n */\n\n/** Normalized option: resolved value/label/disabled + the original option. */\nexport interface OptionEntry {\n value: unknown;\n label: string;\n disabled: boolean;\n original: unknown;\n}\n\n/** Field accessors (typically the component's signal inputs). */\nexport interface OptionResolverFields {\n optionValue: () => string | undefined;\n optionLabel: () => string | undefined;\n optionDisabled: () => string | undefined;\n dataKey: () => string | undefined;\n}\n\nexport interface OptionResolver {\n /** Normalizes an option into an {@link OptionEntry}. */\n toEntry(option: unknown): OptionEntry;\n\n /** Reads a (dot-path) field from an object (`undefined` otherwise). */\n getField(target: unknown, path: string | undefined): unknown;\n\n /** Model value of an option (`optionValue` field, or the option itself). */\n resolveValue(option: unknown): unknown;\n\n /** Display label of an option (`optionLabel` field, `label` key, or text). */\n resolveLabel(option: unknown): string | null;\n\n /** Disabled flag of an option (`optionDisabled` field, or `disabled` key). */\n resolveDisabled(option: unknown): boolean;\n\n /** `String(value)`, or `null` for null/undefined. */\n asText(value: unknown): string | null;\n\n /** Value equality — by `dataKey` for objects, strict otherwise. */\n equals(a: unknown, b: unknown): boolean;\n}\n\nexport function createOptionResolver(fields: OptionResolverFields): OptionResolver {\n const isObject = (option: unknown): option is Record<string, unknown> =>\n typeof option === 'object' && option !== null;\n\n const getField = (target: unknown, path: string | undefined): unknown => {\n if (!path || !isObject(target)) return undefined;\n return path\n .split('.')\n .reduce<unknown>((acc, key) => (isObject(acc) ? acc[key] : undefined), target);\n };\n\n const asText = (value: unknown): string | null =>\n value === null || value === undefined ? null : String(value);\n\n const resolveValue = (option: unknown): unknown => {\n const field = fields.optionValue();\n if (field && isObject(option)) return getField(option, field);\n return option;\n };\n\n const resolveLabel = (option: unknown): string | null => {\n const field = fields.optionLabel();\n if (field && isObject(option)) return asText(getField(option, field));\n if (isObject(option) && 'label' in option) return asText(option['label']);\n return asText(option);\n };\n\n const resolveDisabled = (option: unknown): boolean => {\n const field = fields.optionDisabled();\n if (field && isObject(option)) return !!getField(option, field);\n if (isObject(option) && 'disabled' in option) return !!option['disabled'];\n return false;\n };\n\n const equals = (a: unknown, b: unknown): boolean => {\n const key = fields.dataKey();\n if (key && isObject(a) && isObject(b)) return a[key] === b[key];\n return a === b;\n };\n\n const toEntry = (option: unknown): OptionEntry => ({\n value: resolveValue(option),\n label: resolveLabel(option) ?? '',\n disabled: resolveDisabled(option),\n original: option,\n });\n\n return { toEntry, getField, resolveValue, resolveLabel, resolveDisabled, asText, equals };\n}\n","/**\n * Substitutes the `{0}` token of a (possibly user-overridden) label with a value.\n * Plain split/join — never interprets `$` sequences in `value` (unlike `String.replace`).\n */\nexport function formatLabel(template: string, value: string | number): string {\n return template.split('{0}').join(String(value));\n}\n","import { isDevMode } from '@angular/core';\n\n// Dev-only a11y guard shared by form controls that require an accessible name\n// (`ariaLabel`/`ariaLabelledBy`/`label`). Centralizes the \"how to warn\" (console + dev-mode\n// gating) so each component only supplies its own trigger condition and message text.\nexport function warnMissingAccessibleName(componentTag: string, message: string): void {\n if (isDevMode()) {\n console.warn(`[${componentTag}] ${message}`);\n }\n}\n","import { Directive, output } from '@angular/core';\n\n/** Keyframes run by the `browser-fill` SCSS mixin while the browser autofills the field. */\nconst AUTOFILL_ANIMATION = 'ui-browser-fill';\n\n/**\n * Reports the events through which the browser may write a value into a native\n * `<input>`/`<textarea>` without an `input` event:\n *\n * - its autofill: the `:-webkit-autofill` animation declared by the\n * `utils.browser-fill` mixin, which the host stylesheet must include;\n * - a `change`.\n *\n * Either may follow an edit the host already handled through `input`: the\n * host syncs only when the native value differs from the one it renders, so\n * nothing is emitted twice. An `input` sent by the browser to a field without\n * focus already reaches the host's own `(input)` handler: `hasFocus()` tells\n * it apart from a keystroke.\n */\n@Directive({\n selector: '[uiBrowserFill]',\n host: {\n class: 'ui-browser-fill',\n '(change)': 'browserFill.emit($event)',\n '(animationstart)': 'onAnimationStart($event)',\n },\n})\nexport class UiBrowserFill {\n /** Emitted with the change/animation event that may reveal a fill. */\n readonly browserFill = output<Event>();\n\n protected onAnimationStart(event: AnimationEvent): void {\n if (event.animationName.endsWith(AUTOFILL_ANIMATION)) this.browserFill.emit(event);\n }\n}\n\n/** Whether `element` holds the focus (works inside a shadow root). */\nexport function hasFocus(element: Element): boolean {\n return (element.getRootNode() as Document | ShadowRoot).activeElement === element;\n}\n","/*\n * Public API Surface of ui-kit/forms\n *\n * Shared form infrastructure: the base classes every `ui-*` field inherits\n * from, plus the helpers those fields rely on. Importing a field component\n * (e.g. `@4sh/ui-kit/forms/ui-input`) pulls this in automatically — you only import\n * from here directly when building your OWN field on top of the kit's\n * conventions.\n */\n\nexport * from './lib/base-control-value-accessor';\nexport * from './lib/base-form-field';\nexport * from './lib/overlay-positions';\nexport * from './lib/mask-engine';\nexport * from './lib/date-utils';\nexport * from './lib/option-resolver';\nexport * from './lib/format-label';\nexport * from './lib/warn-missing-accessible-name';\nexport * from './lib/browser-fill';\n","/**\n * Generated bundle index. Do not edit.\n */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C;AAAE,YAAA,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC;IACpF;8GANW,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAb,aAAa,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,EAAA,WAAA,EAAA,aAAA,EAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,QAAA,EAAA,0BAAA,EAAA,gBAAA,EAAA,0BAAA,EAAA,EAAA,cAAA,EAAA,iBAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAb,aAAa,EAAA,UAAA,EAAA,CAAA;kBARzB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,iBAAiB;AAC3B,oBAAA,IAAI,EAAE;AACJ,wBAAA,KAAK,EAAE,iBAAiB;AACxB,wBAAA,UAAU,EAAE,0BAA0B;AACtC,wBAAA,kBAAkB,EAAE,0BAA0B;AAC/C,qBAAA;AACF,iBAAA;;AAUD;AACM,SAAU,QAAQ,CAAC,OAAgB,EAAA;IACvC,OAAQ,OAAO,CAAC,WAAW,EAA4B,CAAC,aAAa,KAAK,OAAO;AACnF;;ACvCA;;;;;;;;AAQG;;ACRH;;AAEG;;"}
|
|
@@ -1329,6 +1329,20 @@
|
|
|
1329
1329
|
}
|
|
1330
1330
|
],
|
|
1331
1331
|
"outputs": []
|
|
1332
|
+
},
|
|
1333
|
+
{
|
|
1334
|
+
"name": "UiBrowserFill",
|
|
1335
|
+
"kind": "directive",
|
|
1336
|
+
"selector": "[uiBrowserFill]",
|
|
1337
|
+
"description": "Reports the events through which the browser may write a value into a native `<input>`/`<textarea>` without an `input` event:",
|
|
1338
|
+
"inputs": [],
|
|
1339
|
+
"outputs": [
|
|
1340
|
+
{
|
|
1341
|
+
"name": "browserFill",
|
|
1342
|
+
"type": "Event",
|
|
1343
|
+
"description": "Emitted with the change/animation event that may reveal a fill."
|
|
1344
|
+
}
|
|
1345
|
+
]
|
|
1332
1346
|
}
|
|
1333
1347
|
]
|
|
1334
1348
|
},
|
|
@@ -1659,7 +1659,7 @@
|
|
|
1659
1659
|
"title": "Components/ui/forms/ui-autocomplete",
|
|
1660
1660
|
"name": "ui-autocomplete",
|
|
1661
1661
|
"section": "Force Selection",
|
|
1662
|
-
"text": "forceSelection valide la saisie manuelle au blur : si le texte ne correspond à aucune suggestion, l'input est effacé — la valeur portée dans le modèle est toujours l'une des suggestions.",
|
|
1662
|
+
"text": "forceSelection valide la saisie manuelle au blur : si le texte ne correspond à aucune suggestion, l'input est effacé — la valeur portée dans le modèle est toujours l'une des suggestions. Une valeur que le navigateur écrit dans le champ sans que l'utilisateur y soit (saisie automatique) n'attend pas de blur : la suggestion qui porte ce libellé est retenue dès que suggestions la contient. Sans correspondance, le texte reste affiché et le modèle vide ; la sortie du champ appliquera la règle habituelle.",
|
|
1663
1663
|
"source": "projects/ui-kit/forms/ui-autocomplete/ui-autocomplete.mdx"
|
|
1664
1664
|
},
|
|
1665
1665
|
{
|
|
@@ -1789,7 +1789,7 @@
|
|
|
1789
1789
|
"title": "Components/ui/forms/ui-autocomplete",
|
|
1790
1790
|
"name": "ui-autocomplete",
|
|
1791
1791
|
"section": "Formulaires",
|
|
1792
|
-
"text": "Le composant est un ControlValueAccessor : il se branche sans code additionnel aux Signal Forms ( @angular/forms/signals , directive [formField] , stables depuis Angular 22) via l'interop CVA native, ainsi qu'aux formulaires template-driven ( [(ngModel)] ) et réactifs ( [formControl] ). Dans tous les cas, le modèle porte la valeur sélectionnée (chaîne, objet suggestion ou champ optionValue ) ; le flux completeMethod → suggestions reste inchangé. L'exemple Invalid ci-dessus illustre le branchement [formControl] (réactif) avec validation required . <!-- Signal Forms --> <ui-autocomplete [formField]=\"country\" [suggestions]=\"results()\" (completeMethod)=\"search($event)\" /> <!-- Template-driven --> <ui-autocomplete [(ngModel)]=\"country\" [suggestions]=\"results()\" (completeMethod)=\"search($event)\" /> <!-- Reactive --> <ui-autocomplete [formControl]=\"countryCtrl\" [suggestions]=\"results()\" (completeMethod)=\"search($event)\" />",
|
|
1792
|
+
"text": "Le composant est un ControlValueAccessor : il se branche sans code additionnel aux Signal Forms ( @angular/forms/signals , directive [formField] , stables depuis Angular 22) via l'interop CVA native, ainsi qu'aux formulaires template-driven ( [(ngModel)] ) et réactifs ( [formControl] ). Dans tous les cas, le modèle porte la valeur sélectionnée (chaîne, objet suggestion ou champ optionValue ) ; le flux completeMethod → suggestions reste inchangé. L'exemple Invalid ci-dessus illustre le branchement [formControl] (réactif) avec validation required . Une valeur préremplie par le navigateur met à jour le modèle et émet completeMethod aussitôt, sans ouvrir le panneau sous un champ où l'utilisateur n'est pas ; completeOnFocus ignore de même l'évènement focus que Chrome envoie au champ qu'il remplit. Comportement commun aux champs : section « Saisie automatique du navigateur » de ui-input . nativeInputElement() donne accès à l' <input> natif, close() ferme le panneau sans déplacer le focus ( close(true) le rend au champ). <!-- Signal Forms --> <ui-autocomplete [formField]=\"country\" [suggestions]=\"results()\" (completeMethod)=\"search($event)\" /> <!-- Template-driven --> <ui-autocomplete [(ngModel)]=\"country\" [suggestions]=\"results()\" (completeMethod)=\"search($event)\" /> <!-- Reactive --> <ui-autocomplete [formControl]=\"countryCtrl\" [suggestions]=\"results()\" (completeMethod)=\"search($event)\" />",
|
|
1793
1793
|
"source": "projects/ui-kit/forms/ui-autocomplete/ui-autocomplete.mdx"
|
|
1794
1794
|
},
|
|
1795
1795
|
{
|
|
@@ -2019,7 +2019,7 @@
|
|
|
2019
2019
|
"title": "Components/ui/forms/ui-datepicker",
|
|
2020
2020
|
"name": "ui-datepicker",
|
|
2021
2021
|
"section": "range et multiple",
|
|
2022
|
-
"text": "allowInput couvre aussi range et multiple (FSHSP-118), toujours en complément de la grille — cliquer un jour continue de fonctionner exactement comme avant, la saisie clavier alimente le même modèle. Une entrée incomplète ou invalide revient à la dernière valeur affichée, comme en mode single . range : les deux dates dans le même champ, séparées par \" - \" — ex. \"08/07/2026 - 18/07/2026\" . Bénéficie du même masque auto-\"/\" en direct qu'en single : les deux dates, puis leur séparateur, se construisent au fil de la frappe. Tapées dans le désordre (fin avant début), elles sont réordonnées chronologiquement au commit, comme le ferait un second clic dans la grille. multiple : une liste séparée par \", \" — ex. \"08/07/2026, 15/07/2026, 23/07/2026\" , nombre de dates non borné. Pas de masque en direct ici — un nombre de dates non borné ne rentre pas dans un masque à gabarit fixe : texte libre, parsé au blur / Entrée uniquement. Une date en double est supprimée (même règle que le clic qui bascule une case déjà sélectionnée). Dans les deux cas, un parseDate custom s'applique par date individuelle (chaque partie séparée par \" - \" / \", \" lui est passée l'une après l'autre) — symétrique de la façon dont dateFormat s'applique déjà par date à l'affichage. showTime combiné à range / multiple n'est pas couvert par la saisie clavier (les dates tapées sont toujours calées à minuit) — seule la grille gère ce cas-là pour l'instant.",
|
|
2022
|
+
"text": "allowInput couvre aussi range et multiple (FSHSP-118), toujours en complément de la grille — cliquer un jour continue de fonctionner exactement comme avant, la saisie clavier alimente le même modèle. Une entrée incomplète ou invalide revient à la dernière valeur affichée, comme en mode single . range : les deux dates dans le même champ, séparées par \" - \" — ex. \"08/07/2026 - 18/07/2026\" . Bénéficie du même masque auto-\"/\" en direct qu'en single : les deux dates, puis leur séparateur, se construisent au fil de la frappe. Tapées dans le désordre (fin avant début), elles sont réordonnées chronologiquement au commit, comme le ferait un second clic dans la grille. multiple : une liste séparée par \", \" — ex. \"08/07/2026, 15/07/2026, 23/07/2026\" , nombre de dates non borné. Pas de masque en direct ici — un nombre de dates non borné ne rentre pas dans un masque à gabarit fixe : texte libre, parsé au blur / Entrée uniquement. Une date en double est supprimée (même règle que le clic qui bascule une case déjà sélectionnée). Dans les deux cas, un parseDate custom s'applique par date individuelle (chaque partie séparée par \" - \" / \", \" lui est passée l'une après l'autre) — symétrique de la façon dont dateFormat s'applique déjà par date à l'affichage. showTime combiné à range / multiple n'est pas couvert par la saisie clavier (les dates tapées sont toujours calées à minuit) — seule la grille gère ce cas-là pour l'instant. Une date préremplie par le navigateur ( autocomplete=\"bday\" ) dans le champ sans focus est validée aussitôt , sans attendre de blur ni d'Entrée : le modèle est mis à jour et dateSelect émis. Un texte qui n'est pas une date fait revenir le champ à la valeur précédente. Comportement commun aux champs : section « Saisie automatique du navigateur » de ui-input .",
|
|
2023
2023
|
"source": "projects/ui-kit/forms/ui-datepicker/ui-datepicker.mdx"
|
|
2024
2024
|
},
|
|
2025
2025
|
{
|
|
@@ -2029,7 +2029,7 @@
|
|
|
2029
2029
|
"title": "Components/ui/forms/ui-datepicker",
|
|
2030
2030
|
"name": "ui-datepicker",
|
|
2031
2031
|
"section": "Ouverture au focus (showOnFocus)",
|
|
2032
|
-
"text": "showOnFocus ouvre le panneau dès que le champ prend le focus , au pointeur comme au clavier, jamais sur un focus programmatique ( autofocus , un focus() appelé par l'application : le calendrier ne surgit pas sans geste de l'utilisateur). C'est l'affordance attendue là où le champ sert surtout à choisir une date plutôt qu'à la taper. Tant que showOnFocus est actif, le panneau est un popup non modal , quel que soit le chemin qui l'a ouvert (focus, icône, ↓ ) : le champ n'a jamais deux comportements selon la façon dont on y est arrivé. Cette différence porte tout le reste : Le focus reste dans le champ. Le déplacer en conséquence d'un focus serait un changement de contexte au sens de WCAG 3.2.1 ( On Focus , niveau A) . ↓ reste la façon d'entrer dans la grille quand l'utilisateur la demande. Pas d' aria-modal , pas de piège de focus. Le champ étant hors du panneau, le déclarer modal masquerait du buffer virtuel d'un lecteur d'écran le champ même dans lequel on tape. Pas de backdrop. Il avalerait le clic suivant sur le champ, exactement le défaut pour lequel le clic-pour-ouvrir avait été retiré. Le champ reste donc cliquable sous le panneau ouvert, pour corriger un segment à la souris, et un clic dedans le rouvre après un Échap . Tab ferme et poursuit la tabulation vers l'élément suivant de la page, sans traverser le calendrier : c'est le contrat APG du combobox, et l'overlay suivant le champ dans l'ordre du DOM, quitter un champ date coûterait sinon une tabulation à travers toute la grille. La grille s'atteint par ↓ . Sans showOnFocus , le panneau reste le dialogue modal habituel.",
|
|
2032
|
+
"text": "showOnFocus ouvre le panneau dès que le champ prend le focus , au pointeur comme au clavier, jamais sur un focus programmatique ( autofocus , un focus() appelé par l'application : le calendrier ne surgit pas sans geste de l'utilisateur), ni sur l'évènement focus que Chrome envoie à chaque champ rempli par sa saisie automatique sans lui donner le focus. C'est l'affordance attendue là où le champ sert surtout à choisir une date plutôt qu'à la taper. Tant que showOnFocus est actif, le panneau est un popup non modal , quel que soit le chemin qui l'a ouvert (focus, icône, ↓ ) : le champ n'a jamais deux comportements selon la façon dont on y est arrivé. Cette différence porte tout le reste : Le focus reste dans le champ. Le déplacer en conséquence d'un focus serait un changement de contexte au sens de WCAG 3.2.1 ( On Focus , niveau A) . ↓ reste la façon d'entrer dans la grille quand l'utilisateur la demande. Pas d' aria-modal , pas de piège de focus. Le champ étant hors du panneau, le déclarer modal masquerait du buffer virtuel d'un lecteur d'écran le champ même dans lequel on tape. Pas de backdrop. Il avalerait le clic suivant sur le champ, exactement le défaut pour lequel le clic-pour-ouvrir avait été retiré. Le champ reste donc cliquable sous le panneau ouvert, pour corriger un segment à la souris, et un clic dedans le rouvre après un Échap . Tab ferme et poursuit la tabulation vers l'élément suivant de la page, sans traverser le calendrier : c'est le contrat APG du combobox, et l'overlay suivant le champ dans l'ordre du DOM, quitter un champ date coûterait sinon une tabulation à travers toute la grille. La grille s'atteint par ↓ . Sans showOnFocus , le panneau reste le dialogue modal habituel.",
|
|
2033
2033
|
"source": "projects/ui-kit/forms/ui-datepicker/ui-datepicker.mdx"
|
|
2034
2034
|
},
|
|
2035
2035
|
{
|
|
@@ -2462,6 +2462,26 @@
|
|
|
2462
2462
|
"text": "Le composant est un ControlValueAccessor : il se branche sans code additionnel aux Signal Forms ( @angular/forms/signals , directive [formField] , stables depuis Angular 22) via l'interop CVA native, ainsi qu'aux formulaires template-driven ( [(ngModel)] ) et réactifs ( [formControl] ). <!-- Signal Forms --> <ui-input [formField]=\"field\" label=\"Nom\" placeholder=\"Votre nom\" />",
|
|
2463
2463
|
"source": "projects/ui-kit/forms/ui-input/ui-input.mdx"
|
|
2464
2464
|
},
|
|
2465
|
+
{
|
|
2466
|
+
"id": "components-ui-forms-ui-input--docs#saisie-automatique-du-navigateur",
|
|
2467
|
+
"docId": "components-ui-forms-ui-input--docs",
|
|
2468
|
+
"anchor": "saisie-automatique-du-navigateur",
|
|
2469
|
+
"title": "Components/ui/forms/ui-input",
|
|
2470
|
+
"name": "ui-input",
|
|
2471
|
+
"section": "Saisie automatique du navigateur",
|
|
2472
|
+
"text": "Quand le navigateur préremplit un formulaire (adresse, e-mail, code reçu par SMS), il écrit dans des champs où l'utilisateur n'est pas, et selon le navigateur il n'émet aucun input , seulement un change , ou un input sur un champ sans focus. Les champs du kit suivent ces trois cas : le modèle, valueChange et le ControlValueAccessor sont mis à jour une seule fois , sans attendre un clic dans le champ. La frappe et le collage ne changent pas. Une valeur écrite sans focus est traitée comme un remplissage, pas comme une frappe : Champ Valeur préremplie ui-input , ui-textarea Reprise telle quelle. ui-input-number Lue puis formatée aussitôt : aucune sortie du champ ne viendra le faire. ui-input-mask Passée au masque, sans placer de curseur. ui-input-otp Répartie dans les cases sans prendre le focus. ui-datepicker Validée sans attendre la sortie du champ ; si ce n'est pas une date, le champ revient à la valeur précédente. ui-autocomplete Prise comme texte libre, completeMethod émis aussitôt, panneau fermé. Avec forceSelection , la suggestion qui porte ce libellé est retenue dès qu'elle arrive. Pour guider le navigateur, renseigner autocomplete ( name , email , tel , postal-code , bday …) sur ui-input et ui-datepicker , et name sur les autres champs. À prévoir côté application. Un champ prérempli devient dirty : une valeur invalide affiche son erreur sans attendre le blur. valueChange (et optionSelect avec forceSelection ) peut partir sans geste de l'utilisateur : un gestionnaire qui appelle une API ou remplit d'autres champs doit le tolérer. Dans les tests, un input envoyé à un champ sans focus vaut remplissage : focaliser le champ avant de simuler une frappe ( userEvent.type ou fill() de Playwright le font déjà). Hors de portée : Chrome garde illisible par JavaScript une valeur qu'il préremplit au chargement de la page, jusqu'à une interaction.",
|
|
2473
|
+
"source": "projects/ui-kit/forms/ui-input/ui-input.mdx"
|
|
2474
|
+
},
|
|
2475
|
+
{
|
|
2476
|
+
"id": "components-ui-forms-ui-input--docs#dans-un-champ-maison",
|
|
2477
|
+
"docId": "components-ui-forms-ui-input--docs",
|
|
2478
|
+
"anchor": "dans-un-champ-maison",
|
|
2479
|
+
"title": "Components/ui/forms/ui-input",
|
|
2480
|
+
"name": "ui-input",
|
|
2481
|
+
"section": "Dans un champ maison",
|
|
2482
|
+
"text": "Un champ bâti sur @4sh/ui-kit/forms obtient le même comportement avec la directive uiBrowserFill , posée sur son élément natif, et le mixin utils.browser-fill , inclus à la racine de sa feuille de style. La directive émet browserFill sur l'animation :-webkit-autofill et sur change : le champ compare alors la valeur native avec celle qu'il affiche, ce qui évite toute double émission. hasFocus(element) distingue une frappe d'un input reçu sans focus, par exemple pour ne pas ouvrir de panneau. <input #native uiBrowserFill [value]=\"displayValue()\" (input)=\"onInput()\" (browserFill)=\"onBrowserFill()\" /> protected onBrowserFill(): void { if (this.native().nativeElement.value !== this.displayValue()) this.onInput(); } @use 'utils'; @include utils.browser-fill;",
|
|
2483
|
+
"source": "projects/ui-kit/forms/ui-input/ui-input.mdx"
|
|
2484
|
+
},
|
|
2465
2485
|
{
|
|
2466
2486
|
"id": "components-ui-forms-ui-input--docs#accessibilité",
|
|
2467
2487
|
"docId": "components-ui-forms-ui-input--docs",
|
|
@@ -2799,7 +2819,7 @@
|
|
|
2799
2819
|
"title": "Components/ui/forms/ui-input-mask",
|
|
2800
2820
|
"name": "ui-input-mask",
|
|
2801
2821
|
"section": "Formulaires",
|
|
2802
|
-
"text": "Le composant est un ControlValueAccessor : il se branche sans code additionnel aux Signal Forms ( @angular/forms/signals , directive [formField] , stables depuis Angular 22) via l'interop CVA native, ainsi qu'aux formulaires template-driven ( [(ngModel)] ) et réactifs ( [formControl] ).",
|
|
2822
|
+
"text": "Le composant est un ControlValueAccessor : il se branche sans code additionnel aux Signal Forms ( @angular/forms/signals , directive [formField] , stables depuis Angular 22) via l'interop CVA native, ainsi qu'aux formulaires template-driven ( [(ngModel)] ) et réactifs ( [formControl] ). Une valeur préremplie par le navigateur (téléphone, code postal) passe par le masque et met à jour le modèle sans clic dans le champ ; écrite sans focus, elle ne place pas de curseur. Comportement commun aux champs : section « Saisie automatique du navigateur » de ui-input .",
|
|
2803
2823
|
"source": "projects/ui-kit/forms/ui-input-mask/ui-input-mask.mdx"
|
|
2804
2824
|
},
|
|
2805
2825
|
{
|
|
@@ -2879,7 +2899,7 @@
|
|
|
2879
2899
|
"title": "Components/ui/forms/ui-input-number",
|
|
2880
2900
|
"name": "ui-input-number",
|
|
2881
2901
|
"section": "Formulaires",
|
|
2882
|
-
"text": "Le composant est un ControlValueAccessor : il se branche sans code additionnel aux Signal Forms ( @angular/forms/signals , directive [formField] , stables depuis Angular 22) via l'interop CVA native, ainsi qu'aux formulaires template-driven ( [(ngModel)] ) et réactifs ( [formControl] ). <!-- Signal Forms --> <ui-input-number [formField]=\"quantity\" label=\"Note (0–10)\" [min]=\"0\" [max]=\"10\" /> <!-- Template-driven --> <ui-input-number [(ngModel)]=\"price\" label=\"Prix\" locale=\"fr-FR\" currency=\"EUR\" [step]=\"0.5\" /> <!-- Reactive --> <ui-input-number [formControl]=\"ageCtrl\" label=\"Âge\" [min]=\"0\" [max]=\"120\" [allowDecimals]=\"false\" />",
|
|
2902
|
+
"text": "Le composant est un ControlValueAccessor : il se branche sans code additionnel aux Signal Forms ( @angular/forms/signals , directive [formField] , stables depuis Angular 22) via l'interop CVA native, ainsi qu'aux formulaires template-driven ( [(ngModel)] ) et réactifs ( [formControl] ). <!-- Signal Forms --> <ui-input-number [formField]=\"quantity\" label=\"Note (0–10)\" [min]=\"0\" [max]=\"10\" /> <!-- Template-driven --> <ui-input-number [(ngModel)]=\"price\" label=\"Prix\" locale=\"fr-FR\" currency=\"EUR\" [step]=\"0.5\" /> <!-- Reactive --> <ui-input-number [formControl]=\"ageCtrl\" label=\"Âge\" [min]=\"0\" [max]=\"120\" [allowDecimals]=\"false\" /> Une valeur préremplie par le navigateur dans le champ sans focus est lue et formatée aussitôt , puisqu'aucune sortie du champ ne viendra le faire ; elle n'est pas ramenée dans [min, max] , ce que seule la sortie du champ fait. Comportement commun aux champs : section « Saisie automatique du navigateur » de ui-input .",
|
|
2883
2903
|
"source": "projects/ui-kit/forms/ui-input-number/ui-input-number.mdx"
|
|
2884
2904
|
},
|
|
2885
2905
|
{
|
|
@@ -2979,7 +2999,7 @@
|
|
|
2979
2999
|
"title": "Components/ui/forms/ui-input-otp",
|
|
2980
3000
|
"name": "ui-input-otp",
|
|
2981
3001
|
"section": "Template",
|
|
2982
|
-
"text": "Le template #input remplace la cellule par défaut par votre propre UI. Il reçoit le contexte value ( $implicit ), index , tabindex (le roving à reporter sur votre <input> ) et events — les gestionnaires à brancher ( input / keydown / focus / blur / paste ) pour conserver toute la mécanique (navigation clavier, avance auto, collage réparti). <ui-input-otp [(ngModel)]=\"code\" [integerOnly]=\"true\" [length]=\"4\" ariaLabel=\"Code\"> <ng-template #input let-value let-i=\"index\" let-events=\"events\" let-tabindex=\"tabindex\"> <input [value]=\"value\" [attr.tabindex]=\"tabindex\" maxlength=\"1\" (input)=\"events.input($event)\" (keydown)=\"events.keydown($event)\" (focus)=\"events.focus($event)\" (blur)=\"events.blur($event)\" (paste)=\"events.paste($event)\" /> </ng-template> </ui-input-otp>",
|
|
3002
|
+
"text": "Le template #input remplace la cellule par défaut par votre propre UI. Il reçoit le contexte value ( $implicit ), index , tabindex (le roving à reporter sur votre <input> ) et events — les gestionnaires à brancher ( input / keydown / focus / blur / paste ) pour conserver toute la mécanique (navigation clavier, avance auto, collage réparti). Pour qu'une case personnalisée suive aussi la saisie automatique du navigateur, y poser la directive uiBrowserFill (de @4sh/ui-kit/forms ), relier (browserFill)=\"events.browserFill($event)\" et inclure le mixin utils.browser-fill dans la feuille du composant qui porte le template. <ui-input-otp [(ngModel)]=\"code\" [integerOnly]=\"true\" [length]=\"4\" ariaLabel=\"Code\"> <ng-template #input let-value let-i=\"index\" let-events=\"events\" let-tabindex=\"tabindex\"> <input [value]=\"value\" [attr.tabindex]=\"tabindex\" maxlength=\"1\" (input)=\"events.input($event)\" (keydown)=\"events.keydown($event)\" (focus)=\"events.focus($event)\" (blur)=\"events.blur($event)\" (paste)=\"events.paste($event)\" /> </ng-template> </ui-input-otp>",
|
|
2983
3003
|
"source": "projects/ui-kit/forms/ui-input-otp/ui-input-otp.mdx"
|
|
2984
3004
|
},
|
|
2985
3005
|
{
|
|
@@ -3039,7 +3059,7 @@
|
|
|
3039
3059
|
"title": "Components/ui/forms/ui-input-otp",
|
|
3040
3060
|
"name": "ui-input-otp",
|
|
3041
3061
|
"section": "Formulaires",
|
|
3042
|
-
"text": "ui-input-otp est un ControlValueAccessor : il se branche sans code additionnel aux Signal Forms ( @angular/forms/signals , directive [formField] , stables depuis Angular 22) via l'interop CVA native, ainsi qu'en [(ngModel)] et avec les Reactive Forms ( [formControl] / [formControlName] ) — l'interop est gérée par BaseControlValueAccessor (contrôle sans flux events ). La valeur du modèle est la chaîne jointe des cellules. <!-- Signal Forms --> <ui-input-otp [formField]=\"field\" ariaLabel=\"Code\" /> <!-- Template-driven --> <ui-input-otp [(ngModel)]=\"code\" ariaLabel=\"Code\" /> <!-- Reactive --> <ui-input-otp [formControl]=\"codeCtrl\" ariaLabel=\"Code\" />",
|
|
3062
|
+
"text": "ui-input-otp est un ControlValueAccessor : il se branche sans code additionnel aux Signal Forms ( @angular/forms/signals , directive [formField] , stables depuis Angular 22) via l'interop CVA native, ainsi qu'en [(ngModel)] et avec les Reactive Forms ( [formControl] / [formControlName] ) — l'interop est gérée par BaseControlValueAccessor (contrôle sans flux events ). La valeur du modèle est la chaîne jointe des cellules. <!-- Signal Forms --> <ui-input-otp [formField]=\"field\" ariaLabel=\"Code\" /> <!-- Template-driven --> <ui-input-otp [(ngModel)]=\"code\" ariaLabel=\"Code\" /> <!-- Reactive --> <ui-input-otp [formControl]=\"codeCtrl\" ariaLabel=\"Code\" /> Les cases portent autocomplete=\"one-time-code\" : un code proposé par le système (SMS) est réparti dans les cases et met à jour le modèle. Écrit dans une case sans focus, il ne déplace pas le focus. Comportement commun aux champs : section « Saisie automatique du navigateur » de ui-input .",
|
|
3043
3063
|
"source": "projects/ui-kit/forms/ui-input-otp/ui-input-otp.mdx"
|
|
3044
3064
|
},
|
|
3045
3065
|
{
|
|
@@ -4359,7 +4379,7 @@
|
|
|
4359
4379
|
"title": "Components/ui/forms/ui-textarea",
|
|
4360
4380
|
"name": "ui-textarea",
|
|
4361
4381
|
"section": "Validation",
|
|
4362
|
-
"text": "Le composant est un ControlValueAccessor : il se branche sans code additionnel aux Signal Forms ( @angular/forms/signals , directive [formField] , stables depuis Angular 22) via l'interop CVA native, ainsi qu'aux formulaires template-driven ( [(ngModel)] ) et réactifs ( [formControl] ). Quelle que soit l'API, l'erreur est dynamique : elle n'apparaît qu'après interaction et se lève automatiquement quand le champ redevient valide. required affiche aussi le marqueur * sur le label. Pas besoin de forcer level=\"error\" .",
|
|
4382
|
+
"text": "Le composant est un ControlValueAccessor : il se branche sans code additionnel aux Signal Forms ( @angular/forms/signals , directive [formField] , stables depuis Angular 22) via l'interop CVA native, ainsi qu'aux formulaires template-driven ( [(ngModel)] ) et réactifs ( [formControl] ). Quelle que soit l'API, l'erreur est dynamique : elle n'apparaît qu'après interaction et se lève automatiquement quand le champ redevient valide. required affiche aussi le marqueur * sur le label. Pas besoin de forcer level=\"error\" . Une adresse préremplie par le navigateur met à jour le modèle sans clic dans le champ, même quand le navigateur n'émet aucun input : voir la section « Saisie automatique du navigateur » de ui-input .",
|
|
4363
4383
|
"source": "projects/ui-kit/forms/ui-textarea/ui-textarea.mdx"
|
|
4364
4384
|
},
|
|
4365
4385
|
{
|
package/mcp/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@4sh/ui-kit-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"description": "MCP server exposing the @4sh/ui-kit design system (components, props, tokens, doc) to AI coding agents. Not published on its own: bundled at build time into @4sh/ui-kit (library mode) and @4sh/ui-kit-schematics (starter mode) — see scripts/mcp-bundle.build.mjs.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@4sh/ui-kit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"description": "Headless Angular components from the 4SH Design System: signals + Angular CDK, styled exclusively through design tokens. Ships a companion MCP server exposing the kit catalog and doc to AI coding agents.",
|
|
5
5
|
"homepage": "https://4sh.github.io/starter-angular/?path=/docs/introduction--docs",
|
|
6
6
|
"repository": {
|
|
@@ -114,6 +114,17 @@ $_moving-properties: (
|
|
|
114
114
|
padding-block-start: calc(#{$extra} + var(--_field-inset-block-start, 0px));
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
+
/// Starts the animation `UiBrowserFill` listens to while the browser autofills
|
|
118
|
+
/// a field marked `uiBrowserFill`. Include once, at the root of the stylesheet
|
|
119
|
+
/// of the component whose template holds that field.
|
|
120
|
+
@mixin browser-fill {
|
|
121
|
+
@keyframes ui-browser-fill {
|
|
122
|
+
from { opacity: 1; }
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.ui-browser-fill:-webkit-autofill { animation: ui-browser-fill 0s; }
|
|
126
|
+
}
|
|
127
|
+
|
|
117
128
|
/// Bare native <input>/<textarea> filling the field box (no border/bg).
|
|
118
129
|
/// `$inset` = horizontal field inset owned by the control (see
|
|
119
130
|
/// `field-inset-edges`); pass `false` when the control is nested in a wrapper
|
|
@@ -91,6 +91,10 @@ type AcRow = {
|
|
|
91
91
|
* (`role="combobox"` + `aria-activedescendant`: focus never leaves the input,
|
|
92
92
|
* suggestions are only visually focused).
|
|
93
93
|
*
|
|
94
|
+
* A value the browser writes into the input without focus (autofill) updates
|
|
95
|
+
* the model and emits `completeMethod` without opening the panel; with
|
|
96
|
+
* `forceSelection`, the suggestion carrying that exact label is then selected.
|
|
97
|
+
*
|
|
94
98
|
* Customisation: the `#item`, `#selectedItem`, `#group`, `#header`, `#footer`
|
|
95
99
|
* and `#empty` templates, `panelStyleClass`, and the local SCSS variables.
|
|
96
100
|
*
|
|
@@ -246,6 +250,8 @@ declare class UiAutocomplete<T = unknown> extends BaseFormField<AutocompleteValu
|
|
|
246
250
|
private searchTimeout;
|
|
247
251
|
/** @ignore A written value whose label could not be resolved yet (see `writeValue`). */
|
|
248
252
|
private readonly pendingLabelSync;
|
|
253
|
+
/** @ignore `forceSelection`: a text written by the browser, awaiting the suggestion it names. */
|
|
254
|
+
private readonly pendingFill;
|
|
249
255
|
constructor();
|
|
250
256
|
/** @ignore */
|
|
251
257
|
protected readonly listboxId: _angular_core.Signal<string>;
|
|
@@ -318,14 +324,19 @@ declare class UiAutocomplete<T = unknown> extends BaseFormField<AutocompleteValu
|
|
|
318
324
|
private seedSelectionCache;
|
|
319
325
|
/** Moves focus to the input. */
|
|
320
326
|
focus(options?: FocusOptions): void;
|
|
327
|
+
/** Native `<input>` element (the combobox). */
|
|
328
|
+
nativeInputElement(): HTMLInputElement;
|
|
321
329
|
/** @ignore */
|
|
322
330
|
private open;
|
|
323
|
-
/**
|
|
324
|
-
|
|
331
|
+
/** Closes the suggestions panel; `focusInput` moves the focus back to the input. */
|
|
332
|
+
close(focusInput?: boolean): void;
|
|
325
333
|
/** @ignore First visually focused option when the panel opens. */
|
|
326
334
|
private initialFocusIndex;
|
|
327
|
-
/** @ignore Typing: view → form (free text unless `forceSelection`) + debounced query.
|
|
335
|
+
/** @ignore Typing: view → form (free text unless `forceSelection`) + debounced query.
|
|
336
|
+
* A value written by the browser without focus queries at once, panel closed. */
|
|
328
337
|
protected onInput(event: Event): void;
|
|
338
|
+
/** @ignore Value written by the browser without an `input` event. */
|
|
339
|
+
protected onBrowserFill(event: Event): void;
|
|
329
340
|
/** @ignore Emit a query and open the panel. */
|
|
330
341
|
private runSearch;
|
|
331
342
|
/** @ignore */
|
|
@@ -406,6 +417,8 @@ declare class UiAutocomplete<T = unknown> extends BaseFormField<AutocompleteValu
|
|
|
406
417
|
private isValueSelected;
|
|
407
418
|
/** @ignore Value equality — by `dataKey` for objects, strict otherwise. */
|
|
408
419
|
private equals;
|
|
420
|
+
/** @ignore Enabled suggestion whose label matches `text` (case/diacritics-insensitive). */
|
|
421
|
+
private entryLabelled;
|
|
409
422
|
/** @ignore Case- and diacritics-insensitive comparison text. */
|
|
410
423
|
private normalize;
|
|
411
424
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiAutocomplete<any>, never>;
|
|
@@ -56,6 +56,8 @@ declare class UiInputMask extends BaseFormField<string> {
|
|
|
56
56
|
focus(options?: FocusOptions): void;
|
|
57
57
|
/** @ignore Input: apply the mask, update model + display + caret. */
|
|
58
58
|
protected onInput(): void;
|
|
59
|
+
/** @ignore Value written by the browser without an `input` event. */
|
|
60
|
+
protected onBrowserFill(): void;
|
|
59
61
|
/** @ignore */
|
|
60
62
|
protected onBlur(event: FocusEvent): void;
|
|
61
63
|
/** @ignore Emitted value depending on `unmask`. */
|
|
@@ -75,8 +75,11 @@ declare class UiInputNumber extends BaseFormField<number | null> {
|
|
|
75
75
|
focus(options?: FocusOptions): void;
|
|
76
76
|
/** @ignore Focus: switch to an editable form (no grouping/currency). */
|
|
77
77
|
protected onFocus(event: FocusEvent): void;
|
|
78
|
-
/** @ignore Input: parse without reformatting the text (caret preserved).
|
|
78
|
+
/** @ignore Input: parse without reformatting the text (caret preserved). A value written by
|
|
79
|
+
* the browser without focus is reformatted at once: no blur will follow to do it. */
|
|
79
80
|
protected onInput(): void;
|
|
81
|
+
/** @ignore Value written by the browser without an `input` event. */
|
|
82
|
+
protected onBrowserFill(): void;
|
|
80
83
|
/** @ignore Blur: clamp + rich reformatting. */
|
|
81
84
|
protected onBlur(event: FocusEvent): void;
|
|
82
85
|
/** @ignore ↑/↓ arrow keys. */
|
|
@@ -16,6 +16,8 @@ interface InputOtpCellEvents {
|
|
|
16
16
|
blur: (event: FocusEvent) => void;
|
|
17
17
|
/** Wire on `(paste)`. */
|
|
18
18
|
paste: (event: ClipboardEvent) => void;
|
|
19
|
+
/** Wire on `(browserFill)` of a cell marked `uiBrowserFill`. */
|
|
20
|
+
browserFill: (event: Event) => void;
|
|
19
21
|
}
|
|
20
22
|
/** Context handed to the `#input` template (one per cell). */
|
|
21
23
|
interface InputOtpCellContext {
|
|
@@ -104,6 +106,8 @@ declare class UiInputOtp extends BaseFieldControl<string> {
|
|
|
104
106
|
protected cellEvents(index: number): InputOtpCellEvents;
|
|
105
107
|
/** @ignore Cell input: single source of the per-cell value (view → form). */
|
|
106
108
|
protected onInput(event: Event, index: number): void;
|
|
109
|
+
/** @ignore Value written by the browser into a cell without an `input` event. */
|
|
110
|
+
protected onBrowserFill(event: Event, index: number): void;
|
|
107
111
|
/** @ignore Keyboard navigation + input guards. */
|
|
108
112
|
protected onKeydown(event: KeyboardEvent, index: number): void;
|
|
109
113
|
/** @ignore Select the cell content on focus + track the roving index. */
|
|
@@ -112,7 +116,7 @@ declare class UiInputOtp extends BaseFieldControl<string> {
|
|
|
112
116
|
protected onPaste(event: ClipboardEvent, index: number): void;
|
|
113
117
|
/** @ignore Mark touched when focus leaves the whole group. */
|
|
114
118
|
protected onFocusOut(event: FocusEvent): void;
|
|
115
|
-
/** @ignore Write `chars` into the cells starting at `from`, then commit + focus. */
|
|
119
|
+
/** @ignore Write `chars` into the cells starting at `from`, then commit (+ focus). */
|
|
116
120
|
private setFromIndex;
|
|
117
121
|
/** @ignore Persist the tokens, emit the joined value (+ `completed` when full). */
|
|
118
122
|
private commit;
|
|
@@ -125,6 +125,8 @@ declare class UiInput extends BaseFormField<string> {
|
|
|
125
125
|
nativeInputElement(): HTMLInputElement;
|
|
126
126
|
/** @ignore Input: single source of the value (view → form). */
|
|
127
127
|
protected onInput(): void;
|
|
128
|
+
/** @ignore Value written by the browser without an `input` event. */
|
|
129
|
+
protected onBrowserFill(): void;
|
|
128
130
|
/** @ignore */
|
|
129
131
|
protected onBlur(event: FocusEvent): void;
|
|
130
132
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiInput, never>;
|
|
@@ -53,6 +53,8 @@ declare class UiTextarea extends BaseFormField<string> {
|
|
|
53
53
|
focus(options?: FocusOptions): void;
|
|
54
54
|
/** @ignore Input: single source of the value (view → form). */
|
|
55
55
|
protected onInput(): void;
|
|
56
|
+
/** @ignore Value written by the browser without an `input` event. */
|
|
57
|
+
protected onBrowserFill(): void;
|
|
56
58
|
/** @ignore */
|
|
57
59
|
protected onBlur(event: FocusEvent): void;
|
|
58
60
|
/** @ignore Recomputes the height to fit the content. */
|