@nexterajs/ui 0.0.2 → 0.1.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.
Files changed (59) hide show
  1. package/README.md +279 -34
  2. package/fesm2022/nexterajs-ui-charts.mjs +1096 -0
  3. package/fesm2022/nexterajs-ui-charts.mjs.map +1 -0
  4. package/fesm2022/nexterajs-ui-core.mjs +652 -12
  5. package/fesm2022/nexterajs-ui-core.mjs.map +1 -1
  6. package/fesm2022/nexterajs-ui-display.mjs +1142 -0
  7. package/fesm2022/nexterajs-ui-display.mjs.map +1 -0
  8. package/fesm2022/nexterajs-ui-dropdowns.mjs +321 -33
  9. package/fesm2022/nexterajs-ui-dropdowns.mjs.map +1 -1
  10. package/fesm2022/nexterajs-ui-file-uploader.mjs +572 -10
  11. package/fesm2022/nexterajs-ui-file-uploader.mjs.map +1 -1
  12. package/fesm2022/nexterajs-ui-forms.mjs +2027 -136
  13. package/fesm2022/nexterajs-ui-forms.mjs.map +1 -1
  14. package/fesm2022/nexterajs-ui-grid.mjs +1222 -188
  15. package/fesm2022/nexterajs-ui-grid.mjs.map +1 -1
  16. package/fesm2022/nexterajs-ui-intl.mjs +103 -11
  17. package/fesm2022/nexterajs-ui-intl.mjs.map +1 -1
  18. package/fesm2022/nexterajs-ui-navigation.mjs +1054 -0
  19. package/fesm2022/nexterajs-ui-navigation.mjs.map +1 -0
  20. package/fesm2022/nexterajs-ui-notify.mjs +46 -44
  21. package/fesm2022/nexterajs-ui-notify.mjs.map +1 -1
  22. package/fesm2022/nexterajs-ui-overlay.mjs +1671 -0
  23. package/fesm2022/nexterajs-ui-overlay.mjs.map +1 -0
  24. package/fesm2022/nexterajs-ui-pivot.mjs +51 -26
  25. package/fesm2022/nexterajs-ui-pivot.mjs.map +1 -1
  26. package/fesm2022/nexterajs-ui-shell.mjs +542 -0
  27. package/fesm2022/nexterajs-ui-shell.mjs.map +1 -0
  28. package/fesm2022/nexterajs-ui-tree-view.mjs +5 -2
  29. package/fesm2022/nexterajs-ui-tree-view.mjs.map +1 -1
  30. package/fesm2022/nexterajs-ui-validation.mjs +42 -11
  31. package/fesm2022/nexterajs-ui-validation.mjs.map +1 -1
  32. package/fesm2022/nexterajs-ui.mjs +5 -0
  33. package/fesm2022/nexterajs-ui.mjs.map +1 -1
  34. package/package.json +33 -2
  35. package/styles/_dropdown.scss +5 -5
  36. package/styles/_editor.scss +52 -17
  37. package/styles/_mixins.scss +1 -1
  38. package/styles/_scrollbar.scss +5 -5
  39. package/styles/_status.scss +21 -0
  40. package/styles/_toast.scss +14 -14
  41. package/styles/_tokens.scss +420 -3
  42. package/styles/_widget.scss +14 -3
  43. package/styles/index.scss +6 -4
  44. package/types/nexterajs-ui-charts.d.ts +446 -0
  45. package/types/nexterajs-ui-core.d.ts +387 -22
  46. package/types/nexterajs-ui-display.d.ts +720 -0
  47. package/types/nexterajs-ui-dropdowns.d.ts +191 -48
  48. package/types/nexterajs-ui-file-uploader.d.ts +236 -7
  49. package/types/nexterajs-ui-forms.d.ts +675 -30
  50. package/types/nexterajs-ui-grid.d.ts +448 -93
  51. package/types/nexterajs-ui-intl.d.ts +39 -4
  52. package/types/nexterajs-ui-navigation.d.ts +531 -0
  53. package/types/nexterajs-ui-notify.d.ts +4 -2
  54. package/types/nexterajs-ui-overlay.d.ts +703 -0
  55. package/types/nexterajs-ui-pivot.d.ts +56 -48
  56. package/types/nexterajs-ui-shell.d.ts +294 -0
  57. package/types/nexterajs-ui-tree-view.d.ts +6 -3
  58. package/types/nexterajs-ui-validation.d.ts +20 -11
  59. package/types/nexterajs-ui.d.ts +5 -0
@@ -1 +1 @@
1
- {"version":3,"file":"nexterajs-ui-forms.mjs","sources":["../../../projects/nextera-ui/forms/src/lib/button/nxe-button.component.ts","../../../projects/nextera-ui/forms/src/lib/text-box/nxe-text-box.component.ts","../../../projects/nextera-ui/forms/src/lib/text-area/nxe-text-area.component.ts","../../../projects/nextera-ui/forms/src/lib/check-box/nxe-check-box.component.ts","../../../projects/nextera-ui/forms/src/lib/number-box/nxe-number-box.component.ts","../../../projects/nextera-ui/forms/src/lib/date-box/nxe-date-box.component.ts","../../../projects/nextera-ui/forms/src/lib/scroll-view/nxe-scroll-view.component.ts","../../../projects/nextera-ui/forms/src/public-api.ts","../../../projects/nextera-ui/forms/src/nexterajs-ui-forms.ts"],"sourcesContent":["import {\r\n booleanAttribute,\r\n ChangeDetectionStrategy,\r\n Component,\r\n computed,\r\n ElementRef,\r\n inject,\r\n input,\r\n output,\r\n ViewEncapsulation,\r\n} from '@angular/core';\r\nimport { NXE_VALIDATION_GROUP, NxeValidationGroupRegistry } from '@nexterajs/ui/core';\r\nimport { NxeValidationResult } from '@nexterajs/ui/core';\r\n\r\n/** DevExtreme button `type` (style intent), as used in this codebase. */\r\nexport type NxeButtonType = 'normal' | 'default' | 'success' | 'danger';\r\n\r\n/**\r\n * dx size coercion: `height=\"35\"` and `[height]=\"35\"` both mean 35px, while `'100%'` or `'3rem'`\r\n * pass through untouched. Templates write the attribute form, so the string case is the common one.\r\n */\r\nfunction cssSize(value: number | string | undefined): string | null {\r\n if (value === undefined || value === null || value === '') {\r\n return null;\r\n }\r\n return /^-?\\d+(\\.\\d+)?$/.test(String(value)) ? `${value}px` : String(value);\r\n}\r\n\r\n/**\r\n * The `validationGroup` object carried on a {@link NxeButtonClickEvent}, mirroring the\r\n * DevExtreme button-click `event.validationGroup`. Its `validate()` runs every member of the\r\n * button's named group through the {@link NxeValidationGroupRegistry} and returns the\r\n * DevExtreme-shaped result — so `const r = event.validationGroup.validate(); if (r.isValid) {...}`\r\n * keeps working after the tag rename.\r\n */\r\nexport interface NxeButtonValidationGroup {\r\n validate(): NxeValidationResult;\r\n}\r\n\r\n/**\r\n * Payload emitted from `nxe-button`'s `onClick`, mirroring DevExtreme's button click event.\r\n * Only `validationGroup` is read by existing handlers; `event`/`component`/`element` are\r\n * provided for parity.\r\n */\r\nexport interface NxeButtonClickEvent {\r\n event: Event;\r\n validationGroup: NxeButtonValidationGroup;\r\n component: NxeButtonComponent;\r\n element: HTMLElement;\r\n}\r\n\r\n/**\r\n * `nxe-button` — drop-in replacement for DevExtreme `dx-button`.\r\n *\r\n * The host element IS the button (mirrors DevExtreme's `nxe-button` DOM: the host carries the\r\n * styling classes and contains a single `.nxe-button-content` child). This keeps every existing\r\n * `.nxe-btn*` / `.nxe-button-content` global rule matching verbatim, and — critically — keeps the\r\n * shared `buttonLoading` directive working, which swaps `.nxe-button-content` innerHTML for a\r\n * spinner (`getElementsByClassName('nxe-button-content')[0]`).\r\n *\r\n * Content is projected (`<nxe-icon> + <span>`, the dominant pattern). The legacy `text`/`type`\r\n * inputs render a `.nxe-button-text` label for the ~25 attribute-styled buttons.\r\n *\r\n * `onClick` emits {@link NxeButtonClickEvent}; native `(click)` also fires (27 sites bind it).\r\n */\r\n@Component({\r\n selector: 'nxe-button',\r\n standalone: true,\r\n template: `\r\n <span class=\"nxe-button-content\">\r\n @if (icon()) {\r\n <i class=\"nxe-icon nxe-icon-{{ icon() }}\"></i>\r\n }\r\n <ng-content />\r\n @if (text()) {\r\n <span class=\"nxe-button-text\">{{ text() }}</span>\r\n }\r\n </span>\r\n `,\r\n styleUrl: './nxe-button.component.scss',\r\n host: {\r\n class: 'nxe-widget',\r\n role: 'button',\r\n '[attr.tabindex]': 'disabled() || !focusStateEnabled() ? null : 0',\r\n '[attr.aria-disabled]': 'disabled() ? true : null',\r\n '[class.nxe-button-default]': \"type() === 'default'\",\r\n '[class.nxe-button-success]': \"type() === 'success'\",\r\n '[class.nxe-button-danger]': \"type() === 'danger'\",\r\n '[class.nxe-button-has-text]': '!!text()',\r\n '[class.nxe-button-has-icon]': '!!icon()',\r\n '[style.height]': 'heightStyle()',\r\n '[style.width]': 'widthStyle()',\r\n '[class.nxe-disabled]': 'disabled()',\r\n '(click)': 'handleClick($event)',\r\n '(keydown.enter)': 'handleKeydown($event)',\r\n '(keydown.space)': 'handleKeydown($event)',\r\n },\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n})\r\nexport class NxeButtonComponent {\r\n private readonly registry = inject(NxeValidationGroupRegistry);\r\n private readonly groupScope = inject(NXE_VALIDATION_GROUP, { optional: true });\r\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\r\n\r\n /** Legacy `text` label (rendered as `.nxe-button-text` when set, no projected content). */\r\n readonly text = input<string>();\r\n /** Style intent (`default`=blue, `success`=green, `danger`=red, `normal`=white). */\r\n readonly type = input<NxeButtonType>('normal');\r\n /** Disabled state (`[disabled]`); blocks `onClick` and dims the button. */\r\n readonly disabled = input(false, { transform: booleanAttribute });\r\n /** Named validation group resolved via {@link NxeValidationGroupRegistry} on click. */\r\n readonly validationGroup = input<string>('');\r\n /** DevExtreme parity input; only ever `false` in this codebase (suppresses tab focus). */\r\n readonly focusStateEnabled = input(true, { transform: booleanAttribute });\r\n /**\r\n * dx `icon` — renders `<i class=\"nxe-icon nxe-icon-NAME\">` as the first child of\r\n * `.nxe-button-content`, before any projected content. Projection is the dominant pattern\r\n * here (a `mat-icon` plus a `span`), so the two must coexist rather than compete.\r\n */\r\n readonly icon = input<string | undefined>(undefined);\r\n /** dx `height` — a bare number (or numeric string) means px; anything else passes through. */\r\n readonly height = input<number | string | undefined>(undefined);\r\n /** dx `width` — same coercion as {@link height}. */\r\n readonly width = input<number | string | undefined>(undefined);\r\n\r\n protected readonly heightStyle = computed(() => cssSize(this.height()));\r\n protected readonly widthStyle = computed(() => cssSize(this.width()));\r\n\r\n /** DevExtreme-compatible click event. */\r\n readonly onClick = output<NxeButtonClickEvent>();\r\n\r\n protected handleKeydown(event: KeyboardEvent): void {\r\n // Non-button host: Enter/Space don't synthesize a click, so activate explicitly.\r\n event.preventDefault();\r\n this.handleClick(event);\r\n }\r\n\r\n protected handleClick(event: Event): void {\r\n if (this.disabled()) {\r\n event.preventDefault();\r\n event.stopImmediatePropagation();\r\n return;\r\n }\r\n // A named group wins; otherwise a surrounding nxe-validation-group; otherwise dx's\r\n // implicit global group. Same precedence the validator applies, so a button and the\r\n // fields beside it always resolve to the same group.\r\n const group = this.validationGroup() || this.groupScope?.groupKey || '';\r\n this.onClick.emit({\r\n event,\r\n validationGroup: { validate: () => this.registry.validate(group) },\r\n component: this,\r\n element: this.elementRef.nativeElement,\r\n });\r\n }\r\n}\r\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n ElementRef,\n forwardRef,\n input,\n linkedSignal,\n signal,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { NxeFormControlBase, nxeOptionalBoolean } from '@nexterajs/ui/core';\nimport { NXE_VALIDATION_TARGET } from '@nexterajs/ui/core';\n\n/** Text-box input mode (only `text`/`password` are used in this codebase). */\nexport type NxeTextBoxMode = 'text' | 'password' | 'email' | 'tel' | 'search';\n\n/**\n * `nxe-text-box` — drop-in replacement for DevExtreme `dx-text-box`.\n *\n * A signal-CVA editor (extends {@link NxeFormControlBase}) supporting `formControlName`,\n * `[(ngModel)]`, one-way `[value]`, and `[readOnly]`. Like DevExtreme's default\n * (`valueChangeEvent='change'`), the value commits on **blur** — not on every keystroke.\n *\n * `showClearButton` (dx default `false`) adds dx's clear area after the input while the field\n * holds text and is neither read-only nor disabled; it sets the value to `''`, dx's own empty\n * value for a text box, and focuses the input.\n *\n * It provides {@link NXE_VALIDATION_TARGET} so a projected `nxe-validator` can read its value\n * and push back the invalid message, which renders as the red `.nxe-invalid-message` bubble.\n */\n@Component({\n selector: 'nxe-text-box',\n standalone: true,\n template: `\n <div class=\"nxe-editor-container\">\n <input\n #field\n class=\"nxe-editor-input nxe-textbox-input\"\n [attr.tabindex]=\"tabIndex()\"\n [id]=\"controlId()\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-invalid]=\"validationError() ? true : null\"\n [attr.aria-required]=\"required() ? true : null\"\n [type]=\"mode()\"\n [value]=\"displayValue()\"\n [readOnly]=\"readOnly()\"\n [disabled]=\"disabled()\"\n [attr.placeholder]=\"placeholder() || null\"\n autocomplete=\"off\"\n (input)=\"onTypedInput($event)\"\n (keyup)=\"onTypedKeyup($event)\"\n (blur)=\"onBlur($event)\"\n (focus)=\"focused.set(true)\" />\n @if (clearButtonVisible()) {\n <span\n class=\"nxe-clear-button-area\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"onClear($event)\"\n aria-hidden=\"true\">\n <!-- A Ø16 disc with a 2px × cut out (the dropdown editors' clear glyph). -->\n <svg viewBox=\"0 0 18 18\" focusable=\"false\">\n <path fill-rule=\"evenodd\" transform=\"rotate(45 9 9)\"\n d=\"M9 1a8 8 0 1 1 0 16A8 8 0 1 1 9 1ZM8 3.343h2V8h4.657v2H10v4.657H8V10H3.343V8H8Z\" />\n </svg>\n </span>\n }\n </div>\n <ng-content />\n @if (validationError(); as error) {\n @if (focused()) {\n <div class=\"nxe-invalid-message\">{{ error }}</div>\n }\n }\n `,\n host: {\n class: 'nxe-widget nxe-editor nxe-textbox',\n '[class.nxe-focused]': 'focused()',\n '[class.nxe-invalid]': '!!validationError()',\n },\n providers: [\n { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => NxeTextBoxComponent), multi: true },\n { provide: NXE_VALIDATION_TARGET, useExisting: forwardRef(() => NxeTextBoxComponent) },\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class NxeTextBoxComponent extends NxeFormControlBase<string> {\n readonly mode = input<NxeTextBoxMode>('text');\n readonly placeholderInput = input<string | undefined>(undefined, { alias: 'placeholder' });\n readonly placeholder = computed(\n () => this.placeholderInput() ?? this.nxeDefaults.textBox?.placeholder ?? '',\n );\n /** DevExtreme parity input; cosmetic, unused in behaviour. */\n readonly hoverStateEnabledInput = input<boolean | undefined>(undefined, { alias: 'hoverStateEnabled', transform: nxeOptionalBoolean });\n readonly hoverStateEnabled = computed(\n () => this.hoverStateEnabledInput() ?? this.nxeDefaults.textBox?.hoverStateEnabled ?? false,\n );\n\n /** dx `showClearButton` — off by default, as in dx; `NXE_DEFAULT_OPTIONS.textBox` can turn it on app-wide. */\n readonly showClearButtonInput = input<boolean | undefined>(undefined, { alias: 'showClearButton', transform: nxeOptionalBoolean });\n readonly showClearButton = computed(\n () => this.showClearButtonInput() ?? this.nxeDefaults.textBox?.showClearButton ?? false,\n );\n\n readonly focused = signal(false);\n readonly displayValue = computed(() => this.value() ?? '');\n\n private readonly fieldRef = viewChild.required<ElementRef<HTMLInputElement>>('field');\n\n /**\n * The text in the field right now, typed or not. dx shows the clear button by the field's\n * emptiness (`.dx-texteditor-empty`), which follows every keystroke, not the committed value.\n */\n private readonly fieldText = linkedSignal(() => this.displayValue());\n\n protected readonly clearButtonVisible = computed(\n () => this.showClearButton() && !this.readOnly() && !this.disabled() && this.fieldText() !== '',\n );\n\n /** dx `valueChangeEvent: 'input'` — the search-as-you-type case. */\n protected onTypedInput(event: Event): void {\n const text = (event.target as HTMLInputElement).value;\n this.fieldText.set(text);\n this.commitOn('input', text, event);\n }\n\n /**\n * dx `_clearValueHandler`: value back to `''`, then focus on the input. The field is emptied by\n * hand as well — typed-but-uncommitted text over an already-empty value would otherwise survive,\n * because the `[value]` binding has not changed.\n */\n protected onClear(event: Event): void {\n const field = this.fieldRef().nativeElement;\n this.commitValue('', event);\n field.value = '';\n this.fieldText.set('');\n if (!this.focused()) {\n field.focus();\n }\n }\n\n protected onTypedKeyup(event: Event): void {\n this.commitOn('keyup', (event.target as HTMLInputElement).value, event);\n }\n\n protected onBlur(event: Event): void {\n // Blur commits whatever the mode: a value typed and left must not be discarded because\n // the configured event never fired.\n this.commitValue((event.target as HTMLInputElement).value, event);\n this.focused.set(false);\n this.markAsTouched();\n }\n}\n","import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n computed,\r\n forwardRef,\r\n input,\r\n signal,\r\n ViewEncapsulation,\r\n} from '@angular/core';\r\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\r\nimport { NxeFormControlBase } from '@nexterajs/ui/core';\r\nimport { NXE_VALIDATION_TARGET } from '@nexterajs/ui/core';\r\n\r\n/**\r\n * `nxe-text-area` — drop-in replacement for DevExtreme `dx-text-area`.\r\n *\r\n * Identical to {@link NxeTextBoxComponent} but renders a `<textarea>`. Supports an optional fixed\r\n * `[height]` (px) and `placeholder`; commits on blur. Hosts a projected `nxe-validator` via\r\n * {@link NXE_VALIDATION_TARGET}.\r\n */\r\n@Component({\r\n selector: 'nxe-text-area',\r\n standalone: true,\r\n template: `\r\n <div class=\"nxe-editor-container\">\r\n <textarea\r\n class=\"nxe-editor-input nxe-textarea-input\"\r\n [attr.tabindex]=\"tabIndex()\"\r\n [id]=\"controlId()\"\r\n [attr.aria-label]=\"ariaLabel() || null\"\r\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\r\n [attr.aria-invalid]=\"validationError() ? true : null\"\r\n [attr.aria-required]=\"required() ? true : null\"\r\n [value]=\"displayValue()\"\r\n [readOnly]=\"readOnly()\"\r\n [disabled]=\"disabled()\"\r\n [attr.placeholder]=\"placeholder() || null\"\r\n [style.height.px]=\"height() || null\"\r\n (input)=\"onTypedInput($event)\"\r\n (keyup)=\"onTypedKeyup($event)\"\r\n (blur)=\"onBlur($event)\"\r\n (focus)=\"focused.set(true)\"></textarea>\r\n </div>\r\n <ng-content />\r\n @if (validationError(); as error) {\r\n @if (focused()) {\r\n <div class=\"nxe-invalid-message\">{{ error }}</div>\r\n }\r\n }\r\n `,\r\n styleUrl: './nxe-text-area.component.scss',\r\n host: {\r\n class: 'nxe-widget nxe-editor nxe-textarea',\r\n '[class.nxe-focused]': 'focused()',\r\n '[class.nxe-invalid]': '!!validationError()',\r\n },\r\n providers: [\r\n { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => NxeTextAreaComponent), multi: true },\r\n { provide: NXE_VALIDATION_TARGET, useExisting: forwardRef(() => NxeTextAreaComponent) },\r\n ],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n})\r\nexport class NxeTextAreaComponent extends NxeFormControlBase<string> {\r\n readonly placeholderInput = input<string | undefined>(undefined, { alias: 'placeholder' });\r\n readonly placeholder = computed(\r\n () => this.placeholderInput() ?? this.nxeDefaults.textArea?.placeholder ?? '',\r\n );\r\n /** Fixed height in px (DevExtreme `[height]`); unset = auto. */\r\n readonly heightInput = input<number | undefined>(undefined, { alias: 'height' });\r\n readonly height = computed(() => this.heightInput() ?? this.nxeDefaults.textArea?.height ?? 80);\r\n\r\n readonly focused = signal(false);\r\n readonly displayValue = computed(() => this.value() ?? '');\r\n\r\n /** dx `valueChangeEvent: 'input'` — the search-as-you-type case. */\r\n protected onTypedInput(event: Event): void {\r\n this.commitOn('input', (event.target as HTMLTextAreaElement).value, event);\r\n }\r\n\r\n protected onTypedKeyup(event: Event): void {\r\n this.commitOn('keyup', (event.target as HTMLTextAreaElement).value, event);\r\n }\r\n\r\n protected onBlur(event: Event): void {\r\n // Blur commits whatever the mode: a value typed and left must not be discarded because\r\n // the configured event never fired.\r\n this.commitValue((event.target as HTMLTextAreaElement).value, event);\r\n this.focused.set(false);\r\n this.markAsTouched();\r\n }\r\n}\r\n","import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n computed,\r\n forwardRef,\r\n input,\r\n OnChanges,\r\n signal,\r\n SimpleChanges,\r\n ViewEncapsulation,\r\n} from '@angular/core';\r\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\r\nimport { NxeFormControlBase } from '@nexterajs/ui/core';\r\nimport { NXE_VALIDATION_TARGET } from '@nexterajs/ui/core';\r\n\r\n/**\r\n * `nxe-check-box` — drop-in replacement for DevExtreme `dx-check-box`.\r\n *\r\n * A signal-CVA editor (extends {@link NxeFormControlBase}) over `true` / `false` / `null`. As in\r\n * dx, a `null` value is the indeterminate state: the box shows a 12px square and reports\r\n * `aria-checked=\"mixed\"`. That is what a `new FormControl()` (or a `reset()`) looks like, and what\r\n * `[value]=\"null\"` looks like; an unbound box starts unchecked, like dx's default `false`. A click\r\n * or Space always lands on `true` or `false` — there is no `enableThreeStateBehavior` cycling back\r\n * to `null`.\r\n *\r\n * Supports `formControlName`/`[(ngModel)]`/`[(value)]`/`[value]`, `[readOnly]`, `[disabled]`, an\r\n * inline `text` label, `(onValueChanged)` (`{value}`) and `(valueChange)` (raw value). A read-only\r\n * box stays focusable (tabindex 0) and still shows hover and focus, as in dx; it just never\r\n * toggles. Provides {@link NXE_VALIDATION_TARGET} for a projected `nxe-validator` (a `required`\r\n * rule is invalid while unchecked, matching DevExtreme's RequiredRule treating `false` as empty).\r\n */\r\n@Component({\r\n selector: 'nxe-check-box',\r\n standalone: true,\r\n template: `\r\n <span class=\"nxe-checkbox-container\">\r\n <span class=\"nxe-checkbox-icon\" aria-hidden=\"true\"></span>\r\n @if (text()) {\r\n <span class=\"nxe-checkbox-text\">{{ text() }}</span>\r\n }\r\n </span>\r\n <ng-content />\r\n `,\r\n styleUrl: './nxe-check-box.component.scss',\r\n host: {\r\n class: 'nxe-widget nxe-checkbox',\r\n role: 'checkbox',\r\n '[attr.aria-checked]': \"indeterminate() ? 'mixed' : !!value()\",\r\n '[attr.aria-disabled]': 'disabled() ? true : null',\r\n '[attr.aria-readonly]': 'readOnly() ? true : null',\r\n '[attr.aria-invalid]': 'validationError() ? true : null',\r\n '[attr.aria-required]': 'required() ? true : null',\r\n // The host IS the control here, so the id and name belong on it rather than on a child.\r\n '[attr.id]': 'inputId() ? controlId() : null',\r\n '[attr.aria-label]': 'ariaLabel() || null',\r\n '[attr.aria-labelledby]': 'ariaLabelledBy() || null',\r\n // dx keeps a read-only box in the tab order (tabindex 0); only disabled takes it out.\r\n '[attr.tabindex]': 'disabled() ? null : 0',\r\n '[class.nxe-checkbox-checked]': '!!value()',\r\n '[class.nxe-checkbox-indeterminate]': 'indeterminate()',\r\n '[class.nxe-disabled]': 'disabled()',\r\n '[class.nxe-readonly]': 'readOnly()',\r\n '[class.nxe-invalid]': '!!validationError()',\r\n '(click)': 'toggle($event)',\r\n '(keydown.space)': 'onSpace($event)',\r\n '(blur)': 'markAsTouched()',\r\n },\r\n providers: [\r\n { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => NxeCheckBoxComponent), multi: true },\r\n { provide: NXE_VALIDATION_TARGET, useExisting: forwardRef(() => NxeCheckBoxComponent) },\r\n ],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n})\r\nexport class NxeCheckBoxComponent extends NxeFormControlBase<boolean> implements OnChanges {\r\n /** Inline label rendered next to the box. */\r\n readonly text = input<string>();\r\n\r\n /**\r\n * Whether a value has been handed in at all — by the forms API or a `[value]` binding.\r\n *\r\n * The base class starts `value` at `null`, which is also the indeterminate value, so `null`\r\n * alone cannot tell \"given null\" from \"given nothing\". dx can: its unset value is `false`.\r\n */\r\n private readonly valueProvided = signal(false);\r\n\r\n /** dx `.dx-checkbox-indeterminate`: the value was given, and it is `null`. */\r\n readonly indeterminate = computed(() => this.valueProvided() && this.value() === null);\r\n\r\n override writeValue(value: boolean | null): void {\r\n super.writeValue(value);\r\n this.valueProvided.set(true);\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['value']) {\r\n this.valueProvided.set(true);\r\n }\r\n }\r\n\r\n protected toggle(event: Event): void {\r\n if (this.disabled() || this.readOnly()) {\r\n return;\r\n }\r\n this.commitValue(!this.value(), event);\r\n this.markAsTouched();\r\n }\r\n\r\n protected onSpace(event: Event): void {\r\n event.preventDefault();\r\n this.toggle(event);\r\n }\r\n}\r\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n ElementRef,\n forwardRef,\n inject,\n input,\n linkedSignal,\n signal,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { NxeFormControlBase, nxeOptionalBoolean } from '@nexterajs/ui/core';\nimport { NXE_VALIDATION_TARGET } from '@nexterajs/ui/core';\nimport {\n formatNumber,\n NXE_NUMBER_SEPARATORS,\n parseNumber,\n parseNumberFormat,\n roundHalfAwayFromZero,\n} from '@nexterajs/ui/intl';\n\n/** Coerce a static (`min=\"1\"`) or bound (`[min]=\"0\"`) attribute to a number, or undefined. */\nfunction toNumber(value: unknown): number | undefined {\n if (value == null || value === '') {\n return undefined;\n }\n const num = Number(value);\n return isNaN(num) ? undefined : num;\n}\n\n/**\n * `nxe-number-box` — drop-in replacement for DevExtreme `dx-number-box`.\n *\n * A numeric signal-CVA editor (extends {@link NxeFormControlBase}) storing/emitting `number | null`.\n * Implements the DevExtreme number-format engine ({@link parseNumberFormat}/{@link formatNumber}):\n * displays the masked, grouped string when blurred and a raw editable number while focused;\n * commits (clamped to `[min,max]`, rounded to the format precision) on blur — never per keystroke.\n *\n * Supports `formControlName`/`[(ngModel)]`/`[(value)]`/`[value]`, `[readOnly]`, `[min]`/`[max]`,\n * `format` (string LDML pattern), `(valueChange)` (numeric), and a projected `nxe-validator`.\n *\n * `showClearButton` (dx default `false`) adds dx's clear area after the input while the field\n * holds text and is neither read-only nor disabled; it sets the value to `null`, as dx's\n * `clear()` does for a number box, and focuses the input.\n */\n@Component({\n selector: 'nxe-number-box',\n standalone: true,\n template: `\n <div class=\"nxe-editor-container\">\n <input\n #field\n class=\"nxe-editor-input nxe-numberbox-input\"\n [attr.tabindex]=\"tabIndex()\"\n [id]=\"controlId()\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-invalid]=\"validationError() ? true : null\"\n [attr.aria-required]=\"required() ? true : null\"\n type=\"text\"\n inputmode=\"decimal\"\n [value]=\"displayValue()\"\n [readOnly]=\"readOnly()\"\n [disabled]=\"disabled()\"\n autocomplete=\"off\"\n (input)=\"onFieldInput($event)\"\n (focus)=\"focused.set(true)\"\n (blur)=\"onBlur($event)\" />\n @if (clearButtonVisible()) {\n <span\n class=\"nxe-clear-button-area\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"onClear($event)\"\n aria-hidden=\"true\">\n <!-- A Ø16 disc with a 2px × cut out (the dropdown editors' clear glyph). -->\n <svg viewBox=\"0 0 18 18\" focusable=\"false\">\n <path fill-rule=\"evenodd\" transform=\"rotate(45 9 9)\"\n d=\"M9 1a8 8 0 1 1 0 16A8 8 0 1 1 9 1ZM8 3.343h2V8h4.657v2H10v4.657H8V10H3.343V8H8Z\" />\n </svg>\n </span>\n }\n </div>\n <ng-content />\n @if (validationError(); as error) {\n @if (focused()) {\n <div class=\"nxe-invalid-message\">{{ error }}</div>\n }\n }\n `,\n styleUrl: './nxe-number-box.component.scss',\n host: {\n class: 'nxe-widget nxe-editor nxe-numberbox',\n '[class.nxe-focused]': 'focused()',\n '[class.nxe-invalid]': '!!validationError()',\n },\n providers: [\n { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => NxeNumberBoxComponent), multi: true },\n { provide: NXE_VALIDATION_TARGET, useExisting: forwardRef(() => NxeNumberBoxComponent) },\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class NxeNumberBoxComponent extends NxeFormControlBase<number> {\n /** LDML format pattern (e.g. `#,##0.00`); empty = raw number. */\n readonly formatInput = input<string | undefined>(undefined, { alias: 'format' });\n readonly format = computed(\n () => this.formatInput() ?? this.nxeDefaults.numberBox?.format ?? '',\n );\n readonly min = input<number | undefined, unknown>(undefined, { transform: toNumber });\n readonly max = input<number | undefined, unknown>(undefined, { transform: toNumber });\n\n /** dx `showClearButton` — off by default, as in dx; `NXE_DEFAULT_OPTIONS.numberBox` can turn it on app-wide. */\n readonly showClearButtonInput = input<boolean | undefined>(undefined, { alias: 'showClearButton', transform: nxeOptionalBoolean });\n readonly showClearButton = computed(\n () => this.showClearButtonInput() ?? this.nxeDefaults.numberBox?.showClearButton ?? false,\n );\n\n readonly focused = signal(false);\n private readonly parsedFormat = computed(() => parseNumberFormat(this.format()));\n private readonly fieldRef = viewChild.required<ElementRef<HTMLInputElement>>('field');\n\n /** Locale characters, configured once by the application. Defaults to en-US. */\n private readonly separators = inject(NXE_NUMBER_SEPARATORS);\n\n readonly displayValue = computed(() => {\n const value = this.value();\n if (this.focused()) {\n // Raw editable text, but with this locale's decimal character: `String(0.125)` gives\n // a JS-style dot, and parseNumber would read that as a group separator and commit 125.\n return value == null ? '' : String(value).replace('.', this.separators.decimal);\n }\n return formatNumber(value, this.parsedFormat(), this.separators);\n });\n\n /** The text in the field right now; dx shows the clear button by the field's emptiness. */\n private readonly fieldText = linkedSignal(() => this.displayValue());\n\n protected readonly clearButtonVisible = computed(\n () => this.showClearButton() && !this.readOnly() && !this.disabled() && this.fieldText() !== '',\n );\n\n protected onFieldInput(event: Event): void {\n this.fieldText.set((event.target as HTMLInputElement).value);\n }\n\n /**\n * dx `_clearValueHandler`: value to `null`, then focus on the input. The field is emptied by hand\n * too, for typed-but-uncommitted text over a value that was already `null`.\n */\n protected onClear(event: Event): void {\n const field = this.fieldRef().nativeElement;\n this.commitValue(null, event);\n field.value = '';\n this.fieldText.set('');\n if (!this.focused()) {\n field.focus();\n }\n }\n\n protected onBlur(event: Event): void {\n let num = parseNumber((event.target as HTMLInputElement).value, this.separators);\n if (num != null) {\n const min = this.min();\n const max = this.max();\n if (min != null && num < min) {\n num = min;\n }\n if (max != null && num > max) {\n num = max;\n }\n const fmt = this.parsedFormat();\n if (fmt) {\n num = roundHalfAwayFromZero(num, fmt.maxFrac);\n }\n }\n this.commitValue(num, event);\n this.focused.set(false);\n this.markAsTouched();\n }\n}\n","import { Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n ElementRef,\n forwardRef,\n inject,\n input,\n linkedSignal,\n OnDestroy,\n signal,\n TemplateRef,\n viewChild,\n ViewContainerRef,\n ViewEncapsulation,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { DateTime } from 'luxon';\nimport { filter, merge, Subscription } from 'rxjs';\nimport { NxeFormControlBase, nxeOptionalBoolean } from '@nexterajs/ui/core';\nimport { NXE_VALIDATION_TARGET } from '@nexterajs/ui/core';\nimport { nxePane, trackPaneFlip } from '@nexterajs/ui/styling';\nimport {\n buildCalendarWeeks,\n buildPeriodCells,\n formatDisplay,\n NXE_DEFAULT_DATETIME_DISPLAY_FORMAT,\n NXE_DEFAULT_DISPLAY_FORMAT,\n NXE_DEFAULT_TIME_DISPLAY_FORMAT,\n NxeCalendarZoom,\n NxePeriodCell,\n parseDateValue,\n parseDisplay,\n serializeDate,\n} from '@nexterajs/ui/intl';\n\n/** DevExtreme date-box `type`. */\nexport type NxeDateBoxType = 'date' | 'datetime' | 'time';\n\n/** Normalize a `[min]`/`[max]` binding (Date object or serialized string) to a DateTime. */\nfunction toBoundDate(bound: Date | string | null): DateTime | null {\n if (!bound) {\n return null;\n }\n if (bound instanceof Date) {\n const dt = DateTime.fromJSDate(bound);\n return dt.isValid ? dt : null;\n }\n return parseDateValue(bound);\n}\n\n/**\n * `nxe-date-box` — drop-in replacement for DevExtreme `dx-date-box`.\n *\n * A signal-CVA editor (extends {@link NxeFormControlBase}) whose value is the app-wide\n * `\"yyyy-MM-ddTHH:mm:ss\"` string (preserving the global `dateSerializationFormat`). The field is\n * typeable (parsed on blur per `displayFormat`) and opens a CDK-overlay calendar from the icon\n * button. Built on Luxon. Default `displayFormat` is `dd-MMM-yyyy`. Hosts a projected\n * `nxe-validator` via {@link NXE_VALIDATION_TARGET}.\n *\n * `showClearButton` (dx default `false`) adds dx's clear area between the input and the calendar\n * button while the field holds text and is neither read-only nor disabled; it sets the value to\n * `null` and focuses the input.\n *\n * The button and calendar glyphs are drawn in an 18-unit viewBox (1 unit = 1px) to the ink measured\n * off dx's `event` (`date`), `eventall` (`datetime`) and `clock` (`time`) glyphs and its chevrons,\n * each laid out from those metrics in rects, stroked rects and circles, and straight-edged polygons;\n * the templates state each construction.\n */\n@Component({\n selector: 'nxe-date-box',\n standalone: true,\n template: `\n <div class=\"nxe-editor-container\">\n <input\n #field\n class=\"nxe-editor-input nxe-datebox-input\"\n [attr.tabindex]=\"tabIndex()\"\n [id]=\"controlId()\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-invalid]=\"validationError() ? true : null\"\n [attr.aria-required]=\"required() ? true : null\"\n type=\"text\"\n [value]=\"displayValue()\"\n [readOnly]=\"readOnly()\"\n [disabled]=\"disabled()\"\n [attr.placeholder]=\"effectivePlaceholder() || null\"\n autocomplete=\"off\"\n (input)=\"onFieldInput($event)\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\" />\n @if (clearButtonVisible()) {\n <span\n class=\"nxe-clear-button-area\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"onClear($event)\"\n aria-hidden=\"true\">\n <!-- A Ø16 disc with a 2px × cut out (the dropdown editors' clear glyph). -->\n <svg viewBox=\"0 0 18 18\" focusable=\"false\">\n <path fill-rule=\"evenodd\" transform=\"rotate(45 9 9)\"\n d=\"M9 1a8 8 0 1 1 0 16A8 8 0 1 1 9 1ZM8 3.343h2V8h4.657v2H10v4.657H8V10H3.343V8H8Z\" />\n </svg>\n </span>\n }\n @if (!readOnly()) {\n <span\n class=\"nxe-datebox-button\"\n [class.nxe-datebox-open]=\"opened()\"\n (mousedown)=\"onButtonMousedown($event)\"\n aria-hidden=\"true\">\n @switch (type()) {\n @case ('time') {\n <!-- dx clock, a 16x16 ink box round the box centre: a 2px ring (an r 7\n circle stroked 2px), a 2x4 hand straight up from the centre, a 1.5x4\n hand turned 45° down-right, and a Ø2 hub where they meet. -->\n <svg class=\"nxe-datebox-icon nxe-datebox-icon-time\" viewBox=\"0 0 18 18\" focusable=\"false\">\n <circle cx=\"9\" cy=\"9\" r=\"7\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" />\n <rect x=\"8\" y=\"5\" width=\"2\" height=\"4\" />\n <rect x=\"9\" y=\"8.25\" width=\"4\" height=\"1.5\" transform=\"rotate(45 9 9)\" />\n <circle cx=\"9\" cy=\"9\" r=\"1\" />\n </svg>\n }\n @case ('datetime') {\n <!-- dx eventall: the calendar page below, without its day marker. -->\n <svg class=\"nxe-datebox-icon nxe-datebox-icon-datetime\" viewBox=\"0 0 18 18\" focusable=\"false\">\n <rect x=\"3\" y=\"3\" width=\"12\" height=\"12\" rx=\"1\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" />\n <rect x=\"3\" y=\"3\" width=\"12\" height=\"3\" />\n <rect x=\"4\" y=\"1\" width=\"2\" height=\"1.5\" />\n <rect x=\"12\" y=\"1\" width=\"2\" height=\"1.5\" />\n </svg>\n }\n @default {\n <!-- dx event, a 14x15 ink box from 1px below the top of the 18px box\n (where dx's glyph renders): the page is a 12x12 rect with 1px corners\n stroked 2px, so 14x14 with 2px corners outside and square inside; a\n 12x3 bar under its top wall makes the 4px header band; two 2x1.5\n binder tabs stand 1px proud of it; a 4x4 day marker at (9, 9). -->\n <svg class=\"nxe-datebox-icon nxe-datebox-icon-date\" viewBox=\"0 0 18 18\" focusable=\"false\">\n <rect x=\"3\" y=\"3\" width=\"12\" height=\"12\" rx=\"1\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" />\n <rect x=\"3\" y=\"3\" width=\"12\" height=\"3\" />\n <rect x=\"4\" y=\"1\" width=\"2\" height=\"1.5\" />\n <rect x=\"12\" y=\"1\" width=\"2\" height=\"1.5\" />\n <rect x=\"9\" y=\"9\" width=\"4\" height=\"4\" />\n </svg>\n }\n }\n </span>\n }\n </div>\n <ng-content />\n @if (validationError(); as error) {\n @if (focused()) {\n <div class=\"nxe-invalid-message\">{{ error }}</div>\n }\n }\n\n <ng-template #calendarTemplate>\n <div class=\"nxe-calendar\" (mousedown)=\"$event.preventDefault()\">\n @if (type() !== 'time') {\n <div class=\"nxe-calendar-navigator\">\n <button type=\"button\" class=\"nxe-calendar-nav\" (click)=\"navigate(-1)\">\n <!-- dx chevronleft (8x14 ink, centred in its 18px box): two 45° arms\n whose outer edges run 7px out and 7px up and down from the point,\n their ends cut square 1.25px across and down (a 1.77px stroke),\n meeting 2.5px behind it. That draws 8.25x14, centred by putting the\n point at x 4.875, and rasterises to dx's 8x14. -->\n <svg class=\"nxe-calendar-chevron\" viewBox=\"0 0 18 18\" focusable=\"false\">\n <polygon points=\"4.875 9 11.875 2 13.125 3.25 7.375 9 13.125 14.75 11.875 16\" />\n </svg>\n </button>\n <button type=\"button\" class=\"nxe-calendar-caption\" (click)=\"zoomOut()\">\n {{ caption() }}\n </button>\n <button type=\"button\" class=\"nxe-calendar-nav\" (click)=\"navigate(1)\">\n <!-- dx chevronright: the same chevron mirrored about x 9. -->\n <svg class=\"nxe-calendar-chevron\" viewBox=\"0 0 18 18\" focusable=\"false\">\n <polygon points=\"13.125 9 6.125 2 4.875 3.25 10.625 9 4.875 14.75 6.125 16\" />\n </svg>\n </button>\n </div>\n @if (zoomLevel() === 'month') {\n <div class=\"nxe-calendar-weekdays\">\n @for (wd of weekdays; track wd) {\n <span>{{ wd }}</span>\n }\n </div>\n <div class=\"nxe-calendar-grid\">\n @for (week of weeks(); track $index) {\n @for (day of week; track day.toMillis()) {\n <button\n type=\"button\"\n class=\"nxe-calendar-day\"\n [class.nxe-calendar-other]=\"day.month !== viewMonth().month\"\n [class.nxe-calendar-selected]=\"isSelected(day)\"\n [class.nxe-calendar-today]=\"isToday(day)\"\n [disabled]=\"isDisabledDay(day)\"\n (click)=\"selectDay(day)\">\n <span>{{ day.day }}</span>\n </button>\n }\n }\n </div>\n } @else {\n <div\n class=\"nxe-calendar-periods\"\n [class.nxe-calendar-periods-century]=\"zoomLevel() === 'century'\">\n @for (cell of periodCells(); track cell.anchor.toMillis()) {\n <button\n type=\"button\"\n class=\"nxe-calendar-period\"\n [class.nxe-calendar-other]=\"cell.other\"\n [class.nxe-calendar-today]=\"cell.isNow\"\n [disabled]=\"cell.disabled\"\n (click)=\"selectPeriod(cell)\">\n <span>{{ cell.label }}</span>\n </button>\n }\n </div>\n }\n }\n @if (type() !== 'date') {\n <div class=\"nxe-calendar-time\">\n <input\n class=\"nxe-calendar-time-part\"\n type=\"text\"\n inputmode=\"numeric\"\n maxlength=\"2\"\n aria-label=\"Hour\"\n [value]=\"hourText()\"\n (change)=\"setTimePart('hour', $event)\" />\n <span class=\"nxe-calendar-time-sep\" aria-hidden=\"true\">:</span>\n <input\n class=\"nxe-calendar-time-part\"\n type=\"text\"\n inputmode=\"numeric\"\n maxlength=\"2\"\n aria-label=\"Minute\"\n [value]=\"minuteText()\"\n (change)=\"setTimePart('minute', $event)\" />\n <button type=\"button\" class=\"nxe-calendar-time-btn\" (click)=\"setNow()\">Now</button>\n <button type=\"button\" class=\"nxe-calendar-time-btn nxe-calendar-time-done\" (click)=\"close()\">\n Done\n </button>\n </div>\n }\n </div>\n </ng-template>\n `,\n styleUrl: './nxe-date-box.component.scss',\n host: {\n class: 'nxe-widget nxe-editor nxe-datebox',\n '[class.nxe-focused]': 'focused()',\n '[class.nxe-invalid]': '!!validationError()',\n },\n providers: [\n { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => NxeDateBoxComponent), multi: true },\n { provide: NXE_VALIDATION_TARGET, useExisting: forwardRef(() => NxeDateBoxComponent) },\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class NxeDateBoxComponent extends NxeFormControlBase<string> implements OnDestroy {\n private readonly overlay = inject(Overlay);\n private readonly viewContainerRef = inject(ViewContainerRef);\n private readonly calendarTemplate = viewChild.required<TemplateRef<unknown>>('calendarTemplate');\n private readonly fieldRef = viewChild.required<ElementRef<HTMLInputElement>>('field');\n\n readonly type = input<NxeDateBoxType>('date');\n /* Undefined rather than a literal default, so the default can follow `type`. Additive: no call\n site passes either input, and one that does still wins. */\n readonly displayFormat = input<string | undefined>(undefined);\n readonly placeholder = input<string | undefined>(undefined);\n /** DevExtreme `[min]`/`[max]` bounds: calendar days outside are disabled, typed values clamp. */\n readonly min = input<Date | string | null>(null);\n readonly max = input<Date | string | null>(null);\n /** dx `showClearButton` — off by default, as in dx; `NXE_DEFAULT_OPTIONS.dateBox` can turn it on app-wide. */\n readonly showClearButtonInput = input<boolean | undefined>(undefined, { alias: 'showClearButton', transform: nxeOptionalBoolean });\n readonly showClearButton = computed(\n () => this.showClearButtonInput() ?? this.nxeDefaults.dateBox?.showClearButton ?? false,\n );\n\n readonly focused = signal(false);\n readonly opened = signal(false);\n readonly viewMonth = signal<DateTime>(DateTime.now().startOf('month'));\n /** Calendar zoom level; caption clicks zoom out, cell picks zoom back in (dx-calendar parity). */\n readonly zoomLevel = signal<NxeCalendarZoom>('month');\n readonly weekdays = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'] as const;\n\n /** The format actually used, from `displayFormat` or the default for this `type`. */\n readonly effectiveDisplayFormat = computed(() => {\n const stated = this.displayFormat() ?? this.nxeDefaults.dateBox?.displayFormat;\n if (stated) {\n return stated;\n }\n switch (this.type()) {\n case 'time':\n return NXE_DEFAULT_TIME_DISPLAY_FORMAT;\n case 'datetime':\n return NXE_DEFAULT_DATETIME_DISPLAY_FORMAT;\n default:\n return NXE_DEFAULT_DISPLAY_FORMAT;\n }\n });\n /** dx's default placeholder is '', but orbit's global default is the format itself. */\n readonly effectivePlaceholder = computed(\n () =>\n this.placeholder() ?? this.nxeDefaults.dateBox?.placeholder ?? this.effectiveDisplayFormat(),\n );\n\n private readonly selected = computed(() => parseDateValue(this.value()));\n readonly displayValue = computed(() => formatDisplay(this.selected(), this.effectiveDisplayFormat()));\n\n /** The text in the field right now; dx shows the clear button by the field's emptiness. */\n private readonly fieldText = linkedSignal(() => this.displayValue());\n\n protected readonly clearButtonVisible = computed(\n () => this.showClearButton() && !this.readOnly() && !this.disabled() && this.fieldText() !== '',\n );\n readonly weeks = computed(() => buildCalendarWeeks(this.viewMonth()));\n\n /** Two-digit hour/minute for the popup's time strip; blank when nothing is selected. */\n readonly hourText = computed(() => this.selected()?.toFormat('HH') ?? '');\n readonly minuteText = computed(() => this.selected()?.toFormat('mm') ?? '');\n\n /**\n * The field's text as it stood when focus arrived. `onBlur` compares against it and commits\n * nothing when the user only tabbed through — see the comment there.\n */\n private textAtFocus = '';\n\n readonly caption = computed(() => {\n const view = this.viewMonth();\n switch (this.zoomLevel()) {\n case 'month':\n return view.toFormat('MMMM yyyy');\n case 'year':\n return view.toFormat('yyyy');\n case 'decade': {\n const start = view.year - (view.year % 10);\n return `${start}-${start + 9}`;\n }\n case 'century': {\n const start = view.year - (view.year % 100);\n return `${start}-${start + 99}`;\n }\n }\n });\n\n readonly periodCells = computed(() => {\n const zoom = this.zoomLevel();\n if (zoom === 'month') {\n return [];\n }\n const now = DateTime.now();\n const min = this.minDate();\n const max = this.maxDate();\n const span = zoom === 'year' ? { months: 1 } : zoom === 'decade' ? { years: 1 } : { years: 10 };\n return buildPeriodCells(zoom, this.viewMonth()).map((cell) => {\n const end = cell.anchor.plus(span).minus({ days: 1 }).endOf('day');\n return {\n ...cell,\n isNow: now >= cell.anchor && now <= end,\n disabled: (!!min && end < min.startOf('day')) || (!!max && cell.anchor > max.endOf('day')),\n };\n });\n });\n\n private readonly minDate = computed(() => toBoundDate(this.min()));\n private readonly maxDate = computed(() => toBoundDate(this.max()));\n\n protected isDisabledDay(day: DateTime): boolean {\n const min = this.minDate();\n const max = this.maxDate();\n return (!!min && day.startOf('day') < min.startOf('day')) || (!!max && day.startOf('day') > max.startOf('day'));\n }\n\n private clampToBounds(dt: DateTime): DateTime {\n const min = this.minDate();\n const max = this.maxDate();\n if (min && dt < min.startOf('day')) return min.startOf('day');\n /* Land on the bound's DAY but keep the value's own time. Returning max.startOf('day') would\n silently zero an 18:00 whenever the entry ran past the bound — invisible for a date-only\n field, and a wiped time for a datetime one. */\n if (max && dt > max.endOf('day')) {\n return max.startOf('day').set({ hour: dt.hour, minute: dt.minute, second: dt.second });\n }\n return dt;\n }\n\n private overlayRef?: OverlayRef;\n private closeSub?: Subscription;\n private flipSub?: Subscription;\n\n protected isSelected(day: DateTime): boolean {\n const sel = this.selected();\n return !!sel && day.hasSame(sel, 'day');\n }\n\n protected isToday(day: DateTime): boolean {\n return day.hasSame(DateTime.now(), 'day');\n }\n\n protected navigate(delta: number): void {\n const months = { month: 1, year: 12, decade: 120, century: 1200 }[this.zoomLevel()];\n this.viewMonth.update((m) => m.plus({ months: months * delta }));\n }\n\n protected zoomOut(): void {\n const next = { month: 'year', year: 'decade', decade: 'century' } as const;\n const zoom = this.zoomLevel();\n if (zoom !== 'century') {\n this.zoomLevel.set(next[zoom]);\n }\n }\n\n protected selectPeriod(cell: NxePeriodCell & { disabled: boolean }): void {\n if (cell.disabled) {\n return;\n }\n const previous = { year: 'month', decade: 'year', century: 'decade' } as const;\n this.viewMonth.set(cell.anchor.startOf('month'));\n this.zoomLevel.set(previous[this.zoomLevel() as Exclude<NxeCalendarZoom, 'month'>]);\n }\n\n protected onButtonMousedown(event: Event): void {\n // Keep field focus (avoid a blur-driven re-commit) and toggle the calendar.\n event.preventDefault();\n if (this.disabled() || this.readOnly()) {\n return;\n }\n this.opened() ? this.close() : this.open();\n }\n\n protected onFieldInput(event: Event): void {\n this.fieldText.set((event.target as HTMLInputElement).value);\n }\n\n /**\n * dx `_clearValueHandler`: value to `null` (dx's `clear()` for a date box), then focus on the\n * input. `syncField` repaints the field, so typed-but-uncommitted text over a value that was\n * already `null` goes too.\n */\n protected onClear(event: Event): void {\n this.commitValue(null, event);\n this.syncField();\n if (!this.focused()) {\n this.fieldRef().nativeElement.focus();\n }\n }\n\n protected onFocus(event: Event): void {\n this.textAtFocus = (event.target as HTMLInputElement).value;\n this.focused.set(true);\n }\n\n /**\n * Commit what the user TYPED — and nothing when they typed nothing.\n *\n * The unchanged-text guard is load-bearing, not an optimization. `displayFormat` renders a\n * strict subset of the stored value: `dd-MMM-yyyy` shows `2026-08-12T09:00:00` as `12-Aug-2026`,\n * and re-parsing that yields midnight. This method used to commit unconditionally, so simply\n * focusing and tabbing past a field rewrote 09:00 to 00:00 and 09:30:45 to 09:30:00 — silently,\n * because `commitValue` only no-ops on an identical string and these differ. Latent while\n * nothing rendered a time; straight data loss the moment `type=\"datetime\"` exists.\n *\n * A rejected entry keeps the previous value and repaints the field. The repaint is required:\n * `[value]` is still bound to the same `displayValue()` Angular last wrote, so it will not\n * re-render on its own and the unparseable text would sit there looking accepted.\n */\n protected onBlur(event: Event): void {\n const element = event.target as HTMLInputElement;\n /* Read before clearing: it doubles as \"we captured a baseline this focus cycle\". A blur with\n no preceding focus cannot happen to a real user — browsers always fire focus first — so\n the only sequence that reaches the fall-through is a synthetic one, where the old\n parse-everything behaviour is both harmless and what the existing specs assert. */\n const hadBaseline = this.focused();\n this.focused.set(false);\n this.markAsTouched();\n\n if (hadBaseline && element.value === this.textAtFocus) {\n return;\n }\n if (!element.value.trim()) {\n this.commitValue(null, event);\n this.syncField();\n return;\n }\n\n const dt = parseDisplay(element.value, this.effectiveDisplayFormat(), this.selected());\n if (dt) {\n this.commitValue(serializeDate(this.clampToBounds(dt)), event);\n }\n this.syncField();\n }\n\n /**\n * Repaint the field from the committed value and re-baseline {@link textAtFocus}.\n *\n * Called after every non-typed commit as well, so a later blur cannot replay stale typed text\n * over a value the popup has since changed.\n */\n private syncField(): void {\n const element = this.fieldRef().nativeElement;\n element.value = this.displayValue();\n this.textAtFocus = element.value;\n this.fieldText.set(element.value);\n }\n\n protected selectDay(day: DateTime): void {\n if (this.isDisabledDay(day)) {\n return;\n }\n let dt = day.startOf('day');\n if (this.type() === 'datetime') {\n const base = this.selected();\n if (base) {\n dt = dt.set({ hour: base.hour, minute: base.minute, second: base.second });\n }\n }\n this.commitValue(serializeDate(dt), null);\n this.syncField();\n /* Only a plain date picker is finished at this point. In datetime mode the time strip is\n the other half of the job, and closing here would put it out of reach. */\n if (this.type() === 'date') {\n this.close();\n }\n }\n\n /**\n * Commit one part of the time from the popup strip.\n *\n * Writes straight through to the value rather than holding a draft: `selectDay` already commits\n * immediately, the component keeps no other pending state, and a stray backdrop click must not\n * discard a time the user has just set. dx buffers behind OK/Cancel; this is the divergence.\n */\n protected setTimePart(part: 'hour' | 'minute', event: Event): void {\n const element = event.target as HTMLInputElement;\n const typed = Number.parseInt(element.value, 10);\n const base = this.selected() ?? DateTime.now().startOf('day');\n const ceiling = part === 'hour' ? 23 : 59;\n const next = Number.isNaN(typed) ? base[part] : Math.min(Math.max(typed, 0), ceiling);\n\n this.commitValue(serializeDate(base.set({ [part]: next })), event);\n this.syncField();\n /* Same non-repaint hazard as onBlur: when the clamp lands back on the value already held,\n the [value] binding is unchanged and `7` would stay on screen instead of `07`. */\n element.value = part === 'hour' ? this.hourText() : this.minuteText();\n }\n\n protected setNow(): void {\n const now = DateTime.now();\n const base = this.selected() ?? now;\n this.commitValue(serializeDate(base.set({ hour: now.hour, minute: now.minute, second: 0 })), null);\n this.syncField();\n }\n\n private open(): void {\n this.viewMonth.set((this.selected() ?? DateTime.now()).startOf('month'));\n this.zoomLevel.set('month');\n if (!this.overlayRef) {\n this.overlayRef = this.overlay.create({\n positionStrategy: this.overlay\n .position()\n .flexibleConnectedTo(this.elementRef)\n .withPositions([\n { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },\n { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom' },\n ]),\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n hasBackdrop: true,\n backdropClass: 'cdk-overlay-transparent-backdrop',\n panelClass: nxePane('nxe-datebox-pane'),\n });\n this.flipSub = trackPaneFlip(this.overlayRef);\n }\n if (this.overlayRef.hasAttached()) {\n return;\n }\n this.overlayRef.attach(new TemplatePortal(this.calendarTemplate(), this.viewContainerRef));\n this.closeSub = merge(\n this.overlayRef.backdropClick(),\n this.overlayRef.keydownEvents().pipe(filter((e) => e.key === 'Escape')),\n ).subscribe(() => this.close());\n this.opened.set(true);\n }\n\n /** Protected, not private: the time strip's Done button closes the popup from the template. */\n protected close(): void {\n if (!this.overlayRef?.hasAttached()) {\n return;\n }\n this.overlayRef.detach();\n this.closeSub?.unsubscribe();\n this.flipSub?.unsubscribe();\n this.opened.set(false);\n this.markAsTouched();\n }\n\n ngOnDestroy(): void {\n this.closeSub?.unsubscribe();\n this.flipSub?.unsubscribe();\n this.overlayRef?.dispose();\n }\n}\n","import { ChangeDetectionStrategy, Component, input, ViewEncapsulation } from '@angular/core';\r\n\r\n/**\r\n * `nxe-scroll-view` — drop-in replacement for DevExtreme `dx-scroll-view`.\r\n *\r\n * In this app `nxe-scroll-view` is used purely as a dumb scroll container: no `@ViewChild`, no\r\n * `.instance` methods, no events (see survey). Every live tag is the same literal triple\r\n * `[scrollByContent]=\"true\" [scrollByThumb]=\"true\" [showScrollbar]=\"'onScroll'\"`. So this is a\r\n * styled `overflow:auto` wrapper that projects its content inside a `.nxe-scrollview-content`\r\n * flex-column box (matching dx's content layout, which some consumers' inner grids rely on for\r\n * height) and renders a thin grey dx-style scrollbar. The three inputs are accepted for binding\r\n * parity only — behaviour is native scrolling.\r\n */\r\n@Component({\r\n selector: 'nxe-scroll-view',\r\n standalone: true,\r\n template: '<div class=\"nxe-scrollview-content\"><ng-content /></div>',\r\n styleUrl: './nxe-scroll-view.component.scss',\r\n host: { class: 'nxe-widget nxe-scroll-view' },\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n})\r\nexport class NxeScrollViewComponent {\r\n /** Accepted for parity with dx-scroll-view; behaviour is native overflow scrolling. */\r\n readonly scrollByContent = input(true);\r\n readonly scrollByThumb = input(true);\r\n readonly showScrollbar = input<'onScroll' | 'onHover' | 'always' | 'never'>('onScroll');\r\n}\r\n","// @nexterajs/ui/forms — public API.\r\nexport * from './lib/button/nxe-button.component';\r\nexport * from './lib/text-box/nxe-text-box.component';\r\nexport * from './lib/text-area/nxe-text-area.component';\r\nexport * from './lib/check-box/nxe-check-box.component';\r\nexport * from './lib/number-box/nxe-number-box.component';\r\nexport * from './lib/date-box/nxe-date-box.component';\r\nexport * from './lib/scroll-view/nxe-scroll-view.component';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;AAiBA;;;AAGG;AACH,SAAS,OAAO,CAAC,KAAkC,EAAA;AAC/C,IAAA,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,EAAE,EAAE;AACvD,QAAA,OAAO,IAAI;IACf;IACA,OAAO,iBAAiB,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,CAAA,EAAG,KAAK,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC;AAC/E;AAyBA;;;;;;;;;;;;;AAaG;MAoCU,kBAAkB,CAAA;AACV,IAAA,QAAQ,GAAG,MAAM,CAAC,0BAA0B,CAAC;IAC7C,UAAU,GAAG,MAAM,CAAC,oBAAoB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAC7D,IAAA,UAAU,GAAG,MAAM,CAA0B,UAAU,CAAC;;AAGhE,IAAA,IAAI,GAAG,KAAK;wFAAU;;IAEtB,IAAI,GAAG,KAAK,CAAgB,QAAQ;6EAAC;;IAErC,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;IAExD,eAAe,GAAG,KAAK,CAAS,EAAE;wFAAC;;IAEnC,iBAAiB,GAAG,KAAK,CAAC,IAAI,yFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AACzE;;;;AAIG;IACM,IAAI,GAAG,KAAK,CAAqB,SAAS;6EAAC;;IAE3C,MAAM,GAAG,KAAK,CAA8B,SAAS;+EAAC;;IAEtD,KAAK,GAAG,KAAK,CAA8B,SAAS;8EAAC;AAE3C,IAAA,WAAW,GAAG,QAAQ,CAAC,MAAM,OAAO,CAAC,I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GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,sBAAsB,qkBANrB,0DAA0D,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,8iBAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAM3D,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBATlC,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,cACf,IAAI,EAAA,QAAA,EACN,0DAA0D,EAAA,IAAA,EAE9D,EAAE,KAAK,EAAE,4BAA4B,EAAE,mBAC5B,uBAAuB,CAAC,MAAM,EAAA,aAAA,EAChC,iBAAiB,CAAC,IAAI,EAAA,MAAA,EAAA,CAAA,8iBAAA,CAAA,EAAA;;;ACpBzC;;ACAA;;AAEG;;"}
1
+ {"version":3,"file":"nexterajs-ui-forms.mjs","sources":["../../../projects/nextera-ui/forms/src/lib/button/nxe-button.component.ts","../../../projects/nextera-ui/forms/src/lib/text-box/nxe-text-box.component.ts","../../../projects/nextera-ui/forms/src/lib/text-area/nxe-text-area.component.ts","../../../projects/nextera-ui/forms/src/lib/check-box/nxe-check-box.component.ts","../../../projects/nextera-ui/forms/src/lib/number-box/nxe-number-step.ts","../../../projects/nextera-ui/forms/src/lib/number-box/nxe-number-box.component.ts","../../../projects/nextera-ui/forms/src/lib/date-box/nxe-date-box.component.ts","../../../projects/nextera-ui/forms/src/lib/date-range-box/nxe-date-range.ts","../../../projects/nextera-ui/forms/src/lib/date-range-box/nxe-date-range-box.component.ts","../../../projects/nextera-ui/forms/src/lib/date-range-box/nxe-date-range-box.component.html","../../../projects/nextera-ui/forms/src/lib/scroll-view/nxe-scroll-view.component.ts","../../../projects/nextera-ui/forms/src/lib/form-field/nxe-error-messages.token.ts","../../../projects/nextera-ui/forms/src/lib/form-field/nxe-form-field.component.ts","../../../projects/nextera-ui/forms/src/lib/form-field/nxe-form-field.component.html","../../../projects/nextera-ui/forms/src/lib/radio-group/nxe-radio-item.directive.ts","../../../projects/nextera-ui/forms/src/lib/radio-group/nxe-radio-group.component.ts","../../../projects/nextera-ui/forms/src/lib/radio-group/nxe-radio-group.component.html","../../../projects/nextera-ui/forms/src/lib/switch/nxe-switch.component.ts","../../../projects/nextera-ui/forms/src/lib/switch/nxe-switch.component.html","../../../projects/nextera-ui/forms/src/lib/otp-box/nxe-otp-box.component.ts","../../../projects/nextera-ui/forms/src/lib/otp-box/nxe-otp-box.component.html","../../../projects/nextera-ui/forms/src/public-api.ts","../../../projects/nextera-ui/forms/src/nexterajs-ui-forms.ts"],"sourcesContent":["import {\r\n booleanAttribute,\r\n ChangeDetectionStrategy,\r\n Component,\r\n computed,\r\n ElementRef,\r\n inject,\r\n input,\r\n output,\r\n ViewEncapsulation,\r\n} from '@angular/core';\r\nimport { NXE_VALIDATION_GROUP, NxeValidationGroupRegistry } from '@nexterajs/ui/core';\r\nimport { NxeValidationResult } from '@nexterajs/ui/core';\r\n\r\n/** DevExtreme button `type` (style intent), as used in this codebase. */\r\nexport type NxeButtonType = 'normal' | 'default' | 'success' | 'danger';\r\n\r\n/** Fill treatment: dx `stylingMode`. `contained` (filled) is the default and the legacy look. */\r\nexport type NxeButtonStylingMode = 'contained' | 'outlined' | 'text';\r\n\r\n/** Button scale. `md` is the legacy size and adds no class. */\r\nexport type NxeButtonSize = 'sm' | 'md' | 'lg';\r\n\r\n/**\r\n * dx size coercion: `height=\"35\"` and `[height]=\"35\"` both mean 35px, while `'100%'` or `'3rem'`\r\n * pass through untouched. Templates write the attribute form, so the string case is the common one.\r\n */\r\nfunction cssSize(value: number | string | undefined): string | null {\r\n if (value === undefined || value === null || value === '') {\r\n return null;\r\n }\r\n return /^-?\\d+(\\.\\d+)?$/.test(String(value)) ? `${value}px` : String(value);\r\n}\r\n\r\n/**\r\n * The `validationGroup` object carried on a {@link NxeButtonClickEvent}, mirroring the\r\n * DevExtreme button-click `event.validationGroup`. Its `validate()` runs every member of the\r\n * button's named group through the {@link NxeValidationGroupRegistry} and returns the\r\n * DevExtreme-shaped result — so `const r = event.validationGroup.validate(); if (r.isValid) {...}`\r\n * keeps working after the tag rename.\r\n */\r\nexport interface NxeButtonValidationGroup {\r\n validate(): NxeValidationResult;\r\n}\r\n\r\n/**\r\n * Payload emitted from `nxe-button`'s `onClick`, mirroring DevExtreme's button click event.\r\n * Only `validationGroup` is read by existing handlers; `event`/`component`/`element` are\r\n * provided for parity.\r\n */\r\nexport interface NxeButtonClickEvent {\r\n event: Event;\r\n validationGroup: NxeButtonValidationGroup;\r\n component: NxeButtonComponent;\r\n element: HTMLElement;\r\n}\r\n\r\n/**\r\n * `nxe-button` — drop-in replacement for DevExtreme `dx-button`.\r\n *\r\n * The host element IS the button (mirrors DevExtreme's `nxe-button` DOM: the host carries the\r\n * styling classes and contains a single `.nxe-button-content` child). This keeps every existing\r\n * `.nxe-btn*` / `.nxe-button-content` global rule matching verbatim, and — critically — keeps the\r\n * shared `buttonLoading` directive working, which swaps `.nxe-button-content` innerHTML for a\r\n * spinner (`getElementsByClassName('nxe-button-content')[0]`).\r\n *\r\n * Content is projected (`<nxe-icon> + <span>`, the dominant pattern). The legacy `text`/`type`\r\n * inputs render a `.nxe-button-text` label for the ~25 attribute-styled buttons.\r\n *\r\n * `stylingMode`, `size`, `loading` and `block` are additive: with none of them set the host renders\r\n * exactly as before. An icon can be projected into the leading slot as\r\n * `<svg nxeButtonIcon ...>` (or `[nxeIcon]`), placed before the label.\r\n *\r\n * `onClick` emits {@link NxeButtonClickEvent}; native `(click)` also fires (27 sites bind it).\r\n */\r\n@Component({\r\n selector: 'nxe-button',\r\n standalone: true,\r\n template: `\r\n <span class=\"nxe-button-content\">\r\n @if (icon()) {\r\n <i class=\"nxe-icon nxe-icon-{{ icon() }}\"></i>\r\n }\r\n <ng-content select=\"[nxeButtonIcon], [nxeIcon]\" />\r\n <ng-content />\r\n @if (text()) {\r\n <span class=\"nxe-button-text\">{{ text() }}</span>\r\n }\r\n </span>\r\n @if (loading()) {\r\n <span class=\"nxe-button-spinner\" aria-hidden=\"true\"></span>\r\n }\r\n `,\r\n styleUrl: './nxe-button.component.scss',\r\n host: {\r\n class: 'nxe-widget',\r\n role: 'button',\r\n '[attr.tabindex]': 'disabled() || !focusStateEnabled() ? null : 0',\r\n '[attr.aria-disabled]': 'disabled() || loading() ? true : null',\r\n '[attr.aria-busy]': 'loading() ? true : null',\r\n '[class.nxe-button-mode-outlined]': \"stylingMode() === 'outlined'\",\r\n '[class.nxe-button-mode-text]': \"stylingMode() === 'text'\",\r\n '[class.nxe-button-sm]': \"size() === 'sm'\",\r\n '[class.nxe-button-lg]': \"size() === 'lg'\",\r\n '[class.nxe-button-block]': 'block()',\r\n '[class.nxe-button-loading]': 'loading()',\r\n '[class.nxe-button-default]': \"type() === 'default'\",\r\n '[class.nxe-button-success]': \"type() === 'success'\",\r\n '[class.nxe-button-danger]': \"type() === 'danger'\",\r\n '[class.nxe-button-has-text]': '!!text()',\r\n '[class.nxe-button-has-icon]': '!!icon()',\r\n '[style.height]': 'heightStyle()',\r\n '[style.width]': 'widthStyle()',\r\n '[class.nxe-disabled]': 'disabled()',\r\n '(click)': 'handleClick($event)',\r\n '(keydown.enter)': 'handleKeydown($event)',\r\n '(keydown.space)': 'handleKeydown($event)',\r\n },\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n})\r\nexport class NxeButtonComponent {\r\n private readonly registry = inject(NxeValidationGroupRegistry);\r\n private readonly groupScope = inject(NXE_VALIDATION_GROUP, { optional: true });\r\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\r\n\r\n /** Legacy `text` label (rendered as `.nxe-button-text` when set, no projected content). */\r\n readonly text = input<string>();\r\n /** Style intent (`default`=blue, `success`=green, `danger`=red, `normal`=white). */\r\n readonly type = input<NxeButtonType>('normal');\r\n /** Fill treatment: `contained` (default), `outlined` (transparent with a coloured border) or `text` (no border). */\r\n readonly stylingMode = input<NxeButtonStylingMode>('contained');\r\n /** Scale: `sm`, `md` (default, the legacy size) or `lg`. */\r\n readonly size = input<NxeButtonSize>('md');\r\n /**\r\n * In-flight state: shows a spinner over the (hidden but still laid out, so the width holds)\r\n * content, sets `aria-busy=\"true\"` and swallows clicks and Enter/Space until it clears.\r\n */\r\n readonly loading = input(false, { transform: booleanAttribute });\r\n /** Full-width button (`display: flex; width: 100%`). An explicit `width` still wins. */\r\n readonly block = input(false, { transform: booleanAttribute });\r\n /** Disabled state (`[disabled]`); blocks `onClick` and dims the button. */\r\n readonly disabled = input(false, { transform: booleanAttribute });\r\n /** Named validation group resolved via {@link NxeValidationGroupRegistry} on click. */\r\n readonly validationGroup = input<string>('');\r\n /** DevExtreme parity input; only ever `false` in this codebase (suppresses tab focus). */\r\n readonly focusStateEnabled = input(true, { transform: booleanAttribute });\r\n /**\r\n * dx `icon` — renders `<i class=\"nxe-icon nxe-icon-NAME\">` as the first child of\r\n * `.nxe-button-content`, before any projected content. Projection is the dominant pattern\r\n * here (a `mat-icon` plus a `span`), so the two must coexist rather than compete.\r\n */\r\n readonly icon = input<string | undefined>(undefined);\r\n /** dx `height` — a bare number (or numeric string) means px; anything else passes through. */\r\n readonly height = input<number | string | undefined>(undefined);\r\n /** dx `width` — same coercion as {@link height}. */\r\n readonly width = input<number | string | undefined>(undefined);\r\n\r\n protected readonly heightStyle = computed(() => cssSize(this.height()));\r\n protected readonly widthStyle = computed(() => cssSize(this.width()));\r\n\r\n /** DevExtreme-compatible click event. */\r\n readonly onClick = output<NxeButtonClickEvent>();\r\n\r\n protected handleKeydown(event: KeyboardEvent): void {\r\n // Non-button host: Enter/Space don't synthesize a click, so activate explicitly.\r\n event.preventDefault();\r\n this.handleClick(event);\r\n }\r\n\r\n protected handleClick(event: Event): void {\r\n if (this.disabled() || this.loading()) {\r\n event.preventDefault();\r\n event.stopImmediatePropagation();\r\n return;\r\n }\r\n // A named group wins; otherwise a surrounding nxe-validation-group; otherwise dx's\r\n // implicit global group. Same precedence the validator applies, so a button and the\r\n // fields beside it always resolve to the same group.\r\n const group = this.validationGroup() || this.groupScope?.groupKey || '';\r\n this.onClick.emit({\r\n event,\r\n validationGroup: { validate: () => this.registry.validate(group) },\r\n component: this,\r\n element: this.elementRef.nativeElement,\r\n });\r\n }\r\n}\r\n","import {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n ElementRef,\n forwardRef,\n input,\n linkedSignal,\n signal,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { NxeFormControlBase, nxeOptionalBoolean } from '@nexterajs/ui/core';\nimport { NXE_VALIDATION_TARGET } from '@nexterajs/ui/core';\n\n/** Text-box input mode (only `text`/`password` are used in this codebase). */\nexport type NxeTextBoxMode = 'text' | 'password' | 'email' | 'tel' | 'search';\n\n/**\n * `nxe-text-box` — drop-in replacement for DevExtreme `dx-text-box`.\n *\n * A signal-CVA editor (extends {@link NxeFormControlBase}) supporting `formControlName`,\n * `[(ngModel)]`, one-way `[value]`, and `[readOnly]`. Like DevExtreme's default\n * (`valueChangeEvent='change'`), the value commits on **blur** — not on every keystroke.\n *\n * `showClearButton` (dx default `false`) adds dx's clear area after the input while the field\n * holds text and is neither read-only nor disabled; it sets the value to `''`, dx's own empty\n * value for a text box, and focuses the input.\n *\n * It provides {@link NXE_VALIDATION_TARGET} so a projected `nxe-validator` can read its value\n * and push back the invalid message, which renders as the red `.nxe-invalid-message` bubble.\n */\n@Component({\n selector: 'nxe-text-box',\n standalone: true,\n template: `\n <div class=\"nxe-editor-container\">\n <input\n #field\n class=\"nxe-editor-input nxe-textbox-input\"\n [attr.tabindex]=\"tabIndex()\"\n [id]=\"controlId()\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-invalid]=\"invalidState() ? true : null\"\n [attr.aria-required]=\"required() ? true : null\"\n [type]=\"passwordRevealed() ? 'text' : mode()\"\n [value]=\"displayValue()\"\n [readOnly]=\"readOnly()\"\n [disabled]=\"disabled()\"\n [attr.placeholder]=\"placeholder() || null\"\n autocomplete=\"off\"\n (input)=\"onTypedInput($event)\"\n (keyup)=\"onTypedKeyup($event)\"\n (blur)=\"onBlur($event)\"\n (focus)=\"focused.set(true)\" />\n @if (clearButtonVisible()) {\n <span\n class=\"nxe-clear-button-area\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"onClear($event)\"\n aria-hidden=\"true\">\n <!-- A Ø16 disc with a 2px × cut out (the dropdown editors' clear glyph). -->\n <svg viewBox=\"0 0 18 18\" focusable=\"false\">\n <path fill-rule=\"evenodd\" transform=\"rotate(45 9 9)\"\n d=\"M9 1a8 8 0 1 1 0 16A8 8 0 1 1 9 1ZM8 3.343h2V8h4.657v2H10v4.657H8V10H3.343V8H8Z\" />\n </svg>\n </span>\n }\n @if (passwordToggleVisible()) {\n <!-- mousedown is held back so a click does not pull focus out of the field. -->\n <button\n type=\"button\"\n class=\"nxe-password-toggle\"\n [attr.aria-label]=\"passwordToggleLabel()\"\n [attr.aria-pressed]=\"passwordRevealed()\"\n [attr.aria-controls]=\"controlId()\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"passwordRevealed.set(!passwordRevealed())\">\n <svg viewBox=\"0 0 18 18\" focusable=\"false\" aria-hidden=\"true\">\n <path d=\"M9 3.5C5.2 3.5 2.2 6 1 9c1.2 3 4.2 5.5 8 5.5s6.8-2.5 8-5.5c-1.2-3-4.2-5.5-8-5.5Zm0 9a3.5 3.5 0 1 1 0-7 3.5 3.5 0 0 1 0 7Zm0-5.2a1.7 1.7 0 1 0 0 3.4 1.7 1.7 0 0 0 0-3.4Z\" />\n @if (passwordRevealed()) {\n <path class=\"nxe-password-toggle-slash\" d=\"M3 2.4 15.6 15l-1 1L2 3.4l1-1Z\" />\n }\n </svg>\n </button>\n }\n </div>\n <ng-content />\n @if (validationError(); as error) {\n @if (focused()) {\n <div class=\"nxe-invalid-message\">{{ error }}</div>\n }\n }\n `,\n host: {\n class: 'nxe-widget nxe-editor nxe-textbox',\n '[class.nxe-focused]': 'focused()',\n '[class.nxe-invalid]': 'invalidState()',\n },\n providers: [\n { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => NxeTextBoxComponent), multi: true },\n { provide: NXE_VALIDATION_TARGET, useExisting: forwardRef(() => NxeTextBoxComponent) },\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class NxeTextBoxComponent extends NxeFormControlBase<string> {\n readonly mode = input<NxeTextBoxMode>('text');\n readonly placeholderInput = input<string | undefined>(undefined, { alias: 'placeholder' });\n readonly placeholder = computed(\n () => this.placeholderInput() ?? this.nxeDefaults.textBox?.placeholder ?? '',\n );\n /** DevExtreme parity input; cosmetic, unused in behaviour. */\n readonly hoverStateEnabledInput = input<boolean | undefined>(undefined, { alias: 'hoverStateEnabled', transform: nxeOptionalBoolean });\n readonly hoverStateEnabled = computed(\n () => this.hoverStateEnabledInput() ?? this.nxeDefaults.textBox?.hoverStateEnabled ?? false,\n );\n\n /** dx `showClearButton` — off by default, as in dx; `NXE_DEFAULT_OPTIONS.textBox` can turn it on app-wide. */\n readonly showClearButtonInput = input<boolean | undefined>(undefined, { alias: 'showClearButton', transform: nxeOptionalBoolean });\n readonly showClearButton = computed(\n () => this.showClearButtonInput() ?? this.nxeDefaults.textBox?.showClearButton ?? false,\n );\n\n /**\n * With `mode=\"password\"`, an icon button after the field that shows the password as text and\n * hides it again. Off by default; it has no effect in any other mode.\n */\n readonly showPasswordToggle = input(false, { transform: booleanAttribute });\n\n protected readonly passwordToggleVisible = computed(\n () => this.showPasswordToggle() && this.mode() === 'password' && !this.disabled(),\n );\n /** Whether the password is showing as text right now; hidden again whenever the toggle goes away. */\n protected readonly passwordRevealed = linkedSignal<boolean, boolean>({\n source: this.passwordToggleVisible,\n computation: () => false,\n });\n protected readonly passwordToggleLabel = computed(() =>\n this.nxeMessages.t(this.passwordRevealed() ? 'forms.password.hide' : 'forms.password.show'),\n );\n\n readonly focused = signal(false);\n readonly displayValue = computed(() => this.value() ?? '');\n\n private readonly fieldRef = viewChild.required<ElementRef<HTMLInputElement>>('field');\n\n /**\n * The text in the field right now, typed or not. dx shows the clear button by the field's\n * emptiness (`.dx-texteditor-empty`), which follows every keystroke, not the committed value.\n */\n private readonly fieldText = linkedSignal(() => this.displayValue());\n\n protected readonly clearButtonVisible = computed(\n () => this.showClearButton() && !this.readOnly() && !this.disabled() && this.fieldText() !== '',\n );\n\n /** dx `valueChangeEvent: 'input'` — the search-as-you-type case. */\n protected onTypedInput(event: Event): void {\n const text = (event.target as HTMLInputElement).value;\n this.fieldText.set(text);\n this.commitOn('input', text, event);\n }\n\n /**\n * dx `_clearValueHandler`: value back to `''`, then focus on the input. The field is emptied by\n * hand as well — typed-but-uncommitted text over an already-empty value would otherwise survive,\n * because the `[value]` binding has not changed.\n */\n protected onClear(event: Event): void {\n const field = this.fieldRef().nativeElement;\n this.commitValue('', event);\n field.value = '';\n this.fieldText.set('');\n if (!this.focused()) {\n field.focus();\n }\n }\n\n protected onTypedKeyup(event: Event): void {\n this.commitOn('keyup', (event.target as HTMLInputElement).value, event);\n }\n\n protected override commitPending(event: Event | null): void {\n this.commitValue(this.fieldRef().nativeElement.value, event);\n }\n\n protected onBlur(event: Event): void {\n // Blur commits whatever the mode: a value typed and left must not be discarded because\n // the configured event never fired.\n this.commitValue((event.target as HTMLInputElement).value, event);\n this.focused.set(false);\n this.markAsTouched();\n }\n}\n","import {\n afterRenderEffect,\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n forwardRef,\n input,\n linkedSignal,\n numberAttribute,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { NxeFormControlBase } from '@nexterajs/ui/core';\nimport { NXE_VALIDATION_TARGET } from '@nexterajs/ui/core';\n\n/**\n * `nxe-text-area` — drop-in replacement for DevExtreme `dx-text-area`.\n *\n * Identical to {@link NxeTextBoxComponent} but renders a `<textarea>`. Supports an optional fixed\n * `[height]` (px) and `placeholder`; commits on blur. Hosts a projected `nxe-validator` via\n * {@link NXE_VALIDATION_TARGET}.\n */\n@Component({\n selector: 'nxe-text-area',\n standalone: true,\n template: `\n <div class=\"nxe-editor-container\">\n <textarea\n class=\"nxe-editor-input nxe-textarea-input\"\n [attr.tabindex]=\"tabIndex()\"\n [id]=\"controlId()\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-invalid]=\"invalidState() ? true : null\"\n [attr.aria-required]=\"required() ? true : null\"\n [value]=\"displayValue()\"\n [readOnly]=\"readOnly()\"\n [disabled]=\"disabled()\"\n [attr.placeholder]=\"placeholder() || null\"\n [attr.maxlength]=\"maxLength() ?? null\"\n [style.height.px]=\"autoGrow() ? null : height() || null\"\n (input)=\"onTypedInput($event)\"\n (keyup)=\"onTypedKeyup($event)\"\n (blur)=\"onBlur($event)\"\n (focus)=\"focused.set(true)\"></textarea>\n </div>\n @if (maxLength() !== undefined) {\n <!-- The visible count is not read out character by character; the status below speaks\n only once the limit is close. -->\n <div\n class=\"nxe-textarea-counter\"\n aria-hidden=\"true\"\n [class.nxe-textarea-counter-near]=\"nearLimit()\"\n [class.nxe-textarea-counter-over]=\"remaining() < 0\">\n {{ fieldText().length }}/{{ maxLength() }}\n </div>\n <span class=\"nxe-textarea-counter-status\" aria-live=\"polite\" aria-atomic=\"true\">{{ limitStatus() }}</span>\n }\n <ng-content />\n @if (validationError(); as error) {\n @if (focused()) {\n <div class=\"nxe-invalid-message\">{{ error }}</div>\n }\n }\n `,\n styleUrl: './nxe-text-area.component.scss',\n host: {\n class: 'nxe-widget nxe-editor nxe-textarea',\n '[class.nxe-focused]': 'focused()',\n '[class.nxe-invalid]': 'invalidState()',\n },\n providers: [\n { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => NxeTextAreaComponent), multi: true },\n { provide: NXE_VALIDATION_TARGET, useExisting: forwardRef(() => NxeTextAreaComponent) },\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class NxeTextAreaComponent extends NxeFormControlBase<string> {\n readonly placeholderInput = input<string | undefined>(undefined, { alias: 'placeholder' });\n readonly placeholder = computed(\n () => this.placeholderInput() ?? this.nxeDefaults.textArea?.placeholder ?? '',\n );\n /** Fixed height in px (DevExtreme `[height]`); unset = auto. */\n readonly heightInput = input<number | undefined>(undefined, { alias: 'height' });\n readonly height = computed(() => this.heightInput() ?? this.nxeDefaults.textArea?.height ?? 80);\n\n /**\n * dx `maxLength`: the most characters the field takes. Sets the native `maxlength`, so typing\n * and pasting stop at the limit, and shows a live \"12/200\" count under the text. Unset (the\n * default), there is no limit and no counter.\n */\n readonly maxLength = input<number | undefined, unknown>(undefined, {\n transform: (v: unknown) => (v === null || v === undefined || v === '' ? undefined : numberAttribute(v, undefined)),\n });\n\n /**\n * Grow with the text between {@link minRows} and {@link maxRows}, scrolling past the maximum.\n * The fixed `height` is ignored while this is on. Off by default.\n */\n readonly autoGrow = input(false, { transform: booleanAttribute });\n /** Rows the field never shrinks below while `autoGrow` is on. */\n readonly minRows = input(3, { transform: (v: unknown) => Math.max(1, numberAttribute(v, 3)) });\n /** Rows after which an auto-growing field scrolls instead of growing; `0` means never. */\n readonly maxRows = input(10, { transform: (v: unknown) => Math.max(0, numberAttribute(v, 10)) });\n\n readonly focused = signal(false);\n readonly displayValue = computed(() => this.value() ?? '');\n\n /** The text in the field right now, typed or not: the counter and the height follow every keystroke. */\n protected readonly fieldText = linkedSignal(() => this.displayValue());\n\n protected readonly remaining = computed(() => (this.maxLength() ?? 0) - this.fieldText().length);\n\n /** Close enough to the limit to say so: the last 10 characters, or 10% of a long limit. */\n protected readonly nearLimit = computed(() => {\n const max = this.maxLength();\n return max !== undefined && this.remaining() <= Math.max(10, Math.ceil(max * 0.1));\n });\n\n /** Spoken by the polite status; empty (so silent) until {@link nearLimit}. */\n protected readonly limitStatus = computed(() => {\n if (!this.nearLimit()) {\n return '';\n }\n const left = this.remaining();\n return left >= 0\n ? this.nxeMessages.t('forms.textArea.charactersLeft', left)\n : this.nxeMessages.t('forms.textArea.charactersOver', -left);\n });\n\n private readonly growState = computed(() =>\n this.autoGrow()\n ? { text: this.fieldText(), minRows: this.minRows(), maxRows: this.maxRows() }\n : null,\n );\n\n constructor() {\n super();\n // Reads exactly `growState()`; the measuring below reads no signal.\n afterRenderEffect(() => this.resize(this.growState()));\n }\n\n /** dx `valueChangeEvent: 'input'` — the search-as-you-type case. */\n protected onTypedInput(event: Event): void {\n const text = (event.target as HTMLTextAreaElement).value;\n this.fieldText.set(text);\n this.commitOn('input', text, event);\n }\n\n /** Size the textarea to its text: collapse it to measure, then clamp to the row limits. */\n private resize(state: { text: string; minRows: number; maxRows: number } | null): void {\n const el = this.elementRef.nativeElement.querySelector('textarea');\n if (!el || !state) {\n return;\n }\n const style = getComputedStyle(el);\n const px = (v: string) => parseFloat(v) || 0;\n const lineHeight = px(style.lineHeight) || px(style.fontSize) * 1.35715;\n const padding = px(style.paddingTop) + px(style.paddingBottom);\n const border = px(style.borderTopWidth) + px(style.borderBottomWidth);\n const chrome = style.boxSizing === 'border-box' ? padding + border : 0;\n el.style.height = '0px';\n const content = el.scrollHeight - padding;\n const min = state.minRows * lineHeight;\n const max = state.maxRows > 0 ? state.maxRows * lineHeight : Infinity;\n el.style.height = `${Math.min(Math.max(content, min), max) + chrome}px`;\n el.style.overflowY = content > max ? 'auto' : 'hidden';\n }\n\n protected onTypedKeyup(event: Event): void {\n this.commitOn('keyup', (event.target as HTMLTextAreaElement).value, event);\n }\n\n protected override commitPending(event: Event | null): void {\n const field = this.elementRef.nativeElement.querySelector('textarea');\n if (field) {\n this.commitValue(field.value, event);\n }\n }\n\n /** Enter types a newline here and submits nothing; Ctrl/Cmd+Enter is the submit chord. */\n protected override commitsOnEnter(event: KeyboardEvent): boolean {\n return event.ctrlKey || event.metaKey;\n }\n\n protected onBlur(event: Event): void {\n // Blur commits whatever the mode: a value typed and left must not be discarded because\n // the configured event never fired.\n this.commitValue((event.target as HTMLTextAreaElement).value, event);\n this.focused.set(false);\n this.markAsTouched();\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n forwardRef,\n input,\n OnChanges,\n signal,\n SimpleChanges,\n ViewEncapsulation,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { NxeFormControlBase } from '@nexterajs/ui/core';\nimport { NXE_VALIDATION_TARGET } from '@nexterajs/ui/core';\n\n/**\n * `nxe-check-box` — drop-in replacement for DevExtreme `dx-check-box`.\n *\n * A signal-CVA editor (extends {@link NxeFormControlBase}) over `true` / `false` / `null`. As in\n * dx, a `null` value is the indeterminate state: the box shows a 12px square and reports\n * `aria-checked=\"mixed\"`. That is what a `new FormControl()` (or a `reset()`) looks like, and what\n * `[value]=\"null\"` looks like; an unbound box starts unchecked, like dx's default `false`. A click\n * or Space always lands on `true` or `false` — there is no `enableThreeStateBehavior` cycling back\n * to `null`.\n *\n * Supports `formControlName`/`[(ngModel)]`/`[(value)]`/`[value]`, `[readOnly]`, `[disabled]`, an\n * inline `text` label, `(onValueChanged)` (`{value}`) and `(valueChange)` (raw value). A read-only\n * box stays focusable (tabindex 0) and still shows hover and focus, as in dx; it just never\n * toggles. Provides {@link NXE_VALIDATION_TARGET} for a projected `nxe-validator` (a `required`\n * rule is invalid while unchecked, matching DevExtreme's RequiredRule treating `false` as empty).\n */\n@Component({\n selector: 'nxe-check-box',\n standalone: true,\n template: `\n <span class=\"nxe-checkbox-container\">\n <span class=\"nxe-checkbox-icon\" aria-hidden=\"true\"></span>\n @if (text()) {\n <span class=\"nxe-checkbox-text\">{{ text() }}</span>\n }\n </span>\n <ng-content />\n `,\n styleUrl: './nxe-check-box.component.scss',\n host: {\n class: 'nxe-widget nxe-checkbox',\n role: 'checkbox',\n '[attr.aria-checked]': \"indeterminate() ? 'mixed' : !!value()\",\n '[attr.aria-disabled]': 'disabled() ? true : null',\n '[attr.aria-readonly]': 'readOnly() ? true : null',\n '[attr.aria-invalid]': 'invalidState() ? true : null',\n '[attr.aria-required]': 'required() ? true : null',\n // The host IS the control here, so the id and name belong on it rather than on a child.\n '[attr.id]': 'inputId() ? controlId() : null',\n '[attr.aria-label]': 'ariaLabel() || null',\n '[attr.aria-labelledby]': 'ariaLabelledBy() || null',\n // dx keeps a read-only box in the tab order (tabindex 0); only disabled takes it out.\n '[attr.tabindex]': 'disabled() ? null : 0',\n '[class.nxe-checkbox-checked]': '!!value()',\n '[class.nxe-checkbox-indeterminate]': 'indeterminate()',\n '[class.nxe-disabled]': 'disabled()',\n '[class.nxe-readonly]': 'readOnly()',\n '[class.nxe-invalid]': 'invalidState()',\n '(click)': 'toggle($event)',\n '(keydown.space)': 'onSpace($event)',\n '(blur)': 'markAsTouched()',\n },\n providers: [\n { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => NxeCheckBoxComponent), multi: true },\n { provide: NXE_VALIDATION_TARGET, useExisting: forwardRef(() => NxeCheckBoxComponent) },\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class NxeCheckBoxComponent extends NxeFormControlBase<boolean> implements OnChanges {\n /** Inline label rendered next to the box. */\n readonly text = input<string>();\n\n /**\n * Whether a value has been handed in at all — by the forms API or a `[value]` binding.\n *\n * The base class starts `value` at `null`, which is also the indeterminate value, so `null`\n * alone cannot tell \"given null\" from \"given nothing\". dx can: its unset value is `false`.\n */\n private readonly valueProvided = signal(false);\n\n /** dx `.dx-checkbox-indeterminate`: the value was given, and it is `null`. */\n readonly indeterminate = computed(() => this.valueProvided() && this.value() === null);\n\n override writeValue(value: boolean | null): void {\n super.writeValue(value);\n this.valueProvided.set(true);\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['value']) {\n this.valueProvided.set(true);\n }\n }\n\n protected toggle(event: Event): void {\n if (this.disabled() || this.readOnly()) {\n return;\n }\n this.commitValue(!this.value(), event);\n this.markAsTouched();\n }\n\n protected onSpace(event: Event): void {\n event.preventDefault();\n this.toggle(event);\n }\n}\n","/**\n * Decimal-safe stepping for nxe-number-box.\n *\n * `0.1 + 0.2` is `0.30000000000000004` in binary floating point, and a spin button that walks a\n * 0.1 step through that arithmetic shows it within a few clicks. Both operands are scaled to\n * integers by the larger of their decimal places, added as integers, and scaled back, which is\n * exact for every value a person can type.\n */\n\n/** Decimal places in the shortest decimal form of `value` (`0.1` is 1, `1e-7` is 7, `120` is 0). */\nexport function decimalPlaces(value: number): number {\n if (!Number.isFinite(value)) {\n return 0;\n }\n const text = String(value);\n const exponent = /e([+-]\\d+)$/i.exec(text);\n const mantissa = exponent ? text.slice(0, exponent.index) : text;\n const dot = mantissa.indexOf('.');\n const fraction = dot === -1 ? 0 : mantissa.length - dot - 1;\n return Math.max(0, fraction - (exponent ? Number(exponent[1]) : 0));\n}\n\n/** `a + b` without binary floating point artefacts. */\nexport function addDecimal(a: number, b: number): number {\n const places = Math.max(decimalPlaces(a), decimalPlaces(b));\n if (places === 0 || places > 15) {\n return a + b;\n }\n const factor = Math.pow(10, places);\n return (Math.round(a * factor) + Math.round(b * factor)) / factor;\n}\n\n/** Clamp to the optional bounds. */\nexport function clampNumber(value: number, min?: number, max?: number): number {\n let next = value;\n if (min != null && next < min) {\n next = min;\n }\n if (max != null && next > max) {\n next = max;\n }\n return next;\n}\n\n/**\n * The value after `direction` steps of `step` from `current` (`null` counts as 0, or as the\n * nearest bound when 0 is outside them), clamped to `[min, max]`.\n */\nexport function stepNumber(\n current: number | null,\n step: number,\n direction: 1 | -1,\n min?: number,\n max?: number,\n): number {\n const base = current ?? clampNumber(0, min, max);\n return clampNumber(addDecimal(base, direction * step), min, max);\n}\n","import {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n ElementRef,\n forwardRef,\n inject,\n input,\n linkedSignal,\n signal,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { NxeFormControlBase, nxeOptionalBoolean } from '@nexterajs/ui/core';\nimport { NXE_VALIDATION_TARGET } from '@nexterajs/ui/core';\nimport {\n formatCurrency,\n formatNumber,\n NXE_NUMBER_SEPARATORS,\n nxeCurrencyCode,\n nxeCurrencyNumberFormat,\n parseNumber,\n parseNumberFormat,\n roundHalfAwayFromZero,\n} from '@nexterajs/ui/intl';\nimport { clampNumber, stepNumber } from './nxe-number-step';\n\n/** Delay before a held spin button starts repeating, and the repeat interval (ms). */\nconst SPIN_REPEAT_DELAY = 400;\nconst SPIN_REPEAT_INTERVAL = 70;\n\n/** Coerce a static (`min=\"1\"`) or bound (`[min]=\"0\"`) attribute to a number, or undefined. */\nfunction toNumber(value: unknown): number | undefined {\n if (value == null || value === '') {\n return undefined;\n }\n const num = Number(value);\n return isNaN(num) ? undefined : num;\n}\n\n/**\n * `nxe-number-box` — drop-in replacement for DevExtreme `dx-number-box`.\n *\n * A numeric signal-CVA editor (extends {@link NxeFormControlBase}) storing/emitting `number | null`.\n * Implements the DevExtreme number-format engine ({@link parseNumberFormat}/{@link formatNumber}):\n * displays the masked, grouped string when blurred and a raw editable number while focused;\n * commits (clamped to `[min,max]`, rounded to the format precision) on blur — never per keystroke.\n *\n * Supports `formControlName`/`[(ngModel)]`/`[(value)]`/`[value]`, `[readOnly]`, `[min]`/`[max]`,\n * `format` (string LDML pattern), `(valueChange)` (numeric), and a projected `nxe-validator`.\n *\n * Stepping: `step` (default 1) moves the value by exact decimal arithmetic (`0.1` steps never show\n * `0.30000000000000004`) on ArrowUp/ArrowDown (`largeStep`, default 10 steps, on PageUp/PageDown),\n * and on the optional spin buttons (`showSpinButtons`; held buttons repeat unless\n * `[holdToRepeat]=\"false\"`). Results are clamped to `[min, max]` and rounded to the format precision.\n * The input carries `role=\"spinbutton\"` with `aria-valuenow`/`aria-valuemin`/`aria-valuemax`.\n *\n * `currency` (an ISO 4217 code) shows `IDR 1.351.000` / `USD 1,234.50` (separators from\n * `NXE_NUMBER_SEPARATORS`, so it follows the locale) and takes the currency's minor units as the\n * precision. An explicit `format` still sets the number pattern; `currencyDecimals` overrides the\n * minor units (reference data). Focused, the field holds the bare editable number.\n *\n * `showClearButton` (dx default `false`) adds dx's clear area after the input while the field\n * holds text and is neither read-only nor disabled; it sets the value to `null`, as dx's\n * `clear()` does for a number box, and focuses the input.\n */\n@Component({\n selector: 'nxe-number-box',\n standalone: true,\n template: `\n <div class=\"nxe-editor-container\">\n <input\n #field\n class=\"nxe-editor-input nxe-numberbox-input\"\n [attr.tabindex]=\"tabIndex()\"\n [id]=\"controlId()\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-invalid]=\"invalidState() ? true : null\"\n [attr.aria-required]=\"required() ? true : null\"\n type=\"text\"\n inputmode=\"decimal\"\n role=\"spinbutton\"\n [attr.aria-valuenow]=\"value() ?? null\"\n [attr.aria-valuemin]=\"min() ?? null\"\n [attr.aria-valuemax]=\"max() ?? null\"\n [attr.aria-valuetext]=\"valueText()\"\n [value]=\"displayValue()\"\n [readOnly]=\"readOnly()\"\n [disabled]=\"disabled()\"\n autocomplete=\"off\"\n (input)=\"onFieldInput($event)\"\n (keydown)=\"onKeyDownStep($event)\"\n (focus)=\"focused.set(true)\"\n (blur)=\"onBlur($event)\" />\n @if (clearButtonVisible()) {\n <span\n class=\"nxe-clear-button-area\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"onClear($event)\"\n aria-hidden=\"true\">\n <!-- A Ø16 disc with a 2px × cut out (the dropdown editors' clear glyph). -->\n <svg viewBox=\"0 0 18 18\" focusable=\"false\">\n <path fill-rule=\"evenodd\" transform=\"rotate(45 9 9)\"\n d=\"M9 1a8 8 0 1 1 0 16A8 8 0 1 1 9 1ZM8 3.343h2V8h4.657v2H10v4.657H8V10H3.343V8H8Z\" />\n </svg>\n </span>\n }\n @if (showSpinButtons()) {\n <span class=\"nxe-spin-container\">\n <!-- Not tab stops: the input is the spinbutton and takes ArrowUp/ArrowDown itself.\n A pointer press keeps focus in the input; a click with detail 0 is keyboard or AT. -->\n <button\n type=\"button\"\n class=\"nxe-spin-button nxe-spin-up\"\n tabindex=\"-1\"\n [attr.aria-label]=\"nxeMessages.t('forms.numberBox.increase')\"\n [attr.aria-controls]=\"controlId()\"\n [disabled]=\"incrementDisabled()\"\n (pointerdown)=\"onSpinPointerDown($event, 1)\"\n (pointerup)=\"stopSpin()\"\n (pointerleave)=\"stopSpin()\"\n (pointercancel)=\"stopSpin()\"\n (click)=\"onSpinClick($event, 1)\">\n <svg viewBox=\"0 0 10 6\" focusable=\"false\" aria-hidden=\"true\">\n <path d=\"M1 5l4-4 4 4\" />\n </svg>\n </button>\n <button\n type=\"button\"\n class=\"nxe-spin-button nxe-spin-down\"\n tabindex=\"-1\"\n [attr.aria-label]=\"nxeMessages.t('forms.numberBox.decrease')\"\n [attr.aria-controls]=\"controlId()\"\n [disabled]=\"decrementDisabled()\"\n (pointerdown)=\"onSpinPointerDown($event, -1)\"\n (pointerup)=\"stopSpin()\"\n (pointerleave)=\"stopSpin()\"\n (pointercancel)=\"stopSpin()\"\n (click)=\"onSpinClick($event, -1)\">\n <svg viewBox=\"0 0 10 6\" focusable=\"false\" aria-hidden=\"true\">\n <path d=\"M1 1l4 4 4-4\" />\n </svg>\n </button>\n </span>\n }\n </div>\n <ng-content />\n @if (validationError(); as error) {\n @if (focused()) {\n <div class=\"nxe-invalid-message\">{{ error }}</div>\n }\n }\n `,\n styleUrl: './nxe-number-box.component.scss',\n host: {\n class: 'nxe-widget nxe-editor nxe-numberbox',\n '[class.nxe-focused]': 'focused()',\n '[class.nxe-invalid]': 'invalidState()',\n },\n providers: [\n { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => NxeNumberBoxComponent), multi: true },\n { provide: NXE_VALIDATION_TARGET, useExisting: forwardRef(() => NxeNumberBoxComponent) },\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class NxeNumberBoxComponent extends NxeFormControlBase<number> {\n /** LDML format pattern (e.g. `#,##0.00`); empty = raw number. */\n readonly formatInput = input<string | undefined>(undefined, { alias: 'format' });\n readonly format = computed(\n () => this.formatInput() ?? this.nxeDefaults.numberBox?.format ?? '',\n );\n readonly min = input<number | undefined, unknown>(undefined, { transform: toNumber });\n readonly max = input<number | undefined, unknown>(undefined, { transform: toNumber });\n\n /** dx `showClearButton` — off by default, as in dx; `NXE_DEFAULT_OPTIONS.numberBox` can turn it on app-wide. */\n readonly showClearButtonInput = input<boolean | undefined>(undefined, { alias: 'showClearButton', transform: nxeOptionalBoolean });\n readonly showClearButton = computed(\n () => this.showClearButtonInput() ?? this.nxeDefaults.numberBox?.showClearButton ?? false,\n );\n\n /** Amount of one step (ArrowUp/ArrowDown, spin buttons). Default 1; zero, negative or invalid means 1. */\n readonly step = input<number | undefined, unknown>(undefined, { transform: toNumber });\n /** PageUp/PageDown amount. Default 10 steps. */\n readonly largeStep = input<number | undefined, unknown>(undefined, { transform: toNumber });\n /** Show the increase/decrease buttons after the input. Default off, as in dx. */\n readonly showSpinButtons = input(false, { transform: booleanAttribute });\n /** Keep stepping while a spin button is held down. Default on. */\n readonly holdToRepeat = input(true, { transform: booleanAttribute });\n /** ISO 4217 code: shows `CODE amount` and takes the currency's minor units as precision. */\n readonly currency = input<string | null | undefined>(undefined);\n /** The currency's minor units from reference data; overrides the built-in table. */\n readonly currencyDecimals = input<number | undefined, unknown>(undefined, { transform: toNumber });\n\n readonly focused = signal(false);\n private readonly currencyCode = computed(() => nxeCurrencyCode(this.currency()));\n /** The explicit `format` input only, so a currency does not inherit the app-wide default pattern. */\n private readonly explicitFormat = computed(() => parseNumberFormat(this.formatInput() ?? ''));\n private readonly parsedFormat = computed(() => {\n if (this.currencyCode()) {\n return this.explicitFormat() ?? nxeCurrencyNumberFormat(this.currencyCode(), this.currencyDecimals());\n }\n return parseNumberFormat(this.format());\n });\n private readonly stepAmount = computed(() => {\n const step = this.step();\n return step != null && step > 0 ? step : 1;\n });\n private readonly largeStepAmount = computed(() => {\n const large = this.largeStep();\n return large != null && large > 0 ? large : this.stepAmount() * 10;\n });\n private readonly fieldRef = viewChild.required<ElementRef<HTMLInputElement>>('field');\n\n /** Locale characters, configured once by the application. Defaults to en-US. */\n private readonly separators = inject(NXE_NUMBER_SEPARATORS);\n\n /** The blurred, formatted text of the committed value. */\n private readonly formattedValue = computed(() => {\n if (this.currencyCode()) {\n return formatCurrency(this.value(), this.currencyCode(), this.separators, {\n decimals: this.currencyDecimals(),\n pattern: this.explicitFormat(),\n });\n }\n return formatNumber(this.value(), this.parsedFormat(), this.separators);\n });\n\n /** `aria-valuetext`: the formatted amount, only when a format or currency makes it differ from the number. */\n protected readonly valueText = computed(() =>\n this.value() == null || (!this.currencyCode() && !this.format()) ? null : this.formattedValue(),\n );\n\n readonly displayValue = computed(() => {\n const value = this.value();\n if (this.focused()) {\n // Raw editable text, but with this locale's decimal character: `String(0.125)` gives\n // a JS-style dot, and parseNumber would read that as a group separator and commit 125.\n return value == null ? '' : String(value).replace('.', this.separators.decimal);\n }\n return this.formattedValue();\n });\n\n /** The text in the field right now; dx shows the clear button by the field's emptiness. */\n private readonly fieldText = linkedSignal(() => this.displayValue());\n\n protected readonly clearButtonVisible = computed(\n () => this.showClearButton() && !this.readOnly() && !this.disabled() && this.fieldText() !== '',\n );\n\n protected readonly incrementDisabled = computed(() => {\n const max = this.max();\n return this.readOnly() || this.disabled() || (max != null && (this.value() ?? -Infinity) >= max);\n });\n\n protected readonly decrementDisabled = computed(() => {\n const min = this.min();\n return this.readOnly() || this.disabled() || (min != null && (this.value() ?? Infinity) <= min);\n });\n\n private spinDelay: ReturnType<typeof setTimeout> | undefined;\n private spinTimer: ReturnType<typeof setInterval> | undefined;\n\n constructor() {\n super();\n inject(DestroyRef).onDestroy(() => this.stopSpin());\n }\n\n protected onKeyDownStep(event: KeyboardEvent): void {\n if (event.ctrlKey || event.altKey || event.metaKey || this.readOnly() || this.disabled()) {\n return;\n }\n let amount: number;\n let direction: 1 | -1;\n switch (event.key) {\n case 'ArrowUp':\n [amount, direction] = [this.stepAmount(), 1];\n break;\n case 'ArrowDown':\n [amount, direction] = [this.stepAmount(), -1];\n break;\n case 'PageUp':\n [amount, direction] = [this.largeStepAmount(), 1];\n break;\n case 'PageDown':\n [amount, direction] = [this.largeStepAmount(), -1];\n break;\n default:\n return;\n }\n event.preventDefault();\n this.stepBy(amount, direction, event);\n }\n\n protected onSpinPointerDown(event: PointerEvent, direction: 1 | -1): void {\n if (event.button !== 0 || this.readOnly() || this.disabled()) {\n return;\n }\n // Keep focus (and the typed text) in the input.\n event.preventDefault();\n this.stopSpin();\n if (!this.stepBy(this.stepAmount(), direction, event) || !this.holdToRepeat()) {\n return;\n }\n this.spinDelay = setTimeout(() => {\n this.spinTimer = setInterval(() => {\n if (!this.stepBy(this.stepAmount(), direction, event)) {\n this.stopSpin();\n }\n }, SPIN_REPEAT_INTERVAL);\n }, SPIN_REPEAT_DELAY);\n }\n\n /** Keyboard and assistive-technology activation (`detail` 0); pointer presses stepped on pointerdown. */\n protected onSpinClick(event: MouseEvent, direction: 1 | -1): void {\n if (event.detail === 0) {\n this.stepBy(this.stepAmount(), direction, event);\n }\n }\n\n protected stopSpin(): void {\n clearTimeout(this.spinDelay);\n clearInterval(this.spinTimer);\n this.spinDelay = this.spinTimer = undefined;\n }\n\n /** Step the value; returns false when it did not move (a bound, or nothing to do). */\n private stepBy(amount: number, direction: 1 | -1, event: Event): boolean {\n const field = this.fieldRef().nativeElement;\n // Typed-but-uncommitted text counts as the current value while the field has focus.\n const current = this.focused() ? parseNumber(field.value, this.separators) : this.value();\n let next = stepNumber(current, amount, direction, this.min(), this.max());\n const fmt = this.parsedFormat();\n if (fmt) {\n next = clampNumber(roundHalfAwayFromZero(next, fmt.maxFrac), this.min(), this.max());\n }\n const moved = next !== current;\n this.commitValue(next, event);\n field.value = this.displayValue();\n this.fieldText.set(field.value);\n return moved;\n }\n\n protected onFieldInput(event: Event): void {\n this.fieldText.set((event.target as HTMLInputElement).value);\n }\n\n /**\n * dx `_clearValueHandler`: value to `null`, then focus on the input. The field is emptied by hand\n * too, for typed-but-uncommitted text over a value that was already `null`.\n */\n protected onClear(event: Event): void {\n const field = this.fieldRef().nativeElement;\n this.commitValue(null, event);\n field.value = '';\n this.fieldText.set('');\n if (!this.focused()) {\n field.focus();\n }\n }\n\n protected override commitPending(event: Event | null): void {\n this.commitText(this.fieldRef().nativeElement.value, event);\n }\n\n protected onBlur(event: Event): void {\n this.commitText((event.target as HTMLInputElement).value, event);\n this.focused.set(false);\n this.markAsTouched();\n }\n\n private commitText(text: string, event: Event | null): void {\n let num = parseNumber(text, this.separators);\n if (num != null) {\n const min = this.min();\n const max = this.max();\n if (min != null && num < min) {\n num = min;\n }\n if (max != null && num > max) {\n num = max;\n }\n const fmt = this.parsedFormat();\n if (fmt) {\n num = roundHalfAwayFromZero(num, fmt.maxFrac);\n }\n }\n this.commitValue(num, event);\n }\n}\n","import { Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n ElementRef,\n forwardRef,\n inject,\n input,\n linkedSignal,\n OnDestroy,\n signal,\n TemplateRef,\n viewChild,\n ViewContainerRef,\n ViewEncapsulation,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { DateTime, Info } from 'luxon';\nimport { filter, merge, Subscription } from 'rxjs';\nimport { NxeFormControlBase, nxeOptionalBoolean } from '@nexterajs/ui/core';\nimport { NXE_VALIDATION_TARGET } from '@nexterajs/ui/core';\nimport { nxePane, trackPaneFlip } from '@nexterajs/ui/styling';\nimport {\n buildCalendarWeeks,\n buildPeriodCells,\n formatDisplay,\n NXE_DEFAULT_DATETIME_DISPLAY_FORMAT,\n NXE_DEFAULT_DISPLAY_FORMAT,\n NXE_DEFAULT_TIME_DISPLAY_FORMAT,\n NxeCalendarZoom,\n NxePeriodCell,\n parseDateValue,\n parseDisplay,\n serializeDate,\n} from '@nexterajs/ui/intl';\n\n/** DevExtreme date-box `type`. */\nexport type NxeDateBoxType = 'date' | 'datetime' | 'time';\n\n/** Normalize a `[min]`/`[max]` binding (Date object or serialized string) to a DateTime. */\nfunction toBoundDate(bound: Date | string | null): DateTime | null {\n if (!bound) {\n return null;\n }\n if (bound instanceof Date) {\n const dt = DateTime.fromJSDate(bound);\n return dt.isValid ? dt : null;\n }\n return parseDateValue(bound);\n}\n\n/**\n * `nxe-date-box` — drop-in replacement for DevExtreme `dx-date-box`.\n *\n * A signal-CVA editor (extends {@link NxeFormControlBase}) whose value is the app-wide\n * `\"yyyy-MM-ddTHH:mm:ss\"` string (preserving the global `dateSerializationFormat`). The field is\n * typeable (parsed on blur per `displayFormat`) and opens a CDK-overlay calendar from the icon\n * button. Built on Luxon. Default `displayFormat` is `dd-MMM-yyyy`. Hosts a projected\n * `nxe-validator` via {@link NXE_VALIDATION_TARGET}.\n *\n * `showClearButton` (dx default `false`) adds dx's clear area between the input and the calendar\n * button while the field holds text and is neither read-only nor disabled; it sets the value to\n * `null` and focuses the input.\n *\n * The button and calendar glyphs are drawn in an 18-unit viewBox (1 unit = 1px) to the ink measured\n * off dx's `event` (`date`), `eventall` (`datetime`) and `clock` (`time`) glyphs and its chevrons,\n * each laid out from those metrics in rects, stroked rects and circles, and straight-edged polygons;\n * the templates state each construction.\n */\n@Component({\n selector: 'nxe-date-box',\n standalone: true,\n template: `\n <div class=\"nxe-editor-container\">\n <input\n #field\n class=\"nxe-editor-input nxe-datebox-input\"\n [attr.tabindex]=\"tabIndex()\"\n [id]=\"controlId()\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-invalid]=\"invalidState() ? true : null\"\n [attr.aria-required]=\"required() ? true : null\"\n type=\"text\"\n [value]=\"displayValue()\"\n [readOnly]=\"readOnly()\"\n [disabled]=\"disabled()\"\n [attr.placeholder]=\"effectivePlaceholder() || null\"\n autocomplete=\"off\"\n (input)=\"onFieldInput($event)\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\" />\n @if (clearButtonVisible()) {\n <span\n class=\"nxe-clear-button-area\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"onClear($event)\"\n aria-hidden=\"true\">\n <!-- A Ø16 disc with a 2px × cut out (the dropdown editors' clear glyph). -->\n <svg viewBox=\"0 0 18 18\" focusable=\"false\">\n <path fill-rule=\"evenodd\" transform=\"rotate(45 9 9)\"\n d=\"M9 1a8 8 0 1 1 0 16A8 8 0 1 1 9 1ZM8 3.343h2V8h4.657v2H10v4.657H8V10H3.343V8H8Z\" />\n </svg>\n </span>\n }\n @if (!readOnly()) {\n <span\n class=\"nxe-datebox-button\"\n [class.nxe-datebox-open]=\"opened()\"\n (mousedown)=\"onButtonMousedown($event)\"\n aria-hidden=\"true\">\n @switch (type()) {\n @case ('time') {\n <!-- dx clock, a 16x16 ink box round the box centre: a 2px ring (an r 7\n circle stroked 2px), a 2x4 hand straight up from the centre, a 1.5x4\n hand turned 45° down-right, and a Ø2 hub where they meet. -->\n <svg class=\"nxe-datebox-icon nxe-datebox-icon-time\" viewBox=\"0 0 18 18\" focusable=\"false\">\n <circle cx=\"9\" cy=\"9\" r=\"7\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" />\n <rect x=\"8\" y=\"5\" width=\"2\" height=\"4\" />\n <rect x=\"9\" y=\"8.25\" width=\"4\" height=\"1.5\" transform=\"rotate(45 9 9)\" />\n <circle cx=\"9\" cy=\"9\" r=\"1\" />\n </svg>\n }\n @case ('datetime') {\n <!-- dx eventall: the calendar page below, without its day marker. -->\n <svg class=\"nxe-datebox-icon nxe-datebox-icon-datetime\" viewBox=\"0 0 18 18\" focusable=\"false\">\n <rect x=\"3\" y=\"3\" width=\"12\" height=\"12\" rx=\"1\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" />\n <rect x=\"3\" y=\"3\" width=\"12\" height=\"3\" />\n <rect x=\"4\" y=\"1\" width=\"2\" height=\"1.5\" />\n <rect x=\"12\" y=\"1\" width=\"2\" height=\"1.5\" />\n </svg>\n }\n @default {\n <!-- dx event, a 14x15 ink box from 1px below the top of the 18px box\n (where dx's glyph renders): the page is a 12x12 rect with 1px corners\n stroked 2px, so 14x14 with 2px corners outside and square inside; a\n 12x3 bar under its top wall makes the 4px header band; two 2x1.5\n binder tabs stand 1px proud of it; a 4x4 day marker at (9, 9). -->\n <svg class=\"nxe-datebox-icon nxe-datebox-icon-date\" viewBox=\"0 0 18 18\" focusable=\"false\">\n <rect x=\"3\" y=\"3\" width=\"12\" height=\"12\" rx=\"1\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" />\n <rect x=\"3\" y=\"3\" width=\"12\" height=\"3\" />\n <rect x=\"4\" y=\"1\" width=\"2\" height=\"1.5\" />\n <rect x=\"12\" y=\"1\" width=\"2\" height=\"1.5\" />\n <rect x=\"9\" y=\"9\" width=\"4\" height=\"4\" />\n </svg>\n }\n }\n </span>\n }\n </div>\n <ng-content />\n @if (validationError(); as error) {\n @if (focused()) {\n <div class=\"nxe-invalid-message\">{{ error }}</div>\n }\n }\n\n <ng-template #calendarTemplate>\n <div class=\"nxe-calendar\" (mousedown)=\"$event.preventDefault()\">\n @if (type() !== 'time') {\n <div class=\"nxe-calendar-navigator\">\n <button type=\"button\" class=\"nxe-calendar-nav\" (click)=\"navigate(-1)\">\n <!-- dx chevronleft (8x14 ink, centred in its 18px box): two 45° arms\n whose outer edges run 7px out and 7px up and down from the point,\n their ends cut square 1.25px across and down (a 1.77px stroke),\n meeting 2.5px behind it. That draws 8.25x14, centred by putting the\n point at x 4.875, and rasterises to dx's 8x14. -->\n <svg class=\"nxe-calendar-chevron\" viewBox=\"0 0 18 18\" focusable=\"false\">\n <polygon points=\"4.875 9 11.875 2 13.125 3.25 7.375 9 13.125 14.75 11.875 16\" />\n </svg>\n </button>\n <button type=\"button\" class=\"nxe-calendar-caption\" (click)=\"zoomOut()\">\n {{ caption() }}\n </button>\n <button type=\"button\" class=\"nxe-calendar-nav\" (click)=\"navigate(1)\">\n <!-- dx chevronright: the same chevron mirrored about x 9. -->\n <svg class=\"nxe-calendar-chevron\" viewBox=\"0 0 18 18\" focusable=\"false\">\n <polygon points=\"13.125 9 6.125 2 4.875 3.25 10.625 9 4.875 14.75 6.125 16\" />\n </svg>\n </button>\n </div>\n @if (zoomLevel() === 'month') {\n <div class=\"nxe-calendar-weekdays\">\n @for (wd of weekdays(); track $index) {\n <span>{{ wd }}</span>\n }\n </div>\n <div class=\"nxe-calendar-grid\">\n @for (week of weeks(); track $index) {\n @for (day of week; track day.toMillis()) {\n <button\n type=\"button\"\n class=\"nxe-calendar-day\"\n [class.nxe-calendar-other]=\"day.month !== viewMonth().month\"\n [class.nxe-calendar-selected]=\"isSelected(day)\"\n [class.nxe-calendar-today]=\"isToday(day)\"\n [disabled]=\"isDisabledDay(day)\"\n (click)=\"selectDay(day)\">\n <span>{{ day.day }}</span>\n </button>\n }\n }\n </div>\n } @else {\n <div\n class=\"nxe-calendar-periods\"\n [class.nxe-calendar-periods-century]=\"zoomLevel() === 'century'\">\n @for (cell of periodCells(); track cell.anchor.toMillis()) {\n <button\n type=\"button\"\n class=\"nxe-calendar-period\"\n [class.nxe-calendar-other]=\"cell.other\"\n [class.nxe-calendar-today]=\"cell.isNow\"\n [disabled]=\"cell.disabled\"\n (click)=\"selectPeriod(cell)\">\n <span>{{ cell.label }}</span>\n </button>\n }\n </div>\n }\n }\n @if (type() !== 'date') {\n <div class=\"nxe-calendar-time\">\n <input\n class=\"nxe-calendar-time-part\"\n type=\"text\"\n inputmode=\"numeric\"\n maxlength=\"2\"\n [attr.aria-label]=\"nxeMessages.t('date.hour')\"\n [value]=\"hourText()\"\n (change)=\"setTimePart('hour', $event)\" />\n <span class=\"nxe-calendar-time-sep\" aria-hidden=\"true\">:</span>\n <input\n class=\"nxe-calendar-time-part\"\n type=\"text\"\n inputmode=\"numeric\"\n maxlength=\"2\"\n [attr.aria-label]=\"nxeMessages.t('date.minute')\"\n [value]=\"minuteText()\"\n (change)=\"setTimePart('minute', $event)\" />\n <button type=\"button\" class=\"nxe-calendar-time-btn\" (click)=\"setNow()\">{{ nxeMessages.t('date.now') }}</button>\n <button type=\"button\" class=\"nxe-calendar-time-btn nxe-calendar-time-done\" (click)=\"close()\">\n {{ nxeMessages.t('date.done') }}\n </button>\n </div>\n }\n </div>\n </ng-template>\n `,\n styleUrl: './nxe-date-box.component.scss',\n host: {\n class: 'nxe-widget nxe-editor nxe-datebox',\n '[class.nxe-focused]': 'focused()',\n '[class.nxe-invalid]': 'invalidState()',\n },\n providers: [\n { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => NxeDateBoxComponent), multi: true },\n { provide: NXE_VALIDATION_TARGET, useExisting: forwardRef(() => NxeDateBoxComponent) },\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class NxeDateBoxComponent extends NxeFormControlBase<string> implements OnDestroy {\n private readonly overlay = inject(Overlay);\n private readonly viewContainerRef = inject(ViewContainerRef);\n private readonly calendarTemplate = viewChild.required<TemplateRef<unknown>>('calendarTemplate');\n private readonly fieldRef = viewChild.required<ElementRef<HTMLInputElement>>('field');\n\n readonly type = input<NxeDateBoxType>('date');\n /* Undefined rather than a literal default, so the default can follow `type`. Additive: no call\n site passes either input, and one that does still wins. */\n readonly displayFormat = input<string | undefined>(undefined);\n readonly placeholder = input<string | undefined>(undefined);\n /** DevExtreme `[min]`/`[max]` bounds: calendar days outside are disabled, typed values clamp. */\n readonly min = input<Date | string | null>(null);\n readonly max = input<Date | string | null>(null);\n /** dx `showClearButton` — off by default, as in dx; `NXE_DEFAULT_OPTIONS.dateBox` can turn it on app-wide. */\n readonly showClearButtonInput = input<boolean | undefined>(undefined, { alias: 'showClearButton', transform: nxeOptionalBoolean });\n readonly showClearButton = computed(\n () => this.showClearButtonInput() ?? this.nxeDefaults.dateBox?.showClearButton ?? false,\n );\n\n readonly focused = signal(false);\n readonly opened = signal(false);\n readonly viewMonth = signal<DateTime>(DateTime.now().startOf('month'));\n /** Calendar zoom level; caption clicks zoom out, cell picks zoom back in (dx-calendar parity). */\n readonly zoomLevel = signal<NxeCalendarZoom>('month');\n /** Short weekday names for the active locale, Sunday first (the grid below starts on Sunday). */\n readonly weekdays = computed(() => {\n const monday = Info.weekdays('short', { locale: this.nxeMessages.locale() });\n return [monday[6], ...monday.slice(0, 6)];\n });\n\n /** The format actually used, from `displayFormat` or the default for this `type`. */\n readonly effectiveDisplayFormat = computed(() => {\n const stated = this.displayFormat() ?? this.nxeDefaults.dateBox?.displayFormat;\n if (stated) {\n return stated;\n }\n switch (this.type()) {\n case 'time':\n return NXE_DEFAULT_TIME_DISPLAY_FORMAT;\n case 'datetime':\n return NXE_DEFAULT_DATETIME_DISPLAY_FORMAT;\n default:\n return NXE_DEFAULT_DISPLAY_FORMAT;\n }\n });\n /** dx's default placeholder is '', but orbit's global default is the format itself. */\n readonly effectivePlaceholder = computed(\n () =>\n this.placeholder() ?? this.nxeDefaults.dateBox?.placeholder ?? this.effectiveDisplayFormat(),\n );\n\n /** The value as a Luxon date in the active locale, so `MMM` and `MMMM` follow the language. */\n private readonly selected = computed(() =>\n parseDateValue(this.value())?.setLocale(this.nxeMessages.locale()) ?? null,\n );\n readonly displayValue = computed(() => formatDisplay(this.selected(), this.effectiveDisplayFormat()));\n\n /** The text in the field right now; dx shows the clear button by the field's emptiness. */\n private readonly fieldText = linkedSignal(() => this.displayValue());\n\n protected readonly clearButtonVisible = computed(\n () => this.showClearButton() && !this.readOnly() && !this.disabled() && this.fieldText() !== '',\n );\n readonly weeks = computed(() => buildCalendarWeeks(this.viewMonth()));\n\n /** Two-digit hour/minute for the popup's time strip; blank when nothing is selected. */\n readonly hourText = computed(() => this.selected()?.toFormat('HH') ?? '');\n readonly minuteText = computed(() => this.selected()?.toFormat('mm') ?? '');\n\n /**\n * The field's text as it stood when focus arrived. `onBlur` compares against it and commits\n * nothing when the user only tabbed through — see the comment there.\n */\n private textAtFocus = '';\n\n readonly caption = computed(() => {\n const view = this.viewMonth().setLocale(this.nxeMessages.locale());\n switch (this.zoomLevel()) {\n case 'month':\n return view.toFormat('MMMM yyyy');\n case 'year':\n return view.toFormat('yyyy');\n case 'decade': {\n const start = view.year - (view.year % 10);\n return `${start}-${start + 9}`;\n }\n case 'century': {\n const start = view.year - (view.year % 100);\n return `${start}-${start + 99}`;\n }\n }\n });\n\n readonly periodCells = computed(() => {\n const zoom = this.zoomLevel();\n if (zoom === 'month') {\n return [];\n }\n const now = DateTime.now();\n const min = this.minDate();\n const max = this.maxDate();\n const span = zoom === 'year' ? { months: 1 } : zoom === 'decade' ? { years: 1 } : { years: 10 };\n return buildPeriodCells(zoom, this.viewMonth().setLocale(this.nxeMessages.locale())).map((cell) => {\n const end = cell.anchor.plus(span).minus({ days: 1 }).endOf('day');\n return {\n ...cell,\n isNow: now >= cell.anchor && now <= end,\n disabled: (!!min && end < min.startOf('day')) || (!!max && cell.anchor > max.endOf('day')),\n };\n });\n });\n\n private readonly minDate = computed(() => toBoundDate(this.min()));\n private readonly maxDate = computed(() => toBoundDate(this.max()));\n\n protected isDisabledDay(day: DateTime): boolean {\n const min = this.minDate();\n const max = this.maxDate();\n return (!!min && day.startOf('day') < min.startOf('day')) || (!!max && day.startOf('day') > max.startOf('day'));\n }\n\n private clampToBounds(dt: DateTime): DateTime {\n const min = this.minDate();\n const max = this.maxDate();\n if (min && dt < min.startOf('day')) return min.startOf('day');\n /* Land on the bound's DAY but keep the value's own time. Returning max.startOf('day') would\n silently zero an 18:00 whenever the entry ran past the bound — invisible for a date-only\n field, and a wiped time for a datetime one. */\n if (max && dt > max.endOf('day')) {\n return max.startOf('day').set({ hour: dt.hour, minute: dt.minute, second: dt.second });\n }\n return dt;\n }\n\n private overlayRef?: OverlayRef;\n private closeSub?: Subscription;\n private flipSub?: Subscription;\n\n protected isSelected(day: DateTime): boolean {\n const sel = this.selected();\n return !!sel && day.hasSame(sel, 'day');\n }\n\n protected isToday(day: DateTime): boolean {\n return day.hasSame(DateTime.now(), 'day');\n }\n\n protected navigate(delta: number): void {\n const months = { month: 1, year: 12, decade: 120, century: 1200 }[this.zoomLevel()];\n this.viewMonth.update((m) => m.plus({ months: months * delta }));\n }\n\n protected zoomOut(): void {\n const next = { month: 'year', year: 'decade', decade: 'century' } as const;\n const zoom = this.zoomLevel();\n if (zoom !== 'century') {\n this.zoomLevel.set(next[zoom]);\n }\n }\n\n protected selectPeriod(cell: NxePeriodCell & { disabled: boolean }): void {\n if (cell.disabled) {\n return;\n }\n const previous = { year: 'month', decade: 'year', century: 'decade' } as const;\n this.viewMonth.set(cell.anchor.startOf('month'));\n this.zoomLevel.set(previous[this.zoomLevel() as Exclude<NxeCalendarZoom, 'month'>]);\n }\n\n protected onButtonMousedown(event: Event): void {\n // Keep field focus (avoid a blur-driven re-commit) and toggle the calendar.\n event.preventDefault();\n if (this.disabled() || this.readOnly()) {\n return;\n }\n this.opened() ? this.close() : this.open();\n }\n\n protected onFieldInput(event: Event): void {\n this.fieldText.set((event.target as HTMLInputElement).value);\n }\n\n /**\n * dx `_clearValueHandler`: value to `null` (dx's `clear()` for a date box), then focus on the\n * input. `syncField` repaints the field, so typed-but-uncommitted text over a value that was\n * already `null` goes too.\n */\n protected onClear(event: Event): void {\n this.commitValue(null, event);\n this.syncField();\n if (!this.focused()) {\n this.fieldRef().nativeElement.focus();\n }\n }\n\n protected onFocus(event: Event): void {\n this.textAtFocus = (event.target as HTMLInputElement).value;\n this.focused.set(true);\n }\n\n /**\n * Commit what the user TYPED — and nothing when they typed nothing.\n *\n * The unchanged-text guard is load-bearing, not an optimization. `displayFormat` renders a\n * strict subset of the stored value: `dd-MMM-yyyy` shows `2026-08-12T09:00:00` as `12-Aug-2026`,\n * and re-parsing that yields midnight. This method used to commit unconditionally, so simply\n * focusing and tabbing past a field rewrote 09:00 to 00:00 and 09:30:45 to 09:30:00 — silently,\n * because `commitValue` only no-ops on an identical string and these differ. Latent while\n * nothing rendered a time; straight data loss the moment `type=\"datetime\"` exists.\n *\n * A rejected entry keeps the previous value and repaints the field. The repaint is required:\n * `[value]` is still bound to the same `displayValue()` Angular last wrote, so it will not\n * re-render on its own and the unparseable text would sit there looking accepted.\n */\n protected onBlur(event: Event): void {\n const element = event.target as HTMLInputElement;\n /* Read before clearing: it doubles as \"we captured a baseline this focus cycle\". A blur with\n no preceding focus cannot happen to a real user — browsers always fire focus first — so\n the only sequence that reaches the fall-through is a synthetic one, where the old\n parse-everything behaviour is both harmless and what the existing specs assert. */\n const hadBaseline = this.focused();\n this.focused.set(false);\n this.markAsTouched();\n this.commitTypedText(element, hadBaseline, event);\n }\n\n /** Enter commits what was typed, before a surrounding form submits; nothing typed means nothing to do. */\n protected override commitPending(event: Event | null): void {\n if (this.focused()) {\n this.commitTypedText(this.fieldRef().nativeElement, true, event);\n }\n }\n\n private commitTypedText(element: HTMLInputElement, hadBaseline: boolean, event: Event | null): void {\n if (hadBaseline && element.value === this.textAtFocus) {\n return;\n }\n if (!element.value.trim()) {\n this.commitValue(null, event);\n this.syncField();\n return;\n }\n\n const dt = parseDisplay(element.value, this.effectiveDisplayFormat(), this.selected(), this.nxeMessages.locale());\n if (dt) {\n this.commitValue(serializeDate(this.clampToBounds(dt)), event);\n }\n this.syncField();\n }\n\n /**\n * Repaint the field from the committed value and re-baseline {@link textAtFocus}.\n *\n * Called after every non-typed commit as well, so a later blur cannot replay stale typed text\n * over a value the popup has since changed.\n */\n private syncField(): void {\n const element = this.fieldRef().nativeElement;\n element.value = this.displayValue();\n this.textAtFocus = element.value;\n this.fieldText.set(element.value);\n }\n\n protected selectDay(day: DateTime): void {\n if (this.isDisabledDay(day)) {\n return;\n }\n let dt = day.startOf('day');\n if (this.type() === 'datetime') {\n const base = this.selected();\n if (base) {\n dt = dt.set({ hour: base.hour, minute: base.minute, second: base.second });\n }\n }\n this.commitValue(serializeDate(dt), null);\n this.syncField();\n /* Only a plain date picker is finished at this point. In datetime mode the time strip is\n the other half of the job, and closing here would put it out of reach. */\n if (this.type() === 'date') {\n this.close();\n }\n }\n\n /**\n * Commit one part of the time from the popup strip.\n *\n * Writes straight through to the value rather than holding a draft: `selectDay` already commits\n * immediately, the component keeps no other pending state, and a stray backdrop click must not\n * discard a time the user has just set. dx buffers behind OK/Cancel; this is the divergence.\n */\n protected setTimePart(part: 'hour' | 'minute', event: Event): void {\n const element = event.target as HTMLInputElement;\n const typed = Number.parseInt(element.value, 10);\n const base = this.selected() ?? DateTime.now().startOf('day');\n const ceiling = part === 'hour' ? 23 : 59;\n const next = Number.isNaN(typed) ? base[part] : Math.min(Math.max(typed, 0), ceiling);\n\n this.commitValue(serializeDate(base.set({ [part]: next })), event);\n this.syncField();\n /* Same non-repaint hazard as onBlur: when the clamp lands back on the value already held,\n the [value] binding is unchanged and `7` would stay on screen instead of `07`. */\n element.value = part === 'hour' ? this.hourText() : this.minuteText();\n }\n\n protected setNow(): void {\n const now = DateTime.now();\n const base = this.selected() ?? now;\n this.commitValue(serializeDate(base.set({ hour: now.hour, minute: now.minute, second: 0 })), null);\n this.syncField();\n }\n\n private open(): void {\n this.viewMonth.set((this.selected() ?? DateTime.now()).startOf('month'));\n this.zoomLevel.set('month');\n if (!this.overlayRef) {\n this.overlayRef = this.overlay.create({\n positionStrategy: this.overlay\n .position()\n .flexibleConnectedTo(this.elementRef)\n .withPositions([\n { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },\n { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom' },\n ]),\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n hasBackdrop: true,\n backdropClass: 'cdk-overlay-transparent-backdrop',\n panelClass: nxePane('nxe-datebox-pane'),\n });\n this.flipSub = trackPaneFlip(this.overlayRef);\n }\n if (this.overlayRef.hasAttached()) {\n return;\n }\n this.overlayRef.attach(new TemplatePortal(this.calendarTemplate(), this.viewContainerRef));\n this.closeSub = merge(\n this.overlayRef.backdropClick(),\n this.overlayRef.keydownEvents().pipe(filter((e) => e.key === 'Escape')),\n ).subscribe(() => this.close());\n this.opened.set(true);\n }\n\n /** Protected, not private: the time strip's Done button closes the popup from the template. */\n protected close(): void {\n if (!this.overlayRef?.hasAttached()) {\n return;\n }\n this.overlayRef.detach();\n this.closeSub?.unsubscribe();\n this.flipSub?.unsubscribe();\n this.opened.set(false);\n this.markAsTouched();\n }\n\n ngOnDestroy(): void {\n this.closeSub?.unsubscribe();\n this.flipSub?.unsubscribe();\n this.overlayRef?.dispose();\n }\n}\n","import { InjectionToken } from '@angular/core';\r\nimport type { NxeMessageKey } from '@nexterajs/ui/core';\r\nimport { DateTime } from 'luxon';\r\n\r\n/**\r\n * The value of `nxe-date-range-box`. Each end is a string in the box's `valueFormat`\r\n * (`yyyy-MM-dd` unless stated), or `null` while that end is empty. A box with neither end set holds\r\n * `null`, not an object of two nulls, so `Validators.required` means what it says.\r\n */\r\nexport interface NxeDateRange {\r\n start: string | null;\r\n end: string | null;\r\n}\r\n\r\n/** A date a preset may return: a string in any format `nxe-date-box` accepts, a `Date` or a Luxon `DateTime`. */\r\nexport type NxeDateRangeBound = string | Date | DateTime;\r\n\r\n/** What a preset's `range` returns. The box serializes it in its own `valueFormat`. */\r\nexport interface NxeDateRangeBounds {\r\n start: NxeDateRangeBound | null;\r\n end: NxeDateRangeBound | null;\r\n}\r\n\r\n/** One entry of the box's quick-range list. */\r\nexport interface NxeDateRangePreset {\r\n /** The text of the entry. Wins over `labelKey`. */\r\n label?: string;\r\n /** A message key for the entry, so the label follows the active language. */\r\n labelKey?: NxeMessageKey;\r\n /**\r\n * The range, computed when the entry is chosen. `now` is the box's clock (see\r\n * {@link NXE_DATE_RANGE_NOW}), so a preset needs no clock of its own and a test can fix it.\r\n */\r\n range(now: DateTime): NxeDateRangeBounds;\r\n}\r\n\r\n/**\r\n * The clock the box reads for \"today\": the highlighted day, where the popup opens and what the\r\n * built-in presets count back from. Provide a fixed one in a test:\r\n *\r\n * ```ts\r\n * { provide: NXE_DATE_RANGE_NOW, useValue: () => DateTime.fromISO('2026-10-07T09:30:00') }\r\n * ```\r\n */\r\nexport const NXE_DATE_RANGE_NOW = new InjectionToken<() => DateTime>('NXE_DATE_RANGE_NOW', {\r\n providedIn: 'root',\r\n factory: () => () => DateTime.now(),\r\n});\r\n\r\n/** Default `displayFormat`: `1 Okt 2026` in Indonesian, `1 Oct 2026` in English. */\r\nexport const NXE_DATE_RANGE_DISPLAY_FORMAT = 'd MMM yyyy';\r\n/** Default `valueFormat`: date-only. */\r\nexport const NXE_DATE_RANGE_VALUE_FORMAT = 'yyyy-MM-dd';\r\n\r\n/**\r\n * The built-in presets. Each call returns a fresh entry whose label comes from the message bundle\r\n * and whose range counts from the box's clock. Weeks are not offered: the first day of the week is\r\n * a locale question this library does not decide.\r\n */\r\nexport const nxeDateRangePresets = {\r\n today: (): NxeDateRangePreset => ({\r\n labelKey: 'dateRange.preset.today',\r\n range: (now) => ({ start: now.startOf('day'), end: now.startOf('day') }),\r\n }),\r\n yesterday: (): NxeDateRangePreset => ({\r\n labelKey: 'dateRange.preset.yesterday',\r\n range: (now) => {\r\n const day = now.startOf('day').minus({ days: 1 });\r\n return { start: day, end: day };\r\n },\r\n }),\r\n /** Today and the six days before it. */\r\n last7Days: (): NxeDateRangePreset => ({\r\n labelKey: 'dateRange.preset.last7Days',\r\n range: (now) => ({ start: now.startOf('day').minus({ days: 6 }), end: now.startOf('day') }),\r\n }),\r\n /** Today and the 29 days before it. */\r\n last30Days: (): NxeDateRangePreset => ({\r\n labelKey: 'dateRange.preset.last30Days',\r\n range: (now) => ({ start: now.startOf('day').minus({ days: 29 }), end: now.startOf('day') }),\r\n }),\r\n /** The first of the month to its last day (not to today). */\r\n thisMonth: (): NxeDateRangePreset => ({\r\n labelKey: 'dateRange.preset.thisMonth',\r\n range: (now) => ({ start: now.startOf('month'), end: now.endOf('month').startOf('day') }),\r\n }),\r\n lastMonth: (): NxeDateRangePreset => ({\r\n labelKey: 'dateRange.preset.lastMonth',\r\n range: (now) => {\r\n const last = now.minus({ months: 1 });\r\n return { start: last.startOf('month'), end: last.endOf('month').startOf('day') };\r\n },\r\n }),\r\n /** 1 January to 31 December. */\r\n thisYear: (): NxeDateRangePreset => ({\r\n labelKey: 'dateRange.preset.thisYear',\r\n range: (now) => ({ start: now.startOf('year'), end: now.endOf('year').startOf('day') }),\r\n }),\r\n /** All seven, in the order above. */\r\n all: (): NxeDateRangePreset[] => [\r\n nxeDateRangePresets.today(),\r\n nxeDateRangePresets.yesterday(),\r\n nxeDateRangePresets.last7Days(),\r\n nxeDateRangePresets.last30Days(),\r\n nxeDateRangePresets.thisMonth(),\r\n nxeDateRangePresets.lastMonth(),\r\n nxeDateRangePresets.thisYear(),\r\n ],\r\n};\r\n","import { CdkTrapFocus } from '@angular/cdk/a11y';\nimport { BreakpointObserver } from '@angular/cdk/layout';\nimport { Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport {\n afterNextRender,\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n ElementRef,\n forwardRef,\n inject,\n Injector,\n input,\n OnDestroy,\n signal,\n TemplateRef,\n viewChild,\n ViewContainerRef,\n ViewEncapsulation,\n} from '@angular/core';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { DateTime, Info } from 'luxon';\nimport { filter, map, merge, Subscription } from 'rxjs';\nimport { NXE_VALIDATION_TARGET, NxeFormControlBase } from '@nexterajs/ui/core';\nimport { buildCalendarWeeks, formatDisplay, parseDateValue, parseDisplay } from '@nexterajs/ui/intl';\nimport { nxePane, trackPaneFlip } from '@nexterajs/ui/styling';\nimport {\n NXE_DATE_RANGE_DISPLAY_FORMAT,\n NXE_DATE_RANGE_NOW,\n NXE_DATE_RANGE_VALUE_FORMAT,\n type NxeDateRange,\n type NxeDateRangeBound,\n type NxeDateRangePreset,\n} from './nxe-date-range';\n\n/** Below this width the popup shows one month and stacks the presets above it. */\nconst NARROW_QUERY = '(max-width: 719.98px)';\n\nlet rangeBoxSequence = 0;\n\n/** One day in a month grid, with everything the template needs to draw and label it. */\ninterface RangeDayCell {\n readonly date: DateTime;\n /** `yyyy-MM-dd`: the cell's `data-date`, and a string that sorts as a date does. */\n readonly key: string;\n readonly day: number;\n readonly label: string;\n readonly disabled: boolean;\n readonly today: boolean;\n readonly start: boolean;\n readonly end: boolean;\n readonly inRange: boolean;\n /** Drawn from the hover or keyboard preview, not from the committed value. */\n readonly preview: boolean;\n readonly tabbable: boolean;\n}\n\ninterface RangeMonthView {\n readonly key: string;\n readonly caption: string;\n /** Weeks of the month; `null` is a day of a neighbouring month, drawn as a gap. */\n readonly weeks: readonly (readonly (RangeDayCell | null)[])[];\n}\n\ninterface RangePresetItem {\n readonly index: number;\n readonly label: string;\n readonly active: boolean;\n}\n\nfunction toBound(bound: Date | string | null): DateTime | null {\n if (!bound) {\n return null;\n }\n return parseDateValue(bound)?.startOf('day') ?? null;\n}\n\nfunction dayKey(dt: DateTime): string {\n return dt.toFormat('yyyy-MM-dd');\n}\n\n/**\n * `nxe-date-range-box` picks a start and an end date in one field.\n *\n * ```html\n * <nxe-form-field label=\"Tanggal PO\">\n * <nxe-date-range-box formControlName=\"poDate\" [presets]=\"presets\" min=\"2020-01-01\" />\n * </nxe-form-field>\n * ```\n *\n * The value is `{ start, end }`, each a string in `valueFormat` (`yyyy-MM-dd` by default; with a time\n * format the start is the first second of its day and the end the last), `null` while that end is\n * empty, and `null` as a whole when both are. The field shows `1 Okt 2026 - 31 Okt 2026` and opens\n * a popup: two months side by side (one under 720px), a quick-range list, and a typed input for each\n * end. The first click picks the start, the second the end; the days in between preview under the\n * pointer, and a second click before the first swaps the two.\n *\n * Month and weekday names follow the active language of `NxeMessageService`. The field is a\n * read-only combobox, so a label, `aria-invalid` and `aria-describedby` from `nxe-form-field` reach\n * it; the popup is a dialog with the days in an ARIA grid (arrows, Home and End by week, PageUp and\n * PageDown by month, Enter or Space to pick, Esc closes and returns focus to the field).\n */\n@Component({\n selector: 'nxe-date-range-box',\n templateUrl: './nxe-date-range-box.component.html',\n styleUrl: './nxe-date-range-box.component.scss',\n imports: [CdkTrapFocus],\n host: {\n class: 'nxe-widget nxe-editor nxe-daterangebox',\n '[class.nxe-focused]': 'focused()',\n '[class.nxe-invalid]': 'invalidState()',\n },\n providers: [\n { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => NxeDateRangeBoxComponent), multi: true },\n { provide: NXE_VALIDATION_TARGET, useExisting: forwardRef(() => NxeDateRangeBoxComponent) },\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class NxeDateRangeBoxComponent extends NxeFormControlBase<NxeDateRange> implements OnDestroy {\n private readonly overlay = inject(Overlay);\n private readonly viewContainerRef = inject(ViewContainerRef);\n private readonly injector = inject(Injector);\n private readonly clock = inject(NXE_DATE_RANGE_NOW);\n private readonly breakpoints = inject(BreakpointObserver);\n private readonly popupTemplate = viewChild.required<TemplateRef<unknown>>('popupTemplate');\n private readonly fieldRef = viewChild.required<ElementRef<HTMLInputElement>>('field');\n\n /** How the dates read in the field and in the typed inputs: a Luxon format. */\n readonly displayFormat = input<string>(NXE_DATE_RANGE_DISPLAY_FORMAT);\n /** How each end is written to the value. Date-only unless it carries time tokens. */\n readonly valueFormat = input<string>(NXE_DATE_RANGE_VALUE_FORMAT);\n /** Days before this are disabled, and a typed or preset date before it moves to it. */\n readonly min = input<Date | string | null>(null);\n /** Days after this are disabled, and a typed or preset date after it moves to it. */\n readonly max = input<Date | string | null>(null);\n /** The quick-range list. Empty draws none. See `nxeDateRangePresets` for the built-in ones. */\n readonly presets = input<readonly NxeDateRangePreset[]>([]);\n /** Shown in the field and the start input while the start is empty. Defaults to the message bundle's. */\n readonly startPlaceholder = input<string | undefined>(undefined);\n /** Shown in the field and the end input while the end is empty. Defaults to the message bundle's. */\n readonly endPlaceholder = input<string | undefined>(undefined);\n /** The clear area in the field. On by default: a filter is cleared more often than a form field. */\n readonly showClearButton = input(true, { transform: booleanAttribute });\n\n protected readonly focused = signal(false);\n /** Whether the popup is showing. */\n readonly opened = signal(false);\n\n private readonly uid = `nxe-daterange-${++rangeBoxSequence}`;\n protected readonly popupId = `${this.uid}-popup`;\n\n protected readonly isNarrow = toSignal(this.breakpoints.observe(NARROW_QUERY).pipe(map((state) => state.matches)), {\n initialValue: this.breakpoints.isMatched(NARROW_QUERY),\n });\n protected readonly monthsShown = computed(() => (this.isNarrow() ? 1 : 2));\n\n private readonly locale = computed(() => this.nxeMessages.locale());\n private readonly minDate = computed(() => toBound(this.min()));\n private readonly maxDate = computed(() => toBound(this.max()));\n\n /** The committed value as days in the active locale. */\n protected readonly range = computed(() => {\n const value = this.value();\n const locale = this.locale();\n return {\n start: parseDateValue(value?.start)?.startOf('day').setLocale(locale) ?? null,\n end: parseDateValue(value?.end)?.startOf('day').setLocale(locale) ?? null,\n };\n });\n\n protected readonly startText = computed(() => formatDisplay(this.range().start, this.displayFormat(), this.locale()));\n protected readonly endText = computed(() => formatDisplay(this.range().end, this.displayFormat(), this.locale()));\n protected readonly startHint = computed(() => this.startPlaceholder() ?? this.nxeMessages.t('dateRange.startPlaceholder'));\n protected readonly endHint = computed(() => this.endPlaceholder() ?? this.nxeMessages.t('dateRange.endPlaceholder'));\n\n /** `1 Okt 2026 - 31 Okt 2026`; an empty end leaves the dash hanging so a half-set range reads as one. */\n protected readonly displayValue = computed(() => {\n const start = this.startText();\n const end = this.endText();\n return start || end ? `${start} – ${end}`.trim() : '';\n });\n protected readonly fieldPlaceholder = computed(() => `${this.startHint()} – ${this.endHint()}`);\n protected readonly clearButtonVisible = computed(\n () => this.showClearButton() && !this.readOnly() && !this.disabled() && this.displayValue() !== '',\n );\n\n // --- popup state ---\n\n /** The first click of a range in progress; null when none is. */\n protected readonly draftStart = signal<DateTime | null>(null);\n /** The day under the pointer or the keyboard while a range is in progress. */\n protected readonly hovered = signal<DateTime | null>(null);\n /** The day the grid's single tab stop is on. */\n private readonly activeDate = signal<DateTime>(DateTime.now());\n /** The first month shown. */\n protected readonly viewMonth = signal<DateTime>(DateTime.now().startOf('month'));\n\n protected readonly weekdays = computed(() => {\n const locale = this.locale();\n const short = Info.weekdays('short', { locale });\n const long = Info.weekdays('long', { locale });\n // Luxon starts on Monday; the grid starts on Sunday, as nxe-date-box's does.\n return [{ short: short[6], long: long[6] }, ...short.slice(0, 6).map((s, i) => ({ short: s, long: long[i] }))];\n });\n\n private readonly presetResults = computed(() => {\n const now = this.clock().setLocale(this.locale());\n return this.presets().map((preset) => {\n const bounds = preset.range(now);\n return {\n label: preset.label ?? (preset.labelKey ? this.nxeMessages.t(preset.labelKey) : ''),\n start: this.clampDay(this.toDay(bounds.start)),\n end: this.clampDay(this.toDay(bounds.end)),\n };\n });\n });\n\n protected readonly presetItems = computed<RangePresetItem[]>(() => {\n const { start, end } = this.range();\n return this.presetResults().map((preset, index) => ({\n index,\n label: preset.label,\n active:\n !!start &&\n !!end &&\n !!preset.start &&\n !!preset.end &&\n dayKey(preset.start) === dayKey(start) &&\n dayKey(preset.end) === dayKey(end),\n }));\n });\n\n /** The key of the grid's tab stop: the active day while it is on screen, else the first day shown. */\n private readonly tabKey = computed(() => {\n const first = this.viewMonth().startOf('month');\n const last = first.plus({ months: this.monthsShown() - 1 }).endOf('month');\n const active = this.activeDate();\n return active >= first && active <= last ? dayKey(active) : dayKey(first);\n });\n\n protected readonly months = computed<RangeMonthView[]>(() => {\n const locale = this.locale();\n const today = dayKey(this.clock());\n const min = this.minDate();\n const max = this.maxDate();\n const tabKey = this.tabKey();\n const draft = this.draftStart();\n const hover = this.hovered();\n\n let low: DateTime | null;\n let high: DateTime | null;\n if (draft) {\n low = draft;\n high = hover ?? draft;\n if (high < low) {\n [low, high] = [high, low];\n }\n } else {\n const { start, end } = this.range();\n low = start ?? end;\n high = end ?? start;\n }\n const lowKey = low ? dayKey(low) : null;\n const highKey = high ? dayKey(high) : null;\n\n return Array.from({ length: this.monthsShown() }, (_, offset) => {\n const month = this.viewMonth().plus({ months: offset }).setLocale(locale);\n const weeks = buildCalendarWeeks(month)\n .map((week) =>\n week.map((day): RangeDayCell | null => {\n if (day.month !== month.month) {\n return null;\n }\n const key = dayKey(day);\n return {\n date: day,\n key,\n day: day.day,\n label: day.setLocale(locale).toLocaleString(DateTime.DATE_FULL),\n disabled: (!!min && day < min) || (!!max && day > max),\n today: key === today,\n start: key === lowKey,\n end: key === highKey,\n inRange: !!lowKey && !!highKey && key >= lowKey && key <= highKey,\n preview: !!draft,\n tabbable: key === tabKey,\n };\n }),\n )\n .filter((week) => week.some((cell) => cell !== null));\n return { key: dayKey(month.startOf('month')), caption: month.toFormat('LLLL yyyy'), weeks };\n });\n });\n\n protected readonly canGoBack = computed(() => {\n const min = this.minDate();\n return !min || this.viewMonth().startOf('month') > min.startOf('month');\n });\n protected readonly canGoForward = computed(() => {\n const max = this.maxDate();\n return !max || this.viewMonth().plus({ months: this.monthsShown() - 1 }).endOf('month') < max.startOf('month');\n });\n\n /** The line under the grid, read out as it changes. */\n protected readonly status = computed(() =>\n this.nxeMessages.t(this.draftStart() ? 'dateRange.pickEnd' : 'dateRange.pickStart'),\n );\n\n private overlayRef?: OverlayRef;\n private closeSub?: Subscription;\n private flipSub?: Subscription;\n\n // --- field ---\n\n protected onFieldClick(): void {\n if (this.opened()) {\n this.close(true);\n } else {\n this.open();\n }\n }\n\n protected onFieldKeydown(event: KeyboardEvent): void {\n if (event.ctrlKey || event.metaKey) {\n return;\n }\n switch (event.key) {\n case 'Enter':\n case ' ':\n case 'ArrowDown':\n event.preventDefault();\n this.open();\n break;\n case 'Backspace':\n case 'Delete':\n if (!this.readOnly() && !this.disabled()) {\n event.preventDefault();\n this.clear(event);\n }\n break;\n }\n }\n\n protected onFocus(): void {\n this.focused.set(true);\n }\n\n protected onBlur(): void {\n this.focused.set(false);\n // Focus moving into the popup is not leaving the field; the popup marks it touched on close.\n if (!this.opened()) {\n this.markAsTouched();\n }\n }\n\n protected onClearClick(event: Event): void {\n this.clear(event);\n this.fieldRef().nativeElement.focus();\n }\n\n /** Empties the range. The value becomes `null`. */\n protected clear(event: Event | null): void {\n this.draftStart.set(null);\n this.hovered.set(null);\n this.commitRange(null, null, event);\n }\n\n // --- popup: day grid ---\n\n protected pick(cell: RangeDayCell, event: Event): void {\n if (cell.disabled) {\n return;\n }\n this.activeDate.set(cell.date);\n const draft = this.draftStart();\n if (!draft) {\n this.draftStart.set(cell.date);\n this.hovered.set(cell.date);\n return;\n }\n this.draftStart.set(null);\n this.hovered.set(null);\n this.commitRange(draft, cell.date, event);\n this.close(true);\n }\n\n protected onDayEnter(cell: RangeDayCell): void {\n if (this.draftStart()) {\n this.hovered.set(cell.date);\n }\n }\n\n protected onDayFocus(cell: RangeDayCell): void {\n this.activeDate.set(cell.date);\n if (this.draftStart()) {\n this.hovered.set(cell.date);\n }\n }\n\n /** The pointer left the grids: the preview falls back to the keyboard's day. */\n protected onGridLeave(): void {\n this.hovered.set(this.draftStart() ? this.activeDate() : null);\n }\n\n protected onDayKeydown(event: KeyboardEvent, cell: RangeDayCell): void {\n if (event.ctrlKey || event.metaKey || event.altKey) {\n return;\n }\n let target: DateTime;\n switch (event.key) {\n case 'ArrowLeft':\n target = cell.date.minus({ days: 1 });\n break;\n case 'ArrowRight':\n target = cell.date.plus({ days: 1 });\n break;\n case 'ArrowUp':\n target = cell.date.minus({ days: 7 });\n break;\n case 'ArrowDown':\n target = cell.date.plus({ days: 7 });\n break;\n case 'Home':\n target = cell.date.minus({ days: cell.date.weekday % 7 });\n break;\n case 'End':\n target = cell.date.plus({ days: 6 - (cell.date.weekday % 7) });\n break;\n case 'PageUp':\n target = cell.date.minus(event.shiftKey ? { years: 1 } : { months: 1 });\n break;\n case 'PageDown':\n target = cell.date.plus(event.shiftKey ? { years: 1 } : { months: 1 });\n break;\n case 'Enter':\n case ' ':\n event.preventDefault();\n this.pick(cell, event);\n return;\n default:\n return;\n }\n event.preventDefault();\n this.moveTo(target);\n }\n\n private moveTo(date: DateTime): void {\n this.activeDate.set(date);\n if (this.draftStart()) {\n this.hovered.set(date);\n }\n this.ensureVisible(date);\n this.focusDay(date);\n }\n\n private ensureVisible(date: DateTime): void {\n const first = this.viewMonth().startOf('month');\n const last = first.plus({ months: this.monthsShown() - 1 }).endOf('month');\n if (date < first) {\n this.viewMonth.set(date.startOf('month'));\n } else if (date > last) {\n this.viewMonth.set(date.startOf('month').minus({ months: this.monthsShown() - 1 }));\n }\n }\n\n private focusDay(date: DateTime): void {\n const selector = `[data-date=\"${dayKey(date)}\"]`;\n const find = () => this.overlayRef?.overlayElement.querySelector<HTMLElement>(selector);\n const existing = find();\n if (existing) {\n existing.focus();\n } else {\n afterNextRender(() => find()?.focus(), { injector: this.injector });\n }\n }\n\n protected navigate(delta: number): void {\n this.viewMonth.update((month) => month.plus({ months: delta }));\n }\n\n // --- popup: presets and typed input ---\n\n protected applyPreset(item: RangePresetItem, event: Event): void {\n const preset = this.presetResults()[item.index];\n if (!preset) {\n return;\n }\n this.draftStart.set(null);\n this.hovered.set(null);\n this.commitRange(preset.start, preset.end, event);\n this.close(true);\n }\n\n /** Commit the text typed into one end. Empty clears that end; unreadable text is put back. */\n protected commitTyped(which: 'start' | 'end', event: Event): void {\n const element = event.target as HTMLInputElement;\n const text = element.value.trim();\n const { start, end } = this.range();\n this.draftStart.set(null);\n this.hovered.set(null);\n if (!text) {\n this.commitRange(which === 'start' ? null : start, which === 'end' ? null : end, event);\n } else {\n const parsed = parseDisplay(text, this.displayFormat(), null, this.locale());\n if (parsed) {\n const day = this.clampDay(parsed.startOf('day').setLocale(this.locale()))!;\n this.commitRange(which === 'start' ? day : start, which === 'end' ? day : end, event);\n this.activeDate.set(day);\n this.ensureVisible(day);\n }\n }\n // The bound text is unchanged when the entry was rejected or clamped back, so repaint it.\n element.value = which === 'start' ? this.startText() : this.endText();\n }\n\n protected onTypedKeydown(which: 'start' | 'end', event: KeyboardEvent): void {\n if (event.key === 'Enter') {\n event.preventDefault();\n this.commitTyped(which, event);\n }\n }\n\n protected onClearInPopup(event: Event): void {\n this.clear(event);\n this.close(true);\n }\n\n // --- value ---\n\n private toDay(bound: NxeDateRangeBound | null): DateTime | null {\n return parseDateValue(bound)?.startOf('day').setLocale(this.locale()) ?? null;\n }\n\n private clampDay(day: DateTime | null): DateTime | null {\n if (!day) {\n return null;\n }\n const min = this.minDate();\n const max = this.maxDate();\n if (min && day < min) {\n return min.setLocale(this.locale());\n }\n if (max && day > max) {\n return max.setLocale(this.locale());\n }\n return day;\n }\n\n private serialize(day: DateTime, edge: 'start' | 'end'): string {\n const stamp = edge === 'start' ? day.startOf('day') : day.endOf('day').set({ millisecond: 0 });\n return stamp.setLocale('en').toFormat(this.valueFormat());\n }\n\n private commitRange(start: DateTime | null, end: DateTime | null, event: Event | null): void {\n if (start && end && end < start) {\n [start, end] = [end, start];\n }\n const next: NxeDateRange | null =\n start || end\n ? {\n start: start ? this.serialize(start, 'start') : null,\n end: end ? this.serialize(end, 'end') : null,\n }\n : null;\n const current = this.value();\n if ((current?.start ?? null) === (next?.start ?? null) && (current?.end ?? null) === (next?.end ?? null)) {\n return;\n }\n this.commitValue(next, event);\n }\n\n // --- popup lifecycle ---\n\n /** Opens the popup on the start of the range (or today). No-op while open, disabled or read-only. */\n open(): void {\n if (this.disabled() || this.readOnly() || this.opened()) {\n return;\n }\n const { start, end } = this.range();\n const anchor = this.clampDay(start ?? end ?? this.clock().startOf('day').setLocale(this.locale()))!;\n this.draftStart.set(null);\n this.hovered.set(null);\n this.activeDate.set(anchor);\n this.viewMonth.set(anchor.startOf('month'));\n\n if (!this.overlayRef) {\n this.overlayRef = this.overlay.create({\n positionStrategy: this.overlay\n .position()\n .flexibleConnectedTo(this.elementRef)\n .withPositions([\n { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },\n { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom' },\n { originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top' },\n { originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom' },\n ])\n .withFlexibleDimensions(false)\n .withPush(true)\n .withViewportMargin(8),\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n hasBackdrop: true,\n backdropClass: 'cdk-overlay-transparent-backdrop',\n panelClass: nxePane('nxe-daterange-pane'),\n });\n this.flipSub = trackPaneFlip(this.overlayRef);\n }\n this.overlayRef.attach(new TemplatePortal(this.popupTemplate(), this.viewContainerRef));\n this.closeSub = merge(\n this.overlayRef.backdropClick().pipe(map(() => false)),\n this.overlayRef.keydownEvents().pipe(\n filter((event) => event.key === 'Escape'),\n map((event) => {\n event.preventDefault();\n return true;\n }),\n ),\n ).subscribe((restoreFocus) => this.close(restoreFocus));\n this.opened.set(true);\n this.focusDay(anchor);\n }\n\n /** Closes the popup, dropping a range that was only half picked. `restoreFocus` returns focus to the field. */\n close(restoreFocus = true): void {\n if (!this.overlayRef?.hasAttached()) {\n return;\n }\n this.overlayRef.detach();\n this.closeSub?.unsubscribe();\n this.draftStart.set(null);\n this.hovered.set(null);\n this.opened.set(false);\n this.markAsTouched();\n if (restoreFocus) {\n this.fieldRef().nativeElement.focus();\n }\n }\n\n ngOnDestroy(): void {\n this.closeSub?.unsubscribe();\n this.flipSub?.unsubscribe();\n this.overlayRef?.dispose();\n }\n}\n","<div class=\"nxe-editor-container\">\n <!-- A read-only combobox rather than a button: a native input takes its caption from\n <label for>, and nxe-form-field writes aria-invalid / aria-describedby onto it. -->\n <input\n #field\n class=\"nxe-editor-input nxe-daterange-input\"\n type=\"text\"\n role=\"combobox\"\n aria-haspopup=\"dialog\"\n autocomplete=\"off\"\n readonly\n [id]=\"controlId()\"\n [attr.tabindex]=\"tabIndex()\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-expanded]=\"opened()\"\n [attr.aria-controls]=\"opened() ? popupId : null\"\n [attr.aria-invalid]=\"invalidState() ? true : null\"\n [attr.aria-required]=\"required() ? true : null\"\n [attr.placeholder]=\"fieldPlaceholder()\"\n [value]=\"displayValue()\"\n [disabled]=\"disabled()\"\n (click)=\"onFieldClick()\"\n (keydown)=\"onFieldKeydown($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\" />\n @if (clearButtonVisible()) {\n <span class=\"nxe-clear-button-area\" aria-hidden=\"true\" (mousedown)=\"$event.preventDefault()\" (click)=\"onClearClick($event)\">\n <svg viewBox=\"0 0 18 18\" focusable=\"false\">\n <path\n fill-rule=\"evenodd\"\n transform=\"rotate(45 9 9)\"\n d=\"M9 1a8 8 0 1 1 0 16A8 8 0 1 1 9 1ZM8 3.343h2V8h4.657v2H10v4.657H8V10H3.343V8H8Z\" />\n </svg>\n </span>\n }\n @if (!readOnly()) {\n <span class=\"nxe-daterange-button\" [class.nxe-daterange-open]=\"opened()\" aria-hidden=\"true\" (mousedown)=\"$event.preventDefault()\" (click)=\"onFieldClick()\">\n <svg class=\"nxe-daterange-icon\" viewBox=\"0 0 18 18\" focusable=\"false\">\n <rect x=\"3\" y=\"3\" width=\"12\" height=\"12\" rx=\"1\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" />\n <rect x=\"3\" y=\"3\" width=\"12\" height=\"3\" />\n <rect x=\"4\" y=\"1\" width=\"2\" height=\"1.5\" />\n <rect x=\"12\" y=\"1\" width=\"2\" height=\"1.5\" />\n <rect x=\"5\" y=\"9\" width=\"8\" height=\"2\" />\n </svg>\n </span>\n }\n</div>\n<ng-content />\n@if (validationError(); as error) {\n @if (focused()) {\n <div class=\"nxe-invalid-message\">{{ error }}</div>\n }\n}\n\n<ng-template #popupTemplate>\n <div\n class=\"nxe-range-popup\"\n role=\"dialog\"\n cdkTrapFocus\n [id]=\"popupId\"\n [class.nxe-range-narrow]=\"isNarrow()\"\n [attr.aria-label]=\"nxeMessages.t('dateRange.dialog')\">\n @if (presetItems().length) {\n <div class=\"nxe-range-presets\" role=\"group\" [attr.aria-label]=\"nxeMessages.t('dateRange.presets')\">\n @for (preset of presetItems(); track preset.index) {\n <button\n type=\"button\"\n class=\"nxe-range-preset\"\n [class.nxe-range-preset-active]=\"preset.active\"\n [attr.aria-pressed]=\"preset.active\"\n (click)=\"applyPreset(preset, $event)\">\n {{ preset.label }}\n </button>\n }\n </div>\n }\n <div class=\"nxe-range-main\">\n <div class=\"nxe-range-inputs\">\n <input\n class=\"nxe-range-text\"\n type=\"text\"\n autocomplete=\"off\"\n [attr.aria-label]=\"nxeMessages.t('dateRange.start')\"\n [attr.placeholder]=\"startHint()\"\n [value]=\"startText()\"\n (change)=\"commitTyped('start', $event)\"\n (keydown)=\"onTypedKeydown('start', $event)\" />\n <span class=\"nxe-range-dash\" aria-hidden=\"true\">&ndash;</span>\n <input\n class=\"nxe-range-text\"\n type=\"text\"\n autocomplete=\"off\"\n [attr.aria-label]=\"nxeMessages.t('dateRange.end')\"\n [attr.placeholder]=\"endHint()\"\n [value]=\"endText()\"\n (change)=\"commitTyped('end', $event)\"\n (keydown)=\"onTypedKeydown('end', $event)\" />\n </div>\n <div class=\"nxe-range-months\" (mouseleave)=\"onGridLeave()\">\n @for (month of months(); track month.key; let first = $first; let last = $last) {\n <div class=\"nxe-range-month\">\n <div class=\"nxe-range-header\">\n @if (first) {\n <button\n type=\"button\"\n class=\"nxe-range-nav\"\n [disabled]=\"!canGoBack()\"\n [attr.aria-label]=\"nxeMessages.t('dateRange.previousMonth')\"\n (click)=\"navigate(-1)\">\n <svg viewBox=\"0 0 18 18\" focusable=\"false\" aria-hidden=\"true\">\n <polygon points=\"4.875 9 11.875 2 13.125 3.25 7.375 9 13.125 14.75 11.875 16\" />\n </svg>\n </button>\n }\n <div class=\"nxe-range-caption\" aria-live=\"polite\">{{ month.caption }}</div>\n @if (last) {\n <button\n type=\"button\"\n class=\"nxe-range-nav\"\n [disabled]=\"!canGoForward()\"\n [attr.aria-label]=\"nxeMessages.t('dateRange.nextMonth')\"\n (click)=\"navigate(1)\">\n <svg viewBox=\"0 0 18 18\" focusable=\"false\" aria-hidden=\"true\">\n <polygon points=\"13.125 9 6.125 2 4.875 3.25 10.625 9 4.875 14.75 6.125 16\" />\n </svg>\n </button>\n }\n </div>\n <table class=\"nxe-range-grid\" role=\"grid\" [attr.aria-label]=\"month.caption\">\n <thead>\n <tr>\n @for (weekday of weekdays(); track $index) {\n <th scope=\"col\" [attr.abbr]=\"weekday.long\">{{ weekday.short }}</th>\n }\n </tr>\n </thead>\n <tbody>\n @for (week of month.weeks; track $index) {\n <tr>\n @for (cell of week; track $index) {\n @if (cell) {\n <td\n role=\"gridcell\"\n class=\"nxe-range-cell\"\n [class.nxe-range-in]=\"cell.inRange\"\n [class.nxe-range-start]=\"cell.start && cell.inRange\"\n [class.nxe-range-end]=\"cell.end && cell.inRange\"\n [class.nxe-range-preview]=\"cell.preview && cell.inRange\"\n [attr.aria-selected]=\"cell.inRange\">\n <button\n type=\"button\"\n class=\"nxe-range-day\"\n [class.nxe-range-today]=\"cell.today\"\n [class.nxe-range-edge]=\"(cell.start || cell.end) && cell.inRange\"\n [attr.data-date]=\"cell.key\"\n [attr.tabindex]=\"cell.tabbable ? 0 : -1\"\n [attr.aria-label]=\"cell.label\"\n [attr.aria-disabled]=\"cell.disabled ? true : null\"\n [attr.aria-current]=\"cell.today ? 'date' : null\"\n (click)=\"pick(cell, $event)\"\n (mouseenter)=\"onDayEnter(cell)\"\n (focus)=\"onDayFocus(cell)\"\n (keydown)=\"onDayKeydown($event, cell)\"\n (keyup.space)=\"$event.preventDefault()\">\n <span>{{ cell.day }}</span>\n </button>\n </td>\n } @else {\n <td class=\"nxe-range-gap\" role=\"presentation\"></td>\n }\n }\n </tr>\n }\n </tbody>\n </table>\n </div>\n }\n </div>\n <div class=\"nxe-range-footer\">\n <span class=\"nxe-range-status\" role=\"status\">{{ status() }}</span>\n <button type=\"button\" class=\"nxe-range-clear\" (click)=\"onClearInPopup($event)\">{{ nxeMessages.t('common.clear') }}</button>\n </div>\n </div>\n </div>\n</ng-template>\n","import { ChangeDetectionStrategy, Component, input, ViewEncapsulation } from '@angular/core';\r\n\r\n/**\r\n * `nxe-scroll-view` — drop-in replacement for DevExtreme `dx-scroll-view`.\r\n *\r\n * In this app `nxe-scroll-view` is used purely as a dumb scroll container: no `@ViewChild`, no\r\n * `.instance` methods, no events (see survey). Every live tag is the same literal triple\r\n * `[scrollByContent]=\"true\" [scrollByThumb]=\"true\" [showScrollbar]=\"'onScroll'\"`. So this is a\r\n * styled `overflow:auto` wrapper that projects its content inside a `.nxe-scrollview-content`\r\n * flex-column box (matching dx's content layout, which some consumers' inner grids rely on for\r\n * height) and renders a thin grey dx-style scrollbar. The three inputs are accepted for binding\r\n * parity only — behaviour is native scrolling.\r\n */\r\n@Component({\r\n selector: 'nxe-scroll-view',\r\n standalone: true,\r\n template: '<div class=\"nxe-scrollview-content\"><ng-content /></div>',\r\n styleUrl: './nxe-scroll-view.component.scss',\r\n host: { class: 'nxe-widget nxe-scroll-view' },\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n})\r\nexport class NxeScrollViewComponent {\r\n /** Accepted for parity with dx-scroll-view; behaviour is native overflow scrolling. */\r\n readonly scrollByContent = input(true);\r\n readonly scrollByThumb = input(true);\r\n readonly showScrollbar = input<'onScroll' | 'onHover' | 'always' | 'never'>('onScroll');\r\n}\r\n","import { EnvironmentProviders, InjectionToken, makeEnvironmentProviders } from '@angular/core';\n\n/**\n * One validation message: a fixed string, or a function of the validator's error value (the\n * object Angular puts under the validator key in `control.errors`, e.g. `{ requiredLength: 3,\n * actualLength: 1 }` for `minlength`).\n */\nexport type NxeErrorMessage = string | ((error: any) => string);\n\n/** Validator key (`required`, `minlength`, ...) to the message shown for it. */\nexport type NxeErrorMessages = Readonly<Record<string, NxeErrorMessage>>;\n\n/** Key used when a failing validator has no entry and carries no message of its own. */\nexport const NXE_FALLBACK_ERROR_KEY = 'invalid';\n\n/** English defaults for Angular's built-in validators. */\nexport const NXE_DEFAULT_ERROR_MESSAGES: NxeErrorMessages = {\n required: 'This field is required.',\n email: 'Enter a valid email address.',\n minlength: (e) => `Enter at least ${e?.requiredLength} characters.`,\n maxlength: (e) => `Enter no more than ${e?.requiredLength} characters.`,\n min: (e) => `Must be at least ${e?.min}.`,\n max: (e) => `Must be at most ${e?.max}.`,\n pattern: 'Enter a value in the expected format.',\n [NXE_FALLBACK_ERROR_KEY]: 'This value is not valid.',\n};\n\n/**\n * Validator-key to message map read by `nxe-form-field`.\n *\n * Provide a plain object to replace it; keys you leave out fall back to\n * {@link NXE_DEFAULT_ERROR_MESSAGES}, so a partial map is fine. {@link provideNxeErrorMessages} is\n * the short way to write the provider. A custom validator is covered by adding its key:\n * `{ uen: 'Enter a valid UEN.' }`.\n */\nexport const NXE_ERROR_MESSAGES = new InjectionToken<NxeErrorMessages>('NXE_ERROR_MESSAGES', {\n providedIn: 'root',\n factory: () => NXE_DEFAULT_ERROR_MESSAGES,\n});\n\n/**\n * Registers messages for `nxe-form-field`, layered over the English defaults:\n *\n * ```ts\n * provideNxeErrorMessages({\n * required: 'Wajib diisi.',\n * minlength: (e) => `Minimal ${e.requiredLength} karakter.`,\n * })\n * ```\n */\nexport function provideNxeErrorMessages(messages: NxeErrorMessages): EnvironmentProviders {\n return makeEnvironmentProviders([\n { provide: NXE_ERROR_MESSAGES, useValue: { ...NXE_DEFAULT_ERROR_MESSAGES, ...messages } },\n ]);\n}\n","import {\n afterRenderEffect,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n contentChildren,\n DestroyRef,\n ElementRef,\n inject,\n input,\n signal,\n ViewEncapsulation,\n type AfterContentInit,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport {\n AbstractControl,\n ControlContainer,\n FormResetEvent,\n FormSubmittedEvent,\n NG_VALUE_ACCESSOR,\n NgControl,\n ValidationErrors,\n Validators,\n} from '@angular/forms';\nimport { FormField, type ValidationError } from '@angular/forms/signals';\nimport { NxeFormControlBase, NxeMessageService, nxeFormatFileSize, nxeOptionalBoolean } from '@nexterajs/ui/core';\nimport {\n NXE_DEFAULT_ERROR_MESSAGES,\n NXE_ERROR_MESSAGES,\n NXE_FALLBACK_ERROR_KEY,\n NxeErrorMessage,\n NxeErrorMessages,\n} from './nxe-error-messages.token';\n\nlet nextFieldId = 0;\n\n/** What the field writes onto the editor's DOM; one computed so the DOM sync names its inputs. */\ninterface FieldDomState {\n /** The editor host (`nxe-text-box`, ...), or null before the content resolves. */\n readonly host: HTMLElement | null;\n readonly controlId: string | null;\n readonly invalid: boolean;\n readonly required: boolean;\n readonly describedBy: string | null;\n readonly labelledBy: string | null;\n}\n\nfunction toList(value: string | readonly string[] | null | undefined): readonly string[] {\n if (value == null) {\n return [];\n }\n return (typeof value === 'string' ? [value] : [...value]).filter((m) => !!m);\n}\n\n/** Signal Forms error kinds to the validator keys the message tables use. */\nconst SIGNAL_KIND_TO_KEY: Readonly<Record<string, string>> = {\n minLength: 'minlength',\n maxLength: 'maxlength',\n};\n\n/**\n * `nxe-form-field` wraps one `nxe-*` editor that is bound to a form control (`formControlName`,\n * `[formControl]` or `ngModel`) and gives it the chrome a form needs:\n *\n * - a `label`, associated with the editor's inner control (`for` = the editor's `inputId`);\n * - a required marker, from `Validators.required` on the control or the `required` input;\n * - a `hint`, replaced by the error while one shows;\n * - the message for the FIRST failing validator once the control is touched or its form submitted\n * (`submitted` forces it), looked up in {@link NXE_ERROR_MESSAGES};\n * - `serverErrors` / `serverError` from an API response, shown regardless of touched.\n *\n * It sets `aria-invalid`, `aria-required` and `aria-describedby` on the editor's focusable element\n * and the editor host's `nxe-invalid` class, so the border, badge and colour come from the same\n * `--nxe-ui-invalid*` tokens as an editor invalidated by `nxe-validator`.\n *\n * Reactivity is the control's own `events` stream (value, status, touched, submit, reset) feeding\n * signals; the DOM sync runs through `afterRenderEffect`, which names the one computed it reads.\n */\n@Component({\n selector: 'nxe-form-field',\n templateUrl: './nxe-form-field.component.html',\n styleUrl: './nxe-form-field.component.scss',\n host: {\n class: 'nxe-form-field',\n '[class.nxe-form-field-invalid]': 'invalid()',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class NxeFormFieldComponent implements AfterContentInit {\n private readonly destroyRef = inject(DestroyRef);\n private readonly tokenMessages = inject(NXE_ERROR_MESSAGES);\n private readonly messageService = inject(NxeMessageService);\n /** The enclosing form, when there is one: a template-driven control joins it a tick late. */\n private readonly container = inject(ControlContainer, { optional: true });\n\n /** Caption above the editor. */\n readonly label = input<string | undefined>(undefined);\n /** Help text under the editor; hidden while an error is showing. */\n readonly hint = input<string | undefined>(undefined);\n /**\n * Force the required marker on or off. Unset, it follows `Validators.required` (and\n * `requiredTrue`) on the control. Needed for a rule the control does not declare as a validator.\n */\n readonly required = input(undefined, { transform: nxeOptionalBoolean });\n /**\n * API field errors, shown whether or not the control was touched. A string or a list of them;\n * the app clears them (set `null`) when the user edits the field or resubmits.\n */\n readonly serverErrors = input<string | readonly string[] | null | undefined>(undefined);\n /** Singular spelling of {@link serverErrors}; both may be set, their messages are joined. */\n readonly serverError = input<string | readonly string[] | null | undefined>(undefined);\n /**\n * Show client-side errors now (`true`) or never (`false`). Unset, they show once the control is\n * touched or the surrounding form was submitted.\n */\n readonly submitted = input(undefined, { transform: nxeOptionalBoolean });\n /** Messages for this field only, by validator key; override {@link NXE_ERROR_MESSAGES}. */\n readonly errorMessages = input<NxeErrorMessages | undefined>(undefined);\n\n private readonly ngControl = contentChild(NgControl);\n private readonly ngControlHost = contentChild(NgControl, { read: ElementRef });\n /**\n * Set when the projected editor carries Angular's Signal Forms `[formField]`. That directive\n * provides a stand-in `NgControl` with no `events` stream, so the field then reads the field\n * state's signals instead of subscribing to a control.\n */\n private readonly formField = contentChild(FormField);\n private readonly formFieldHost = contentChild(FormField, { read: ElementRef });\n private readonly editorHost = computed(() => this.formFieldHost() ?? this.ngControlHost());\n private readonly fieldState = computed(() => this.formField()?.state() ?? null);\n /** Only read in dev mode, to catch a second editor the field would silently not bind. */\n private readonly allControls = contentChildren(NgControl, { descendants: true });\n\n // Mirrors of the control's state. The control is not a signal, so each event on it copies the\n // parts the template reads into these.\n private readonly touched = signal(false);\n private readonly controlErrors = signal<ValidationErrors | null>(null);\n private readonly validatorRequired = signal(false);\n private readonly formSubmitted = signal(false);\n private readonly editor = signal<NxeFormControlBase<unknown> | null>(null);\n\n private readonly uid = `nxe-form-field-${++nextFieldId}`;\n protected readonly labelId = `${this.uid}-label`;\n protected readonly hintId = `${this.uid}-hint`;\n protected readonly errorId = `${this.uid}-error`;\n\n /** The id the label points at: the editor's inner control. Null for a non-nxe editor. */\n protected readonly controlId = computed(() => this.editor()?.controlId() ?? null);\n\n protected readonly isRequired = computed(\n () => this.required() ?? (this.fieldState()?.required() ?? this.validatorRequired()),\n );\n\n private readonly reveal = computed(() => {\n const state = this.fieldState();\n // A Signal Forms submit marks every field touched, so touched covers a submitted form.\n return this.submitted() ?? (state ? state.touched() : this.touched() || this.formSubmitted());\n });\n\n private readonly clientMessage = computed(() => {\n if (!this.reveal()) {\n return null;\n }\n const state = this.fieldState();\n if (state) {\n const first = state.errors()[0];\n return first ? this.resolveSignalError(first) : null;\n }\n const errors = this.controlErrors();\n const key = errors ? Object.keys(errors)[0] : undefined;\n return key === undefined ? null : this.resolve(key, errors![key]);\n });\n\n /** Everything shown under the editor as an error: the client message, then the server's. */\n protected readonly messages = computed<readonly string[]>(() => {\n const client = this.clientMessage();\n return [\n ...(client ? [client] : []),\n ...toList(this.serverErrors()),\n ...toList(this.serverError()),\n ];\n });\n\n readonly invalid = computed(() => this.messages().length > 0);\n\n protected readonly showHint = computed(() => !!this.hint() && !this.invalid());\n\n private readonly domState = computed<FieldDomState>(() => ({\n host: this.editorHost()?.nativeElement ?? null,\n controlId: this.controlId(),\n invalid: this.invalid(),\n required: this.isRequired(),\n describedBy:\n [this.showHint() ? this.hintId : null, this.invalid() ? this.errorId : null]\n .filter((id) => !!id)\n .join(' ') || null,\n labelledBy: this.label() ? this.labelId : null,\n }));\n\n /** Attributes this field put on the editor's element, so it only ever removes its own. */\n private applied: { el: HTMLElement; attrs: Set<string> } | null = null;\n private invalidClassHost: HTMLElement | null = null;\n\n constructor() {\n // Reads exactly `domState()`; the DOM writes below read no signal.\n afterRenderEffect(() => this.syncDom(this.domState()));\n }\n\n ngAfterContentInit(): void {\n if (typeof ngDevMode !== 'undefined' && ngDevMode && this.allControls().length > 1) {\n console.warn(\n `nxe-form-field binds only its first form control, but ${this.allControls().length} are projected. ` +\n 'Wrap each editor in its own nxe-form-field.',\n );\n }\n const formField = this.formField();\n if (formField) {\n // Signal Forms: the state is read through signals (fieldState); there is nothing to subscribe to.\n const accessors = formField.injector.get(NG_VALUE_ACCESSOR, null) as readonly unknown[] | null;\n this.editor.set((accessors ?? []).find((a) => a instanceof NxeFormControlBase) ?? null);\n return;\n }\n const ngControl = this.ngControl();\n const control = ngControl?.control ?? null;\n const accessor = ngControl?.valueAccessor;\n if (accessor instanceof NxeFormControlBase) {\n this.editor.set(accessor);\n }\n if (!control) {\n return;\n }\n this.syncFromControl(control);\n control.events\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => this.syncFromControl(control));\n // Submit and reset are emitted on the ROOT of the form, not on each control.\n (this.container?.control ?? control).root.events.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((event) => {\n if (event instanceof FormSubmittedEvent) {\n this.formSubmitted.set(true);\n } else if (event instanceof FormResetEvent) {\n this.formSubmitted.set(false);\n }\n this.syncFromControl(control);\n });\n }\n\n private syncFromControl(control: AbstractControl): void {\n this.touched.set(control.touched);\n this.controlErrors.set(control.errors);\n this.validatorRequired.set(\n control.hasValidator(Validators.required) || control.hasValidator(Validators.requiredTrue),\n );\n }\n\n /**\n * Message for one failing validator: this field's `errorMessages`, then an entry the app put in\n * the {@link NXE_ERROR_MESSAGES} token, then the active `NxeMessageService` bundle (English\n * unless the app switched language), then a string the validator itself returned\n * (`{ uen: 'Not a valid UEN' }` or `{ uen: { message } }`), then the generic fallback.\n *\n * A token entry that IS the built-in default (the same reference, which is what\n * `provideNxeErrorMessages` leaves for the keys it was not given) counts as unset, so it does\n * not pin English over the bundle. Called from the `clientMessage` computed, so a language\n * switch re-renders the error.\n */\n private resolve(key: string, error: unknown): string {\n const entry: NxeErrorMessage | undefined =\n this.errorMessages()?.[key] ?? this.explicitToken(key) ?? this.bundled(key, error);\n if (entry !== undefined) {\n return typeof entry === 'function' ? entry(error) : entry;\n }\n if (typeof error === 'string' && error) {\n return error;\n }\n const own = (error as { message?: unknown } | null)?.message;\n if (typeof own === 'string' && own) {\n return own;\n }\n const fallback =\n this.errorMessages()?.[NXE_FALLBACK_ERROR_KEY] ??\n this.explicitToken(NXE_FALLBACK_ERROR_KEY) ??\n this.messageService.t('validation.field.invalid');\n return typeof fallback === 'function' ? fallback(error) : fallback;\n }\n\n /**\n * Message for a Signal Forms error `{ kind, message? }`. The kind is mapped to the validator keys\n * above (`minLength` to `minlength`, `maxLength` to `maxlength`; `required`, `min`, `max`, `pattern`\n * and `email` as they are). Lookup order: this field's `errorMessages`, an app token entry, the\n * error's own `message`, the library bundle, then the fallback (`invalid`). So a rule written\n * with a message (`required(p.name, { message: '...' })`) shows it, and a custom kind does too.\n */\n private resolveSignalError(error: ValidationError.WithFieldTree): string {\n const key = SIGNAL_KIND_TO_KEY[error.kind] ?? error.kind;\n const e = error as unknown as Record<string, unknown>;\n // A validator written for Reactive Forms (nxe-file-input's, or an app's) reaches the field as\n // `{ kind, context }`, where `context` is what it returned under its key.\n const context = e['context'];\n const fromValidator = typeof context === 'object' && context !== null ? (context as Record<string, unknown>) : {};\n // Shape the payload like the Reactive Forms error of the same key, which the tables read.\n const payload = { ...fromValidator, ...e, requiredLength: e['minLength'] ?? e['maxLength'] ?? fromValidator['requiredLength'] };\n const ownMessage =\n error.message || (typeof context === 'string' ? context : undefined) || (typeof fromValidator['message'] === 'string' ? fromValidator['message'] : undefined);\n const entry: NxeErrorMessage | undefined = this.errorMessages()?.[key] ?? this.explicitToken(key);\n if (entry !== undefined) {\n return typeof entry === 'function' ? entry(payload) : entry;\n }\n if (ownMessage) {\n return ownMessage;\n }\n const bundled = this.bundled(key, payload);\n if (bundled !== undefined) {\n return bundled;\n }\n const fallback =\n this.errorMessages()?.[NXE_FALLBACK_ERROR_KEY] ??\n this.explicitToken(NXE_FALLBACK_ERROR_KEY) ??\n this.messageService.t('validation.field.invalid');\n return typeof fallback === 'function' ? fallback(payload) : fallback;\n }\n\n private explicitToken(key: string): NxeErrorMessage | undefined {\n const entry = this.tokenMessages[key];\n return entry === NXE_DEFAULT_ERROR_MESSAGES[key] ? undefined : entry;\n }\n\n /** The library bundle's wording for Angular's built-in validators. */\n private bundled(key: string, error: unknown): string | undefined {\n const e = error as { requiredLength?: unknown; min?: unknown; max?: unknown } | null;\n switch (key) {\n case 'required':\n case 'email':\n case 'pattern':\n return this.messageService.t(`validation.field.${key}`);\n case 'minlength':\n return this.messageService.t('validation.field.minlength', e?.requiredLength);\n case 'maxlength':\n return this.messageService.t('validation.field.maxlength', e?.requiredLength);\n case 'min':\n return this.messageService.t('validation.field.min', e?.min);\n case 'max':\n return this.messageService.t('validation.field.max', e?.max);\n // nxe-file-input's errors: the file type allow-list, the size and count limits, and uploads.\n case 'fileType':\n return this.messageService.t('validation.field.fileType', (error as { accept?: unknown } | null)?.accept);\n case 'fileSize':\n return this.messageService.t(\n 'validation.field.fileSize',\n nxeFormatFileSize(Number((error as { maxSize?: unknown } | null)?.maxSize), this.messageService),\n );\n case 'maxFiles':\n return this.messageService.t('validation.field.maxFiles', (error as { maxFiles?: unknown } | null)?.maxFiles);\n case 'uploading':\n case 'uploadFailed':\n return this.messageService.t(`validation.field.${key}`);\n default:\n return undefined;\n }\n }\n\n /** The element a screen reader should treat as the field: the inner control, not the host. */\n private focusable(host: HTMLElement, controlId: string | null): HTMLElement {\n if (controlId) {\n const byId = host.querySelector<HTMLElement>(`#${CSS.escape(controlId)}`);\n if (byId) {\n return byId;\n }\n }\n if (host.matches('[tabindex], input, textarea, select')) {\n return host;\n }\n return (\n host.querySelector<HTMLElement>('input, textarea, select, [tabindex]:not([tabindex=\"-1\"])') ??\n host\n );\n }\n\n private setAttr(name: string, value: string | null): void {\n const { el, attrs } = this.applied!;\n if (value === null) {\n if (attrs.delete(name)) {\n el.removeAttribute(name);\n }\n } else {\n el.setAttribute(name, value);\n attrs.add(name);\n }\n }\n\n private syncDom(state: FieldDomState): void {\n if (!state.host) {\n return;\n }\n const el = this.focusable(state.host, state.controlId);\n if (this.applied?.el !== el) {\n this.applied = { el, attrs: new Set() };\n }\n this.setAttr('aria-invalid', state.invalid ? 'true' : null);\n this.setAttr('aria-required', state.required ? 'true' : null);\n this.setAttr('aria-describedby', state.describedBy);\n // A native input is labelled by the `for` association; the host of an editor without one\n // (check-box, drop-down) needs the label named explicitly, unless the app already did.\n const own = this.applied.attrs.has('aria-labelledby');\n const needsLabelledBy =\n !!state.labelledBy &&\n !/^(INPUT|TEXTAREA|SELECT)$/.test(el.tagName) &&\n (own || (!el.hasAttribute('aria-label') && !el.hasAttribute('aria-labelledby')));\n this.setAttr('aria-labelledby', needsLabelledBy ? state.labelledBy : null);\n\n // The editor's own invalid look (border, badge) is keyed off `.nxe-invalid` on its host.\n if (state.invalid) {\n state.host.classList.add('nxe-invalid');\n this.invalidClassHost = state.host;\n } else if (this.invalidClassHost) {\n this.invalidClassHost.classList.remove('nxe-invalid');\n this.invalidClassHost = null;\n }\n }\n}\n","@if (label()) {\n <label class=\"nxe-form-field-label\" [id]=\"labelId\" [attr.for]=\"controlId()\">\n {{ label() }}\n @if (isRequired()) {\n <span class=\"nxe-form-field-required\" aria-hidden=\"true\">*</span>\n }\n </label>\n}\n<div class=\"nxe-form-field-control\">\n <ng-content />\n</div>\n@if (showHint()) {\n <div class=\"nxe-form-field-hint\" [id]=\"hintId\">{{ hint() }}</div>\n}\n<div class=\"nxe-form-field-messages\" aria-live=\"polite\">\n @if (invalid()) {\n <div class=\"nxe-form-field-error\" [id]=\"errorId\">\n @for (message of messages(); track $index) {\n <div>{{ message }}</div>\n }\n </div>\n }\n</div>\n","import { Directive, inject, TemplateRef } from '@angular/core';\n\n/** What an `nxeRadioItem` template receives for each item. */\nexport interface NxeRadioItemContext<T = unknown> {\n /** The item, also available as `let-item`. */\n $implicit: T;\n item: T;\n index: number;\n selected: boolean;\n disabled: boolean;\n}\n\n/**\n * Marks the `<ng-template>` that renders one radio's content in `nxe-radio-group`, in place of the\n * `displayExpr` text:\n *\n * ```html\n * <nxe-radio-group [items]=\"plans\" valueExpr=\"id\">\n * <ng-template nxeRadioItem let-plan let-selected=\"selected\">\n * <strong>{{ plan.name }}</strong> <small>{{ plan.price }}</small>\n * </ng-template>\n * </nxe-radio-group>\n * ```\n *\n * The radio's accessible name is the template's text, so keep it to text and inline markup.\n */\n@Directive({\n selector: 'ng-template[nxeRadioItem]',\n})\nexport class NxeRadioItemDirective {\n /** The template to render for each item. */\n readonly template = inject<TemplateRef<NxeRadioItemContext>>(TemplateRef);\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n forwardRef,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport {\n NXE_VALIDATION_TARGET,\n NxeExpr,\n NxeFormControlBase,\n nxeResolveExpr,\n nxeResolveText,\n} from '@nexterajs/ui/core';\nimport { NxeRadioItemDirective } from './nxe-radio-item.directive';\n\n/** How the radios are laid out. */\nexport type NxeRadioGroupLayout = 'horizontal' | 'vertical';\n\n/** One radio, resolved from an item. */\ninterface RadioEntry {\n readonly item: unknown;\n readonly index: number;\n readonly id: string;\n readonly value: unknown;\n readonly text: string;\n readonly disabled: boolean;\n}\n\n/**\n * `nxe-radio-group`: single choice among a few options, as the WAI-ARIA radio group pattern.\n *\n * A signal-CVA editor (extends {@link NxeFormControlBase}) working with `[(value)]`, `[(ngModel)]`\n * and Reactive Forms. The options are `items`; `displayExpr` says what each shows (default: the\n * item itself, for a list of strings), `valueExpr` what it puts in the control (default: the item\n * itself) and `disabledExpr` (default `'disabled'`) which are not selectable. An\n * `<ng-template nxeRadioItem>` replaces the text with your own content.\n *\n * Keyboard: the group is one tab stop, on the selected radio (or the first enabled one). Arrow keys\n * move to the next or previous enabled radio, wrap around, and select it; Space selects the focused\n * one. Left and Right are swapped in right-to-left text. A read-only group moves focus but never\n * changes the value.\n *\n * The inner `role=\"radiogroup\"` element carries the `inputId`, `aria-label` and `aria-labelledby`,\n * so an `nxe-form-field` label names the group and its `aria-invalid` / `aria-describedby` land on\n * it. Provides {@link NXE_VALIDATION_TARGET} for a projected `nxe-validator`.\n */\n@Component({\n selector: 'nxe-radio-group',\n imports: [NgTemplateOutlet],\n templateUrl: './nxe-radio-group.component.html',\n styleUrl: './nxe-radio-group.component.scss',\n host: {\n class: 'nxe-widget nxe-radio-group',\n '[class.nxe-radio-group-horizontal]': \"layout() === 'horizontal'\",\n '[class.nxe-radio-group-vertical]': \"layout() === 'vertical'\",\n '[class.nxe-invalid]': 'invalidState()',\n // The names belong on the inner radiogroup; a copy on this generic host would be prohibited.\n '[attr.aria-label]': 'null',\n '[attr.aria-labelledby]': 'null',\n },\n providers: [\n { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => NxeRadioGroupComponent), multi: true },\n { provide: NXE_VALIDATION_TARGET, useExisting: forwardRef(() => NxeRadioGroupComponent) },\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class NxeRadioGroupComponent extends NxeFormControlBase<unknown> {\n /** The options. */\n readonly items = input<readonly unknown[]>([]);\n /** Text of an item; unset, the item itself. */\n readonly displayExpr = input<NxeExpr>(undefined);\n /** The value an item stands for; unset, the item itself. */\n readonly valueExpr = input<NxeExpr>(undefined);\n /** Truthy for an item that cannot be chosen. */\n readonly disabledExpr = input<NxeExpr>('disabled');\n /** `vertical` stacks the radios, `horizontal` puts them in a row that wraps. */\n readonly layout = input<NxeRadioGroupLayout>('vertical');\n\n /** Custom radio content. */\n readonly itemTemplate = contentChild(NxeRadioItemDirective);\n\n protected readonly entries = computed<readonly RadioEntry[]>(() =>\n this.items().map((item, index) => ({\n item,\n index,\n id: `${this.controlId()}-radio-${index}`,\n value: nxeResolveExpr(this.valueExpr(), item),\n text: nxeResolveText(this.displayExpr(), item),\n disabled: !!nxeResolveExpr(this.disabledExpr(), item),\n })),\n );\n\n /** Index of the checked radio, or -1. */\n protected readonly selectedIndex = computed(() => {\n const current = this.value();\n return this.entries().findIndex((entry) => Object.is(entry.value, current));\n });\n\n /** The one radio in the tab order: the checked one when it can be reached, else the first enabled. */\n protected readonly tabbableIndex = computed(() => {\n if (this.disabled()) {\n return -1;\n }\n const entries = this.entries();\n const selected = this.selectedIndex();\n if (selected >= 0 && !entries[selected].disabled) {\n return selected;\n }\n return entries.findIndex((entry) => !entry.disabled);\n });\n\n protected onItemClick(index: number, event: Event): void {\n this.select(index, event);\n }\n\n protected onItemKeydown(index: number, event: KeyboardEvent): void {\n if (event.altKey || event.ctrlKey || event.metaKey) {\n return;\n }\n const rtl = getComputedStyle(this.element).direction === 'rtl';\n switch (event.key) {\n case 'ArrowDown':\n this.move(index, 1, event);\n break;\n case 'ArrowUp':\n this.move(index, -1, event);\n break;\n case 'ArrowRight':\n this.move(index, rtl ? -1 : 1, event);\n break;\n case 'ArrowLeft':\n this.move(index, rtl ? 1 : -1, event);\n break;\n case ' ':\n event.preventDefault();\n this.select(index, event);\n break;\n }\n }\n\n /** Leaving the group, not moving between its radios, is what touches the control. */\n protected onGroupFocusOut(event: FocusEvent): void {\n const group = event.currentTarget as HTMLElement;\n if (!group.contains(event.relatedTarget as Node | null)) {\n this.markAsTouched();\n }\n }\n\n /** Focus (and, unless read-only, select) the next enabled radio in `step` direction, wrapping. */\n private move(from: number, step: 1 | -1, event: Event): void {\n event.preventDefault();\n if (this.disabled()) {\n return;\n }\n const entries = this.entries();\n for (let n = 1; n <= entries.length; n++) {\n const next = (((from + step * n) % entries.length) + entries.length) % entries.length;\n if (!entries[next].disabled) {\n this.element.querySelectorAll<HTMLElement>('[role=\"radio\"]')[next]?.focus();\n this.select(next, event);\n return;\n }\n }\n }\n\n private select(index: number, event: Event): void {\n const entry = this.entries()[index];\n if (!entry || entry.disabled || this.disabled() || this.readOnly()) {\n return;\n }\n this.commitValue(entry.value, event);\n this.markAsTouched();\n }\n}\n","<div\n class=\"nxe-radio-group-items\"\n role=\"radiogroup\"\n [id]=\"controlId()\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-disabled]=\"disabled() ? true : null\"\n [attr.aria-readonly]=\"readOnly() ? true : null\"\n [attr.aria-invalid]=\"invalidState() ? true : null\"\n [attr.aria-required]=\"required() ? true : null\"\n (focusout)=\"onGroupFocusOut($event)\">\n @for (entry of entries(); track entry.index) {\n <div\n class=\"nxe-radio\"\n role=\"radio\"\n [id]=\"entry.id\"\n [class.nxe-radio-checked]=\"selectedIndex() === entry.index\"\n [class.nxe-radio-disabled]=\"entry.disabled\"\n [attr.aria-checked]=\"selectedIndex() === entry.index\"\n [attr.aria-disabled]=\"entry.disabled || disabled() ? true : null\"\n [attr.tabindex]=\"tabbableIndex() === entry.index ? 0 : -1\"\n (click)=\"onItemClick(entry.index, $event)\"\n (keydown)=\"onItemKeydown(entry.index, $event)\">\n <span class=\"nxe-radio-icon\" aria-hidden=\"true\"></span>\n <span class=\"nxe-radio-label\">\n @if (itemTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl.template\"\n [ngTemplateOutletContext]=\"{\n $implicit: entry.item,\n item: entry.item,\n index: entry.index,\n selected: selectedIndex() === entry.index,\n disabled: entry.disabled,\n }\" />\n } @else {\n {{ entry.text }}\n }\n </span>\n </div>\n }\n</div>\n<ng-content />\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n forwardRef,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { NXE_VALIDATION_TARGET, NxeFormControlBase } from '@nexterajs/ui/core';\n\n/** Switch size; `medium` is the default. */\nexport type NxeSwitchSize = 'small' | 'medium' | 'large';\n\n/**\n * `nxe-switch`: an on/off setting that takes effect as soon as it is flipped.\n *\n * A signal-CVA editor (extends {@link NxeFormControlBase}) over `boolean`; `null` and unset read as\n * off. Works with `[(value)]`, `[(ngModel)]` and Reactive Forms. The host is the control:\n * `role=\"switch\"`, `aria-checked`, one tab stop; click and Space toggle it. A read-only switch is\n * focusable but never flips; a disabled one leaves the tab order and dims.\n *\n * `text` is the label beside the track and names the switch (inside an `nxe-form-field` the field's\n * label does instead). `onText` and `offText` are optional words drawn inside the track; they are\n * decoration, hidden from assistive tech, because `aria-checked` already says which state it is in.\n */\n@Component({\n selector: 'nxe-switch',\n templateUrl: './nxe-switch.component.html',\n styleUrl: './nxe-switch.component.scss',\n host: {\n class: 'nxe-widget nxe-switch',\n role: 'switch',\n '[attr.aria-checked]': 'checked()',\n '[attr.aria-disabled]': 'disabled() ? true : null',\n '[attr.aria-readonly]': 'readOnly() ? true : null',\n '[attr.aria-invalid]': 'invalidState() ? true : null',\n '[attr.aria-required]': 'required() ? true : null',\n // The host IS the control, so the id belongs on it rather than on a child.\n '[attr.id]': 'inputId() ? controlId() : null',\n '[attr.aria-label]': 'ariaLabel() || null',\n '[attr.aria-labelledby]': 'ariaLabelledBy() || null',\n '[attr.tabindex]': 'disabled() ? null : (tabIndex() ?? 0)',\n '[class.nxe-switch-checked]': 'checked()',\n '[class.nxe-switch-small]': \"size() === 'small'\",\n '[class.nxe-switch-large]': \"size() === 'large'\",\n '[class.nxe-invalid]': 'invalidState()',\n '(click)': 'toggle($event)',\n '(keydown.space)': 'onSpace($event)',\n '(blur)': 'markAsTouched()',\n },\n providers: [\n { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => NxeSwitchComponent), multi: true },\n { provide: NXE_VALIDATION_TARGET, useExisting: forwardRef(() => NxeSwitchComponent) },\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class NxeSwitchComponent extends NxeFormControlBase<boolean> {\n /** Label beside the track. */\n readonly text = input<string | undefined>(undefined);\n /** Word shown inside the track while on. */\n readonly onText = input<string | undefined>(undefined);\n /** Word shown inside the track while off. */\n readonly offText = input<string | undefined>(undefined);\n /** Track size. */\n readonly size = input<NxeSwitchSize>('medium');\n\n readonly checked = computed(() => !!this.value());\n\n protected toggle(event: Event): void {\n if (this.disabled() || this.readOnly()) {\n return;\n }\n this.commitValue(!this.checked(), event);\n this.markAsTouched();\n }\n\n protected onSpace(event: Event): void {\n // Space would otherwise scroll the page.\n event.preventDefault();\n this.toggle(event);\n }\n}\n","<span class=\"nxe-switch-track\" aria-hidden=\"true\">\n @if (onText() || offText()) {\n <span class=\"nxe-switch-text nxe-switch-on-text\">{{ onText() }}</span>\n <span class=\"nxe-switch-text nxe-switch-off-text\">{{ offText() }}</span>\n }\n <span class=\"nxe-switch-thumb\"></span>\n</span>\n@if (text()) {\n <span class=\"nxe-switch-label\">{{ text() }}</span>\n}\n<ng-content />\n","import {\n afterNextRender,\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n ElementRef,\n forwardRef,\n input,\n numberAttribute,\n output,\n signal,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { NXE_VALIDATION_TARGET, NxeFormControlBase } from '@nexterajs/ui/core';\n\n/** Which characters a code may hold. */\nexport type NxeOtpMode = 'numeric' | 'alphanumeric';\n\nconst STRIP: Record<NxeOtpMode, RegExp> = {\n numeric: /\\D/g,\n alphanumeric: /[^A-Za-z0-9]/g,\n};\n\n/**\n * `nxe-otp-box`: a one-time code (2FA sign-in, e-mail verification, recovery code) drawn as one\n * cell per character.\n *\n * It is ONE control, not N: a single transparent `<input>` lies over the cells and they only draw\n * its text. That is what keeps a screen reader on one named field with one value, gives native\n * paste, and lets the browser fill the whole code at once from an SMS or password manager\n * (`autocomplete=\"one-time-code\"`). Typing fills the next cell, Backspace empties the last one, and\n * the caret is kept at the end, so the arrow keys do nothing. Pasting a code of `length` characters\n * (or more) replaces the value, with separators such as a dash or space dropped; a shorter paste is\n * appended.\n *\n * A signal-CVA over `string` (extends {@link NxeFormControlBase}); the value follows every\n * keystroke, so a `minLength` validator sees a partial code and `completed` fires once with the full\n * code. Name it with `aria-label`, `aria-labelledby` or an `nxe-form-field` label.\n */\n@Component({\n selector: 'nxe-otp-box',\n templateUrl: './nxe-otp-box.component.html',\n styleUrl: './nxe-otp-box.component.scss',\n host: {\n class: 'nxe-widget nxe-otp-box',\n '[class.nxe-focused]': 'focused()',\n '[class.nxe-invalid]': 'invalidState()',\n // The names belong on the inner input; a copy on this generic host would be prohibited.\n '[attr.aria-label]': 'null',\n '[attr.aria-labelledby]': 'null',\n },\n providers: [\n { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => NxeOtpBoxComponent), multi: true },\n { provide: NXE_VALIDATION_TARGET, useExisting: forwardRef(() => NxeOtpBoxComponent) },\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class NxeOtpBoxComponent extends NxeFormControlBase<string> {\n /** Number of characters in the code. */\n readonly length = input(6, { transform: (v: unknown) => Math.max(1, Math.floor(numberAttribute(v, 6))) });\n /** `numeric` (default) takes digits and opens the numeric keypad; `alphanumeric` takes letters and digits. */\n readonly mode = input<NxeOtpMode>('numeric');\n /** Focus the field when it first renders. */\n readonly autoFocus = input(false, { transform: booleanAttribute });\n\n /** The full code, once, when the last cell is filled (typed, pasted or auto-filled). */\n readonly completed = output<string>();\n\n readonly focused = signal(false);\n\n private readonly field = viewChild.required<ElementRef<HTMLInputElement>>('field');\n\n protected readonly displayValue = computed(() => this.clean(this.value() ?? ''));\n\n protected readonly cells = computed(() => {\n const text = this.displayValue();\n const length = this.length();\n // The cell the next character lands in, or the last one while the code is full.\n const active = this.focused() && !this.disabled() ? Math.min(text.length, length - 1) : -1;\n return Array.from({ length }, (_, index) => ({ index, char: text[index] ?? '', active: index === active }));\n });\n\n constructor() {\n super();\n afterNextRender(() => {\n if (this.autoFocus()) {\n this.field().nativeElement.focus();\n }\n });\n }\n\n /** Drop what the mode does not allow and cut to `length`. */\n private clean(text: string): string {\n return text.replace(STRIP[this.mode()], '').slice(0, this.length());\n }\n\n /** Typing, deleting and autofill: the field's text is the new value. */\n protected handleInput(event: Event): void {\n const el = event.target as HTMLInputElement;\n const text = this.clean(el.value);\n // A rejected character or an overflowing one leaves the model unchanged, so the field has to be put right by hand.\n if (el.value !== text) {\n el.value = text;\n }\n this.apply(text, event);\n this.keepCaretAtEnd();\n }\n\n /** A whole code replaces the value; a fragment is appended. */\n protected onPaste(event: ClipboardEvent): void {\n event.preventDefault();\n if (this.readOnly() || this.disabled()) {\n return;\n }\n const pasted = (event.clipboardData?.getData('text') ?? '').replace(STRIP[this.mode()], '');\n if (!pasted) {\n return;\n }\n const el = event.target as HTMLInputElement;\n const next = this.clean(pasted.length >= this.length() ? pasted : el.value + pasted);\n el.value = next;\n this.apply(next, event);\n this.keepCaretAtEnd();\n }\n\n /** Keys that would move the caret off the end do nothing: the cells have no caret to move. */\n protected onKeydown(event: KeyboardEvent): void {\n if (['ArrowLeft', 'ArrowRight', 'Home', 'End'].includes(event.key)) {\n event.preventDefault();\n }\n }\n\n protected onFocus(): void {\n this.focused.set(true);\n this.keepCaretAtEnd();\n }\n\n protected onBlur(): void {\n this.focused.set(false);\n this.markAsTouched();\n }\n\n /** A click or a drag could put the caret mid-code or select it; it always belongs at the end. */\n protected keepCaretAtEnd(): void {\n const el = this.field().nativeElement;\n const end = el.value.length;\n if (el.selectionStart !== end || el.selectionEnd !== end) {\n el.setSelectionRange(end, end);\n }\n }\n\n private apply(text: string, event: Event): void {\n const before = this.value() ?? '';\n this.commitValue(text, event);\n if (text.length === this.length() && text !== before) {\n this.completed.emit(text);\n }\n }\n}\n","<div class=\"nxe-otp-cells\" aria-hidden=\"true\">\n @for (cell of cells(); track cell.index) {\n <span\n class=\"nxe-otp-cell\"\n [class.nxe-otp-cell-filled]=\"cell.char !== ''\"\n [class.nxe-otp-cell-active]=\"cell.active\">{{ cell.char }}</span>\n }\n</div>\n<!--\n One real input sits over the cells, so the code is a single control: one tab stop, one name, one\n value for a screen reader, native paste and the one-time-code autofill. The cells only draw it.\n-->\n<input\n #field\n class=\"nxe-otp-input\"\n type=\"text\"\n autocomplete=\"one-time-code\"\n autocapitalize=\"off\"\n autocorrect=\"off\"\n spellcheck=\"false\"\n [id]=\"controlId()\"\n [attr.inputmode]=\"mode() === 'numeric' ? 'numeric' : 'text'\"\n [attr.pattern]=\"mode() === 'numeric' ? '[0-9]*' : null\"\n [attr.tabindex]=\"tabIndex()\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-invalid]=\"invalidState() ? true : null\"\n [attr.aria-required]=\"required() ? true : null\"\n [value]=\"displayValue()\"\n [readOnly]=\"readOnly()\"\n [disabled]=\"disabled()\"\n (input)=\"handleInput($event)\"\n (paste)=\"onPaste($event)\"\n (keydown)=\"onKeydown($event)\"\n (focus)=\"onFocus()\"\n (click)=\"keepCaretAtEnd()\"\n (select)=\"keepCaretAtEnd()\"\n (blur)=\"onBlur()\" />\n<ng-content />\n","// @nexterajs/ui/forms — public API.\r\nexport * from './lib/button/nxe-button.component';\r\nexport * from './lib/text-box/nxe-text-box.component';\r\nexport * from './lib/text-area/nxe-text-area.component';\r\nexport * from './lib/check-box/nxe-check-box.component';\r\nexport * from './lib/number-box/nxe-number-box.component';\r\nexport * from './lib/date-box/nxe-date-box.component';\r\nexport * from './lib/date-range-box/nxe-date-range';\r\nexport * from './lib/date-range-box/nxe-date-range-box.component';\r\nexport * from './lib/scroll-view/nxe-scroll-view.component';\r\nexport * from './lib/form-field/nxe-form-field.component';\r\nexport * from './lib/form-field/nxe-error-messages.token';\r\nexport * from './lib/radio-group/nxe-radio-group.component';\r\nexport * from './lib/radio-group/nxe-radio-item.directive';\r\nexport * from './lib/switch/nxe-switch.component';\r\nexport * from './lib/otp-box/nxe-otp-box.component';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAuBA;;;AAGG;AACH,SAAS,OAAO,CAAC,KAAkC,EAAA;AAC/C,IAAA,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,EAAE,EAAE;AACvD,QAAA,OAAO,IAAI;IACf;IACA,OAAO,iBAAiB,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,CAAA,EAAG,KAAK,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC;AAC/E;AAyBA;;;;;;;;;;;;;;;;;AAiBG;MA+CU,kBAAkB,CAAA;AACV,IAAA,QAAQ,GAAG,MAAM,CAAC,0BAA0B,CAAC;IAC7C,UAAU,GAAG,MAAM,CAAC,oBAAoB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAC7D,IAAA,UAAU,GAAG,MAAM,CAA0B,UAAU,CAAC;;AAGhE,IAAA,IAAI,GAAG,KAAK;wFAAU;;IAEtB,IAAI,GAAG,KAAK,CAAgB,QAAQ;6EAAC;;IAErC,WAAW,GAAG,KAAK,CAAuB,WAAW;oFAAC;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