@wemake4u/form-controls 0.0.0-stage → 2.0.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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wemake4u-form-controls.mjs","names":[],"sources":["../../../projects/form-controls/src/lib/core/sirio-validation-display.ts","../../../projects/form-controls/src/lib/core/sirio-value-sync.ts","../../../projects/form-controls/src/lib/core/sirio-validation-presenter.ts","../../../projects/form-controls/src/lib/core/sirio-error-messages.ts","../../../projects/form-controls/src/lib/core/sirio-control-base.ts","../../../projects/form-controls/src/lib/core/sirio-option.ts","../../../projects/form-controls/src/lib/core/sirio-option-label.ts","../../../projects/form-controls/src/lib/core/sirio-text-case.ts","../../../projects/form-controls/src/lib/core/sirio-focus.ts","../../../projects/form-controls/src/lib/adorner/sirio-adorner.ts","../../../projects/form-controls/src/lib/button/sirio-button.ts","../../../projects/form-controls/src/lib/button/sirio-button.html","../../../projects/form-controls/src/lib/notification/sirio-alert.ts","../../../projects/form-controls/src/lib/notification/sirio-alert.html","../../../projects/form-controls/src/lib/notification/sirio-toast.ts","../../../projects/form-controls/src/lib/notification/sirio-toast.html","../../../projects/form-controls/src/lib/notification/sirio-notify.ts","../../../projects/form-controls/src/lib/notification/sirio-notify.html","../../../projects/form-controls/src/lib/core/sirio-collapse-animation.ts","../../../projects/form-controls/src/lib/collapse/sirio-collapse.ts","../../../projects/form-controls/src/lib/collapse/sirio-collapse.html","../../../projects/form-controls/src/lib/dialog/sirio-dialog-ref.ts","../../../projects/form-controls/src/lib/dialog/sirio-dialog.ts","../../../projects/form-controls/src/lib/dialog/sirio-dialog.html","../../../projects/form-controls/src/lib/title-bar/sirio-title-bar.ts","../../../projects/form-controls/src/lib/title-bar/sirio-title-bar.html","../../../projects/form-controls/src/lib/tooltip/sirio-tooltip.ts","../../../projects/form-controls/src/lib/filter/sirio-filter.ts","../../../projects/form-controls/src/lib/filter/sirio-filter-chips.html","../../../projects/form-controls/src/lib/filter/sirio-filter-section.html","../../../projects/form-controls/src/lib/filter/sirio-filter.html","../../../projects/form-controls/src/lib/progress/sirio-progress.ts","../../../projects/form-controls/src/lib/progress/sirio-progress.html","../../../projects/form-controls/src/lib/carousel/sirio-carousel.ts","../../../projects/form-controls/src/lib/carousel/sirio-carousel.html","../../../projects/form-controls/src/lib/breadcrumb/sirio-breadcrumb.ts","../../../projects/form-controls/src/lib/breadcrumb/sirio-breadcrumb.html","../../../projects/form-controls/src/lib/hero/sirio-hero.ts","../../../projects/form-controls/src/lib/hero/sirio-hero.html","../../../projects/form-controls/src/lib/tooltip/sirio-info-button.ts","../../../projects/form-controls/src/lib/tooltip/sirio-info-button.html","../../../projects/form-controls/src/lib/pending/sirio-pending.ts","../../../projects/form-controls/src/lib/pending/sirio-pending.html","../../../projects/form-controls/src/lib/pagination/sirio-pagination.ts","../../../projects/form-controls/src/lib/pagination/sirio-pagination.html","../../../projects/form-controls/src/lib/core/sirio-badge.ts","../../../projects/form-controls/src/lib/sidenav/sirio-sidenav.ts","../../../projects/form-controls/src/lib/sidenav/sirio-sidenav-node.html","../../../projects/form-controls/src/lib/sidenav/sirio-sidenav.html","../../../projects/form-controls/src/lib/tag/sirio-tag.ts","../../../projects/form-controls/src/lib/tag/sirio-tag.html","../../../projects/form-controls/src/lib/tag/sirio-badge-tag.ts","../../../projects/form-controls/src/lib/card/sirio-card.ts","../../../projects/form-controls/src/lib/card/sirio-card-icon-action.html","../../../projects/form-controls/src/lib/card/sirio-card.html","../../../projects/form-controls/src/lib/dropdown/sirio-dropdown.ts","../../../projects/form-controls/src/lib/dropdown/sirio-dropdown.html","../../../projects/form-controls/src/lib/dashboard/sirio-dashboard-types.ts","../../../projects/form-controls/src/lib/dashboard/sirio-dashboard-context.ts","../../../projects/form-controls/src/lib/dashboard/sirio-dashboard-token.ts","../../../projects/form-controls/src/lib/dashboard/sirio-dashboard-menu-node.ts","../../../projects/form-controls/src/lib/dashboard/sirio-dashboard-menu-node.html","../../../projects/form-controls/src/lib/dashboard/sirio-dashboard-user.ts","../../../projects/form-controls/src/lib/dashboard/sirio-dashboard-user.html","../../../projects/form-controls/src/lib/dashboard/sirio-dashboard.ts","../../../projects/form-controls/src/lib/dashboard/sirio-dashboard.html","../../../projects/form-controls/src/lib/dialog/sirio-dialog.service.ts","../../../projects/form-controls/src/lib/dialog/sirio-confirm-dialog.html","../../../projects/form-controls/src/lib/stepper/sirio-stepper.ts","../../../projects/form-controls/src/lib/stepper/sirio-stepper.html","../../../projects/form-controls/src/lib/accordion/sirio-accordion.ts","../../../projects/form-controls/src/lib/accordion/sirio-accordion-item.html","../../../projects/form-controls/src/lib/accordion/sirio-accordion.html","../../../projects/form-controls/src/lib/tabs/sirio-tabs.ts","../../../projects/form-controls/src/lib/tabs/sirio-tab.html","../../../projects/form-controls/src/lib/tabs/sirio-tabs.html","../../../projects/form-controls/src/lib/field/sirio-field.ts","../../../projects/form-controls/src/lib/field/sirio-field.html","../../../projects/form-controls/src/lib/textbox/sirio-textbox.ts","../../../projects/form-controls/src/lib/textbox/sirio-textbox.html","../../../projects/form-controls/src/lib/textarea/sirio-textarea.ts","../../../projects/form-controls/src/lib/textarea/sirio-textarea.html","../../../projects/form-controls/src/lib/number/sirio-number.ts","../../../projects/form-controls/src/lib/number/sirio-number.html","../../../projects/form-controls/src/lib/datetime/sirio-datetime-utils.ts","../../../projects/form-controls/src/lib/datetime/sirio-datetime-base.ts","../../../projects/form-controls/src/lib/datetime/vanillajs-datepicker.ts","../../../projects/form-controls/src/lib/datetime/sirio-datepicker.ts","../../../projects/form-controls/src/lib/datetime/sirio-timepicker-panel.ts","../../../projects/form-controls/src/lib/datetime/sirio-timepicker-panel.html","../../../projects/form-controls/src/lib/date/sirio-date.ts","../../../projects/form-controls/src/lib/date/sirio-date.html","../../../projects/form-controls/src/lib/time/sirio-time.ts","../../../projects/form-controls/src/lib/time/sirio-time.html","../../../projects/form-controls/src/lib/datetime/sirio-datetime.ts","../../../projects/form-controls/src/lib/datetime/sirio-datetime.html","../../../projects/form-controls/src/lib/checkbox/sirio-checkbox.ts","../../../projects/form-controls/src/lib/checkbox/sirio-checkbox.html","../../../projects/form-controls/src/lib/checklist/sirio-checklist.ts","../../../projects/form-controls/src/lib/checklist/sirio-checklist.html","../../../projects/form-controls/src/lib/radio-group/sirio-radio-group.ts","../../../projects/form-controls/src/lib/radio-group/sirio-radio-group.html","../../../projects/form-controls/src/lib/select/sirio-select.ts","../../../projects/form-controls/src/lib/select/sirio-select.html","../../../projects/form-controls/src/lib/autocomplete/sirio-autocomplete.ts","../../../projects/form-controls/src/lib/autocomplete/sirio-autocomplete.html","../../../projects/form-controls/src/lib/slider/sirio-slider.ts","../../../projects/form-controls/src/lib/slider/sirio-slider.html","../../../projects/form-controls/src/lib/file-upload/sirio-file-upload.ts","../../../projects/form-controls/src/lib/file-upload/sirio-file-upload.html","../../../projects/form-controls/src/lib/sirio-form-controls.ts"],"sourcesContent":["import { InjectionToken, Provider } from '@angular/core';\r\n\r\n/**\r\n * When the validation state (error, warning, valid) of a control is shown:\r\n * - `always`: at once, also before any interaction (default);\r\n * - `touched`: after the field has been left (blur);\r\n * - `interaction`: after the field has been left or its value changed by the user\r\n * (dates and times only after leaving the field, their partial text is naturally invalid).\r\n */\r\nexport type SirioValidationDisplay = 'always' | 'touched' | 'interaction';\r\n\r\n/** Default `validationDisplay` of every Sirio control. */\r\nexport const SIRIO_VALIDATION_DISPLAY = new InjectionToken<SirioValidationDisplay>(\r\n 'SIRIO_VALIDATION_DISPLAY',\r\n { providedIn: 'root', factory: () => 'always' },\r\n);\r\n\r\n/**\r\n * Sets the default `validationDisplay` of the Sirio controls (each control can override it).\r\n * Usage: `providers: [provideSirioValidationDisplay('touched')]`\r\n */\r\nexport function provideSirioValidationDisplay(display: SirioValidationDisplay): Provider {\r\n return { provide: SIRIO_VALIDATION_DISPLAY, useValue: display };\r\n}\r\n","import { InjectionToken, Provider } from '@angular/core';\r\n\r\n/**\r\n * Default `valueSync` of the Sirio controls: false (Angular behaviour).\r\n *\r\n * Two controls bound to the same FormControl (e.g. the same `formControlName` twice) do not update\r\n * each other: the value typed in one reaches the FormControl with `emitModelToViewChange: false`,\r\n * so the other control is not written. With `valueSync` a control also follows the value changes\r\n * of its FormControl made by another control.\r\n */\r\nexport const SIRIO_VALUE_SYNC = new InjectionToken<boolean>('SIRIO_VALUE_SYNC', {\r\n providedIn: 'root',\r\n factory: () => false,\r\n});\r\n\r\n/**\r\n * Sets the default `valueSync` of the Sirio controls (each control can override it).\r\n * Usage: `providers: [provideSirioValueSync()]`\r\n */\r\nexport function provideSirioValueSync(enabled = true): Provider {\r\n return { provide: SIRIO_VALUE_SYNC, useValue: enabled };\r\n}\r\n","import { InjectionToken, Provider } from '@angular/core';\r\nimport { AbstractControl } from '@angular/forms';\r\n\r\n/**\r\n * How an invalid control is presented:\r\n * - `invalid`: error state (kit `sirio-is-invalid`) with `message` (or the resolved error message);\r\n * - `warning`: warning state (kit `sirio-is-warning`) with `message`, the control stays invalid;\r\n * - `none`: the error exists but is not shown (e.g. \"silent\" errors revealed later by the app).\r\n */\r\nexport interface SirioValidationPresentation {\r\n state: 'invalid' | 'warning' | 'none';\r\n message?: string | null;\r\n}\r\n\r\n/**\r\n * Maps the errors of an invalid control to their presentation. Returning `null`/`undefined`\r\n * keeps the default behaviour (error state with the message resolved from the error map).\r\n */\r\nexport type SirioValidationPresenter = (\r\n control: AbstractControl,\r\n) => SirioValidationPresentation | null | undefined;\r\n\r\n/** Optional application-wide validation presenter (default: none). */\r\nexport const SIRIO_VALIDATION_PRESENTER = new InjectionToken<SirioValidationPresenter | null>(\r\n 'SIRIO_VALIDATION_PRESENTER',\r\n { providedIn: 'root', factory: () => null },\r\n);\r\n\r\n/**\r\n * Lets an application decide how errors are shown, for instance when its validators put the text\r\n * in the error payload and mark some errors as warnings.\r\n * Usage (app or component providers):\r\n * `provideSirioValidationPresenter((c) => c.errors?.['warning'] ? { state: 'warning', message: c.errors['message'] } : null)`\r\n */\r\nexport function provideSirioValidationPresenter(presenter: SirioValidationPresenter): Provider {\r\n return { provide: SIRIO_VALIDATION_PRESENTER, useValue: presenter };\r\n}\r\n","import { InjectionToken, Provider } from '@angular/core';\r\nimport { ValidationErrors } from '@angular/forms';\r\n\r\n/**\r\n * A message can be a static string or a function that receives the error payload\r\n * (e.g. `{ requiredLength, actualLength }` for `minlength`) and the field label.\r\n */\r\nexport type SirioErrorMessage = string | ((error: any, label: string) => string);\r\n\r\nexport type SirioErrorMessages = Record<string, SirioErrorMessage>;\r\n\r\n/** Default (Italian) messages for the built-in Angular validators. */\r\nexport const SIRIO_DEFAULT_ERROR_MESSAGES: SirioErrorMessages = {\r\n required: 'Campo obbligatorio',\r\n email: 'Indirizzo email non valido',\r\n pattern: 'Formato non valido',\r\n minlength: (e) => `Inserire almeno ${e.requiredLength} caratteri`,\r\n maxlength: (e) => `Inserire al massimo ${e.requiredLength} caratteri`,\r\n min: (e) => `Il valore minimo consentito è ${e.min}`,\r\n max: (e) => `Il valore massimo consentito è ${e.max}`,\r\n sirioDateTime: (e) =>\r\n e.mode === 'time'\r\n ? 'Orario non valido'\r\n : e.mode === 'datetime'\r\n ? 'Data e ora non valide'\r\n : 'Data non valida',\r\n sirioDateTimeMin: (e) =>\r\n e.mode === 'time' ? `L'orario minimo è ${e.min}` : `Inserire un valore dal ${e.min}`,\r\n sirioDateTimeMax: (e) =>\r\n e.mode === 'time' ? `L'orario massimo è ${e.max}` : `Inserire un valore fino al ${e.max}`,\r\n sirioMinSelected: (e) =>\r\n e.min === 1 ? \"Selezionare almeno un'opzione\" : `Selezionare almeno ${e.min} opzioni`,\r\n sirioMaxSelected: (e) =>\r\n e.max === 1 ? \"Selezionare al massimo un'opzione\" : `Selezionare al massimo ${e.max} opzioni`,\r\n sirioMaxFiles: (e) => `Caricare al massimo ${e.max} file`,\r\n sirioFileType: (e) =>\r\n e.files.length === 1\r\n ? `Tipo di file non consentito: ${e.files[0]}`\r\n : `Tipo di file non consentito: ${e.files.join(', ')}`,\r\n sirioFileSize: (e) =>\r\n `${e.files.length === 1 ? 'File troppo grande' : 'File troppo grandi'}: ${e.files.join(', ')} (massimo ${e.maxLabel})`,\r\n sirioOption: \"Selezionare un valore dall'elenco\",\r\n sirioSelectValue: (e) => {\r\n const shown = (e.values as unknown[]).map((v) =>\r\n typeof v === 'object' && v !== null ? JSON.stringify(v) : `\"${String(v)}\"`,\r\n );\r\n return shown.length === 1\r\n ? `${shown[0]} non è un valore valido`\r\n : `${shown.join(', ')} non sono valori validi`;\r\n },\r\n sirioDecimals: (e) =>\r\n e.max === 0 ? 'Inserire un numero intero' : `Inserire al massimo ${e.max} decimali`,\r\n};\r\n\r\n/** Global error-message map used by every Sirio control. */\r\nexport const SIRIO_ERROR_MESSAGES = new InjectionToken<SirioErrorMessages>('SIRIO_ERROR_MESSAGES', {\r\n providedIn: 'root',\r\n factory: () => SIRIO_DEFAULT_ERROR_MESSAGES,\r\n});\r\n\r\n/**\r\n * Overrides/extends the default error messages.\r\n * Usage: `providers: [provideSirioErrorMessages({ required: 'Obbligatorio' })]`\r\n */\r\nexport function provideSirioErrorMessages(messages: SirioErrorMessages): Provider {\r\n return {\r\n provide: SIRIO_ERROR_MESSAGES,\r\n useValue: { ...SIRIO_DEFAULT_ERROR_MESSAGES, ...messages },\r\n };\r\n}\r\n\r\n/**\r\n * Resolves the first error of a ValidationErrors object into a human readable message.\r\n * Priority: per-control overrides -> global map -> error payload if it is a string -> error key.\r\n */\r\nexport function resolveSirioErrorMessage(\r\n errors: ValidationErrors | null | undefined,\r\n label: string,\r\n global: SirioErrorMessages,\r\n overrides: SirioErrorMessages | null | undefined,\r\n priority: readonly string[] = [],\r\n): string | null {\r\n if (!errors) {\r\n return null;\r\n }\r\n // Errors listed in `priority` win over the others (e.g. \"invalid date\" over \"required\").\r\n const key = priority.find((k) => k in errors) ?? Object.keys(errors)[0];\r\n if (!key) {\r\n return null;\r\n }\r\n const payload = errors[key];\r\n const message = overrides?.[key] ?? global[key];\r\n if (typeof message === 'function') {\r\n return message(payload, label);\r\n }\r\n if (typeof message === 'string') {\r\n return message;\r\n }\r\n // Custom validators may return the message directly as payload.\r\n return typeof payload === 'string' ? payload : key;\r\n}\r\n","import {\r\n booleanAttribute,\r\n computed,\r\n DestroyRef,\r\n Directive,\r\n AfterContentInit,\r\n DoCheck,\r\n effect,\r\n ElementRef,\r\n forwardRef,\r\n inject,\r\n InjectionToken,\r\n Injector,\r\n input,\r\n numberAttribute,\r\n Provider,\r\n signal,\r\n Type,\r\n} from '@angular/core';\r\nimport {\r\n AbstractControl,\r\n ControlValueAccessor,\r\n NG_VALIDATORS,\r\n NG_VALUE_ACCESSOR,\r\n NgControl,\r\n Validators,\r\n ValueChangeEvent,\r\n} from '@angular/forms';\r\nimport { Subscription } from 'rxjs';\r\nimport type { SirioInfoContent } from '../tooltip/sirio-info-button';\r\nimport { SIRIO_VALIDATION_DISPLAY, SirioValidationDisplay } from './sirio-validation-display';\r\nimport { SIRIO_VALUE_SYNC } from './sirio-value-sync';\r\nimport { SIRIO_VALIDATION_PRESENTER, SirioValidationPresentation } from './sirio-validation-presenter';\r\nimport type { SirioTooltipPlacement } from '../tooltip/sirio-tooltip';\r\nimport {\r\n resolveSirioErrorMessage,\r\n SIRIO_ERROR_MESSAGES,\r\n SirioErrorMessages,\r\n} from './sirio-error-messages';\r\n\r\nlet nextUniqueId = 0;\r\n\r\n/** Sirio validation states (classes sirio-is-* on the field, sirio-text-* on the label). */\r\nexport type SirioValidationState = 'invalid' | 'warning' | 'valid';\r\n\r\n/** Generates a unique DOM id for a Sirio control. */\r\nexport function sirioUniqueId(prefix = 'sirio'): string {\r\n return `${prefix}-${++nextUniqueId}`;\r\n}\r\n\r\n/**\r\n * Every Sirio control registers itself under this token, so tools can find the Sirio controls of a\r\n * view generically (e.g. `contentChildren(SIRIO_CONTROL, { descendants: true })`).\r\n */\r\nexport const SIRIO_CONTROL = new InjectionToken<SirioControlBase<unknown>>('SIRIO_CONTROL');\r\n\r\n/**\r\n * Registers a Sirio control as ControlValueAccessor (and optionally as Validator) of its host,\r\n * and under SIRIO_CONTROL.\r\n * Usage in a component: `providers: [provideSirioControl(() => MyControl)]`\r\n * or `provideSirioControl(() => MyControl, { validator: true })` when it implements Validator.\r\n */\r\nexport function provideSirioControl(\r\n type: () => Type<unknown>,\r\n options: { validator?: boolean } = {},\r\n): Provider[] {\r\n const providers: Provider[] = [\r\n { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(type), multi: true },\r\n { provide: SIRIO_CONTROL, useExisting: forwardRef(type) },\r\n ];\r\n if (options.validator) {\r\n providers.push({ provide: NG_VALIDATORS, useExisting: forwardRef(type), multi: true });\r\n }\r\n return providers;\r\n}\r\n\r\n/**\r\n * Base class for every Sirio data-entry control.\r\n *\r\n * - Implements ControlValueAccessor, so the control works with\r\n * `formControl`, `formControlName` and `ngModel` (any AbstractControl).\r\n * - Registered as NG_VALUE_ACCESSOR (and NG_VALIDATORS when the control validates itself)\r\n * through `provideSirioControl`. The NgControl of the host is read lazily to access the bound\r\n * AbstractControl and render its validation state (eager injection would be circular).\r\n * - Listens to `AbstractControl.events` and exposes the control state as signals,\r\n * so OnPush/zoneless rendering stays in sync (touched, dirty, status, errors).\r\n */\r\n@Directive()\r\nexport abstract class SirioControlBase<T> implements ControlValueAccessor, DoCheck, AfterContentInit {\r\n // ---- Common inputs -------------------------------------------------------------------------\r\n readonly label = input<string>('');\r\n /**\r\n * Accessible name read by screen readers instead of the label (e.g. a field without visible label).\r\n * With a visible label, include its text (WCAG 2.5.3 \"Label in Name\").\r\n */\r\n readonly ariaLabel = input<string | null>(null);\r\n readonly helpText = input<string>('');\r\n readonly placeholder = input<string>('');\r\n readonly inputId = input<string>(sirioUniqueId());\r\n readonly name = input<string | null>(null);\r\n readonly readonly = input(false, { transform: booleanAttribute });\r\n /** Visual \"required\" marker. It is also inferred from Validators.required on the bound control. */\r\n readonly required = input(false, { transform: booleanAttribute });\r\n /** Disabled state when the component is used without Angular forms. */\r\n readonly disabledInput = input(false, { alias: 'disabled', transform: booleanAttribute });\r\n /** Per-control error-message overrides (merged on top of SIRIO_ERROR_MESSAGES). */\r\n readonly errorMessages = input<SirioErrorMessages | null>(null);\r\n /**\r\n * Shows the Sirio \"valid\" state (sirio-is-valid, green label) when the control is valid,\r\n * has a value and has been touched or changed.\r\n */\r\n readonly showValid = input(false, { transform: booleanAttribute });\r\n /** Optional text shown under the field in the \"valid\" state. */\r\n readonly validMessage = input<string>('');\r\n /**\r\n * Non-blocking warning (Sirio \"warning\" state: sirio-is-warning, orange label + message).\r\n * Shown whenever set, unless the field is invalid.\r\n */\r\n readonly warningMessage = input<string | null>(null);\r\n /**\r\n * When the validation state is shown: `always` (default, also before any interaction),\r\n * `touched` (after leaving the field) or `interaction` (after leaving it or changing its value).\r\n * The application default is set with `provideSirioValidationDisplay()`.\r\n */\r\n readonly validationDisplay = input<SirioValidationDisplay | null>(null);\r\n /**\r\n * Follows the value changes of the bound FormControl made by another control bound to the same\r\n * FormControl (Angular does not write them back to the other controls). null = application\r\n * default (`provideSirioValueSync()`, false otherwise).\r\n */\r\n readonly valueSync = input<boolean | null, unknown>(null, {\r\n transform: (v: unknown) => (v === null || v === undefined ? null : booleanAttribute(v)),\r\n });\r\n /**\r\n * Help shown in a popover from the info button next to the label (kit `fa-info-circle` with\r\n * `data-sirio-toggle=\"popover\"`): plain text or a template. null = no button.\r\n */\r\n readonly info = input<SirioInfoContent | null>(null);\r\n /** Title of the info popover (default: the label). */\r\n readonly infoTitle = input<string | null>(null);\r\n /** Accessible name of the info button, followed by the label (\"Informazioni su Codice fiscale\"). */\r\n readonly infoLabel = input('Informazioni su');\r\n /** Position of the info popover. */\r\n readonly infoPlacement = input<SirioTooltipPlacement>('right');\r\n /**\r\n * Spinner while an async validator runs (control status PENDING); the visible text is none,\r\n * screen readers announce `pendingLabel`.\r\n */\r\n readonly showPending = input(true, { transform: booleanAttribute });\r\n /** Text announced by screen readers while the async validation runs. */\r\n readonly pendingLabel = input('Verifica in corso');\r\n /** Milliseconds before the spinner appears (fast validations show nothing). */\r\n readonly pendingDelay = input(300, {\r\n transform: (v: unknown) => Math.max(0, numberAttribute(v, 300)),\r\n });\r\n\r\n /** Accessible name of the info button. */\r\n readonly infoButtonLabel = computed(() => `${this.infoLabel()} ${this.label()}`.trim());\r\n /** Id of the label text (without the info button), for aria-labelledby on fieldsets. */\r\n readonly labelTextId = computed(() => `${this.inputId()}-label-text`);\r\n\r\n // ---- Internal state ------------------------------------------------------------------------\r\n protected readonly value = signal<T | null>(null);\r\n private readonly cvaDisabled = signal(false);\r\n /** Incremented on every AbstractControl event: used to re-evaluate computed signals. */\r\n private readonly controlTick = signal(0);\r\n\r\n private readonly injector = inject(Injector);\r\n private ngControl: NgControl | null | undefined;\r\n private readonly globalMessages = inject(SIRIO_ERROR_MESSAGES);\r\n private readonly destroyRef = inject(DestroyRef);\r\n\r\n private trackedControl: AbstractControl | null = null;\r\n private controlSubscription: Subscription | null = null;\r\n\r\n private onChange: (value: T | null) => void = () => {};\r\n private onTouched: () => void = () => {};\r\n\r\n readonly isDisabled = computed(() => this.cvaDisabled() || this.disabledInput());\r\n\r\n readonly labelId = computed(() => `${this.inputId()}-label`);\r\n /** Id of the hidden element with `ariaLabel` (controls named with aria-labelledby). */\r\n readonly ariaLabelId = computed(() => `${this.inputId()}-aria-label`);\r\n readonly helpId = computed(() => `${this.inputId()}-help`);\r\n readonly errorId = computed(() => `${this.inputId()}-error`);\r\n\r\n /**\r\n * The bound AbstractControl (null when used standalone).\r\n * `equal: () => false` forces dependents to re-evaluate on every control event,\r\n * because the instance stays the same while its state (touched, errors, ...) changes.\r\n */\r\n readonly control = computed<AbstractControl | null>(\r\n () => {\r\n this.controlTick();\r\n return this.trackedControl;\r\n },\r\n { equal: () => false },\r\n );\r\n\r\n readonly isRequired = computed(() => {\r\n const control = this.control();\r\n return (\r\n this.required() ||\r\n !!control?.hasValidator(Validators.required) ||\r\n !!control?.hasValidator(Validators.requiredTrue)\r\n );\r\n });\r\n\r\n /** An async validator is running on the bound control (status PENDING). */\r\n readonly isPending = computed(() => !!this.control()?.pending);\r\n\r\n /** The pending indicator is shown: PENDING for at least `pendingDelay` ms. */\r\n readonly pendingVisible = signal(false);\r\n\r\n private readonly defaultValidationDisplay = inject(SIRIO_VALIDATION_DISPLAY);\r\n private readonly defaultValueSync = inject(SIRIO_VALUE_SYNC);\r\n\r\n /** The validation state can be shown, according to `validationDisplay`. */\r\n readonly stateShown = computed(() => {\r\n const control = this.control();\r\n if (!control) {\r\n return false;\r\n }\r\n switch (this.validationDisplay() ?? this.defaultValidationDisplay) {\r\n case 'touched':\r\n return control.touched;\r\n case 'interaction':\r\n return control.touched || (this.showErrorsWhenDirty && control.dirty);\r\n default:\r\n return true;\r\n }\r\n });\r\n\r\n private readonly presenter = inject(SIRIO_VALIDATION_PRESENTER);\r\n private readonly hostElement = inject<ElementRef<HTMLElement>>(ElementRef);\r\n\r\n /** Presentation of the current errors decided by SIRIO_VALIDATION_PRESENTER (null = default). */\r\n readonly presentation = computed<SirioValidationPresentation | null>(() => {\r\n const control = this.control();\r\n if (!this.presenter || !control?.invalid) {\r\n return null;\r\n }\r\n return this.presenter(control) ?? null;\r\n });\r\n\r\n /** Errors of the bound control, shown according to `validationDisplay` (and the presenter). */\r\n readonly showError = computed(() => {\r\n const state = this.presentation()?.state;\r\n return !!this.control()?.invalid && this.stateShown() && state !== 'none' && state !== 'warning';\r\n });\r\n\r\n /** Warning text: from the presenter (invalid control shown as warning) or `warningMessage`. */\r\n readonly warningText = computed(() => {\r\n const presentation = this.presentation();\r\n if (presentation?.state === 'warning' && this.stateShown()) {\r\n return presentation.message || this.warningMessage() || ' ';\r\n }\r\n return this.warningMessage();\r\n });\r\n\r\n /**\r\n * With `validationDisplay=\"interaction\"`, when false errors appear only after the field is left\r\n * (touched), not while typing. Used by controls whose partial input is naturally invalid (dates, times).\r\n */\r\n protected readonly showErrorsWhenDirty: boolean = true;\r\n\r\n /** Error keys shown first when several errors are present (see resolveSirioErrorMessage). */\r\n protected readonly errorPriority: readonly string[] = [];\r\n\r\n readonly errorMessage = computed(() => {\r\n const control = this.control();\r\n if (!this.showError() || !control) {\r\n return null;\r\n }\r\n const message = this.presentation()?.message;\r\n if (message) {\r\n return message;\r\n }\r\n return resolveSirioErrorMessage(\r\n control.errors,\r\n this.label(),\r\n this.globalMessages,\r\n this.errorMessages(),\r\n this.errorPriority,\r\n );\r\n });\r\n\r\n /** Current Sirio validation state: invalid > warning > valid (opt-in) > none. */\r\n readonly validationState = computed<SirioValidationState | null>(() => {\r\n if (this.showError()) {\r\n return 'invalid';\r\n }\r\n if (this.warningText()) {\r\n return 'warning';\r\n }\r\n const control = this.control();\r\n if (\r\n this.showValid() &&\r\n control &&\r\n control.valid &&\r\n this.stateShown() &&\r\n this.hasValue(control.value)\r\n ) {\r\n return 'valid';\r\n }\r\n return null;\r\n });\r\n\r\n /** Text of the Sirio feedback under the field for the current state (null = hidden). */\r\n readonly feedbackMessage = computed(() => {\r\n switch (this.validationState()) {\r\n case 'invalid':\r\n return this.errorMessage();\r\n case 'warning':\r\n return this.warningText() || null;\r\n case 'valid':\r\n return this.validMessage() || null;\r\n default:\r\n return null;\r\n }\r\n });\r\n\r\n /** Space separated ids for aria-describedby. */\r\n readonly describedBy = computed(() => {\r\n const ids: string[] = [...this.describedByExtra()];\r\n if (this.helpText()) {\r\n ids.push(this.helpId());\r\n }\r\n if (this.feedbackMessage()) {\r\n ids.push(this.errorId());\r\n }\r\n return ids.length ? ids.join(' ') : null;\r\n });\r\n\r\n /** Moves the focus to the first focusable element of the control (its input). */\r\n focus(options?: FocusOptions): void {\r\n this.hostElement.nativeElement\r\n .querySelector<HTMLElement>(\r\n 'input:not([type=hidden]):not([disabled]), textarea:not([disabled]), select:not([disabled]), button:not([disabled]), [tabindex]:not([tabindex=\"-1\"])',\r\n )\r\n ?.focus(options);\r\n }\r\n\r\n constructor() {\r\n this.destroyRef.onDestroy(() => this.controlSubscription?.unsubscribe());\r\n // Pending indicator: shown after the delay, hidden as soon as the validation ends.\r\n effect((onCleanup) => {\r\n if (!this.isPending() || !this.showPending()) {\r\n this.pendingVisible.set(false);\r\n return;\r\n }\r\n const delay = this.pendingDelay();\r\n if (delay === 0) {\r\n this.pendingVisible.set(true);\r\n return;\r\n }\r\n const timer = setTimeout(() => this.pendingVisible.set(true), delay);\r\n onCleanup(() => clearTimeout(timer));\r\n });\r\n }\r\n\r\n /**\r\n * The AbstractControl instance is attached by FormControlName/NgModel after this component\r\n * is created (and may be swapped at runtime via [formControl]), so it is tracked here.\r\n */\r\n ngDoCheck(): void {\r\n this.syncControl();\r\n }\r\n\r\n /**\r\n * Directives of the host element run their hooks after the component's ngDoCheck: on the first\r\n * check a FormControlName has not created its control yet. Content init comes after all of them,\r\n * so the control is found in the first change detection (no wait for the next one).\r\n */\r\n ngAfterContentInit(): void {\r\n this.syncControl();\r\n }\r\n\r\n private syncControl(): void {\r\n // Resolved on first check: all directives of the host element exist by now.\r\n if (this.ngControl === undefined) {\r\n this.ngControl = this.injector.get(NgControl, null, { self: true, optional: true });\r\n }\r\n const control = this.ngControl?.control ?? null;\r\n if (control !== this.trackedControl) {\r\n this.controlSubscription?.unsubscribe();\r\n this.trackedControl = control;\r\n this.controlSubscription =\r\n control?.events.subscribe((event) => {\r\n this.controlTick.update((v) => v + 1);\r\n if (event instanceof ValueChangeEvent) {\r\n this.syncValue(event.value);\r\n }\r\n }) ?? null;\r\n this.controlTick.update((v) => v + 1);\r\n }\r\n }\r\n\r\n /**\r\n * valueSync: writes a value of the FormControl that differs from the shown one (a change made by\r\n * another control bound to the same FormControl). The control that made the change already shows\r\n * it and is not rewritten; an incomplete text being typed is not replaced.\r\n */\r\n private syncValue(modelValue: unknown): void {\r\n if (!(this.valueSync() ?? this.defaultValueSync) || this.isTypingIncomplete()) {\r\n return;\r\n }\r\n if (this.sameValue(this.fromModel(modelValue), this.value())) {\r\n return;\r\n }\r\n this.writeValue(modelValue as T | null);\r\n }\r\n\r\n // ---- ControlValueAccessor --------------------------------------------------------------------\r\n writeValue(value: T | null): void {\r\n this.value.set(this.fromModel(value));\r\n }\r\n\r\n registerOnChange(fn: (value: T | null) => void): void {\r\n this.onChange = fn;\r\n }\r\n\r\n registerOnTouched(fn: () => void): void {\r\n this.onTouched = fn;\r\n }\r\n\r\n setDisabledState(isDisabled: boolean): void {\r\n this.cvaDisabled.set(isDisabled);\r\n }\r\n\r\n // ---- Helpers for derived components ----------------------------------------------------------\r\n /** True when a model value counts as \"filled\" for the valid state. */\r\n protected hasValue(value: unknown): boolean {\r\n return !(\r\n value === null ||\r\n value === undefined ||\r\n value === '' ||\r\n value === false ||\r\n (Array.isArray(value) && !value.length)\r\n );\r\n }\r\n\r\n /** Additional element ids for aria-describedby (override in derived classes; may read signals). */\r\n protected describedByExtra(): string[] {\r\n return [];\r\n }\r\n\r\n /** Updates the internal value and notifies Angular forms. */\r\n protected updateValue(value: T | null): void {\r\n this.value.set(value);\r\n this.onChange(this.toModel(value));\r\n }\r\n\r\n /** Marks the control as touched (call it on blur). */\r\n protected markTouched(): void {\r\n this.onTouched();\r\n }\r\n\r\n /**\r\n * True while the user is typing a text that is not a value yet (e.g. a partial date): valueSync\r\n * does not replace it. Override in controls with partial input.\r\n */\r\n protected isTypingIncomplete(): boolean {\r\n return false;\r\n }\r\n\r\n /** Equality of two internal values for valueSync (arrays item by item with `sameItem`). */\r\n protected sameValue(a: T | null, b: T | null): boolean {\r\n if (Array.isArray(a) && Array.isArray(b)) {\r\n return a.length === b.length && a.every((item, i) => this.sameItem(item, b[i]));\r\n }\r\n return this.sameItem(a, b);\r\n }\r\n\r\n /** Equality of two values (or array items); controls with `compareWith` use it. */\r\n protected sameItem(a: unknown, b: unknown): boolean {\r\n return a === b;\r\n }\r\n\r\n /** Hook to convert the model value into the internal value (override when they differ). */\r\n protected fromModel(value: unknown): T | null {\r\n return (value ?? null) as T | null;\r\n }\r\n\r\n /** Hook to convert the internal value into the model value (override when they differ). */\r\n protected toModel(value: T | null): any {\r\n return value;\r\n }\r\n}\r\n","/** Option used by selection controls (select, radio group). */\r\nexport interface SirioOption<T = unknown> {\r\n value: T;\r\n label: string;\r\n disabled?: boolean;\r\n}\r\n\r\n/** Comparison function used to match the model value against option values. */\r\nexport type SirioCompareWith<T = unknown> = (a: T | null, b: T | null) => boolean;\r\n\r\nexport const sirioDefaultCompare: SirioCompareWith<any> = (a, b) => a === b;\r\n","import { Directive, inject, TemplateRef } from '@angular/core';\r\nimport { SirioOption } from './sirio-option';\r\n\r\n/** Context of a `wmSirioOptionLabel` template: the option and its index. */\r\nexport interface SirioOptionLabelContext<T = unknown> {\r\n $implicit: SirioOption<T>;\r\n index: number;\r\n}\r\n\r\n/**\r\n * Custom label of the options of `wm-sirio-checklist` and `wm-sirio-radio-group` (e.g. text with markup).\r\n * The template is rendered inside the kit `<label>` of each option, so it must contain inline\r\n * elements only (`span`, `strong`, `em`, `a`). Without it the label is `option.label`.\r\n *\r\n * ```html\r\n * <wm-sirio-checklist label=\"Servizi\" [options]=\"servizi\" formControlName=\"servizi\">\r\n * <ng-template wmSirioOptionLabel let-option>\r\n * <strong>{{ option.label }}</strong>\r\n * </ng-template>\r\n * </wm-sirio-checklist>\r\n * ```\r\n */\r\n@Directive({ selector: 'ng-template[wmSirioOptionLabel]' })\r\nexport class SirioOptionLabel<T = unknown> {\r\n readonly template = inject<TemplateRef<SirioOptionLabelContext<T>>>(TemplateRef);\r\n\r\n static ngTemplateContextGuard<T>(\r\n _dir: SirioOptionLabel<T>,\r\n ctx: unknown,\r\n ): ctx is SirioOptionLabelContext<T> {\r\n return true;\r\n }\r\n}\r\n","/**\r\n * Character casing applied to the text typed or pasted by the user.\r\n * - `none`: text is kept as typed\r\n * - `upper`: converted to upper case (e.g. codice fiscale, targa)\r\n * - `lower`: converted to lower case (e.g. email, username)\r\n */\r\nexport type SirioTextCase = 'none' | 'upper' | 'lower';\r\n\r\n/** Converts a string according to the given casing, using the application locale. */\r\nexport function applyTextCase(value: string, textCase: SirioTextCase, locale?: string): string {\r\n switch (textCase) {\r\n case 'upper':\r\n return value.toLocaleUpperCase(locale);\r\n case 'lower':\r\n return value.toLocaleLowerCase(locale);\r\n default:\r\n return value;\r\n }\r\n}\r\n\r\n/**\r\n * Applies the casing to an input/textarea element in place, preserving the caret position.\r\n * Returns the (possibly converted) value.\r\n */\r\nexport function applyTextCaseToElement(\r\n el: HTMLInputElement | HTMLTextAreaElement,\r\n textCase: SirioTextCase,\r\n locale?: string,\r\n): string {\r\n const original = el.value;\r\n const converted = applyTextCase(original, textCase, locale);\r\n if (converted === original) {\r\n return original;\r\n }\r\n\r\n // Some conversions change the length (e.g. 'ß' -> 'SS'): shift the caret accordingly.\r\n const delta = converted.length - original.length;\r\n const start = el.selectionStart;\r\n const end = el.selectionEnd;\r\n el.value = converted;\r\n // selectionStart is null for input types without selection support (e.g. email).\r\n if (start !== null && end !== null) {\r\n try {\r\n el.setSelectionRange(start + delta, end + delta);\r\n } catch {\r\n // Ignore: the element type does not support selection ranges.\r\n }\r\n }\r\n return converted;\r\n}\r\n","import { afterNextRender, Injector } from '@angular/core';\r\n\r\n/** Elements that can receive the focus (disabled ones excluded). */\r\nconst FOCUSABLE =\r\n 'a[href], area[href], input:not([disabled]):not([type=hidden]), select:not([disabled]), ' +\r\n 'textarea:not([disabled]), button:not([disabled]), iframe, [tabindex]:not([tabindex=\"-1\"]), ' +\r\n '[contenteditable]:not([contenteditable=\"false\"])';\r\n\r\n/** First focusable and visible element in `container` (null when there is none). */\r\nexport function sirioFirstFocusable(container: HTMLElement): HTMLElement | null {\r\n for (const el of Array.from(container.querySelectorAll<HTMLElement>(FOCUSABLE))) {\r\n if (el.tabIndex < 0 || el.closest('[hidden], [inert], [aria-hidden=\"true\"]')) {\r\n continue;\r\n }\r\n if (!isRendered(el)) {\r\n continue;\r\n }\r\n return el;\r\n }\r\n return null;\r\n}\r\n\r\n/** A form field has the focus. */\r\nfunction fieldFocused(doc: Document): boolean {\r\n const active = doc.activeElement as HTMLElement | null;\r\n return !!active && active.matches('input, select, textarea, [contenteditable]:not([contenteditable=\"false\"])');\r\n}\r\n\r\n/** Not hidden by display: none / visibility: hidden on the element or on an ancestor (e.g. a hidden panel). */\r\nfunction isRendered(el: HTMLElement): boolean {\r\n if (typeof el.checkVisibility === 'function') {\r\n return el.checkVisibility({ visibilityProperty: true });\r\n }\r\n for (let node: HTMLElement | null = el; node; node = node.parentElement) {\r\n const style = getComputedStyle(node);\r\n if (style.display === 'none' || style.visibility === 'hidden') {\r\n return false;\r\n }\r\n }\r\n return true;\r\n}\r\n\r\n/**\r\n * Moves the focus to the first focusable element of a content after the next rendering, in a later task\r\n * (after the focus set by the page while it renders, e.g. on its first field). The content may be created\r\n * a little later (lazy templates, fields created by the content itself): a few more attempts are made\r\n * before giving up; when the focused element is then re-created by its component (focus lost on the\r\n * body), the focus is set again.\r\n */\r\nexport function sirioFocusContent(\r\n container: () => HTMLElement | null,\r\n injector: Injector,\r\n options: { initial?: boolean } = {},\r\n): void {\r\n const first = () => {\r\n const el = container();\r\n return el ? sirioFirstFocusable(el) : null;\r\n };\r\n const attempt = (retries: number) => {\r\n const target = first();\r\n // Initial focus (content shown when the page is created): a field already focused (e.g. by another\r\n // component created before) keeps the focus.\r\n if (target && options.initial && fieldFocused(target.ownerDocument)) {\r\n return;\r\n }\r\n if (target) {\r\n target.focus();\r\n setTimeout(() => {\r\n const active = target.ownerDocument.activeElement;\r\n if (!active || active === target.ownerDocument.body) {\r\n first()?.focus();\r\n }\r\n }, 150);\r\n } else if (retries > 0) {\r\n setTimeout(() => attempt(retries - 1), 50);\r\n }\r\n };\r\n afterNextRender(() => setTimeout(() => attempt(8)), { injector });\r\n}\r\n","import { computed, contentChild, Directive, ElementRef, inject, input } from '@angular/core';\r\nimport { SirioControlBase } from '../core/sirio-control-base';\r\nimport { SirioTextAlign } from '../core/sirio-text-align';\r\n\r\n/**\r\n * Base for the prefix/suffix marker directives.\r\n * Text-like hosts get the Sirio `sirio-input-group-text` style automatically;\r\n * buttons are left untouched so they can use `sirio-btn sirio-btn-icon`.\r\n */\r\n@Directive()\r\nabstract class SirioAdornerBase {\r\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\r\n /** True when the host should be rendered as a Sirio input-group text box. */\r\n protected readonly textStyle =\r\n this.host.tagName !== 'BUTTON' && !this.host.classList.contains('sirio-btn');\r\n}\r\n\r\n/**\r\n * Marks projected content rendered before the input of `wm-sirio-textbox` / `wm-sirio-number`.\r\n *\r\n * ```html\r\n * <wm-sirio-textbox label=\"Utente\" formControlName=\"user\">\r\n * <span wmSirioPrefix><i class=\"fa-solid fa-user\" aria-hidden=\"true\"></i></span>\r\n * </wm-sirio-textbox>\r\n * ```\r\n */\r\n@Directive({\r\n selector: '[wmSirioPrefix]',\r\n host: { '[class.sirio-input-group-text]': 'textStyle' },\r\n})\r\nexport class SirioPrefix extends SirioAdornerBase {}\r\n\r\n/**\r\n * Marks projected content rendered after the input of `wm-sirio-textbox` / `wm-sirio-number`.\r\n *\r\n * ```html\r\n * <wm-sirio-textbox label=\"Password\" type=\"password\" formControlName=\"pwd\">\r\n * <button wmSirioSuffix type=\"button\" class=\"sirio-btn sirio-btn-icon\" aria-label=\"Mostra\">...</button>\r\n * </wm-sirio-textbox>\r\n * ```\r\n */\r\n@Directive({\r\n selector: '[wmSirioSuffix]',\r\n host: { '[class.sirio-input-group-text]': 'textStyle' },\r\n})\r\nexport class SirioSuffix extends SirioAdornerBase {}\r\n\r\n/**\r\n * Base for controls that support adorners (text or projected content) before/after the input,\r\n * rendered with the Sirio `sirio-input-group` layout.\r\n */\r\n@Directive()\r\nexport abstract class SirioAdornedControlBase<T> extends SirioControlBase<T> {\r\n /** Plain-text prefix (e.g. '€', 'https://'). For icons or buttons use `[wmSirioPrefix]` content. */\r\n readonly prefix = input<string>('');\r\n /** Plain-text suffix (e.g. '%', 'kg', '.it'). For icons or buttons use `[wmSirioSuffix]` content. */\r\n readonly suffix = input<string>('');\r\n\r\n /** Text alignment inside the input, placeholder included (null = Sirio default). */\r\n readonly textAlign = input<SirioTextAlign | null>(null);\r\n\r\n protected readonly prefixContent = contentChild(SirioPrefix);\r\n protected readonly suffixContent = contentChild(SirioSuffix);\r\n\r\n readonly prefixId = computed(() => `${this.inputId()}-prefix`);\r\n readonly suffixId = computed(() => `${this.inputId()}-suffix`);\r\n\r\n readonly hasAdorners = computed(\r\n () => !!this.prefix() || !!this.suffix() || !!this.prefixContent() || !!this.suffixContent(),\r\n );\r\n\r\n /** Text adorners are announced by screen readers together with the input (e.g. \"€\", \"%\"). */\r\n protected override describedByExtra(): string[] {\r\n const ids: string[] = [];\r\n if (this.prefix()) {\r\n ids.push(this.prefixId());\r\n }\r\n if (this.suffix()) {\r\n ids.push(this.suffixId());\r\n }\r\n return ids;\r\n }\r\n}\r\n","import {\r\n booleanAttribute,\r\n ChangeDetectionStrategy,\r\n Component,\r\n computed,\r\n DestroyRef,\r\n ElementRef,\r\n inject,\r\n input,\r\n isDevMode,\r\n} from '@angular/core';\r\n\r\n/**\r\n * Variants of the Sirio web kit \"Bottoni\":\r\n * - `primary`: main actions (`sirio-btn-primary`);\r\n * - `secondary`: the action opposite to the primary one (`sirio-btn-secondary`);\r\n * - `tertiary`: independent or minor actions (`sirio-btn-tertiary`);\r\n * - `tertiary-light`: tertiary on dark backgrounds (`sirio-btn-tertiary-light`);\r\n * - `ghost`: \"fantasma\", plain `sirio-btn`;\r\n * - `danger`: destructive actions (`sirio-btn-danger`), always with a visible text.\r\n */\r\nexport type SirioButtonVariant =\r\n | 'primary'\r\n | 'secondary'\r\n | 'tertiary'\r\n | 'tertiary-light'\r\n | 'ghost'\r\n | 'danger';\r\n\r\n/**\r\n * Sizes of the kit: `default`, `small` (`sirio-btn-small`, icon buttons in tight spaces such as\r\n * table cells) and `medium` (`sirio-btn-medium`, e.g. Title Bar actions).\r\n */\r\nexport type SirioButtonSize = 'default' | 'small' | 'medium';\r\n\r\nconst VARIANT_CLASS: Record<SirioButtonVariant, string | null> = {\r\n primary: 'sirio-btn-primary',\r\n secondary: 'sirio-btn-secondary',\r\n tertiary: 'sirio-btn-tertiary',\r\n 'tertiary-light': 'sirio-btn-tertiary-light',\r\n ghost: null,\r\n danger: 'sirio-btn-danger',\r\n};\r\n\r\n/** Options of {@link sirioButtonClasses}. */\r\nexport interface SirioButtonClassOptions {\r\n size?: SirioButtonSize;\r\n iconOnly?: boolean;\r\n block?: boolean;\r\n white?: boolean;\r\n}\r\n\r\n/**\r\n * Kit classes of a button (`sirio-btn sirio-btn-primary sirio-btn-icon ...`), for components that\r\n * render their own buttons (e.g. the dropdown trigger).\r\n */\r\nexport function sirioButtonClasses(\r\n variant: SirioButtonVariant,\r\n options: SirioButtonClassOptions = {},\r\n): string {\r\n const classes = ['sirio-btn'];\r\n const variantClass = VARIANT_CLASS[variant];\r\n if (variantClass) {\r\n classes.push(variantClass);\r\n }\r\n if (options.iconOnly) {\r\n classes.push('sirio-btn-icon');\r\n }\r\n if (options.size && options.size !== 'default') {\r\n classes.push(`sirio-btn-${options.size}`);\r\n }\r\n if (options.block) {\r\n classes.push('sirio-btn-block');\r\n }\r\n if (options.white) {\r\n classes.push('sirio-btn-white');\r\n }\r\n return classes.join(' ');\r\n}\r\n\r\n/**\r\n * Button of the Sirio web kit (\"Bottoni\"), applied to a native `<button>` or `<a>`: the element\r\n * keeps its native behaviour (type, form submit, click, routerLink, href) and gets the kit classes\r\n * and the icon markup (`<span class=\"fas fa-...\" aria-hidden=\"true\">`).\r\n *\r\n * ```html\r\n * <button wmSirioButton type=\"submit\">Invia</button>\r\n * <button wmSirioButton=\"secondary\" icon=\"fa-arrow-right\">Avanti</button>\r\n * <button wmSirioButton=\"tertiary\" icon=\"fa-trash\" iconOnly label=\"Elimina riga\"></button>\r\n * <a wmSirioButton=\"ghost\" routerLink=\"/home\">Torna alla home</a>\r\n * <button wmSirioButton=\"ghost\" size=\"medium\" icon=\"fa-arrow-left\" iconPosition=\"start\" [white]=\"true\">Medio</button>\r\n * ```\r\n *\r\n * Icon-only buttons (`iconOnly`, `sirio-btn-icon`) take their accessible name and tooltip from\r\n * `label` (kit: `aria-label` + `title`). On `<a>` the disabled state is rendered with the kit\r\n * class `disabled`, `aria-disabled` and removal from the tab order, and clicks are blocked.\r\n */\r\n@Component({\r\n selector: 'button[wmSirioButton], a[wmSirioButton]',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n host: {\r\n class: 'sirio-btn',\r\n '[class]': 'variantClasses()',\r\n '[attr.aria-label]': 'iconOnly() ? label() || null : null',\r\n '[attr.title]': 'iconOnly() ? label() || null : null',\r\n // Native disabled on <button>; kit \"disabled\" class + ARIA on <a> (no disabled attribute).\r\n '[attr.disabled]': '!isAnchor && disabled() ? \"\" : null',\r\n '[class.disabled]': 'isAnchor && disabled()',\r\n '[attr.aria-disabled]': 'isAnchor && disabled() ? \"true\" : null',\r\n '[attr.tabindex]': 'isAnchor && disabled() ? -1 : null',\r\n },\r\n templateUrl: './sirio-button.html',\r\n})\r\nexport class SirioButton {\r\n /** Variant (the attribute value): `<button wmSirioButton=\"secondary\">`; empty = primary. */\r\n readonly variant = input<SirioButtonVariant, SirioButtonVariant | '' | null | undefined>(\r\n 'primary',\r\n { alias: 'wmSirioButton', transform: (v) => (v ? v : 'primary') },\r\n );\r\n readonly size = input<SirioButtonSize>('default');\r\n /** Font Awesome icon (`fa-arrow-right`, or the full classes `fas fa-arrow-right`). */\r\n readonly icon = input<string | null>(null);\r\n /** Icon after the text (kit default) or before it (kit \"medium\" examples). */\r\n readonly iconPosition = input<'start' | 'end'>('end');\r\n /** Only the icon (`sirio-btn-icon`): `label` becomes aria-label and title. */\r\n readonly iconOnly = input(false, { transform: booleanAttribute });\r\n /** Accessible name and tooltip of an icon-only button. */\r\n readonly label = input<string | null>(null);\r\n /** Full width (`sirio-btn-block`). */\r\n readonly block = input(false, { transform: booleanAttribute });\r\n /** White text for dark backgrounds (`sirio-btn-white`, kit \"Medium BGBlack\"). */\r\n readonly white = input(false, { transform: booleanAttribute });\r\n readonly disabled = input(false, { transform: booleanAttribute });\r\n\r\n private readonly element = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\r\n protected readonly isAnchor = this.element.tagName === 'A';\r\n\r\n protected readonly variantClasses = computed(() =>\r\n sirioButtonClasses(this.variant(), {\r\n size: this.size(),\r\n iconOnly: this.iconOnly(),\r\n block: this.block(),\r\n white: this.white(),\r\n }),\r\n );\r\n\r\n protected readonly iconClasses = computed(() => {\r\n const icon = (this.icon() ?? '').trim();\r\n // \"fa-arrow-right\" -> \"fas fa-arrow-right\"; full class lists are used as given.\r\n return icon.includes(' ') ? icon : `fas ${icon}`;\r\n });\r\n\r\n constructor() {\r\n // Capture phase: runs before the (click) handlers bound on the element by the consumer.\r\n const blockDisabled = (event: Event) => this.onClick(event);\r\n this.element.addEventListener('click', blockDisabled, true);\r\n inject(DestroyRef).onDestroy(() =>\r\n this.element.removeEventListener('click', blockDisabled, true),\r\n );\r\n if (isDevMode()) {\r\n queueMicrotask(() => this.checkUsage());\r\n }\r\n }\r\n\r\n protected onClick(event: Event): void {\r\n // A disabled <a> must not navigate nor reach (click) handlers bound on it.\r\n if (this.isAnchor && this.disabled()) {\r\n event.preventDefault();\r\n event.stopImmediatePropagation();\r\n }\r\n }\r\n\r\n /** Kit rules that cannot be expressed with types. */\r\n private checkUsage(): void {\r\n if (this.iconOnly() && !this.label()) {\r\n console.warn('[ngx-sirio] wmSirioButton iconOnly requires \"label\" (aria-label and title).');\r\n }\r\n if (this.iconOnly() && !this.icon()) {\r\n console.warn('[ngx-sirio] wmSirioButton iconOnly requires \"icon\".');\r\n }\r\n if (this.iconOnly() && this.variant() === 'danger') {\r\n console.warn(\r\n '[ngx-sirio] Sirio: danger buttons always need a visible text (no icon-only variant).',\r\n );\r\n }\r\n }\r\n}\r\n","@if (icon() && (iconPosition() === 'start' || iconOnly())) {\r\n <span [attr.class]=\"iconClasses()\" aria-hidden=\"true\"></span>\r\n}\r\n@if (!iconOnly()) {\r\n <ng-content />\r\n}\r\n@if (icon() && iconPosition() === 'end' && !iconOnly()) {\r\n <span [attr.class]=\"iconClasses()\" aria-hidden=\"true\"></span>\r\n}\r\n","import {\r\n booleanAttribute,\r\n ChangeDetectionStrategy,\r\n Component,\r\n contentChild,\r\n Directive,\r\n input,\r\n model,\r\n output,\r\n} from '@angular/core';\r\n\r\n/** Types of the Sirio notifications (alert and toast). */\r\nexport type SirioNotificationType = 'error' | 'info' | 'warning' | 'success';\r\n\r\n/**\r\n * Rich message of an alert (block content: paragraphs, lists, HTML from markdown...), placed directly\r\n * in `.sirio-alert-message` instead of the kit paragraph:\r\n * `<div wmSirioAlertContent [innerHTML]=\"html\"></div>`.\r\n */\r\n@Directive({ selector: '[wmSirioAlertContent]' })\r\nexport class SirioAlertContent {}\r\n\r\n/** Optional link of an alert (kit `.sirio-alert-link`): `<a wmSirioAlertLink href=\"...\">Dettagli</a>`. */\r\n@Directive({ selector: '[wmSirioAlertLink]', host: { class: 'sirio-link-accent' } })\r\nexport class SirioAlertLink {}\r\n\r\n/** Optional action button of an alert (kit `.sirio-alert-btn`): `<button wmSirioAlertAction>Riprova</button>`. */\r\n@Directive({\r\n selector: '[wmSirioAlertAction]',\r\n host: { class: 'sirio-btn sirio-btn-tertiary-light' },\r\n})\r\nexport class SirioAlertAction {}\r\n\r\n/**\r\n * Inline notification of the Sirio web kit (\"Alert (notifiche in linea)\"):\r\n * `.sirio-alert.sirio-alert-{type}` with the message (`.sirio-alert-message`, bold title + text),\r\n * the optional link (`.sirio-alert-link`) and action (`.sirio-alert-btn`) and the close button\r\n * (`.sirio-alert-close`). The kit places them at the top of the layout; they stay until the user\r\n * closes them (the X is always present in the kit).\r\n *\r\n * ```html\r\n * <wm-sirio-alert type=\"error\" title=\"Invio non riuscito\" (closed)=\"onClosed()\">\r\n * Il servizio non è disponibile.\r\n * <a wmSirioAlertLink href=\"/stato-servizi\">Stato dei servizi</a>\r\n * <button wmSirioAlertAction type=\"button\" (click)=\"retry()\">Riprova</button>\r\n * </wm-sirio-alert>\r\n * ```\r\n *\r\n * `[(open)]` controls the visibility (`data-sirio-visible`); a closed alert stays in the DOM\r\n * hidden, as with the kit script (SirioAlert.close()).\r\n */\r\n@Component({\r\n selector: 'wm-sirio-alert',\r\n host: {\r\n // `title` is an input: drop the native attribute, otherwise the whole component shows a tooltip.\r\n '[attr.title]': 'null',\r\n },\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n styleUrl: './sirio-alert.scss',\r\n templateUrl: './sirio-alert.html',\r\n})\r\nexport class SirioAlert {\r\n readonly type = input<SirioNotificationType>('info');\r\n /** Bold title before the message. */\r\n readonly title = input('');\r\n /** Visibility (two-way: `[(open)]`). */\r\n readonly open = model(true);\r\n /** Close button (always present in the kit). */\r\n readonly dismissible = input(true, { transform: booleanAttribute });\r\n readonly closeLabel = input('Chiudi messaggio di alert');\r\n /** ARIA role: `alert` (kit) announces the message immediately; `status` politely. */\r\n readonly role = input<'alert' | 'status'>('alert');\r\n /** Emitted when the user closes the alert (kit onClosed). */\r\n readonly closed = output<void>();\r\n\r\n protected readonly content = contentChild(SirioAlertContent);\r\n protected readonly link = contentChild(SirioAlertLink);\r\n protected readonly action = contentChild(SirioAlertAction);\r\n\r\n /** Closes the alert (kit SirioAlert.close()). */\r\n close(): void {\r\n if (this.open()) {\r\n this.open.set(false);\r\n this.closed.emit();\r\n }\r\n }\r\n}\r\n\r\n/** Icons of the kit toasts by type. */\r\nexport const SIRIO_TOAST_ICONS: Record<SirioNotificationType, string> = {\r\n error: 'fa-exclamation-triangle',\r\n info: 'fa-info-circle',\r\n warning: 'fa-exclamation-circle',\r\n success: 'fa-check',\r\n};\r\n\r\n/** @internal Shared helper: the CSS classes of the kit toast icon. */\r\nexport function sirioToastIconClasses(type: SirioNotificationType): string {\r\n return `fas ${SIRIO_TOAST_ICONS[type]} fa-24`;\r\n}\r\n\r\n/** Alert components, for `imports: [SIRIO_ALERT]`. */\r\nexport const SIRIO_ALERT = [SirioAlert, SirioAlertContent, SirioAlertLink, SirioAlertAction] as const;\r\n","<div\r\n data-sirio-component=\"alert\"\r\n [class]=\"'sirio-alert sirio-alert-' + type()\"\r\n [attr.data-sirio-visible]=\"open()\"\r\n [attr.role]=\"role()\"\r\n>\r\n <div class=\"sirio-alert-body\">\r\n <div class=\"sirio-alert-message\">\r\n @if (content()) {\r\n <!-- Rich message: block content after the title paragraph. -->\r\n @if (title()) {\r\n <p><strong>{{ title() }}</strong></p>\r\n }\r\n <ng-content select=\"[wmSirioAlertContent]\" />\r\n } @else {\r\n <p>\r\n @if (title()) {\r\n <strong>{{ title() }}</strong>\r\n }\r\n <ng-content />\r\n </p>\r\n }\r\n </div>\r\n @if (link()) {\r\n <div class=\"sirio-alert-link\"><ng-content select=\"[wmSirioAlertLink]\" /></div>\r\n }\r\n @if (action()) {\r\n <div class=\"sirio-alert-btn\"><ng-content select=\"[wmSirioAlertAction]\" /></div>\r\n }\r\n @if (dismissible()) {\r\n <div class=\"sirio-alert-close\">\r\n <button\r\n type=\"button\"\r\n class=\"sirio-btn sirio-btn-icon\"\r\n data-sirio-dismiss=\"alert\"\r\n [attr.aria-label]=\"closeLabel()\"\r\n (click)=\"close()\"\r\n >\r\n <span class=\"fas fa-times\" aria-hidden=\"true\"></span>\r\n </button>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n","import {\r\n ApplicationRef,\r\n ChangeDetectionStrategy,\r\n Component,\r\n createComponent,\r\n DestroyRef,\r\n EnvironmentInjector,\r\n inject,\r\n Injectable,\r\n signal,\r\n} from '@angular/core';\r\nimport { DOCUMENT } from '@angular/common';\r\nimport { SirioNotificationType, sirioToastIconClasses } from './sirio-alert';\r\n\r\n/** Options of a toast (kit \"Toast\"). */\r\nexport interface SirioToastOptions {\r\n type?: SirioNotificationType;\r\n /** Bold title (first paragraph). */\r\n title?: string;\r\n /** Message (second paragraph). */\r\n message?: string;\r\n /** Optional link (`a.sirio-link-accent`). */\r\n link?: { text: string; href?: string; action?: () => void };\r\n /** Optional action button (`sirio-btn-tertiary-light`); the toast closes after the action. */\r\n action?: { label: string; action: () => void };\r\n /**\r\n * Milliseconds before the automatic close (kit `data-sirio-delay`, default 5000; the kit guide\r\n * suggests 5–10 seconds). 0 = the toast stays until closed. The timer pauses while the pointer\r\n * or the focus is on the toast.\r\n */\r\n delay?: number;\r\n /** Close button (default true). */\r\n dismissible?: boolean;\r\n /** Accessible name of the close button (kit: \"Chiudi messaggio\"). */\r\n closeLabel?: string;\r\n}\r\n\r\n/** Handle of a shown toast. */\r\nexport interface SirioToastRef {\r\n readonly id: number;\r\n /** Closes the toast now. */\r\n close(): void;\r\n /** Resolves when the toast is closed (automatically or by the user). */\r\n readonly closed: Promise<void>;\r\n}\r\n\r\n/** @internal State of a toast in the container. */\r\nexport interface SirioToastItem extends Required<Omit<SirioToastOptions, 'link' | 'action'>> {\r\n id: number;\r\n link: SirioToastOptions['link'] | null;\r\n action: SirioToastOptions['action'] | null;\r\n visible: boolean;\r\n}\r\n\r\nconst DEFAULT_DELAY = 5000;\r\n\r\n/**\r\n * Container of the toasts (kit `.sirio-toast-wrapper`, fixed at the top right, `aria-live`),\r\n * created automatically by SirioToastService and appended to `<body>`.\r\n * @internal\r\n */\r\n@Component({\r\n selector: 'wm-sirio-toast-container',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n styleUrl: './sirio-toast.scss',\r\n templateUrl: './sirio-toast.html',\r\n})\r\nexport class SirioToastContainer {\r\n protected readonly service = inject(SirioToastService);\r\n protected readonly toasts = this.service.toasts;\r\n\r\n protected icon(toast: SirioToastItem): string {\r\n return sirioToastIconClasses(toast.type);\r\n }\r\n\r\n protected onLink(event: Event, toast: SirioToastItem): void {\r\n if (toast.link?.action) {\r\n event.preventDefault();\r\n toast.link.action();\r\n this.service.close(toast.id);\r\n } else if (!toast.link?.href) {\r\n event.preventDefault();\r\n }\r\n }\r\n\r\n protected onAction(toast: SirioToastItem): void {\r\n toast.action?.action();\r\n this.service.close(toast.id);\r\n }\r\n}\r\n\r\ninterface Timer {\r\n handle: ReturnType<typeof setTimeout> | undefined;\r\n remaining: number;\r\n started: number;\r\n}\r\n\r\n/**\r\n * Shows the toasts of the Sirio web kit (\"Toast\"): system notifications at the top right of the\r\n * page that close automatically (default 5 s, kit `data-sirio-delay`).\r\n *\r\n * ```ts\r\n * private readonly toast = inject(SirioToastService);\r\n * this.toast.show({ type: 'success', title: 'Pratica inviata', message: 'Protocollo 2026/123' });\r\n * this.toast.error('Invio non riuscito', 'Riprova tra qualche minuto', { delay: 0 });\r\n * ```\r\n *\r\n * The kit markup is rendered by a `wm-sirio-toast-container` appended to `<body>` on first use.\r\n */\r\n@Injectable({ providedIn: 'root' })\r\nexport class SirioToastService {\r\n private readonly appRef = inject(ApplicationRef);\r\n private readonly injector = inject(EnvironmentInjector);\r\n private readonly document = inject(DOCUMENT);\r\n\r\n /** @internal */\r\n readonly toasts = signal<SirioToastItem[]>([]);\r\n private readonly timers = new Map<number, Timer>();\r\n private readonly resolvers = new Map<number, () => void>();\r\n private nextId = 1;\r\n private containerCreated = false;\r\n\r\n constructor() {\r\n inject(DestroyRef).onDestroy(() => this.timers.forEach((t) => clearTimeout(t.handle)));\r\n }\r\n\r\n show(options: SirioToastOptions): SirioToastRef {\r\n this.ensureContainer();\r\n const id = this.nextId++;\r\n const item: SirioToastItem = {\r\n id,\r\n type: options.type ?? 'info',\r\n title: options.title ?? '',\r\n message: options.message ?? '',\r\n link: options.link ?? null,\r\n action: options.action ?? null,\r\n delay: options.delay ?? DEFAULT_DELAY,\r\n dismissible: options.dismissible ?? true,\r\n closeLabel: options.closeLabel ?? 'Chiudi messaggio',\r\n visible: true,\r\n };\r\n this.toasts.update((list) => [...list, item]);\r\n const closed = new Promise<void>((resolve) => this.resolvers.set(id, resolve));\r\n if (item.delay > 0) {\r\n this.timers.set(id, { handle: undefined, remaining: item.delay, started: 0 });\r\n this.resume(id);\r\n }\r\n return { id, close: () => this.close(id), closed };\r\n }\r\n\r\n error(title: string, message = '', options: SirioToastOptions = {}): SirioToastRef {\r\n return this.show({ ...options, type: 'error', title, message });\r\n }\r\n\r\n info(title: string, message = '', options: SirioToastOptions = {}): SirioToastRef {\r\n return this.show({ ...options, type: 'info', title, message });\r\n }\r\n\r\n warning(title: string, message = '', options: SirioToastOptions = {}): SirioToastRef {\r\n return this.show({ ...options, type: 'warning', title, message });\r\n }\r\n\r\n success(title: string, message = '', options: SirioToastOptions = {}): SirioToastRef {\r\n return this.show({ ...options, type: 'success', title, message });\r\n }\r\n\r\n /** Closes a toast (kit SirioToast.hide() + dispose()). */\r\n close(id: number): void {\r\n const timer = this.timers.get(id);\r\n clearTimeout(timer?.handle);\r\n this.timers.delete(id);\r\n if (this.toasts().some((t) => t.id === id)) {\r\n this.toasts.update((list) => list.filter((t) => t.id !== id));\r\n this.resolvers.get(id)?.();\r\n this.resolvers.delete(id);\r\n }\r\n }\r\n\r\n /** Closes all the toasts. */\r\n clear(): void {\r\n this.toasts().forEach((t) => this.close(t.id));\r\n }\r\n\r\n /** @internal Stops the countdown (pointer or focus on the toast). */\r\n pause(id: number): void {\r\n const timer = this.timers.get(id);\r\n if (timer?.handle !== undefined) {\r\n clearTimeout(timer.handle);\r\n timer.handle = undefined;\r\n timer.remaining -= Date.now() - timer.started;\r\n }\r\n }\r\n\r\n /** @internal Restarts the countdown with the remaining time. */\r\n resume(id: number): void {\r\n const timer = this.timers.get(id);\r\n if (timer && timer.handle === undefined) {\r\n timer.started = Date.now();\r\n timer.handle = setTimeout(() => this.close(id), Math.max(timer.remaining, 0));\r\n }\r\n }\r\n\r\n private ensureContainer(): void {\r\n if (this.containerCreated) {\r\n return;\r\n }\r\n this.containerCreated = true;\r\n const ref = createComponent(SirioToastContainer, { environmentInjector: this.injector });\r\n this.appRef.attachView(ref.hostView);\r\n this.document.body.appendChild(ref.location.nativeElement);\r\n }\r\n}\r\n","<div class=\"sirio-toast-wrapper\" aria-live=\"polite\" aria-atomic=\"true\">\r\n @for (toast of toasts(); track toast.id) {\r\n <div\r\n [class]=\"'sirio-toast sirio-toast-' + toast.type\"\r\n data-sirio-component=\"toast\"\r\n [attr.data-sirio-visible]=\"toast.visible\"\r\n role=\"alert\"\r\n aria-live=\"assertive\"\r\n aria-atomic=\"true\"\r\n [attr.data-sirio-delay]=\"toast.delay\"\r\n (mouseenter)=\"service.pause(toast.id)\"\r\n (mouseleave)=\"service.resume(toast.id)\"\r\n (focusin)=\"service.pause(toast.id)\"\r\n (focusout)=\"service.resume(toast.id)\"\r\n >\r\n <div class=\"sirio-toast-body\">\r\n <span [attr.class]=\"icon(toast)\" aria-hidden=\"true\"></span>\r\n @if (toast.title) {\r\n <p><strong>{{ toast.title }}</strong></p>\r\n }\r\n @if (toast.message) {\r\n <p>{{ toast.message }}</p>\r\n }\r\n @if (toast.link; as link) {\r\n <p>\r\n <a\r\n class=\"sirio-link-accent\"\r\n [attr.href]=\"link.href ?? '#'\"\r\n (click)=\"onLink($event, toast)\"\r\n >{{ link.text }}</a\r\n >\r\n </p>\r\n }\r\n @if (toast.action; as action) {\r\n <div>\r\n <button type=\"button\" class=\"sirio-btn sirio-btn-tertiary-light\" (click)=\"onAction(toast)\">\r\n {{ action.label }}\r\n </button>\r\n </div>\r\n }\r\n @if (toast.dismissible) {\r\n <button\r\n type=\"button\"\r\n class=\"sirio-btn sirio-btn-icon sirio-btn-close\"\r\n data-sirio-dismiss=\"toast\"\r\n [attr.aria-label]=\"toast.closeLabel\"\r\n (click)=\"service.close(toast.id)\"\r\n >\r\n <span class=\"fas fa-times\" aria-hidden=\"true\"></span>\r\n </button>\r\n }\r\n </div>\r\n </div>\r\n }\r\n</div>\r\n","import { NgTemplateOutlet } from '@angular/common';\r\nimport {\r\n ChangeDetectionStrategy,\r\n Component,\r\n computed,\r\n contentChild,\r\n Directive,\r\n forwardRef,\r\n inject,\r\n input,\r\n numberAttribute,\r\n} from '@angular/core';\r\n\r\n/**\r\n * Variants of the Sirio \"Avvisi\":\r\n * - `light` / `dark`: generic notices (kit \"Versione Light\" / \"Versione Dark\");\r\n * - `success` / `warning` / `alert`: semantic notices (kit \"Avviso Semantico\").\r\n */\r\nexport type SirioNotifyVariant = 'light' | 'dark' | 'success' | 'warning' | 'alert';\r\n\r\n/** Default icon of each variant (kit examples). */\r\nexport const SIRIO_NOTIFY_ICONS: Record<SirioNotifyVariant, string> = {\r\n light: 'fa-info-circle',\r\n dark: 'fa-info-circle',\r\n success: 'fa-check-circle',\r\n warning: 'fa-circle-exclamation',\r\n alert: 'fa-triangle-exclamation',\r\n};\r\n\r\n/**\r\n * Rich text of a notice (block content: paragraphs, lists, HTML from markdown...), placed directly in\r\n * `.sirio-notify-body` after the title instead of the kit paragraph:\r\n * `<div wmSirioNotifyContent [innerHTML]=\"html\"></div>`.\r\n */\r\n@Directive({ selector: '[wmSirioNotifyContent]' })\r\nexport class SirioNotifyContent {}\r\n\r\n/**\r\n * Optional call to action of a notice (kit `.sirio-notify-action`):\r\n * `<a wmSirioNotifyAction href=\"/novita\">Scopri di più</a>`. It gets `sirio-btn sirio-btn-tertiary`\r\n * (`sirio-btn-tertiary-light` in the dark version).\r\n */\r\n@Directive({\r\n selector: '[wmSirioNotifyAction]',\r\n host: {\r\n class: 'sirio-btn',\r\n '[class.sirio-btn-tertiary]': '!dark()',\r\n '[class.sirio-btn-tertiary-light]': 'dark()',\r\n },\r\n})\r\nexport class SirioNotifyAction {\r\n private readonly notify = inject(forwardRef(() => SirioNotify), { optional: true });\r\n protected readonly dark = computed(() => this.notify?.variant() === 'dark');\r\n}\r\n\r\n/**\r\n * Notice of the Sirio web kit (\"Avvisi\"): a relevant communication (news, campaign, change of a\r\n * section) placed right after the hero section; the kit suggests at most two per page.\r\n *\r\n * Markup of the kit, including the required outer structure:\r\n * - light: `.sirio-bg-primary-light-40.border-bottom.sirio-border-primary-light-50` >\r\n * `.container-fluid` > `.sirio-notify`;\r\n * - dark: `.sirio-bg-primary-dark-115...` > `.container-fluid` > `.sirio-notify.sirio-notify-dark`;\r\n * - semantic: `.sirio-notify-wrapper.sirio-notify-{success|warning|alert}` (`role=\"status\"`, or\r\n * `role=\"alert\"` for alert) > `.container-fluid` > `.sirio-notify`;\r\n * with `.sirio-notify-icon`, `.sirio-notify-body` (`p.sirio-notify-title` + text, links allowed)\r\n * and the optional `.sirio-notify-action`.\r\n *\r\n * ```html\r\n * <wm-sirio-notify variant=\"warning\" title=\"Manutenzione programmata\">\r\n * Domenica dalle 8 alle 12 il servizio non sarà disponibile. <a href=\"/stato\">Dettagli</a>\r\n * <a wmSirioNotifyAction href=\"/stato\">Stato dei servizi</a>\r\n * </wm-sirio-notify>\r\n * ```\r\n */\r\n@Component({\r\n selector: 'wm-sirio-notify',\r\n host: {\r\n // `title` is an input: drop the native attribute, otherwise the whole component shows a tooltip.\r\n '[attr.title]': 'null',\r\n },\r\n imports: [NgTemplateOutlet],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n styleUrl: './sirio-notify.scss',\r\n templateUrl: './sirio-notify.html',\r\n})\r\nexport class SirioNotify {\r\n readonly variant = input<SirioNotifyVariant>('light');\r\n readonly title = input('');\r\n /** Font Awesome icon (`fa-bullhorn` or full classes); default: the kit icon of the variant. */\r\n readonly icon = input<string | null>(null);\r\n /** Title as `h2`–`h4` instead of the kit `p` (when the notice starts a page section). */\r\n readonly headingLevel = input<2 | 3 | 4 | null, unknown>(null, {\r\n transform: (v: unknown) => {\r\n const n = v === null || v === undefined || v === '' ? null : numberAttribute(v);\r\n return n === 2 || n === 3 || n === 4 ? n : null;\r\n },\r\n });\r\n\r\n protected readonly content = contentChild(SirioNotifyContent);\r\n protected readonly action = contentChild(SirioNotifyAction);\r\n\r\n protected readonly wrapperClasses = computed(() => {\r\n switch (this.variant()) {\r\n case 'light':\r\n return 'sirio-bg-primary-light-40 border-bottom sirio-border-primary-light-50';\r\n case 'dark':\r\n return 'sirio-bg-primary-dark-115 border-bottom sirio-border-primary-light-50';\r\n default:\r\n return `sirio-notify-wrapper sirio-notify-${this.variant()}`;\r\n }\r\n });\r\n\r\n /** Kit: semantic notices are live regions (alert for critical ones). */\r\n protected readonly role = computed(() => {\r\n const variant = this.variant();\r\n return variant === 'alert' ? 'alert' : variant === 'success' || variant === 'warning' ? 'status' : null;\r\n });\r\n\r\n protected readonly iconClasses = computed(() => {\r\n const icon = (this.icon() ?? SIRIO_NOTIFY_ICONS[this.variant()]).trim();\r\n return icon.includes(' ') ? icon : `fas ${icon} fa-24`;\r\n });\r\n}\r\n\r\n/** Notice components, for `imports: [SIRIO_NOTIFY]`. */\r\nexport const SIRIO_NOTIFY = [SirioNotify, SirioNotifyContent, SirioNotifyAction] as const;\r\n","<ng-template #titleTpl>{{ title() }}</ng-template>\r\n<div [attr.class]=\"wrapperClasses()\" [attr.role]=\"role()\">\r\n <div class=\"container-fluid\">\r\n <div class=\"sirio-notify\" [class.sirio-notify-dark]=\"variant() === 'dark'\">\r\n <div class=\"sirio-notify-icon\">\r\n <span [attr.class]=\"iconClasses()\" aria-hidden=\"true\"></span>\r\n </div>\r\n <div class=\"sirio-notify-body\">\r\n @if (title()) {\r\n @switch (headingLevel()) {\r\n @case (2) {\r\n <h2 class=\"sirio-notify-title\"><ng-container [ngTemplateOutlet]=\"titleTpl\" /></h2>\r\n }\r\n @case (3) {\r\n <h3 class=\"sirio-notify-title\"><ng-container [ngTemplateOutlet]=\"titleTpl\" /></h3>\r\n }\r\n @case (4) {\r\n <h4 class=\"sirio-notify-title\"><ng-container [ngTemplateOutlet]=\"titleTpl\" /></h4>\r\n }\r\n @default {\r\n <p class=\"sirio-notify-title\"><ng-container [ngTemplateOutlet]=\"titleTpl\" /></p>\r\n }\r\n }\r\n }\r\n @if (content()) {\r\n <!-- Rich text: block content after the title. -->\r\n <ng-content select=\"[wmSirioNotifyContent]\" />\r\n } @else {\r\n <p><ng-content /></p>\r\n }\r\n </div>\r\n @if (action()) {\r\n <div class=\"sirio-notify-action\"><ng-content select=\"[wmSirioNotifyAction]\" /></div>\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n","import { afterNextRender, Injector } from '@angular/core';\r\n\r\n/** Duration of the kit collapse transition (`[data-sirio-visible=collapsing]`, .35s). */\r\nexport const SIRIO_COLLAPSE_MS = 350;\r\n\r\n/** Values of `data-sirio-visible` used by the kit collapsible elements. */\r\nexport type SirioCollapseState = 'true' | 'false' | 'collapsing';\r\n\r\n/** True when animations are allowed (no `prefers-reduced-motion: reduce`). */\r\nexport function sirioMotionAllowed(): boolean {\r\n const media =\r\n typeof matchMedia === 'function' ? matchMedia('(prefers-reduced-motion: reduce)') : null;\r\n return !!media && !media.matches;\r\n}\r\n\r\n/**\r\n * Kit open/close animation of collapsible elements (accordion bodies, collapse regions): the\r\n * element gets `data-sirio-visible=\"collapsing\"` (CSS: `height: 0; overflow: hidden;\r\n * transition: height .35s`) while its height goes from 0 to the content height or back, then\r\n * `true` / `false`.\r\n */\r\nexport class SirioCollapseAnimator {\r\n private timer: ReturnType<typeof setTimeout> | undefined;\r\n private cleanup: (() => void) | null = null;\r\n\r\n constructor(\r\n private readonly injector: Injector,\r\n private readonly setState: (state: SirioCollapseState) => void,\r\n ) {}\r\n\r\n /** Runs the transition of `element` to the open / closed state. */\r\n run(element: HTMLElement, open: boolean, animated: boolean): void {\r\n this.stop();\r\n if (!animated) {\r\n element.style.height = '';\r\n this.setState(open ? 'true' : 'false');\r\n return;\r\n }\r\n const finish = () => {\r\n this.stop();\r\n element.style.height = '';\r\n this.setState(open ? 'true' : 'false');\r\n };\r\n if (open) {\r\n this.setState('collapsing');\r\n afterNextRender(\r\n () => {\r\n element.style.height = `${element.scrollHeight}px`;\r\n },\r\n { injector: this.injector },\r\n );\r\n } else {\r\n element.style.height = `${element.scrollHeight}px`;\r\n this.setState('collapsing');\r\n afterNextRender(\r\n () => {\r\n void element.offsetHeight; // start the transition from the current height\r\n element.style.height = '0px';\r\n },\r\n { injector: this.injector },\r\n );\r\n }\r\n // Only the height transition of this element (nested collapsibles bubble their own events).\r\n const onEnd = (event: TransitionEvent) => {\r\n if (event.target === element) {\r\n finish();\r\n }\r\n };\r\n element.addEventListener('transitionend', onEnd);\r\n this.cleanup = () => element.removeEventListener('transitionend', onEnd);\r\n // Safety net when no transitionend is fired (element hidden, transitions disabled).\r\n this.timer = setTimeout(finish, SIRIO_COLLAPSE_MS + 100);\r\n }\r\n\r\n /** Cancels a running transition (call it on destroy). */\r\n stop(): void {\r\n clearTimeout(this.timer);\r\n this.cleanup?.();\r\n this.cleanup = null;\r\n }\r\n}\r\n","import {\r\n booleanAttribute,\r\n ChangeDetectionStrategy,\r\n Component,\r\n computed,\r\n DestroyRef,\r\n Directive,\r\n effect,\r\n ElementRef,\r\n inject,\r\n Injector,\r\n input,\r\n model,\r\n signal,\r\n untracked,\r\n} from '@angular/core';\r\nimport {\r\n SirioCollapseAnimator,\r\n SirioCollapseState,\r\n sirioMotionAllowed,\r\n} from '../core/sirio-collapse-animation';\r\nimport { sirioUniqueId } from '../core/sirio-control-base';\r\n\r\n/**\r\n * Group of collapse regions with one region open at a time (kit `data-sirio-parent=\"#group\"`):\r\n * `<div wmSirioCollapseGroup>...</div>`.\r\n */\r\n@Directive({\r\n selector: '[wmSirioCollapseGroup]',\r\n host: { '[id]': 'id' },\r\n exportAs: 'wmSirioCollapseGroup',\r\n})\r\nexport class SirioCollapseGroup {\r\n /** Id of the group element (kit `data-sirio-parent` target); an existing id is kept. */\r\n readonly id =\r\n inject<ElementRef<HTMLElement>>(ElementRef).nativeElement.id || sirioUniqueId('sirio-collapse-group');\r\n private readonly members = new Set<SirioCollapse>();\r\n\r\n /** @internal */\r\n register(collapse: SirioCollapse): () => void {\r\n this.members.add(collapse);\r\n return () => this.members.delete(collapse);\r\n }\r\n\r\n /** @internal Closes the other regions of the group. */\r\n opened(collapse: SirioCollapse): void {\r\n for (const member of this.members) {\r\n if (member !== collapse) {\r\n member.hide();\r\n }\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Collapse region of the Sirio web kit (\"Collapse\"): `div[role=region]` with `data-sirio-visible`\r\n * and the content in an inner `div`, opened and closed with the kit animation\r\n * (`data-sirio-visible=\"collapsing\"`, height transition). The trigger is any button or link with\r\n * `[wmSirioCollapseToggle]`.\r\n *\r\n * ```html\r\n * <button wmSirioButton type=\"button\" [wmSirioCollapseToggle]=\"details\"><span>Dettagli</span></button>\r\n * <div wmSirioCollapse #details=\"wmSirioCollapse\" ariaLabel=\"Dettagli della pratica\">...</div>\r\n * ```\r\n */\r\n@Component({\r\n selector: 'div[wmSirioCollapse]',\r\n exportAs: 'wmSirioCollapse',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n host: {\r\n role: 'region',\r\n '[id]': 'id()',\r\n '[attr.aria-label]': 'ariaLabel() || null',\r\n '[attr.aria-labelledby]': 'ariaLabel() ? null : labelledBy()',\r\n '[attr.data-sirio-parent]': \"group ? '#' + group.id : null\",\r\n '[attr.data-sirio-visible]': 'state()',\r\n },\r\n templateUrl: './sirio-collapse.html',\r\n})\r\nexport class SirioCollapse {\r\n /** Open state (two-way: `[(expanded)]`). */\r\n readonly expanded = model(false);\r\n /** Accessible name of the region (kit: `aria-label`); default: labelled by its toggle. */\r\n readonly ariaLabel = input<string | null>(null);\r\n /** Id of the region (the kit `data-sirio-target` / `aria-controls` of the toggles). */\r\n readonly id = input(sirioUniqueId('sirio-collapse'));\r\n /** Kit open/close animation (also off with `prefers-reduced-motion`). */\r\n readonly animated = input(true, { transform: booleanAttribute });\r\n\r\n /** @internal Group with one region open at a time. */\r\n readonly group = inject(SirioCollapseGroup, { optional: true });\r\n private readonly element = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\r\n /** Value of `data-sirio-visible`: 'true', 'false' or 'collapsing' during the animation. */\r\n protected readonly state = signal<SirioCollapseState>('false');\r\n /** Ids of the toggles controlling the region (accessible name when there is no aria-label). */\r\n private readonly toggles = signal<string[]>([]);\r\n protected readonly labelledBy = computed(() => this.toggles().join(' ') || null);\r\n private readonly animator = new SirioCollapseAnimator(inject(Injector), (state) =>\r\n this.state.set(state),\r\n );\r\n\r\n constructor() {\r\n let first = true;\r\n effect(() => {\r\n const open = this.expanded();\r\n untracked(() => {\r\n if (open) {\r\n this.group?.opened(this);\r\n }\r\n if (first) {\r\n first = false;\r\n this.state.set(open ? 'true' : 'false');\r\n } else {\r\n this.animator.run(this.element, open, this.animated() && sirioMotionAllowed());\r\n }\r\n });\r\n });\r\n const unregister = this.group?.register(this);\r\n inject(DestroyRef).onDestroy(() => {\r\n this.animator.stop();\r\n unregister?.();\r\n });\r\n }\r\n\r\n toggle(): void {\r\n this.expanded.update((v) => !v);\r\n }\r\n\r\n show(): void {\r\n this.expanded.set(true);\r\n }\r\n\r\n hide(): void {\r\n this.expanded.set(false);\r\n }\r\n\r\n /** @internal */\r\n addToggle(id: string): () => void {\r\n this.toggles.update((ids) => [...ids, id]);\r\n return () => this.toggles.update((ids) => ids.filter((i) => i !== id));\r\n }\r\n}\r\n\r\n/**\r\n * Trigger of a collapse region (kit `data-sirio-toggle=\"collapse\"`): on a `<button>` it sets\r\n * `data-sirio-target=\"#id\"`, on an `<a>` the `href=\"#id\"` (kit \"Collapse link\"); both get\r\n * `aria-expanded` and `aria-controls`, and a click opens/closes the region.\r\n *\r\n * ```html\r\n * <button wmSirioButton type=\"button\" [wmSirioCollapseToggle]=\"details\"><span>Dettagli</span></button>\r\n * <a [wmSirioCollapseToggle]=\"details\">Mostra i dettagli</a>\r\n * ```\r\n */\r\n@Directive({\r\n selector: 'button[wmSirioCollapseToggle], a[wmSirioCollapseToggle]',\r\n host: {\r\n 'data-sirio-toggle': 'collapse',\r\n '[id]': 'id',\r\n '[attr.data-sirio-target]': \"isAnchor ? null : '#' + target().id()\",\r\n '[attr.href]': \"isAnchor ? '#' + target().id() : null\",\r\n '[attr.aria-expanded]': 'target().expanded()',\r\n '[attr.aria-controls]': 'target().id()',\r\n '(click)': 'onClick($event)',\r\n },\r\n})\r\nexport class SirioCollapseToggle {\r\n /** The region to open/close (template reference: `#details=\"wmSirioCollapse\"`). */\r\n readonly target = input.required<SirioCollapse>({ alias: 'wmSirioCollapseToggle' });\r\n\r\n private readonly element = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\r\n /** Id of the toggle (an existing id is kept). */\r\n protected readonly id = this.element.id || sirioUniqueId('sirio-collapse-toggle');\r\n protected readonly isAnchor = this.element.tagName === 'A';\r\n\r\n constructor() {\r\n // The region is labelled by its toggles when it has no aria-label of its own.\r\n effect((onCleanup) => {\r\n const target = this.target();\r\n const remove = untracked(() => target.addToggle(this.id));\r\n onCleanup(remove);\r\n });\r\n }\r\n\r\n protected onClick(event: Event): void {\r\n if (this.isAnchor) {\r\n event.preventDefault();\r\n }\r\n this.target().toggle();\r\n }\r\n}\r\n\r\n/** Collapse components, for `imports: [SIRIO_COLLAPSE]`. */\r\nexport const SIRIO_COLLAPSE = [SirioCollapse, SirioCollapseToggle, SirioCollapseGroup] as const;\r\n","<div><ng-content /></div>\r\n","import { ComponentRef } from '@angular/core';\r\n\r\n/** @internal The part of SirioDialog used by SirioDialogRef. */\r\nexport interface SirioDialogCloser {\r\n close(result?: unknown): void;\r\n}\r\n\r\n/**\r\n * Reference to a dialog opened from code with `SirioDialogService.open()`. It is also injectable in the\r\n * opened component, to close the dialog with a result:\r\n *\r\n * ```ts\r\n * private readonly ref = inject(SirioDialogRef<string>);\r\n * save() { this.ref.close('saved'); }\r\n * ```\r\n *\r\n * The first `<wm-sirio-dialog>` of the opened component is bound to the reference: it opens by itself and,\r\n * when it closes (X, Esc, backdrop, `wmSirioDialogClose`, `close()`), the reference resolves `closed` and\r\n * the component is removed.\r\n */\r\nexport class SirioDialogRef<R = unknown, C = unknown> {\r\n /** Resolves when the dialog has closed: the result, undefined with X, Esc and backdrop. */\r\n readonly closed: Promise<R | undefined>;\r\n\r\n /** @internal Set by SirioDialogService. */\r\n componentRef: ComponentRef<C> | null = null;\r\n\r\n private resolveClosed!: (result: R | undefined) => void;\r\n private dialog: SirioDialogCloser | null = null;\r\n private done = false;\r\n\r\n /** @internal */\r\n constructor(private readonly onClosed: (ref: SirioDialogRef<R, C>) => void = () => {}) {\r\n this.closed = new Promise((resolve) => (this.resolveClosed = resolve));\r\n }\r\n\r\n /** Instance of the opened component. */\r\n get componentInstance(): C | null {\r\n return this.componentRef?.instance ?? null;\r\n }\r\n\r\n /** False once the dialog has closed. */\r\n get isOpen(): boolean {\r\n return !this.done;\r\n }\r\n\r\n /** Closes the dialog (focus back to the element focused before opening) with an optional result. */\r\n close(result?: R): void {\r\n if (this.done) {\r\n return;\r\n }\r\n if (this.dialog) {\r\n this.dialog.close(result);\r\n } else {\r\n this.finish(result);\r\n }\r\n }\r\n\r\n /** @internal The first wm-sirio-dialog of the opened component claims the reference. */\r\n attach(dialog: SirioDialogCloser): boolean {\r\n if (this.dialog || this.done) {\r\n return false;\r\n }\r\n this.dialog = dialog;\r\n return true;\r\n }\r\n\r\n /** @internal Called by the bound dialog once closed. */\r\n finish(result?: unknown): void {\r\n if (this.done) {\r\n return;\r\n }\r\n this.done = true;\r\n this.resolveClosed(result as R | undefined);\r\n this.onClosed(this);\r\n }\r\n}\r\n","import { DOCUMENT } from '@angular/common';\r\nimport {\r\n afterNextRender,\r\n booleanAttribute,\r\n ChangeDetectionStrategy,\r\n Component,\r\n computed,\r\n contentChild,\r\n DestroyRef,\r\n Directive,\r\n effect,\r\n ElementRef,\r\n forwardRef,\r\n inject,\r\n Injector,\r\n input,\r\n model,\r\n output,\r\n untracked,\r\n viewChild,\r\n} from '@angular/core';\r\nimport { sirioUniqueId } from '../core/sirio-control-base';\r\nimport { SirioDialogRef } from './sirio-dialog-ref';\r\n\r\n/** Sizes of the kit dialog (`.sirio-dialog-wrapper` modifiers); default 600px. */\r\nexport type SirioDialogSize = 'sm' | 'default' | 'lg' | 'xl';\r\n\r\n/** Color of the title icon (kit examples: default blue, \"Avvertimento\", \"Pericolo\"). */\r\nexport type SirioDialogTone = 'default' | 'warning' | 'danger';\r\n\r\n/**\r\n * Footer of a dialog (kit `.sirio-dialog-footer`), with the action buttons:\r\n * `<div wmSirioDialogFooter>...</div>`.\r\n */\r\n@Directive({\r\n selector: '[wmSirioDialogFooter]',\r\n // The buttons are laid out by the kit `.sirio-dialog-footer` flex row, as its direct items.\r\n host: { '[style.display]': \"'contents'\" },\r\n})\r\nexport class SirioDialogFooter {}\r\n\r\n/**\r\n * Closes the enclosing dialog when clicked (kit `data-sirio-dismiss=\"dialog\"`):\r\n * `<button wmSirioButton=\"secondary\" wmSirioDialogClose>Annulla</button>`.\r\n * With a value (`[wmSirioDialogClose]=\"true\"`) the value is emitted by the dialog `(closed)`.\r\n */\r\n@Directive({\r\n selector: '[wmSirioDialogClose]',\r\n host: {\r\n 'data-sirio-dismiss': 'dialog',\r\n '(click)': 'close()',\r\n },\r\n})\r\nexport class SirioDialogClose {\r\n /** Result reported by the dialog `(closed)` output. */\r\n readonly result = input<unknown>(undefined, { alias: 'wmSirioDialogClose' });\r\n private readonly dialog = inject(forwardRef(() => SirioDialog), { optional: true });\r\n\r\n protected close(): void {\r\n this.dialog?.close(this.result() === '' ? undefined : this.result());\r\n }\r\n}\r\n\r\n/** Dialogs locking the page scroll, per document: the original overflow is restored by the last one. */\r\nconst SCROLL_LOCKS = new WeakMap<Document, { count: number; overflow: string }>();\r\n\r\nconst FOCUSABLE =\r\n 'a[href], area[href], button:not([disabled]), input:not([disabled]):not([type=hidden]), ' +\r\n 'select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"]), ' +\r\n '[contenteditable=\"true\"]';\r\n\r\n/**\r\n * Dialog of the Sirio web kit (\"Dialog\"): `.sirio-dialog` (backdrop) > `.sirio-dialog-wrapper`\r\n * (size `sm` / `lg` / `xl`, `dialog-centered`) > `.sirio-dialog-content` with header\r\n * (`h2.sirio-dialog-title` with the icon, close button `.sirio-btn-close`), body and footer.\r\n *\r\n * Behaviour of the kit script (SirioDialog) reproduced in Angular: `aria-modal`, focus moved into\r\n * the dialog when it opens and back to the previously focused element when it closes, Esc and a\r\n * click on the backdrop close it. In addition: `role=\"dialog\"` (`alertdialog` with `alert`), focus kept\r\n * inside the dialog (Tab / Shift+Tab), page scroll locked while open.\r\n *\r\n * With `drawer` it is the kit drawer (`.sirio-drawer`): a panel opening from the right. Inside a component\r\n * opened by `SirioDialogService.open()` the dialog opens by itself and closes the `SirioDialogRef`.\r\n *\r\n * ```html\r\n * <wm-sirio-dialog [(open)]=\"confirmOpen\" title=\"Vuoi eliminare il tuo account?\" tone=\"danger\" alert\r\n * (closed)=\"onClosed($event)\">\r\n * <p>L'operazione non è reversibile.</p>\r\n * <div wmSirioDialogFooter>\r\n * <button wmSirioButton=\"ghost\" type=\"button\" wmSirioDialogClose>Annulla</button>\r\n * <button wmSirioButton=\"danger\" type=\"button\" [wmSirioDialogClose]=\"true\">Elimina</button>\r\n * </div>\r\n * </wm-sirio-dialog>\r\n * ```\r\n */\r\n@Component({\r\n selector: 'wm-sirio-dialog',\r\n host: {\r\n // `title` is an input: drop the native attribute, otherwise the whole component shows a tooltip.\r\n '[attr.title]': 'null',\r\n // Kit drawer: the `.sirio-drawer` wrapper (the host is `display: contents`).\r\n '[class.sirio-drawer]': 'drawer()',\r\n },\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n styleUrl: './sirio-dialog.scss',\r\n templateUrl: './sirio-dialog.html',\r\n})\r\nexport class SirioDialog {\r\n /** Visibility (two-way: `[(open)]`). */\r\n readonly open = model(false);\r\n readonly title = input('');\r\n /** Accessible name when there is no title. */\r\n readonly ariaLabel = input<string | null>(null);\r\n /** Font Awesome icon of the title (kit: `fa-exclamation-circle`); null = no icon. */\r\n readonly icon = input<string | null>('fa-exclamation-circle');\r\n /** Color of the icon: default (blue), warning (`sirio-text-warning`), danger (`sirio-text-danger`). */\r\n readonly tone = input<SirioDialogTone>('default');\r\n readonly size = input<SirioDialogSize>('default');\r\n /** Vertically centered (kit `dialog-centered`). */\r\n readonly centered = input(false, { transform: booleanAttribute });\r\n /** Close button in the header (kit). */\r\n readonly dismissible = input(true, { transform: booleanAttribute });\r\n readonly closeLabel = input('Chiudi finestra di dialogo');\r\n /** Esc and a click on the backdrop close the dialog (kit behaviour). */\r\n readonly closeOnEscape = input(true, { transform: booleanAttribute });\r\n readonly closeOnBackdrop = input(true, { transform: booleanAttribute });\r\n /** `role=\"alertdialog\"` for confirmations that interrupt the user (e.g. destructive actions). */\r\n readonly alert = input(false, { transform: booleanAttribute });\r\n /** Kit drawer: panel opening from the right (`.sirio-drawer`). */\r\n readonly drawer = input(false, { transform: booleanAttribute });\r\n\r\n /** Extra classes of the `.sirio-dialog` element (e.g. kit drawer / side panel classes). */\r\n readonly panelClass = input<string>('');\r\n /**\r\n * The panel is also shown in the page while closed (kit side filters: `d-lg-flex` on desktop):\r\n * it is a dialog (`role`, focus trap) only when open.\r\n */\r\n readonly inline = input(false, { transform: booleanAttribute });\r\n\r\n /** Emitted after the dialog opens. */\r\n readonly opened = output<void>();\r\n /** Emitted when the dialog closes, with the result of `wmSirioDialogClose` (undefined otherwise). */\r\n readonly closed = output<unknown>();\r\n\r\n protected readonly footer = contentChild(SirioDialogFooter);\r\n private readonly dialogRef = viewChild.required<ElementRef<HTMLElement>>('dialog');\r\n private readonly document = inject(DOCUMENT);\r\n private readonly injector = inject(Injector);\r\n /** Reference of a dialog opened from code, when this is its dialog (see SirioDialogService.open). */\r\n private readonly openedRef: SirioDialogRef | null;\r\n\r\n private readonly baseId = sirioUniqueId('sirio-dialog');\r\n protected readonly dialogId = this.baseId;\r\n protected readonly titleId = `${this.baseId}-title`;\r\n\r\n protected readonly iconClasses = computed(() => {\r\n const icon = (this.icon() ?? '').trim();\r\n const base = icon.includes(' ') ? icon : `fas ${icon}`;\r\n const tone = this.tone();\r\n return tone === 'default' ? base : `${base} sirio-text-${tone}`;\r\n });\r\n\r\n /** Element focused before opening (focus returns there on close). */\r\n private returnFocus: HTMLElement | null = null;\r\n private pendingResult: unknown = undefined;\r\n private backdropPressed = false;\r\n /** The opening steps ran (focus saved, scroll locked) and the closing ones did not yet. */\r\n private shown = false;\r\n\r\n constructor() {\r\n const ref = inject(SirioDialogRef, { optional: true });\r\n this.openedRef = ref?.attach(this) ? ref : null;\r\n if (this.openedRef) {\r\n // Opened from code: the dialog opens by itself.\r\n this.open.set(true);\r\n }\r\n effect(() => {\r\n const open = this.open();\r\n untracked(() => {\r\n if (open && !this.shown) {\r\n this.onOpen();\r\n } else if (!open && this.shown) {\r\n this.onClose();\r\n }\r\n });\r\n });\r\n inject(DestroyRef).onDestroy(() => {\r\n if (this.shown) {\r\n this.shown = false;\r\n this.unlockScroll();\r\n }\r\n // Removed while open: the reference is closed anyway.\r\n this.openedRef?.finish(undefined);\r\n });\r\n }\r\n\r\n /** Opens the dialog (kit SirioDialog.show()). */\r\n show(): void {\r\n this.open.set(true);\r\n }\r\n\r\n /** Closes the dialog (kit SirioDialog.hide()); `result` is emitted by `(closed)`. */\r\n close(result?: unknown): void {\r\n if (this.open()) {\r\n this.pendingResult = result;\r\n this.open.set(false);\r\n // Closing steps right away: dialogs closed one after the other (e.g. closeAll from the top one)\r\n // give the focus back in the same order.\r\n if (this.shown) {\r\n this.onClose();\r\n }\r\n }\r\n }\r\n\r\n toggle(): void {\r\n this.open.update((v) => !v);\r\n }\r\n\r\n protected onKeydown(event: KeyboardEvent): void {\r\n if (!this.open()) {\r\n return; // inline panel: plain page content\r\n }\r\n if (event.key === 'Escape' && this.closeOnEscape()) {\r\n event.stopPropagation();\r\n this.close();\r\n } else if (event.key === 'Tab') {\r\n this.trapFocus(event);\r\n }\r\n }\r\n\r\n /** Backdrop click: the press and the release must both happen on the backdrop. */\r\n protected onBackdropMousedown(event: MouseEvent): void {\r\n this.backdropPressed = this.isBackdrop(event.target);\r\n }\r\n\r\n protected onBackdropClick(event: MouseEvent): void {\r\n if (this.backdropPressed && this.isBackdrop(event.target) && this.closeOnBackdrop()) {\r\n this.close();\r\n }\r\n this.backdropPressed = false;\r\n }\r\n\r\n private isBackdrop(target: EventTarget | null): boolean {\r\n const el = target as HTMLElement | null;\r\n // The backdrop is the dialog element and the wrapper around the content (kit layout).\r\n return !!el && (el === this.dialogRef().nativeElement || el.classList.contains('sirio-dialog-wrapper'));\r\n }\r\n\r\n private onOpen(): void {\r\n this.shown = true;\r\n const active = this.document.activeElement as HTMLElement | null;\r\n this.returnFocus = active && active !== this.document.body ? active : null;\r\n this.lockScroll();\r\n afterNextRender(\r\n () => {\r\n if (!this.shown) {\r\n return; // closed before rendering\r\n }\r\n // Kit behaviour: the dialog container receives the focus (its title is announced).\r\n this.dialogRef().nativeElement.focus();\r\n this.opened.emit();\r\n },\r\n { injector: this.injector },\r\n );\r\n }\r\n\r\n private onClose(): void {\r\n this.shown = false;\r\n this.unlockScroll();\r\n const result = this.pendingResult;\r\n this.pendingResult = undefined;\r\n this.closed.emit(result);\r\n const target = this.returnFocus;\r\n this.returnFocus = null;\r\n if (target?.isConnected) {\r\n target.focus();\r\n }\r\n this.openedRef?.finish(result);\r\n }\r\n\r\n private trapFocus(event: KeyboardEvent): void {\r\n const container = this.dialogRef().nativeElement;\r\n // Skip elements inside hidden parts of the content (collapsed sections, hidden panels).\r\n const focusable = Array.from(container.querySelectorAll<HTMLElement>(FOCUSABLE)).filter(\r\n (el) => !el.closest('[hidden], [data-sirio-visible=\"false\"], [aria-hidden=\"true\"]'),\r\n );\r\n if (!focusable.length) {\r\n event.preventDefault();\r\n return;\r\n }\r\n const first = focusable[0];\r\n const last = focusable[focusable.length - 1];\r\n const active = this.document.activeElement;\r\n if (event.shiftKey && (active === first || active === container)) {\r\n event.preventDefault();\r\n last.focus();\r\n } else if (!event.shiftKey && active === last) {\r\n event.preventDefault();\r\n first.focus();\r\n }\r\n }\r\n\r\n private lockScroll(): void {\r\n const lock = SCROLL_LOCKS.get(this.document);\r\n if (lock) {\r\n lock.count++;\r\n } else {\r\n SCROLL_LOCKS.set(this.document, { count: 1, overflow: this.document.body.style.overflow });\r\n this.document.body.style.overflow = 'hidden';\r\n }\r\n }\r\n\r\n private unlockScroll(): void {\r\n const lock = SCROLL_LOCKS.get(this.document);\r\n if (lock && --lock.count === 0) {\r\n SCROLL_LOCKS.delete(this.document);\r\n this.document.body.style.overflow = lock.overflow;\r\n }\r\n }\r\n}\r\n\r\n/** Dialog components, for `imports: [SIRIO_DIALOG]`. */\r\nexport const SIRIO_DIALOG = [SirioDialog, SirioDialogFooter, SirioDialogClose] as const;\r\n","<div\r\n #dialog\r\n class=\"sirio-dialog\"\r\n data-sirio-component=\"dialog\"\r\n tabindex=\"-1\"\r\n [id]=\"dialogId\"\r\n [class]=\"panelClass()\"\r\n [attr.role]=\"inline() && !open() ? null : alert() ? 'alertdialog' : 'dialog'\"\r\n [attr.aria-modal]=\"open() || null\"\r\n [attr.aria-labelledby]=\"title() ? titleId : null\"\r\n [attr.aria-label]=\"title() ? null : ariaLabel()\"\r\n [attr.data-sirio-visible]=\"open()\"\r\n (mousedown)=\"onBackdropMousedown($event)\"\r\n (click)=\"onBackdropClick($event)\"\r\n (keydown)=\"onKeydown($event)\"\r\n>\r\n <div\r\n class=\"sirio-dialog-wrapper\"\r\n [class.dialog-centered]=\"centered()\"\r\n [class.sirio-dialog-sm]=\"size() === 'sm'\"\r\n [class.sirio-dialog-lg]=\"size() === 'lg'\"\r\n [class.sirio-dialog-xl]=\"size() === 'xl'\"\r\n >\r\n <div class=\"sirio-dialog-content\">\r\n @if (title() || dismissible()) {\r\n <div class=\"sirio-dialog-header\">\r\n @if (title()) {\r\n <h2 class=\"sirio-dialog-title\" [id]=\"titleId\">\r\n @if (icon()) {\r\n <span [attr.class]=\"iconClasses()\" aria-hidden=\"true\"></span>\r\n }\r\n {{ title() }}\r\n </h2>\r\n }\r\n @if (dismissible()) {\r\n <button\r\n type=\"button\"\r\n class=\"sirio-btn sirio-btn-close\"\r\n data-sirio-dismiss=\"dialog\"\r\n [attr.aria-label]=\"closeLabel()\"\r\n (click)=\"close()\"\r\n >\r\n <span class=\"fas fa-times\" aria-hidden=\"true\"></span>\r\n </button>\r\n }\r\n </div>\r\n }\r\n <div class=\"sirio-dialog-body\">\r\n <ng-content />\r\n </div>\r\n @if (footer()) {\r\n <div class=\"sirio-dialog-footer\">\r\n <ng-content select=\"[wmSirioDialogFooter]\" />\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n","import { DOCUMENT } from '@angular/common';\r\nimport {\r\n afterNextRender,\r\n booleanAttribute,\r\n ChangeDetectionStrategy,\r\n Component,\r\n computed,\r\n contentChild,\r\n DestroyRef,\r\n Directive,\r\n ElementRef,\r\n inject,\r\n Injector,\r\n input,\r\n numberAttribute,\r\n output,\r\n signal,\r\n viewChild,\r\n} from '@angular/core';\r\nimport { SirioCollapse } from '../collapse/sirio-collapse';\r\nimport { sirioUniqueId } from '../core/sirio-control-base';\r\n\r\n/** An action of the title bar. */\r\nexport interface SirioTitleBarAction {\r\n label: string;\r\n /** Font Awesome icon (`fa-search` or the full classes). */\r\n icon: string;\r\n /**\r\n * Label when the controlled panel is open (kit `.sirio-msg-show` / `.sirio-msg-hide`,\r\n * e.g. \"Mostra filtri\" / \"Nascondi filtri\").\r\n */\r\n labelExpanded?: string;\r\n /** Collapse panel opened/closed by the action (kit `data-sirio-toggle=\"collapse\"`). */\r\n collapse?: SirioCollapse;\r\n disabled?: boolean;\r\n /** Free value for the application. */\r\n value?: unknown;\r\n}\r\n\r\n/** Payload of `(actionClick)`. */\r\nexport interface SirioTitleBarActionClick {\r\n action: SirioTitleBarAction;\r\n index: number;\r\n event: Event;\r\n}\r\n\r\n/** Kit breakpoint: from 992px the actions are buttons of the bar, below them a dropdown menu. */\r\nconst DESKTOP_QUERY = '(min-width: 992px)';\r\n\r\n/**\r\n * Custom actions placed directly in `.sirio-title-bar-action` (no responsive menu), e.g. the\r\n * kit table toolbar: `<div wmSirioTitleBarActions>...</div>`.\r\n */\r\n@Directive({ selector: '[wmSirioTitleBarActions]', host: { style: 'display: contents' } })\r\nexport class SirioTitleBarActions {}\r\n\r\n/**\r\n * Panel under the bar (kit `.sirio-title-bar-collapse`), usually a collapse region opened by an\r\n * action: `<div wmSirioCollapse wmSirioTitleBarPanel #filters=\"wmSirioCollapse\">...</div>`.\r\n */\r\n@Directive({ selector: '[wmSirioTitleBarPanel]' })\r\nexport class SirioTitleBarPanel {}\r\n\r\n/**\r\n * Title Bar of the Sirio web kit (\"Title Bar\"): title (`role=\"heading\"`, `aria-level`) with the\r\n * optional subtitle and the actions related to the content.\r\n *\r\n * Actions (`actions`): from 992px they are buttons of the bar (`sirio-btn sirio-btn-icon\r\n * sirio-btn-medium`; with `iconOnly`, default in the dark version, the label is sr-only and the\r\n * tooltip); below, the kit shows the \"Scegli una funzione del menu\" button (`fa-ellipsis-v`) that\r\n * opens them as a dropdown menu with visible labels. The menu works as the kit dropdown (Esc,\r\n * arrows, click outside, opens upwards or downwards where there is room).\r\n *\r\n * An action can open a panel (`collapse`): the panel goes in the `[wmSirioTitleBarPanel]` slot\r\n * (`.sirio-title-bar-collapse`), the action gets `aria-expanded` / `aria-controls` and the kit\r\n * labels `.sirio-msg-show` / `.sirio-msg-hide` (`labelExpanded`).\r\n *\r\n * ```html\r\n * <wm-sirio-title-bar title=\"Pratiche\" subtitle=\"Ultimi 30 giorni\" dark [actions]=\"actions\"\r\n * (actionClick)=\"run($event.action)\">\r\n * <div wmSirioCollapse wmSirioTitleBarPanel #filters=\"wmSirioCollapse\" ariaLabel=\"Filtri\">...</div>\r\n * </wm-sirio-title-bar>\r\n * ```\r\n */\r\n@Component({\r\n selector: 'wm-sirio-title-bar',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n host: {\r\n // `title` is an input: drop the native attribute, otherwise the whole bar shows a tooltip.\r\n '[attr.title]': 'null',\r\n '(document:click)': 'onDocumentClick($event)',\r\n '(window:resize)': 'reposition()',\r\n '(window:scroll)': 'reposition()',\r\n },\r\n styleUrl: './sirio-title-bar.scss',\r\n templateUrl: './sirio-title-bar.html',\r\n})\r\nexport class SirioTitleBar {\r\n readonly title = input('');\r\n readonly subtitle = input('');\r\n /** `aria-level` of the title (kit `role=\"heading\"`, default 3). */\r\n readonly headingLevel = input(3, { transform: (v: unknown) => numberAttribute(v, 3) });\r\n /** Dark version (`sirio-title-bar-dark`, actions `sirio-btn-primary`). */\r\n readonly dark = input(false, { transform: booleanAttribute });\r\n readonly actions = input<SirioTitleBarAction[]>([]);\r\n /** Desktop actions with the icon only (label sr-only + tooltip); default: true in the dark version. */\r\n readonly iconOnly = input<boolean | null, unknown>(null, {\r\n transform: (v: unknown) => (v === null || v === undefined ? null : booleanAttribute(v)),\r\n });\r\n /** Accessible name of the mobile menu button (kit). */\r\n readonly menuLabel = input('Scegli una funzione del menu');\r\n readonly actionClick = output<SirioTitleBarActionClick>();\r\n\r\n protected readonly panel = contentChild(SirioTitleBarPanel);\r\n private readonly toggleRef = viewChild<ElementRef<HTMLButtonElement>>('toggle');\r\n private readonly menuRef = viewChild<ElementRef<HTMLUListElement>>('menu');\r\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\r\n private readonly document = inject(DOCUMENT);\r\n private readonly injector = inject(Injector);\r\n\r\n private readonly baseId = sirioUniqueId('sirio-title-bar');\r\n protected readonly toggleId = `${this.baseId}-menu-button`;\r\n protected readonly menuId = `${this.baseId}-menu`;\r\n protected readonly menuOpen = signal(false);\r\n /** Menu opening upwards (kit default for the title bar), flipped when there is no room. */\r\n protected readonly menuTop = signal(true);\r\n\r\n protected readonly buttonClasses = computed(() =>\r\n this.dark()\r\n ? 'sirio-btn sirio-btn-primary sirio-btn-icon sirio-btn-medium'\r\n : 'sirio-btn sirio-btn-icon sirio-btn-medium',\r\n );\r\n /** Labels are sr-only on desktop with icon-only actions; the open mobile menu shows them (kit). */\r\n protected readonly labelHidden = computed(() => (this.iconOnly() ?? this.dark()) && !this.menuOpen());\r\n\r\n constructor() {\r\n const view = this.document.defaultView;\r\n const media = view?.matchMedia ? view.matchMedia(DESKTOP_QUERY) : null;\r\n if (media) {\r\n // Kit: back to the desktop layout the menu closes.\r\n const onChange = (event: MediaQueryListEvent) => event.matches && this.menuOpen.set(false);\r\n media.addEventListener('change', onChange);\r\n inject(DestroyRef).onDestroy(() => media.removeEventListener('change', onChange));\r\n }\r\n }\r\n\r\n protected currentLabel(action: SirioTitleBarAction): string {\r\n return action.labelExpanded && action.collapse?.expanded() ? action.labelExpanded : action.label;\r\n }\r\n\r\n protected iconClasses(icon: string): string {\r\n const value = icon.trim();\r\n return value.includes(' ') ? value : `fas ${value}`;\r\n }\r\n\r\n protected toggleMenu(): void {\r\n if (this.menuOpen()) {\r\n this.menuOpen.set(false);\r\n } else {\r\n this.openMenu();\r\n }\r\n }\r\n\r\n protected onAction(index: number, event: Event): void {\r\n const action = this.actions()[index];\r\n if (!action || action.disabled) {\r\n return;\r\n }\r\n action.collapse?.toggle();\r\n this.actionClick.emit({ action, index, event });\r\n if (this.menuOpen()) {\r\n this.closeMenu(true);\r\n }\r\n }\r\n\r\n protected onToggleKeydown(event: KeyboardEvent): void {\r\n if (!this.menuOpen()) {\r\n if (event.key === 'ArrowDown') {\r\n event.preventDefault();\r\n this.openMenu();\r\n this.focusEntry(0);\r\n }\r\n return;\r\n }\r\n if (event.key === 'Escape') {\r\n event.preventDefault();\r\n this.closeMenu(true);\r\n } else if (event.key === 'ArrowDown' || (event.key === 'Tab' && !event.shiftKey)) {\r\n event.preventDefault();\r\n this.focusEntry(0);\r\n }\r\n }\r\n\r\n protected onMenuKeydown(event: KeyboardEvent): void {\r\n if (!this.menuOpen()) {\r\n return; // desktop: plain buttons of the bar\r\n }\r\n const entries = this.entries();\r\n const index = entries.indexOf(event.target as HTMLElement);\r\n if (index < 0) {\r\n return;\r\n }\r\n switch (event.key) {\r\n case 'ArrowDown':\r\n event.preventDefault();\r\n entries[Math.min(index + 1, entries.length - 1)].focus();\r\n break;\r\n case 'ArrowUp':\r\n event.preventDefault();\r\n entries[Math.max(index - 1, 0)].focus();\r\n break;\r\n case 'Home':\r\n event.preventDefault();\r\n entries[0].focus();\r\n break;\r\n case 'End':\r\n event.preventDefault();\r\n entries[entries.length - 1].focus();\r\n break;\r\n case 'Escape':\r\n event.preventDefault();\r\n this.closeMenu(true);\r\n break;\r\n case 'Tab':\r\n if ((!event.shiftKey && index === entries.length - 1) || (event.shiftKey && index === 0)) {\r\n event.preventDefault();\r\n this.closeMenu(true);\r\n }\r\n break;\r\n }\r\n }\r\n\r\n protected onDocumentClick(event: Event): void {\r\n if (this.menuOpen() && !this.host.contains(event.target as Node)) {\r\n this.menuOpen.set(false);\r\n }\r\n }\r\n\r\n /** Kit: the menu opens upwards when there is room above, otherwise downwards. */\r\n protected reposition(): void {\r\n const menu = this.menuRef()?.nativeElement;\r\n const toggle = this.toggleRef()?.nativeElement;\r\n if (!this.menuOpen() || !menu || !toggle) {\r\n return;\r\n }\r\n const rect = toggle.getBoundingClientRect();\r\n const room = menu.offsetHeight + 8;\r\n const viewportHeight = this.document.defaultView?.innerHeight ?? 0;\r\n const fitsAbove = rect.top - room >= 0;\r\n const fitsBelow = rect.bottom + room <= viewportHeight;\r\n this.menuTop.set(fitsAbove || !fitsBelow);\r\n }\r\n\r\n private openMenu(): void {\r\n this.menuTop.set(true);\r\n this.menuOpen.set(true);\r\n afterNextRender(() => this.reposition(), { injector: this.injector });\r\n }\r\n\r\n private closeMenu(focusToggle: boolean): void {\r\n this.menuOpen.set(false);\r\n if (focusToggle) {\r\n this.toggleRef()?.nativeElement.focus();\r\n }\r\n }\r\n\r\n private entries(): HTMLElement[] {\r\n const menu = this.menuRef()?.nativeElement;\r\n return menu ? Array.from(menu.querySelectorAll<HTMLElement>('li > button:not(:disabled)')) : [];\r\n }\r\n\r\n private focusEntry(index: number): void {\r\n // The menu may already be rendered (open): focus at once; otherwise after the next render.\r\n const entry = this.menuOpenNow() ? this.entries()[index] : undefined;\r\n if (entry) {\r\n entry.focus();\r\n } else {\r\n afterNextRender(() => this.entries()[index]?.focus(), { injector: this.injector });\r\n }\r\n }\r\n\r\n /** True when the menu is open in the DOM (not only in the state). */\r\n private menuOpenNow(): boolean {\r\n return this.menuRef()?.nativeElement.getAttribute('data-sirio-visible') === 'true';\r\n }\r\n}\r\n\r\n/** Title bar components, for `imports: [SIRIO_TITLE_BAR]`. */\r\nexport const SIRIO_TITLE_BAR = [SirioTitleBar, SirioTitleBarActions, SirioTitleBarPanel] as const;\r\n","<div class=\"sirio-title-bar\" [class.sirio-title-bar-dark]=\"dark()\">\r\n <div class=\"sirio-title-bar-title\" role=\"heading\" [attr.aria-level]=\"headingLevel()\">\r\n {{ title() }}\r\n @if (subtitle()) {\r\n <small>{{ subtitle() }}</small>\r\n }\r\n </div>\r\n <div class=\"sirio-title-bar-action\">\r\n @if (actions().length) {\r\n <div class=\"sirio-dropdown\" data-sirio-component=\"dropdown\">\r\n <button\r\n #toggle\r\n type=\"button\"\r\n data-sirio-toggle=\"dropdown\"\r\n aria-haspopup=\"true\"\r\n [attr.class]=\"buttonClasses()\"\r\n [id]=\"toggleId\"\r\n [attr.aria-expanded]=\"menuOpen()\"\r\n [attr.aria-controls]=\"menuId\"\r\n [attr.aria-label]=\"menuLabel()\"\r\n (click)=\"toggleMenu()\"\r\n (keydown)=\"onToggleKeydown($event)\"\r\n >\r\n <span class=\"fas fa-ellipsis-v\" aria-hidden=\"true\"></span>\r\n </button>\r\n <ul\r\n #menu\r\n class=\"sirio-dropdown-menu sirio-dropdown-menu-right\"\r\n [class.sirio-dropdown-menu-top]=\"menuTop()\"\r\n [id]=\"menuId\"\r\n [attr.aria-labelledby]=\"toggleId\"\r\n [attr.data-sirio-visible]=\"menuOpen()\"\r\n (keydown)=\"onMenuKeydown($event)\"\r\n >\r\n @for (action of actions(); track $index; let i = $index) {\r\n @let collapse = action.collapse;\r\n <li>\r\n <button\r\n type=\"button\"\r\n [attr.class]=\"buttonClasses()\"\r\n [attr.title]=\"currentLabel(action)\"\r\n [disabled]=\"action.disabled\"\r\n [attr.data-sirio-toggle]=\"collapse ? 'collapse' : null\"\r\n [attr.data-sirio-target]=\"collapse ? '#' + collapse.id() : null\"\r\n [attr.aria-controls]=\"collapse ? collapse.id() : null\"\r\n [attr.aria-expanded]=\"collapse ? collapse.expanded() : null\"\r\n (click)=\"onAction(i, $event)\"\r\n >\r\n <span [attr.class]=\"iconClasses(action.icon)\" aria-hidden=\"true\"></span>\r\n @if (action.labelExpanded && collapse) {\r\n <span class=\"sirio-msg-show\" [class.sr-only]=\"labelHidden()\">{{ action.label }}</span>\r\n <span class=\"sirio-msg-hide\" [class.sr-only]=\"labelHidden()\">{{ action.labelExpanded }}</span>\r\n } @else {\r\n <span [class.sr-only]=\"labelHidden()\">{{ action.label }}</span>\r\n }\r\n </button>\r\n </li>\r\n }\r\n </ul>\r\n </div>\r\n } @else {\r\n <ng-content select=\"[wmSirioTitleBarActions]\" />\r\n }\r\n </div>\r\n</div>\r\n@if (panel()) {\r\n <div class=\"sirio-title-bar-collapse\"><ng-content select=\"[wmSirioTitleBarPanel]\" /></div>\r\n}\r\n","import { DOCUMENT } from '@angular/common';\r\nimport {\r\n ApplicationRef,\r\n booleanAttribute,\r\n DestroyRef,\r\n Directive,\r\n ElementRef,\r\n EmbeddedViewRef,\r\n inject,\r\n input,\r\n output,\r\n TemplateRef,\r\n} from '@angular/core';\r\nimport { sirioUniqueId } from '../core/sirio-control-base';\r\n\r\n/** Placements of the kit tooltip (`data-sirio-placement`), default `top`. */\r\nexport type SirioTooltipPlacement =\r\n | 'top'\r\n | 'top-start'\r\n | 'top-end'\r\n | 'bottom'\r\n | 'bottom-start'\r\n | 'bottom-end'\r\n | 'left'\r\n | 'right';\r\n\r\n/** Distance between the trigger and the tooltip (kit: 10px). */\r\nconst OFFSET = 10;\r\n\r\n/** Fallback placements when the preferred one does not fit (kit \"full\" floating positions). */\r\nconst FALLBACK: Record<SirioTooltipPlacement, SirioTooltipPlacement[]> = {\r\n top: ['top', 'bottom', 'top-start', 'top-end', 'bottom-start', 'bottom-end', 'left', 'right'],\r\n bottom: ['bottom', 'top', 'bottom-start', 'bottom-end', 'top-start', 'top-end', 'left', 'right'],\r\n left: ['left', 'right', 'top', 'bottom', 'top-start', 'bottom-start', 'top-end', 'bottom-end'],\r\n right: ['right', 'left', 'top', 'bottom', 'top-end', 'bottom-end', 'top-start', 'bottom-start'],\r\n 'top-start': ['top-start', 'bottom-start', 'top', 'bottom', 'top-end', 'bottom-end', 'left', 'right'],\r\n 'bottom-start': ['bottom-start', 'top-start', 'bottom', 'top', 'bottom-end', 'top-end', 'left', 'right'],\r\n 'top-end': ['top-end', 'bottom-end', 'top', 'bottom', 'top-start', 'bottom-start', 'left', 'right'],\r\n 'bottom-end': ['bottom-end', 'top-end', 'bottom', 'top', 'bottom-start', 'top-start', 'left', 'right'],\r\n};\r\n\r\n/**\r\n * Position (document coordinates) of a floating element next to a trigger, with the kit fallback:\r\n * the first placement that stays inside the page is used.\r\n */\r\nexport function sirioFloatingPosition(\r\n trigger: HTMLElement,\r\n floating: HTMLElement,\r\n placement: SirioTooltipPlacement,\r\n offset = OFFSET,\r\n): [number, number] {\r\n const doc = trigger.ownerDocument;\r\n const rect = trigger.getBoundingClientRect();\r\n const x = rect.left + doc.documentElement.scrollLeft;\r\n const y = rect.top + doc.documentElement.scrollTop;\r\n const w = floating.offsetWidth;\r\n const h = floating.offsetHeight;\r\n const tw = trigger.offsetWidth;\r\n const th = trigger.offsetHeight;\r\n const compute = (p: SirioTooltipPlacement): [number, number] => {\r\n switch (p) {\r\n case 'top-start':\r\n return [x, y - h - offset];\r\n case 'top':\r\n return [x + tw / 2 - w / 2, y - h - offset];\r\n case 'top-end':\r\n return [x + tw - w, y - h - offset];\r\n case 'left':\r\n return [x - w - offset, y + th / 2 - h / 2];\r\n case 'right':\r\n return [x + tw + offset, y + th / 2 - h / 2];\r\n case 'bottom-start':\r\n return [x, y + th + offset];\r\n case 'bottom':\r\n return [x + tw / 2 - w / 2, y + th + offset];\r\n case 'bottom-end':\r\n return [x + tw - w, y + th + offset];\r\n }\r\n };\r\n const pageWidth = doc.body.offsetWidth;\r\n const pageHeight = Math.max(doc.body.offsetHeight, doc.documentElement.clientHeight);\r\n for (const p of FALLBACK[placement] ?? FALLBACK.top) {\r\n const [left, top] = compute(p);\r\n if (left >= 0 && top >= 0 && left + w <= pageWidth && top + h <= pageHeight) {\r\n return [left, top];\r\n }\r\n }\r\n return compute(placement);\r\n}\r\n\r\n/** Shared logic of the floating kit element (`div.sirio-tooltip` appended to the body). */\r\nabstract class SirioFloating {\r\n protected readonly host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\r\n protected readonly document = inject(DOCUMENT);\r\n protected element: HTMLElement | null = null;\r\n private readonly cleanups: (() => void)[] = [];\r\n\r\n protected abstract readonly placementValue: () => SirioTooltipPlacement;\r\n\r\n constructor() {\r\n inject(DestroyRef).onDestroy(() => this.destroyElement());\r\n }\r\n\r\n /** True while the floating element is shown. */\r\n get visible(): boolean {\r\n return !!this.element;\r\n }\r\n\r\n protected createElement(id: string, role: string): HTMLElement {\r\n const el = this.document.createElement('div');\r\n el.className = 'sirio-tooltip';\r\n el.setAttribute('role', role);\r\n el.id = id;\r\n el.tabIndex = -1;\r\n el.style.position = 'absolute';\r\n el.style.top = '0';\r\n el.style.left = '0';\r\n el.style.willChange = 'transform';\r\n return el;\r\n }\r\n\r\n protected attach(el: HTMLElement): void {\r\n this.document.body.appendChild(el);\r\n this.element = el;\r\n this.position();\r\n const view = this.document.defaultView;\r\n const reposition = () => this.position();\r\n view?.addEventListener('scroll', reposition, true);\r\n view?.addEventListener('resize', reposition);\r\n this.cleanups.push(() => {\r\n view?.removeEventListener('scroll', reposition, true);\r\n view?.removeEventListener('resize', reposition);\r\n });\r\n }\r\n\r\n protected listen<K extends keyof DocumentEventMap>(\r\n target: Document | HTMLElement,\r\n type: K,\r\n handler: (event: DocumentEventMap[K]) => void,\r\n capture = false,\r\n ): void {\r\n target.addEventListener(type, handler as EventListener, capture);\r\n this.cleanups.push(() => target.removeEventListener(type, handler as EventListener, capture));\r\n }\r\n\r\n protected position(): void {\r\n if (this.element) {\r\n const [left, top] = sirioFloatingPosition(this.host, this.element, this.placementValue());\r\n this.element.style.transform = `translate(${left}px, ${top}px)`;\r\n }\r\n }\r\n\r\n protected destroyElement(): void {\r\n this.cleanups.splice(0).forEach((fn) => fn());\r\n this.element?.remove();\r\n this.element = null;\r\n }\r\n\r\n /** Adds / removes an id in an ARIA id-list attribute of the trigger. */\r\n protected toggleIdRef(attribute: string, id: string, add: boolean): void {\r\n const ids = (this.host.getAttribute(attribute) ?? '').split(/\\s+/).filter((v) => v && v !== id);\r\n if (add) {\r\n ids.push(id);\r\n }\r\n if (ids.length) {\r\n this.host.setAttribute(attribute, ids.join(' '));\r\n } else {\r\n this.host.removeAttribute(attribute);\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Tooltip of the Sirio web kit (\"Tooltip\"): shown on hover and focus of the trigger as\r\n * `div.sirio-tooltip[role=tooltip]` appended to the body (`<strong>` title, or\r\n * `.sirio-tooltip-inner` with title and description), positioned with the kit placements and\r\n * fallback; the trigger gets `aria-describedby` while it is shown.\r\n *\r\n * As the kit script: it stays open while the pointer is on the tooltip, closes on mouse leave,\r\n * blur and Esc. Unlike the kit markup, the text is not in the `title` attribute (it would show the\r\n * browser tooltip too).\r\n *\r\n * ```html\r\n * <button wmSirioButton type=\"button\" wmSirioTooltip=\"Salva la bozza\" tooltipPlacement=\"bottom\">Salva</button>\r\n * <button wmSirioButton type=\"button\" wmSirioTooltip=\"Titolo\" tooltipDescription=\"Descrizione\">Info</button>\r\n * ```\r\n */\r\n@Directive({\r\n selector: '[wmSirioTooltip]',\r\n exportAs: 'wmSirioTooltip',\r\n host: {\r\n '(mouseenter)': 'show()',\r\n '(focus)': 'show()',\r\n '(mouseleave)': 'onLeave($event)',\r\n '(blur)': 'hide()',\r\n },\r\n})\r\nexport class SirioTooltip extends SirioFloating {\r\n /** Title of the tooltip (kit `title`). */\r\n readonly text = input('', { alias: 'wmSirioTooltip' });\r\n /** Description under the title (kit `data-sirio-content`, plain text). */\r\n readonly description = input<string | null>(null, { alias: 'tooltipDescription' });\r\n readonly placement = input<SirioTooltipPlacement>('top', { alias: 'tooltipPlacement' });\r\n readonly disabled = input(false, { alias: 'tooltipDisabled', transform: booleanAttribute });\r\n\r\n protected readonly placementValue = () => this.placement();\r\n private readonly id = sirioUniqueId('sirio-tooltip');\r\n\r\n show(): void {\r\n if (this.element || this.disabled() || !this.text()) {\r\n return;\r\n }\r\n const el = this.createElement(this.id, 'tooltip');\r\n const title = this.document.createElement('strong');\r\n title.textContent = this.text();\r\n const description = this.description();\r\n if (description) {\r\n const inner = this.document.createElement('div');\r\n inner.className = 'sirio-tooltip-inner';\r\n const p = this.document.createElement('p');\r\n p.appendChild(title);\r\n const desc = this.document.createElement('p');\r\n desc.textContent = description;\r\n inner.append(p, desc);\r\n el.appendChild(inner);\r\n } else {\r\n el.appendChild(title);\r\n }\r\n this.attach(el);\r\n this.toggleIdRef('aria-describedby', this.id, true);\r\n // Kit: leaving the tooltip closes it unless the pointer goes back to the trigger.\r\n this.listen(el, 'mouseleave', (event) => this.onLeave(event as MouseEvent));\r\n // WCAG 1.4.13: Esc dismisses the tooltip.\r\n this.listen(this.document, 'keydown', (event) => {\r\n if (event.key === 'Escape') {\r\n this.hide();\r\n }\r\n });\r\n }\r\n\r\n hide(): void {\r\n if (this.element) {\r\n this.toggleIdRef('aria-describedby', this.id, false);\r\n this.destroyElement();\r\n }\r\n }\r\n\r\n protected onLeave(event: MouseEvent): void {\r\n const to = event.relatedTarget as Node | null;\r\n if (to && (this.host.contains(to) || this.element?.contains(to))) {\r\n return; // moving between the trigger and the tooltip (hoverable, kit)\r\n }\r\n this.hide();\r\n }\r\n}\r\n\r\n/**\r\n * Interactive tooltip (Popover) of the Sirio web kit: opened by a click on the trigger (usually an\r\n * info icon), with title, description and actions; it stays open until a click outside, Esc or a\r\n * second click on the trigger. The content is a template:\r\n *\r\n * ```html\r\n * <button type=\"button\" class=\"sirio-btn sirio-btn-icon\" aria-label=\"Informazioni\"\r\n * [wmSirioPopover]=\"info\" popoverTitle=\"Cos'è l'ISEE\" popoverPlacement=\"right\">\r\n * <span class=\"fas fa-info-circle\" aria-hidden=\"true\"></span>\r\n * </button>\r\n * <ng-template #info>\r\n * <p>L'indicatore della situazione economica equivalente...</p>\r\n * <a href=\"/isee\" class=\"sirio-btn sirio-btn-tertiary-light\">Approfondisci</a>\r\n * </ng-template>\r\n * ```\r\n *\r\n * Kit markup (`div.sirio-tooltip` > `.sirio-tooltip-inner` with `p > strong` title); since it\r\n * contains actions it is a non-modal `role=\"dialog\"` labelled by its title (the kit uses\r\n * `role=\"tooltip\"`, which cannot hold interactive content). The trigger gets `aria-expanded` and\r\n * `aria-controls`; Tab from the trigger enters the popover, Tab past its last element or Esc\r\n * close it and return to the trigger.\r\n */\r\n@Directive({\r\n selector: '[wmSirioPopover]',\r\n exportAs: 'wmSirioPopover',\r\n host: {\r\n 'aria-expanded': 'false',\r\n '(click)': 'toggle()',\r\n '(keydown)': 'onTriggerKeydown($event)',\r\n },\r\n})\r\nexport class SirioPopover extends SirioFloating {\r\n /** Content of the popover (description and actions). */\r\n readonly content = input.required<TemplateRef<unknown>>({ alias: 'wmSirioPopover' });\r\n readonly title = input('', { alias: 'popoverTitle' });\r\n readonly placement = input<SirioTooltipPlacement>('top', { alias: 'popoverPlacement' });\r\n readonly opened = output<void>();\r\n readonly closed = output<void>();\r\n\r\n protected readonly placementValue = () => this.placement();\r\n protected readonly id = sirioUniqueId('sirio-popover');\r\n private readonly appRef = inject(ApplicationRef);\r\n private view: EmbeddedViewRef<unknown> | null = null;\r\n protected expanded = false;\r\n\r\n toggle(): void {\r\n if (this.element) {\r\n this.close();\r\n } else {\r\n this.open();\r\n }\r\n }\r\n\r\n open(): void {\r\n if (this.element) {\r\n return;\r\n }\r\n const el = this.createElement(this.id, 'dialog');\r\n const titleId = `${this.id}-title`;\r\n const inner = this.document.createElement('div');\r\n inner.className = 'sirio-tooltip-inner';\r\n if (this.title()) {\r\n const p = this.document.createElement('p');\r\n const strong = this.document.createElement('strong');\r\n strong.id = titleId;\r\n strong.textContent = this.title();\r\n p.appendChild(strong);\r\n inner.appendChild(p);\r\n el.setAttribute('aria-labelledby', titleId);\r\n }\r\n this.view = this.content().createEmbeddedView({});\r\n this.appRef.attachView(this.view);\r\n this.view.detectChanges();\r\n inner.append(...this.view.rootNodes);\r\n el.appendChild(inner);\r\n this.attach(el);\r\n this.expanded = true;\r\n this.setExpandedAttributes();\r\n\r\n // Kit: a click outside closes the popover.\r\n this.listen(\r\n this.document,\r\n 'click',\r\n (event) => {\r\n const target = event.target as Node;\r\n if (!this.host.contains(target) && !this.element?.contains(target)) {\r\n this.close(false);\r\n }\r\n },\r\n true,\r\n );\r\n this.listen(el, 'keydown', (event) => this.onPopoverKeydown(event as KeyboardEvent));\r\n this.opened.emit();\r\n }\r\n\r\n close(focusTrigger = true): void {\r\n if (!this.element) {\r\n return;\r\n }\r\n this.destroyElement();\r\n if (this.view) {\r\n this.appRef.detachView(this.view);\r\n this.view.destroy();\r\n this.view = null;\r\n }\r\n this.expanded = false;\r\n this.setExpandedAttributes();\r\n if (focusTrigger) {\r\n this.host.focus();\r\n }\r\n this.closed.emit();\r\n }\r\n\r\n protected onTriggerKeydown(event: KeyboardEvent): void {\r\n if (!this.element) {\r\n return;\r\n }\r\n if (event.key === 'Escape') {\r\n event.preventDefault();\r\n this.close();\r\n } else if (event.key === 'Tab' && !event.shiftKey) {\r\n // The popover is at the end of the body: Tab moves into it, as the kit.\r\n const first = this.focusables()[0];\r\n if (first) {\r\n event.preventDefault();\r\n first.focus();\r\n }\r\n }\r\n }\r\n\r\n private onPopoverKeydown(event: KeyboardEvent): void {\r\n if (event.key === 'Escape') {\r\n event.preventDefault();\r\n this.close();\r\n return;\r\n }\r\n if (event.key !== 'Tab') {\r\n return;\r\n }\r\n const focusables = this.focusables();\r\n const index = focusables.indexOf(event.target as HTMLElement);\r\n if ((event.shiftKey && index <= 0) || (!event.shiftKey && index === focusables.length - 1)) {\r\n event.preventDefault();\r\n this.close();\r\n }\r\n }\r\n\r\n private focusables(): HTMLElement[] {\r\n return Array.from(\r\n this.element?.querySelectorAll<HTMLElement>(\r\n 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])',\r\n ) ?? [],\r\n );\r\n }\r\n\r\n /** ARIA state of the trigger (set directly: the popover lives outside the Angular view). */\r\n private setExpandedAttributes(): void {\r\n this.host.setAttribute('aria-expanded', String(this.expanded));\r\n if (this.expanded) {\r\n this.host.setAttribute('aria-controls', this.id);\r\n } else {\r\n this.host.removeAttribute('aria-controls');\r\n }\r\n }\r\n}\r\n\r\n/** Tooltip directives, for `imports: [SIRIO_TOOLTIP]`. */\r\nexport const SIRIO_TOOLTIP = [SirioTooltip, SirioPopover] as const;\r\n","import { DOCUMENT, NgTemplateOutlet } from '@angular/common';\r\nimport {\r\n afterNextRender,\r\n booleanAttribute,\r\n ChangeDetectionStrategy,\r\n Component,\r\n contentChild,\r\n DestroyRef,\r\n Directive,\r\n ElementRef,\r\n inject,\r\n Injector,\r\n input,\r\n model,\r\n numberAttribute,\r\n output,\r\n viewChild,\r\n} from '@angular/core';\r\nimport { SirioCollapse, SirioCollapseToggle } from '../collapse/sirio-collapse';\r\nimport { SirioDialog, SirioDialogFooter } from '../dialog/sirio-dialog';\r\nimport { SirioTitleBar, SirioTitleBarActions, SirioTitleBarPanel } from '../title-bar/sirio-title-bar';\r\nimport { SirioPopover } from '../tooltip/sirio-tooltip';\r\n\r\n/** A selected filter shown as a removable chip. */\r\nexport interface SirioFilterChip {\r\n label: string;\r\n /** Free value for the application (e.g. the filter key). */\r\n value?: unknown;\r\n}\r\n\r\n/**\r\n * Layouts of the Sirio filters (\"Filtri\"):\r\n * - `vertical`: in place of the side menu; on desktop (≥ 992px) a column of the page, below a\r\n * drawer opened by \"Mostra filtri\" (kit \"Filtri verticali\");\r\n * - `drawer`: title bar with \"Mostra filtri\" opening a drawer from the right (kit \"Filtri con apertura\r\n * drawer\");\r\n * - `collapse`: title bar with \"Mostra filtri / Nascondi filtri\" opening the panel under the bar\r\n * (kit \"Filtri orizzontali\" and \"Filtri con Tab\" with a `wm-sirio-tabs` inside).\r\n */\r\nexport type SirioFilterLayout = 'vertical' | 'drawer' | 'collapse';\r\n\r\n/** Kit desktop breakpoint of the vertical filters. */\r\nconst DESKTOP_QUERY = '(min-width: 992px)';\r\n\r\n// ---- Selected filters --------------------------------------------------------------------------\r\n\r\n/**\r\n * Selected filters of the Sirio web kit (\"Filtri selezionati\", `.sirio-filter-selected`): one\r\n * removable chip per filter (`.sirio-chip` with the \"Elimina {filtro}\" button). After a removal the\r\n * focus moves to the next chip (or to the previous one); after the last one `(emptied)` is emitted.\r\n *\r\n * ```html\r\n * <wm-sirio-filter-chips [chips]=\"chips()\" (removed)=\"remove($event)\" />\r\n * ```\r\n */\r\n@Component({\r\n selector: 'wm-sirio-filter-chips',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n styleUrl: './sirio-filter-chips.scss',\r\n templateUrl: './sirio-filter-chips.html',\r\n})\r\nexport class SirioFilterChips {\r\n readonly chips = input<SirioFilterChip[]>([]);\r\n /** sr-only title of the block (kit). */\r\n readonly label = input('Filtri selezionati');\r\n readonly removeLabel = input('Elimina');\r\n /** A chip was removed: update `chips` (and the filters) in the application. */\r\n readonly removed = output<SirioFilterChip>();\r\n /**\r\n * The last chip was removed and the focus has nowhere to go among the chips: move it to a\r\n * sensible element (`wm-sirio-filter` focuses its \"Mostra filtri\" button).\r\n */\r\n readonly emptied = output<void>();\r\n\r\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\r\n private readonly injector = inject(Injector);\r\n\r\n protected remove(chip: SirioFilterChip, index: number): void {\r\n this.removed.emit(chip);\r\n // The removed chip disappears: keep the focus on the chips (next one, else the previous one).\r\n afterNextRender(\r\n () => {\r\n const buttons = this.host.querySelectorAll<HTMLButtonElement>('.sirio-chip button');\r\n if (buttons.length) {\r\n buttons[Math.min(index, buttons.length - 1)].focus();\r\n } else {\r\n this.emptied.emit();\r\n }\r\n },\r\n { injector: this.injector },\r\n );\r\n }\r\n}\r\n\r\n// ---- Section --------------------------------------------------------------------------------\r\n\r\n/**\r\n * Items of a section shown only after \"Mostra tutto\" (kit long chip lists):\r\n * `<div wmSirioFilterMore>...</div>` inside a `wm-sirio-filter-section`.\r\n */\r\n@Directive({ selector: '[wmSirioFilterMore]' })\r\nexport class SirioFilterMore {}\r\n\r\n/**\r\n * Section of the filters (kit `h3.h6 > strong` title, optional info popover, content in `.py-4`):\r\n * group of related filters, e.g. a `wm-sirio-checklist` with chips or some inputs.\r\n *\r\n * ```html\r\n * <wm-sirio-filter-section title=\"Tipologia\" info=\"Il tipo di prestazione richiesta\">\r\n * <wm-sirio-checklist chips label=\"Tipologia\" [options]=\"tipi\" formControlName=\"tipi\" />\r\n * <div wmSirioFilterMore>...altre opzioni...</div>\r\n * </wm-sirio-filter-section>\r\n * ```\r\n */\r\n@Component({\r\n selector: 'wm-sirio-filter-section',\r\n imports: [NgTemplateOutlet, SirioPopover, SirioCollapse, SirioCollapseToggle],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n host: {\r\n // `title` is an input: drop the native attribute, otherwise the whole section shows a tooltip.\r\n '[attr.title]': 'null',\r\n },\r\n styleUrl: './sirio-filter-section.scss',\r\n templateUrl: './sirio-filter-section.html',\r\n})\r\nexport class SirioFilterSection {\r\n readonly title = input.required<string>();\r\n /** Heading level of the title (2–5, default 3 as in the kit drawer). */\r\n readonly headingLevel = input(3, { transform: (v: unknown) => numberAttribute(v, 3) });\r\n /** Help text shown in the info popover next to the title (kit `fa-info-circle`). */\r\n readonly info = input('');\r\n readonly infoTitle = input('');\r\n readonly infoLabel = input('Informazioni su');\r\n readonly showMoreLabel = input('Mostra tutto');\r\n readonly showLessLabel = input('Nascondi');\r\n readonly moreRegionLabel = input(\"Mostra il resto dell'elenco\");\r\n\r\n protected readonly more = contentChild(SirioFilterMore);\r\n}\r\n\r\n// ---- Filters ------------------------------------------------------------------------------------\r\n\r\n/**\r\n * Filters of the Sirio web kit (\"Filtri\"): `.sirio-filter` with the dark title bar \"Filtri\" and the\r\n * \"Mostra filtri\" action, the selected filters as chips (`.sirio-filter-selected`) and the panel with\r\n * the filter sections and the \"Elimina filtri\" / \"Applica filtri\" buttons, in the three kit layouts\r\n * (`vertical`, `drawer`, `collapse`, see {@link SirioFilterLayout}). The filter controls are\r\n * projected (any Sirio control, usually in `wm-sirio-filter-section`s); the component emits `(apply)` and\r\n * `(clear)` and shows `chips` with `(chipRemoved)`.\r\n *\r\n * ```html\r\n * <wm-sirio-filter layout=\"drawer\" [chips]=\"chips()\" (apply)=\"search()\" (clear)=\"reset()\" (chipRemoved)=\"remove($event)\">\r\n * <wm-sirio-filter-section title=\"Stato\">\r\n * <wm-sirio-checklist chips label=\"Stato\" [options]=\"stati\" formControlName=\"stati\" />\r\n * </wm-sirio-filter-section>\r\n * </wm-sirio-filter>\r\n * ```\r\n */\r\n@Component({\r\n selector: 'wm-sirio-filter',\r\n imports: [\r\n NgTemplateOutlet,\r\n SirioTitleBar,\r\n SirioTitleBarActions,\r\n SirioTitleBarPanel,\r\n SirioDialog,\r\n SirioDialogFooter,\r\n SirioCollapse,\r\n SirioCollapseToggle,\r\n SirioFilterChips,\r\n ],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n host: {\r\n // `title` is an input: drop the native attribute, otherwise the whole block shows a tooltip.\r\n '[attr.title]': 'null',\r\n },\r\n styleUrl: './sirio-filter.scss',\r\n templateUrl: './sirio-filter.html',\r\n})\r\nexport class SirioFilter {\r\n readonly layout = input<SirioFilterLayout>('drawer');\r\n /** Title of the bar and of the drawer (kit \"Filtri\"). */\r\n readonly title = input('Filtri');\r\n /** `aria-level` of the title bar title (kit: to adapt to the page outline, default 3). */\r\n readonly headingLevel = input(3, { transform: (v: unknown) => numberAttribute(v, 3) });\r\n /** Dark title bar (kit default). */\r\n readonly dark = input(true, { transform: booleanAttribute });\r\n /** Selected filters shown as chips (kit \"Filtri selezionati\"). */\r\n readonly chips = input<SirioFilterChip[]>([]);\r\n readonly showLabel = input('Mostra filtri');\r\n readonly hideLabel = input('Nascondi filtri');\r\n readonly applyLabel = input('Applica filtri');\r\n readonly clearLabel = input('Elimina filtri');\r\n /** sr-only hint of the drawer button (kit \": Apre finestra modale\"). */\r\n readonly dialogHint = input('Apre finestra modale');\r\n /** The drawer (or the collapse panel) is open (two-way: `[(open)]`). */\r\n readonly open = model(false);\r\n\r\n /** \"Applica filtri\": the drawer closes. */\r\n readonly apply = output<void>();\r\n /** \"Elimina filtri\". */\r\n readonly clear = output<void>();\r\n readonly chipRemoved = output<SirioFilterChip>();\r\n\r\n private readonly opener = viewChild<ElementRef<HTMLButtonElement>>('opener');\r\n\r\n protected actionClasses(): string {\r\n return this.dark() ? 'sirio-btn sirio-btn-primary sirio-btn-icon' : 'sirio-btn sirio-btn-icon';\r\n }\r\n\r\n constructor() {\r\n // Vertical filters: back to the desktop layout the drawer is not a dialog any more.\r\n const view = inject(DOCUMENT).defaultView;\r\n const media = view?.matchMedia ? view.matchMedia(DESKTOP_QUERY) : null;\r\n if (media) {\r\n const onChange = (event: MediaQueryListEvent) => {\r\n if (event.matches && this.layout() === 'vertical') {\r\n this.open.set(false);\r\n }\r\n };\r\n media.addEventListener('change', onChange);\r\n inject(DestroyRef).onDestroy(() => media.removeEventListener('change', onChange));\r\n }\r\n }\r\n\r\n protected onApply(): void {\r\n this.apply.emit();\r\n if (this.layout() !== 'collapse') {\r\n this.open.set(false);\r\n }\r\n }\r\n\r\n protected onClear(): void {\r\n this.clear.emit();\r\n }\r\n\r\n /** Focus on the \"Mostra filtri\" button (e.g. after closing the drawer from code or removing the last chip). */\r\n focusOpener(): void {\r\n this.opener()?.nativeElement.focus();\r\n }\r\n}\r\n\r\n/** Filter components, for `imports: [SIRIO_FILTER]`. */\r\nexport const SIRIO_FILTER = [SirioFilter, SirioFilterSection, SirioFilterMore, SirioFilterChips] as const;\r\n","@if (chips().length) {\r\n <div class=\"sirio-filter-selected\">\r\n <span class=\"sr-only\">{{ label() }}</span>\r\n <div class=\"row g-3\">\r\n @for (chip of chips(); track $index; let i = $index) {\r\n <div class=\"col-auto\">\r\n <div class=\"sirio-chip\">\r\n <span class=\"sirio-chip-label\">{{ chip.label }}</span>\r\n <button\r\n type=\"button\"\r\n class=\"sirio-btn sirio-btn-primary\"\r\n [attr.aria-label]=\"removeLabel() + ' ' + chip.label\"\r\n (click)=\"remove(chip, i)\"\r\n >\r\n <span class=\"fas fa-times\" aria-hidden=\"true\"></span>\r\n </button>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n}\r\n","<ng-template #heading>\r\n <strong>{{ title() }}</strong>\r\n @if (info()) {\r\n <button\r\n type=\"button\"\r\n class=\"sirio-btn sirio-btn-icon\"\r\n [attr.aria-label]=\"infoLabel() + ' ' + title()\"\r\n [wmSirioPopover]=\"infoTpl\"\r\n [popoverTitle]=\"infoTitle() || title()\"\r\n popoverPlacement=\"right\"\r\n >\r\n <span class=\"fas fa-info-circle\" aria-hidden=\"true\"></span>\r\n </button>\r\n }\r\n</ng-template>\r\n<ng-template #infoTpl><p>{{ info() }}</p></ng-template>\r\n\r\n@switch (headingLevel()) {\r\n @case (2) {\r\n <h2 class=\"h6 sirio-filter-section-title\"><ng-container [ngTemplateOutlet]=\"heading\" /></h2>\r\n }\r\n @case (4) {\r\n <h4 class=\"h6 sirio-filter-section-title\"><ng-container [ngTemplateOutlet]=\"heading\" /></h4>\r\n }\r\n @case (5) {\r\n <h5 class=\"h6 sirio-filter-section-title\"><ng-container [ngTemplateOutlet]=\"heading\" /></h5>\r\n }\r\n @default {\r\n <h3 class=\"h6 sirio-filter-section-title\"><ng-container [ngTemplateOutlet]=\"heading\" /></h3>\r\n }\r\n}\r\n<div class=\"py-4\">\r\n <ng-content />\r\n @if (more()) {\r\n <a class=\"sirio-expanded-true\" [wmSirioCollapseToggle]=\"moreRegion\">\r\n {{ showMoreLabel() }}<span class=\"fas fa-chevron-down ms-2\" aria-hidden=\"true\"></span>\r\n </a>\r\n <div wmSirioCollapse #moreRegion=\"wmSirioCollapse\" [ariaLabel]=\"moreRegionLabel()\">\r\n <ng-content select=\"[wmSirioFilterMore]\" />\r\n <a class=\"sirio-expanded-false\" [wmSirioCollapseToggle]=\"moreRegion\">\r\n {{ showLessLabel() }}<span class=\"fas fa-chevron-up ms-2\" aria-hidden=\"true\"></span>\r\n </a>\r\n </div>\r\n }\r\n</div>\r\n","<ng-template #body><ng-content /></ng-template>\r\n<ng-template #actions let-cols=\"cols\">\r\n <div class=\"row g-3 justify-content-center\">\r\n <div [attr.class]=\"cols\">\r\n <button type=\"button\" class=\"sirio-btn sirio-btn-secondary w-100\" (click)=\"onClear()\">{{ clearLabel() }}</button>\r\n </div>\r\n <div [attr.class]=\"cols\">\r\n <button type=\"button\" class=\"sirio-btn sirio-btn-primary w-100\" (click)=\"onApply()\">{{ applyLabel() }}</button>\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n<div class=\"sirio-filter\">\r\n @if (layout() === 'collapse') {\r\n <wm-sirio-title-bar [title]=\"title()\" [headingLevel]=\"headingLevel()\" [dark]=\"dark()\">\r\n <div wmSirioTitleBarActions>\r\n <button\r\n #opener\r\n type=\"button\"\r\n [attr.class]=\"actionClasses()\"\r\n [attr.title]=\"panel.expanded() ? hideLabel() : showLabel()\"\r\n [wmSirioCollapseToggle]=\"panel\"\r\n >\r\n <span class=\"fas fa-filter\" aria-hidden=\"true\"></span>\r\n <span class=\"sirio-msg-show\">{{ showLabel() }}</span>\r\n <span class=\"sirio-msg-hide\">{{ hideLabel() }}</span>\r\n </button>\r\n </div>\r\n <div wmSirioCollapse wmSirioTitleBarPanel #panel=\"wmSirioCollapse\" [(expanded)]=\"open\">\r\n <ng-container [ngTemplateOutlet]=\"body\" />\r\n <div class=\"mt-4\">\r\n <ng-container [ngTemplateOutlet]=\"actions\" [ngTemplateOutletContext]=\"{ cols: 'col-6 col-md-auto' }\" />\r\n </div>\r\n </div>\r\n </wm-sirio-title-bar>\r\n <wm-sirio-filter-chips [chips]=\"chips()\" (removed)=\"chipRemoved.emit($event)\" (emptied)=\"focusOpener()\" />\r\n } @else {\r\n <wm-sirio-title-bar\r\n [title]=\"title()\"\r\n [headingLevel]=\"headingLevel()\"\r\n [dark]=\"dark()\"\r\n [class.d-lg-none]=\"layout() === 'vertical'\"\r\n >\r\n <div wmSirioTitleBarActions>\r\n <button #opener type=\"button\" [attr.class]=\"actionClasses()\" [attr.title]=\"title()\" (click)=\"open.set(true)\">\r\n <span class=\"fas fa-filter\" aria-hidden=\"true\"></span>{{ showLabel()\r\n }}<span class=\"sr-only\">: {{ dialogHint() }}</span>\r\n </button>\r\n </div>\r\n </wm-sirio-title-bar>\r\n <wm-sirio-filter-chips\r\n [class.d-lg-none]=\"layout() === 'vertical'\"\r\n [chips]=\"chips()\"\r\n (removed)=\"chipRemoved.emit($event)\"\r\n (emptied)=\"focusOpener()\"\r\n />\r\n <div class=\"sirio-drawer\">\r\n <wm-sirio-dialog\r\n [title]=\"title()\"\r\n [icon]=\"null\"\r\n [(open)]=\"open\"\r\n [inline]=\"layout() === 'vertical'\"\r\n [panelClass]=\"layout() === 'vertical' ? 'sirio-dialog-sidenav d-lg-flex sirio-bg-primary-light-40' : ''\"\r\n >\r\n <ng-container [ngTemplateOutlet]=\"body\" />\r\n <div wmSirioDialogFooter>\r\n <ng-container\r\n [ngTemplateOutlet]=\"actions\"\r\n [ngTemplateOutletContext]=\"{ cols: layout() === 'vertical' ? 'col-auto' : 'col-6 col-md-auto' }\"\r\n />\r\n </div>\r\n </wm-sirio-dialog>\r\n </div>\r\n }\r\n</div>\r\n","import {\r\n booleanAttribute,\r\n ChangeDetectionStrategy,\r\n Component,\r\n computed,\r\n effect,\r\n input,\r\n numberAttribute,\r\n signal,\r\n untracked,\r\n} from '@angular/core';\r\nimport { sirioUniqueId } from '../core/sirio-control-base';\r\n\r\n/**\r\n * Progress Bar of the Sirio web kit (\"Progress Bar\"): the progress of a process that goes on\r\n * without user interaction, from 0% to 100%: `label` + `progress.sirio-progress` +\r\n * `span.sirio-progress-number` (\"40%\").\r\n *\r\n * Accessibility (differs from the kit, which hides the `<progress>` with `aria-hidden` while its\r\n * label points to it): the native `<progress>` is exposed and named by the label, the percentage\r\n * text is hidden from screen readers (it repeats the value), and the completion is announced\r\n * (\"Completato\"); with `announceStep` the intermediate percentages are announced too.\r\n * Without a value (`null`) the bar is indeterminate.\r\n *\r\n * ```html\r\n * <wm-sirio-progress label=\"Caricamento documenti\" [value]=\"loaded()\" [max]=\"total()\" />\r\n * ```\r\n */\r\n@Component({\r\n selector: 'wm-sirio-progress',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n styleUrl: './sirio-progress.scss',\r\n templateUrl: './sirio-progress.html',\r\n})\r\nexport class SirioProgress {\r\n readonly label = input.required<string>();\r\n /** Current value (0 – `max`); null = indeterminate. */\r\n readonly value = input<number | null, unknown>(0, {\r\n transform: (v: unknown) => (v === null || v === undefined || v === '' ? null : numberAttribute(v, 0)),\r\n });\r\n readonly max = input(100, { transform: (v: unknown) => Math.max(Number.MIN_VALUE, numberAttribute(v, 100)) });\r\n /** Shows the percentage under the bar (kit `.sirio-progress-number`). */\r\n readonly showNumber = input(true, { transform: booleanAttribute });\r\n /** Decimal digits of the percentage. */\r\n readonly decimals = input(0, { transform: (v: unknown) => Math.max(0, numberAttribute(v, 0)) });\r\n /** Label visible only to screen readers. */\r\n readonly labelHidden = input(false, { transform: booleanAttribute });\r\n /** Announce the progress every N percent (0 = only the completion). */\r\n readonly announceStep = input(0, { transform: (v: unknown) => Math.max(0, numberAttribute(v, 0)) });\r\n readonly completeLabel = input('Completato');\r\n /** Text of the indeterminate bar for screen readers. */\r\n readonly busyLabel = input('In corso');\r\n\r\n protected readonly id = sirioUniqueId('sirio-progress');\r\n\r\n /** Percentage 0–100 (null when indeterminate). */\r\n readonly percent = computed(() => {\r\n const value = this.value();\r\n if (value === null || Number.isNaN(value)) {\r\n return null;\r\n }\r\n return Math.min(100, Math.max(0, (value / this.max()) * 100));\r\n });\r\n\r\n protected readonly ratioValue = computed(() => Math.min(this.max(), Math.max(0, this.value() ?? 0)));\r\n\r\n protected readonly percentText = computed(() => {\r\n const percent = this.percent();\r\n if (percent === null) {\r\n return '';\r\n }\r\n const factor = 10 ** this.decimals();\r\n return `${(Math.floor(percent * factor) / factor).toFixed(this.decimals()).replace('.', ',')}%`;\r\n });\r\n\r\n protected readonly announcement = signal('');\r\n\r\n constructor() {\r\n // Last announced threshold: -1 = none, 100 = completed.\r\n let last = -1;\r\n effect(() => {\r\n const percent = this.percent();\r\n const step = this.announceStep();\r\n untracked(() => {\r\n if (percent === null) {\r\n last = -1;\r\n return;\r\n }\r\n if (percent >= 100) {\r\n if (last !== 100) {\r\n this.announcement.set(this.completeLabel());\r\n }\r\n last = 100;\r\n return;\r\n }\r\n const reached = step > 0 ? Math.floor(percent / step) * step : 0;\r\n if (reached < last) {\r\n this.announcement.set(''); // the process restarted\r\n } else if (reached > 0 && reached !== last) {\r\n this.announcement.set(`${reached}%`);\r\n }\r\n last = reached;\r\n });\r\n });\r\n }\r\n}\r\n","<label [attr.for]=\"id\" [class.sr-only]=\"labelHidden()\">{{ label() }}</label>\r\n<progress\r\n class=\"sirio-progress\"\r\n [id]=\"id\"\r\n [attr.value]=\"percent() === null ? null : ratioValue()\"\r\n [attr.max]=\"percent() === null ? null : max()\"\r\n [attr.aria-valuetext]=\"percent() === null ? busyLabel() : percentText()\"\r\n>\r\n {{ percentText() }}\r\n</progress>\r\n@if (showNumber() && percent() !== null) {\r\n <span class=\"sirio-progress-number\" aria-hidden=\"true\">{{ percentText() }}</span>\r\n}\r\n<span class=\"sr-only\" role=\"status\">{{ announcement() }}</span>\r\n","import { NgTemplateOutlet } from '@angular/common';\r\nimport {\r\n afterNextRender,\r\n booleanAttribute,\r\n ChangeDetectionStrategy,\r\n Component,\r\n contentChildren,\r\n DestroyRef,\r\n Directive,\r\n effect,\r\n ElementRef,\r\n inject,\r\n Injector,\r\n input,\r\n model,\r\n output,\r\n TemplateRef,\r\n untracked,\r\n viewChild,\r\n} from '@angular/core';\r\nimport { Splide, type Options } from '@splidejs/splide';\r\n\r\n/** Cards shown at a time on desktop (kit classes `splide-1`, `splide-2`, `splide-3`). */\r\nexport type SirioCarouselPerPage = 1 | 2 | 3;\r\n\r\n/** One slide of the carousel: `<ng-template wmSirioCarouselSlide>...</ng-template>`. */\r\n@Directive({ selector: 'ng-template[wmSirioCarouselSlide]' })\r\nexport class SirioCarouselSlide {\r\n readonly template = inject<TemplateRef<unknown>>(TemplateRef);\r\n}\r\n\r\n/** Italian labels of the kit (`splideI18n`). */\r\nexport const SIRIO_CAROUSEL_I18N: Record<string, string> = {\r\n prev: 'Slide precedente',\r\n next: 'Slide successiva',\r\n pageX: 'Vai alla pagina %s',\r\n slideX: 'Vai alla slide %s',\r\n first: 'Vai alla prima slide',\r\n last: \"Vai all'ultima slide\",\r\n play: 'Avvia riproduzione automatica',\r\n pause: 'Ferma riproduzione automatica',\r\n select: 'Seleziona slide da visualizzare',\r\n slideLabel: '%s di %s',\r\n};\r\n\r\n/** Arrow classes of the kit (`splideClasses`): kit icon buttons with Font Awesome chevrons. */\r\nconst SIRIO_CAROUSEL_CLASSES = {\r\n prev: 'splide__arrow--prev sirio-btn sirio-btn-icon fas fa-chevron-left',\r\n next: 'splide__arrow--next sirio-btn sirio-btn-icon fas fa-chevron-right',\r\n};\r\n\r\n/** Breakpoints of the kit initialisation script (`splide1`, `splide2`, `splide3`). */\r\nfunction kitBreakpoints(perPage: SirioCarouselPerPage): Options['breakpoints'] {\r\n const mobile = { gap: 16, perPage: 1, padding: { left: 36, right: 36 }, drag: true, arrows: false };\r\n return {\r\n 0: mobile,\r\n 768: {\r\n ...(perPage > 1 ? { perPage: 2, drag: true } : {}),\r\n gap: 24,\r\n padding: { left: 12, right: 12 },\r\n arrows: true,\r\n },\r\n 1200: {\r\n ...(perPage === 3 ? { perPage: 3 } : {}),\r\n gap: 32,\r\n padding: { left: 16, right: 16 },\r\n drag: false,\r\n arrows: true,\r\n },\r\n };\r\n}\r\n\r\n/**\r\n * Carousel of the Sirio web kit (\"Carousel\"), based on Splide as the kit (same version, the kit\r\n * `splide.min.css` and the `.sirio-carousel` styles): `div.splide.sirio-carousel.splide-N` >\r\n * `.splide__track` > `ul.splide__list` > `li.splide__slide`, initialised with the options of the\r\n * kit script (breakpoints for 1, 2 or 3 cards, kit arrow buttons, Italian labels).\r\n *\r\n * ```html\r\n * <wm-sirio-carousel ariaLabel=\"Notizie in evidenza\" [perPage]=\"3\">\r\n * @for (news of items; track news.id) {\r\n * <ng-template wmSirioCarouselSlide>\r\n * <wm-sirio-card [title]=\"news.title\" [href]=\"news.url\" fullHeight />\r\n * </ng-template>\r\n * }\r\n * </wm-sirio-carousel>\r\n * ```\r\n *\r\n * Requires `@splidejs/splide/css` or the kit `assets/css/splide.min.css` in the global styles.\r\n */\r\n@Component({\r\n selector: 'wm-sirio-carousel',\r\n imports: [NgTemplateOutlet],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n styleUrl: './sirio-carousel.scss',\r\n templateUrl: './sirio-carousel.html',\r\n})\r\nexport class SirioCarousel {\r\n /** Accessible name of the carousel (kit `aria-label`, e.g. \"Notizie in evidenza\"). */\r\n readonly ariaLabel = input.required<string>();\r\n /** Cards at a time on desktop (kit `splide-1` / `splide-2` / `splide-3`, default 3). */\r\n readonly perPage = input<SirioCarouselPerPage>(3);\r\n /** Dark version for dark backgrounds (`sirio-carousel-dark`). */\r\n readonly dark = input(false, { transform: booleanAttribute });\r\n /** Additional Splide options (merged over the kit ones). */\r\n readonly options = input<Options>({});\r\n /** Index of the current slide (two-way: `[(index)]`). */\r\n readonly index = model(0);\r\n /** Emitted after the carousel moves (new index). */\r\n readonly moved = output<number>();\r\n\r\n protected readonly slides = contentChildren(SirioCarouselSlide);\r\n private readonly root = viewChild.required<ElementRef<HTMLElement>>('root');\r\n private readonly injector = inject(Injector);\r\n private splide: Splide | null = null;\r\n\r\n constructor() {\r\n // (Re)mount when the configuration changes; refresh when the slides change.\r\n effect(() => {\r\n const perPage = this.perPage();\r\n const extra = this.options();\r\n untracked(() => afterNextRender(() => this.mount(perPage, extra), { injector: this.injector }));\r\n });\r\n effect(() => {\r\n this.slides();\r\n untracked(() =>\r\n afterNextRender(() => this.splide?.refresh(), { injector: this.injector }),\r\n );\r\n });\r\n effect(() => {\r\n const index = this.index();\r\n if (this.splide && this.splide.index !== index) {\r\n this.splide.go(index);\r\n }\r\n });\r\n inject(DestroyRef).onDestroy(() => this.destroy());\r\n }\r\n\r\n /** Goes to a slide (`'>'` / `'<'` for next / previous, or an index). */\r\n go(control: number | string): void {\r\n this.splide?.go(control);\r\n }\r\n\r\n /** The Splide instance (for advanced use). */\r\n get instance(): Splide | null {\r\n return this.splide;\r\n }\r\n\r\n private mount(perPage: SirioCarouselPerPage, extra: Options): void {\r\n this.destroy();\r\n const splide = new Splide(this.root().nativeElement, {\r\n perPage,\r\n gap: 24,\r\n mediaQuery: 'min',\r\n breakpoints: kitBreakpoints(perPage),\r\n classes: SIRIO_CAROUSEL_CLASSES,\r\n i18n: SIRIO_CAROUSEL_I18N,\r\n start: this.index(),\r\n ...extra,\r\n });\r\n splide.on('moved', (index: number) => {\r\n this.index.set(index);\r\n this.moved.emit(index);\r\n });\r\n splide.mount();\r\n this.splide = splide;\r\n }\r\n\r\n private destroy(): void {\r\n this.splide?.destroy(true);\r\n this.splide = null;\r\n }\r\n}\r\n\r\n/** Carousel components, for `imports: [SIRIO_CAROUSEL]`. */\r\nexport const SIRIO_CAROUSEL = [SirioCarousel, SirioCarouselSlide] as const;\r\n","<div class=\"overflow-hidden\">\r\n <div\r\n #root\r\n class=\"splide sirio-carousel\"\r\n [class.splide-1]=\"perPage() === 1\"\r\n [class.splide-2]=\"perPage() === 2\"\r\n [class.splide-3]=\"perPage() === 3\"\r\n [class.sirio-carousel-dark]=\"dark()\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n >\r\n <div class=\"splide__track\">\r\n <ul class=\"splide__list\">\r\n @for (slide of slides(); track slide) {\r\n <li class=\"splide__slide\"><ng-container [ngTemplateOutlet]=\"slide.template\" /></li>\r\n }\r\n </ul>\r\n </div>\r\n </div>\r\n</div>\r\n","import {\r\n afterNextRender,\r\n booleanAttribute,\r\n ChangeDetectionStrategy,\r\n Component,\r\n computed,\r\n DestroyRef,\r\n effect,\r\n ElementRef,\r\n inject,\r\n Injector,\r\n input,\r\n output,\r\n signal,\r\n untracked,\r\n viewChild,\r\n} from '@angular/core';\r\n\r\n/** An item of the breadcrumb. The last item is the current page (never a link). */\r\nexport interface SirioBreadcrumbItem {\r\n label: string;\r\n /** Link of the item; without it the item emits `(itemClick)` (e.g. for router navigation). */\r\n href?: string;\r\n /** Font Awesome icon before the label (kit: `fa-home`). */\r\n icon?: string;\r\n}\r\n\r\n/** Payload of `(itemClick)`. */\r\nexport interface SirioBreadcrumbClick {\r\n item: SirioBreadcrumbItem;\r\n index: number;\r\n /** Call `event.preventDefault()` to navigate with the router instead of the href. */\r\n event: MouseEvent;\r\n}\r\n\r\n/** Wait after a resize before checking the layout again (kit: 200ms). */\r\nconst RESIZE_DEBOUNCE_MS = 200;\r\n\r\n/**\r\n * Breadcrumb of the Sirio web kit (`nav[data-sirio-component=breadcrumb]` with the sr-only\r\n * \"Ti trovi in:\" and `ol.sirio-breadcrumb[role=list]`; the current page is `li.active` with the\r\n * sr-only \"Pagina corrente\"; optional Font Awesome icons; `dark` → `sirio-breadcrumb-dark`).\r\n *\r\n * Behaviour of the kit script (SirioBreadcrumb) reproduced in Angular: with 3+ items, when the\r\n * breadcrumb does not fit on one line it is truncated (`data-sirio-visible=\"truncate\"` on the\r\n * list, as in the kit): first item, a \"...\" button (\"Apri il breadcrumb completo\") and the current\r\n * page. The button shows the whole path (`data-sirio-visible=\"visible\"`) and moves the focus to the\r\n * first restored link; after a resize the layout is checked again.\r\n *\r\n * ```html\r\n * <wm-sirio-breadcrumb [items]=\"[\r\n * { label: 'Home', href: '/', icon: 'fa-home' },\r\n * { label: 'Servizi', href: '/servizi' },\r\n * { label: 'Certificati' }\r\n * ]\" />\r\n * ```\r\n *\r\n * For router navigation leave `href` empty (or prevent it) and navigate in `(itemClick)`.\r\n */\r\n@Component({\r\n selector: 'wm-sirio-breadcrumb',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n styleUrl: './sirio-breadcrumb.scss',\r\n templateUrl: './sirio-breadcrumb.html',\r\n})\r\nexport class SirioBreadcrumb {\r\n readonly items = input<SirioBreadcrumbItem[]>([]);\r\n /** Dark version for dark backgrounds (`sirio-breadcrumb-dark`). */\r\n readonly dark = input(false, { transform: booleanAttribute });\r\n /** Truncate the path when it does not fit on one line (kit behaviour). */\r\n readonly truncate = input(true, { transform: booleanAttribute });\r\n readonly ariaLabel = input('Breadcrumb');\r\n readonly locationLabel = input('Ti trovi in:');\r\n readonly currentPageLabel = input('Pagina corrente');\r\n readonly expandLabel = input('Apri il breadcrumb completo');\r\n /** Click on an item link (call `event.preventDefault()` to navigate with the router). */\r\n readonly itemClick = output<SirioBreadcrumbClick>();\r\n\r\n private readonly list = viewChild.required<ElementRef<HTMLElement>>('list');\r\n private readonly injector = inject(Injector);\r\n private readonly destroyRef = inject(DestroyRef);\r\n /** Kit `data-sirio-visible`: `truncate` when shortened, `visible` after the user expanded it. */\r\n protected readonly state = signal<'truncate' | 'visible' | null>(null);\r\n protected readonly truncated = computed(() => this.state() === 'truncate');\r\n\r\n /** Items to render: all, or first + \"...\" (index -1) + current page when truncated. */\r\n protected readonly visible = computed(() => {\r\n const entries = this.items().map((item, index) => ({ item, index }));\r\n if (!this.truncated() || entries.length < 3) {\r\n return entries;\r\n }\r\n return [entries[0], { item: { label: '...' }, index: -1 }, entries[entries.length - 1]];\r\n });\r\n\r\n constructor() {\r\n // New items or truncation switched on/off: show everything, then measure.\r\n effect(() => {\r\n this.items();\r\n const enabled = this.truncate();\r\n untracked(() => {\r\n this.state.set(null);\r\n if (enabled) {\r\n afterNextRender(() => this.checkWrap(), { injector: this.injector });\r\n }\r\n });\r\n });\r\n\r\n // Kit: on window resize (200ms debounce) the path is expanded and measured again. The width of\r\n // the breadcrumb is observed too, for layout changes that are not window resizes.\r\n let timer: ReturnType<typeof setTimeout> | undefined;\r\n const schedule = () => {\r\n clearTimeout(timer);\r\n timer = setTimeout(() => this.recheck(), RESIZE_DEBOUNCE_MS);\r\n };\r\n afterNextRender(() => {\r\n const view = this.list().nativeElement.ownerDocument.defaultView;\r\n view?.addEventListener('resize', schedule);\r\n let lastWidth = -1;\r\n const observer =\r\n typeof ResizeObserver === 'undefined'\r\n ? null\r\n : new ResizeObserver((entries) => {\r\n const width = Math.round(entries[0]?.contentRect.width ?? 0);\r\n if (lastWidth !== -1 && width !== lastWidth) {\r\n schedule();\r\n }\r\n lastWidth = width;\r\n });\r\n observer?.observe(this.list().nativeElement.parentElement as HTMLElement);\r\n this.destroyRef.onDestroy(() => {\r\n view?.removeEventListener('resize', schedule);\r\n observer?.disconnect();\r\n clearTimeout(timer);\r\n });\r\n });\r\n }\r\n\r\n /** Shows the whole path (kit \"...\" button) and moves the focus to the first restored link. */\r\n expand(): void {\r\n if (!this.truncated()) {\r\n return;\r\n }\r\n this.state.set('visible');\r\n afterNextRender(\r\n () => this.list().nativeElement.querySelectorAll<HTMLElement>('li a')[1]?.focus(),\r\n { injector: this.injector },\r\n );\r\n }\r\n\r\n protected onClick(item: SirioBreadcrumbItem, index: number, event: MouseEvent): void {\r\n if (!item.href) {\r\n event.preventDefault();\r\n }\r\n this.itemClick.emit({ item, index, event });\r\n }\r\n\r\n protected iconClasses(icon: string): string {\r\n const value = icon.trim();\r\n return value.includes(' ') ? value : `fas ${value}`;\r\n }\r\n\r\n /** Kit: expand, then truncate again if the full path wraps. */\r\n private recheck(): void {\r\n if (!this.truncate()) {\r\n return;\r\n }\r\n this.state.set(null);\r\n afterNextRender(() => this.checkWrap(), { injector: this.injector });\r\n }\r\n\r\n /** Truncates when the first and the last item are not on the same line. */\r\n private checkWrap(): void {\r\n const items = this.list().nativeElement.querySelectorAll<HTMLElement>(':scope > li');\r\n if (items.length < 3) {\r\n return;\r\n }\r\n const first = items[0].getBoundingClientRect().top;\r\n const last = items[items.length - 1].getBoundingClientRect().top;\r\n if (first < last) {\r\n this.state.set('truncate');\r\n }\r\n }\r\n}\r\n","<nav data-sirio-component=\"breadcrumb\" [attr.aria-label]=\"ariaLabel()\">\r\n <p class=\"sr-only\">{{ locationLabel() }}</p>\r\n <ol\r\n #list\r\n class=\"sirio-breadcrumb\"\r\n role=\"list\"\r\n [class.sirio-breadcrumb-dark]=\"dark()\"\r\n [attr.data-sirio-visible]=\"state()\"\r\n >\r\n @for (entry of visible(); track entry.index) {\r\n @if (entry.index === -1) {\r\n <li>\r\n <button\r\n type=\"button\"\r\n data-sirio-toggle=\"breadcrumb\"\r\n [attr.title]=\"expandLabel()\"\r\n [attr.aria-label]=\"expandLabel()\"\r\n (click)=\"expand()\"\r\n >...</button>\r\n </li>\r\n } @else if (entry.index === items().length - 1) {\r\n <!-- No whitespace around the label: the kit markup has none (icon margin comes from the CSS). -->\r\n <li class=\"active\">@if (entry.item.icon) {<span [attr.class]=\"iconClasses(entry.item.icon)\" aria-hidden=\"true\"></span>}{{ entry.item.label }}<span class=\"sr-only\">{{ currentPageLabel() }}</span></li>\r\n } @else {\r\n <li>\r\n <a [attr.href]=\"entry.item.href ?? '#'\" (click)=\"onClick(entry.item, entry.index, $event)\">@if (entry.item.icon) {<span [attr.class]=\"iconClasses(entry.item.icon)\" aria-hidden=\"true\"></span>}{{ entry.item.label }}</a>\r\n </li>\r\n }\r\n }\r\n </ol>\r\n</nav>\r\n","import { NgTemplateOutlet } from '@angular/common';\r\nimport {\r\n booleanAttribute,\r\n ChangeDetectionStrategy,\r\n Component,\r\n computed,\r\n contentChild,\r\n Directive,\r\n input,\r\n numberAttribute,\r\n output,\r\n} from '@angular/core';\r\nimport { SirioBreadcrumb, SirioBreadcrumbClick, SirioBreadcrumbItem } from '../breadcrumb/sirio-breadcrumb';\r\n\r\n/**\r\n * Call to action of the hero (kit `a.sirio-btn.sirio-btn-tertiary` in a paragraph):\r\n * `<a wmSirioHeroAction href=\"/servizio\">Accedi al servizio</a>`.\r\n */\r\n@Directive({\r\n selector: 'a[wmSirioHeroAction], button[wmSirioHeroAction]',\r\n host: { class: 'sirio-btn sirio-btn-tertiary' },\r\n})\r\nexport class SirioHeroAction {}\r\n\r\n/** Custom breadcrumb of the hero (replaces the `breadcrumb` input): `<nav wmSirioHeroBreadcrumb>`. */\r\n@Directive({ selector: '[wmSirioHeroBreadcrumb]' })\r\nexport class SirioHeroBreadcrumb {}\r\n\r\n/** Custom image area of the hero (replaces the `image` input), e.g. a `<picture>`. */\r\n@Directive({ selector: '[wmSirioHeroImage]' })\r\nexport class SirioHeroImage {}\r\n\r\n/**\r\n * Hero section of the Sirio web kit (\"Hero\"): the first block of a page, with breadcrumb, the\r\n * kit hero tag (`.sirio-tag.sirio-tag-hero` with icon), title (`h1.sirio-hero-title` by default),\r\n * subtitle (`.sirio-hero-subtitle`), text, call to action and image (kit layout:\r\n * `.sirio-hero` > `.container-fluid` > `.row` with `col-lg-6` text and `col-lg-6` image).\r\n *\r\n * ```html\r\n * <wm-sirio-hero title=\"Assegno unico\" subtitle=\"Per i figli a carico\" tag=\"Servizio\" tagIcon=\"fa-folder-open\"\r\n * [breadcrumb]=\"path\" image=\"assets/img-hero.svg\">\r\n * <p>Il sostegno economico per le famiglie...</p>\r\n * <a wmSirioHeroAction href=\"/domanda\">Fai domanda</a>\r\n * </wm-sirio-hero>\r\n * ```\r\n */\r\n@Component({\r\n selector: 'wm-sirio-hero',\r\n imports: [NgTemplateOutlet, SirioBreadcrumb],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n host: {\r\n // `title` is an input: drop the native attribute, otherwise the whole hero shows a tooltip.\r\n '[attr.title]': 'null',\r\n },\r\n styleUrl: './sirio-hero.scss',\r\n templateUrl: './sirio-hero.html',\r\n})\r\nexport class SirioHero {\r\n readonly title = input.required<string>();\r\n /** Heading level of the title: 1 (default, the hero opens the page), 2 or 3. */\r\n readonly headingLevel = input(1, {\r\n transform: (v: unknown) => {\r\n const n = numberAttribute(v, 1);\r\n return n === 2 || n === 3 ? n : 1;\r\n },\r\n });\r\n readonly subtitle = input('');\r\n /** Text of the hero tag (kit `.sirio-tag-hero`, e.g. the content type \"Servizio\"). */\r\n readonly tag = input('');\r\n /** Font Awesome icon of the tag (kit: `fa-folder-open`). */\r\n readonly tagIcon = input<string | null>(null);\r\n /** Breadcrumb entries (rendered with `wm-sirio-breadcrumb`). */\r\n readonly breadcrumb = input<SirioBreadcrumbItem[]>([]);\r\n readonly breadcrumbLabel = input('Breadcrumb');\r\n /** Image on the right (kit: decorative illustration, `alt=\"\"`). */\r\n readonly image = input<string | null>(null);\r\n readonly imageAlt = input('');\r\n /** `container` instead of the kit `container-fluid` (content aligned with a fixed grid). */\r\n readonly fixedContainer = input(false, { transform: booleanAttribute });\r\n /** Click on a breadcrumb entry (router navigation). */\r\n readonly breadcrumbClick = output<SirioBreadcrumbClick>();\r\n\r\n protected readonly action = contentChild(SirioHeroAction);\r\n protected readonly customBreadcrumb = contentChild(SirioHeroBreadcrumb);\r\n protected readonly customImage = contentChild(SirioHeroImage);\r\n protected readonly hasImage = computed(() => !!this.image() || !!this.customImage());\r\n\r\n protected iconClasses(icon: string): string {\r\n const value = icon.trim();\r\n return value.includes(' ') ? value : `fas ${value}`;\r\n }\r\n}\r\n\r\n/** Hero components, for `imports: [SIRIO_HERO]`. */\r\nexport const SIRIO_HERO = [SirioHero, SirioHeroAction, SirioHeroBreadcrumb, SirioHeroImage] as const;\r\n","<ng-template #heading>{{ title() }}</ng-template>\r\n<div class=\"sirio-hero\">\r\n <div [class.container-fluid]=\"!fixedContainer()\" [class.container]=\"fixedContainer()\">\r\n <div class=\"row\">\r\n <div class=\"mb-lg-4\" [class.col-lg-6]=\"hasImage()\" [class.col-lg-8]=\"!hasImage()\">\r\n @if (customBreadcrumb()) {\r\n <ng-content select=\"[wmSirioHeroBreadcrumb]\" />\r\n } @else if (breadcrumb().length) {\r\n <wm-sirio-breadcrumb\r\n [items]=\"breadcrumb()\"\r\n [ariaLabel]=\"breadcrumbLabel()\"\r\n (itemClick)=\"breadcrumbClick.emit($event)\"\r\n />\r\n }\r\n @if (tag()) {\r\n <span class=\"sirio-tag sirio-tag-hero\">\r\n @if (tagIcon()) {\r\n <span [attr.class]=\"iconClasses(tagIcon()!)\" aria-hidden=\"true\"></span>\r\n }\r\n {{ tag() }}\r\n </span>\r\n }\r\n @switch (headingLevel()) {\r\n @case (2) {\r\n <h2 class=\"sirio-hero-title\"><ng-container [ngTemplateOutlet]=\"heading\" /></h2>\r\n }\r\n @case (3) {\r\n <h3 class=\"sirio-hero-title\"><ng-container [ngTemplateOutlet]=\"heading\" /></h3>\r\n }\r\n @default {\r\n <h1 class=\"sirio-hero-title\"><ng-container [ngTemplateOutlet]=\"heading\" /></h1>\r\n }\r\n }\r\n @if (subtitle()) {\r\n <p class=\"sirio-hero-subtitle\">{{ subtitle() }}</p>\r\n }\r\n <ng-content />\r\n @if (action()) {\r\n <p><ng-content select=\"[wmSirioHeroAction]\" /></p>\r\n }\r\n </div>\r\n @if (hasImage()) {\r\n <div class=\"col-lg-6 pt-3 mt-auto\">\r\n @if (customImage()) {\r\n <ng-content select=\"[wmSirioHeroImage]\" />\r\n } @else {\r\n <img [src]=\"image()\" [alt]=\"imageAlt()\" />\r\n }\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n","import { NgTemplateOutlet } from '@angular/common';\r\nimport { ChangeDetectionStrategy, Component, computed, input, TemplateRef } from '@angular/core';\r\nimport { SirioPopover, SirioTooltipPlacement } from './sirio-tooltip';\r\n\r\n/** Content of an info popover: plain text (shown as a paragraph) or a template. */\r\nexport type SirioInfoContent = string | TemplateRef<unknown>;\r\n\r\n/**\r\n * Info button of the Sirio web kit: `button.sirio-btn.sirio-btn-icon` with the blue\r\n * `fa-info-circle` icon that opens a popover (kit `data-sirio-toggle=\"popover\"`), as next to the\r\n * filter section titles and the labels of the form controls.\r\n *\r\n * ```html\r\n * <wm-sirio-info-button content=\"Il codice è sulla tessera sanitaria\" title=\"Codice fiscale\" label=\"Informazioni su Codice fiscale\" />\r\n * ```\r\n */\r\n@Component({\r\n selector: 'wm-sirio-info-button',\r\n imports: [NgTemplateOutlet, SirioPopover],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n host: {\r\n // `title` is an input: drop the native attribute, otherwise the whole button shows a tooltip.\r\n '[attr.title]': 'null',\r\n },\r\n styleUrl: './sirio-info-button.scss',\r\n templateUrl: './sirio-info-button.html',\r\n})\r\nexport class SirioInfoButton {\r\n /** Content of the popover. */\r\n readonly content = input.required<SirioInfoContent>();\r\n /** Title of the popover. */\r\n readonly title = input('');\r\n /** Accessible name of the button (e.g. \"Informazioni su Codice fiscale\"). */\r\n readonly label = input('Informazioni');\r\n readonly placement = input<SirioTooltipPlacement>('right');\r\n\r\n protected readonly template = computed(() => {\r\n const content = this.content();\r\n return content instanceof TemplateRef ? content : null;\r\n });\r\n}\r\n","<button\r\n type=\"button\"\r\n class=\"sirio-btn sirio-btn-icon\"\r\n [attr.aria-label]=\"label()\"\r\n [wmSirioPopover]=\"body\"\r\n [popoverTitle]=\"title()\"\r\n [popoverPlacement]=\"placement()\"\r\n>\r\n <span class=\"fas fa-info-circle\" aria-hidden=\"true\"></span>\r\n</button>\r\n<ng-template #body>\r\n @if (template(); as tpl) {\r\n <ng-container [ngTemplateOutlet]=\"tpl\" />\r\n } @else {\r\n <p>{{ content() }}</p>\r\n }\r\n</ng-template>\r\n","import { booleanAttribute, ChangeDetectionStrategy, Component, input } from '@angular/core';\r\n\r\n/**\r\n * Indicator of an asynchronous validation in progress (AbstractControl status PENDING):\r\n * a small spinner (16px, the size of the Sirio state icons) with the look of the kit loader\r\n * (`.loading .spinner`), hidden from\r\n * assistive technologies, and a visually hidden status region (`role=\"status\"`, always in the DOM)\r\n * that announces `label` when the validation starts.\r\n *\r\n * - `placement=\"field\"`: absolutely positioned inside the field, in the slot of the kit state\r\n * icon (CSS variables `--sirio-pending-right` / `--sirio-pending-top` set by `wm-sirio-field`);\r\n * - `placement=\"inline\"`: next to a label, a legend or a button.\r\n *\r\n * Internal building block of the data entry controls.\r\n */\r\n@Component({\r\n selector: 'wm-sirio-pending',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n host: {\r\n '[class.sirio-pending-field]': \"placement() === 'field'\",\r\n '[class.sirio-pending-inline]': \"placement() === 'inline'\",\r\n '[class.sirio-pending-active]': 'active()',\r\n },\r\n styleUrl: './sirio-pending.scss',\r\n templateUrl: './sirio-pending.html',\r\n})\r\nexport class SirioPendingIndicator {\r\n /** The validation is in progress (spinner shown, label announced). */\r\n readonly active = input(false, { transform: booleanAttribute });\r\n /** Text announced by screen readers (e.g. \"Verifica in corso\"). */\r\n readonly label = input('Verifica in corso');\r\n readonly placement = input<'field' | 'inline'>('field');\r\n}\r\n","<!-- Always rendered: a live region announces only text changes that happen after it exists. -->\r\n<span class=\"sr-only\" role=\"status\">{{ active() ? label() : '' }}</span>\r\n@if (active()) {\r\n <span class=\"sirio-pending-spinner\" aria-hidden=\"true\"></span>\r\n}\r\n","import { NgTemplateOutlet } from '@angular/common';\r\nimport {\r\n booleanAttribute,\r\n ChangeDetectionStrategy,\r\n Component,\r\n computed,\r\n effect,\r\n input,\r\n model,\r\n numberAttribute,\r\n output,\r\n untracked,\r\n} from '@angular/core';\r\nimport { sirioUniqueId } from '../core/sirio-control-base';\r\n\r\n/**\r\n * Layouts of the Sirio pagination:\r\n * - `full`: kit \"Paginazione con alto numero di pagine\" (elements per page, range, page select,\r\n * previous/next);\r\n * - `numbers`: page numbers with ellipsis (kit `.sirio-pagination-center` > `.sirio-pagination-list`).\r\n */\r\nexport type SirioPaginationVariant = 'full' | 'numbers';\r\n\r\n/** Payload of `(paged)`. */\r\nexport interface SirioPageEvent {\r\n /** Current page (1-based). */\r\n page: number;\r\n pageSize: number;\r\n /** Index of the first item of the page (0-based), e.g. for `slice()` or `$skip`. */\r\n offset: number;\r\n}\r\n\r\n/** An entry of the numbered list: a page or an ellipsis. */\r\ntype PageEntry = { page: number } | { ellipsis: true; key: string };\r\n\r\n/**\r\n * Pagination of the Sirio web kit (\"Paginazione\").\r\n *\r\n * `full` (default, kit example): `.sirio-pagination` with `.sirio-pagination-items` (select\r\n * \"Elementi per pagina\" and the range \"1 - 10 di 100 elementi\"), `.sirio-pagination-page` (select\r\n * \"Vai alla pagina\", \"di 10 pagine\") and `.sirio-pagination-cursor` (previous/next in\r\n * `ul.sirio-pagination-list`, `disabled` + `aria-disabled` at the ends). The kit CSS hides the\r\n * items select below 992px and the page select below 768px.\r\n *\r\n * `numbers`: `.sirio-pagination-center` with previous, page numbers (`aria-current=\"page\"`,\r\n * `.ellipsis` for the gaps) and next.\r\n *\r\n * Page changes are announced to screen readers (sr-only live region).\r\n *\r\n * `full` without `showItems` (no \"Elementi per pagina\" block) and with `pageSize` 1 is an item\r\n * navigator (\"1 di 5 elementi\" + previous/next); with no items only the projected content is shown.\r\n * Content projected in `full` (e.g. action buttons) is placed at the end of the `.sirio-pagination`\r\n * row.\r\n *\r\n * ```html\r\n * <wm-sirio-pagination [total]=\"items.length\" [(page)]=\"page\" [(pageSize)]=\"size\" (paged)=\"load($event)\" />\r\n * ```\r\n */\r\n@Component({\r\n selector: 'wm-sirio-pagination',\r\n imports: [NgTemplateOutlet],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n styleUrl: './sirio-pagination.scss',\r\n templateUrl: './sirio-pagination.html',\r\n})\r\nexport class SirioPagination {\r\n readonly variant = input<SirioPaginationVariant>('full');\r\n /** Total number of items. */\r\n readonly total = input(0, { transform: (v: unknown) => Math.max(0, numberAttribute(v, 0)) });\r\n /** Current page, 1-based (two-way: `[(page)]`). */\r\n readonly page = model(1);\r\n /** Items per page (two-way: `[(pageSize)]`). */\r\n readonly pageSize = model(10);\r\n /** \"Elementi per pagina\" block (select + range) of `full`; false for an item navigator. */\r\n readonly showItems = input(true, { transform: booleanAttribute });\r\n /** Options of the \"Elementi per pagina\" select (kit: 10, 20, 30). */\r\n readonly pageSizeOptions = input<number[]>([10, 20, 30]);\r\n /** Pages shown on each side of the current one (`numbers`). */\r\n readonly siblings = input(1, { transform: (v: unknown) => Math.max(0, numberAttribute(v, 1)) });\r\n /**\r\n * Link of a page (real navigation, e.g. `?page=3`); default `#` with the change handled by the\r\n * component (`(paged)`).\r\n */\r\n readonly pageHref = input<((page: number) => string) | null>(null);\r\n\r\n readonly ariaLabel = input('Paginazione');\r\n readonly itemsPerPageLabel = input('Elementi per pagina:');\r\n readonly itemsPerPageA11yLabel = input('Scegli il numero di elementi per pagina');\r\n readonly rangeFromLabel = input('Stai vedendo da');\r\n readonly rangeToLabel = input('al');\r\n readonly ofLabel = input('di');\r\n readonly itemsLabel = input('elementi');\r\n readonly goToPageLabel = input('Vai alla pagina');\r\n readonly pagesLabel = input('pagine');\r\n readonly pageLabel = input('Pagina');\r\n readonly previousLabel = input('Pagina precedente');\r\n readonly nextLabel = input('Pagina successiva');\r\n\r\n /** Emitted when the user changes page or page size. */\r\n readonly paged = output<SirioPageEvent>();\r\n\r\n private readonly baseId = sirioUniqueId('sirio-pagination');\r\n protected readonly sizeId = `${this.baseId}-size`;\r\n protected readonly pageId = `${this.baseId}-page`;\r\n\r\n readonly pageCount = computed(() => Math.max(1, Math.ceil(this.total() / Math.max(1, this.pageSize()))));\r\n protected readonly pages = computed(() => Array.from({ length: this.pageCount() }, (_, i) => i + 1));\r\n protected readonly rangeStart = computed(() =>\r\n this.total() === 0 ? 0 : (this.page() - 1) * this.pageSize() + 1,\r\n );\r\n protected readonly rangeEnd = computed(() => Math.min(this.page() * this.pageSize(), this.total()));\r\n /** Page select and previous/next of `full`: hidden when there is nothing to navigate without the items block. */\r\n protected readonly showPages = computed(() => this.showItems() || this.total() > 0);\r\n protected readonly status = computed(() =>\r\n this.showPages() ? `${this.pageLabel()} ${this.page()} ${this.ofLabel()} ${this.pageCount()}` : '',\r\n );\r\n\r\n /** Numbered list: first, last, current ± siblings, ellipsis for the gaps. */\r\n protected readonly entries = computed<PageEntry[]>(() => {\r\n const count = this.pageCount();\r\n const current = this.page();\r\n const siblings = this.siblings();\r\n const shown = new Set<number>([1, count]);\r\n for (let p = current - siblings; p <= current + siblings; p++) {\r\n if (p >= 1 && p <= count) {\r\n shown.add(p);\r\n }\r\n }\r\n const sorted = [...shown].sort((a, b) => a - b);\r\n const result: PageEntry[] = [];\r\n sorted.forEach((p, i) => {\r\n const previous = sorted[i - 1];\r\n if (previous !== undefined && p - previous === 2) {\r\n result.push({ page: p - 1 }); // a single missing page is shown instead of \"…\"\r\n } else if (previous !== undefined && p - previous > 2) {\r\n result.push({ ellipsis: true, key: `gap-${previous}` });\r\n }\r\n result.push({ page: p });\r\n });\r\n return result;\r\n });\r\n\r\n constructor() {\r\n // Keep the page in range when the total or the page size change.\r\n effect(() => {\r\n const count = this.pageCount();\r\n const page = untracked(() => this.page());\r\n if (page > count || page < 1) {\r\n untracked(() => this.page.set(Math.min(Math.max(page, 1), count)));\r\n }\r\n });\r\n }\r\n\r\n protected trackEntry(entry: PageEntry): string {\r\n return 'page' in entry ? `p${entry.page}` : entry.key;\r\n }\r\n\r\n protected hrefOf(page: number): string {\r\n return this.pageHref()?.(page) ?? '#';\r\n }\r\n\r\n /** Goes to a page (1-based). */\r\n goTo(page: number): void {\r\n const target = Math.min(Math.max(1, Math.trunc(page)), this.pageCount());\r\n if (target !== this.page()) {\r\n this.page.set(target);\r\n this.emit();\r\n }\r\n }\r\n\r\n protected go(page: number, event: Event, disabled = false): void {\r\n if (disabled || !this.pageHref()) {\r\n event.preventDefault();\r\n }\r\n if (!disabled) {\r\n this.goTo(page);\r\n }\r\n }\r\n\r\n protected onPageSelect(event: Event): void {\r\n this.goTo(Number((event.target as HTMLSelectElement).value));\r\n }\r\n\r\n protected onSizeChange(event: Event): void {\r\n const size = Number((event.target as HTMLSelectElement).value);\r\n if (!size || size === this.pageSize()) {\r\n return;\r\n }\r\n // Keep the first visible item on screen.\r\n const first = (this.page() - 1) * this.pageSize();\r\n this.pageSize.set(size);\r\n this.page.set(Math.floor(first / size) + 1);\r\n this.emit();\r\n }\r\n\r\n private emit(): void {\r\n this.paged.emit({\r\n page: this.page(),\r\n pageSize: this.pageSize(),\r\n offset: (this.page() - 1) * this.pageSize(),\r\n });\r\n }\r\n}\r\n","<ng-template #prevNext let-next=\"next\">\r\n @let target = next ? page() + 1 : page() - 1;\r\n @let disabled = next ? page() >= pageCount() : page() <= 1;\r\n <li>\r\n <a\r\n [attr.href]=\"disabled ? '#' : hrefOf(target)\"\r\n [class.disabled]=\"disabled\"\r\n [attr.tabindex]=\"disabled ? -1 : null\"\r\n [attr.aria-disabled]=\"disabled ? 'true' : null\"\r\n (click)=\"go(target, $event, disabled)\"\r\n >\r\n <span class=\"sr-only\">{{ next ? nextLabel() : previousLabel() }}</span>\r\n <span [attr.class]=\"next ? 'fas fa-angle-right' : 'fas fa-angle-left'\" aria-hidden=\"true\"></span>\r\n </a>\r\n </li>\r\n</ng-template>\r\n\r\n@if (variant() === 'numbers') {\r\n <nav class=\"sirio-pagination-center\" [attr.aria-label]=\"ariaLabel()\">\r\n <ul class=\"sirio-pagination-list\">\r\n <ng-container *ngTemplateOutlet=\"prevNext; context: { next: false }\" />\r\n @for (entry of entries(); track trackEntry(entry)) {\r\n <li>\r\n @if ('page' in entry) {\r\n <a\r\n [attr.href]=\"hrefOf(entry.page)\"\r\n [attr.aria-current]=\"entry.page === page() ? 'page' : null\"\r\n (click)=\"go(entry.page, $event)\"\r\n >\r\n <span class=\"sr-only\">{{ pageLabel() }}&#32;</span>{{ entry.page }}\r\n </a>\r\n } @else {\r\n <span class=\"ellipsis\" aria-hidden=\"true\">…</span>\r\n }\r\n </li>\r\n }\r\n <ng-container *ngTemplateOutlet=\"prevNext; context: { next: true }\" />\r\n </ul>\r\n </nav>\r\n} @else {\r\n <nav class=\"sirio-pagination\" [attr.aria-label]=\"ariaLabel()\">\r\n @if (showItems()) {\r\n <div class=\"sirio-pagination-items\">\r\n <!-- Explicit spaces (&ngsp;): the text read by screen readers must not glue the parts. -->\r\n <span class=\"sirio-pagination-label\" aria-hidden=\"true\">{{ itemsPerPageLabel() }}</span>&ngsp;\r\n <label class=\"sr-only\" [attr.for]=\"sizeId\">{{ itemsPerPageA11yLabel() }}</label>&ngsp;\r\n <select class=\"sirio-form-control\" [id]=\"sizeId\" (change)=\"onSizeChange($event)\">\r\n @for (size of pageSizeOptions(); track size) {\r\n <option [value]=\"size\" [selected]=\"size === pageSize()\">{{ size }}</option>\r\n }\r\n </select>&ngsp;\r\n <span class=\"sr-only\">{{ rangeFromLabel() }}</span>&ngsp;<span>{{ rangeStart() }}</span>&ngsp;-&ngsp;<span\r\n class=\"sr-only\"\r\n >{{ rangeToLabel() }}</span\r\n >&ngsp;<span>{{ rangeEnd() }}</span>&ngsp;{{ ofLabel() }}&ngsp;<span>{{ total() }}</span>&ngsp;{{ itemsLabel() }}\r\n </div>\r\n }\r\n @if (showPages()) {\r\n <div class=\"sirio-pagination-page\">\r\n <label class=\"sr-only\" [attr.for]=\"pageId\">{{ goToPageLabel() }}</label>&ngsp;\r\n <select class=\"sirio-form-control\" [id]=\"pageId\" (change)=\"onPageSelect($event)\">\r\n @for (p of pages(); track p) {\r\n <option [value]=\"p\" [selected]=\"p === page()\">{{ p }}</option>\r\n }\r\n </select>&ngsp;{{ ofLabel() }}&ngsp;<span>{{ pageCount() }}</span>&ngsp;{{ pagesLabel() }}\r\n </div>\r\n <div class=\"sirio-pagination-cursor\">\r\n <ul class=\"sirio-pagination-list\">\r\n <ng-container *ngTemplateOutlet=\"prevNext; context: { next: false }\" />\r\n <ng-container *ngTemplateOutlet=\"prevNext; context: { next: true }\" />\r\n </ul>\r\n </div>\r\n }\r\n <ng-content />\r\n </nav>\r\n}\r\n<span class=\"sr-only\" role=\"status\">{{ status() }}</span>\r\n","/**\r\n * Badge shown next to the label of a tab or the title of an accordion section: a kit \"Tag\"\r\n * (`span.sirio-tag`) with a short text, e.g. the state of the content (\"da completare\").\r\n *\r\n * `type`: a tag type (`success`, `warning`, `info`, `danger`; empty or `default` = dark grey) or any\r\n * other kit background without the `sirio-bg-` prefix (`gradient-1`, `primary-light-40`...).\r\n */\r\nexport interface SirioBadge {\r\n text: string;\r\n type?: string | null;\r\n}\r\n\r\n/**\r\n * Normalizes a badge value (also coming from untyped data, e.g. an expression): `null` when there is\r\n * no text; `type` trimmed, without the `sirio-bg-` prefix, `null` for `default`.\r\n */\r\nexport function sirioBadge(value: unknown): SirioBadge | null {\r\n if (typeof value !== 'object' || value === null) {\r\n return null;\r\n }\r\n const { text, type } = value as { text?: unknown; type?: unknown };\r\n if (text === null || text === undefined || String(text).trim() === '') {\r\n return null;\r\n }\r\n const kind = typeof type === 'string' ? type.trim().replace(/^sirio-bg-/, '') : '';\r\n return { text: String(text), type: kind && kind !== 'default' ? kind : null };\r\n}\r\n\r\n/** Kit classes of a badge: `sirio-tag` plus the background of its type. */\r\nexport function sirioBadgeClass(badge: SirioBadge): string {\r\n return badge.type ? `sirio-tag sirio-bg-${badge.type}` : 'sirio-tag';\r\n}\r\n","import { DOCUMENT, NgTemplateOutlet } from '@angular/common';\r\nimport {\r\n afterNextRender,\r\n booleanAttribute,\r\n ChangeDetectionStrategy,\r\n Component,\r\n computed,\r\n contentChild,\r\n DestroyRef,\r\n Directive,\r\n effect,\r\n ElementRef,\r\n forwardRef,\r\n inject,\r\n Injector,\r\n input,\r\n model,\r\n numberAttribute,\r\n output,\r\n signal,\r\n untracked,\r\n viewChild,\r\n} from '@angular/core';\r\nimport {\r\n SirioCollapseAnimator,\r\n SirioCollapseState,\r\n sirioMotionAllowed,\r\n} from '../core/sirio-collapse-animation';\r\nimport { sirioBadge } from '../core/sirio-badge';\r\nimport { sirioUniqueId } from '../core/sirio-control-base';\r\n\r\n/** An entry of the side menu; entries with `children` open a submenu. */\r\nexport interface SirioSidenavItem {\r\n label: string;\r\n /** Link of the entry; without it (and without children) the entry is a button. */\r\n href?: string;\r\n /** Current page (kit `active` with the sr-only \"Pagina attiva\"). */\r\n active?: boolean;\r\n /** Counter shown as kit tag (e.g. unread notifications). */\r\n badge?: string | number;\r\n /**\r\n * Color of the badge: a tag type (`danger`, `warning`, `info`, `success`) or any other kit\r\n * background without the `sirio-bg-` prefix; default the dark grey tag.\r\n */\r\n badgeType?: string | null;\r\n /** sr-only text after the badge (e.g. \"notifiche da leggere\"). */\r\n badgeLabel?: string;\r\n disabled?: boolean;\r\n /** Submenu entries. */\r\n children?: SirioSidenavItem[];\r\n /** Submenu open at start (default: open when it contains the active entry). */\r\n expanded?: boolean;\r\n /** Free value for the application. */\r\n value?: unknown;\r\n}\r\n\r\n/** Payload of `(itemClick)`. */\r\nexport interface SirioSidenavClick {\r\n item: SirioSidenavItem;\r\n /** For links: call `event.preventDefault()` to navigate with the router. */\r\n event: Event;\r\n}\r\n\r\n/** Kit desktop breakpoint: from 992px the menu is a column of the page, below it a dialog. */\r\nconst DESKTOP_QUERY = '(min-width: 992px)';\r\n\r\nconst FOCUSABLE =\r\n 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), ' +\r\n 'textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])';\r\n\r\nfunction containsActive(item: SirioSidenavItem, active: SirioSidenavItem | null): boolean {\r\n return (item.children ?? []).some(\r\n (child) => (active ? child === active : !!child.active) || containsActive(child, active),\r\n );\r\n}\r\n\r\n/**\r\n * User/profile box of the \"Area personale\" menu (gets the kit class `.sirio-sidenav-info`;\r\n * shown on mobile only, as in the kit):\r\n * `<div wmSirioSidenavInfo><span class=\"fas fa-user fa-24\" aria-hidden=\"true\"></span>...</div>`.\r\n */\r\n@Directive({ selector: '[wmSirioSidenavInfo]', host: { class: 'sirio-sidenav-info' } })\r\nexport class SirioSidenavInfo {}\r\n\r\n/**\r\n * Last entry of the menu, e.g. the kit \"Esci\" button:\r\n * `<a wmSirioSidenavFooter wmSirioButton=\"ghost\" block href=\"/logout\">Esci</a>`.\r\n */\r\n@Directive({ selector: '[wmSirioSidenavFooter]', host: { class: 'mt-4' } })\r\nexport class SirioSidenavFooter {}\r\n\r\n/** @internal One entry of the menu (recursive): link, button or submenu with its region. */\r\n@Component({\r\n selector: 'li[wmSirioSidenavNode]',\r\n // The component uses itself for the submenus (recursion).\r\n imports: [NgTemplateOutlet],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n host: { class: 'sirio-nav-item' },\r\n styleUrl: './sirio-sidenav-node.scss',\r\n templateUrl: './sirio-sidenav-node.html',\r\n})\r\nexport class SirioSidenavNode {\r\n readonly item = input.required<SirioSidenavItem>();\r\n readonly level = input(1, { transform: numberAttribute });\r\n\r\n /** @internal */\r\n readonly sidenav = inject(forwardRef(() => SirioSidenav));\r\n private readonly regionRef = viewChild<ElementRef<HTMLElement>>('region');\r\n private readonly baseId = sirioUniqueId('sirio-sidenav');\r\n protected readonly toggleId = `${this.baseId}-toggle`;\r\n protected readonly regionId = `${this.baseId}-submenu`;\r\n\r\n readonly expanded = signal(false);\r\n protected readonly state = signal<SirioCollapseState>('false');\r\n protected readonly active = computed(() => this.sidenav.isActive(this.item()));\r\n private readonly animator = new SirioCollapseAnimator(inject(Injector), (s) => this.state.set(s));\r\n\r\n constructor() {\r\n // Initial state: the item flag, or open when the submenu contains the current page.\r\n effect(() => {\r\n const item = this.item();\r\n const open = item.expanded ?? containsActive(item, untracked(() => this.sidenav.active()));\r\n untracked(() => {\r\n this.expanded.set(open);\r\n this.state.set(open ? 'true' : 'false');\r\n if (open && this.level() === 1) {\r\n this.sidenav.rootOpened(this);\r\n }\r\n });\r\n });\r\n const unregister = this.sidenav.register(this);\r\n inject(DestroyRef).onDestroy(() => {\r\n unregister();\r\n this.animator.stop();\r\n });\r\n }\r\n\r\n protected toggle(event: Event): void {\r\n event.preventDefault();\r\n if (this.item().disabled) {\r\n return;\r\n }\r\n this.setExpanded(!this.expanded());\r\n }\r\n\r\n /** @internal */\r\n setExpanded(open: boolean): void {\r\n if (open === this.expanded()) {\r\n return;\r\n }\r\n this.expanded.set(open);\r\n if (open && this.level() === 1) {\r\n this.sidenav.rootOpened(this);\r\n }\r\n const region = this.regionRef()?.nativeElement;\r\n if (region) {\r\n this.animator.run(region, open, this.sidenav.animated() && sirioMotionAllowed());\r\n } else {\r\n this.state.set(open ? 'true' : 'false');\r\n }\r\n }\r\n\r\n /** Kit classes of the badge (tag + background of `badgeType`). */\r\n protected readonly badgeClass = computed(() => {\r\n const type = sirioBadge({ text: 'x', type: this.item().badgeType })?.type;\r\n return type ? `sirio-tag sirio-bg-${type}` : 'sirio-tag';\r\n });\r\n\r\n protected select(event: Event): void {\r\n const item = this.item();\r\n if (item.disabled) {\r\n event.preventDefault();\r\n return;\r\n }\r\n this.sidenav.select(item, event);\r\n }\r\n}\r\n\r\n/**\r\n * Side menu of the Sirio web kit (\"Menu Spalla\"): navigation of a section or of the personal\r\n * area, single or multi-level.\r\n *\r\n * - From 992px it is a column of the page (`.sirio-dialog-sidenav` shown inline by the kit CSS);\r\n * below, a \"Apri menu / Nome della sezione\" button (`.sirio-btn-sidenav`, fixed at the bottom)\r\n * opens it as a full screen dialog with the \"Chiudi menu\" button (kit layout). The dialog has\r\n * `role=\"dialog\"`, `aria-modal`, Esc, focus kept inside and page scroll locked.\r\n * - Menu: `nav` > `ul.sirio-nav.sirio-nav-side` > `li.sirio-nav-item` > `a.sirio-nav-link`;\r\n * entries with `children` open a submenu (kit collapse: `data-sirio-toggle=\"collapse\"`,\r\n * `aria-expanded`, region with the kit animation); at the first level one submenu is open at a\r\n * time (kit `data-sirio-parent`). The current page has `active`, the sr-only \"Pagina attiva\" and\r\n * `aria-current=\"page\"`; submenus containing it start open. `badge` → `.sirio-tag`.\r\n * - Slots: `[wmSirioSidenavInfo]` (user box of the personal area, mobile only as in the kit) and\r\n * `[wmSirioSidenavFooter]` (last entry, e.g. \"Esci\").\r\n *\r\n * ```html\r\n * <wm-sirio-sidenav title=\"Prestazioni\" [items]=\"menu\" [(active)]=\"current\" (itemClick)=\"go($event)\" />\r\n * ```\r\n */\r\n@Component({\r\n selector: 'wm-sirio-sidenav',\r\n imports: [NgTemplateOutlet, SirioSidenavNode],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n host: {\r\n // `title` is an input: drop the native attribute, otherwise the whole menu shows a tooltip.\r\n '[attr.title]': 'null',\r\n },\r\n styleUrl: './sirio-sidenav.scss',\r\n templateUrl: './sirio-sidenav.html',\r\n})\r\nexport class SirioSidenav {\r\n readonly items = input<SirioSidenavItem[]>([]);\r\n /** Title of the menu (kit `.sirio-sidenav-title`, e.g. the section name). */\r\n readonly title = input('');\r\n /** Heading level of the title (2–4, default 3 as in the kit). */\r\n readonly headingLevel = input<2 | 3 | 4, unknown>(3, {\r\n transform: (v: unknown) => {\r\n const n = numberAttribute(v, 3);\r\n return (n === 2 || n === 4 ? n : 3) as 2 | 3 | 4;\r\n },\r\n });\r\n /** Text under \"Apri menu\" / \"Chiudi menu\" (default: the title). */\r\n readonly section = input<string | null>(null);\r\n /** Accessible name of the `nav` (default: \"Menu della sezione {title}\"). */\r\n readonly ariaLabel = input<string | null>(null);\r\n readonly openLabel = input('Apri menu');\r\n readonly closeLabel = input('Chiudi menu');\r\n readonly activeLabel = input('Pagina attiva');\r\n readonly submenuLabel = input('Sottomenu di');\r\n /** Mobile button fixed at the bottom of the screen (kit `sirio-btn-fixed-bottom`). */\r\n readonly fixedButton = input(true, { transform: booleanAttribute });\r\n /** One first-level submenu open at a time (kit `data-sirio-parent`). */\r\n readonly exclusive = input(true, { transform: booleanAttribute });\r\n /** Kit open/close animation of the submenus. */\r\n readonly animated = input(true, { transform: booleanAttribute });\r\n /** Current entry (two-way: `[(active)]`); default: the entry with `active: true`. */\r\n readonly active = model<SirioSidenavItem | null>(null);\r\n /** Mobile dialog open (two-way: `[(open)]`). */\r\n readonly open = model(false);\r\n /** Click on an entry without children. */\r\n readonly itemClick = output<SirioSidenavClick>();\r\n\r\n protected readonly footer = contentChild(SirioSidenavFooter);\r\n private readonly dialogRef = viewChild.required<ElementRef<HTMLElement>>('dialog');\r\n private readonly openButtonRef = viewChild.required<ElementRef<HTMLButtonElement>>('openButton');\r\n private readonly document = inject(DOCUMENT);\r\n private readonly injector = inject(Injector);\r\n\r\n private readonly baseId = sirioUniqueId('sirio-sidenav');\r\n protected readonly openId = `${this.baseId}-open`;\r\n protected readonly dialogId = `${this.baseId}-dialog`;\r\n /** @internal Id of the first-level list (kit `data-sirio-parent` target). */\r\n readonly navId = `${this.baseId}-nav`;\r\n\r\n /** Desktop layout (≥ 992px): the menu is part of the page, never a dialog. */\r\n private readonly desktop = signal(true);\r\n /** The menu is shown as a modal dialog (mobile, open). */\r\n protected readonly modal = computed(() => this.open() && !this.desktop());\r\n protected readonly sectionName = computed(() => this.section() ?? this.title());\r\n protected readonly navLabel = computed(\r\n () => this.ariaLabel() ?? (this.title() ? `Menu della sezione ${this.title()}` : 'Menu della sezione'),\r\n );\r\n\r\n private readonly nodes = new Set<SirioSidenavNode>();\r\n private bodyOverflow: string | null = null;\r\n\r\n constructor() {\r\n const view = this.document.defaultView;\r\n const media = view?.matchMedia ? view.matchMedia(DESKTOP_QUERY) : null;\r\n if (media) {\r\n this.desktop.set(media.matches);\r\n const onChange = (event: MediaQueryListEvent) => {\r\n this.desktop.set(event.matches);\r\n // Back to the desktop layout: the dialog is not a dialog any more.\r\n if (event.matches) {\r\n this.open.set(false);\r\n }\r\n };\r\n media.addEventListener('change', onChange);\r\n inject(DestroyRef).onDestroy(() => media.removeEventListener('change', onChange));\r\n }\r\n\r\n let wasModal = false;\r\n effect(() => {\r\n const modal = this.modal();\r\n untracked(() => {\r\n if (modal === wasModal) {\r\n return;\r\n }\r\n wasModal = modal;\r\n if (modal) {\r\n this.lockScroll();\r\n afterNextRender(() => this.dialogRef().nativeElement.focus(), { injector: this.injector });\r\n } else {\r\n this.unlockScroll();\r\n }\r\n });\r\n });\r\n inject(DestroyRef).onDestroy(() => this.unlockScroll());\r\n }\r\n\r\n /** Opens the menu dialog (mobile). */\r\n show(): void {\r\n this.open.set(true);\r\n }\r\n\r\n /** Closes the menu dialog; `focusButton` returns the focus to the \"Apri menu\" button. */\r\n hide(focusButton = false): void {\r\n if (!this.open()) {\r\n return;\r\n }\r\n this.open.set(false);\r\n if (focusButton) {\r\n afterNextRender(() => this.openButtonRef().nativeElement.focus(), { injector: this.injector });\r\n }\r\n }\r\n\r\n /** @internal */\r\n isActive(item: SirioSidenavItem): boolean {\r\n const active = this.active();\r\n return active ? active === item : !!item.active;\r\n }\r\n\r\n /** @internal */\r\n select(item: SirioSidenavItem, event: Event): void {\r\n if (!item.href) {\r\n event.preventDefault();\r\n }\r\n this.active.set(item);\r\n this.itemClick.emit({ item, event });\r\n // A page was chosen: the mobile dialog closes.\r\n this.hide();\r\n }\r\n\r\n /** @internal */\r\n register(node: SirioSidenavNode): () => void {\r\n this.nodes.add(node);\r\n return () => this.nodes.delete(node);\r\n }\r\n\r\n /** @internal Closes the other first-level submenus (kit `data-sirio-parent`). */\r\n rootOpened(node: SirioSidenavNode): void {\r\n if (!this.exclusive()) {\r\n return;\r\n }\r\n for (const other of this.nodes) {\r\n if (other !== node && other.level() === 1 && other.expanded()) {\r\n other.setExpanded(false);\r\n }\r\n }\r\n }\r\n\r\n protected onKeydown(event: KeyboardEvent): void {\r\n if (!this.modal()) {\r\n return;\r\n }\r\n if (event.key === 'Escape') {\r\n event.preventDefault();\r\n this.hide(true);\r\n } else if (event.key === 'Tab') {\r\n this.trapFocus(event);\r\n }\r\n }\r\n\r\n private trapFocus(event: KeyboardEvent): void {\r\n const container = this.dialogRef().nativeElement;\r\n const focusable = Array.from(container.querySelectorAll<HTMLElement>(FOCUSABLE)).filter(\r\n (el) => !el.closest('[data-sirio-visible=\"false\"]:not(.sirio-dialog-sidenav)'),\r\n );\r\n if (!focusable.length) {\r\n return;\r\n }\r\n const first = focusable[0];\r\n const last = focusable[focusable.length - 1];\r\n const active = this.document.activeElement;\r\n if (event.shiftKey && (active === first || active === container)) {\r\n event.preventDefault();\r\n last.focus();\r\n } else if (!event.shiftKey && active === last) {\r\n event.preventDefault();\r\n first.focus();\r\n }\r\n }\r\n\r\n private lockScroll(): void {\r\n const body = this.document.body;\r\n this.bodyOverflow = body.style.overflow;\r\n body.style.overflow = 'hidden';\r\n }\r\n\r\n private unlockScroll(): void {\r\n if (this.bodyOverflow !== null) {\r\n this.document.body.style.overflow = this.bodyOverflow;\r\n this.bodyOverflow = null;\r\n }\r\n }\r\n}\r\n\r\n/** Side menu components, for `imports: [SIRIO_SIDENAV]`. */\r\nexport const SIRIO_SIDENAV = [SirioSidenav, SirioSidenavInfo, SirioSidenavFooter] as const;\r\n","@let entry = item();\r\n@if (entry.children?.length) {\r\n <a\r\n class=\"sirio-nav-link\"\r\n data-sirio-toggle=\"collapse\"\r\n [class.disabled]=\"entry.disabled\"\r\n [id]=\"toggleId\"\r\n [attr.href]=\"entry.disabled ? null : '#' + regionId\"\r\n [attr.aria-disabled]=\"entry.disabled ? 'true' : null\"\r\n [attr.aria-expanded]=\"expanded()\"\r\n [attr.aria-controls]=\"regionId\"\r\n (click)=\"toggle($event)\"\r\n >{{ entry.label }}</a\r\n >\r\n <div\r\n #region\r\n role=\"region\"\r\n [id]=\"regionId\"\r\n [attr.aria-labelledby]=\"toggleId\"\r\n [attr.data-sirio-parent]=\"level() === 1 && sidenav.exclusive() ? '#' + sidenav.navId : null\"\r\n [attr.data-sirio-visible]=\"state()\"\r\n >\r\n <ul class=\"sirio-nav\" [attr.aria-label]=\"sidenav.submenuLabel() + ' ' + entry.label\">\r\n @for (child of entry.children; track $index) {\r\n <li wmSirioSidenavNode [item]=\"child\" [level]=\"level() + 1\"></li>\r\n }\r\n </ul>\r\n </div>\r\n} @else if (entry.href) {\r\n <a\r\n class=\"sirio-nav-link\"\r\n [class.active]=\"active()\"\r\n [class.disabled]=\"entry.disabled\"\r\n [attr.href]=\"entry.disabled ? null : entry.href\"\r\n [attr.aria-disabled]=\"entry.disabled ? 'true' : null\"\r\n [attr.aria-current]=\"active() ? 'page' : null\"\r\n (click)=\"select($event)\"\r\n >\r\n <ng-container [ngTemplateOutlet]=\"content\" />\r\n </a>\r\n} @else {\r\n <button\r\n type=\"button\"\r\n class=\"sirio-nav-link\"\r\n [class.active]=\"active()\"\r\n [class.disabled]=\"entry.disabled\"\r\n [disabled]=\"entry.disabled\"\r\n [attr.aria-current]=\"active() ? 'page' : null\"\r\n (click)=\"select($event)\"\r\n >\r\n <ng-container [ngTemplateOutlet]=\"content\" />\r\n </button>\r\n}\r\n<ng-template #content\r\n >@if (active()) {<span class=\"sr-only\">{{ sidenav.activeLabel() }}&#32;</span>}{{ entry.label }}@if (entry.badge !== undefined && entry.badge !== null && entry.badge !== '') {<span [class]=\"badgeClass()\"\r\n >{{ entry.badge }}@if (entry.badgeLabel) {<span class=\"sr-only\">&#32;{{ entry.badgeLabel }}</span>}</span\r\n >}</ng-template\r\n>\r\n","<ng-template #heading>{{ title() }}</ng-template>\r\n<div class=\"sirio-dialog-sidenav-open\">\r\n <button\r\n #openButton\r\n type=\"button\"\r\n class=\"sirio-btn sirio-btn-primary sirio-btn-sidenav\"\r\n data-sirio-toggle=\"dialog\"\r\n [class.sirio-btn-fixed-bottom]=\"fixedButton()\"\r\n [id]=\"openId\"\r\n [attr.data-sirio-target]=\"'#' + dialogId\"\r\n [attr.aria-expanded]=\"open()\"\r\n [attr.aria-controls]=\"dialogId\"\r\n (click)=\"show()\"\r\n >\r\n <span>{{ openLabel() }}&#32;<small>{{ sectionName() }}</small></span>\r\n </button>\r\n</div>\r\n<div\r\n #dialog\r\n class=\"sirio-dialog sirio-dialog-sidenav\"\r\n data-sirio-component=\"dialog\"\r\n tabindex=\"-1\"\r\n [id]=\"dialogId\"\r\n [attr.aria-labelledby]=\"openId\"\r\n [attr.role]=\"modal() ? 'dialog' : null\"\r\n [attr.aria-modal]=\"modal() || null\"\r\n [attr.data-sirio-visible]=\"open()\"\r\n (keydown)=\"onKeydown($event)\"\r\n>\r\n <div class=\"sirio-dialog-wrapper\">\r\n <div class=\"sirio-dialog-content\">\r\n <div class=\"sirio-dialog-header\">\r\n <button\r\n type=\"button\"\r\n class=\"sirio-btn sirio-btn-primary sirio-btn-sidenav\"\r\n data-sirio-dismiss=\"dialog\"\r\n (click)=\"hide(true)\"\r\n >\r\n <span>{{ closeLabel() }}&#32;<small>{{ sectionName() }}</small></span>\r\n </button>\r\n </div>\r\n <div class=\"sirio-dialog-body\">\r\n <ng-content select=\"[wmSirioSidenavInfo]\" />\r\n @if (title()) {\r\n @switch (headingLevel()) {\r\n @case (2) {\r\n <h2 class=\"sirio-sidenav-title\"><ng-container [ngTemplateOutlet]=\"heading\" /></h2>\r\n }\r\n @case (4) {\r\n <h4 class=\"sirio-sidenav-title\"><ng-container [ngTemplateOutlet]=\"heading\" /></h4>\r\n }\r\n @default {\r\n <h3 class=\"sirio-sidenav-title\"><ng-container [ngTemplateOutlet]=\"heading\" /></h3>\r\n }\r\n }\r\n }\r\n <nav [attr.aria-label]=\"navLabel()\">\r\n <ul class=\"sirio-nav sirio-nav-side\" [id]=\"navId\">\r\n @for (item of items(); track $index) {\r\n <li wmSirioSidenavNode [item]=\"item\" [level]=\"1\"></li>\r\n }\r\n @if (footer()) {\r\n <li><ng-content select=\"[wmSirioSidenavFooter]\" /></li>\r\n }\r\n </ul>\r\n </nav>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n","import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\r\n\r\n/**\r\n * Types of the Sirio web kit \"Tag\": `default` (dark grey) and the semantic colors of the guide\r\n * (`danger` = \"Alert\", `warning`, `info`, `success`).\r\n */\r\nexport type SirioTagType = 'default' | 'danger' | 'warning' | 'info' | 'success';\r\n\r\n/**\r\n * Tag of the Sirio web kit (\"Tag\"), applied to a `<span>`: `span.sirio-tag` with the kit background\r\n * class of the type (`sirio-bg-danger`, `sirio-bg-warning`, `sirio-bg-info`, `sirio-bg-success`).\r\n *\r\n * As the kit says, tags label the type of a content in one or two words (e.g. inside a Card) and\r\n * are **not interactive**: never use them instead of the input or selection chips.\r\n *\r\n * ```html\r\n * <span wmSirioTag>Default</span>\r\n * <span wmSirioTag=\"success\">Completato</span>\r\n * <span wmSirioTag background=\"primary-light-40\">Novità</span>\r\n * ```\r\n */\r\n@Component({\r\n selector: 'span[wmSirioTag]',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n host: {\r\n '[class]': 'classes()',\r\n },\r\n templateUrl: './sirio-tag.html',\r\n})\r\nexport class SirioTag {\r\n /** Type (the attribute value): `<span wmSirioTag=\"info\">`; empty = default. */\r\n readonly type = input<SirioTagType, SirioTagType | '' | null | undefined>('default', {\r\n alias: 'wmSirioTag',\r\n transform: (v) => (v ? v : 'default'),\r\n });\r\n /**\r\n * Any other kit background (`sirio-bg-*` without the prefix, e.g. `warning-80`,\r\n * `primary-light-40`); it replaces the color of the type.\r\n */\r\n readonly background = input<string | null>(null);\r\n\r\n protected readonly classes = computed(() => {\r\n const background = this.background()?.trim().replace(/^sirio-bg-/, '');\r\n if (background) {\r\n return `sirio-tag sirio-bg-${background}`;\r\n }\r\n const type = this.type();\r\n return type === 'default' ? 'sirio-tag' : `sirio-tag sirio-bg-${type}`;\r\n });\r\n}\r\n","<ng-content />\r\n","import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\r\nimport { SirioBadge, sirioBadge } from '../core/sirio-badge';\r\n\r\n/**\r\n * Badge as a kit \"Tag\" (`span.sirio-tag` + `sirio-bg-<type>`) with the text of a {@link SirioBadge}:\r\n * the same badge of `wm-sirio-tab` and `wm-sirio-accordion-item`, for any other place (e.g. the header of\r\n * a list item). Values from untyped data are normalized (`sirioBadge`); without a text the span is\r\n * hidden.\r\n *\r\n * ```html\r\n * <span [wmSirioBadge]=\"{ text: 'da completare', type: 'warning' }\"></span>\r\n * ```\r\n */\r\n@Component({\r\n // small: inside elements whose spans the kit styles (e.g. the accordion trigger).\r\n selector: 'span[wmSirioBadge], small[wmSirioBadge]',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n host: {\r\n class: 'sirio-tag',\r\n '[class]': 'background()',\r\n '[hidden]': '!badge()',\r\n },\r\n styles: ':host { margin-bottom: 0; }',\r\n template: '{{ badge()?.text }}',\r\n})\r\nexport class SirioBadgeTag {\r\n readonly badge = input<SirioBadge | null, unknown>(null, { alias: 'wmSirioBadge', transform: sirioBadge });\r\n\r\n protected readonly background = computed(() => {\r\n const type = this.badge()?.type;\r\n return type ? `sirio-bg-${type}` : '';\r\n });\r\n}\r\n","import { NgTemplateOutlet } from '@angular/common';\r\nimport {\r\n booleanAttribute,\r\n ChangeDetectionStrategy,\r\n Component,\r\n computed,\r\n contentChild,\r\n contentChildren,\r\n Directive,\r\n forwardRef,\r\n inject,\r\n input,\r\n numberAttribute,\r\n output,\r\n} from '@angular/core';\r\nimport { SirioTag, SirioTagType } from '../tag/sirio-tag';\r\n\r\n/** Position of the card image: on top (portrait) or on a side (kit `sirio-card-image-wrapper`). */\r\nexport type SirioCardImagePosition = 'top' | 'left' | 'right';\r\n\r\n/** Heading level of the card title (kit: \"conformato con il livello di heading in corso\"). */\r\nexport type SirioCardHeadingLevel = 2 | 3 | 4 | 5 | 6;\r\n\r\n/**\r\n * Main action of the card footer (kit `a.sirio-btn.sirio-btn-tertiary`, `sirio-btn-tertiary-light`\r\n * in the dark card): `<a wmSirioCardAction href=\"/dettaglio\">Leggi di più</a>`.\r\n */\r\n@Directive({\r\n selector: 'a[wmSirioCardAction], button[wmSirioCardAction]',\r\n host: {\r\n class: 'sirio-btn',\r\n '[class.sirio-btn-tertiary]': '!dark()',\r\n '[class.sirio-btn-tertiary-light]': 'dark()',\r\n '[class.sirio-btn-block]': 'block()',\r\n },\r\n})\r\nexport class SirioCardAction {\r\n /** Full width action (`sirio-btn-block`). */\r\n readonly block = input(false, { transform: booleanAttribute });\r\n private readonly card = inject(forwardRef(() => SirioCard), { optional: true });\r\n protected readonly dark = computed(() => !!this.card?.dark());\r\n}\r\n\r\n/**\r\n * Icon action of the card footer (kit `.sirio-card-btn-icons`): `sirio-btn sirio-btn-icon` with the\r\n * label as `title` and `sr-only` text, `sirio-btn-tertiary-light` in the dark card.\r\n *\r\n * ```html\r\n * <button wmSirioCardIconAction icon=\"fa-bookmark\" label=\"Metti mi piace\" type=\"button\"></button>\r\n * ```\r\n */\r\n@Component({\r\n selector: 'a[wmSirioCardIconAction], button[wmSirioCardIconAction]',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n host: {\r\n class: 'sirio-btn sirio-btn-icon',\r\n '[class.sirio-btn-tertiary-light]': 'dark()',\r\n '[attr.title]': 'tooltip() || label()',\r\n },\r\n templateUrl: './sirio-card-icon-action.html',\r\n})\r\nexport class SirioCardIconAction {\r\n /** Font Awesome icon (`fa-share-alt` or the full classes). */\r\n readonly icon = input.required<string>();\r\n /** Accessible name (sr-only text), also used as tooltip. */\r\n readonly label = input.required<string>();\r\n /** Tooltip when it differs from the label (kit: \"Condivisione social\"). */\r\n readonly tooltip = input<string | null>(null);\r\n private readonly card = inject(forwardRef(() => SirioCard), { optional: true });\r\n protected readonly dark = computed(() => !!this.card?.dark());\r\n protected readonly iconClasses = computed(() => {\r\n const icon = this.icon().trim();\r\n return icon.includes(' ') ? icon : `fas ${icon}`;\r\n });\r\n}\r\n\r\n/**\r\n * Other content of the footer icon area (`.sirio-card-btn-icons`), e.g. a dropdown as in the kit:\r\n * `<wm-sirio-dropdown wmSirioCardIcons iconOnly ... />`.\r\n */\r\n@Directive({ selector: '[wmSirioCardIcons]' })\r\nexport class SirioCardIcons {}\r\n\r\n/**\r\n * Custom header content (replaces category/icon), e.g. a dropdown or a status:\r\n * `<div wmSirioCardHeader>...</div>`.\r\n */\r\n@Directive({ selector: '[wmSirioCardHeader]' })\r\nexport class SirioCardHeader {}\r\n\r\n/** Formats a date as in the kit examples (\"13 Nov 2021\"). */\r\nexport function sirioCardDate(value: Date, locale = 'it-IT'): string {\r\n const parts = new Intl.DateTimeFormat(locale, { day: '2-digit', month: 'short', year: 'numeric' })\r\n .formatToParts(value)\r\n .filter((p) => p.type !== 'literal')\r\n .map((p) => (p.type === 'month' ? p.value.charAt(0).toUpperCase() + p.value.slice(1).replace('.', '') : p.value));\r\n return parts.join(' ');\r\n}\r\n\r\n/**\r\n * Card of the Sirio web kit (\"Card\"): `.sirio-card` with the optional image (`.sirio-card-image`),\r\n * header (`.sirio-card-header`: category as `.sirio-tag` or icon, date `.sirio-card-data`), body\r\n * (`.sirio-card-body`: `.sirio-card-title` with the heading level of the page, subtitle, text,\r\n * projected content and signature) and footer (`.sirio-card-footer` with `[wmSirioCardAction]` and\r\n * `[wmSirioCardIconAction]` buttons in `.sirio-card-btn-icons`).\r\n *\r\n * - `href`: the title is a link (kit portrait examples); with `linkCard` the whole card is the link\r\n * (kit \"Card link\": `a.sirio-card` with `aria-label` = title; no footer, no inner links).\r\n * - `image` + `imagePosition` `top` (portrait) / `left` / `right` (`sirio-card-image-wrapper`,\r\n * `sirio-card-image-right`); `landscape` → `sirio-card-landscape`.\r\n * - `dark` → `sirio-card-dark` (footer buttons switch to `tertiary-light` as the kit requires);\r\n * `fullHeight` → `h-100` for cards of the same height in a grid row.\r\n *\r\n * ```html\r\n * <wm-sirio-card category=\"Categoria\" [date]=\"published\" title=\"Titolo\" href=\"/news/1\"\r\n * subtitle=\"Sottotitolo\" text=\"Testo della card\" signature=\"Firma autore\">\r\n * <button wmSirioCardIconAction icon=\"fa-share-alt\" label=\"Condividi questo elemento con i social\" type=\"button\"></button>\r\n * </wm-sirio-card>\r\n * ```\r\n */\r\n@Component({\r\n selector: 'wm-sirio-card',\r\n imports: [NgTemplateOutlet, SirioTag],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n host: {\r\n // `title` is an input: drop the native attribute, otherwise the whole card shows a tooltip.\r\n '[attr.title]': 'null',\r\n '[class.h-100]': 'fullHeight()',\r\n },\r\n styleUrl: './sirio-card.scss',\r\n templateUrl: './sirio-card.html',\r\n})\r\nexport class SirioCard {\r\n readonly title = input('');\r\n /** Heading level of the title, to follow the page outline (default 3). */\r\n readonly headingLevel = input<SirioCardHeadingLevel, unknown>(3, {\r\n transform: (v: unknown) => {\r\n const n = numberAttribute(v, 3);\r\n return (n >= 2 && n <= 6 ? n : 3) as SirioCardHeadingLevel;\r\n },\r\n });\r\n /** Link of the title (or of the whole card with `linkCard`). */\r\n readonly href = input<string | null>(null);\r\n /** The whole card is the link (kit \"Card link\"): no footer and no other links inside. */\r\n readonly linkCard = input(false, { transform: booleanAttribute });\r\n readonly subtitle = input('');\r\n readonly text = input('');\r\n /** Author signature (`.sirio-card-signature`). */\r\n readonly signature = input('');\r\n /** Category shown as kit tag in the header. */\r\n readonly category = input('');\r\n /** Type of the category tag (kit Tag colors; default dark grey). */\r\n readonly categoryType = input<SirioTagType>('default');\r\n /** Header icon instead of the category (kit: `fa-book fa-32`). */\r\n readonly headerIcon = input<string | null>(null);\r\n /** Date of the header: a Date is formatted as \"13 Nov 2021\", a string is shown as is. */\r\n readonly date = input<Date | string | null>(null);\r\n readonly image = input<string | null>(null);\r\n /** Alternative text of the image; empty (kit) when the image is decorative. */\r\n readonly imageAlt = input('');\r\n readonly imagePosition = input<SirioCardImagePosition>('top');\r\n /** Larger text and padding on desktop (`sirio-card-landscape`, with a side image). */\r\n readonly landscape = input(false, { transform: booleanAttribute });\r\n readonly dark = input(false, { transform: booleanAttribute });\r\n /** Same height as the other cards of the row (`h-100`). */\r\n readonly fullHeight = input(false, { transform: booleanAttribute });\r\n /** Click on the title link or on the link card (call `preventDefault()` for router navigation). */\r\n readonly linkClick = output<MouseEvent>();\r\n\r\n protected readonly actions = contentChildren(SirioCardAction);\r\n protected readonly iconActions = contentChildren(SirioCardIconAction);\r\n protected readonly otherIcons = contentChildren(SirioCardIcons);\r\n protected readonly customHeader = contentChild(SirioCardHeader);\r\n\r\n protected readonly sideImage = computed(() => !!this.image() && this.imagePosition() !== 'top');\r\n\r\n protected readonly cardClasses = computed(() => {\r\n const classes = ['sirio-card'];\r\n if (this.sideImage()) {\r\n classes.push('sirio-card-image-wrapper');\r\n }\r\n if (this.landscape()) {\r\n classes.push('sirio-card-landscape');\r\n }\r\n if (this.dark()) {\r\n classes.push('sirio-card-dark');\r\n }\r\n if (this.fullHeight()) {\r\n classes.push('h-100');\r\n }\r\n return classes.join(' ');\r\n });\r\n\r\n protected readonly dateText = computed(() => {\r\n const date = this.date();\r\n if (date instanceof Date) {\r\n return isNaN(date.getTime()) ? '' : sirioCardDate(date);\r\n }\r\n return date ?? '';\r\n });\r\n\r\n protected readonly dateIso = computed(() => {\r\n const date = this.date();\r\n if (!(date instanceof Date) || isNaN(date.getTime())) {\r\n return null;\r\n }\r\n const pad = (n: number) => String(n).padStart(2, '0');\r\n return `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())}`;\r\n });\r\n\r\n protected readonly hasHeader = computed(\r\n () => !!(this.customHeader() || this.category() || this.headerIcon() || this.dateText()),\r\n );\r\n\r\n /** The kit link card has no footer (the whole card is the link). */\r\n protected readonly hasFooter = computed(\r\n () => !(this.linkCard() && this.href()) && (this.actions().length > 0 || this.iconActions().length > 0 || this.otherIcons().length > 0),\r\n );\r\n\r\n protected iconClasses(icon: string): string {\r\n const value = icon.trim();\r\n return value.includes(' ') ? value : `fas ${value}`;\r\n }\r\n}\r\n\r\n/** Card components, for `imports: [SIRIO_CARD]`. */\r\nexport const SIRIO_CARD = [\r\n SirioCard,\r\n SirioCardAction,\r\n SirioCardIconAction,\r\n SirioCardIcons,\r\n SirioCardHeader,\r\n] as const;\r\n","<span class=\"sr-only\">{{ label() }}</span><span [attr.class]=\"iconClasses()\" aria-hidden=\"true\"></span>\r\n","<ng-template #titleContent>\r\n @if (href() && !linkCard()) {\r\n <a [attr.href]=\"href()\" (click)=\"linkClick.emit($event)\">{{ title() }}</a>\r\n } @else {\r\n {{ title() }}\r\n }\r\n</ng-template>\r\n\r\n<ng-template #inner>\r\n @if (image() && imagePosition() === 'top') {\r\n <div class=\"sirio-card-image\"><img [src]=\"image()\" [alt]=\"imageAlt()\" /></div>\r\n }\r\n @if (hasHeader()) {\r\n <div class=\"sirio-card-header\">\r\n @if (customHeader()) {\r\n <ng-content select=\"[wmSirioCardHeader]\" />\r\n } @else if (category()) {\r\n <p><span [wmSirioTag]=\"categoryType()\">{{ category() }}</span></p>\r\n } @else if (headerIcon()) {\r\n <span [attr.class]=\"iconClasses(headerIcon()!) + ' fa-32'\" aria-hidden=\"true\"></span>\r\n }\r\n @if (dateText()) {\r\n <p class=\"sirio-card-data\">\r\n @if (dateIso()) {\r\n <time [attr.datetime]=\"dateIso()\">{{ dateText() }}</time>\r\n } @else {\r\n {{ dateText() }}\r\n }\r\n </p>\r\n }\r\n </div>\r\n }\r\n <div class=\"sirio-card-body\">\r\n @if (title()) {\r\n @switch (headingLevel()) {\r\n @case (2) {\r\n <h2 class=\"sirio-card-title\"><ng-container [ngTemplateOutlet]=\"titleContent\" /></h2>\r\n }\r\n @case (4) {\r\n <h4 class=\"sirio-card-title\"><ng-container [ngTemplateOutlet]=\"titleContent\" /></h4>\r\n }\r\n @case (5) {\r\n <h5 class=\"sirio-card-title\"><ng-container [ngTemplateOutlet]=\"titleContent\" /></h5>\r\n }\r\n @case (6) {\r\n <h6 class=\"sirio-card-title\"><ng-container [ngTemplateOutlet]=\"titleContent\" /></h6>\r\n }\r\n @default {\r\n <h3 class=\"sirio-card-title\"><ng-container [ngTemplateOutlet]=\"titleContent\" /></h3>\r\n }\r\n }\r\n }\r\n @if (subtitle()) {\r\n <p class=\"sirio-card-subtitle\">{{ subtitle() }}</p>\r\n }\r\n @if (text()) {\r\n <p class=\"sirio-card-text\">{{ text() }}</p>\r\n }\r\n <ng-content />\r\n @if (signature()) {\r\n <p class=\"sirio-card-signature\">{{ signature() }}</p>\r\n }\r\n </div>\r\n @if (hasFooter()) {\r\n <div class=\"sirio-card-footer\">\r\n <ng-content select=\"[wmSirioCardAction]\" />\r\n @if (iconActions().length || otherIcons().length) {\r\n <div class=\"sirio-card-btn-icons\">\r\n <ng-content select=\"[wmSirioCardIconAction], [wmSirioCardIcons]\" />\r\n </div>\r\n }\r\n </div>\r\n }\r\n</ng-template>\r\n\r\n<ng-template #content>\r\n @if (sideImage()) {\r\n <div class=\"sirio-card-image\" [class.sirio-card-image-right]=\"imagePosition() === 'right'\">\r\n <img [src]=\"image()\" [alt]=\"imageAlt()\" />\r\n </div>\r\n <div class=\"sirio-card-col\"><ng-container [ngTemplateOutlet]=\"inner\" /></div>\r\n } @else {\r\n <ng-container [ngTemplateOutlet]=\"inner\" />\r\n }\r\n</ng-template>\r\n\r\n@if (linkCard() && href()) {\r\n <a\r\n [attr.class]=\"cardClasses()\"\r\n [attr.href]=\"href()\"\r\n [attr.aria-label]=\"title() || null\"\r\n (click)=\"linkClick.emit($event)\"\r\n >\r\n <ng-container [ngTemplateOutlet]=\"content\" />\r\n </a>\r\n} @else {\r\n <div [attr.class]=\"cardClasses()\">\r\n <ng-container [ngTemplateOutlet]=\"content\" />\r\n </div>\r\n}\r\n","import { DOCUMENT, NgTemplateOutlet } from '@angular/common';\r\nimport {\r\n afterNextRender,\r\n booleanAttribute,\r\n ChangeDetectionStrategy,\r\n Component,\r\n computed,\r\n DestroyRef,\r\n effect,\r\n ElementRef,\r\n inject,\r\n Injector,\r\n input,\r\n model,\r\n output,\r\n signal,\r\n untracked,\r\n viewChild,\r\n} from '@angular/core';\r\nimport { SirioButtonSize, SirioButtonVariant, sirioButtonClasses } from '../button/sirio-button';\r\nimport { sirioUniqueId } from '../core/sirio-control-base';\r\n\r\n/** An entry of the dropdown menu. */\r\nexport interface SirioDropdownItem {\r\n label: string;\r\n /** Link of the entry (`<a href>`); without it the entry is a button handled with `(itemSelect)`. */\r\n href?: string;\r\n /** Font Awesome icon before the label. */\r\n icon?: string;\r\n disabled?: boolean;\r\n /** Free value for the application (e.g. the action id). */\r\n value?: unknown;\r\n}\r\n\r\n/** Payload of `(itemSelect)`. */\r\nexport interface SirioDropdownSelect {\r\n item: SirioDropdownItem;\r\n index: number;\r\n /** For links: call `event.preventDefault()` to navigate with the router instead of the href. */\r\n event: Event;\r\n}\r\n\r\n/** Horizontal alignment of the menu (kit `sirio-dropdown-menu-right`). */\r\nexport type SirioDropdownAlign = 'left' | 'right';\r\n\r\n/** Opening direction of the menu (kit `sirio-dropdown-menu-top`). */\r\nexport type SirioDropdownDirection = 'bottom' | 'top';\r\n\r\n/** Distance between the trigger and a detached menu (kit: 8px). */\r\nconst DETACH_OFFSET = 8;\r\n\r\ntype Placement = 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end';\r\n\r\n/** Fallback order of the detached placements (kit \"simple\" floating positions). */\r\nconst PLACEMENT_FALLBACK: Record<Placement, Placement[]> = {\r\n 'top-start': ['top-start', 'bottom-start', 'top-end', 'bottom-end'],\r\n 'bottom-start': ['bottom-start', 'top-start', 'bottom-end', 'top-end'],\r\n 'top-end': ['top-end', 'bottom-end', 'top-start', 'bottom-start'],\r\n 'bottom-end': ['bottom-end', 'top-end', 'bottom-start', 'top-start'],\r\n};\r\n\r\n/**\r\n * Dropdown menu of the Sirio web kit (\"Dropdown\"): `div.sirio-dropdown` with the trigger\r\n * (`button.sirio-btn[data-sirio-toggle=dropdown]`, `aria-haspopup`, `aria-expanded`,\r\n * `aria-controls`) and `ul.sirio-dropdown-menu` (`data-sirio-visible`) of `.sirio-dropdown-item`.\r\n *\r\n * Behaviour of the kit script (SirioDropdownMenu) reproduced in Angular:\r\n * - click on the trigger opens/closes; a click outside or on an entry closes the menu;\r\n * - keyboard: ↓ on the trigger opens and focuses the first entry; ↑/↓ move between the entries;\r\n * Esc closes and returns the focus to the trigger, as does Tab past the last entry or\r\n * Shift+Tab before the first one;\r\n * - `align=\"right\"` / `direction=\"top\"` (kit `sirio-dropdown-menu-right` / `-top`); when the menu\r\n * does not fit in the viewport it is flipped (on open, scroll and resize);\r\n * - `detach` (kit `data-sirio-detach=\"true\"`): the menu is moved to the body while open, so the\r\n * overflow of a container (e.g. a table) does not cut it;\r\n * - `selectable`: the chosen entry gets the kit `active` state (check mark), `[(selectedIndex)]`.\r\n *\r\n * ```html\r\n * <wm-sirio-dropdown label=\"Azioni\" [items]=\"actions\" (itemSelect)=\"run($event.item)\" />\r\n * <wm-sirio-dropdown label=\"Condividi\" icon=\"fa-share-alt\" iconOnly variant=\"tertiary\" align=\"right\"\r\n * [items]=\"social\" />\r\n * ```\r\n */\r\n@Component({\r\n selector: 'wm-sirio-dropdown',\r\n imports: [NgTemplateOutlet],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n host: {\r\n '(document:click)': 'onDocumentClick($event)',\r\n '(window:scroll)': 'reposition()',\r\n '(window:resize)': 'reposition()',\r\n },\r\n styleUrl: './sirio-dropdown.scss',\r\n templateUrl: './sirio-dropdown.html',\r\n})\r\nexport class SirioDropdown {\r\n readonly items = input<SirioDropdownItem[]>([]);\r\n /** Text of the trigger (with `iconOnly` it is the sr-only accessible name, as in the kit). */\r\n readonly label = input('');\r\n readonly variant = input<SirioButtonVariant>('primary');\r\n readonly size = input<SirioButtonSize>('default');\r\n /** Font Awesome icon of the trigger (after the text; the only content with `iconOnly`). */\r\n readonly icon = input<string | null>(null);\r\n /** Icon-only trigger (kit `sirio-btn-icon` with the label in a `sr-only` span). */\r\n readonly iconOnly = input(false, { transform: booleanAttribute });\r\n readonly align = input<SirioDropdownAlign>('left');\r\n readonly direction = input<SirioDropdownDirection>('bottom');\r\n /** Menu moved to the body while open (kit `data-sirio-detach`), e.g. inside tables with overflow. */\r\n readonly detach = input(false, { transform: booleanAttribute });\r\n /** The chosen entry stays marked as `active` (kit check mark); a second click removes it. */\r\n readonly selectable = input(false, { transform: booleanAttribute });\r\n readonly disabled = input(false, { transform: booleanAttribute });\r\n /** Visibility of the menu (two-way: `[(open)]`). */\r\n readonly open = model(false);\r\n /** Active entry with `selectable` (two-way: `[(selectedIndex)]`); null = none. */\r\n readonly selectedIndex = model<number | null>(null);\r\n /** Emitted when an entry is chosen. */\r\n readonly itemSelect = output<SirioDropdownSelect>();\r\n\r\n private readonly triggerRef = viewChild.required<ElementRef<HTMLButtonElement>>('trigger');\r\n private readonly menuRef = viewChild<ElementRef<HTMLUListElement>>('menuList');\r\n private readonly detachedRef = viewChild<ElementRef<HTMLElement>>('detached');\r\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\r\n private readonly document = inject(DOCUMENT);\r\n private readonly injector = inject(Injector);\r\n\r\n private readonly baseId = sirioUniqueId('sirio-dropdown');\r\n protected readonly triggerId = this.baseId;\r\n protected readonly menuId = `${this.baseId}-menu`;\r\n\r\n /** Flips decided at run time when the menu does not fit in the viewport. */\r\n private readonly flipVertical = signal(false);\r\n private readonly flipHorizontal = signal(false);\r\n protected readonly detachTransform = signal('translate(0px, 0px)');\r\n\r\n protected readonly openTop = computed(() => (this.direction() === 'top') !== this.flipVertical());\r\n protected readonly alignRight = computed(() => (this.align() === 'right') !== this.flipHorizontal());\r\n\r\n protected readonly triggerClasses = computed(() =>\r\n sirioButtonClasses(this.variant(), { size: this.size(), iconOnly: this.iconOnly() }),\r\n );\r\n\r\n constructor() {\r\n effect(() => {\r\n const open = this.open();\r\n untracked(() => {\r\n this.flipVertical.set(false);\r\n this.flipHorizontal.set(false);\r\n if (open) {\r\n afterNextRender(() => this.reposition(), { injector: this.injector });\r\n }\r\n });\r\n });\r\n inject(DestroyRef).onDestroy(() => this.detachedRef()?.nativeElement.remove());\r\n }\r\n\r\n /** Opens or closes the menu (kit SirioDropdownMenu.toggle()). */\r\n toggle(): void {\r\n if (this.disabled()) {\r\n return;\r\n }\r\n this.open.update((v) => !v);\r\n }\r\n\r\n show(): void {\r\n if (!this.disabled()) {\r\n this.open.set(true);\r\n }\r\n }\r\n\r\n hide(focusTrigger = false): void {\r\n if (!this.open()) {\r\n return;\r\n }\r\n this.open.set(false);\r\n if (focusTrigger) {\r\n this.triggerRef().nativeElement.focus();\r\n }\r\n }\r\n\r\n protected isActive(index: number): boolean {\r\n return this.selectable() && this.selectedIndex() === index;\r\n }\r\n\r\n protected iconClasses(icon: string): string {\r\n const value = icon.trim();\r\n return value.includes(' ') ? value : `fas ${value}`;\r\n }\r\n\r\n protected select(index: number, event: Event): void {\r\n const item = this.items()[index];\r\n if (!item || item.disabled) {\r\n event.preventDefault();\r\n return;\r\n }\r\n if (this.selectable()) {\r\n // Kit: a click on the active entry removes the active state.\r\n this.selectedIndex.set(this.selectedIndex() === index ? null : index);\r\n }\r\n this.itemSelect.emit({ item, index, event });\r\n this.hide();\r\n }\r\n\r\n protected onTriggerKeydown(event: KeyboardEvent): void {\r\n if (!this.open()) {\r\n if (event.key === 'ArrowDown') {\r\n event.preventDefault();\r\n this.show();\r\n this.focusEntry(0);\r\n }\r\n return;\r\n }\r\n if (event.key === 'Escape') {\r\n event.preventDefault();\r\n this.hide(true);\r\n } else if (event.key === 'ArrowDown' || (event.key === 'Tab' && !event.shiftKey)) {\r\n event.preventDefault();\r\n this.focusEntry(0);\r\n }\r\n }\r\n\r\n protected onItemKeydown(event: KeyboardEvent): void {\r\n const entries = this.entries();\r\n const index = entries.indexOf(event.target as HTMLElement);\r\n if (index < 0) {\r\n return;\r\n }\r\n switch (event.key) {\r\n case 'ArrowDown':\r\n event.preventDefault();\r\n entries[Math.min(index + 1, entries.length - 1)].focus();\r\n break;\r\n case 'ArrowUp':\r\n event.preventDefault();\r\n entries[Math.max(index - 1, 0)].focus();\r\n break;\r\n case 'Home':\r\n event.preventDefault();\r\n entries[0].focus();\r\n break;\r\n case 'End':\r\n event.preventDefault();\r\n entries[entries.length - 1].focus();\r\n break;\r\n case 'Escape':\r\n event.preventDefault();\r\n this.hide(true);\r\n break;\r\n case 'Tab':\r\n // Kit: leaving the menu with Tab / Shift+Tab closes it and returns to the trigger.\r\n if ((!event.shiftKey && index === entries.length - 1) || (event.shiftKey && index === 0)) {\r\n event.preventDefault();\r\n this.hide(true);\r\n }\r\n break;\r\n }\r\n }\r\n\r\n protected onDocumentClick(event: Event): void {\r\n const target = event.target as Node;\r\n if (\r\n this.open() &&\r\n !this.host.contains(target) &&\r\n !this.detachedRef()?.nativeElement.contains(target)\r\n ) {\r\n this.open.set(false);\r\n }\r\n }\r\n\r\n /** Places the menu: viewport flips, or the position of the detached menu. */\r\n protected reposition(): void {\r\n if (!this.open()) {\r\n return;\r\n }\r\n if (this.detach()) {\r\n this.placeDetached();\r\n } else {\r\n this.flip();\r\n }\r\n }\r\n\r\n /** Focusable entries of the open menu (disabled entries are skipped). */\r\n private entries(): HTMLElement[] {\r\n const menu = this.menuRef()?.nativeElement;\r\n return menu\r\n ? Array.from(menu.querySelectorAll<HTMLElement>('li > .sirio-dropdown-item')).filter(\r\n (el) => !el.matches(':disabled, .disabled'),\r\n )\r\n : [];\r\n }\r\n\r\n private focusEntry(index: number): void {\r\n // The menu may already be rendered (open): focus at once; otherwise after the next render.\r\n const entry = this.menuOpenNow() ? this.entries()[index] : undefined;\r\n if (entry) {\r\n entry.focus();\r\n } else {\r\n afterNextRender(() => this.entries()[index]?.focus(), { injector: this.injector });\r\n }\r\n }\r\n\r\n /** True when the menu is open in the DOM (not only in the state). */\r\n private menuOpenNow(): boolean {\r\n return this.menuRef()?.nativeElement.getAttribute('data-sirio-visible') === 'true';\r\n }\r\n\r\n /** Kit: open upwards / align right only when the preferred side overflows and the other fits. */\r\n private flip(): void {\r\n const menu = this.menuRef()?.nativeElement;\r\n if (!menu) {\r\n return;\r\n }\r\n const view = this.document.defaultView;\r\n const trigger = this.triggerRef().nativeElement.getBoundingClientRect();\r\n const height = menu.offsetHeight;\r\n const width = menu.offsetWidth;\r\n const viewportHeight = view?.innerHeight ?? this.document.documentElement.clientHeight;\r\n const viewportWidth = this.document.documentElement.clientWidth;\r\n const room = height + DETACH_OFFSET;\r\n\r\n const fitsBelow = trigger.bottom + room <= viewportHeight;\r\n const fitsAbove = trigger.top - room >= 0;\r\n this.flipVertical.set(this.direction() === 'bottom' ? !fitsBelow && fitsAbove : !fitsAbove && fitsBelow);\r\n\r\n const fitsLeftAligned = trigger.left + width <= viewportWidth;\r\n const fitsRightAligned = trigger.right - width >= 0;\r\n this.flipHorizontal.set(\r\n this.align() === 'left' ? !fitsLeftAligned && fitsRightAligned : !fitsRightAligned && fitsLeftAligned,\r\n );\r\n }\r\n\r\n /** Kit detach: wrapper in the body, translated under (or above) the trigger. */\r\n private placeDetached(): void {\r\n const wrapper = this.detachedRef()?.nativeElement;\r\n if (!wrapper) {\r\n return;\r\n }\r\n if (wrapper.parentElement !== this.document.body) {\r\n this.document.body.appendChild(wrapper);\r\n }\r\n const trigger = this.triggerRef().nativeElement;\r\n const rect = trigger.getBoundingClientRect();\r\n const root = this.document.documentElement;\r\n const x = rect.x + root.scrollLeft;\r\n const y = rect.y + root.scrollTop;\r\n const preferred: Placement = `${this.direction()}-${this.align() === 'right' ? 'end' : 'start'}`;\r\n const [left, top] = this.detachedPosition(preferred, wrapper, trigger, x, y);\r\n this.detachTransform.set(`translate(${left}px, ${top}px)`);\r\n }\r\n\r\n private detachedPosition(\r\n preferred: Placement,\r\n wrapper: HTMLElement,\r\n trigger: HTMLElement,\r\n x: number,\r\n y: number,\r\n ): [number, number] {\r\n // The kit wrapper has no size (the menu is absolutely positioned): measure the menu itself,\r\n // so that right-aligned menus end under the right edge of the trigger.\r\n const menu = this.menuRef()?.nativeElement ?? wrapper;\r\n const width = menu.offsetWidth;\r\n const height = menu.offsetHeight;\r\n const body = this.document.body;\r\n const compute = (placement: Placement): [number, number] => {\r\n const left = placement.endsWith('start') ? x : x + trigger.offsetWidth - width;\r\n const top = placement.startsWith('top')\r\n ? y - height - DETACH_OFFSET\r\n : y + trigger.offsetHeight + DETACH_OFFSET;\r\n return [left, top];\r\n };\r\n for (const placement of PLACEMENT_FALLBACK[preferred]) {\r\n const [left, top] = compute(placement);\r\n if (left >= 0 && top >= 0 && left + width <= body.offsetWidth && top + height <= body.offsetHeight) {\r\n return [left, top];\r\n }\r\n }\r\n return compute(preferred);\r\n }\r\n}\r\n","<ng-template #menu>\r\n <ul\r\n #menuList\r\n class=\"sirio-dropdown-menu\"\r\n [id]=\"menuId\"\r\n [attr.aria-labelledby]=\"triggerId\"\r\n [attr.data-sirio-visible]=\"open()\"\r\n [class.sirio-dropdown-menu-right]=\"!detach() && alignRight()\"\r\n [class.sirio-dropdown-menu-top]=\"!detach() && openTop()\"\r\n [style.position]=\"detach() ? 'relative' : null\"\r\n [style.transform]=\"detach() ? 'unset' : null\"\r\n [style.inset]=\"detach() ? 'unset' : null\"\r\n (keydown)=\"onItemKeydown($event)\"\r\n >\r\n @for (item of items(); track $index; let i = $index) {\r\n <li>\r\n @if (item.href) {\r\n <a\r\n class=\"sirio-dropdown-item\"\r\n [class.active]=\"isActive(i)\"\r\n [class.disabled]=\"item.disabled\"\r\n [attr.href]=\"item.disabled ? null : item.href\"\r\n [attr.aria-disabled]=\"item.disabled ? 'true' : null\"\r\n [attr.aria-current]=\"isActive(i) ? 'true' : null\"\r\n (click)=\"select(i, $event)\"\r\n >@if (item.icon) {<span [attr.class]=\"iconClasses(item.icon)\" aria-hidden=\"true\"></span>}{{ item.label }}</a\r\n >\r\n } @else {\r\n <button\r\n type=\"button\"\r\n class=\"sirio-dropdown-item\"\r\n [class.active]=\"isActive(i)\"\r\n [disabled]=\"item.disabled\"\r\n [attr.aria-current]=\"isActive(i) ? 'true' : null\"\r\n (click)=\"select(i, $event)\"\r\n >@if (item.icon) {<span [attr.class]=\"iconClasses(item.icon)\" aria-hidden=\"true\"></span>}{{ item.label }}</button>\r\n }\r\n </li>\r\n }\r\n </ul>\r\n</ng-template>\r\n\r\n<div class=\"sirio-dropdown\" data-sirio-component=\"dropdown\" [attr.data-sirio-detach]=\"detach() || null\">\r\n <button\r\n #trigger\r\n type=\"button\"\r\n data-sirio-toggle=\"dropdown\"\r\n aria-haspopup=\"true\"\r\n [attr.class]=\"triggerClasses()\"\r\n [id]=\"triggerId\"\r\n [attr.aria-expanded]=\"open()\"\r\n [attr.aria-controls]=\"menuId\"\r\n [disabled]=\"disabled()\"\r\n (click)=\"toggle()\"\r\n (keydown)=\"onTriggerKeydown($event)\"\r\n >\r\n @if (iconOnly()) {\r\n <span class=\"sr-only\">{{ label() }}</span><span [attr.class]=\"iconClasses(icon() ?? 'fa-ellipsis-h')\" aria-hidden=\"true\"></span>\r\n } @else {\r\n {{ label() }}\r\n @if (icon()) {\r\n <span [attr.class]=\"iconClasses(icon()!)\" aria-hidden=\"true\"></span>\r\n }\r\n }\r\n </button>\r\n @if (!detach()) {\r\n <ng-container [ngTemplateOutlet]=\"menu\" />\r\n }\r\n</div>\r\n\r\n@if (detach() && open()) {\r\n <!-- Kit detach: wrapper moved to the body and placed under the trigger. -->\r\n <div\r\n #detached\r\n class=\"sirio-dropdown sirio-dropdown-detach\"\r\n style=\"position: absolute; top: 0; left: 0\"\r\n [style.transform]=\"detachTransform()\"\r\n >\r\n <ng-container [ngTemplateOutlet]=\"menu\" />\r\n </div>\r\n}\r\n","import { Signal } from '@angular/core';\nimport { Params, QueryParamsHandling } from '@angular/router';\nimport { SirioBreadcrumbItem } from '../breadcrumb/sirio-breadcrumb';\nimport { SirioButtonVariant } from '../button/sirio-button';\nimport { SirioDropdownItem } from '../dropdown/sirio-dropdown';\n\n/** Router target of a dashboard entry: a URL (`'/clienti'`) or link commands (`['/clienti', id]`). */\nexport type SirioDashboardRoute = string | readonly unknown[];\n\n/**\n * An entry of the side menu of the dashboard. Entries with `children` open a submenu (any depth).\n *\n * Navigation: `route` uses the Angular router (the entry is active when the current URL matches it);\n * `href` is a plain link (e.g. an external site); without both the entry only emits\n * `(menuItemClick)`.\n */\nexport interface SirioDashboardMenuItem {\n label: string;\n /** Font Awesome icon (`fa-users` or the full classes `far fa-file`); it stays visible when the menu is collapsed. */\n icon?: string;\n route?: SirioDashboardRoute;\n queryParams?: Params;\n queryParamsHandling?: QueryParamsHandling;\n fragment?: string;\n /** Active only on the exact URL (default: also on the child URLs, e.g. `/clienti/12`). */\n exact?: boolean;\n /** Plain link (not handled by the router). */\n href?: string;\n /** Target of the `href` link (e.g. `_blank`). */\n target?: string;\n /** Counter shown as kit tag. */\n badge?: string | number;\n /** Color of the badge: a tag type (`danger`, `warning`, `info`, `success`) or a kit background without `sirio-bg-`. */\n badgeType?: string | null;\n /** sr-only text after the badge (e.g. \"da leggere\"). */\n badgeLabel?: string;\n disabled?: boolean;\n /** Hidden entry (e.g. for missing permissions). */\n hidden?: boolean;\n children?: SirioDashboardMenuItem[];\n /** Submenu open at start (default: open when it contains the active entry). */\n expanded?: boolean;\n /** Free value for the application. */\n value?: unknown;\n}\n\n/** A group of side menu entries offered by the routed component, with an optional heading. */\nexport interface SirioDashboardMenuSection {\n /** Heading of the group (e.g. \"In questa pagina\"); hidden when the menu is collapsed. */\n title?: string;\n items: SirioDashboardMenuItem[];\n}\n\n/**\n * Payload of the command handlers (`action`) and of `(commandClick)`: the command, the chosen\n * dropdown entry (for dropdown commands) and the DOM event.\n */\nexport interface SirioDashboardCommandClick {\n command: SirioDashboardCommand;\n /** The chosen entry, for dropdown commands. */\n item?: SirioDashboardCommandItem;\n event: Event;\n}\n\n/** Handler carried by a command, a dropdown entry or a user action. */\nexport type SirioDashboardHandler<T> = (click: T) => void;\n\n/** Entry of a dropdown command: a kit dropdown entry that can carry its own handler. */\nexport interface SirioDashboardCommandItem extends SirioDropdownItem {\n /** Handler of this entry; without it the `action` of the command runs. */\n action?: SirioDashboardHandler<SirioDashboardCommandClick>;\n}\n\n/**\n * A command of the top bar: a button, or a dropdown menu when it has `items`.\n * The command carries its handler: the click runs `action` (or the `action` of the chosen entry)\n * and then emits `(commandClick)` on the dashboard.\n *\n * ```ts\n * { label: 'Nuovo', icon: 'fa-plus', action: () => this.create() }\n * { label: 'Esporta', items: [\n * { label: 'CSV', action: () => this.export('csv') },\n * { label: 'PDF', action: () => this.export('pdf') },\n * ] }\n * ```\n */\nexport interface SirioDashboardCommand {\n /** Identifier for the application (e.g. to tell the commands apart in `(commandClick)`). */\n id?: string;\n label: string;\n /** Font Awesome icon (`fa-plus`). */\n icon?: string;\n /** Only the icon; `label` becomes the accessible name and the tooltip. */\n iconOnly?: boolean;\n /** Kit variant (default: `tertiary-light` on the dark bar, `tertiary` on the light one). */\n variant?: SirioButtonVariant;\n disabled?: boolean;\n hidden?: boolean;\n /** Entries of the dropdown menu: with them the command is a kit dropdown. */\n items?: SirioDashboardCommandItem[];\n /**\n * Handler of the button; for dropdown commands, of the entries without their own `action`\n * (the chosen entry is `click.item`).\n */\n action?: SirioDashboardHandler<SirioDashboardCommandClick>;\n /** Free value for the application. */\n value?: unknown;\n}\n\n/** An item of the dashboard breadcrumb: a kit breadcrumb item that can also navigate with the router. */\nexport interface SirioDashboardBreadcrumbItem extends SirioBreadcrumbItem {\n route?: SirioDashboardRoute;\n queryParams?: Params;\n}\n\n/** A label/value row of the user panel (e.g. \"Ufficio\" / \"Sede di Roma\"). */\nexport interface SirioDashboardUserDetail {\n label: string;\n value: string;\n /** Font Awesome icon before the label. */\n icon?: string;\n}\n\n/** The current user, shown at the right end of the top bar and in the user panel. */\nexport interface SirioDashboardUser {\n /** Full name (e.g. \"Mario Rossi\"). */\n name: string;\n /** Short line under the name (role, profile, office...). */\n role?: string;\n email?: string;\n /** Initials of the avatar (default: from `name`). */\n initials?: string;\n /** URL of the profile picture (instead of the initials). */\n avatarUrl?: string;\n /** Further rows of the user panel. */\n details?: SirioDashboardUserDetail[];\n}\n\n/** Color scheme of the top bar: kit dark blue (`#002460`, white text) or white. */\nexport type SirioDashboardTheme = 'dark' | 'light';\n\n/** Payload of the user action handlers and of `(userAction)`. */\nexport interface SirioDashboardUserActionClick {\n item: SirioDashboardUserAction;\n index: number;\n event: Event;\n}\n\n/** Action of the user panel (e.g. \"Profilo\", \"Esci\"): a kit dropdown entry with its own handler. */\nexport interface SirioDashboardUserAction extends SirioDropdownItem {\n /** Handler of the action; it runs before `(userAction)` is emitted. */\n action?: SirioDashboardHandler<SirioDashboardUserActionClick>;\n}\n\n/** A value, a signal of it, or a function returning it (read inside a reactive context). */\nexport type SirioDashboardValue<T> = T | Signal<T> | (() => T);\n\n/**\n * Contract of the component shown by the dashboard router-outlet: every member is optional and can\n * be a plain value, a signal or a function (signals keep the bar in sync with the page state).\n *\n * ```ts\n * export class ClientiPage implements SirioDashboardContributor {\n * readonly selection = signal<Cliente[]>([]);\n * readonly dashboardCommands = computed<SirioDashboardCommand[]>(() => [\n * { label: 'Nuovo', icon: 'fa-plus', action: () => this.create() },\n * { label: 'Elimina', icon: 'fa-trash', disabled: !this.selection().length, action: () => this.remove() },\n * ]);\n * readonly dashboardBreadcrumb = [{ label: 'Home', route: '/' }, { label: 'Clienti' }];\n * }\n * ```\n */\nexport interface SirioDashboardContributor {\n /** Commands added to the top bar. */\n dashboardCommands?: SirioDashboardValue<SirioDashboardCommand[] | null | undefined>;\n /** Groups added to the side menu, under the menu of the dashboard. */\n dashboardMenu?: SirioDashboardValue<SirioDashboardMenuSection[] | null | undefined>;\n /** Breadcrumb that replaces the one of the dashboard (empty/null = keep the dashboard one). */\n dashboardBreadcrumb?: SirioDashboardValue<SirioDashboardBreadcrumbItem[] | null | undefined>;\n}\n\n/** What a page or a nested component can add to the dashboard (same members as the contract). */\nexport type SirioDashboardContribution = SirioDashboardContributor;\n\n/**\n * @internal Reads a member of a contribution: plain value, signal, or function/method (called on\n * its owner, so methods keep their `this`).\n */\nexport function sirioDashboardRead(\n owner: SirioDashboardContributor,\n key: 'dashboardCommands',\n): SirioDashboardCommand[] | null | undefined;\nexport function sirioDashboardRead(\n owner: SirioDashboardContributor,\n key: 'dashboardMenu',\n): SirioDashboardMenuSection[] | null | undefined;\nexport function sirioDashboardRead(\n owner: SirioDashboardContributor,\n key: 'dashboardBreadcrumb',\n): SirioDashboardBreadcrumbItem[] | null | undefined;\nexport function sirioDashboardRead(\n owner: SirioDashboardContributor,\n key: keyof SirioDashboardContributor,\n): unknown {\n const value = owner[key] as unknown;\n return typeof value === 'function' ? (value as () => unknown).call(owner) : value;\n}\n\n/** @internal True when the object offers at least one member of {@link SirioDashboardContributor}. */\nexport function isSirioDashboardContributor(value: unknown): value is SirioDashboardContributor {\n return (\n typeof value === 'object' &&\n value !== null &&\n ('dashboardCommands' in value || 'dashboardMenu' in value || 'dashboardBreadcrumb' in value)\n );\n}\n","import { DestroyRef, inject, Injectable, signal } from '@angular/core';\nimport { SirioDashboardContribution } from './sirio-dashboard-types';\n\n/** Handle of a registered contribution: replace it with `update()`, remove it with `remove()`. */\nexport interface SirioDashboardContributionRef {\n update(contribution: SirioDashboardContribution): void;\n remove(): void;\n}\n\n/**\n * Context of a `wm-sirio-dashboard`, provided by the dashboard to everything rendered inside it (the\n * routed components and their descendants). It is the way for components that are not the one\n * activated by the router-outlet (nested routes, child components, services of the page) to add\n * commands, menu groups or the breadcrumb.\n *\n * Contributions are merged in registration order after the ones of the routed component; for the\n * breadcrumb the last non-empty one wins. Usually {@link sirioDashboardContribute} is enough.\n */\n@Injectable()\nexport class SirioDashboardContext {\n private readonly entries = signal<readonly { contribution: SirioDashboardContribution }[]>([]);\n\n /** @internal Registered contributions, in registration order. */\n readonly contributions = () => this.entries().map((entry) => entry.contribution);\n\n /** Adds a contribution; call `remove()` on the returned handle when it is no longer valid. */\n register(contribution: SirioDashboardContribution): SirioDashboardContributionRef {\n const entry = { contribution };\n this.entries.update((list) => [...list, entry]);\n return {\n update: (next) => {\n entry.contribution = next;\n // New array: the dashboard computed values are notified.\n this.entries.update((list) => [...list]);\n },\n remove: () => this.entries.update((list) => list.filter((e) => e !== entry)),\n };\n }\n}\n\n/**\n * Adds a contribution to the enclosing `wm-sirio-dashboard` for the lifetime of the calling component\n * (it is removed on destroy). Call it in an injection context (constructor or field initializer).\n * Outside a dashboard it does nothing and returns `null`.\n *\n * ```ts\n * export class OrdineDettaglio {\n * private readonly ordine = input.required<Ordine>();\n * constructor() {\n * sirioDashboardContribute({\n * dashboardBreadcrumb: () => [\n * { label: 'Ordini', route: '/ordini' },\n * { label: `Ordine ${this.ordine().numero}` },\n * ],\n * dashboardCommands: [{ label: 'Stampa', icon: 'fa-print', action: () => window.print() }],\n * });\n * }\n * }\n * ```\n */\nexport function sirioDashboardContribute(\n contribution: SirioDashboardContribution,\n): SirioDashboardContributionRef | null {\n const context = inject(SirioDashboardContext, { optional: true });\n if (!context) {\n return null;\n }\n const ref = context.register(contribution);\n inject(DestroyRef).onDestroy(() => ref.remove());\n return ref;\n}\n","import { InjectionToken } from '@angular/core';\nimport type { SirioDashboard } from './sirio-dashboard';\n\n/** @internal The enclosing dashboard, for its internal parts (menu entries). */\nexport const SIRIO_DASHBOARD = new InjectionToken<SirioDashboard>('SirioDashboard');\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n effect,\n ElementRef,\n inject,\n Injector,\n input,\n numberAttribute,\n signal,\n untracked,\n viewChild,\n} from '@angular/core';\nimport { RouterLink } from '@angular/router';\nimport {\n SirioCollapseAnimator,\n SirioCollapseState,\n sirioMotionAllowed,\n} from '../core/sirio-collapse-animation';\nimport { sirioBadge } from '../core/sirio-badge';\nimport { sirioUniqueId } from '../core/sirio-control-base';\nimport { SirioTooltip } from '../tooltip/sirio-tooltip';\nimport type { SirioDashboard } from './sirio-dashboard';\nimport { SirioDashboardMenuItem } from './sirio-dashboard-types';\nimport { SIRIO_DASHBOARD } from './sirio-dashboard-token';\n\n/** \"fa-users\" -> \"fas fa-users\"; full class lists are used as given. */\nexport function sirioDashboardIconClasses(icon: string): string {\n const value = icon.trim();\n return value.includes(' ') ? value : `fas ${value}`;\n}\n\n/** Initials shown instead of a missing icon in the collapsed menu (e.g. \"Report mensili\" -> \"RM\"). */\nexport function sirioDashboardAbbreviation(label: string): string {\n const words = label.trim().split(/\\s+/).filter(Boolean);\n const letters = words.length > 1 ? words[0][0] + words[1][0] : (words[0] ?? '').slice(0, 2);\n return letters.toUpperCase();\n}\n\n/**\n * @internal One entry of the dashboard side menu (recursive): router link, plain link, button or\n * submenu (kit \"Menu Spalla\" markup: `li.sirio-nav-item` > `.sirio-nav-link`, submenus with\n * `data-sirio-toggle=\"collapse\"` and the kit animation). With the menu collapsed only the first\n * level is shown (icons); a submenu opens as a floating panel next to the entry.\n */\n@Component({\n selector: 'li[wmSirioDashboardMenuNode]',\n imports: [NgTemplateOutlet, RouterLink, SirioTooltip],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'sirio-nav-item',\n '[style.--sirio-dashboard-level]': 'level() - 1',\n '[class.sirio-dashboard-icons-only]': 'iconsOnly()',\n },\n styleUrl: './sirio-dashboard-menu-node.scss',\n templateUrl: './sirio-dashboard-menu-node.html',\n})\nexport class SirioDashboardMenuNode {\n readonly item = input.required<SirioDashboardMenuItem>();\n readonly level = input(1, { transform: numberAttribute });\n\n /** @internal */\n readonly dashboard: SirioDashboard = inject(SIRIO_DASHBOARD);\n private readonly regionRef = viewChild<ElementRef<HTMLElement>>('region');\n private readonly toggleRef = viewChild<ElementRef<HTMLElement>>('toggleButton');\n private readonly baseId = sirioUniqueId('sirio-dashboard-menu');\n protected readonly toggleId = `${this.baseId}-toggle`;\n protected readonly regionId = `${this.baseId}-submenu`;\n\n readonly expanded = signal(false);\n protected readonly state = signal<SirioCollapseState>('false');\n private readonly animator = new SirioCollapseAnimator(inject(Injector), (s) => this.state.set(s));\n\n protected readonly hasChildren = computed(() => !!this.item().children?.some((c) => !c.hidden));\n protected readonly visibleChildren = computed(() =>\n (this.item().children ?? []).filter((c) => !c.hidden),\n );\n protected readonly active = computed(() => this.dashboard.activeItems().has(this.item()));\n /** The entry contains the current page (its submenu is on the active path). */\n protected readonly onTrail = computed(() => this.dashboard.trailItems().has(this.item()));\n /** Only icons: collapsed menu on desktop, first level. */\n protected readonly iconsOnly = computed(() => this.dashboard.iconsOnly());\n protected readonly flyoutOpen = computed(() => this.dashboard.flyoutItem() === this.item());\n protected readonly abbreviation = computed(() => sirioDashboardAbbreviation(this.item().label));\n protected readonly iconClass = computed(() => {\n const icon = this.item().icon;\n return icon ? sirioDashboardIconClasses(icon) : null;\n });\n protected readonly hasBadge = computed(() => {\n const badge = this.item().badge;\n return badge !== undefined && badge !== null && badge !== '';\n });\n protected readonly badgeClass = computed(() => {\n const type = sirioBadge({ text: 'x', type: this.item().badgeType })?.type;\n return type ? `sirio-tag sirio-bg-${type}` : 'sirio-tag';\n });\n\n constructor() {\n // Initial state: the item flag, or open when the submenu contains the current page.\n effect(() => {\n const item = this.item();\n const open = item.expanded ?? untracked(() => this.onTrail());\n untracked(() => {\n this.expanded.set(open);\n this.state.set(open ? 'true' : 'false');\n });\n });\n // Navigation into the submenu (e.g. from a link of the page): open it.\n effect(() => {\n if (this.onTrail() && untracked(() => !this.expanded())) {\n untracked(() => this.setExpanded(true));\n }\n });\n inject(DestroyRef).onDestroy(() => this.animator.stop());\n }\n\n protected toggle(event: Event): void {\n event.preventDefault();\n if (this.item().disabled) {\n return;\n }\n if (this.iconsOnly()) {\n const anchor = this.toggleRef()?.nativeElement;\n if (anchor) {\n this.dashboard.toggleFlyout(\n this.item(),\n anchor,\n event instanceof KeyboardEvent || (event as MouseEvent).detail === 0,\n );\n }\n return;\n }\n this.setExpanded(!this.expanded());\n }\n\n /** @internal */\n setExpanded(open: boolean): void {\n if (open === this.expanded()) {\n return;\n }\n this.expanded.set(open);\n const region = this.regionRef()?.nativeElement;\n if (region) {\n this.animator.run(region, open, this.dashboard.animated() && sirioMotionAllowed());\n } else {\n this.state.set(open ? 'true' : 'false');\n }\n }\n\n protected select(event: Event): void {\n const item = this.item();\n if (item.disabled) {\n event.preventDefault();\n return;\n }\n this.dashboard.menuSelect(item, event);\n }\n}\n","@let entry = item();\n@if (hasChildren()) {\n <button\n #toggleButton\n #groupTip=\"wmSirioTooltip\"\n type=\"button\"\n class=\"sirio-nav-link\"\n data-sirio-toggle=\"collapse\"\n [class.disabled]=\"entry.disabled\"\n [class.sirio-dashboard-trail]=\"onTrail()\"\n [disabled]=\"entry.disabled\"\n [id]=\"toggleId\"\n [attr.aria-expanded]=\"iconsOnly() ? flyoutOpen() : expanded()\"\n [attr.aria-controls]=\"iconsOnly() ? dashboard.flyoutId : regionId\"\n [attr.aria-haspopup]=\"iconsOnly() ? 'true' : null\"\n [wmSirioTooltip]=\"entry.label\"\n tooltipPlacement=\"right\"\n [tooltipDisabled]=\"!iconsOnly() || flyoutOpen()\"\n (click)=\"groupTip.hide(); toggle($event)\"\n >\n <ng-container [ngTemplateOutlet]=\"content\" />\n </button>\n @if (!iconsOnly()) {\n <div\n #region\n role=\"region\"\n [id]=\"regionId\"\n [attr.aria-labelledby]=\"toggleId\"\n [attr.data-sirio-visible]=\"state()\"\n >\n <ul class=\"sirio-nav\" [attr.aria-label]=\"dashboard.submenuLabel() + ' ' + entry.label\">\n @for (child of visibleChildren(); track $index) {\n <li wmSirioDashboardMenuNode [item]=\"child\" [level]=\"level() + 1\"></li>\n }\n </ul>\n </div>\n }\n} @else if (entry.route && !entry.disabled) {\n <a\n class=\"sirio-nav-link\"\n [class.active]=\"active()\"\n [routerLink]=\"$any(entry.route)\"\n [queryParams]=\"entry.queryParams\"\n [queryParamsHandling]=\"entry.queryParamsHandling\"\n [fragment]=\"entry.fragment\"\n [attr.aria-current]=\"active() ? 'page' : null\"\n [wmSirioTooltip]=\"entry.label\"\n tooltipPlacement=\"right\"\n [tooltipDisabled]=\"!iconsOnly()\"\n (click)=\"select($event)\"\n >\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n} @else if (entry.href && !entry.disabled) {\n <a\n class=\"sirio-nav-link\"\n [class.active]=\"active()\"\n [attr.href]=\"entry.href\"\n [attr.target]=\"entry.target ?? null\"\n [attr.rel]=\"entry.target === '_blank' ? 'noopener' : null\"\n [attr.aria-current]=\"active() ? 'page' : null\"\n [wmSirioTooltip]=\"entry.label\"\n tooltipPlacement=\"right\"\n [tooltipDisabled]=\"!iconsOnly()\"\n (click)=\"select($event)\"\n >\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n} @else {\n <button\n type=\"button\"\n class=\"sirio-nav-link\"\n [class.active]=\"active()\"\n [class.disabled]=\"entry.disabled\"\n [disabled]=\"entry.disabled\"\n [attr.aria-current]=\"active() ? 'page' : null\"\n [wmSirioTooltip]=\"entry.label\"\n tooltipPlacement=\"right\"\n [tooltipDisabled]=\"!iconsOnly()\"\n (click)=\"select($event)\"\n >\n <ng-container [ngTemplateOutlet]=\"content\" />\n </button>\n}\n<ng-template #content>\n <span class=\"sirio-dashboard-link-text\">\n @if (iconClass(); as icon) {\n <span class=\"sirio-dashboard-icon\" aria-hidden=\"true\"><span [attr.class]=\"icon\"></span></span>\n } @else if (level() === 1) {\n <span class=\"sirio-dashboard-icon sirio-dashboard-abbr\" aria-hidden=\"true\">{{ abbreviation() }}</span>\n }\n <span class=\"sirio-dashboard-label\"\n >@if (active()) {<span class=\"sr-only\">{{ dashboard.activeLabel() }}&#32;</span>}{{ entry.label }}</span\n >\n </span>\n @if (hasBadge()) {\n <span [class]=\"badgeClass() + ' sirio-dashboard-badge'\"\n >{{ entry.badge }}@if (entry.badgeLabel) {<span class=\"sr-only\">&#32;{{ entry.badgeLabel }}</span>}</span\n >\n }\n</ng-template>\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n ElementRef,\n inject,\n input,\n model,\n output,\n viewChild,\n} from '@angular/core';\nimport { sirioUniqueId } from '../core/sirio-control-base';\nimport { sirioDashboardIconClasses } from './sirio-dashboard-menu-node';\nimport {\n SirioDashboardTheme,\n SirioDashboardUser,\n SirioDashboardUserAction,\n SirioDashboardUserActionClick,\n} from './sirio-dashboard-types';\n\n/** Initials of a name: first letter of the first and of the last word (\"Mario Rossi\" -> \"MR\"). */\nexport function sirioDashboardInitials(name: string): string {\n const words = name.trim().split(/\\s+/).filter(Boolean);\n if (!words.length) {\n return '';\n }\n const last = words.length > 1 ? words[words.length - 1][0] : (words[0][1] ?? '');\n return (words[0][0] + last).toUpperCase();\n}\n\n/**\n * @internal Current user of the dashboard top bar: kit user menu button (avatar, name, role,\n * chevron) that opens a panel with the kit dropdown menu look: avatar, name, role, email, the\n * `details` rows, the projected `[wmSirioDashboardUserPanel]` content and the actions.\n * The panel closes with Esc (focus back to the button) and with a click outside.\n */\n@Component({\n selector: 'wm-sirio-dashboard-user',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class.sirio-dashboard-user-light]': 'theme() === \"light\"',\n '(document:click)': 'onDocumentClick($event)',\n },\n styleUrl: './sirio-dashboard-user.scss',\n templateUrl: './sirio-dashboard-user.html',\n})\nexport class SirioDashboardUserArea {\n readonly user = input.required<SirioDashboardUser>();\n readonly actions = input<SirioDashboardUserAction[]>([]);\n readonly theme = input<SirioDashboardTheme>('dark');\n readonly panelLabel = input('Profilo utente');\n readonly open = model(false);\n readonly action = output<SirioDashboardUserActionClick>();\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n private readonly triggerRef = viewChild.required<ElementRef<HTMLButtonElement>>('trigger');\n protected readonly panelId = sirioUniqueId('sirio-dashboard-user');\n protected readonly initials = computed(() => {\n const user = this.user();\n return user.initials ?? sirioDashboardInitials(user.name);\n });\n\n protected iconClasses(icon: string): string {\n return sirioDashboardIconClasses(icon);\n }\n\n protected toggle(): void {\n this.open.update((v) => !v);\n }\n\n protected select(item: SirioDashboardUserAction, index: number, event: Event): void {\n if (item.disabled) {\n event.preventDefault();\n return;\n }\n if (!item.href) {\n event.preventDefault();\n }\n const click: SirioDashboardUserActionClick = { item, index, event };\n this.open.set(false);\n item.action?.(click);\n this.action.emit(click);\n }\n\n protected onKeydown(event: KeyboardEvent): void {\n if (event.key === 'Escape' && this.open()) {\n event.preventDefault();\n this.open.set(false);\n this.triggerRef().nativeElement.focus();\n }\n }\n\n protected onDocumentClick(event: Event): void {\n if (this.open() && !this.host.contains(event.target as Node)) {\n this.open.set(false);\n }\n }\n}\n","@let u = user();\n<div class=\"sirio-dropdown sirio-dashboard-user\" (keydown)=\"onKeydown($event)\">\n <button\n #trigger\n type=\"button\"\n class=\"sirio-btn sirio-btn-user-menu sirio-dashboard-user-trigger\"\n [class.sirio-btn-link-light]=\"theme() === 'dark'\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-controls]=\"panelId\"\n (click)=\"toggle()\"\n >\n <span class=\"sirio-avatar\" [class.sirio-bg-white]=\"theme() === 'dark'\" aria-hidden=\"true\">\n @if (u.avatarUrl) {\n <img [src]=\"u.avatarUrl\" alt=\"\" />\n } @else {\n <span>{{ initials() }}</span>\n }\n </span>\n <span class=\"sirio-dashboard-user-text\">\n <span class=\"sirio-dashboard-user-name\">{{ u.name }}</span>\n @if (u.role) {\n <small class=\"sirio-dashboard-user-role\">{{ u.role }}</small>\n }\n </span>\n <span class=\"sr-only\">{{ panelLabel() }}</span>\n <span class=\"fas fa-chevron-down sirio-dashboard-chevron\" aria-hidden=\"true\"></span>\n </button>\n <div\n class=\"sirio-dropdown-menu sirio-dropdown-menu-right sirio-dashboard-user-panel\"\n role=\"region\"\n [id]=\"panelId\"\n [attr.aria-label]=\"panelLabel()\"\n [attr.data-sirio-visible]=\"open()\"\n >\n <div class=\"sirio-dashboard-user-card\">\n <span class=\"sirio-avatar sirio-dashboard-avatar-large\" aria-hidden=\"true\">\n @if (u.avatarUrl) {\n <img [src]=\"u.avatarUrl\" alt=\"\" />\n } @else {\n <span>{{ initials() }}</span>\n }\n </span>\n <div class=\"sirio-dashboard-user-card-text\">\n <strong>{{ u.name }}</strong>\n @if (u.role) {\n <span>{{ u.role }}</span>\n }\n @if (u.email) {\n <a [attr.href]=\"'mailto:' + u.email\">{{ u.email }}</a>\n }\n </div>\n </div>\n @if (u.details?.length) {\n <dl class=\"sirio-dashboard-user-details\">\n @for (detail of u.details; track $index) {\n <div>\n <dt>\n @if (detail.icon) {\n <span [attr.class]=\"iconClasses(detail.icon)\" aria-hidden=\"true\"></span>\n }\n {{ detail.label }}\n </dt>\n <dd>{{ detail.value }}</dd>\n </div>\n }\n </dl>\n }\n <ng-content select=\"[wmSirioDashboardUserPanel]\" />\n @if (actions().length) {\n <ul class=\"sirio-dashboard-user-actions\">\n @for (action of actions(); track $index; let i = $index) {\n <li>\n @if (action.href) {\n <a\n class=\"sirio-dropdown-item\"\n [class.disabled]=\"action.disabled\"\n [attr.href]=\"action.disabled ? null : action.href\"\n [attr.aria-disabled]=\"action.disabled ? 'true' : null\"\n (click)=\"select(action, i, $event)\"\n >@if (action.icon) {<span [attr.class]=\"iconClasses(action.icon)\" aria-hidden=\"true\"></span>}{{ action.label }}</a\n >\n } @else {\n <button\n type=\"button\"\n class=\"sirio-dropdown-item\"\n [disabled]=\"action.disabled\"\n (click)=\"select(action, i, $event)\"\n >@if (action.icon) {<span [attr.class]=\"iconClasses(action.icon)\" aria-hidden=\"true\"></span>}{{ action.label }}</button>\n }\n </li>\n }\n </ul>\n }\n </div>\n</div>\n","import { DOCUMENT, LocationStrategy, NgTemplateOutlet } from '@angular/common';\nimport {\n afterNextRender,\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n DestroyRef,\n Directive,\n effect,\n ElementRef,\n forwardRef,\n inject,\n Injector,\n input,\n model,\n output,\n signal,\n untracked,\n viewChild,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport {\n NavigationEnd,\n PRIMARY_OUTLET,\n Router,\n RouterLink,\n RouterOutlet,\n UrlTree,\n} from '@angular/router';\nimport { filter } from 'rxjs';\nimport {\n SirioBreadcrumb,\n SirioBreadcrumbClick,\n SirioBreadcrumbItem,\n} from '../breadcrumb/sirio-breadcrumb';\nimport { SirioButtonVariant, sirioButtonClasses } from '../button/sirio-button';\nimport { sirioUniqueId } from '../core/sirio-control-base';\nimport { SirioDropdown, SirioDropdownItem, SirioDropdownSelect } from '../dropdown/sirio-dropdown';\nimport { SirioDashboardContext } from './sirio-dashboard-context';\nimport { SirioDashboardMenuNode, sirioDashboardIconClasses } from './sirio-dashboard-menu-node';\nimport { SirioDashboardUserArea } from './sirio-dashboard-user';\nimport { SIRIO_DASHBOARD } from './sirio-dashboard-token';\nimport {\n isSirioDashboardContributor,\n SirioDashboardBreadcrumbItem,\n SirioDashboardCommand,\n SirioDashboardContributor,\n SirioDashboardMenuItem,\n SirioDashboardMenuSection,\n SirioDashboardRoute,\n SirioDashboardTheme,\n SirioDashboardUser,\n SirioDashboardCommandClick,\n SirioDashboardCommandItem,\n SirioDashboardUserAction,\n SirioDashboardUserActionClick,\n sirioDashboardRead,\n} from './sirio-dashboard-types';\n\n/** Payload of `(menuItemClick)`. */\nexport interface SirioDashboardMenuClick {\n item: SirioDashboardMenuItem;\n event: Event;\n}\n\n/** Payload of `(breadcrumbClick)`. */\nexport interface SirioDashboardBreadcrumbClick {\n item: SirioDashboardBreadcrumbItem;\n index: number;\n /** Call `event.preventDefault()` to stop the router navigation of `route` items. */\n event: MouseEvent;\n}\n\n/** Where the commands offered by the page go, with respect to the commands of the dashboard. */\nexport type SirioDashboardCommandsPosition = 'start' | 'end';\n\n/**\n * Where the breadcrumb is shown: `content` (default) in its own bar between the top bar and the\n * content; `toolbar` in the top bar, after the menu button and before the commands.\n */\nexport type SirioDashboardBreadcrumbPosition = 'content' | 'toolbar';\n\n/** Kit desktop breakpoint: from 992px the side menu is a column (collapsible), below it slides in. */\nconst DESKTOP_QUERY = '(min-width: 992px)';\n/** From 768px the commands are shown one by one, below they are grouped in one \"Azioni\" menu. */\nconst WIDE_QUERY = '(min-width: 768px)';\n\nconst FOCUSABLE =\n 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), ' +\n 'textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])';\n\n/** Match of a menu entry with the current URL. */\ninterface MenuMatch {\n item: SirioDashboardMenuItem;\n trail: SirioDashboardMenuItem[];\n score: number;\n}\n\n/** Entry of the floating submenu of the collapsed menu (submenu flattened, with its depth). */\ninterface FlyoutEntry {\n item: SirioDashboardMenuItem;\n depth: number;\n group: boolean;\n}\n\n/** Entry of the compact \"Azioni\" menu (small screens): a command, or an entry of a dropdown command. */\ninterface CompactEntry {\n command: SirioDashboardCommand;\n /** Entry of the dropdown command (as declared by the application). */\n item?: SirioDashboardCommandItem;\n /** Entry shown in the compact menu. */\n view: SirioDropdownItem;\n}\n\nfunction visible<T extends { hidden?: boolean }>(items: readonly T[] | null | undefined): T[] {\n return (items ?? []).filter((item) => !item.hidden);\n}\n\n/**\n * Logo of the application, top left (it replaces `logo` / `appTitle`):\n * `<a wmSirioDashboardLogo routerLink=\"/\"><img src=\"logo.svg\" alt=\"Gestionale\" /></a>`.\n * The class `sirio-dashboard-collapsed` on the dashboard host tells when the menu is collapsed.\n */\n@Directive({ selector: '[wmSirioDashboardLogo]' })\nexport class SirioDashboardLogo {}\n\n/** Free content of the top bar, before the commands (e.g. a search field or the page title). */\n@Directive({ selector: '[wmSirioDashboardToolbar]', host: { class: 'sirio-dashboard-toolbar' } })\nexport class SirioDashboardToolbar {}\n\n/** Extra content of the user panel, between the user details and the actions. */\n@Directive({ selector: '[wmSirioDashboardUserPanel]' })\nexport class SirioDashboardUserPanel {}\n\n/** Content at the bottom of the side menu (e.g. version, help link); hidden when collapsed. */\n@Directive({ selector: '[wmSirioDashboardSidebarFooter]' })\nexport class SirioDashboardSidebarFooter {}\n\n/**\n * Application layout (\"dashboard\") built with the Sirio web kit styles and the library components:\n *\n * - top left the logo of the application (`logo`, `logoCollapsed`, `appTitle` or `[wmSirioDashboardLogo]`);\n * - on the left the side menu (`menu`, any depth; kit \"Menu Spalla\" markup), collapsible to the\n * icons only (`[(collapsed)]`, tooltips and floating submenus); below 992px it slides in from the\n * left (`[(menuOpen)]`);\n * - the top bar: button to collapse/open the menu, `[wmSirioDashboardToolbar]` content, the commands\n * (`commands`: kit buttons or `wm-sirio-dropdown`, grouped in one \"Azioni\" menu below 768px) and,\n * at the right end, the current user (`user`: kit avatar, name and role) that opens a panel with\n * the details, `[wmSirioDashboardUserPanel]` content and the `userActions`;\n * - under the top bar the kit breadcrumb (`breadcrumb`; default: the path of the active menu entry);\n * - the rest of the space is the `router-outlet` (scrollable).\n *\n * The component shown by the outlet can add commands, menu groups and replace the breadcrumb:\n * implementing {@link SirioDashboardContributor} (`dashboardCommands`, `dashboardMenu`,\n * `dashboardBreadcrumb`, as values or signals) or, from any component inside the dashboard, with\n * {@link sirioDashboardContribute} / {@link SirioDashboardContext}.\n *\n * ```html\n * <wm-sirio-dashboard appTitle=\"Gestionale\" logo=\"assets/logo.svg\" [menu]=\"menu\" [commands]=\"commands\"\n * [user]=\"user\" [userActions]=\"userActions\" (userAction)=\"onUserAction($event)\" />\n * ```\n *\n * The dashboard fills the viewport (`height: 100vh`); give the host another height to embed it.\n */\n@Component({\n selector: 'wm-sirio-dashboard',\n imports: [\n NgTemplateOutlet,\n RouterLink,\n RouterOutlet,\n SirioBreadcrumb,\n SirioDropdown,\n SirioDashboardMenuNode,\n SirioDashboardUserArea,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n SirioDashboardContext,\n { provide: SIRIO_DASHBOARD, useExisting: forwardRef(() => SirioDashboard) },\n ],\n host: {\n class: 'sirio-dashboard',\n '[class.sirio-dashboard-collapsed]': 'iconsOnly()',\n '[class.sirio-dashboard-mobile]': '!desktop()',\n '[class.sirio-dashboard-menu-open]': 'mobileMenu()',\n '[class.sirio-dashboard-light]': 'theme() === \"light\"',\n '(document:click)': 'onDocumentClick($event)',\n '(window:resize)': 'closeFlyout()',\n },\n styleUrl: './sirio-dashboard.scss',\n templateUrl: './sirio-dashboard.html',\n})\nexport class SirioDashboard {\n // ---- Content bound by the application ----\n /** Entries of the side menu. */\n readonly menu = input<SirioDashboardMenuItem[]>([]);\n /** Commands of the top bar (the page can add its own). */\n readonly commands = input<SirioDashboardCommand[]>([]);\n /** Breadcrumb (the page can replace it); empty = path of the active menu entry (`autoBreadcrumb`). */\n readonly breadcrumb = input<SirioDashboardBreadcrumbItem[]>([]);\n /** Current user; null = no user area. */\n readonly user = input<SirioDashboardUser | null>(null);\n /** Actions of the user panel (e.g. \"Profilo\", \"Esci\"), handled with `(userAction)` or `href`. */\n readonly userActions = input<SirioDashboardUserAction[]>([]);\n\n // ---- Logo ----\n /** Name of the application: text next to the logo (or alone) and default alternative text. */\n readonly appTitle = input('');\n /** URL of the logo image. */\n readonly logo = input<string | null>(null);\n /** URL of the logo shown with the menu collapsed (e.g. the symbol only); default: no logo. */\n readonly logoCollapsed = input<string | null>(null);\n /** Alternative text of the logo (default: `appTitle`). */\n readonly logoAlt = input<string | null>(null);\n /** Link of the logo (default the home `/`); null = no link. */\n readonly logoRoute = input<SirioDashboardRoute | null>('/');\n\n // ---- Behaviour ----\n readonly theme = input<SirioDashboardTheme>('dark');\n /** Menu reduced to the icons (desktop), two-way: `[(collapsed)]`. */\n readonly collapsed = model(false);\n /** Button to collapse the menu (desktop). */\n readonly collapsible = input(true, { transform: booleanAttribute });\n /** Side menu open on small screens (< 992px), two-way: `[(menuOpen)]`. */\n readonly menuOpen = model(false);\n /** User panel open, two-way: `[(userPanelOpen)]`. */\n readonly userPanelOpen = model(false);\n /** Commands of the page before (`start`, default) or after (`end`) the ones of the dashboard. */\n readonly pageCommandsPosition = input<SirioDashboardCommandsPosition>('start');\n /** Show the breadcrumb bar. */\n readonly showBreadcrumb = input(true, { transform: booleanAttribute });\n /**\n * Position of the breadcrumb: `content` (default, bar under the top bar) or `toolbar` (in the top\n * bar, after the menu button and before the commands). When the top bar has no room for it\n * (always below 768px) the `toolbar` breadcrumb goes back to its own bar.\n */\n readonly breadcrumbPosition = input<SirioDashboardBreadcrumbPosition>('content');\n /** Without a breadcrumb (dashboard or page), build it from the path of the active menu entry. */\n readonly autoBreadcrumb = input(true, { transform: booleanAttribute });\n /** First item of the automatic breadcrumb (e.g. `{ label: 'Home', route: '/', icon: 'fa-home' }`). */\n readonly breadcrumbHome = input<SirioDashboardBreadcrumbItem | null>(null);\n /** Scroll the content back to the top after each navigation. */\n readonly scrollTopOnNavigate = input(true, { transform: booleanAttribute });\n /** Kit open/close animation of the submenus. */\n readonly animated = input(true, { transform: booleanAttribute });\n\n // ---- Texts (Italian defaults, as the kit) ----\n readonly menuLabel = input('Menu principale');\n readonly collapseLabel = input('Riduci il menu');\n readonly expandLabel = input('Espandi il menu');\n readonly openMenuLabel = input('Apri il menu');\n readonly closeMenuLabel = input('Chiudi il menu');\n readonly submenuLabel = input('Sottomenu di');\n readonly activeLabel = input('Pagina attiva');\n readonly commandsLabel = input('Azioni');\n readonly userPanelLabel = input('Profilo utente');\n readonly skipLinkLabel = input('Vai al contenuto');\n\n // ---- Events ----\n /** Click on a command (also run by its `action`). */\n readonly commandClick = output<SirioDashboardCommandClick>();\n /** Click on a menu entry without children. */\n readonly menuItemClick = output<SirioDashboardMenuClick>();\n /** Click on an action of the user panel. */\n readonly userAction = output<SirioDashboardUserActionClick>();\n /** Click on a breadcrumb link (`route` items navigate with the router unless prevented). */\n readonly breadcrumbClick = output<SirioDashboardBreadcrumbClick>();\n /** Component activated by the router-outlet (null when deactivated). */\n readonly pageChange = output<unknown>();\n\n protected readonly customLogo = contentChild(SirioDashboardLogo);\n protected readonly sidebarFooter = contentChild(SirioDashboardSidebarFooter);\n\n private readonly router = inject(Router);\n private readonly locationStrategy = inject(LocationStrategy);\n private readonly document = inject(DOCUMENT);\n private readonly injector = inject(Injector);\n private readonly destroyRef = inject(DestroyRef);\n /** Contributions registered by the components inside the dashboard. */\n readonly context = inject(SirioDashboardContext);\n\n private readonly sidebarRef = viewChild.required<ElementRef<HTMLElement>>('sidebar');\n private readonly contentRef = viewChild.required<ElementRef<HTMLElement>>('content');\n private readonly toggleRef = viewChild<ElementRef<HTMLButtonElement>>('menuToggle');\n private readonly topbarRef = viewChild.required<ElementRef<HTMLElement>>('topbar');\n private readonly toolbarAreaRef = viewChild.required<ElementRef<HTMLElement>>('toolbarArea');\n private readonly toolbarCrumbRef = viewChild<ElementRef<HTMLElement>>('toolbarCrumb');\n private readonly flyoutRef = viewChild<ElementRef<HTMLElement>>('flyout');\n\n private readonly baseId = sirioUniqueId('sirio-dashboard');\n protected readonly sidebarId = `${this.baseId}-sidebar`;\n protected readonly contentId = `${this.baseId}-content`;\n /** @internal Id of the floating submenu of the collapsed menu. */\n readonly flyoutId = `${this.baseId}-flyout`;\n\n /** Desktop layout (≥ 992px). */\n readonly desktop = signal(true);\n /** Wide top bar (≥ 768px): commands shown one by one. */\n protected readonly wide = signal(true);\n /** @internal Menu shown as icons only (collapsed, desktop). */\n readonly iconsOnly = computed(() => this.collapsed() && this.desktop());\n /** Side menu shown as sliding panel (small screens, open). */\n protected readonly mobileMenu = computed(() => this.menuOpen() && !this.desktop());\n\n /** Component activated by the router-outlet. */\n private readonly page = signal<SirioDashboardContributor | null>(null);\n /** Current URL (updated at the end of every navigation). */\n private readonly url = signal<UrlTree | null>(null);\n\n // ---- Contributions ----\n private readonly contributors = computed<SirioDashboardContributor[]>(() => {\n const page = this.page();\n return [...(page ? [page] : []), ...this.context.contributions()];\n });\n\n /** Menu groups offered by the page (shown under the menu of the dashboard). */\n protected readonly pageMenu = computed<SirioDashboardMenuSection[]>(() =>\n this.contributors()\n .flatMap((c) => sirioDashboardRead(c, 'dashboardMenu') ?? [])\n .map((section) => ({ ...section, items: visible(section.items) }))\n .filter((section) => section.items.length > 0),\n );\n protected readonly mainMenu = computed(() => visible(this.menu()));\n\n /** Commands of the top bar: the ones of the page and the ones of the dashboard. */\n protected readonly allCommands = computed<SirioDashboardCommand[]>(() => {\n const page = this.contributors().flatMap(\n (c) => sirioDashboardRead(c, 'dashboardCommands') ?? [],\n );\n const own = this.commands();\n return visible(this.pageCommandsPosition() === 'end' ? [...own, ...page] : [...page, ...own]);\n });\n\n /** Compact \"Azioni\" menu of the small screens: all the commands as entries of one dropdown. */\n protected readonly compactEntries = computed<CompactEntry[]>(() =>\n this.allCommands().flatMap<CompactEntry>((command) =>\n command.items?.length\n ? command.items.map((item) => ({\n command,\n item,\n view: {\n label: `${command.label}: ${item.label}`,\n icon: item.icon,\n href: item.href,\n disabled: command.disabled || item.disabled,\n },\n }))\n : [\n {\n command,\n view: { label: command.label, icon: command.icon, disabled: command.disabled },\n },\n ],\n ),\n );\n protected readonly compactItems = computed<SirioDropdownItem[]>(() =>\n this.compactEntries().map((e) => e.view),\n );\n\n // ---- Active menu entry ----\n /**\n * Entry of the current page in each menu block (the dashboard menu first, then the groups of the\n * page): every block highlights its own best match.\n */\n private readonly activeMatches = computed<MenuMatch[]>(() => {\n const url = this.url();\n if (!url) {\n return [];\n }\n const current = this.segments(url);\n const bestOf = (items: SirioDashboardMenuItem[]): MenuMatch | null => {\n let best: MenuMatch | null = null;\n const walk = (list: SirioDashboardMenuItem[], trail: SirioDashboardMenuItem[]) => {\n for (const item of visible(list)) {\n const path = [...trail, item];\n const score = this.matchScore(item, url, current);\n if (score > (best?.score ?? 0)) {\n best = { item, trail: path, score };\n }\n if (item.children?.length) {\n walk(item.children, path);\n }\n }\n };\n walk(items, []);\n return best;\n };\n return [this.menu(), ...this.pageMenu().map((section) => section.items)]\n .map(bestOf)\n .filter((match): match is MenuMatch => match !== null);\n });\n\n /** @internal Menu entries of the current page (one per menu block at most). */\n readonly activeItems = computed(() => new Set(this.activeMatches().map((m) => m.item)));\n /** @internal Entries whose submenu contains an active entry. */\n readonly trailItems = computed(\n () => new Set(this.activeMatches().flatMap((m) => m.trail.slice(0, -1))),\n );\n /** @internal Path to the active entry of the first block that has one (automatic breadcrumb). */\n readonly activeTrail = computed(() => this.activeMatches()[0]?.trail ?? []);\n\n // ---- Breadcrumb ----\n /** Breadcrumb shown: the page one, else the dashboard one, else the path of the active entry. */\n protected readonly breadcrumbItems = computed<SirioDashboardBreadcrumbItem[]>(() => {\n for (const contributor of [...this.contributors()].reverse()) {\n const items = sirioDashboardRead(contributor, 'dashboardBreadcrumb');\n if (items?.length) {\n return items;\n }\n }\n if (this.breadcrumb().length) {\n return this.breadcrumb();\n }\n if (!this.autoBreadcrumb()) {\n return [];\n }\n const trail: SirioDashboardBreadcrumbItem[] = this.activeTrail().map((item) => ({\n label: item.label,\n route: item.route,\n queryParams: item.queryParams,\n href: item.route ? undefined : item.href,\n }));\n const home = this.breadcrumbHome();\n return home && trail.length && trail[0].label !== home.label ? [home, ...trail] : trail;\n });\n\n /** Room for the breadcrumb in the top bar (measured when `breadcrumbPosition` is `toolbar`). */\n private readonly toolbarCrumbFits = signal(true);\n /** Width of the breadcrumb the last time it was in the top bar. */\n private toolbarCrumbWidth = 0;\n /** Breadcrumb rendered in the top bar (`toolbar` position, wide screens, enough room). */\n protected readonly breadcrumbInToolbar = computed(\n () => this.breadcrumbPosition() === 'toolbar' && this.wide() && this.toolbarCrumbFits(),\n );\n\n /** Kit breadcrumb items, with the `href` of the router routes. */\n protected readonly breadcrumbView = computed<SirioBreadcrumbItem[]>(() =>\n this.breadcrumbItems().map((item) => ({\n label: item.label,\n icon: item.icon,\n href: item.route !== undefined ? this.hrefOf(item.route, item.queryParams) : item.href,\n })),\n );\n\n // ---- Floating submenu of the collapsed menu ----\n /** @internal Entry whose submenu is open as floating panel. */\n readonly flyoutItem = signal<SirioDashboardMenuItem | null>(null);\n protected readonly flyoutTop = signal(0);\n protected readonly flyoutLeft = signal(0);\n private flyoutAnchor: HTMLElement | null = null;\n protected readonly flyoutEntries = computed<FlyoutEntry[]>(() => {\n const entries: FlyoutEntry[] = [];\n const walk = (items: SirioDashboardMenuItem[] | undefined, depth: number) => {\n for (const item of visible(items)) {\n const group = !!item.children?.some((child) => !child.hidden);\n entries.push({ item, depth, group });\n if (group) {\n walk(item.children, depth + 1);\n }\n }\n };\n walk(this.flyoutItem()?.children, 0);\n return entries;\n });\n\n private bodyOverflow: string | null = null;\n\n constructor() {\n this.watchMedia(DESKTOP_QUERY, (matches) => {\n this.desktop.set(matches);\n if (matches) {\n this.menuOpen.set(false);\n }\n });\n this.watchMedia(WIDE_QUERY, (matches) => this.wide.set(matches));\n this.watchToolbarRoom();\n\n this.url.set(this.router.parseUrl(this.router.url));\n this.router.events\n .pipe(\n filter((event) => event instanceof NavigationEnd),\n takeUntilDestroyed(),\n )\n .subscribe((event) => {\n this.url.set(this.router.parseUrl((event as NavigationEnd).urlAfterRedirects));\n this.closeFlyout();\n this.menuOpen.set(false);\n this.userPanelOpen.set(false);\n if (this.scrollTopOnNavigate()) {\n this.contentRef().nativeElement.scrollTop = 0;\n }\n });\n\n // Collapsing/expanding the menu closes the floating submenu.\n effect(() => {\n this.iconsOnly();\n untracked(() => this.closeFlyout());\n });\n\n // Sliding menu (small screens): page scroll locked, focus into the menu.\n let wasOpen = false;\n effect(() => {\n const open = this.mobileMenu();\n untracked(() => {\n if (open === wasOpen) {\n return;\n }\n wasOpen = open;\n if (open) {\n this.lockScroll();\n afterNextRender(() => this.sidebarRef().nativeElement.focus(), {\n injector: this.injector,\n });\n } else {\n this.unlockScroll();\n }\n });\n });\n this.destroyRef.onDestroy(() => this.unlockScroll());\n }\n\n // ---- Public API ----\n\n /** Collapses / expands the menu (desktop) or opens / closes it (small screens). */\n toggleMenu(): void {\n if (this.desktop()) {\n this.collapsed.update((v) => !v);\n } else {\n this.menuOpen.update((v) => !v);\n }\n }\n\n /** Closes the sliding menu of the small screens; `focusToggle` returns the focus to its button. */\n closeMenu(focusToggle = false): void {\n if (!this.menuOpen()) {\n return;\n }\n this.menuOpen.set(false);\n if (focusToggle) {\n afterNextRender(() => this.toggleRef()?.nativeElement.focus(), { injector: this.injector });\n }\n }\n\n /** Opens / closes the user panel. */\n toggleUserPanel(): void {\n this.userPanelOpen.update((v) => !v);\n }\n\n // ---- Internal API (menu entries) ----\n\n /** @internal */\n menuSelect(item: SirioDashboardMenuItem, event: Event): void {\n if (!item.route && !item.href) {\n event.preventDefault();\n }\n this.menuItemClick.emit({ item, event });\n this.closeFlyout();\n this.closeMenu();\n }\n\n /** @internal Opens (or closes) the floating submenu of a collapsed entry next to `anchor`. */\n toggleFlyout(item: SirioDashboardMenuItem, anchor: HTMLElement, focusFirst: boolean): void {\n if (this.flyoutItem() === item) {\n this.closeFlyout();\n return;\n }\n const rect = anchor.getBoundingClientRect();\n this.flyoutAnchor = anchor;\n this.flyoutTop.set(rect.top);\n this.flyoutLeft.set(rect.right + 4);\n this.flyoutItem.set(item);\n afterNextRender(\n () => {\n const panel = this.flyoutRef()?.nativeElement;\n if (!panel) {\n return;\n }\n // Keep the panel inside the viewport.\n const viewport =\n this.document.defaultView?.innerHeight ?? this.document.documentElement.clientHeight;\n const height = panel.offsetHeight;\n if (rect.top + height > viewport - 8) {\n this.flyoutTop.set(Math.max(8, viewport - height - 8));\n }\n if (focusFirst) {\n this.flyoutLinks()[0]?.focus();\n }\n },\n { injector: this.injector },\n );\n }\n\n /** @internal */\n closeFlyout(focusAnchor = false): void {\n if (!this.flyoutItem()) {\n return;\n }\n this.flyoutItem.set(null);\n if (focusAnchor) {\n this.flyoutAnchor?.focus();\n }\n this.flyoutAnchor = null;\n }\n\n // ---- Template handlers ----\n\n protected onActivate(component: unknown): void {\n this.page.set(isSirioDashboardContributor(component) ? component : null);\n this.pageChange.emit(component);\n }\n\n protected onDeactivate(): void {\n this.page.set(null);\n this.pageChange.emit(null);\n }\n\n protected iconClasses(icon: string): string {\n return sirioDashboardIconClasses(icon);\n }\n\n protected commandClasses(command: SirioDashboardCommand): string {\n return sirioButtonClasses(this.variantOf(command), {\n iconOnly: !!command.iconOnly,\n size: 'medium',\n });\n }\n\n protected variantOf(command: SirioDashboardCommand): SirioButtonVariant {\n return command.variant ?? (this.theme() === 'dark' ? 'tertiary-light' : 'tertiary');\n }\n\n protected toggleClasses(): string {\n return sirioButtonClasses('ghost', { iconOnly: true, white: this.theme() === 'dark' });\n }\n\n protected runCommand(\n command: SirioDashboardCommand,\n event: Event,\n item?: SirioDashboardCommandItem,\n ): void {\n if (command.disabled || item?.disabled) {\n return;\n }\n const click: SirioDashboardCommandClick = { command, item, event };\n // The handler carried by the entry wins over the one of its command.\n (item?.action ?? command.action)?.(click);\n this.commandClick.emit(click);\n }\n\n protected onCompactSelect(select: SirioDropdownSelect): void {\n const entry = this.compactEntries()[select.index];\n if (entry) {\n this.runCommand(entry.command, select.event, entry.item);\n }\n }\n\n protected onBreadcrumbClick(click: SirioBreadcrumbClick): void {\n const item = this.breadcrumbItems()[click.index];\n if (!item) {\n return;\n }\n this.breadcrumbClick.emit({ item, index: click.index, event: click.event });\n if (item.route !== undefined && !click.event.defaultPrevented) {\n click.event.preventDefault();\n void this.router.navigateByUrl(this.treeOf(item.route, item.queryParams));\n }\n }\n\n protected onSidebarKeydown(event: KeyboardEvent): void {\n if (!this.mobileMenu()) {\n return;\n }\n if (event.key === 'Escape') {\n event.preventDefault();\n this.closeMenu(true);\n } else if (event.key === 'Tab') {\n this.trapFocus(event, this.sidebarRef().nativeElement);\n }\n }\n\n protected onFlyoutKeydown(event: KeyboardEvent): void {\n const links = this.flyoutLinks();\n const index = links.indexOf(event.target as HTMLElement);\n switch (event.key) {\n case 'Escape':\n event.preventDefault();\n this.closeFlyout(true);\n break;\n case 'ArrowDown':\n event.preventDefault();\n links[Math.min(index + 1, links.length - 1)]?.focus();\n break;\n case 'ArrowUp':\n event.preventDefault();\n links[Math.max(index - 1, 0)]?.focus();\n break;\n case 'Tab':\n // Leaving the panel closes it and returns to its entry.\n if ((!event.shiftKey && index === links.length - 1) || (event.shiftKey && index <= 0)) {\n event.preventDefault();\n this.closeFlyout(true);\n }\n break;\n }\n }\n\n protected onDocumentClick(event: Event): void {\n const target = event.target as Node;\n if (\n this.flyoutItem() &&\n !this.flyoutRef()?.nativeElement.contains(target) &&\n !this.flyoutAnchor?.contains(target)\n ) {\n this.closeFlyout();\n }\n }\n\n protected hrefOf(\n route: SirioDashboardRoute,\n queryParams?: SirioDashboardMenuItem['queryParams'],\n ): string {\n return this.locationStrategy.prepareExternalUrl(\n this.router.serializeUrl(this.treeOf(route, queryParams)),\n );\n }\n\n // ---- Helpers ----\n\n private treeOf(\n route: SirioDashboardRoute,\n queryParams?: SirioDashboardMenuItem['queryParams'],\n ): UrlTree {\n if (typeof route === 'string') {\n const tree = this.router.parseUrl(route);\n if (queryParams) {\n tree.queryParams = { ...tree.queryParams, ...queryParams };\n }\n return tree;\n }\n return this.router.createUrlTree([...route], { queryParams });\n }\n\n private segments(tree: UrlTree): string[] {\n return tree.root.children[PRIMARY_OUTLET]?.segments.map((s) => s.path) ?? [];\n }\n\n /**\n * How well an entry matches the current URL: 0 = no match; otherwise the more path segments the\n * better (the most specific entry wins). Entries match their child URLs too, unless `exact`; the\n * root route (`/`) matches only exactly. `queryParams` of the entry must all be present.\n */\n private matchScore(item: SirioDashboardMenuItem, url: UrlTree, current: string[]): number {\n if (item.route === undefined || item.disabled) {\n return 0;\n }\n const target = this.segments(this.treeOf(item.route));\n const exact = item.exact || target.length === 0;\n if (exact ? target.length !== current.length : target.length > current.length) {\n return 0;\n }\n if (target.some((segment, i) => segment !== current[i])) {\n return 0;\n }\n const params = item.queryParams ?? {};\n if (Object.keys(params).some((key) => String(params[key]) !== String(url.queryParams[key]))) {\n return 0;\n }\n // Longer paths first; at equal path, the exact URL and then the entries with query params.\n return (\n 1 +\n target.length * 100 +\n (target.length === current.length ? 50 : 0) +\n Object.keys(params).length\n );\n }\n\n private flyoutLinks(): HTMLElement[] {\n const panel = this.flyoutRef()?.nativeElement;\n return panel\n ? Array.from(\n panel.querySelectorAll<HTMLElement>('.sirio-dropdown-item:not(:disabled):not(.disabled)'),\n )\n : [];\n }\n\n /**\n * Breadcrumb in the top bar (`toolbar`): it goes back to its own bar when the top bar items do not\n * fit, and returns when there is room again. New breadcrumb items or settings try the top bar first.\n */\n private watchToolbarRoom(): void {\n let lastKey = '';\n effect(() => {\n const key = [\n this.breadcrumbPosition(),\n this.wide(),\n ...this.breadcrumbItems().map((item) => `${item.icon ?? ''}|${item.label}`),\n ].join('\\n');\n if (key !== lastKey) {\n lastKey = key;\n untracked(() => this.toolbarCrumbFits.set(true));\n }\n });\n if (typeof ResizeObserver === 'undefined') {\n return;\n }\n const observer = new ResizeObserver(() => this.checkToolbarRoom());\n afterNextRender(() => observer.observe(this.topbarRef().nativeElement));\n // The breadcrumb width changes too (e.g. when the kit path is shortened).\n let observed: HTMLElement | null = null;\n effect(() => {\n const crumb = this.toolbarCrumbRef()?.nativeElement ?? null;\n untracked(() => {\n if (observed) {\n observer.unobserve(observed);\n }\n observed = crumb;\n if (crumb) {\n observer.observe(crumb);\n }\n });\n });\n this.destroyRef.onDestroy(() => observer.disconnect());\n }\n\n private checkToolbarRoom(): void {\n if (this.breadcrumbPosition() !== 'toolbar' || !this.wide()) {\n return;\n }\n const bar = this.topbarRef().nativeElement;\n const crumb = this.toolbarCrumbRef()?.nativeElement ?? null;\n const style = getComputedStyle(bar);\n const gap = parseFloat(style.columnGap) || 0;\n const available =\n bar.clientWidth - (parseFloat(style.paddingLeft) || 0) - (parseFloat(style.paddingRight) || 0);\n // Natural width of the other items: the toolbar area grows, so its content is measured.\n const area = this.toolbarAreaRef().nativeElement;\n const others = Array.from(bar.children) as HTMLElement[];\n let used = 0;\n let count = 0;\n for (const child of others) {\n if (child === crumb) {\n continue;\n }\n count++;\n used +=\n child === area\n ? Array.from(area.children).reduce((w, el) => w + el.getBoundingClientRect().width, 0)\n : Math.max(child.scrollWidth, child.getBoundingClientRect().width);\n }\n if (crumb) {\n this.toolbarCrumbWidth = crumb.scrollWidth;\n }\n const needed = used + gap * count + this.toolbarCrumbWidth;\n const fits = needed <= available + 1;\n if (fits !== this.toolbarCrumbFits()) {\n this.toolbarCrumbFits.set(fits);\n }\n }\n\n private watchMedia(query: string, apply: (matches: boolean) => void): void {\n const view = this.document.defaultView;\n const media = view?.matchMedia ? view.matchMedia(query) : null;\n if (!media) {\n return;\n }\n apply(media.matches);\n const onChange = (event: MediaQueryListEvent) => apply(event.matches);\n media.addEventListener('change', onChange);\n this.destroyRef.onDestroy(() => media.removeEventListener('change', onChange));\n }\n\n private trapFocus(event: KeyboardEvent, container: HTMLElement): void {\n const focusable = Array.from(container.querySelectorAll<HTMLElement>(FOCUSABLE)).filter(\n (el) => !el.closest('[data-sirio-visible=\"false\"]'),\n );\n if (!focusable.length) {\n return;\n }\n const first = focusable[0];\n const last = focusable[focusable.length - 1];\n const active = this.document.activeElement;\n if (event.shiftKey && (active === first || active === container)) {\n event.preventDefault();\n last.focus();\n } else if (!event.shiftKey && active === last) {\n event.preventDefault();\n first.focus();\n }\n }\n\n private lockScroll(): void {\n const body = this.document.body;\n this.bodyOverflow = body.style.overflow;\n body.style.overflow = 'hidden';\n }\n\n private unlockScroll(): void {\n if (this.bodyOverflow !== null) {\n this.document.body.style.overflow = this.bodyOverflow;\n this.bodyOverflow = null;\n }\n }\n}\n\n/** Dashboard and its content slots, for `imports: [SIRIO_DASHBOARD_COMPONENTS]`. */\nexport const SIRIO_DASHBOARD_COMPONENTS = [\n SirioDashboard,\n SirioDashboardLogo,\n SirioDashboardToolbar,\n SirioDashboardUserPanel,\n SirioDashboardSidebarFooter,\n] as const;\n","<a class=\"sr-only sr-only-focusable sirio-dashboard-skip\" [attr.href]=\"'#' + contentId\">{{ skipLinkLabel() }}</a>\n\n<!-- Logo of the application: in its cell over the menu (desktop) or in the top bar (small screens). -->\n<ng-template #logoContent>\n @if (customLogo()) {\n <ng-content select=\"[wmSirioDashboardLogo]\" />\n } @else {\n @let src = iconsOnly() ? logoCollapsed() : logo();\n @if (logoRoute() !== null) {\n <a class=\"sirio-dashboard-logo-link\" [routerLink]=\"$any(logoRoute())\" [attr.title]=\"iconsOnly() ? appTitle() || null : null\">\n <ng-container [ngTemplateOutlet]=\"logoInner\" [ngTemplateOutletContext]=\"{ src }\" />\n </a>\n } @else {\n <span class=\"sirio-dashboard-logo-link\">\n <ng-container [ngTemplateOutlet]=\"logoInner\" [ngTemplateOutletContext]=\"{ src }\" />\n </span>\n }\n }\n</ng-template>\n<ng-template #logoInner let-src=\"src\">\n @if (src) {\n <img class=\"sirio-dashboard-logo-img\" [src]=\"src\" [alt]=\"logoAlt() ?? (appTitle() && !iconsOnly() ? '' : appTitle())\" />\n }\n @if (appTitle() && !(src && iconsOnly())) {\n <span class=\"sirio-dashboard-app-title\">{{ iconsOnly() ? appTitle().slice(0, 1) : appTitle() }}</span>\n }\n</ng-template>\n\n@if (desktop()) {\n <div class=\"sirio-dashboard-brand\">\n <ng-container [ngTemplateOutlet]=\"logoContent\" />\n </div>\n}\n\n<!-- Top bar -->\n<header\n #topbar\n class=\"sirio-dashboard-topbar\"\n [class.sirio-bg-primary-dark-115]=\"theme() === 'dark'\"\n [class.sirio-text-white]=\"theme() === 'dark'\"\n [class.sirio-bg-white]=\"theme() === 'light'\"\n>\n @if (!desktop() || collapsible()) {\n <button\n #menuToggle\n type=\"button\"\n [attr.class]=\"toggleClasses() + ' sirio-dashboard-menu-toggle'\"\n [attr.aria-controls]=\"sidebarId\"\n [attr.aria-expanded]=\"desktop() ? !collapsed() : menuOpen()\"\n [attr.aria-label]=\"desktop() ? (collapsed() ? expandLabel() : collapseLabel()) : openMenuLabel()\"\n [attr.title]=\"desktop() ? (collapsed() ? expandLabel() : collapseLabel()) : openMenuLabel()\"\n (click)=\"toggleMenu()\"\n >\n <span class=\"fas fa-bars\" aria-hidden=\"true\"></span>\n </button>\n }\n @if (!desktop()) {\n <div class=\"sirio-dashboard-brand-inline\">\n <ng-container [ngTemplateOutlet]=\"logoContent\" />\n </div>\n }\n\n @if (breadcrumbInToolbar() && showBreadcrumb() && breadcrumbView().length) {\n <div #toolbarCrumb class=\"sirio-dashboard-breadcrumb-toolbar\">\n <wm-sirio-breadcrumb\n [items]=\"breadcrumbView()\"\n [dark]=\"theme() === 'dark'\"\n (itemClick)=\"onBreadcrumbClick($event)\"\n />\n </div>\n }\n\n <div #toolbarArea class=\"sirio-dashboard-toolbar-area\">\n <ng-content select=\"[wmSirioDashboardToolbar]\" />\n </div>\n\n @if (allCommands().length) {\n <div class=\"sirio-dashboard-commands\" role=\"group\" [attr.aria-label]=\"commandsLabel()\">\n @if (wide()) {\n @for (command of allCommands(); track $index) {\n @if (command.items?.length) {\n <wm-sirio-dropdown\n [label]=\"command.label\"\n [icon]=\"command.icon ?? null\"\n [iconOnly]=\"!!command.iconOnly\"\n [variant]=\"variantOf(command)\"\n size=\"medium\"\n align=\"right\"\n [items]=\"command.items!\"\n [disabled]=\"!!command.disabled\"\n (itemSelect)=\"runCommand(command, $event.event, $event.item)\"\n />\n } @else {\n <button\n type=\"button\"\n [attr.class]=\"commandClasses(command)\"\n [disabled]=\"command.disabled\"\n [attr.aria-label]=\"command.iconOnly ? command.label : null\"\n [attr.title]=\"command.iconOnly ? command.label : null\"\n (click)=\"runCommand(command, $event)\"\n >\n @if (command.iconOnly && command.icon) {\n <span [attr.class]=\"iconClasses(command.icon)\" aria-hidden=\"true\"></span>\n } @else {\n @if (command.icon) {\n <span [attr.class]=\"iconClasses(command.icon)\" aria-hidden=\"true\"></span>\n }\n {{ command.label }}\n }\n </button>\n }\n }\n } @else {\n <wm-sirio-dropdown\n [label]=\"commandsLabel()\"\n icon=\"fa-ellipsis-v\"\n iconOnly\n [variant]=\"theme() === 'dark' ? 'tertiary-light' : 'tertiary'\"\n size=\"medium\"\n align=\"right\"\n [items]=\"compactItems()\"\n (itemSelect)=\"onCompactSelect($event)\"\n />\n }\n </div>\n }\n\n @if (user(); as u) {\n <wm-sirio-dashboard-user\n [user]=\"u\"\n [actions]=\"userActions()\"\n [theme]=\"theme()\"\n [panelLabel]=\"userPanelLabel()\"\n [(open)]=\"userPanelOpen\"\n (action)=\"userAction.emit($event)\"\n >\n <ng-content select=\"[wmSirioDashboardUserPanel]\" ngProjectAs=\"[wmSirioDashboardUserPanel]\" />\n </wm-sirio-dashboard-user>\n }\n</header>\n\n<!-- Side menu -->\n@if (mobileMenu()) {\n <div class=\"sirio-dashboard-backdrop\" aria-hidden=\"true\" (click)=\"closeMenu()\"></div>\n}\n<aside\n #sidebar\n class=\"sirio-dashboard-sidebar sirio-bg-white\"\n tabindex=\"-1\"\n [id]=\"sidebarId\"\n [attr.role]=\"mobileMenu() ? 'dialog' : null\"\n [attr.aria-modal]=\"mobileMenu() || null\"\n [attr.aria-label]=\"mobileMenu() ? menuLabel() : null\"\n [attr.inert]=\"!desktop() && !menuOpen() ? '' : null\"\n (keydown)=\"onSidebarKeydown($event)\"\n>\n @if (!desktop()) {\n <div class=\"sirio-dashboard-sidebar-header\">\n <span class=\"sirio-dashboard-app-title\">{{ appTitle() }}</span>\n <button\n type=\"button\"\n class=\"sirio-btn sirio-btn-icon\"\n [attr.aria-label]=\"closeMenuLabel()\"\n [attr.title]=\"closeMenuLabel()\"\n (click)=\"closeMenu(true)\"\n >\n <span class=\"fas fa-times\" aria-hidden=\"true\"></span>\n </button>\n </div>\n }\n <nav class=\"sirio-dashboard-nav\" [attr.aria-label]=\"menuLabel()\">\n <ul class=\"sirio-nav sirio-nav-side\">\n @for (item of mainMenu(); track $index) {\n <li wmSirioDashboardMenuNode [item]=\"item\" [level]=\"1\"></li>\n }\n </ul>\n @for (section of pageMenu(); track $index) {\n <div class=\"sirio-dashboard-section\">\n @if (section.title) {\n <h2 class=\"sirio-dashboard-section-title\" [class.sr-only]=\"iconsOnly()\">{{ section.title }}</h2>\n }\n <ul class=\"sirio-nav sirio-nav-side\" [attr.aria-label]=\"section.title || null\">\n @for (item of section.items; track $index) {\n <li wmSirioDashboardMenuNode [item]=\"item\" [level]=\"1\"></li>\n }\n </ul>\n </div>\n }\n </nav>\n @if (sidebarFooter() && !iconsOnly()) {\n <div class=\"sirio-dashboard-sidebar-footer\">\n <ng-content select=\"[wmSirioDashboardSidebarFooter]\" />\n </div>\n }\n</aside>\n\n<!-- Breadcrumb and routed content -->\n<div class=\"sirio-dashboard-main\">\n @if (!breadcrumbInToolbar() && showBreadcrumb() && breadcrumbView().length) {\n <div class=\"sirio-dashboard-breadcrumb\">\n <wm-sirio-breadcrumb [items]=\"breadcrumbView()\" (itemClick)=\"onBreadcrumbClick($event)\" />\n </div>\n }\n <main #content class=\"sirio-dashboard-content\" tabindex=\"-1\" [id]=\"contentId\">\n <router-outlet (activate)=\"onActivate($event)\" (deactivate)=\"onDeactivate()\" />\n </main>\n</div>\n\n<!-- Floating submenu of a collapsed entry -->\n@if (flyoutItem(); as group) {\n <div\n #flyout\n class=\"sirio-dropdown sirio-dashboard-flyout\"\n [style.top.px]=\"flyoutTop()\"\n [style.left.px]=\"flyoutLeft()\"\n (keydown)=\"onFlyoutKeydown($event)\"\n >\n <div class=\"sirio-dropdown-menu\" data-sirio-visible=\"true\" [id]=\"flyoutId\" role=\"region\" [attr.aria-label]=\"submenuLabel() + ' ' + group.label\">\n <p class=\"sirio-dashboard-flyout-title\" aria-hidden=\"true\">{{ group.label }}</p>\n <ul>\n @for (entry of flyoutEntries(); track $index) {\n <li [style.--sirio-dashboard-depth]=\"entry.depth\">\n @if (entry.group) {\n <span class=\"sirio-dashboard-flyout-group\">{{ entry.item.label }}</span>\n } @else if (entry.item.route && !entry.item.disabled) {\n <a\n class=\"sirio-dropdown-item\"\n [class.active]=\"activeItems().has(entry.item)\"\n [routerLink]=\"$any(entry.item.route)\"\n [queryParams]=\"entry.item.queryParams\"\n [queryParamsHandling]=\"entry.item.queryParamsHandling\"\n [fragment]=\"entry.item.fragment\"\n [attr.aria-current]=\"activeItems().has(entry.item) ? 'page' : null\"\n (click)=\"menuSelect(entry.item, $event)\"\n >{{ entry.item.label }}</a\n >\n } @else if (entry.item.href && !entry.item.disabled) {\n <a\n class=\"sirio-dropdown-item\"\n [attr.href]=\"entry.item.href\"\n [attr.target]=\"entry.item.target ?? null\"\n (click)=\"menuSelect(entry.item, $event)\"\n >{{ entry.item.label }}</a\n >\n } @else {\n <button\n type=\"button\"\n class=\"sirio-dropdown-item\"\n [disabled]=\"entry.item.disabled\"\n (click)=\"menuSelect(entry.item, $event)\"\n >{{ entry.item.label }}</button>\n }\n </li>\n }\n </ul>\n </div>\n </div>\n}\n","import {\r\n ApplicationRef,\r\n ChangeDetectionStrategy,\r\n Component,\r\n createComponent,\r\n EnvironmentInjector,\r\n inject,\r\n Injectable,\r\n Injector,\r\n input,\r\n signal,\r\n Type,\r\n} from '@angular/core';\r\nimport { DOCUMENT } from '@angular/common';\r\nimport { SirioButton } from '../button/sirio-button';\r\nimport { SirioDialog, SirioDialogClose, SirioDialogFooter, SirioDialogTone } from './sirio-dialog';\r\nimport { SirioDialogRef } from './sirio-dialog-ref';\r\n\r\n/** Options of a confirmation dialog (kit examples \"Conferma\", \"Avvertimento\", \"Pericolo\"). */\r\nexport interface SirioConfirmOptions {\r\n title: string;\r\n /** Text of the body. */\r\n message?: string;\r\n confirmLabel?: string;\r\n /** Label of the cancel button; null = only the confirm button (kit \"Conferma\"). */\r\n cancelLabel?: string | null;\r\n /** Icon color; `danger` also makes the confirm button `sirio-btn-danger` (kit \"Pericolo\"). */\r\n tone?: SirioDialogTone;\r\n icon?: string | null;\r\n}\r\n\r\n/** Options of `SirioDialogService.open()`. */\r\nexport interface SirioDialogOpenOptions {\r\n /** Inputs of the opened component (`componentRef.setInput`). */\r\n inputs?: Record<string, unknown>;\r\n /**\r\n * Parent injector of the opened component (default: the root injector), e.g. the injector of the\r\n * component opening the dialog, to share its providers.\r\n */\r\n injector?: Injector;\r\n}\r\n\r\n/** @internal Confirmation dialog created by SirioDialogService. */\r\n@Component({\r\n selector: 'wm-sirio-confirm-dialog',\r\n imports: [SirioDialog, SirioDialogFooter, SirioDialogClose, SirioButton],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n templateUrl: './sirio-confirm-dialog.html',\r\n})\r\nexport class SirioConfirmDialog {\r\n readonly options = input.required<SirioConfirmOptions>();\r\n}\r\n\r\n/**\r\n * Opens kit dialogs from code, without a template.\r\n *\r\n * `open()` creates a component in the page body: its first `<wm-sirio-dialog>` opens by itself and is bound\r\n * to the returned `SirioDialogRef` (also injectable in the component). Dialogs opened while another one is\r\n * open stack on top of it; each one gives the focus back when it closes.\r\n *\r\n * ```ts\r\n * private readonly dialogs = inject(SirioDialogService);\r\n * const ref = this.dialogs.open(EditDialog, { inputs: { item } });\r\n * const result = await ref.closed;\r\n * if (await this.dialogs.confirm({ title: 'Vuoi eliminare il tuo account?', tone: 'danger',\r\n * confirmLabel: 'Elimina' })) { ... }\r\n * ```\r\n */\r\n@Injectable({ providedIn: 'root' })\r\nexport class SirioDialogService {\r\n private readonly appRef = inject(ApplicationRef);\r\n private readonly environmentInjector = inject(EnvironmentInjector);\r\n private readonly document = inject(DOCUMENT);\r\n private readonly stack = signal<readonly SirioDialogRef<any, any>[]>([]);\r\n\r\n /** Dialogs opened by the service and still open, from the bottom to the top one. */\r\n readonly openDialogs = this.stack.asReadonly();\r\n\r\n /** Opens `component` in a dialog (see the class description). */\r\n open<C, R = unknown>(component: Type<C>, options: SirioDialogOpenOptions = {}): SirioDialogRef<R, C> {\r\n const parent = options.injector ?? this.environmentInjector;\r\n const ref = new SirioDialogRef<R, C>((closed) => this.remove(closed));\r\n const elementInjector = Injector.create({\r\n providers: [{ provide: SirioDialogRef, useValue: ref }],\r\n parent,\r\n });\r\n const componentRef = createComponent(component, {\r\n environmentInjector: parent.get(EnvironmentInjector, this.environmentInjector),\r\n elementInjector,\r\n });\r\n ref.componentRef = componentRef;\r\n for (const [name, value] of Object.entries(options.inputs ?? {})) {\r\n componentRef.setInput(name, value);\r\n }\r\n this.stack.update((stack) => [...stack, ref]);\r\n this.appRef.attachView(componentRef.hostView);\r\n this.document.body.appendChild(componentRef.location.nativeElement);\r\n return ref;\r\n }\r\n\r\n /** Closes the top dialog (the last one opened) with an optional result. */\r\n closeTop(result?: unknown): void {\r\n this.stack().at(-1)?.close(result);\r\n }\r\n\r\n /** Closes all the dialogs opened by the service, from the top one. */\r\n closeAll(): void {\r\n for (const ref of [...this.stack()].reverse()) {\r\n ref.close();\r\n }\r\n }\r\n\r\n /** Confirmation dialog: resolves true with the confirm button, false otherwise (Esc, X, cancel). */\r\n confirm(options: SirioConfirmOptions): Promise<boolean> {\r\n return this.open(SirioConfirmDialog, { inputs: { options } }).closed.then((result) => result === true);\r\n }\r\n\r\n private remove(ref: SirioDialogRef<any, any>): void {\r\n this.stack.update((stack) => stack.filter((r) => r !== ref));\r\n const componentRef = ref.componentRef;\r\n if (componentRef) {\r\n // Leave the time to restore the focus before removing the dialog.\r\n queueMicrotask(() => {\r\n this.appRef.detachView(componentRef.hostView);\r\n componentRef.destroy();\r\n });\r\n }\r\n }\r\n}\r\n","<wm-sirio-dialog\r\n alert\r\n [title]=\"options().title\"\r\n [tone]=\"options().tone ?? 'default'\"\r\n [icon]=\"options().icon === undefined ? 'fa-exclamation-circle' : options().icon!\"\r\n>\r\n @if (options().message) {\r\n <p>{{ options().message }}</p>\r\n }\r\n <div wmSirioDialogFooter>\r\n @if (options().cancelLabel !== null) {\r\n <button\r\n type=\"button\"\r\n [wmSirioButton]=\"options().tone === 'default' || !options().tone ? 'secondary' : 'ghost'\"\r\n [wmSirioDialogClose]=\"false\"\r\n >\r\n {{ options().cancelLabel ?? 'Annulla' }}\r\n </button>\r\n }\r\n <button\r\n type=\"button\"\r\n [wmSirioButton]=\"options().tone === 'danger' ? 'danger' : 'primary'\"\r\n [wmSirioDialogClose]=\"true\"\r\n >\r\n {{ options().confirmLabel ?? 'Conferma' }}\r\n </button>\r\n </div>\r\n</wm-sirio-dialog>\r\n","import { NgTemplateOutlet } from '@angular/common';\r\nimport {\r\n booleanAttribute,\r\n ChangeDetectionStrategy,\r\n Component,\r\n computed,\r\n ElementRef,\r\n inject,\r\n input,\r\n model,\r\n output,\r\n signal,\r\n} from '@angular/core';\r\nimport { sirioUniqueId } from '../core/sirio-control-base';\r\n\r\n/** States of a step (kit \"Stati degli step\"); `inactive` is the kit default (no class). */\r\nexport type SirioStepState = 'inactive' | 'active' | 'success' | 'warning' | 'error';\r\n\r\n/** A step of the Step Progress Bar. */\r\nexport interface SirioStep {\r\n label: string;\r\n /**\r\n * Explicit state. Default: steps before `current` are `success`, the current one is `active`,\r\n * the following ones `inactive`. The current step is always `active`.\r\n */\r\n state?: Exclude<SirioStepState, 'active'>;\r\n /** Link of the step (kit \"Stepper con link\" uses `<a href>`); without it a button is used. */\r\n href?: string;\r\n /** The step cannot be selected even when `navigable`. */\r\n disabled?: boolean;\r\n /**\r\n * The step can be selected (when `navigable`) also when its state is `inactive`, e.g. a step after\r\n * the current one that the application lets the user reach.\r\n */\r\n selectable?: boolean;\r\n}\r\n\r\n/** Visually hidden texts announcing the state of each step (kit: \"Completato\", \"Step attivo\"...). */\r\nexport type SirioStepStateLabels = Record<SirioStepState, string>;\r\n\r\nexport const SIRIO_STEP_STATE_LABELS: SirioStepStateLabels = {\r\n inactive: 'Non completato',\r\n active: 'Step attivo',\r\n success: 'Completato',\r\n warning: 'Completato con avvisi',\r\n error: 'Con errori',\r\n};\r\n\r\n/**\r\n * Step Progress Bar of the Sirio web kit (\"Step Progress Bar\", `.sirio-stepper`): the steps of a\r\n * process (`ol.sirio-stepper-nav` > `li.sirio-stepper-item` with `is-active` / `is-success` /\r\n * `is-warning` / `is-error`, marker and title). On large screens (≥ 992px) the kit shows the\r\n * horizontal bar; below it shows the title of the current step and a dropdown button\r\n * (\"3 / 7\") that opens the list, as in the kit (responsive version).\r\n *\r\n * - `navigable`: completed steps (and steps with a state) become links/buttons\r\n * (kit \"Stepper con link\", container `nav`); otherwise the bar is static\r\n * (kit \"Stepper statico\", `div role=\"group\"`). As the kit says, changing step is up to the\r\n * application: selecting a step updates `[(current)]` and emits `stepSelected`.\r\n * - The current step has `aria-current=\"step\"`; every step announces its state (sr-only text).\r\n *\r\n * ```html\r\n * <wm-sirio-stepper [steps]=\"steps\" [(current)]=\"step\" navigable />\r\n * ```\r\n */\r\n@Component({\r\n selector: 'wm-sirio-stepper',\r\n imports: [NgTemplateOutlet],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n host: {\r\n '(document:click)': 'onDocumentClick($event)',\r\n '(keydown.escape)': 'closeMenu(true)',\r\n },\r\n styleUrl: './sirio-stepper.scss',\r\n templateUrl: './sirio-stepper.html',\r\n})\r\nexport class SirioStepper {\r\n readonly steps = input<SirioStep[]>([]);\r\n /** Index of the current step (two-way: `[(current)]`). */\r\n readonly current = model(0);\r\n /** Completed steps and steps with a state can be selected (kit \"Stepper con link\"). */\r\n readonly navigable = input(false, { transform: booleanAttribute });\r\n /** Accessible name of the bar (kit: \"Barra di avanzamento\"). */\r\n readonly ariaLabel = input('Barra di avanzamento');\r\n readonly positionLabel = input('Passaggio:');\r\n readonly openLabel = input('Apri la barra di avanzamento');\r\n readonly stateLabels = input<SirioStepStateLabels>(SIRIO_STEP_STATE_LABELS);\r\n /** Emitted when the user selects a step (index). */\r\n readonly stepSelected = output<number>();\r\n\r\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\r\n private readonly baseId = sirioUniqueId('sirio-stepper');\r\n protected readonly buttonId = `${this.baseId}-button`;\r\n protected readonly menuId = `${this.baseId}-menu`;\r\n /** Dropdown of the responsive version (below 992px). */\r\n protected readonly menuOpen = signal(false);\r\n\r\n protected readonly currentIndex = computed(() =>\r\n Math.min(Math.max(this.current(), 0), Math.max(this.steps().length - 1, 0)),\r\n );\r\n protected readonly currentStep = computed(() => this.steps()[this.currentIndex()]);\r\n\r\n /** State of a step: the current one is active, others use their state or the position. */\r\n stateOf(index: number): SirioStepState {\r\n if (index === this.currentIndex()) {\r\n return 'active';\r\n }\r\n const explicit = this.steps()[index]?.state;\r\n if (explicit) {\r\n return explicit;\r\n }\r\n return index < this.currentIndex() ? 'success' : 'inactive';\r\n }\r\n\r\n protected isSelectable(index: number): boolean {\r\n const step = this.steps()[index];\r\n if (!this.navigable() || !step || step.disabled || index === this.currentIndex()) {\r\n return false;\r\n }\r\n return step.selectable === true || this.stateOf(index) !== 'inactive';\r\n }\r\n\r\n protected select(index: number, event: Event): void {\r\n const step = this.steps()[index];\r\n if (!step?.href) {\r\n event.preventDefault();\r\n }\r\n this.current.set(index);\r\n this.stepSelected.emit(index);\r\n this.closeMenu(false);\r\n }\r\n\r\n protected toggleMenu(): void {\r\n this.menuOpen.update((v) => !v);\r\n }\r\n\r\n /** Closes the dropdown of the responsive version (Esc returns the focus to the button). */\r\n closeMenu(focusButton: boolean): void {\r\n if (!this.menuOpen()) {\r\n return;\r\n }\r\n this.menuOpen.set(false);\r\n if (focusButton) {\r\n this.host.querySelector<HTMLButtonElement>(`#${this.buttonId}`)?.focus();\r\n }\r\n }\r\n\r\n protected onDocumentClick(event: Event): void {\r\n if (this.menuOpen() && !this.host.contains(event.target as Node)) {\r\n this.menuOpen.set(false);\r\n }\r\n }\r\n}\r\n","<ng-template #list>\r\n <ol class=\"sirio-stepper-nav\">\r\n @for (step of steps(); track $index; let i = $index) {\r\n @let state = stateOf(i);\r\n <li\r\n class=\"sirio-stepper-item\"\r\n [class.is-active]=\"state === 'active'\"\r\n [class.is-success]=\"state === 'success'\"\r\n [class.is-warning]=\"state === 'warning'\"\r\n [class.is-error]=\"state === 'error'\"\r\n [attr.aria-current]=\"state === 'active' ? 'step' : null\"\r\n >\r\n <ng-template #content>\r\n <span class=\"sr-only\">{{ stateLabels()[state] }}:&#32;</span>\r\n <span class=\"sirio-stepper-marker\"></span>\r\n <span class=\"sirio-stepper-text\">\r\n <span class=\"sirio-stepper-title\">{{ step.label }}</span>\r\n </span>\r\n </ng-template>\r\n @if (isSelectable(i)) {\r\n @if (step.href) {\r\n <a class=\"sirio-stepper-content\" [attr.href]=\"step.href\" (click)=\"select(i, $event)\">\r\n <ng-container [ngTemplateOutlet]=\"content\" />\r\n </a>\r\n } @else {\r\n <button type=\"button\" class=\"sirio-stepper-content\" (click)=\"select(i, $event)\">\r\n <ng-container [ngTemplateOutlet]=\"content\" />\r\n </button>\r\n }\r\n } @else {\r\n <div class=\"sirio-stepper-content\">\r\n <ng-container [ngTemplateOutlet]=\"content\" />\r\n </div>\r\n }\r\n </li>\r\n }\r\n </ol>\r\n</ng-template>\r\n\r\n<div class=\"sirio-stepper\">\r\n <span class=\"sirio-stepper-main-title\">{{ currentStep()?.label }}</span>\r\n <div class=\"sirio-stepper-selector\">\r\n <div class=\"sirio-dropdown\" data-sirio-component=\"dropdown\">\r\n <button\r\n class=\"sirio-btn\"\r\n type=\"button\"\r\n data-sirio-toggle=\"dropdown\"\r\n aria-haspopup=\"true\"\r\n [id]=\"buttonId\"\r\n [attr.aria-controls]=\"menuId\"\r\n [attr.aria-expanded]=\"menuOpen()\"\r\n (click)=\"toggleMenu()\"\r\n >\r\n <!-- Explicit spaces: the accessible name must not glue the parts together. -->\r\n <span class=\"sr-only\">{{ positionLabel() }}&#32;</span>\r\n <span><strong>{{ currentIndex() + 1 }}</strong> / {{ steps().length }}</span>\r\n <span class=\"sr-only\">&#32;{{ openLabel() }}</span>\r\n </button>\r\n <div\r\n class=\"sirio-dropdown-menu\"\r\n [id]=\"menuId\"\r\n [attr.aria-labelledby]=\"buttonId\"\r\n [attr.data-sirio-visible]=\"menuOpen()\"\r\n >\r\n @if (navigable()) {\r\n <nav [attr.aria-label]=\"ariaLabel()\">\r\n <ng-container [ngTemplateOutlet]=\"list\" />\r\n </nav>\r\n } @else {\r\n <div role=\"group\" [attr.aria-label]=\"ariaLabel()\">\r\n <ng-container [ngTemplateOutlet]=\"list\" />\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n","import { NgTemplateOutlet } from '@angular/common';\r\nimport {\r\n afterNextRender,\r\n booleanAttribute,\r\n ChangeDetectionStrategy,\r\n Component,\r\n computed,\r\n contentChild,\r\n contentChildren,\r\n DestroyRef,\r\n Directive,\r\n effect,\r\n ElementRef,\r\n forwardRef,\r\n inject,\r\n Injector,\r\n input,\r\n model,\r\n numberAttribute,\r\n signal,\r\n TemplateRef,\r\n untracked,\r\n viewChild,\r\n} from '@angular/core';\r\nimport { SirioCollapseAnimator, sirioMotionAllowed } from '../core/sirio-collapse-animation';\r\nimport { SirioBadge, sirioBadge } from '../core/sirio-badge';\r\nimport { SirioBadgeTag } from '../tag/sirio-badge-tag';\r\nimport { sirioUniqueId } from '../core/sirio-control-base';\r\nimport { sirioFocusContent } from '../core/sirio-focus';\r\n\r\n/** Heading level of the accordion headers: `null` = `div` (kit example), 2–6 = `h2`…`h6`. */\r\nexport type SirioHeadingLevel = 2 | 3 | 4 | 5 | 6 | null;\r\n\r\nfunction headingLevel(value: unknown): SirioHeadingLevel {\r\n if (value === null || value === undefined || value === '') {\r\n return null;\r\n }\r\n const n = numberAttribute(value);\r\n return n >= 2 && n <= 6 ? (n as SirioHeadingLevel) : null;\r\n}\r\n\r\n/** Custom title of an accordion item: `<ng-template wmSirioAccordionTitle>...</ng-template>`. */\r\n@Directive({ selector: 'ng-template[wmSirioAccordionTitle]' })\r\nexport class SirioAccordionTitle {}\r\n\r\n/**\r\n * Lazy content of an accordion item: created the first time the item is expanded and kept\r\n * afterwards (`<ng-template wmSirioAccordionContent>...</ng-template>`).\r\n */\r\n@Directive({ selector: 'ng-template[wmSirioAccordionContent]' })\r\nexport class SirioAccordionContent {}\r\n\r\n/**\r\n * One item of the Sirio accordion: header (`.sirio-accordion-header` with the\r\n * `button.sirio-accordion-trigger`, `aria-expanded`, `aria-controls`) and body\r\n * (`.sirio-accordion-body[role=region]` > `.sirio-accordion-content`, `data-sirio-visible`),\r\n * with the kit open/close animation (`data-sirio-visible=\"collapsing\"`).\r\n */\r\n@Component({\r\n selector: 'wm-sirio-accordion-item',\r\n imports: [NgTemplateOutlet, SirioBadgeTag],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n host: {\r\n class: 'sirio-accordion-item',\r\n // `title` is an input: drop the native attribute, otherwise the whole component shows a tooltip.\r\n '[attr.title]': 'null',\r\n },\r\n styleUrl: './sirio-accordion-item.scss',\r\n templateUrl: './sirio-accordion-item.html',\r\n})\r\nexport class SirioAccordionItem {\r\n readonly title = input('');\r\n /** Open state (two-way: `[(expanded)]`). */\r\n readonly expanded = model(false);\r\n readonly disabled = input(false, { transform: booleanAttribute });\r\n /** Badge at the end of the header, before the arrow (kit Tag): `{ text, type? }`; null or without text = none. */\r\n readonly badge = input<SirioBadge | null, unknown>(null, { transform: sirioBadge });\r\n /** Heading level of this header; default: the one of the accordion (`div` when not set). */\r\n readonly headingLevel = input<SirioHeadingLevel | undefined, unknown>(undefined, {\r\n transform: (v: unknown) => (v === undefined ? undefined : headingLevel(v)),\r\n });\r\n /** With `focusContent` on the accordion: `false` keeps the focus out of this section. */\r\n readonly focusContent = input(true, { transform: booleanAttribute });\r\n\r\n /** @internal */\r\n readonly accordion = inject<SirioAccordion>(forwardRef(() => SirioAccordion), {\r\n optional: true,\r\n });\r\n protected readonly titleTemplate = contentChild(SirioAccordionTitle, { read: TemplateRef });\r\n protected readonly lazyContent = contentChild(SirioAccordionContent, { read: TemplateRef });\r\n private readonly body = viewChild.required<ElementRef<HTMLElement>>('body');\r\n private readonly injector = inject(Injector);\r\n\r\n private readonly baseId = sirioUniqueId('sirio-accordion');\r\n protected readonly headerId = `${this.baseId}-header`;\r\n protected readonly bodyId = `${this.baseId}-body`;\r\n /** @internal Trigger button (keyboard navigation of the accordion). */\r\n readonly host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\r\n\r\n protected readonly level = computed(() => {\r\n const own = this.headingLevel();\r\n return own !== undefined ? own : (this.accordion?.headingLevel() ?? null);\r\n });\r\n\r\n /** Value of `data-sirio-visible`: 'true', 'false' or 'collapsing' during the animation. */\r\n protected readonly state = signal<'true' | 'false' | 'collapsing'>('false');\r\n /** Lazy content is created at the first expansion and kept. */\r\n protected readonly contentCreated = signal(false);\r\n private readonly animator = new SirioCollapseAnimator(this.injector, (state) => this.state.set(state));\r\n\r\n constructor() {\r\n let first = true;\r\n effect(() => {\r\n const open = this.expanded();\r\n untracked(() => {\r\n if (open) {\r\n this.contentCreated.set(true);\r\n this.accordion?.itemExpanded(this);\r\n if (!first) {\r\n // Opened by the user or by code (not open from the start): `focusContent` of the accordion.\r\n this.accordion?.focusItem(this);\r\n }\r\n }\r\n if (first) {\r\n first = false;\r\n this.state.set(open ? 'true' : 'false');\r\n } else {\r\n this.animate(open);\r\n }\r\n });\r\n });\r\n inject(DestroyRef).onDestroy(() => this.animator.stop());\r\n }\r\n\r\n toggle(): void {\r\n if (!this.disabled()) {\r\n this.expanded.update((v) => !v);\r\n }\r\n }\r\n\r\n /** Content element of the section (`.sirio-accordion-content`), e.g. to move the focus in it. */\r\n contentElement(): HTMLElement | null {\r\n return this.host.querySelector<HTMLElement>('.sirio-accordion-content');\r\n }\r\n\r\n /** @internal */\r\n focusTrigger(): void {\r\n this.host.querySelector<HTMLButtonElement>('.sirio-accordion-trigger')?.focus();\r\n }\r\n\r\n /** @internal */\r\n isFocusable(): boolean {\r\n return !this.disabled();\r\n }\r\n\r\n /** Kit animation: height transition on `data-sirio-visible=\"collapsing\"`. */\r\n private animate(open: boolean): void {\r\n this.animator.run(this.body().nativeElement, open, this.animated());\r\n }\r\n\r\n private animated(): boolean {\r\n if (this.accordion && !this.accordion.animated()) {\r\n return false;\r\n }\r\n return sirioMotionAllowed();\r\n }\r\n}\r\n\r\n/**\r\n * Accordion of the Sirio web kit (\"Accordion\"): `.sirio-accordion` (light, or `dark` →\r\n * `sirio-accordion-dark`) with one `wm-sirio-accordion-item` per section.\r\n *\r\n * - `exclusive`: one item open at a time (kit `data-sirio-parent=\"#group\"`); all can be closed.\r\n * - `headingLevel`: heading tag of the headers (the kit asks to use the correct heading for the\r\n * page structure): 2–6 → `h2`…`h6`, default `div` as in the kit example.\r\n * - Keyboard: Enter/Space toggle (native button); in addition Arrow Up/Down, Home/End move\r\n * between the headers (WAI-ARIA accordion pattern).\r\n * - Sections added or removed (e.g. a dynamic list): when the open section is removed and no other one\r\n * is open, the section taking its place (or the previous one, for the last) opens. With\r\n * `activateAdded` an added section opens (and at the start the first one, when none is open); with\r\n * `focusContent` the focus moves to the first field of a section when it opens.\r\n *\r\n * ```html\r\n * <wm-sirio-accordion exclusive [headingLevel]=\"3\">\r\n * <wm-sirio-accordion-item title=\"Requisiti\" [expanded]=\"true\">...</wm-sirio-accordion-item>\r\n * <wm-sirio-accordion-item title=\"Documenti\">...</wm-sirio-accordion-item>\r\n * </wm-sirio-accordion>\r\n * ```\r\n */\r\n@Component({\r\n selector: 'wm-sirio-accordion',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n styleUrl: './sirio-accordion.scss',\r\n templateUrl: './sirio-accordion.html',\r\n})\r\nexport class SirioAccordion {\r\n /** One item open at a time. */\r\n readonly exclusive = input(false, { transform: booleanAttribute });\r\n /** Dark version (`sirio-accordion-dark`). */\r\n readonly dark = input(false, { transform: booleanAttribute });\r\n readonly headingLevel = input<SirioHeadingLevel, unknown>(null, { transform: headingLevel });\r\n /** Open/close animation of the kit (disabled automatically with prefers-reduced-motion). */\r\n readonly animated = input(true, { transform: booleanAttribute });\r\n /** An added section opens (e.g. the new item of a dynamic list); at the start the first one, when none is open. */\r\n readonly activateAdded = input(false, { transform: booleanAttribute });\r\n /**\r\n * The focus moves to the first field of a section when it opens (click, code, added section); a section\r\n * with `[focusContent]=\"false\"` is excluded.\r\n */\r\n readonly focusContent = input(false, { transform: booleanAttribute });\r\n\r\n /** @internal */\r\n readonly groupId = sirioUniqueId('sirio-accordion-group');\r\n /** The sections, in order. */\r\n readonly items = contentChildren(SirioAccordionItem);\r\n /** Number of sections. */\r\n readonly count = computed(() => this.items().length);\r\n private readonly injector = inject(Injector);\r\n /** Sections of the previous change of the list (null before the first one). */\r\n private previousItems: readonly SirioAccordionItem[] | null = null;\r\n /** First rendering done: the sections created with the component (even by @for / @if) are the initial ones. */\r\n private rendered = false;\r\n\r\n constructor() {\r\n effect(() => {\r\n const items = this.items();\r\n untracked(() => this.itemsChanged(items));\r\n });\r\n afterNextRender(() => (this.rendered = true));\r\n }\r\n\r\n /** Indexes of the open sections. */\r\n readonly expandedIndexes = computed(() =>\r\n this.items()\r\n .map((item, index) => (item.expanded() ? index : -1))\r\n .filter((index) => index >= 0),\r\n );\r\n\r\n /**\r\n * Opens a section (in exclusive mode the others close); `focus` moves the focus on its header.\r\n * Returns false for a missing or disabled section.\r\n */\r\n expand(index: number, focus = false): boolean {\r\n const item = this.items()[index];\r\n if (!item || item.disabled()) {\r\n return false;\r\n }\r\n item.expanded.set(true);\r\n // Exclusive mode now (not in the item effect): several calls in a row leave the last one open.\r\n this.itemExpanded(item);\r\n if (focus) {\r\n item.focusTrigger();\r\n }\r\n return true;\r\n }\r\n\r\n /** Closes a section (false when missing). */\r\n collapse(index: number): boolean {\r\n const item = this.items()[index];\r\n if (!item) {\r\n return false;\r\n }\r\n item.expanded.set(false);\r\n return true;\r\n }\r\n\r\n /** Closes all the sections. */\r\n collapseAll(): void {\r\n this.items().forEach((item) => item.expanded.set(false));\r\n }\r\n\r\n /** Content element of a section (`.sirio-accordion-content`), e.g. to move the focus in it. */\r\n contentElement(index: number): HTMLElement | null {\r\n return this.items()[index]?.contentElement() ?? null;\r\n }\r\n\r\n /** @internal `focusContent`: focus on the first field of the section, once rendered (`initial`: at the start). */\r\n focusItem(item: SirioAccordionItem, initial = false): void {\r\n if (this.focusContent() && item.focusContent()) {\r\n sirioFocusContent(() => (this.items().includes(item) ? item.contentElement() : null), this.injector, {\r\n initial,\r\n });\r\n }\r\n }\r\n\r\n /** The list of sections changed (first content, added or removed sections). */\r\n private itemsChanged(items: readonly SirioAccordionItem[]): void {\r\n const previous = this.previousItems;\r\n this.previousItems = items;\r\n if (!items.length) {\r\n return;\r\n }\r\n if (previous === null || !this.rendered) {\r\n if (this.activateAdded() && !items.some((i) => i.expanded())) {\r\n this.open(0, true);\r\n }\r\n return;\r\n }\r\n const added = items.filter((i) => !previous.includes(i));\r\n if (this.activateAdded() && added.length && this.open(items.indexOf(added[added.length - 1]))) {\r\n return;\r\n }\r\n // The open section was removed and none is open: the one taking its place, or the previous one.\r\n const removedOpen = previous.find((i) => !items.includes(i) && i.expanded());\r\n if (removedOpen && !items.some((i) => i.expanded())) {\r\n const start = Math.min(previous.indexOf(removedOpen), items.length - 1);\r\n const order = [start, ...items.map((_, i) => start - 1 - i), ...items.map((_, i) => start + 1 + i)];\r\n const target = order.find((i) => i >= 0 && i < items.length && !items[i].disabled());\r\n if (target !== undefined) {\r\n this.open(target);\r\n }\r\n }\r\n }\r\n\r\n /** Opens a section after a change of the list, with the focus in it (`focusContent`). */\r\n private open(index: number, initial = false): boolean {\r\n if (!this.expand(index)) {\r\n return false;\r\n }\r\n this.focusItem(this.items()[index], initial);\r\n return true;\r\n }\r\n\r\n /** @internal Closes the other items in exclusive mode. */\r\n itemExpanded(item: SirioAccordionItem): void {\r\n if (!this.exclusive()) {\r\n return;\r\n }\r\n for (const other of this.items()) {\r\n if (other !== item && other.expanded()) {\r\n other.expanded.set(false);\r\n }\r\n }\r\n }\r\n\r\n protected onKeydown(event: KeyboardEvent): void {\r\n const target = event.target as HTMLElement;\r\n // Nested accordions: the inner one already handled the key.\r\n if (event.defaultPrevented || !target.classList.contains('sirio-accordion-trigger')) {\r\n return;\r\n }\r\n const items = this.items().filter((i) => i.isFocusable());\r\n const current = items.findIndex((i) => i.host.contains(target));\r\n if (current < 0) {\r\n return;\r\n }\r\n let next: number;\r\n switch (event.key) {\r\n case 'ArrowDown':\r\n next = (current + 1) % items.length;\r\n break;\r\n case 'ArrowUp':\r\n next = (current - 1 + items.length) % items.length;\r\n break;\r\n case 'Home':\r\n next = 0;\r\n break;\r\n case 'End':\r\n next = items.length - 1;\r\n break;\r\n default:\r\n return;\r\n }\r\n event.preventDefault();\r\n items[next].focusTrigger();\r\n }\r\n}\r\n\r\n/** Accordion components, for `imports: [SIRIO_ACCORDION]`. */\r\nexport const SIRIO_ACCORDION = [\r\n SirioAccordion,\r\n SirioAccordionItem,\r\n SirioAccordionTitle,\r\n SirioAccordionContent,\r\n] as const;\r\n","<ng-template #trigger>\r\n <button\r\n type=\"button\"\r\n class=\"sirio-accordion-trigger\"\r\n data-sirio-toggle=\"collapse\"\r\n [attr.data-sirio-target]=\"'#' + bodyId\"\r\n [attr.aria-expanded]=\"expanded()\"\r\n [attr.aria-controls]=\"bodyId\"\r\n [disabled]=\"disabled()\"\r\n (click)=\"toggle()\"\r\n >\r\n <span>\r\n @if (titleTemplate(); as custom) {\r\n <ng-container [ngTemplateOutlet]=\"custom\" />\r\n } @else {\r\n {{ title() }}\r\n }\r\n </span>\r\n @if (badge(); as b) {\r\n <!-- small, not span: the kit underlines and colors the spans of the focused trigger. -->\r\n <small class=\"sirio-accordion-badge\" [wmSirioBadge]=\"b\"></small>\r\n }\r\n </button>\r\n</ng-template>\r\n@switch (level()) {\r\n @case (2) {\r\n <h2 class=\"sirio-accordion-header\" [id]=\"headerId\"><ng-container [ngTemplateOutlet]=\"trigger\" /></h2>\r\n }\r\n @case (3) {\r\n <h3 class=\"sirio-accordion-header\" [id]=\"headerId\"><ng-container [ngTemplateOutlet]=\"trigger\" /></h3>\r\n }\r\n @case (4) {\r\n <h4 class=\"sirio-accordion-header\" [id]=\"headerId\"><ng-container [ngTemplateOutlet]=\"trigger\" /></h4>\r\n }\r\n @case (5) {\r\n <h5 class=\"sirio-accordion-header\" [id]=\"headerId\"><ng-container [ngTemplateOutlet]=\"trigger\" /></h5>\r\n }\r\n @case (6) {\r\n <h6 class=\"sirio-accordion-header\" [id]=\"headerId\"><ng-container [ngTemplateOutlet]=\"trigger\" /></h6>\r\n }\r\n @default {\r\n <div class=\"sirio-accordion-header\" [id]=\"headerId\"><ng-container [ngTemplateOutlet]=\"trigger\" /></div>\r\n }\r\n}\r\n<div\r\n #body\r\n class=\"sirio-accordion-body\"\r\n role=\"region\"\r\n [id]=\"bodyId\"\r\n [attr.aria-labelledby]=\"headerId\"\r\n [attr.data-sirio-parent]=\"accordion?.exclusive() ? '#' + accordion!.groupId : null\"\r\n [attr.data-sirio-visible]=\"state()\"\r\n>\r\n <div class=\"sirio-accordion-content\">\r\n @if (lazyContent(); as lazy) {\r\n @if (contentCreated()) {\r\n <ng-container [ngTemplateOutlet]=\"lazy\" />\r\n }\r\n } @else {\r\n <ng-content />\r\n }\r\n </div>\r\n</div>\r\n","<div\r\n class=\"sirio-accordion\"\r\n data-sirio-component=\"accordion\"\r\n [id]=\"groupId\"\r\n [class.sirio-accordion-dark]=\"dark()\"\r\n (keydown)=\"onKeydown($event)\"\r\n>\r\n <ng-content />\r\n</div>\r\n","import { NgTemplateOutlet } from '@angular/common';\r\nimport {\r\n afterNextRender,\r\n booleanAttribute,\r\n ChangeDetectionStrategy,\r\n Component,\r\n computed,\r\n contentChild,\r\n contentChildren,\r\n DestroyRef,\r\n Directive,\r\n effect,\r\n ElementRef,\r\n inject,\r\n Injector,\r\n input,\r\n model,\r\n output,\r\n signal,\r\n TemplateRef,\r\n untracked,\r\n viewChild,\r\n} from '@angular/core';\r\nimport { SirioBadge, sirioBadge } from '../core/sirio-badge';\r\nimport { SirioBadgeTag } from '../tag/sirio-badge-tag';\r\nimport { sirioUniqueId } from '../core/sirio-control-base';\r\nimport { sirioFocusContent } from '../core/sirio-focus';\r\n\r\n/**\r\n * Custom label of a tab (rich content instead of the `label` text):\r\n * `<ng-template wmSirioTabLabel><span class=\"sirio-tag\">Nuovo</span> Messaggi</ng-template>`.\r\n */\r\n@Directive({ selector: 'ng-template[wmSirioTabLabel]' })\r\nexport class SirioTabLabel {}\r\n\r\n/**\r\n * Lazy content of a tab: created when the tab is selected and destroyed when another tab is\r\n * selected (`<ng-template wmSirioTabContent>...</ng-template>`). Without it the projected content\r\n * of `wm-sirio-tab` is created once and kept, as in the kit (hidden panels).\r\n */\r\n@Directive({ selector: 'ng-template[wmSirioTabContent]' })\r\nexport class SirioTabContent {}\r\n\r\n/**\r\n * One tab of `wm-sirio-tabs`: label (text or `wmSirioTabLabel` template), optional Font Awesome icon,\r\n * disabled state and content (projected, or lazy with `wmSirioTabContent`).\r\n */\r\n@Component({\r\n selector: 'wm-sirio-tab',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n templateUrl: './sirio-tab.html',\r\n})\r\nexport class SirioTab {\r\n readonly label = input('');\r\n /** Font Awesome icon before the label (`fa-file`, or the full classes `fas fa-file`). */\r\n readonly icon = input<string | null>(null);\r\n readonly disabled = input(false, { transform: booleanAttribute });\r\n /** Badge after the label (kit Tag): `{ text, type? }`; null or without text = none. */\r\n readonly badge = input<SirioBadge | null, unknown>(null, { transform: sirioBadge });\r\n /** With `focusContent` on the tabs: `false` keeps the focus out of this panel. */\r\n readonly focusContent = input(true, { transform: booleanAttribute });\r\n\r\n /** @internal */\r\n readonly content = viewChild.required<TemplateRef<unknown>>('content');\r\n /** @internal */\r\n readonly labelTemplate = contentChild(SirioTabLabel, { read: TemplateRef });\r\n /** @internal */\r\n readonly lazyContent = contentChild(SirioTabContent, { read: TemplateRef });\r\n\r\n /** @internal */\r\n readonly iconClasses = computed(() => {\r\n const icon = (this.icon() ?? '').trim();\r\n return icon.includes(' ') ? icon : `fas ${icon}`;\r\n });\r\n}\r\n\r\n/** What selected a tab (`tabChange`). */\r\nexport type SirioTabChangeTrigger = 'click' | 'keyboard' | 'control' | 'api';\r\n\r\n/** Selection of a tab by the user or by code (`select`, `selectNext`, `selectPrevious`). */\r\nexport interface SirioTabChangeEvent {\r\n index: number;\r\n previousIndex: number;\r\n trigger: SirioTabChangeTrigger;\r\n}\r\n\r\n/** Width of the scroll controls (kit: `.sirio-tab-scroll .sirio-tab-nav { margin: 0 48px }`). */\r\nconst SCROLL_CONTROLS_WIDTH = 96;\r\n\r\n/**\r\n * Tab of the Sirio web kit (\"Tab\"): `.sirio-tab` with the tab list (`ul.sirio-tab-nav`,\r\n * `role=\"tablist\"`, one `a[role=tab]` per tab) and the panels (`.sirio-tab-content` >\r\n * `.sirio-tab-item[role=tabpanel]` > `.sirio-tab-body`), in the four kit layouts:\r\n * container or line (`line`, `sirio-tab-nav-line`), horizontal or vertical (`vertical`,\r\n * `sirio-tab-vertical`).\r\n *\r\n * Behaviour of the kit script (SirioTab) reproduced in Angular:\r\n * - click or arrow keys select the tab (automatic activation), skipping the disabled ones;\r\n * Home / End go to the first / last tab; only the selected tab is in the tab order;\r\n * - horizontal tabs wider than the container get `sirio-tab-scroll`, which shows the\r\n * \"Scorri a sinistra / destra\" buttons: they select the previous / next tab and are disabled\r\n * at the ends; the selected tab is always scrolled into view.\r\n *\r\n * Tabs added or removed (e.g. a dynamic list): the selected tab stays selected; when it is removed,\r\n * the tab taking its place (or the previous one, for the last tab) is selected. With `activateAdded`\r\n * an added tab is selected; with `focusContent` the focus moves to the first field of the panel shown\r\n * at the start, selected by click / code or added (not with the arrow keys, which move between tabs).\r\n *\r\n * ```html\r\n * <wm-sirio-tabs line [(selectedIndex)]=\"tab\">\r\n * <wm-sirio-tab label=\"Dati anagrafici\">...</wm-sirio-tab>\r\n * <wm-sirio-tab label=\"Documenti\" icon=\"fa-file\">...</wm-sirio-tab>\r\n * <wm-sirio-tab label=\"Storico\" disabled>...</wm-sirio-tab>\r\n * </wm-sirio-tabs>\r\n * ```\r\n */\r\n@Component({\r\n selector: 'wm-sirio-tabs',\r\n imports: [NgTemplateOutlet, SirioBadgeTag],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n styleUrl: './sirio-tabs.scss',\r\n templateUrl: './sirio-tabs.html',\r\n})\r\nexport class SirioTabs {\r\n /** Index of the selected tab (two-way: `[(selectedIndex)]`). */\r\n readonly selectedIndex = model(0);\r\n /** Line layout (`sirio-tab-nav-line`) instead of the container one. */\r\n readonly line = input(false, { transform: booleanAttribute });\r\n /** Vertical layout (`sirio-tab-vertical`, tab list on the left from 768px). */\r\n readonly vertical = input(false, { transform: booleanAttribute });\r\n /** Accessible name of the tab list. */\r\n readonly ariaLabel = input<string | null>(null);\r\n readonly scrollLeftLabel = input('Scorri a sinistra');\r\n readonly scrollRightLabel = input('Scorri a destra');\r\n /**\r\n * Panels in the tab order (`tabindex=\"0\"`, as in the kit). `false` when the panels always contain\r\n * focusable fields: one tab stop less.\r\n */\r\n readonly focusablePanels = input(true, { transform: booleanAttribute });\r\n /** An added tab is selected (e.g. the new item of a dynamic list). */\r\n readonly activateAdded = input(false, { transform: booleanAttribute });\r\n /**\r\n * The focus moves to the first field of the panel shown at the start, selected by click, by the scroll\r\n * controls or by code, or added; not with the arrow keys. A tab with `[focusContent]=\"false\"` is excluded.\r\n */\r\n readonly focusContent = input(false, { transform: booleanAttribute });\r\n\r\n /** A tab was selected (click, arrow keys, scroll controls or code); not emitted for the same tab. */\r\n readonly tabChange = output<SirioTabChangeEvent>();\r\n\r\n protected readonly tabs = contentChildren(SirioTab);\r\n private readonly nav = viewChild<ElementRef<HTMLElement>>('nav');\r\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\r\n private readonly injector = inject(Injector);\r\n private readonly destroyRef = inject(DestroyRef);\r\n private readonly baseId = sirioUniqueId('sirio-tab');\r\n\r\n /** True when the horizontal tabs are wider than the container (kit `sirio-tab-scroll`). */\r\n protected readonly scrollable = signal(false);\r\n\r\n /** Number of tabs. */\r\n readonly count = computed(() => this.tabs().length);\r\n\r\n /** Selected tab actually shown: the requested one, or the first enabled tab (-1 when none). */\r\n readonly activeIndex = computed(() => this.active());\r\n\r\n /** Selected tab actually shown: the requested one, or the first enabled tab. */\r\n protected readonly active = computed(() => {\r\n const tabs = this.tabs();\r\n const requested = this.selectedIndex();\r\n if (tabs[requested] && !tabs[requested].disabled()) {\r\n return requested;\r\n }\r\n const first = tabs.findIndex((t) => !t.disabled());\r\n return first;\r\n });\r\n\r\n /** Tabs of the previous change of the list (null before the first one). */\r\n private previousTabs: readonly SirioTab[] | null = null;\r\n /** First rendering done: the tabs created with the component (even by @for / @if) are the initial ones. */\r\n private rendered = false;\r\n\r\n /** Previous / next enabled tab (`null` at the ends). */\r\n readonly previousIndex = computed(() => this.enabledFrom(this.active(), -1));\r\n readonly nextIndex = computed(() => this.enabledFrom(this.active(), 1));\r\n\r\n constructor() {\r\n // Tabs added or removed: keep the selected tab, or select the one taking its place / the added one.\r\n effect(() => {\r\n const tabs = this.tabs();\r\n untracked(() => this.tabsChanged(tabs));\r\n });\r\n afterNextRender(() => {\r\n this.rendered = true;\r\n const nav = this.nav()?.nativeElement;\r\n if (nav && typeof ResizeObserver !== 'undefined') {\r\n const observer = new ResizeObserver(() => this.updateScrollable());\r\n observer.observe(nav);\r\n this.destroyRef.onDestroy(() => observer.disconnect());\r\n }\r\n this.updateScrollable();\r\n });\r\n // New/removed tabs or a new selection: recheck the overflow, keep the selected tab visible.\r\n effect(() => {\r\n this.tabs();\r\n this.vertical();\r\n const active = this.active();\r\n untracked(() =>\r\n afterNextRender(\r\n () => {\r\n this.updateScrollable();\r\n this.scrollIntoView(active);\r\n },\r\n { injector: this.injector },\r\n ),\r\n );\r\n });\r\n }\r\n\r\n protected tabId(index: number): string {\r\n return `${this.baseId}-label-${index}`;\r\n }\r\n\r\n protected panelId(index: number): string {\r\n return `${this.baseId}-content-${index}`;\r\n }\r\n\r\n /**\r\n * Selects a tab (ignored for missing or disabled tabs); `focus` moves the focus on the tab.\r\n * Returns false when the tab cannot be selected.\r\n */\r\n select(index: number, focus = false, trigger: SirioTabChangeTrigger = 'api'): boolean {\r\n const tab = this.tabs()[index];\r\n if (!tab || tab.disabled()) {\r\n return false;\r\n }\r\n const previous = this.active();\r\n this.selectedIndex.set(index);\r\n if (focus) {\r\n this.host.querySelector<HTMLElement>(`#${this.tabId(index)}`)?.focus();\r\n }\r\n if (index !== previous) {\r\n this.tabChange.emit({ index, previousIndex: previous, trigger });\r\n if (trigger !== 'keyboard') {\r\n this.focusPanel(index);\r\n }\r\n }\r\n return true;\r\n }\r\n\r\n /** Selects the next enabled tab (false at the end). */\r\n selectNext(focus = false): boolean {\r\n const next = this.nextIndex();\r\n return next !== null && this.select(next, focus);\r\n }\r\n\r\n /** Selects the previous enabled tab (false at the start). */\r\n selectPrevious(focus = false): boolean {\r\n const previous = this.previousIndex();\r\n return previous !== null && this.select(previous, focus);\r\n }\r\n\r\n /** Panel element of a tab (default: the selected one), e.g. to move the focus in its content. */\r\n panelElement(index = this.active()): HTMLElement | null {\r\n return index < 0 ? null : this.host.querySelector<HTMLElement>(`#${this.panelId(index)}`);\r\n }\r\n\r\n protected onTabClick(event: Event, index: number): void {\r\n // The href only links tab and panel (kit markup): no navigation.\r\n event.preventDefault();\r\n this.select(index, true, 'click');\r\n }\r\n\r\n /** Kit behaviour: the scroll buttons select the previous / next tab. */\r\n protected selectFromControl(index: number | null): void {\r\n if (index !== null) {\r\n this.select(index, true, 'control');\r\n }\r\n }\r\n\r\n protected onKeydown(event: KeyboardEvent): void {\r\n const vertical = this.vertical();\r\n const current = this.active();\r\n let target: number | null = null;\r\n switch (event.key) {\r\n case vertical ? 'ArrowDown' : 'ArrowRight':\r\n target = this.enabledFrom(current, 1, true);\r\n break;\r\n case vertical ? 'ArrowUp' : 'ArrowLeft':\r\n target = this.enabledFrom(current, -1, true);\r\n break;\r\n case 'Home':\r\n target = this.enabledFrom(-1, 1);\r\n break;\r\n case 'End':\r\n target = this.enabledFrom(this.tabs().length, -1);\r\n break;\r\n default:\r\n return;\r\n }\r\n event.preventDefault();\r\n if (target !== null) {\r\n this.select(target, true, 'keyboard');\r\n }\r\n }\r\n\r\n /** The list of tabs changed (first content, added or removed tabs). */\r\n private tabsChanged(tabs: readonly SirioTab[]): void {\r\n const previous = this.previousTabs;\r\n this.previousTabs = tabs;\r\n // Initial tabs (created with the component, also by @for / @if, or arriving in an empty list without\r\n // activateAdded): focus on the panel shown. With activateAdded, tabs added later to an empty list are added tabs.\r\n if (previous === null || !this.rendered || (!previous.length && !this.activateAdded())) {\r\n if (tabs.length) {\r\n this.focusPanel(this.active(), true);\r\n }\r\n return;\r\n }\r\n // Tab selected before the change (same rule as `active` on the previous list).\r\n const requested = this.selectedIndex();\r\n const oldIndex =\r\n previous[requested] && !previous[requested].disabled() ? requested : previous.findIndex((t) => !t.disabled());\r\n const oldTab = oldIndex >= 0 ? previous[oldIndex] : null;\r\n\r\n const added = tabs.filter((t) => !previous.includes(t));\r\n if (this.activateAdded() && added.length) {\r\n const index = tabs.indexOf(added[added.length - 1]);\r\n if (!tabs[index].disabled()) {\r\n this.activate(index, oldIndex);\r\n return;\r\n }\r\n }\r\n if (!oldTab) {\r\n return;\r\n }\r\n const index = tabs.indexOf(oldTab);\r\n if (index >= 0) {\r\n // Same tab, maybe at another position: no change of selection.\r\n if (index !== requested) {\r\n this.selectedIndex.set(index);\r\n }\r\n return;\r\n }\r\n // The selected tab was removed: the one taking its place, or the previous one for the last tab.\r\n if (!tabs.length) {\r\n return;\r\n }\r\n let target: number | null = Math.min(oldIndex, tabs.length - 1);\r\n if (tabs[target].disabled()) {\r\n target = this.enabledFrom(target, -1) ?? this.enabledFrom(target, 1);\r\n }\r\n if (target !== null) {\r\n this.activate(target, oldIndex);\r\n }\r\n }\r\n\r\n /** Selection caused by a change of the list: event and focus as for a selection by code. */\r\n private activate(index: number, previousIndex: number): void {\r\n this.selectedIndex.set(index);\r\n this.tabChange.emit({ index, previousIndex, trigger: 'api' });\r\n this.focusPanel(index);\r\n }\r\n\r\n /** `focusContent`: focus on the first field of the panel, once rendered (`initial`: panel shown at the start). */\r\n private focusPanel(index: number, initial = false): void {\r\n const tab = this.tabs()[index];\r\n if (!this.focusContent() || !tab || !tab.focusContent()) {\r\n return;\r\n }\r\n sirioFocusContent(() => (this.tabs()[index] === tab ? this.panelElement(index) : null), this.injector, {\r\n initial,\r\n });\r\n }\r\n\r\n /** Next enabled tab from `start` in `direction`; `wrap` cycles around the list (arrow keys). */\r\n private enabledFrom(start: number, direction: 1 | -1, wrap = false): number | null {\r\n const tabs = this.tabs();\r\n const count = tabs.length;\r\n for (let step = 1; step <= count; step++) {\r\n let i = start + direction * step;\r\n if (wrap) {\r\n i = (i + count) % count;\r\n } else if (i < 0 || i >= count) {\r\n return null;\r\n }\r\n if (!tabs[i].disabled()) {\r\n return i === start ? null : i;\r\n }\r\n }\r\n return null;\r\n }\r\n\r\n private updateScrollable(): void {\r\n const nav = this.nav()?.nativeElement;\r\n if (!nav || this.vertical()) {\r\n this.scrollable.set(false);\r\n return;\r\n }\r\n // With the controls shown the list is 96px narrower: use the same threshold both ways.\r\n const available = nav.clientWidth + (this.scrollable() ? SCROLL_CONTROLS_WIDTH : 0);\r\n this.scrollable.set(nav.scrollWidth > available);\r\n }\r\n\r\n /** Scrolls the tab list (only the list, never the page) to show the given tab. */\r\n private scrollIntoView(index: number): void {\r\n const nav = this.nav()?.nativeElement;\r\n const tab = nav?.querySelector<HTMLElement>(`#${this.tabId(index)}`);\r\n if (!nav || !tab || this.vertical()) {\r\n return;\r\n }\r\n const navBox = nav.getBoundingClientRect();\r\n const tabBox = tab.getBoundingClientRect();\r\n if (tabBox.left < navBox.left) {\r\n nav.scrollLeft -= navBox.left - tabBox.left;\r\n } else if (tabBox.right > navBox.right) {\r\n nav.scrollLeft += tabBox.right - navBox.right;\r\n }\r\n }\r\n}\r\n\r\n/** Tab components, for `imports: [SIRIO_TABS]`. */\r\nexport const SIRIO_TABS = [SirioTabs, SirioTab, SirioTabLabel, SirioTabContent] as const;\r\n","<ng-template #content><ng-content /></ng-template>\r\n","<div\r\n class=\"sirio-tab\"\r\n [class.sirio-tab-vertical]=\"vertical()\"\r\n [class.sirio-tab-scroll]=\"!vertical() && scrollable()\"\r\n>\r\n @if (!vertical()) {\r\n <div class=\"sirio-tab-control\">\r\n <button\r\n type=\"button\"\r\n class=\"sirio-btn sirio-btn-icon\"\r\n [attr.aria-label]=\"scrollLeftLabel()\"\r\n [attr.title]=\"scrollLeftLabel()\"\r\n [disabled]=\"previousIndex() === null\"\r\n (click)=\"selectFromControl(previousIndex())\"\r\n >\r\n <span class=\"fas fa-angle-left\" aria-hidden=\"true\"></span>\r\n </button>\r\n <button\r\n type=\"button\"\r\n class=\"sirio-btn sirio-btn-icon\"\r\n [attr.aria-label]=\"scrollRightLabel()\"\r\n [attr.title]=\"scrollRightLabel()\"\r\n [disabled]=\"nextIndex() === null\"\r\n (click)=\"selectFromControl(nextIndex())\"\r\n >\r\n <span class=\"fas fa-angle-right\" aria-hidden=\"true\"></span>\r\n </button>\r\n </div>\r\n }\r\n <ul\r\n #nav\r\n class=\"sirio-tab-nav\"\r\n role=\"tablist\"\r\n [class.sirio-tab-nav-line]=\"line()\"\r\n [attr.aria-orientation]=\"vertical() ? 'vertical' : null\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n (keydown)=\"onKeydown($event)\"\r\n >\r\n @for (tab of tabs(); track tab; let i = $index) {\r\n <li role=\"presentation\">\r\n <a\r\n role=\"tab\"\r\n data-sirio-toggle=\"tab\"\r\n [id]=\"tabId(i)\"\r\n [attr.href]=\"'#' + panelId(i)\"\r\n [attr.aria-controls]=\"panelId(i)\"\r\n [attr.aria-selected]=\"i === active()\"\r\n [attr.aria-disabled]=\"tab.disabled() || null\"\r\n [attr.tabindex]=\"i === active() && !tab.disabled() ? null : -1\"\r\n [class.disabled]=\"tab.disabled()\"\r\n (click)=\"onTabClick($event, i)\"\r\n >\r\n @if (tab.icon()) {\r\n <span [attr.class]=\"tab.iconClasses()\" aria-hidden=\"true\"></span>\r\n }\r\n @if (tab.labelTemplate(); as label) {\r\n <ng-container [ngTemplateOutlet]=\"label\" />\r\n } @else {\r\n {{ tab.label() }}\r\n }\r\n @if (tab.badge(); as badge) {\r\n <span class=\"sirio-tab-badge\" [wmSirioBadge]=\"badge\"></span>\r\n }\r\n </a>\r\n </li>\r\n }\r\n </ul>\r\n <div class=\"sirio-tab-content\">\r\n @for (tab of tabs(); track tab; let i = $index) {\r\n <div\r\n class=\"sirio-tab-item\"\r\n role=\"tabpanel\"\r\n [attr.tabindex]=\"focusablePanels() ? 0 : null\"\r\n [id]=\"panelId(i)\"\r\n [attr.aria-labelledby]=\"tabId(i)\"\r\n [attr.data-sirio-visible]=\"i === active()\"\r\n >\r\n <div class=\"sirio-tab-body\">\r\n @if (tab.lazyContent(); as lazy) {\r\n @if (i === active()) {\r\n <ng-container [ngTemplateOutlet]=\"lazy\" />\r\n }\r\n } @else {\r\n <ng-container [ngTemplateOutlet]=\"tab.content()\" />\r\n }\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n","import { NgTemplateOutlet } from '@angular/common';\r\nimport {\r\n ChangeDetectionStrategy,\r\n Component,\r\n DestroyRef,\r\n effect,\r\n ElementRef,\r\n inject,\r\n input,\r\n signal,\r\n untracked,\r\n viewChild,\r\n} from '@angular/core';\r\nimport { SIRIO_CONTROL, type SirioValidationState } from '../core/sirio-control-base';\r\nimport { SirioPendingIndicator } from '../pending/sirio-pending';\r\nimport { SirioInfoButton } from '../tooltip/sirio-info-button';\r\n\r\n/**\r\n * Layout wrapper shared by the text-like controls: label, projected input, help text, feedback\r\n * (help text below the input, as in the Sirio web kit).\r\n * The feedback visibility is driven explicitly (`sirio-visible`) instead of relying on the Sirio\r\n * sibling selector (`.sirio-form-control.sirio-is-invalid ~ .sirio-form-feedback`), because the\r\n * input may be wrapped in a `.sirio-input-group` (prefix/suffix adorners).\r\n *\r\n * Internal building block: not meant to be used directly by consumers.\r\n */\r\n@Component({\r\n selector: 'wm-sirio-field',\r\n imports: [NgTemplateOutlet, SirioInfoButton, SirioPendingIndicator],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n host: { class: 'sirio-field' },\r\n styleUrl: './sirio-field.scss',\r\n templateUrl: './sirio-field.html',\r\n})\r\nexport class SirioField {\r\n readonly inputId = input.required<string>();\r\n readonly helpId = input.required<string>();\r\n readonly errorId = input.required<string>();\r\n readonly label = input<string>('');\r\n /** Optional id of the label (used by controls that reference it with aria-labelledby). */\r\n readonly labelId = input<string | null>(null);\r\n readonly helpText = input<string>('');\r\n /** Where the help text goes: below the input (default) or above it (Sirio slider). */\r\n readonly helpPosition = input<'above' | 'below'>('below');\r\n readonly required = input(false);\r\n /** Feedback text for the current state (error, warning or valid message). */\r\n readonly errorMessage = input<string | null>(null);\r\n /** Validation state: colors the label and the feedback. */\r\n readonly state = input<SirioValidationState | null>(null);\r\n\r\n /**\r\n * Where the async validation spinner goes: inside the field on the right (text-like controls)\r\n * or next to the label (e.g. slider).\r\n */\r\n readonly pendingPlacement = input<'field' | 'label'>('field');\r\n\r\n /** The control that renders this field: source of the info popover and pending inputs. */\r\n protected readonly control = inject(SIRIO_CONTROL, { optional: true });\r\n\r\n private readonly controlWrap = viewChild<ElementRef<HTMLElement>>('controlWrap');\r\n /** Slot of the spinner inside the field, measured when it appears (null = hidden). */\r\n protected readonly pendingLayout = signal<PendingSlot | null>(null);\r\n /** Undoes the pending look of the input (padding and background icon). */\r\n private restoreInput: (() => void) | null = null;\r\n\r\n constructor() {\r\n // Runs before the view update: the field is measured without the pending styles.\r\n effect(() => {\r\n const visible = this.pendingPlacement() === 'field' && !!this.control?.pendingVisible();\r\n const wrap = this.controlWrap()?.nativeElement;\r\n untracked(() => {\r\n this.restoreInput?.();\r\n this.restoreInput = null;\r\n if (!visible || !wrap) {\r\n this.pendingLayout.set(null);\r\n return;\r\n }\r\n const { slot, restore } = showPendingSlot(wrap);\r\n this.restoreInput = restore;\r\n this.pendingLayout.set(slot);\r\n });\r\n });\r\n inject(DestroyRef).onDestroy(() => this.restoreInput?.());\r\n }\r\n}\r\n\r\n/** Position (px, from the top right corner of the field wrapper) and size of the pending spinner. */\r\ninterface PendingSlot {\r\n right: number;\r\n top: number;\r\n size: number;\r\n}\r\n\r\n/**\r\n * The spinner takes the slot of the Sirio state icon (the one shown afterwards for an error,\r\n * a warning or a valid value): the slot is read from the kit rules by applying\r\n * `sirio-is-invalid` to the (last) `.sirio-form-control` for a moment — no paint happens in\r\n * between. As in the kit states, the input gets the state padding and loses its own background\r\n * icon (calendar, clock, select arrow) while the spinner is shown.\r\n */\r\nfunction showPendingSlot(wrap: HTMLElement): { slot: PendingSlot; restore: () => void } {\r\n const inputs = wrap.querySelectorAll<HTMLElement>('.sirio-form-control');\r\n const input = inputs[inputs.length - 1];\r\n if (!input) {\r\n const box = wrap.getBoundingClientRect();\r\n return { slot: { right: 15, top: box.height / 2 - 8, size: 16 }, restore: () => {} };\r\n }\r\n const hadState = input.classList.contains('sirio-is-invalid');\r\n input.classList.add('sirio-is-invalid');\r\n const style = getComputedStyle(input);\r\n const size = parseFloat(style.backgroundSize) || 16;\r\n const position = parseStateIconPosition(style.backgroundPositionX, style.backgroundPositionY);\r\n const padding = style.paddingRight;\r\n if (!hadState) {\r\n input.classList.remove('sirio-is-invalid');\r\n }\r\n const box = wrap.getBoundingClientRect();\r\n const field = input.getBoundingClientRect();\r\n const inputTop = field.top - box.top;\r\n const right =\r\n position.right ?? (position.left !== null ? field.width - position.left - size : 15);\r\n const slot: PendingSlot = {\r\n right: Math.max(0, box.right - field.right) + right,\r\n // \"top 15px\" (textarea) or vertically centered (the kit \"top 50%\").\r\n top: inputTop + (position.top ?? (field.height - size) / 2),\r\n size,\r\n };\r\n input.style.paddingRight = padding;\r\n input.style.backgroundImage = 'none';\r\n return {\r\n slot,\r\n restore: () => {\r\n input.style.paddingRight = '';\r\n input.style.backgroundImage = '';\r\n },\r\n };\r\n}\r\n\r\n/**\r\n * Offsets (px) of the Sirio state icon from the background position longhands, as serialized by\r\n * the different browsers: Chromium keeps the keywords (\"right 15px\", \"top 15px\"), Firefox\r\n * returns calc() and lengths (\"calc(100% - 15px)\", \"15px\"). Null = not a fixed offset (e.g. 50%).\r\n */\r\nexport function parseStateIconPosition(\r\n x: string,\r\n y: string,\r\n): { right: number | null; left: number | null; top: number | null } {\r\n const fromEnd = (v: string, keyword: string) =>\r\n new RegExp(`${keyword}\\\\s+(-?[\\\\d.]+)px`).exec(v) ?? /calc\\(100% - (-?[\\d.]+)px\\)/.exec(v);\r\n const fromStart = (v: string, keyword: string) =>\r\n new RegExp(`${keyword}\\\\s+(-?[\\\\d.]+)px`).exec(v) ??\r\n /^(-?[\\d.]+)px$/.exec(v.trim()) ??\r\n /calc\\(0% \\+ (-?[\\d.]+)px\\)/.exec(v);\r\n const right = fromEnd(x, 'right');\r\n const left = right ? null : fromStart(x, 'left');\r\n const top = fromStart(y, 'top');\r\n return {\r\n right: right ? parseFloat(right[1]) : null,\r\n left: left ? parseFloat(left[1]) : null,\r\n top: top ? parseFloat(top[1]) : null,\r\n };\r\n}\r\n","<ng-template #labelTpl>\r\n <!-- Sirio: label colored with sirio-text-danger / -warning / -success by validation state. -->\r\n <label\r\n class=\"sirio-label\"\r\n [class.sirio-text-danger]=\"state() === 'invalid'\"\r\n [class.sirio-text-warning]=\"state() === 'warning'\"\r\n [class.sirio-text-success]=\"state() === 'valid'\"\r\n [attr.for]=\"inputId()\"\r\n [attr.id]=\"labelId()\"\r\n >\r\n {{ label() }}\r\n @if (required()) {\r\n <span class=\"sirio-required-marker\" aria-hidden=\"true\">*</span>\r\n }\r\n </label>\r\n</ng-template>\r\n@if (label()) {\r\n @if (control?.info() || (control && pendingPlacement() === 'label')) {\r\n <!-- Kit info button (popover) and pending spinner next to the label, outside the label element. -->\r\n <div class=\"sirio-label-info\">\r\n <ng-container [ngTemplateOutlet]=\"labelTpl\" />\r\n @if (control!.info(); as info) {\r\n <wm-sirio-info-button\r\n [content]=\"info\"\r\n [title]=\"control!.infoTitle() ?? label()\"\r\n [label]=\"control!.infoButtonLabel()\"\r\n [placement]=\"control!.infoPlacement()\"\r\n />\r\n }\r\n @if (pendingPlacement() === 'label') {\r\n <wm-sirio-pending\r\n placement=\"inline\"\r\n [active]=\"control!.pendingVisible()\"\r\n [label]=\"control!.pendingLabel()\"\r\n />\r\n }\r\n </div>\r\n } @else {\r\n <ng-container [ngTemplateOutlet]=\"labelTpl\" />\r\n }\r\n}\r\n<!-- Help text above the input: Sirio slider (help between the label and the slider). -->\r\n@if (helpText() && helpPosition() === 'above') {\r\n <span class=\"sirio-form-text-help\" [id]=\"helpId()\">{{ helpText() }}</span>\r\n}\r\n<div\r\n #controlWrap\r\n class=\"sirio-field-control\"\r\n [class.sirio-field-pending]=\"!!pendingLayout()\"\r\n [style.--sirio-pending-right.px]=\"pendingLayout()?.right\"\r\n [style.--sirio-pending-top.px]=\"pendingLayout()?.top\"\r\n [style.--sirio-pending-shift]=\"pendingLayout() ? '0' : null\"\r\n [style.--sirio-pending-size.px]=\"pendingLayout()?.size\"\r\n>\r\n <ng-content />\r\n @if (control && pendingPlacement() === 'field') {\r\n <!-- Async validation in progress: spinner inside the field, announced to screen readers. -->\r\n <wm-sirio-pending [active]=\"control.pendingVisible()\" [label]=\"control.pendingLabel()\" />\r\n }\r\n</div>\r\n<!-- Sirio web kit: the help text is placed below the input. -->\r\n@if (helpText() && helpPosition() === 'below') {\r\n <span class=\"sirio-form-text-help\" [id]=\"helpId()\">{{ helpText() }}</span>\r\n}\r\n<span\r\n class=\"sirio-form-feedback\"\r\n [class.sirio-visible]=\"!!errorMessage()\"\r\n [class.sirio-feedback-invalid]=\"state() === 'invalid'\"\r\n [class.sirio-feedback-warning]=\"state() === 'warning'\"\r\n [class.sirio-feedback-valid]=\"state() === 'valid'\"\r\n [id]=\"errorId()\"\r\n aria-live=\"polite\"\r\n>\r\n {{ errorMessage() }}\r\n</span>\r\n","import {\r\n booleanAttribute,\r\n ChangeDetectionStrategy,\r\n Component,\r\n inject,\r\n input,\r\n LOCALE_ID,\r\n numberAttribute,\r\n} from '@angular/core';\r\nimport { SirioAdornedControlBase } from '../adorner/sirio-adorner';\r\nimport { provideSirioControl } from '../core/sirio-control-base';\r\nimport { SirioField } from '../field/sirio-field';\r\nimport { applyTextCaseToElement, SirioTextCase } from '../core/sirio-text-case';\r\n\r\nexport type SirioTextboxType = 'text' | 'email' | 'password' | 'tel' | 'url' | 'search';\r\n\r\n/**\r\n * Single-line text input.\r\n *\r\n * ```html\r\n * <wm-sirio-textbox label=\"Nome\" formControlName=\"name\" />\r\n * ```\r\n */\r\n@Component({\r\n selector: 'wm-sirio-textbox',\r\n imports: [SirioField],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [provideSirioControl(() => SirioTextbox)],\r\n styleUrl: './sirio-textbox.scss',\r\n templateUrl: './sirio-textbox.html',\r\n})\r\nexport class SirioTextbox extends SirioAdornedControlBase<string> {\r\n readonly type = input<SirioTextboxType>('text');\r\n readonly maxlength = input<number | null, unknown>(null, {\r\n transform: (v: unknown) => (v == null ? null : numberAttribute(v)),\r\n });\r\n readonly autocomplete = input<string | null>(null);\r\n /** When true, '' is propagated to the model as null. */\r\n readonly emptyAsNull = input(false, { transform: booleanAttribute });\r\n\r\n /** Casing applied to typed/pasted text. Values set from code (setValue/patchValue) are not changed. */\r\n readonly textCase = input<SirioTextCase>('none');\r\n\r\n private readonly locale = inject(LOCALE_ID);\r\n\r\n protected onInput(event: Event): void {\r\n // During IME/dead-key composition the text is converted on compositionend.\r\n if ((event as InputEvent).isComposing) {\r\n return;\r\n }\r\n const el = event.target as HTMLInputElement;\r\n const raw = applyTextCaseToElement(el, this.textCase(), this.locale);\r\n this.updateValue(raw === '' && this.emptyAsNull() ? null : raw);\r\n }\r\n}\r\n","<wm-sirio-field\r\n [inputId]=\"inputId()\"\r\n [helpId]=\"helpId()\"\r\n [errorId]=\"errorId()\"\r\n [label]=\"label()\"\r\n [helpText]=\"helpText()\"\r\n [required]=\"isRequired()\"\r\n [errorMessage]=\"feedbackMessage()\"\r\n [state]=\"validationState()\"\r\n>\r\n <div class=\"sirio-input-group\">\r\n @if (prefix()) {\r\n <span class=\"sirio-input-group-text\" [id]=\"prefixId()\">{{ prefix() }}</span>\r\n }\r\n <ng-content select=\"[wmSirioPrefix]\" />\r\n <input\r\n class=\"sirio-form-control\"\r\n [style.text-align]=\"textAlign()\"\r\n [class.sirio-is-invalid]=\"showError()\"\r\n [class.sirio-is-valid]=\"validationState() === 'valid'\"\r\n [class.sirio-is-warning]=\"validationState() === 'warning'\"\r\n [class.filled]=\"!!value()\"\r\n [id]=\"inputId()\"\r\n [attr.aria-label]=\"ariaLabel() || null\"\r\n [attr.name]=\"name()\"\r\n [type]=\"type()\"\r\n [value]=\"value() ?? ''\"\r\n [attr.placeholder]=\"placeholder() || null\"\r\n [disabled]=\"isDisabled()\"\r\n [readOnly]=\"readonly()\"\r\n [attr.maxlength]=\"maxlength()\"\r\n [attr.autocomplete]=\"autocomplete()\"\r\n [attr.aria-required]=\"isRequired() || null\"\r\n [attr.aria-invalid]=\"showError() || null\"\r\n [attr.aria-describedby]=\"describedBy()\"\r\n (input)=\"onInput($event)\"\r\n (compositionend)=\"onInput($event)\"\r\n (blur)=\"markTouched()\"\r\n />\r\n <ng-content select=\"[wmSirioSuffix]\" />\r\n @if (suffix()) {\r\n <span class=\"sirio-input-group-text\" [id]=\"suffixId()\">{{ suffix() }}</span>\r\n }\r\n </div>\r\n</wm-sirio-field>\r\n","import {\r\n booleanAttribute,\r\n ChangeDetectionStrategy,\r\n Component,\r\n computed,\r\n inject,\r\n input,\r\n LOCALE_ID,\r\n numberAttribute,\r\n} from '@angular/core';\r\nimport { provideSirioControl, SirioControlBase } from '../core/sirio-control-base';\r\nimport { SirioField } from '../field/sirio-field';\r\nimport { SirioTextAlign } from '../core/sirio-text-align';\r\nimport { applyTextCaseToElement, SirioTextCase } from '../core/sirio-text-case';\r\n\r\n/**\r\n * Multi-line text input with optional character counter.\r\n *\r\n * ```html\r\n * <wm-sirio-textarea label=\"Note\" [rows]=\"4\" [maxlength]=\"500\" showCounter formControlName=\"notes\" />\r\n * ```\r\n */\r\n@Component({\r\n selector: 'wm-sirio-textarea',\r\n imports: [SirioField],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [provideSirioControl(() => SirioTextarea)],\r\n styleUrl: './sirio-textarea.scss',\r\n templateUrl: './sirio-textarea.html',\r\n})\r\nexport class SirioTextarea extends SirioControlBase<string> {\r\n protected readonly counterId = computed(() => `${this.inputId()}-counter`);\r\n\r\n readonly rows = input(3, { transform: numberAttribute });\r\n readonly maxlength = input<number | null, unknown>(null, {\r\n transform: (v: unknown) => (v == null ? null : numberAttribute(v)),\r\n });\r\n readonly showCounter = input(false, { transform: booleanAttribute });\r\n\r\n /** Casing applied to typed/pasted text. Values set from code (setValue/patchValue) are not changed. */\r\n readonly textCase = input<SirioTextCase>('none');\r\n /** Text alignment (null = Sirio default). */\r\n readonly textAlign = input<SirioTextAlign | null>(null);\r\n\r\n private readonly locale = inject(LOCALE_ID);\r\n\r\n /** The character counter is read by screen readers together with the field. */\r\n protected override describedByExtra(): string[] {\r\n return this.showCounter() && this.maxlength() ? [this.counterId()] : [];\r\n }\r\n\r\n protected onInput(event: Event): void {\r\n // During IME/dead-key composition the text is converted on compositionend.\r\n if ((event as InputEvent).isComposing) {\r\n return;\r\n }\r\n const el = event.target as HTMLTextAreaElement;\r\n this.updateValue(applyTextCaseToElement(el, this.textCase(), this.locale));\r\n }\r\n}\r\n","<wm-sirio-field\r\n [inputId]=\"inputId()\"\r\n [helpId]=\"helpId()\"\r\n [errorId]=\"errorId()\"\r\n [label]=\"label()\"\r\n [helpText]=\"helpText()\"\r\n [required]=\"isRequired()\"\r\n [errorMessage]=\"feedbackMessage()\"\r\n [state]=\"validationState()\"\r\n>\r\n <textarea\r\n class=\"sirio-form-control\"\r\n [style.text-align]=\"textAlign()\"\r\n [class.sirio-is-invalid]=\"showError()\"\r\n [class.sirio-is-valid]=\"validationState() === 'valid'\"\r\n [class.sirio-is-warning]=\"validationState() === 'warning'\"\r\n [class.filled]=\"!!value()\"\r\n [id]=\"inputId()\"\r\n [attr.aria-label]=\"ariaLabel() || null\"\r\n [attr.name]=\"name()\"\r\n [rows]=\"rows()\"\r\n [value]=\"value() ?? ''\"\r\n [attr.placeholder]=\"placeholder() || null\"\r\n [disabled]=\"isDisabled()\"\r\n [readOnly]=\"readonly()\"\r\n [attr.maxlength]=\"maxlength()\"\r\n [attr.aria-required]=\"isRequired() || null\"\r\n [attr.aria-invalid]=\"showError() || null\"\r\n [attr.aria-describedby]=\"describedBy()\"\r\n (input)=\"onInput($event)\"\r\n (compositionend)=\"onInput($event)\"\r\n (blur)=\"markTouched()\"\r\n ></textarea>\r\n @if (showCounter() && maxlength()) {\r\n <span class=\"sirio-form-text-help sirio-textarea-counter\" [id]=\"counterId()\">\r\n {{ (value() ?? '').length }} / {{ maxlength() }}\r\n </span>\r\n }\r\n</wm-sirio-field>\r\n","import {\r\n booleanAttribute,\r\n ChangeDetectionStrategy,\r\n Component,\r\n computed,\r\n effect,\r\n ElementRef,\r\n inject,\r\n input,\r\n LOCALE_ID,\r\n numberAttribute,\r\n OnDestroy,\r\n signal,\r\n untracked,\r\n viewChild,\r\n} from '@angular/core';\r\nimport { AbstractControl, ValidationErrors, Validator } from '@angular/forms';\r\nimport { SirioAdornedControlBase } from '../adorner/sirio-adorner';\r\nimport { provideSirioControl } from '../core/sirio-control-base';\r\nimport { SirioField } from '../field/sirio-field';\r\n\r\n/** Accepts numbers, numeric strings (HTML attributes) and null/'' (= not set). */\r\nfunction optionalNumber(value: unknown): number | null {\r\n return value === null || value === undefined || value === '' ? null : numberAttribute(value);\r\n}\r\n\r\n/** Returns the decimal separator of a locale, e.g. ',' for 'it-IT' and '.' for 'en-US'. */\r\nexport function sirioDecimalSeparator(locale: string): string {\r\n try {\r\n const part = new Intl.NumberFormat(locale).formatToParts(1.1).find((p) => p.type === 'decimal');\r\n return part?.value ?? '.';\r\n } catch {\r\n return '.';\r\n }\r\n}\r\n\r\n/** Returns the thousands separator of a locale, e.g. '.' for 'it-IT' and ',' for 'en-US'. */\r\nexport function sirioGroupSeparator(locale: string): string {\r\n try {\r\n const part = new Intl.NumberFormat(locale)\r\n .formatToParts(1234567.1)\r\n .find((p) => p.type === 'group');\r\n return part?.value ?? '';\r\n } catch {\r\n return '';\r\n }\r\n}\r\n\r\n/** Inserts a separator every three digits of an integer string (\"1234567\" -> \"1.234.567\"). */\r\nfunction groupDigits(digits: string, separator: string): string {\r\n return digits.replace(/\\B(?=(\\d{3})+(?!\\d))/g, separator);\r\n}\r\n\r\n/** Number of decimal digits of a finite number (e.g. 1.25 -> 2, 1e-7 -> 7). */\r\nexport function countDecimals(value: number): number {\r\n if (!Number.isFinite(value) || Number.isInteger(value)) {\r\n return 0;\r\n }\r\n const [mantissa, exponent] = value.toString().toLowerCase().split('e');\r\n const fraction = (mantissa.split('.')[1] ?? '').length;\r\n return Math.max(0, fraction - Number(exponent ?? 0));\r\n}\r\n\r\n/**\r\n * Numeric input. The model value is `number | null` (empty input => null).\r\n *\r\n * - `min` / `max`: input guidance only, NOT validators. While typing, a change that would take the\r\n * value beyond the limits is rejected (max 99: \"100\" cannot be typed); the minus sign is not\r\n * accepted when min >= 0. Values below a positive min are allowed while typing, as they may be\r\n * partial (\"1\" -> \"18\"). When the user leaves the field after editing it, a value outside the\r\n * limits is moved to the nearest one (min 10: \"5\" -> 10). Values set from code are shown as they\r\n * are, without errors.\r\n * - `defaultValue`: value taken by the model when the user leaves the field empty after editing it\r\n * (then kept within min/max). Values set from code (null included) are not replaced.\r\n * - `decimals`: maximum number of decimal digits. Extra digits cannot be typed; values set from code\r\n * with more decimals raise the `sirioDecimals` error. `0` = integers only.\r\n * - `grouping` (default false): outside editing the value is shown with the thousands separator of\r\n * LOCALE_ID (\"1.234.567,50\" with it-IT); while editing the separators are removed.\r\n * - `padDecimals` (default true): outside editing the value is shown with exactly `decimals`\r\n * digits (decimals=3: \"10,1\" -> \"10,100\"). The model value is not affected.\r\n * - Uses a text input with `inputmode=\"decimal\"`: the decimal separator follows LOCALE_ID\r\n * (',' for it-IT); both ',' and '.' are accepted while typing.\r\n * - Arrow Up/Down change the value by `step`, within min/max.\r\n * - `showSpinner` (default true): shows the up/down buttons inside the field. When false the buttons\r\n * are not rendered and the input keeps the standard Sirio padding; Arrow Up/Down still work.\r\n *\r\n * ```html\r\n * <wm-sirio-number label=\"Importo\" [min]=\"0\" [max]=\"10000\" [decimals]=\"2\" suffix=\"€\" formControlName=\"amount\" />\r\n * ```\r\n */\r\n@Component({\r\n selector: 'wm-sirio-number',\r\n imports: [SirioField],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [provideSirioControl(() => SirioNumber, { validator: true })],\r\n styleUrl: './sirio-number.scss',\r\n templateUrl: './sirio-number.html',\r\n})\r\nexport class SirioNumber extends SirioAdornedControlBase<number> implements Validator, OnDestroy {\r\n /** Lower limit for typing (not a validator). The minus sign is blocked when min >= 0. */\r\n readonly min = input<number | null, unknown>(null, { transform: optionalNumber });\r\n /** Upper limit for typing (not a validator): changes exceeding it are rejected. */\r\n readonly max = input<number | null, unknown>(null, { transform: optionalNumber });\r\n /**\r\n * Value taken by the model when the user empties the field and leaves it (null = the model stays\r\n * null). It is then moved within min/max. Not applied to values set from code.\r\n */\r\n readonly defaultValue = input<number | null, unknown>(null, { transform: optionalNumber });\r\n /** Maximum number of decimal digits (null = no limit, 0 = integers only). */\r\n readonly decimals = input<number | null, unknown>(null, { transform: optionalNumber });\r\n /**\r\n * When `decimals` is set, shows the value padded with trailing zeros once the field is left\r\n * or the value is set from code (decimals=3: 10.1 -> \"10,100\"). Display only: the model keeps 10.1.\r\n */\r\n readonly padDecimals = input(true, { transform: booleanAttribute });\r\n /**\r\n * Shows the thousands separator (LOCALE_ID) once the field is left or the value is set from code\r\n * (it-IT: 1234567.5 -> \"1.234.567,5\"). Removed while editing. Display only.\r\n */\r\n readonly grouping = input(false, { transform: booleanAttribute });\r\n /**\r\n * Shows the up/down spinner buttons inside the field (default true). When false the buttons are not\r\n * rendered; Arrow Up/Down still change the value by `step`.\r\n */\r\n readonly showSpinner = input(true, { transform: booleanAttribute });\r\n /** Increment used by Arrow Up/Down. */\r\n readonly step = input<number, unknown>(1, { transform: (v: unknown) => optionalNumber(v) ?? 1 });\r\n\r\n private readonly locale = inject(LOCALE_ID);\r\n protected readonly separator = sirioDecimalSeparator(this.locale);\r\n private readonly groupSeparator = sirioGroupSeparator(this.locale);\r\n\r\n /** Text shown in the input (may be a partial number while typing, e.g. \"12,\"). */\r\n protected readonly text = signal('');\r\n\r\n protected readonly allowNegative = computed(() => {\r\n const min = this.min();\r\n return min === null || min < 0;\r\n });\r\n\r\n protected readonly inputMode = computed(() => (this.decimals() === 0 ? 'numeric' : 'decimal'));\r\n\r\n private onValidatorChange: () => void = () => {};\r\n private repeatTimer: ReturnType<typeof setTimeout> | undefined;\r\n private readonly inputRef = viewChild<ElementRef<HTMLInputElement>>('field');\r\n\r\n protected readonly hasPrefix = computed(() => !!this.prefix() || !!this.prefixContent());\r\n protected readonly hasSuffix = computed(() => !!this.suffix() || !!this.suffixContent());\r\n /** True while the user is editing: the text is not reformatted under the caret. */\r\n private focused = false;\r\n /** True when the user changed the text since the field got the focus. */\r\n private edited = false;\r\n\r\n constructor() {\r\n super();\r\n // Re-validate the bound control when the decimals constraint changes.\r\n effect(() => {\r\n this.decimals();\r\n this.onValidatorChange();\r\n });\r\n // Re-format the displayed value when the display options change (not while editing).\r\n effect(() => {\r\n this.decimals();\r\n this.padDecimals();\r\n this.grouping();\r\n untracked(() => {\r\n if (!this.focused) {\r\n this.text.set(this.format(this.value()));\r\n }\r\n });\r\n });\r\n }\r\n\r\n // ---- ControlValueAccessor -------------------------------------------------------------------\r\n override writeValue(value: number | null): void {\r\n super.writeValue(value);\r\n this.text.set(this.format(this.value()));\r\n }\r\n\r\n protected override fromModel(value: unknown): number | null {\r\n if (value === null || value === undefined || value === '') {\r\n return null;\r\n }\r\n const n = typeof value === 'number' ? value : Number(value);\r\n return Number.isFinite(n) ? n : null;\r\n }\r\n\r\n // ---- Validator ------------------------------------------------------------------------------\r\n validate(control: AbstractControl): ValidationErrors | null {\r\n const value = this.fromModel(control.value);\r\n if (value === null) {\r\n return null;\r\n }\r\n // min/max are input guidance only: the single validation concerns values set from code\r\n // with more decimals than allowed (typing them is not possible).\r\n const decimals = this.decimals();\r\n if (decimals !== null && countDecimals(value) > decimals) {\r\n return { sirioDecimals: { max: decimals, actual: countDecimals(value) } };\r\n }\r\n return null;\r\n }\r\n\r\n registerOnValidatorChange(fn: () => void): void {\r\n this.onValidatorChange = fn;\r\n }\r\n\r\n // ---- User interaction -----------------------------------------------------------------------\r\n protected onInput(event: Event): void {\r\n const el = event.target as HTMLInputElement;\r\n const caret = el.selectionStart ?? el.value.length;\r\n let { text, caret: newCaret } = this.sanitize(el.value, caret);\r\n let value = this.parse(text);\r\n\r\n if (!this.withinTypingLimits(value)) {\r\n // Reject the change: restore the previous text, caret where the user was typing.\r\n const previous = this.text();\r\n newCaret = Math.max(0, Math.min(previous.length, newCaret - (text.length - previous.length)));\r\n text = previous;\r\n value = this.parse(previous);\r\n }\r\n\r\n if (text !== el.value) {\r\n // Write directly: the [value] binding does not refresh when the signal value is unchanged.\r\n el.value = text;\r\n el.setSelectionRange(newCaret, newCaret);\r\n }\r\n this.text.set(text);\r\n this.edited = true;\r\n this.updateValue(value);\r\n }\r\n\r\n /**\r\n * True when a value being typed is acceptable. Adding digits moves a positive number away from\r\n * zero (up) and a negative one away from zero (down), so only these bounds can be enforced\r\n * while typing: value > max (max >= 0) and value < min (min <= 0). A positive min cannot be\r\n * enforced because shorter numbers are valid partial input (\"1\" on the way to \"18\").\r\n */\r\n private withinTypingLimits(value: number | null): boolean {\r\n if (value === null) {\r\n return true;\r\n }\r\n const min = this.min();\r\n const max = this.max();\r\n if (max !== null && max >= 0 && value > max) {\r\n return false;\r\n }\r\n if (min !== null && min <= 0 && value < min) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n protected onKeydown(event: KeyboardEvent): void {\r\n if ((event.key !== 'ArrowUp' && event.key !== 'ArrowDown') || this.readonly()) {\r\n return;\r\n }\r\n event.preventDefault();\r\n this.stepBy(event.key === 'ArrowUp' ? 1 : -1);\r\n }\r\n\r\n /** Adds `direction * step` to the value, within min/max (Arrow keys and spinner buttons). */\r\n protected stepBy(direction: 1 | -1): void {\r\n if (this.isDisabled() || this.readonly()) {\r\n return;\r\n }\r\n const min = this.min();\r\n const max = this.max();\r\n // Empty field: start from 0 and clamp, as the native spinner does (min 18: first step gives 18).\r\n let next = (this.value() ?? 0) + direction * this.step();\r\n if (min !== null) {\r\n next = Math.max(min, next);\r\n }\r\n if (max !== null) {\r\n next = Math.min(max, next);\r\n }\r\n // Avoid floating point noise (0.1 + 0.2): round to the allowed/step precision.\r\n const precision = this.decimals() ?? countDecimals(this.step());\r\n next = Number(next.toFixed(Math.min(precision, 20)));\r\n this.text.set(this.format(next));\r\n this.updateValue(next);\r\n }\r\n\r\n /**\r\n * Spinner buttons: one step on press, then auto-repeat while the button is held\r\n * (like the native number spinner). The focus stays in the input.\r\n */\r\n protected startRepeat(event: PointerEvent, direction: 1 | -1): void {\r\n if (event.button !== 0) {\r\n return;\r\n }\r\n event.preventDefault();\r\n this.inputRef()?.nativeElement.focus();\r\n this.stepBy(direction);\r\n this.stopRepeat();\r\n this.repeatTimer = setTimeout(() => {\r\n this.repeatTimer = setInterval(() => this.stepBy(direction), 80);\r\n }, 400);\r\n const stop = () => {\r\n this.stopRepeat();\r\n window.removeEventListener('pointerup', stop);\r\n window.removeEventListener('pointercancel', stop);\r\n };\r\n window.addEventListener('pointerup', stop);\r\n window.addEventListener('pointercancel', stop);\r\n }\r\n\r\n private stopRepeat(): void {\r\n clearTimeout(this.repeatTimer);\r\n clearInterval(this.repeatTimer);\r\n this.repeatTimer = undefined;\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.stopRepeat();\r\n }\r\n\r\n protected onFocus(): void {\r\n this.focused = true;\r\n this.edited = false;\r\n // Editing happens on the plain number: thousands separators are removed.\r\n if (this.grouping()) {\r\n this.text.set(this.format(this.value()));\r\n }\r\n }\r\n\r\n protected onBlur(): void {\r\n this.focused = false;\r\n if (this.edited && !this.readonly()) {\r\n // Empty field -> defaultValue; a typed value outside min/max goes to the nearest limit.\r\n const completed = this.clampToLimits(this.value() ?? this.defaultValue());\r\n if (completed !== this.value()) {\r\n this.updateValue(completed);\r\n }\r\n }\r\n this.edited = false;\r\n // Normalize partial input (\"12,\" -> \"12\", \"-\" -> \"\", \"007\" -> \"7\") and pad the decimals.\r\n this.text.set(this.format(this.value()));\r\n this.markTouched();\r\n }\r\n\r\n /** The value moved to the nearest limit when it is outside min/max (null stays null). */\r\n private clampToLimits(value: number | null): number | null {\r\n if (value === null) {\r\n return null;\r\n }\r\n const min = this.min();\r\n const max = this.max();\r\n if (min !== null && value < min) {\r\n return min;\r\n }\r\n if (max !== null && value > max) {\r\n return max;\r\n }\r\n return value;\r\n }\r\n\r\n // ---- Parsing / formatting -------------------------------------------------------------------\r\n /**\r\n * Keeps only valid characters: optional leading '-', digits, one decimal separator\r\n * ('.' or ',' typed, shown with the locale separator) and at most `decimals` decimal digits.\r\n */\r\n private sanitize(input: string, inputCaret: number): { text: string; caret: number } {\r\n const { raw, caret } = this.stripGrouping(input, inputCaret);\r\n const decimals = this.decimals();\r\n let result = '';\r\n let newCaret = 0;\r\n let hasSeparator = false;\r\n let fractionDigits = 0;\r\n\r\n for (let i = 0; i < raw.length; i++) {\r\n const ch = raw[i];\r\n let keep: string | null = null;\r\n if (ch >= '0' && ch <= '9') {\r\n if (!hasSeparator || decimals === null || fractionDigits < decimals) {\r\n keep = ch;\r\n if (hasSeparator) {\r\n fractionDigits++;\r\n }\r\n }\r\n } else if ((ch === '.' || ch === ',') && !hasSeparator) {\r\n hasSeparator = true;\r\n // Integers only: the separator is not shown and the following digits are dropped\r\n // (pasting \"25,7\" gives \"25\").\r\n keep = decimals === 0 ? null : this.separator;\r\n } else if (ch === '-' && result === '' && this.allowNegative()) {\r\n keep = '-';\r\n }\r\n if (keep !== null) {\r\n result += keep;\r\n if (i < caret) {\r\n newCaret += keep.length;\r\n }\r\n }\r\n }\r\n return { text: result, caret: newCaret };\r\n }\r\n\r\n /**\r\n * Removes thousands separators from pasted text (\"1.234,50\" or \"1.234.567\" with it-IT).\r\n * A single group-separator character without a decimal separator is ambiguous (\"12.5\"): it is\r\n * left in place and treated as the decimal separator, as when typing on the numeric keypad.\r\n */\r\n private stripGrouping(raw: string, caret: number): { raw: string; caret: number } {\r\n const group = this.groupSeparator;\r\n if (!group || group === this.separator || !raw.includes(group)) {\r\n return { raw, caret };\r\n }\r\n const groupCount = raw.split(group).length - 1;\r\n if (!raw.includes(this.separator) && groupCount < 2) {\r\n return { raw, caret };\r\n }\r\n let result = '';\r\n let newCaret = caret;\r\n for (let i = 0; i < raw.length; i++) {\r\n if (raw[i] === group) {\r\n if (i < caret) {\r\n newCaret--;\r\n }\r\n continue;\r\n }\r\n result += raw[i];\r\n }\r\n return { raw: result, caret: newCaret };\r\n }\r\n\r\n private parse(text: string): number | null {\r\n const normalized = text.replace(this.separator, '.');\r\n if (normalized === '' || normalized === '-' || normalized === '.' || normalized === '-.') {\r\n return null;\r\n }\r\n const n = Number(normalized);\r\n return Number.isFinite(n) ? n : null;\r\n }\r\n\r\n private format(value: number | null): string {\r\n if (value === null) {\r\n return '';\r\n }\r\n let digits = countDecimals(value);\r\n const decimals = this.decimals();\r\n if (this.padDecimals() && decimals !== null && decimals > digits) {\r\n // Pad with trailing zeros (never truncate: extra decimals from code stay visible).\r\n digits = decimals;\r\n }\r\n // toFixed avoids the exponential notation of very small/large numbers.\r\n const [integerPart, fractionPart] = value.toFixed(Math.min(digits, 20)).split('.');\r\n const showGrouping = this.grouping() && !this.focused && !!this.groupSeparator;\r\n let text = integerPart;\r\n if (showGrouping) {\r\n const negative = text.startsWith('-');\r\n text =\r\n (negative ? '-' : '') + groupDigits(negative ? text.slice(1) : text, this.groupSeparator);\r\n }\r\n return fractionPart !== undefined ? `${text}${this.separator}${fractionPart}` : text;\r\n }\r\n}\r\n","<wm-sirio-field\n [inputId]=\"inputId()\"\n [helpId]=\"helpId()\"\n [errorId]=\"errorId()\"\n [label]=\"label()\"\n [helpText]=\"helpText()\"\n [required]=\"isRequired()\"\n [errorMessage]=\"feedbackMessage()\"\n [state]=\"validationState()\"\n>\n <div class=\"sirio-input-group\">\n @if (prefix()) {\n <span class=\"sirio-input-group-text\" [id]=\"prefixId()\">{{ prefix() }}</span>\n }\n <ng-content select=\"[wmSirioPrefix]\" />\n <span\n class=\"sirio-number-field\"\n [class.sirio-number-after-prefix]=\"hasPrefix()\"\n [class.sirio-number-before-suffix]=\"hasSuffix()\"\n [class.sirio-number-no-spinner]=\"!showSpinner()\"\n >\n <input\n #field\n class=\"sirio-form-control\"\n type=\"text\"\n role=\"spinbutton\"\n autocomplete=\"off\"\n [attr.inputmode]=\"inputMode()\"\n [style.text-align]=\"textAlign()\"\n [class.sirio-is-invalid]=\"showError()\"\n [class.sirio-is-valid]=\"validationState() === 'valid'\"\n [class.sirio-is-warning]=\"validationState() === 'warning'\"\n [class.filled]=\"value() !== null\"\n [id]=\"inputId()\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.name]=\"name()\"\n [value]=\"text()\"\n [attr.placeholder]=\"placeholder() || null\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly()\"\n [attr.aria-valuemin]=\"min()\"\n [attr.aria-valuemax]=\"max()\"\n [attr.aria-valuenow]=\"value()\"\n [attr.aria-valuetext]=\"text() || null\"\n [attr.aria-required]=\"isRequired() || null\"\n [attr.aria-invalid]=\"showError() || null\"\n [attr.aria-describedby]=\"describedBy()\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n />\n <!-- Sirio up/down icon as mouse buttons; keyboard users use Arrow Up/Down (spinbutton). -->\n @if (showSpinner()) {\n <span\n class=\"sirio-number-spinner\"\n [class.sirio-number-spinner-invalid]=\"showError() || pendingVisible()\"\n aria-hidden=\"true\"\n >\n <button\n type=\"button\"\n tabindex=\"-1\"\n [disabled]=\"isDisabled() || readonly()\"\n (pointerdown)=\"startRepeat($event, 1)\"\n ></button>\n <button\n type=\"button\"\n tabindex=\"-1\"\n [disabled]=\"isDisabled() || readonly()\"\n (pointerdown)=\"startRepeat($event, -1)\"\n ></button>\n </span>\n }\n </span>\n <ng-content select=\"[wmSirioSuffix]\" />\n @if (suffix()) {\n <span class=\"sirio-input-group-text\" [id]=\"suffixId()\">{{ suffix() }}</span>\n }\n </div>\n</wm-sirio-field>\n","/**\r\n * Parsing, formatting and input masking for the date/time controls.\r\n *\r\n * Internal (canonical) values, always local time without time zone:\r\n * - date: 'yyyy-MM-dd'\r\n * - time: 'HH:mm'\r\n * - datetime: 'yyyy-MM-ddTHH:mm'\r\n */\r\n\r\nexport type SirioDateTimeMode = 'date' | 'time' | 'datetime';\r\n\r\n/** What a date field picks: a full date, a month (month and year) or a year. */\r\nexport type SirioDatePickLevel = 'date' | 'month' | 'year';\r\n\r\ntype SegmentKey = 'd' | 'm' | 'y' | 'h' | 'n';\r\n\r\ninterface Segment {\r\n key: SegmentKey;\r\n length: number;\r\n}\r\n\r\n/** Display layout of a mode for a locale: segments in order and the separator before each one. */\r\nexport interface SirioDateTimeLayout {\r\n segments: Segment[];\r\n /** separators[i] is written before segments[i] (separators[0] is always ''). */\r\n separators: string[];\r\n}\r\n\r\nconst SEPARATOR_CHARS = new Set(['/', '.', '-', ':', ' ', ',']);\r\n\r\n/**\r\n * Highest possible first digit of a two-digit segment: a larger digit can only be a single-digit\r\n * value, so it is padded right away (typing \"9\" in the day gives \"09\", \"930\" as time gives \"09:30\").\r\n */\r\nconst MAX_FIRST_DIGIT: Partial<Record<SegmentKey, number>> = { d: 3, m: 1, h: 2, n: 5 };\r\n\r\n/** Day/month/year order and separator of a locale (it-IT: dd/MM/yyyy, en-US: MM/dd/yyyy). */\r\nfunction dateOrder(locale: string): { keys: SegmentKey[]; separator: string } {\r\n try {\r\n const parts = new Intl.DateTimeFormat(locale, {\r\n day: '2-digit',\r\n month: '2-digit',\r\n year: 'numeric',\r\n }).formatToParts(new Date(2026, 9, 9));\r\n const keys = parts\r\n .filter((p) => p.type === 'day' || p.type === 'month' || p.type === 'year')\r\n .map((p) => (p.type === 'day' ? 'd' : p.type === 'month' ? 'm' : 'y')) as SegmentKey[];\r\n const literal = parts.find((p) => p.type === 'literal')?.value.trim() || '/';\r\n if (keys.length === 3) {\r\n return { keys, separator: literal };\r\n }\r\n } catch {\r\n // Fall back to the Italian layout.\r\n }\r\n return { keys: ['d', 'm', 'y'], separator: '/' };\r\n}\r\n\r\nexport function sirioDateTimeLayout(mode: SirioDateTimeMode, locale: string): SirioDateTimeLayout {\r\n const segments: Segment[] = [];\r\n const separators: string[] = [];\r\n if (mode !== 'time') {\r\n const { keys, separator } = dateOrder(locale);\r\n keys.forEach((key, i) => {\r\n segments.push({ key, length: key === 'y' ? 4 : 2 });\r\n separators.push(i === 0 ? '' : separator);\r\n });\r\n }\r\n if (mode !== 'date') {\r\n segments.push({ key: 'h', length: 2 }, { key: 'n', length: 2 });\r\n separators.push(segments.length > 2 ? ' ' : '', ':');\r\n }\r\n return { segments, separators };\r\n}\r\n\r\n/**\r\n * Layout of a date field for a pick level, in the locale order: 'dd/MM/yyyy', 'MM/yyyy' or 'yyyy'\r\n * (en-US: 'MM/dd/yyyy', 'MM/yyyy', 'yyyy').\r\n */\r\nexport function sirioDateLayout(locale: string, level: SirioDatePickLevel): SirioDateTimeLayout {\r\n const full = sirioDateTimeLayout('date', locale);\r\n if (level === 'date') {\r\n return full;\r\n }\r\n const keep: SegmentKey[] = level === 'month' ? ['m', 'y'] : ['y'];\r\n const separator = full.separators.find((s) => s) ?? '/';\r\n const segments = full.segments.filter((s) => keep.includes(s.key));\r\n return { segments, separators: segments.map((_, i) => (i === 0 ? '' : separator)) };\r\n}\r\n\r\n/** Number of characters of a complete value in a layout (e.g. 10 for 'dd/MM/yyyy'). */\r\nexport function sirioLayoutLength(layout: SirioDateTimeLayout): number {\r\n return layout.segments.reduce((sum, s, i) => sum + s.length + layout.separators[i].length, 0);\r\n}\r\n\r\n/** First day of the period of a canonical date ('2026-03-15' -> '2026-03-01' for months). */\r\nexport function sirioPeriodStart(value: string, level: SirioDatePickLevel): string {\r\n switch (level) {\r\n case 'month':\r\n return `${value.slice(0, 7)}-01`;\r\n case 'year':\r\n return `${value.slice(0, 4)}-01-01`;\r\n default:\r\n return value.slice(0, 10);\r\n }\r\n}\r\n\r\n/** Placeholder describing the expected format, e.g. 'gg/mm/aaaa hh:mm' (Italian) or 'dd/mm/yyyy'. */\r\nexport function sirioDateTimePlaceholder(layout: SirioDateTimeLayout, locale: string): string {\r\n const italian = locale.toLowerCase().startsWith('it');\r\n const names: Record<SegmentKey, string> = italian\r\n ? { d: 'gg', m: 'mm', y: 'aaaa', h: 'hh', n: 'mm' }\r\n : { d: 'dd', m: 'mm', y: 'yyyy', h: 'hh', n: 'mm' };\r\n return layout.segments.map((s, i) => layout.separators[i] + names[s.key]).join('');\r\n}\r\n\r\n/**\r\n * Masks free text into the layout: keeps only digits, inserts separators automatically and\r\n * pads a one-digit segment with a leading zero when the user types a separator (\"9/\" -> \"09/\").\r\n * A separator is added only when the next segment has started, so Backspace never gets stuck.\r\n */\r\nexport function sirioMaskDateTime(\r\n raw: string,\r\n caret: number,\r\n layout: SirioDateTimeLayout,\r\n): { text: string; caret: number; complete: boolean } {\r\n const values: string[] = layout.segments.map(() => '');\r\n let index = 0;\r\n // Number of segment digits (padding included) that precede the caret.\r\n let digitsBeforeCaret = 0;\r\n\r\n for (let i = 0; i < raw.length && index < layout.segments.length; i++) {\r\n const ch = raw[i];\r\n if (ch >= '0' && ch <= '9') {\r\n const maxFirst = MAX_FIRST_DIGIT[layout.segments[index].key];\r\n if (values[index] === '' && maxFirst !== undefined && Number(ch) > maxFirst) {\r\n values[index] = '0';\r\n if (i < caret) {\r\n digitsBeforeCaret++;\r\n }\r\n }\r\n values[index] += ch;\r\n if (i < caret) {\r\n digitsBeforeCaret++;\r\n }\r\n if (values[index].length === layout.segments[index].length) {\r\n index++;\r\n }\r\n } else if (SEPARATOR_CHARS.has(ch) && values[index].length > 0) {\r\n // Short segment closed by a separator: pad it (\"9/\" -> \"09\").\r\n const missing = layout.segments[index].length - values[index].length;\r\n values[index] = '0'.repeat(missing) + values[index];\r\n if (i < caret) {\r\n digitsBeforeCaret += missing;\r\n }\r\n index++;\r\n }\r\n }\r\n\r\n let text = '';\r\n let newCaret = 0;\r\n let digitsWritten = 0;\r\n for (let s = 0; s < values.length; s++) {\r\n if (!values[s]) {\r\n break;\r\n }\r\n text += layout.separators[s];\r\n for (const digit of values[s]) {\r\n text += digit;\r\n digitsWritten++;\r\n if (digitsWritten === digitsBeforeCaret) {\r\n newCaret = text.length;\r\n }\r\n }\r\n }\r\n if (digitsBeforeCaret === 0) {\r\n newCaret = 0;\r\n }\r\n // Caret after the last digit: keep it at the end of the text.\r\n if (digitsBeforeCaret >= digitsWritten) {\r\n newCaret = text.length;\r\n }\r\n const complete = values.every((v, i) => v.length === layout.segments[i].length);\r\n return { text, caret: newCaret, complete };\r\n}\r\n\r\n/** Parses a complete masked text into the canonical value, or null when it is not a real date/time. */\r\nexport function sirioParseDateTime(\r\n text: string,\r\n layout: SirioDateTimeLayout,\r\n mode: SirioDateTimeMode,\r\n): string | null {\r\n const digits = text.replace(/\\D/g, '');\r\n const total = layout.segments.reduce((sum, s) => sum + s.length, 0);\r\n if (digits.length !== total) {\r\n return null;\r\n }\r\n const parts: Partial<Record<SegmentKey, number>> = {};\r\n let offset = 0;\r\n for (const segment of layout.segments) {\r\n parts[segment.key] = Number(digits.slice(offset, offset + segment.length));\r\n offset += segment.length;\r\n }\r\n return sirioCanonical(parts, mode);\r\n}\r\n\r\nfunction pad(value: number, length = 2): string {\r\n return String(value).padStart(length, '0');\r\n}\r\n\r\n/** Builds the canonical value from numeric parts, validating ranges (31/02 is rejected). */\r\nfunction sirioCanonical(\r\n parts: Partial<Record<SegmentKey, number>>,\r\n mode: SirioDateTimeMode,\r\n): string | null {\r\n let date = '';\r\n let time = '';\r\n if (mode !== 'time') {\r\n // Day and month missing (month / year pick levels): first day of the period.\r\n const { d = 1, m = 1, y = 0 } = parts;\r\n const check = new Date(y, m - 1, d);\r\n if (\r\n y < 1 ||\r\n m < 1 ||\r\n m > 12 ||\r\n d < 1 ||\r\n check.getFullYear() !== y ||\r\n check.getMonth() !== m - 1 ||\r\n check.getDate() !== d\r\n ) {\r\n return null;\r\n }\r\n date = `${pad(y, 4)}-${pad(m)}-${pad(d)}`;\r\n }\r\n if (mode !== 'date') {\r\n const { h = -1, n = -1 } = parts;\r\n if (h < 0 || h > 23 || n < 0 || n > 59) {\r\n return null;\r\n }\r\n time = `${pad(h)}:${pad(n)}`;\r\n }\r\n return mode === 'date' ? date : mode === 'time' ? time : `${date}T${time}`;\r\n}\r\n\r\n/** Formats a canonical value for display ('2026-10-09T14:30' -> '09/10/2026 14:30'). */\r\nexport function sirioFormatDateTime(value: string | null, layout: SirioDateTimeLayout): string {\r\n if (!value) {\r\n return '';\r\n }\r\n const match = /^(?:(\\d{4})-(\\d{2})-(\\d{2}))?T?(?:(\\d{2}):(\\d{2}))?$/.exec(value);\r\n if (!match) {\r\n return '';\r\n }\r\n const parts: Record<SegmentKey, string | undefined> = {\r\n y: match[1],\r\n m: match[2],\r\n d: match[3],\r\n h: match[4],\r\n n: match[5],\r\n };\r\n return layout.segments.map((s, i) => layout.separators[i] + (parts[s.key] ?? '')).join('');\r\n}\r\n\r\n/**\r\n * Normalizes a model value (ISO string or Date) into the canonical value of the mode.\r\n * Accepts 'yyyy-MM-dd', 'yyyy-MM-ddTHH:mm[:ss...]', 'HH:mm[:ss]' and Date objects (local time).\r\n */\r\nexport function sirioToCanonical(value: unknown, mode: SirioDateTimeMode): string | null {\r\n if (value === null || value === undefined || value === '') {\r\n return null;\r\n }\r\n if (value instanceof Date) {\r\n if (Number.isNaN(value.getTime())) {\r\n return null;\r\n }\r\n return sirioCanonical(\r\n {\r\n y: value.getFullYear(),\r\n m: value.getMonth() + 1,\r\n d: value.getDate(),\r\n h: value.getHours(),\r\n n: value.getMinutes(),\r\n },\r\n mode,\r\n );\r\n }\r\n if (typeof value !== 'string') {\r\n return null;\r\n }\r\n const dateMatch = /^(\\d{4})-(\\d{2})-(\\d{2})/.exec(value);\r\n const timeMatch = /(?:^|T|\\s)(\\d{2}):(\\d{2})/.exec(value);\r\n const parts: Partial<Record<SegmentKey, number>> = {};\r\n if (dateMatch) {\r\n parts.y = Number(dateMatch[1]);\r\n parts.m = Number(dateMatch[2]);\r\n parts.d = Number(dateMatch[3]);\r\n }\r\n if (timeMatch) {\r\n parts.h = Number(timeMatch[1]);\r\n parts.n = Number(timeMatch[2]);\r\n } else if (mode === 'datetime' && dateMatch) {\r\n // A date-only value in a date-time control means midnight.\r\n parts.h = 0;\r\n parts.n = 0;\r\n }\r\n return sirioCanonical(parts, mode);\r\n}\r\n\r\n/** Converts a canonical value into a local Date (date: midnight; time: today). */\r\nexport function sirioCanonicalToDate(value: string): Date {\r\n const match = /^(?:(\\d{4})-(\\d{2})-(\\d{2}))?T?(?:(\\d{2}):(\\d{2}))?$/.exec(value);\r\n const now = new Date();\r\n if (!match) {\r\n return new Date(NaN);\r\n }\r\n return new Date(\r\n match[1] ? Number(match[1]) : now.getFullYear(),\r\n match[2] ? Number(match[2]) - 1 : now.getMonth(),\r\n match[3] ? Number(match[3]) : now.getDate(),\r\n match[4] ? Number(match[4]) : 0,\r\n match[5] ? Number(match[5]) : 0,\r\n );\r\n}\r\n","import { computed, Directive, inject, input, LOCALE_ID } from '@angular/core';\r\nimport { AbstractControl, ValidationErrors, Validator } from '@angular/forms';\r\nimport { SirioControlBase } from '../core/sirio-control-base';\r\nimport { SirioTextAlign } from '../core/sirio-text-align';\r\nimport {\r\n sirioCanonicalToDate,\r\n SirioDateTimeLayout,\r\n SirioDateTimeMode,\r\n sirioDateTimeLayout,\r\n sirioDateTimePlaceholder,\r\n sirioFormatDateTime,\r\n sirioMaskDateTime,\r\n sirioParseDateTime,\r\n sirioToCanonical,\r\n} from './sirio-datetime-utils';\r\n\r\n/**\r\n * Model format for date and date-time controls: ISO string or JavaScript Date (local time).\r\n * 'iso-seconds' is the ISO string with seconds (always ':00') for the values with a time:\r\n * 'yyyy-MM-ddTHH:mm:ss' in wm-sirio-datetime (e.g. for FEEL `date and time()`); in wm-sirio-date it is 'iso'.\r\n */\r\nexport type SirioDateValueType = 'iso' | 'iso-seconds' | 'date';\r\n\r\n/**\r\n * Shared logic of wm-sirio-date, wm-sirio-time and wm-sirio-datetime (the pickers are the Sirio web kit ones:\r\n * VanillaJS Datepicker styled by the kit for dates, the Sirio timepicker panel for times).\r\n *\r\n * - Internal value: canonical local string ('yyyy-MM-dd', 'HH:mm', 'yyyy-MM-ddTHH:mm').\r\n * - Validation: only incomplete/invalid text (`sirioDateTime`), shown when the field is left (not while\r\n * typing).\r\n * - `min`/`max`: values outside them are disabled in the pickers, and a typed value outside them is\r\n * moved to the nearest limit when the field is left. They never produce validation errors.\r\n */\r\n@Directive()\r\nexport abstract class SirioDateTimeBase extends SirioControlBase<string> implements Validator {\r\n /** Kind of value handled by the concrete control. */\r\n protected abstract readonly mode: SirioDateTimeMode;\r\n\r\n /** Lower limit: earlier values are disabled in the picker and typed ones are moved up to it. */\r\n readonly min = input<string | Date | null>(null);\r\n /** Upper limit: later values are disabled in the picker and typed ones are moved down to it. */\r\n readonly max = input<string | Date | null>(null);\r\n /** Text alignment inside the field (null = Sirio default). */\r\n readonly textAlign = input<SirioTextAlign | null>(null);\r\n\r\n protected override readonly showErrorsWhenDirty = false;\r\n /** \"Invalid date\" is more useful than \"required\" when something was typed. */\r\n protected override readonly errorPriority = ['sirioDateTime'];\r\n\r\n protected readonly locale = inject(LOCALE_ID);\r\n protected readonly minCanonical = computed(() => sirioToCanonical(this.min(), this.mode));\r\n protected readonly maxCanonical = computed(() => sirioToCanonical(this.max(), this.mode));\r\n\r\n /** True while the user is in one of the fields: partial text is not reported yet. */\r\n protected focused = false;\r\n private onValidatorChange: () => void = () => {};\r\n\r\n /** True when the user typed something that is not (yet) a complete, valid value. */\r\n protected abstract hasPartialText(): boolean;\r\n\r\n protected override fromModel(value: unknown): string | null {\r\n return sirioToCanonical(value, this.mode);\r\n }\r\n\r\n // ---- Validator ------------------------------------------------------------------------------\r\n validate(control: AbstractControl): ValidationErrors | null {\r\n const value = this.fromModel(control.value);\r\n if (value === null) {\r\n return this.hasPartialText() && !this.focused ? { sirioDateTime: { mode: this.mode } } : null;\r\n }\r\n return null;\r\n }\r\n\r\n registerOnValidatorChange(fn: () => void): void {\r\n this.onValidatorChange = fn;\r\n }\r\n\r\n /** Re-runs the validation (e.g. when the field is left with partial text). */\r\n protected revalidate(): void {\r\n this.onValidatorChange();\r\n }\r\n\r\n // ---- Helpers --------------------------------------------------------------------------------\r\n /** Part of a value compared with the limits (wm-sirio-date: first day of the month/year with pickLevel). */\r\n protected periodOf(value: string): string {\r\n return value;\r\n }\r\n\r\n /** The value moved to the nearest limit when it is outside min/max (null stays null). */\r\n protected clampToLimits(value: string | null): string | null {\r\n if (value === null) {\r\n return null;\r\n }\r\n const min = this.minCanonical();\r\n const max = this.maxCanonical();\r\n const current = this.periodOf(value);\r\n // Canonical strings compare correctly as text (same fixed-width format).\r\n if (min && current < this.periodOf(min)) {\r\n return this.periodOf(min);\r\n }\r\n if (max && current > this.periodOf(max)) {\r\n return this.periodOf(max);\r\n }\r\n return value;\r\n }\r\n\r\n protected layoutOf(mode: SirioDateTimeMode): SirioDateTimeLayout {\r\n return sirioDateTimeLayout(mode, this.locale);\r\n }\r\n\r\n protected placeholderOf(mode: SirioDateTimeMode): string {\r\n return sirioDateTimePlaceholder(this.layoutOf(mode), this.locale);\r\n }\r\n\r\n /**\r\n * Masks the text of an input element in place (digits only, separators added automatically)\r\n * and returns it with the parsed canonical value (null when incomplete or not a real date/time).\r\n */\r\n protected maskInput(\r\n el: HTMLInputElement,\r\n mode: SirioDateTimeMode,\r\n layout: SirioDateTimeLayout = this.layoutOf(mode),\r\n ): { text: string; value: string | null } {\r\n const { text, caret, complete } = sirioMaskDateTime(\r\n el.value,\r\n el.selectionStart ?? el.value.length,\r\n layout,\r\n );\r\n if (text !== el.value) {\r\n el.value = text;\r\n el.setSelectionRange(caret, caret);\r\n }\r\n return { text, value: complete ? sirioParseDateTime(text, layout, mode) : null };\r\n }\r\n\r\n protected formatOf(\r\n value: string | null,\r\n mode: SirioDateTimeMode,\r\n layout: SirioDateTimeLayout = this.layoutOf(mode),\r\n ): string {\r\n return sirioFormatDateTime(value, layout);\r\n }\r\n\r\n /**\r\n * True when an empty value is written back while the user is typing an incomplete date/time\r\n * (the model is already empty): the typed text is kept. This happens when the same empty value\r\n * returns from the form, e.g. two controls bound to the same field or an app re-writing the value.\r\n */\r\n protected override isTypingIncomplete(): boolean {\r\n return this.focused && this.hasPartialText();\r\n }\r\n\r\n protected keepsTypedText(value: unknown): boolean {\r\n return this.focused && this.value() === null && this.fromModel(value) === null && this.hasPartialText();\r\n }\r\n\r\n protected toDateModel(value: string | null, valueType: SirioDateValueType): unknown {\r\n if (value === null) {\r\n return null;\r\n }\r\n if (valueType === 'date') {\r\n return sirioCanonicalToDate(value);\r\n }\r\n // Seconds are not edited: always ':00' when the value has a time ('...THH:mm').\r\n return valueType === 'iso-seconds' && /\\d{2}:\\d{2}$/.test(value) ? `${value}:00` : value;\r\n }\r\n}\r\n","// VanillaJS Datepicker ships no typings.\r\n// @ts-ignore\r\nimport { Datepicker as DatepickerJs } from 'vanillajs-datepicker';\r\n\r\n/*\r\n * Minimal typings of VanillaJS Datepicker (https://mymth.github.io/vanillajs-datepicker/),\r\n * the date picker documented by the Sirio web kit guide. Only the API used by ngx-sirio.\r\n */\r\nexport interface DatepickerFormat {\r\n toValue(text: string, format: DatepickerFormat, locale: unknown): Date | number | undefined;\r\n toDisplay(date: Date, format: DatepickerFormat, locale: unknown): string;\r\n}\r\n\r\nexport interface DatepickerOptions {\r\n autohide?: boolean;\r\n buttonClass?: string;\r\n format?: string | DatepickerFormat;\r\n language?: string;\r\n maxDate?: Date | null;\r\n minDate?: Date | null;\r\n nextArrow?: string;\r\n /** 0 = days, 1 = months, 2 = years: the view where a click selects. */\r\n pickLevel?: number;\r\n prevArrow?: string;\r\n showOnFocus?: boolean;\r\n /** View shown when the picker opens (same values as pickLevel). */\r\n startView?: number;\r\n updateOnBlur?: boolean;\r\n weekStart?: number;\r\n}\r\n\r\nexport type DatepickerLocale = Record<string, string | string[] | number>;\r\n\r\nexport interface Datepicker {\r\n /** Selected dates (time values at local midnight). */\r\n dates: number[];\r\n readonly active: boolean;\r\n readonly picker: { element: HTMLElement; currentView: { id: number } };\r\n show(): void;\r\n hide(): void;\r\n refresh(target?: 'picker' | 'input', forceRender?: boolean): void;\r\n setOptions(options: DatepickerOptions): void;\r\n destroy(): Datepicker;\r\n}\r\n\r\nexport interface DatepickerConstructor {\r\n locales: Record<string, DatepickerLocale>;\r\n new (element: HTMLElement, options?: DatepickerOptions): Datepicker;\r\n}\r\n\r\nexport const Datepicker = DatepickerJs as DatepickerConstructor;\r\n","import {\r\n afterNextRender,\r\n Directive,\r\n effect,\r\n ElementRef,\r\n inject,\r\n input,\r\n LOCALE_ID,\r\n OnDestroy,\r\n output,\r\n untracked,\r\n} from '@angular/core';\r\nimport { Datepicker, DatepickerFormat } from './vanillajs-datepicker';\r\nimport {\r\n sirioCanonicalToDate,\r\n sirioDateLayout,\r\n SirioDatePickLevel,\r\n sirioFormatDateTime,\r\n sirioParseDateTime,\r\n} from './sirio-datetime-utils';\r\n\r\n/** VanillaJS Datepicker view ids of the pick levels. */\r\nconst PICK_LEVEL_ID: Record<SirioDatePickLevel, number> = { date: 0, month: 1, year: 2 };\r\n\r\n/**\r\n * Italian locale of the Sirio web kit guide (form.html, \"Inizializzazione Calendario VanillaJs\r\n * Datepicker\"): full month names in the header and three-letter week days, as in the kit design.\r\n */\r\nconst SIRIO_LOCALE_IT = {\r\n days: ['Domenica', 'Lunedì', 'Martedì', 'Mercoledì', 'Giovedì', 'Venerdì', 'Sabato'],\r\n daysShort: ['Dom', 'Lun', 'Mar', 'Mer', 'Gio', 'Ven', 'Sab'],\r\n daysMin: ['Dom', 'Lun', 'Mar', 'Mer', 'Gio', 'Ven', 'Sab'],\r\n months: [\r\n 'Gennaio', 'Febbraio', 'Marzo', 'Aprile', 'Maggio', 'Giugno',\r\n 'Luglio', 'Agosto', 'Settembre', 'Ottobre', 'Novembre', 'Dicembre',\r\n ],\r\n monthsShort: [\r\n 'Gennaio', 'Febbraio', 'Marzo', 'Aprile', 'Maggio', 'Giugno',\r\n 'Luglio', 'Agosto', 'Settembre', 'Ottobre', 'Novembre', 'Dicembre',\r\n ],\r\n today: 'Oggi',\r\n monthsTitle: 'Mesi',\r\n clear: 'Cancella',\r\n format: 'dd/mm/yyyy',\r\n weekStart: 1,\r\n};\r\n\r\n/** Accessible names of the header buttons per view (kit guide locale: btnPrevMonth, ...). */\r\nconst SIRIO_HEADER_LABELS_IT: readonly { prev: string; next: string; switch: string | null }[] = [\r\n { prev: 'Mese precedente', next: 'Mese successivo', switch: 'Cambia il mese' },\r\n { prev: 'Anno precedente', next: 'Anno successivo', switch: \"Cambia l'anno\" },\r\n { prev: 'Decennio precedente', next: 'Decennio successivo', switch: 'Cambia il decennio' },\r\n { prev: 'Secolo precedente', next: 'Secolo successivo', switch: null },\r\n];\r\nconst SIRIO_HEADER_LABELS_EN: readonly { prev: string; next: string; switch: string | null }[] = [\r\n { prev: 'Previous month', next: 'Next month', switch: 'Change month' },\r\n { prev: 'Previous year', next: 'Next year', switch: 'Change year' },\r\n { prev: 'Previous decade', next: 'Next decade', switch: 'Change decade' },\r\n { prev: 'Previous century', next: 'Next century', switch: null },\r\n];\r\n\r\nlet localeRegistered = false;\r\n\r\nfunction registerSirioLocale(): void {\r\n if (!localeRegistered) {\r\n localeRegistered = true;\r\n Datepicker.locales['it'] = { ...Datepicker.locales['en'], ...SIRIO_LOCALE_IT };\r\n }\r\n}\r\n\r\n/** Time value of the local midnight of a date (the unit used by the picker for selections). */\r\nfunction dayValue(date: Date): number {\r\n return new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime();\r\n}\r\n\r\n/**\r\n * Attaches the date picker of the Sirio web kit guide — **VanillaJS Datepicker**, styled by the kit\r\n * CSS (`css/datepicker.min.css` + the `.datepicker*` rules of `webkit.min.css`) — to an input\r\n * `.sirio-form-control.sirio-datepicker`, with the guide configuration: Italian locale, week from\r\n * Monday, `fa-angle-left/right` arrows, autohide.\r\n *\r\n * The owning component stays the only writer of the text: the picker parses with the strict Sirio\r\n * parser, never rewrites the field on blur, and its selection follows the `date` input.\r\n * The picker element is inserted right after the input (wrap it in a `position: relative` box).\r\n *\r\n * Internal building block of wm-sirio-date and wm-sirio-datetime.\r\n */\r\n@Directive({\r\n selector: 'input[wmSirioDatePicker]',\r\n host: {\r\n '(changeDate)': 'onChangeDate()',\r\n '(show)': 'labelHeader()',\r\n '(changeView)': 'labelHeader()',\r\n },\r\n})\r\nexport class SirioDatePickerDirective implements OnDestroy {\r\n /** Selected day (null: none). */\r\n readonly date = input<Date | null>(null);\r\n readonly minDate = input<Date | null>(null);\r\n readonly maxDate = input<Date | null>(null);\r\n /** What a click selects: a day (default), a month or a year. */\r\n readonly pickLevel = input<SirioDatePickLevel>('date');\r\n /** Opens the picker when the field gets the focus (false: only on click or ArrowDown). */\r\n readonly showOnFocus = input(true);\r\n /** Day chosen in the picker (local midnight; first day of the month/year with the other levels). */\r\n readonly dateSelected = output<Date>();\r\n\r\n private readonly element = inject<ElementRef<HTMLInputElement>>(ElementRef).nativeElement;\r\n private readonly locale = inject(LOCALE_ID);\r\n private readonly italian = this.locale.toLowerCase().startsWith('it');\r\n private picker: Datepicker | null = null;\r\n\r\n constructor() {\r\n afterNextRender(() => this.create());\r\n // Another pick level needs another format and views: the picker is created again.\r\n effect(() => {\r\n this.pickLevel();\r\n untracked(() => {\r\n if (this.picker) {\r\n this.ngOnDestroy();\r\n this.create();\r\n }\r\n });\r\n });\r\n effect(() => {\r\n const minDate = this.minDate();\r\n const maxDate = this.maxDate();\r\n untracked(() => {\r\n // A hidden picker is not re-rendered by setOptions: force it (disabled days).\r\n this.picker?.setOptions({ minDate, maxDate });\r\n this.picker?.refresh('picker', true);\r\n });\r\n });\r\n effect(() => {\r\n const showOnFocus = this.showOnFocus();\r\n untracked(() => this.picker?.setOptions({ showOnFocus }));\r\n });\r\n effect(() => {\r\n const date = this.date();\r\n untracked(() => this.select(date));\r\n });\r\n }\r\n\r\n ngOnDestroy(): void {\r\n try {\r\n this.picker?.destroy();\r\n } catch {\r\n // The picker may already be detached from the DOM.\r\n }\r\n this.picker = null;\r\n }\r\n\r\n protected onChangeDate(): void {\r\n const value = this.picker?.dates[0];\r\n if (value !== undefined) {\r\n this.dateSelected.emit(new Date(value));\r\n }\r\n }\r\n\r\n /** Gives the icon-only header buttons an accessible name for the current view. */\r\n protected labelHeader(): void {\r\n const picker = this.picker;\r\n if (!picker) {\r\n return;\r\n }\r\n const labels = (this.italian ? SIRIO_HEADER_LABELS_IT : SIRIO_HEADER_LABELS_EN)[\r\n picker.picker.currentView.id\r\n ];\r\n const root = picker.picker.element;\r\n const set = (selector: string, label: string | null) => {\r\n const button = root.querySelector<HTMLElement>(selector);\r\n if (button && label) {\r\n button.setAttribute('aria-label', label);\r\n button.setAttribute('title', label);\r\n } else {\r\n button?.removeAttribute('aria-label');\r\n }\r\n };\r\n set('.prev-button', labels?.prev ?? null);\r\n set('.next-button', labels?.next ?? null);\r\n // The view switch keeps its visible text (\"Ottobre 2026\") and describes the action.\r\n const viewSwitch = root.querySelector<HTMLElement>('.view-switch');\r\n if (viewSwitch) {\r\n if (labels?.switch) {\r\n viewSwitch.setAttribute('title', labels.switch);\r\n } else {\r\n viewSwitch.removeAttribute('title');\r\n }\r\n }\r\n }\r\n\r\n private create(): void {\r\n registerSirioLocale();\r\n const level = this.pickLevel();\r\n const layout = sirioDateLayout(this.locale, level);\r\n const format: DatepickerFormat = {\r\n // Strict parsing (no \"31/02\" -> 03/03 or \"ab\" -> today): invalid text selects nothing.\r\n toValue: (text) => {\r\n const canonical = sirioParseDateTime(text, layout, 'date');\r\n return canonical ? sirioCanonicalToDate(canonical) : undefined;\r\n },\r\n toDisplay: (date) => sirioFormatDateTime(this.isoOf(date), layout),\r\n };\r\n const picker = new Datepicker(this.element, {\r\n format,\r\n language: this.italian ? 'it' : 'en',\r\n weekStart: this.italian ? 1 : 0,\r\n prevArrow: '<span class=\"fas fa-angle-left\" aria-hidden=\"true\"></span>',\r\n nextArrow: '<span class=\"fas fa-angle-right\" aria-hidden=\"true\"></span>',\r\n autohide: true,\r\n updateOnBlur: false,\r\n showOnFocus: this.showOnFocus(),\r\n pickLevel: PICK_LEVEL_ID[level],\r\n startView: PICK_LEVEL_ID[level],\r\n minDate: this.minDate(),\r\n maxDate: this.maxDate(),\r\n });\r\n // The component owns the text: the picker must not rewrite the field (it would revert the\r\n // text being typed when the focus leaves). Picker refreshes are kept.\r\n const refresh = picker.refresh.bind(picker);\r\n picker.refresh = (target, forceRender) => {\r\n if (target !== 'input') {\r\n refresh(target ?? 'picker', forceRender);\r\n }\r\n };\r\n this.picker = picker;\r\n this.select(this.date());\r\n this.labelHeader();\r\n }\r\n\r\n /** Aligns the picker selection with the component value, without touching the text. */\r\n private select(date: Date | null): void {\r\n const picker = this.picker;\r\n if (!picker) {\r\n return;\r\n }\r\n const valid = date && !isNaN(date.getTime());\r\n const dates = valid ? [dayValue(date)] : [];\r\n if (dates.join() !== picker.dates.join()) {\r\n picker.dates = dates;\r\n picker.refresh('picker');\r\n }\r\n }\r\n\r\n private isoOf(date: Date): string {\r\n const pad = (n: number) => String(n).padStart(2, '0');\r\n return `${String(date.getFullYear()).padStart(4, '0')}-${pad(date.getMonth() + 1)}-${pad(date.getDate())}`;\r\n }\r\n}\r\n","import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n computed,\r\n input,\r\n numberAttribute,\r\n output,\r\n} from '@angular/core';\r\n\r\ntype TimePart = 'hour' | 'minute';\r\n\r\nfunction pad(value: number): string {\r\n return String(value).padStart(2, '0');\r\n}\r\n\r\n/**\r\n * Time panel of the Sirio web kit timepicker, with the same markup the kit script generates for\r\n * `<input class=\"sirio-timepicker\" data-sirio-component=\"timepicker\">`:\r\n * `.sirio-dropdown-menu.sirio-dropdown-timepicker` with hour and minute columns\r\n * (`sirio-btn sirio-btn-icon` up/down buttons around a spinbutton input) and the separator.\r\n * Must be placed inside the `.sirio-dropdown` that contains the time field.\r\n *\r\n * Keyboard (as in the kit): Tab from the time field enters the hours, Tab again the minutes;\r\n * Arrow Up/Down change the value, digits can be typed, Esc closes.\r\n *\r\n * Internal building block of wm-sirio-time and wm-sirio-datetime.\r\n */\r\n@Component({\r\n selector: 'wm-sirio-timepicker-panel',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n styleUrl: './sirio-timepicker-panel.scss',\r\n templateUrl: './sirio-timepicker-panel.html',\r\n})\r\nexport class SirioTimepickerPanel {\r\n /** Current time 'HH:mm' (null = empty field: the panel starts from the current time). */\r\n readonly time = input<string | null>(null);\r\n readonly open = input(false);\r\n readonly disabled = input(false);\r\n /** Minutes added/removed by the arrows. */\r\n readonly minuteStep = input(1, { transform: numberAttribute });\r\n\r\n /** New time chosen in the panel ('HH:mm'). */\r\n readonly timeChange = output<string>();\r\n /** Esc pressed in the panel. */\r\n readonly closeRequest = output<void>();\r\n\r\n protected readonly pad = pad;\r\n\r\n /** Starting point when the field is empty: the current time, as in the kit. */\r\n private readonly now = new Date();\r\n\r\n protected readonly hour = computed(() => {\r\n const time = this.time();\r\n return time ? Number(time.slice(0, 2)) : this.now.getHours();\r\n });\r\n\r\n protected readonly minute = computed(() => {\r\n const time = this.time();\r\n return time ? Number(time.slice(3, 5)) : this.now.getMinutes();\r\n });\r\n\r\n protected step(part: TimePart, direction: 1 | -1): void {\r\n if (part === 'hour') {\r\n this.emit((this.hour() + direction + 24) % 24, this.minute());\r\n } else {\r\n const step = Math.max(1, this.minuteStep());\r\n this.emit(this.hour(), (this.minute() + direction * step + 60) % 60);\r\n }\r\n }\r\n\r\n protected onKeydown(event: KeyboardEvent, part: TimePart): void {\r\n switch (event.key) {\r\n case 'ArrowUp':\r\n this.step(part, 1);\r\n break;\r\n case 'ArrowDown':\r\n this.step(part, -1);\r\n break;\r\n case 'Escape':\r\n this.closeRequest.emit();\r\n break;\r\n default:\r\n return;\r\n }\r\n event.preventDefault();\r\n }\r\n\r\n /** Digits typed in the hour/minute box: applied when they form a valid value. */\r\n protected onType(event: Event, part: TimePart): void {\r\n const el = event.target as HTMLInputElement;\r\n const digits = el.value.replace(/\\D/g, '').slice(0, 2);\r\n if (digits !== el.value) {\r\n el.value = digits;\r\n }\r\n const n = Number(digits);\r\n const max = part === 'hour' ? 23 : 59;\r\n if (digits.length && n <= max) {\r\n if (part === 'hour') {\r\n this.emit(n, this.minute());\r\n } else {\r\n this.emit(this.hour(), n);\r\n }\r\n }\r\n }\r\n\r\n /** Leaving the box: shows the current value again (pads \"7\" to \"07\", drops invalid text). */\r\n protected onPartBlur(event: FocusEvent, part: TimePart): void {\r\n (event.target as HTMLInputElement).value = pad(part === 'hour' ? this.hour() : this.minute());\r\n }\r\n\r\n /** Clicks on the panel background must not steal the focus from the inputs. */\r\n protected onPanelMouseDown(event: MouseEvent): void {\r\n if ((event.target as HTMLElement).tagName !== 'INPUT') {\r\n event.preventDefault();\r\n }\r\n }\r\n\r\n private emit(hour: number, minute: number): void {\r\n this.timeChange.emit(`${pad(hour)}:${pad(minute)}`);\r\n }\r\n}\r\n","<div\r\n class=\"sirio-dropdown-menu sirio-dropdown-timepicker\"\r\n [attr.data-sirio-visible]=\"open()\"\r\n (mousedown)=\"onPanelMouseDown($event)\"\r\n>\r\n <div class=\"sirio-dropdown-timepicker-hour\">\r\n <button\r\n class=\"sirio-btn sirio-btn-icon\"\r\n type=\"button\"\r\n title=\"Incrementa ora\"\r\n tabindex=\"-1\"\r\n aria-hidden=\"true\"\r\n [disabled]=\"disabled()\"\r\n (click)=\"step('hour', 1)\"\r\n >\r\n <span class=\"fas fa-angle-up\" aria-hidden=\"true\"></span>\r\n </button>\r\n <input\r\n type=\"text\"\r\n inputmode=\"numeric\"\r\n maxlength=\"2\"\r\n aria-label=\"Scegli ora\"\r\n role=\"spinbutton\"\r\n aria-valuemin=\"0\"\r\n aria-valuemax=\"23\"\r\n [attr.aria-valuenow]=\"hour()\"\r\n [tabindex]=\"open() ? 0 : -1\"\r\n [disabled]=\"disabled()\"\r\n [value]=\"pad(hour())\"\r\n (keydown)=\"onKeydown($event, 'hour')\"\r\n (input)=\"onType($event, 'hour')\"\r\n (blur)=\"onPartBlur($event, 'hour')\"\r\n />\r\n <button\r\n class=\"sirio-btn sirio-btn-icon\"\r\n type=\"button\"\r\n title=\"Decrementa ora\"\r\n tabindex=\"-1\"\r\n aria-hidden=\"true\"\r\n [disabled]=\"disabled()\"\r\n (click)=\"step('hour', -1)\"\r\n >\r\n <span class=\"fas fa-angle-down\" aria-hidden=\"true\"></span>\r\n </button>\r\n </div>\r\n <div class=\"sirio-dropdown-timepicker-sep\" aria-hidden=\"true\"></div>\r\n <div class=\"sirio-dropdown-timepicker-min\">\r\n <button\r\n class=\"sirio-btn sirio-btn-icon\"\r\n type=\"button\"\r\n title=\"Incrementa minuti\"\r\n tabindex=\"-1\"\r\n aria-hidden=\"true\"\r\n [disabled]=\"disabled()\"\r\n (click)=\"step('minute', 1)\"\r\n >\r\n <span class=\"fas fa-angle-up\" aria-hidden=\"true\"></span>\r\n </button>\r\n <input\r\n type=\"text\"\r\n inputmode=\"numeric\"\r\n maxlength=\"2\"\r\n aria-label=\"Scegli minuti\"\r\n role=\"spinbutton\"\r\n aria-valuemin=\"0\"\r\n aria-valuemax=\"59\"\r\n [attr.aria-valuenow]=\"minute()\"\r\n [tabindex]=\"open() ? 0 : -1\"\r\n [disabled]=\"disabled()\"\r\n [value]=\"pad(minute())\"\r\n (keydown)=\"onKeydown($event, 'minute')\"\r\n (input)=\"onType($event, 'minute')\"\r\n (blur)=\"onPartBlur($event, 'minute')\"\r\n />\r\n <button\r\n class=\"sirio-btn sirio-btn-icon\"\r\n type=\"button\"\r\n title=\"Decrementa minuti\"\r\n tabindex=\"-1\"\r\n aria-hidden=\"true\"\r\n [disabled]=\"disabled()\"\r\n (click)=\"step('minute', -1)\"\r\n >\r\n <span class=\"fas fa-angle-down\" aria-hidden=\"true\"></span>\r\n </button>\r\n </div>\r\n</div>\r\n","import {\r\n booleanAttribute,\r\n ChangeDetectionStrategy,\r\n Component,\r\n computed,\r\n effect,\r\n ElementRef,\r\n input,\r\n signal,\r\n untracked,\r\n viewChild,\r\n} from '@angular/core';\r\nimport { provideSirioControl } from '../core/sirio-control-base';\r\nimport { SirioDatePickerDirective } from '../datetime/sirio-datepicker';\r\nimport { SirioDateTimeBase, SirioDateValueType } from '../datetime/sirio-datetime-base';\r\nimport {\r\n sirioCanonicalToDate,\r\n sirioDateLayout,\r\n SirioDatePickLevel,\r\n sirioDateTimePlaceholder,\r\n sirioLayoutLength,\r\n sirioPeriodStart,\r\n} from '../datetime/sirio-datetime-utils';\r\nimport { SirioField } from '../field/sirio-field';\r\n\r\n/** 'yyyy-MM-dd' of a local Date. */\r\nfunction isoDate(date: Date): string {\r\n const pad = (n: number) => String(n).padStart(2, '0');\r\n return `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())}`;\r\n}\r\n\r\n/**\r\n * Date field of the Sirio web kit (\"Datepicker\"):\r\n * `input.sirio-form-control.sirio-datepicker` (calendar icon in the field, placeholder gg/mm/aaaa,\r\n * maxlength 10) with the date picker of the kit guide (VanillaJS Datepicker styled by the kit CSS),\r\n * opened by focus or click; arrows move the day, Enter selects, Esc closes.\r\n * Typing is masked (separators added automatically).\r\n *\r\n * Model: 'yyyy-MM-dd' (valueType 'iso', default) or Date at local midnight (valueType 'date').\r\n *\r\n * `pickLevel` decides what is picked: a full date (default), a month ('month': field mm/aaaa, the picker\r\n * opens on the months) or a year ('year': field aaaa, picker on the years). The model is still a date:\r\n * the first day of the chosen month or year ('2026-03-01', '2026-01-01').\r\n *\r\n * ```html\r\n * <wm-sirio-date label=\"Data di nascita\" max=\"2026-12-31\" formControlName=\"birthDate\" />\r\n * <wm-sirio-date label=\"Mese di competenza\" pickLevel=\"month\" formControlName=\"month\" />\r\n * ```\r\n */\r\n@Component({\r\n selector: 'wm-sirio-date',\r\n imports: [SirioField, SirioDatePickerDirective],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [provideSirioControl(() => SirioDate, { validator: true })],\r\n styleUrl: '../datetime/sirio-datetime.scss',\r\n templateUrl: './sirio-date.html',\r\n})\r\nexport class SirioDate extends SirioDateTimeBase {\r\n protected readonly mode = 'date' as const;\r\n\r\n /** Model format: ISO 'yyyy-MM-dd' or Date. */\r\n readonly valueType = input<SirioDateValueType>('iso');\r\n /**\r\n * When true the picker does not open by itself when the field gets the focus (e.g. moving with Tab):\r\n * it opens with a click on the field or with ArrowDown.\r\n */\r\n readonly hideOnFocus = input(false, { transform: booleanAttribute });\r\n /** What is picked: a full date, a month (mm/aaaa) or a year (aaaa). */\r\n readonly pickLevel = input<SirioDatePickLevel>('date');\r\n\r\n /** Layout of the field for the pick level. */\r\n protected readonly layout = computed(() => sirioDateLayout(this.locale, this.pickLevel()));\r\n protected readonly maxLength = computed(() => sirioLayoutLength(this.layout()));\r\n protected readonly defaultPlaceholder = computed(() =>\r\n sirioDateTimePlaceholder(this.layout(), this.locale),\r\n );\r\n\r\n private readonly fieldRef = viewChild<ElementRef<HTMLInputElement>>('field');\r\n\r\n protected readonly text = signal('');\r\n /** Selection shown by the picker. */\r\n protected readonly pickerDate = computed(() => {\r\n const value = this.value();\r\n return value ? sirioCanonicalToDate(sirioPeriodStart(value, this.pickLevel())) : null;\r\n });\r\n protected readonly minDate = computed(() => {\r\n const min = this.minCanonical();\r\n return min ? sirioCanonicalToDate(min) : null;\r\n });\r\n protected readonly maxDate = computed(() => {\r\n const max = this.maxCanonical();\r\n return max ? sirioCanonicalToDate(max) : null;\r\n });\r\n\r\n constructor() {\r\n super();\r\n // Another pick level: show the value in the new format.\r\n effect(() => {\r\n this.layout();\r\n untracked(() => {\r\n this.setText(this.formatOf(this.value(), 'date', this.layout()));\r\n });\r\n });\r\n }\r\n\r\n protected override periodOf(value: string): string {\r\n return sirioPeriodStart(value, this.pickLevel());\r\n }\r\n\r\n protected override hasPartialText(): boolean {\r\n return !!this.text() && this.value() === null;\r\n }\r\n\r\n override writeValue(value: unknown): void {\r\n if (this.keepsTypedText(value)) {\r\n return;\r\n }\r\n super.writeValue(value as string | null);\r\n this.setText(this.formatOf(this.value(), 'date', this.layout()));\r\n }\r\n\r\n protected override toModel(value: string | null): unknown {\r\n return this.toDateModel(value, this.valueType());\r\n }\r\n\r\n protected onInput(event: Event): void {\r\n const { text, value } = this.maskInput(event.target as HTMLInputElement, 'date', this.layout());\r\n this.text.set(text);\r\n if (value !== this.value()) {\r\n this.updateValue(value);\r\n }\r\n }\r\n\r\n protected onBlur(): void {\r\n this.focused = false;\r\n // A typed value outside min/max goes to the nearest limit.\r\n const clamped = this.clampToLimits(this.value());\r\n if (clamped !== this.value()) {\r\n this.updateValue(clamped);\r\n }\r\n if (this.value() !== null) {\r\n this.setText(this.formatOf(this.value(), 'date', this.layout()));\r\n }\r\n this.markTouched();\r\n this.revalidate();\r\n }\r\n\r\n /** Day (or month / year) chosen in the picker. */\r\n protected onPicked(date: Date): void {\r\n const value = sirioPeriodStart(isoDate(date), this.pickLevel());\r\n this.setText(this.formatOf(value, 'date', this.layout()));\r\n this.updateValue(value);\r\n this.markTouched();\r\n }\r\n\r\n /** Updates the text (also the element: the picker writes it directly on selection). */\r\n private setText(text: string): void {\r\n this.text.set(text);\r\n const el = this.fieldRef()?.nativeElement;\r\n if (el && el.value !== text) {\r\n el.value = text;\r\n }\r\n }\r\n}\r\n","<wm-sirio-field\r\n [inputId]=\"inputId()\"\r\n [helpId]=\"helpId()\"\r\n [errorId]=\"errorId()\"\r\n [label]=\"label()\"\r\n [helpText]=\"helpText()\"\r\n [required]=\"isRequired()\"\r\n [errorMessage]=\"feedbackMessage()\"\r\n [state]=\"validationState()\"\r\n>\r\n <!-- The picker element is inserted after the input, positioned inside this box. -->\r\n <div class=\"sirio-datepicker-container\">\r\n <input\r\n #field\r\n wmSirioDatePicker\r\n type=\"text\"\r\n class=\"sirio-form-control sirio-datepicker\"\r\n autocomplete=\"off\"\r\n inputmode=\"numeric\"\r\n [attr.maxlength]=\"maxLength()\"\r\n [date]=\"pickerDate()\"\r\n [minDate]=\"minDate()\"\r\n [maxDate]=\"maxDate()\"\r\n [pickLevel]=\"pickLevel()\"\r\n [showOnFocus]=\"!hideOnFocus()\"\r\n [style.text-align]=\"textAlign()\"\r\n [class.sirio-is-invalid]=\"showError()\"\r\n [class.sirio-is-valid]=\"validationState() === 'valid'\"\r\n [class.sirio-is-warning]=\"validationState() === 'warning'\"\r\n [class.filled]=\"!!text()\"\r\n [id]=\"inputId()\"\r\n [attr.aria-label]=\"ariaLabel() || null\"\r\n [attr.name]=\"name()\"\r\n [value]=\"text()\"\r\n [placeholder]=\"placeholder() || defaultPlaceholder()\"\r\n [disabled]=\"isDisabled()\"\r\n [readOnly]=\"readonly()\"\r\n [attr.aria-required]=\"isRequired() || null\"\r\n [attr.aria-invalid]=\"showError() || null\"\r\n [attr.aria-describedby]=\"describedBy()\"\r\n (input)=\"onInput($event)\"\r\n (focus)=\"focused = true\"\r\n (blur)=\"onBlur()\"\r\n (dateSelected)=\"onPicked($event)\"\r\n />\r\n </div>\r\n</wm-sirio-field>\r\n","import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n ElementRef,\r\n inject,\r\n input,\r\n numberAttribute,\r\n signal,\r\n} from '@angular/core';\r\nimport { provideSirioControl } from '../core/sirio-control-base';\r\nimport { SirioDateTimeBase } from '../datetime/sirio-datetime-base';\r\nimport { SirioTimepickerPanel } from '../datetime/sirio-timepicker-panel';\r\nimport { SirioField } from '../field/sirio-field';\r\n\r\n/**\r\n * Time field of the Sirio web kit (\"Timepicker\"): `input.sirio-form-control.sirio-timepicker`\r\n * (clock icon in the field, placeholder hh:mm) inside `.sirio-dropdown`, with the kit time panel\r\n * (`.sirio-dropdown-timepicker`) that opens when the field is selected. Tab moves into the hours,\r\n * then the minutes. Typing is masked (hh:mm). Model: 'HH:mm' (24h).\r\n *\r\n * ```html\r\n * <wm-sirio-time label=\"Orario di inizio\" min=\"08:00\" max=\"18:00\" formControlName=\"start\" />\r\n * ```\r\n */\r\n@Component({\r\n selector: 'wm-sirio-time',\r\n imports: [SirioField, SirioTimepickerPanel],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [provideSirioControl(() => SirioTime, { validator: true })],\r\n styleUrl: '../datetime/sirio-datetime.scss',\r\n host: {\r\n '(focusout)': 'onFocusOut($event)',\r\n },\r\n templateUrl: './sirio-time.html',\r\n})\r\nexport class SirioTime extends SirioDateTimeBase {\r\n protected readonly mode = 'time' as const;\r\n\r\n /** Minutes added/removed by the panel arrows. */\r\n readonly minuteStep = input(1, { transform: numberAttribute });\r\n\r\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\r\n protected readonly text = signal('');\r\n protected readonly panelOpen = signal(false);\r\n\r\n protected override hasPartialText(): boolean {\r\n return !!this.text() && this.value() === null;\r\n }\r\n\r\n override writeValue(value: unknown): void {\r\n if (this.keepsTypedText(value)) {\r\n return;\r\n }\r\n super.writeValue(value as string | null);\r\n this.text.set(this.formatOf(this.value(), 'time'));\r\n }\r\n\r\n protected canOpen(): boolean {\r\n return !this.isDisabled() && !this.readonly();\r\n }\r\n\r\n /** Set when the focus returns to the field after Esc: the panel must stay closed. */\r\n private keepClosed = false;\r\n\r\n protected onFieldFocus(): void {\r\n this.focused = true;\r\n // Kit behaviour: selecting the field opens the panel.\r\n this.panelOpen.set(!this.keepClosed && this.canOpen());\r\n this.keepClosed = false;\r\n }\r\n\r\n protected onInput(event: Event): void {\r\n const { text, value } = this.maskInput(event.target as HTMLInputElement, 'time');\r\n this.text.set(text);\r\n if (value !== this.value()) {\r\n this.updateValue(value);\r\n }\r\n }\r\n\r\n protected onKeydown(event: KeyboardEvent): void {\r\n if (event.key === 'Escape' && this.panelOpen()) {\r\n this.closePanel(false);\r\n event.preventDefault();\r\n } else if (event.key === 'ArrowDown' && !this.panelOpen()) {\r\n this.panelOpen.set(this.canOpen());\r\n event.preventDefault();\r\n }\r\n }\r\n\r\n protected onFieldBlur(): void {\r\n // A typed time outside min/max goes to the nearest limit.\r\n const clamped = this.clampToLimits(this.value());\r\n if (clamped !== this.value()) {\r\n this.updateValue(clamped);\r\n }\r\n if (this.value() !== null) {\r\n this.text.set(this.formatOf(this.value(), 'time'));\r\n }\r\n this.markTouched();\r\n }\r\n\r\n protected onPanelTime(time: string): void {\r\n this.text.set(this.formatOf(time, 'time'));\r\n this.updateValue(time);\r\n }\r\n\r\n protected closePanel(focusField: boolean): void {\r\n this.panelOpen.set(false);\r\n if (focusField) {\r\n this.keepClosed = true;\r\n this.host.nativeElement.querySelector<HTMLInputElement>('input.sirio-timepicker')?.focus();\r\n }\r\n }\r\n\r\n /** Closes the panel when the focus leaves the whole component (field + panel). */\r\n protected onFocusOut(event: FocusEvent): void {\r\n const next = event.relatedTarget as Node | null;\r\n if (!next || !this.host.nativeElement.contains(next)) {\r\n this.panelOpen.set(false);\r\n this.focused = false;\r\n this.revalidate();\r\n }\r\n }\r\n}\r\n","<wm-sirio-field\r\n [inputId]=\"inputId()\"\r\n [helpId]=\"helpId()\"\r\n [errorId]=\"errorId()\"\r\n [label]=\"label()\"\r\n [helpText]=\"helpText()\"\r\n [required]=\"isRequired()\"\r\n [errorMessage]=\"feedbackMessage()\"\r\n [state]=\"validationState()\"\r\n>\r\n <div class=\"sirio-dropdown\">\r\n <input\r\n type=\"text\"\r\n class=\"sirio-form-control sirio-timepicker\"\r\n autocomplete=\"off\"\r\n inputmode=\"numeric\"\r\n maxlength=\"5\"\r\n [style.text-align]=\"textAlign()\"\r\n [class.sirio-is-invalid]=\"showError()\"\r\n [class.sirio-is-valid]=\"validationState() === 'valid'\"\r\n [class.sirio-is-warning]=\"validationState() === 'warning'\"\r\n [class.filled]=\"!!text()\"\r\n [id]=\"inputId()\"\r\n [attr.aria-label]=\"ariaLabel() || null\"\r\n [attr.name]=\"name()\"\r\n [value]=\"text()\"\r\n [placeholder]=\"placeholder() || placeholderOf('time')\"\r\n [disabled]=\"isDisabled()\"\r\n [readOnly]=\"readonly()\"\r\n [attr.aria-required]=\"isRequired() || null\"\r\n [attr.aria-invalid]=\"showError() || null\"\r\n [attr.aria-describedby]=\"describedBy()\"\r\n (input)=\"onInput($event)\"\r\n (focus)=\"onFieldFocus()\"\r\n (click)=\"panelOpen.set(canOpen())\"\r\n (keydown)=\"onKeydown($event)\"\r\n (blur)=\"onFieldBlur()\"\r\n />\r\n <wm-sirio-timepicker-panel\r\n [time]=\"value()\"\r\n [open]=\"panelOpen()\"\r\n [disabled]=\"isDisabled() || readonly()\"\r\n [minuteStep]=\"minuteStep()\"\r\n (timeChange)=\"onPanelTime($event)\"\r\n (closeRequest)=\"closePanel(true)\"\r\n />\r\n </div>\r\n</wm-sirio-field>\r\n","import {\r\n booleanAttribute,\r\n ChangeDetectionStrategy,\r\n Component,\r\n computed,\r\n ElementRef,\r\n inject,\r\n input,\r\n numberAttribute,\r\n signal,\r\n viewChild,\r\n} from '@angular/core';\r\nimport { provideSirioControl } from '../core/sirio-control-base';\r\nimport { SirioField } from '../field/sirio-field';\r\nimport { SirioDatePickerDirective } from './sirio-datepicker';\r\nimport { SirioDateTimeBase, SirioDateValueType } from './sirio-datetime-base';\r\nimport { sirioCanonicalToDate } from './sirio-datetime-utils';\r\nimport { SirioTimepickerPanel } from './sirio-timepicker-panel';\r\nimport { SirioInfoButton } from '../tooltip/sirio-info-button';\r\n\r\nfunction isoDate(date: Date): string {\r\n const pad = (n: number) => String(n).padStart(2, '0');\r\n return `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())}`;\r\n}\r\n\r\n/**\r\n * Date and time field. The Sirio web kit has no date-time control, so it combines the two kit\r\n * controls side by side: Datepicker (`.sirio-datepicker` + VanillaJS Datepicker of the kit guide) and Timepicker\r\n * (`.sirio-timepicker` + `.sirio-dropdown-timepicker` panel). Both parts are required for a value.\r\n *\r\n * Model: 'yyyy-MM-ddTHH:mm' local, without time zone (valueType 'iso', default), 'yyyy-MM-ddTHH:mm:ss'\r\n * (valueType 'iso-seconds', seconds always 00) or Date (valueType 'date').\r\n *\r\n * - `fieldLabels`: a visible label above each field (`label` above the date, `timeLabel` above the time)\r\n * instead of one label for the group.\r\n * - `completeParts`: when the focus leaves the component with only one part filled in, the other is\r\n * completed (date only: time 00:00; time only: today's date). Without it the value stays empty and the\r\n * incomplete input is an error.\r\n *\r\n * ```html\r\n * <wm-sirio-datetime label=\"Appuntamento\" min=\"2026-01-01T08:00\" formControlName=\"appointment\" />\r\n * ```\r\n */\r\n@Component({\r\n selector: 'wm-sirio-datetime',\r\n imports: [SirioField, SirioDatePickerDirective, SirioTimepickerPanel, SirioInfoButton],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [provideSirioControl(() => SirioDateTime, { validator: true })],\r\n templateUrl: './sirio-datetime.html',\r\n styleUrl: './sirio-datetime.scss',\r\n host: {\r\n '(focusout)': 'onFocusOut($event)',\r\n },\r\n})\r\nexport class SirioDateTime extends SirioDateTimeBase {\r\n protected readonly mode = 'datetime' as const;\r\n\r\n /** Model format: ISO 'yyyy-MM-ddTHH:mm', ISO with seconds 'yyyy-MM-ddTHH:mm:ss' or Date. */\r\n readonly valueType = input<SirioDateValueType>('iso');\r\n /** When true the date picker does not open by itself on focus (click or ArrowDown open it). */\r\n readonly hideOnFocus = input(false, { transform: booleanAttribute });\r\n /** Minutes added/removed by the time panel arrows. */\r\n readonly minuteStep = input(1, { transform: numberAttribute });\r\n /** Accessible name of the time field (visible label too with `fieldLabels`). */\r\n readonly timeLabel = input('Ora');\r\n /** One visible label per field: `label` above the date and `timeLabel` above the time. */\r\n readonly fieldLabels = input(false, { transform: booleanAttribute });\r\n /** Completes a missing part when the component is left: time 00:00 or today's date. */\r\n readonly completeParts = input(false, { transform: booleanAttribute });\r\n\r\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\r\n private readonly dateFieldRef = viewChild<ElementRef<HTMLInputElement>>('dateField');\r\n\r\n protected readonly dateText = signal('');\r\n protected readonly timeText = signal('');\r\n protected readonly panelOpen = signal(false);\r\n\r\n /** Parts typed/chosen so far (canonical), combined into the value when both are present. */\r\n protected readonly datePart = signal<string | null>(null);\r\n protected readonly timePart = signal<string | null>(null);\r\n\r\n /** Selection shown by the date picker. */\r\n protected readonly pickerDate = computed(() => {\r\n const date = this.datePart();\r\n return date ? sirioCanonicalToDate(date) : null;\r\n });\r\n protected readonly minDate = computed(() => {\r\n const min = this.minCanonical();\r\n return min ? sirioCanonicalToDate(min.slice(0, 10)) : null;\r\n });\r\n protected readonly maxDate = computed(() => {\r\n const max = this.maxCanonical();\r\n return max ? sirioCanonicalToDate(max.slice(0, 10)) : null;\r\n });\r\n\r\n protected override hasPartialText(): boolean {\r\n return (!!this.dateText() || !!this.timeText()) && this.value() === null;\r\n }\r\n\r\n override writeValue(value: unknown): void {\r\n if (this.keepsTypedText(value)) {\r\n return;\r\n }\r\n super.writeValue(value as string | null);\r\n const current = this.value();\r\n this.datePart.set(current ? current.slice(0, 10) : null);\r\n this.timePart.set(current ? current.slice(11, 16) : null);\r\n this.timeText.set(this.formatOf(this.timePart(), 'time'));\r\n this.setDateText(this.formatOf(this.datePart(), 'date'));\r\n }\r\n\r\n protected override toModel(value: string | null): unknown {\r\n return this.toDateModel(value, this.valueType());\r\n }\r\n\r\n protected canOpen(): boolean {\r\n return !this.isDisabled() && !this.readonly();\r\n }\r\n\r\n // ---- Date part ------------------------------------------------------------------------------\r\n protected onDateInput(event: Event): void {\r\n const { text, value } = this.maskInput(event.target as HTMLInputElement, 'date');\r\n this.dateText.set(text);\r\n this.datePart.set(value);\r\n this.lastEdited = 'date';\r\n this.combine();\r\n }\r\n\r\n protected onDateBlur(): void {\r\n if (this.datePart()) {\r\n this.setDateText(this.formatOf(this.datePart(), 'date'));\r\n }\r\n this.markTouched();\r\n }\r\n\r\n protected onPicked(date: Date): void {\r\n this.datePart.set(isoDate(date));\r\n this.setDateText(this.formatOf(this.datePart(), 'date'));\r\n this.lastEdited = 'date';\r\n this.combine();\r\n this.markTouched();\r\n }\r\n\r\n // ---- Time part ------------------------------------------------------------------------------\r\n /** Part changed last by the user (completeParts completes the date only after a time change). */\r\n private lastEdited: 'date' | 'time' | null = null;\r\n\r\n /** Set when the focus returns to the time field after Esc: the panel must stay closed. */\r\n private keepClosed = false;\r\n\r\n protected onTimeFocus(): void {\r\n this.focused = true;\r\n this.panelOpen.set(!this.keepClosed && this.canOpen());\r\n this.keepClosed = false;\r\n }\r\n\r\n protected onTimeInput(event: Event): void {\r\n const { text, value } = this.maskInput(event.target as HTMLInputElement, 'time');\r\n this.timeText.set(text);\r\n this.timePart.set(value);\r\n this.lastEdited = 'time';\r\n this.combine();\r\n }\r\n\r\n protected onTimeKeydown(event: KeyboardEvent): void {\r\n if (event.key === 'Escape' && this.panelOpen()) {\r\n this.panelOpen.set(false);\r\n event.preventDefault();\r\n } else if (event.key === 'ArrowDown' && !this.panelOpen()) {\r\n this.panelOpen.set(this.canOpen());\r\n event.preventDefault();\r\n }\r\n }\r\n\r\n protected onTimeBlur(): void {\r\n if (this.timePart()) {\r\n this.timeText.set(this.formatOf(this.timePart(), 'time'));\r\n }\r\n this.markTouched();\r\n }\r\n\r\n protected onPanelTime(time: string): void {\r\n this.timePart.set(time);\r\n this.timeText.set(this.formatOf(time, 'time'));\r\n this.lastEdited = 'time';\r\n this.combine();\r\n }\r\n\r\n protected closePanel(): void {\r\n this.panelOpen.set(false);\r\n this.keepClosed = true;\r\n this.host.nativeElement.querySelector<HTMLInputElement>('input.sirio-timepicker')?.focus();\r\n }\r\n\r\n /** Closes the panel and reports partial text when the focus leaves the whole component. */\r\n protected onFocusOut(event: FocusEvent): void {\r\n const next = event.relatedTarget as Node | null;\r\n if (!next || !this.host.nativeElement.contains(next)) {\r\n this.panelOpen.set(false);\r\n this.focused = false;\r\n this.completeMissingPart();\r\n this.clampValue();\r\n this.revalidate();\r\n }\r\n }\r\n\r\n /**\r\n * With `completeParts`, leaving the component with only one field filled in completes the other:\r\n * date only -> time 00:00; time only -> today, when the time was the part just changed (clearing the\r\n * date does not bring it back). A field with (partial) text is never overwritten.\r\n */\r\n private completeMissingPart(): void {\r\n const lastEdited = this.lastEdited;\r\n this.lastEdited = null;\r\n if (!this.completeParts() || this.readonly() || this.isDisabled() || lastEdited === null) {\r\n return;\r\n }\r\n const date = this.datePart();\r\n const time = this.timePart();\r\n if (date && !time && !this.timeText()) {\r\n this.timePart.set('00:00');\r\n this.timeText.set(this.formatOf('00:00', 'time'));\r\n this.combine();\r\n } else if (time && !date && !this.dateText() && lastEdited === 'time') {\r\n this.datePart.set(isoDate(new Date()));\r\n this.setDateText(this.formatOf(this.datePart(), 'date'));\r\n this.combine();\r\n }\r\n }\r\n\r\n /** Leaving the component: a value outside min/max goes to the nearest limit (both fields updated). */\r\n private clampValue(): void {\r\n const value = this.value();\r\n const clamped = this.clampToLimits(value);\r\n if (clamped === value || clamped === null) {\r\n return;\r\n }\r\n this.datePart.set(clamped.slice(0, 10));\r\n this.timePart.set(clamped.slice(11, 16));\r\n this.setDateText(this.formatOf(this.datePart(), 'date'));\r\n this.timeText.set(this.formatOf(this.timePart(), 'time'));\r\n this.updateValue(clamped);\r\n }\r\n\r\n /** Value = date + time when both parts are valid, otherwise null. */\r\n private combine(): void {\r\n const date = this.datePart();\r\n const time = this.timePart();\r\n const value = date && time ? `${date}T${time}` : null;\r\n if (value !== this.value()) {\r\n this.updateValue(value);\r\n }\r\n }\r\n\r\n private setDateText(text: string): void {\r\n this.dateText.set(text);\r\n const el = this.dateFieldRef()?.nativeElement;\r\n if (el && el.value !== text) {\r\n el.value = text;\r\n }\r\n }\r\n}\r\n","<wm-sirio-field\r\n [inputId]=\"inputId()\"\r\n [helpId]=\"helpId()\"\r\n [errorId]=\"errorId()\"\r\n [label]=\"fieldLabels() ? '' : label()\"\r\n [helpText]=\"helpText()\"\r\n [required]=\"isRequired()\"\r\n [errorMessage]=\"feedbackMessage()\"\r\n [state]=\"validationState()\"\r\n>\r\n <!-- Sirio has no date-time control: the kit datepicker and timepicker side by side. -->\r\n <div\r\n class=\"sirio-datetime-row\"\r\n [attr.role]=\"'group'\"\r\n [attr.aria-labelledby]=\"!ariaLabel() && label() ? labelId() : null\"\r\n [attr.aria-label]=\"ariaLabel() || null\"\r\n >\r\n <div class=\"sirio-datetime-date sirio-datepicker-container\">\r\n @if (fieldLabels() && label()) {\r\n <!-- fieldLabels: kit label above each field, colored by the validation state. -->\r\n <div class=\"sirio-label-info\">\r\n <label\r\n class=\"sirio-label\"\r\n [class.sirio-text-danger]=\"validationState() === 'invalid'\"\r\n [class.sirio-text-warning]=\"validationState() === 'warning'\"\r\n [class.sirio-text-success]=\"validationState() === 'valid'\"\r\n [attr.for]=\"inputId()\"\r\n [attr.id]=\"labelId()\"\r\n >\r\n {{ label() }}\r\n @if (isRequired()) {\r\n <span class=\"sirio-required-marker\" aria-hidden=\"true\">*</span>\r\n }\r\n </label>\r\n @if (info(); as info) {\r\n <wm-sirio-info-button\r\n [content]=\"info\"\r\n [title]=\"infoTitle() ?? label()\"\r\n [label]=\"infoButtonLabel()\"\r\n [placement]=\"infoPlacement()\"\r\n />\r\n }\r\n </div>\r\n }\r\n <input\r\n #dateField\r\n wmSirioDatePicker\r\n type=\"text\"\r\n class=\"sirio-form-control sirio-datepicker\"\r\n autocomplete=\"off\"\r\n inputmode=\"numeric\"\r\n maxlength=\"10\"\r\n [date]=\"pickerDate()\"\r\n [minDate]=\"minDate()\"\r\n [maxDate]=\"maxDate()\"\r\n [showOnFocus]=\"!hideOnFocus()\"\r\n [style.text-align]=\"textAlign()\"\r\n [class.sirio-is-invalid]=\"showError()\"\r\n [class.sirio-is-valid]=\"validationState() === 'valid'\"\r\n [class.sirio-is-warning]=\"validationState() === 'warning'\"\r\n [class.filled]=\"!!dateText()\"\r\n [id]=\"inputId()\"\r\n [attr.aria-label]=\"ariaLabel() || null\"\r\n [attr.name]=\"name() ? name() + '-date' : null\"\r\n [value]=\"dateText()\"\r\n [placeholder]=\"placeholderOf('date')\"\r\n [disabled]=\"isDisabled()\"\r\n [readOnly]=\"readonly()\"\r\n [attr.aria-required]=\"isRequired() || null\"\r\n [attr.aria-invalid]=\"showError() || null\"\r\n [attr.aria-describedby]=\"describedBy()\"\r\n (input)=\"onDateInput($event)\"\r\n (focus)=\"focused = true\"\r\n (blur)=\"onDateBlur()\"\r\n (dateSelected)=\"onPicked($event)\"\r\n />\r\n </div>\r\n <div class=\"sirio-datetime-time sirio-dropdown\">\r\n @if (fieldLabels() && timeLabel()) {\r\n <label\r\n class=\"sirio-label\"\r\n [class.sirio-text-danger]=\"validationState() === 'invalid'\"\r\n [class.sirio-text-warning]=\"validationState() === 'warning'\"\r\n [class.sirio-text-success]=\"validationState() === 'valid'\"\r\n [attr.for]=\"inputId() + '-time'\"\r\n >\r\n {{ timeLabel() }}\r\n </label>\r\n }\r\n <input\r\n type=\"text\"\r\n class=\"sirio-form-control sirio-timepicker\"\r\n autocomplete=\"off\"\r\n inputmode=\"numeric\"\r\n maxlength=\"5\"\r\n [attr.aria-label]=\"fieldLabels() ? null : timeLabel()\"\r\n [style.text-align]=\"textAlign()\"\r\n [class.sirio-is-invalid]=\"showError()\"\r\n [class.sirio-is-valid]=\"validationState() === 'valid'\"\r\n [class.sirio-is-warning]=\"validationState() === 'warning'\"\r\n [class.filled]=\"!!timeText()\"\r\n [id]=\"inputId() + '-time'\"\r\n [attr.name]=\"name() ? name() + '-time' : null\"\r\n [value]=\"timeText()\"\r\n [placeholder]=\"placeholderOf('time')\"\r\n [disabled]=\"isDisabled()\"\r\n [readOnly]=\"readonly()\"\r\n [attr.aria-required]=\"isRequired() || null\"\r\n [attr.aria-invalid]=\"showError() || null\"\r\n [attr.aria-describedby]=\"describedBy()\"\r\n (input)=\"onTimeInput($event)\"\r\n (focus)=\"onTimeFocus()\"\r\n (click)=\"panelOpen.set(canOpen())\"\r\n (keydown)=\"onTimeKeydown($event)\"\r\n (blur)=\"onTimeBlur()\"\r\n />\r\n <wm-sirio-timepicker-panel\r\n [time]=\"timePart()\"\r\n [open]=\"panelOpen()\"\r\n [disabled]=\"isDisabled() || readonly()\"\r\n [minuteStep]=\"minuteStep()\"\r\n (timeChange)=\"onPanelTime($event)\"\r\n (closeRequest)=\"closePanel()\"\r\n />\r\n </div>\r\n </div>\r\n</wm-sirio-field>\r\n","import { booleanAttribute, ChangeDetectionStrategy, Component, input } from '@angular/core';\r\nimport { provideSirioControl, SirioControlBase } from '../core/sirio-control-base';\r\nimport { SirioPendingIndicator } from '../pending/sirio-pending';\r\nimport { SirioInfoButton } from '../tooltip/sirio-info-button';\r\n\r\n/**\r\n * Checkbox (or toggle switch when `toggle` is set). The model value is a boolean.\r\n * Use `Validators.requiredTrue` for mandatory acceptance checkboxes.\r\n *\r\n * The label can contain markup: projected content is rendered inside the `<label>`, after the\r\n * `label` text (use inline elements only, such as `<span>`, `<strong>`, `<em>`, `<a>`).\r\n *\r\n * ```html\r\n * <wm-sirio-checkbox label=\"Accetto i termini\" formControlName=\"privacy\" />\r\n * <wm-sirio-checkbox label=\"Notifiche\" toggle formControlName=\"notify\" />\r\n * <wm-sirio-checkbox formControlName=\"terms\">Accetto le <a href=\"/condizioni\">condizioni</a></wm-sirio-checkbox>\r\n * ```\r\n */\r\n@Component({\r\n selector: 'wm-sirio-checkbox',\r\n imports: [SirioInfoButton, SirioPendingIndicator],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [provideSirioControl(() => SirioCheckbox)],\r\n styleUrl: './sirio-checkbox.scss',\r\n templateUrl: './sirio-checkbox.html',\r\n})\r\nexport class SirioCheckbox extends SirioControlBase<boolean> {\r\n /** Renders the Sirio toggle switch instead of the checkbox. */\r\n readonly toggle = input(false, { transform: booleanAttribute });\r\n /** Toggle position relative to the label. */\r\n readonly togglePosition = input<'left' | 'right'>('left');\r\n readonly inline = input(false, { transform: booleanAttribute });\r\n\r\n protected onToggle(event: Event): void {\r\n this.updateValue((event.target as HTMLInputElement).checked);\r\n this.markTouched();\r\n }\r\n\r\n protected override fromModel(value: unknown): boolean {\r\n return !!value;\r\n }\r\n}\r\n","<div\r\n class=\"sirio-form-check\"\r\n [class.sirio-form-toggle]=\"toggle()\"\r\n [class.sirio-form-toggle-dx]=\"toggle() && togglePosition() === 'right'\"\r\n [class.sirio-form-check-inline]=\"inline()\"\r\n>\r\n <input\r\n type=\"checkbox\"\r\n [id]=\"inputId()\"\r\n [attr.aria-label]=\"ariaLabel() || null\"\r\n [attr.name]=\"name()\"\r\n [checked]=\"!!value()\"\r\n [disabled]=\"isDisabled() || readonly()\"\r\n [attr.role]=\"toggle() ? 'switch' : null\"\r\n [attr.aria-checked]=\"toggle() ? !!value() : null\"\r\n [attr.aria-required]=\"isRequired() || null\"\r\n [attr.aria-invalid]=\"showError() || null\"\r\n [attr.aria-describedby]=\"describedBy()\"\r\n (change)=\"onToggle($event)\"\r\n (blur)=\"markTouched()\"\r\n />\r\n <label\r\n [attr.for]=\"inputId()\"\r\n [class.sirio-label-with-info]=\"!!info() || pendingVisible()\"\r\n [class.sirio-text-danger]=\"validationState() === 'invalid'\"\r\n [class.sirio-text-warning]=\"validationState() === 'warning'\"\r\n [class.sirio-text-success]=\"validationState() === 'valid'\"\r\n >\r\n {{ label() }}\r\n <!-- Rich label: projected inline content (e.g. <strong>, <em>, <a>) follows the text label. -->\r\n <ng-content />\r\n @if (isRequired()) {\r\n <span aria-hidden=\"true\">*</span>\r\n }\r\n </label>\r\n @if (info(); as info) {\r\n <!-- Kit info button next to the label, outside it (a click does not toggle the box). -->\r\n <wm-sirio-info-button\r\n [content]=\"info\"\r\n [title]=\"infoTitle() ?? label()\"\r\n [label]=\"infoButtonLabel()\"\r\n [placement]=\"infoPlacement()\"\r\n />\r\n }\r\n <wm-sirio-pending placement=\"inline\" [active]=\"pendingVisible()\" [label]=\"pendingLabel()\" />\r\n</div>\r\n@if (helpText()) {\r\n <span class=\"sirio-form-text-help\" [id]=\"helpId()\">{{ helpText() }}</span>\r\n}\r\n<span\r\n class=\"sirio-form-feedback\"\r\n [class.sirio-visible]=\"!!feedbackMessage()\"\r\n [class.sirio-feedback-invalid]=\"validationState() === 'invalid'\"\r\n [class.sirio-feedback-warning]=\"validationState() === 'warning'\"\r\n [class.sirio-feedback-valid]=\"validationState() === 'valid'\"\r\n [id]=\"errorId()\"\r\n aria-live=\"polite\"\r\n>\r\n {{ feedbackMessage() }}\r\n</span>\r\n","import { NgTemplateOutlet } from '@angular/common';\r\nimport {\r\n booleanAttribute,\r\n ChangeDetectionStrategy,\r\n Component,\r\n contentChild,\r\n effect,\r\n input,\r\n numberAttribute,\r\n} from '@angular/core';\r\nimport { AbstractControl, ValidationErrors, Validator } from '@angular/forms';\r\nimport { provideSirioControl, SirioControlBase } from '../core/sirio-control-base';\r\nimport { SirioPendingIndicator } from '../pending/sirio-pending';\r\nimport { SirioInfoButton } from '../tooltip/sirio-info-button';\r\nimport { SirioOptionLabel } from '../core/sirio-option-label';\r\nimport { sirioDefaultCompare, SirioCompareWith, SirioOption } from '../core/sirio-option';\r\n\r\n/** Optional number input: empty/null means \"no limit\". */\r\nfunction optionalNumber(value: unknown): number | null {\r\n return value === null || value === undefined || value === '' ? null : numberAttribute(value);\r\n}\r\n\r\n/**\r\n * Checklist: group of checkboxes for a multiple selection. The model is an array with the values\r\n * of the checked options (in option order); an empty selection is `[]`.\r\n *\r\n * Sirio web kit markup (\"Checkbox\"): `fieldset` + `legend.sirio-label`, one `.sirio-form-check`\r\n * per option, vertical by default or horizontal with `inline` (`sirio-form-check-inline`).\r\n * With `chips` the options are the kit \"Chips di selezione (Checkbox)\": `.sirio-chip-selection`.\r\n *\r\n * Validation: `Validators.required` (at least one option), `minSelected` / `maxSelected`\r\n * (errors `sirioMinSelected` / `sirioMaxSelected`).\r\n *\r\n * ```html\r\n * <wm-sirio-checklist label=\"Servizi\" [options]=\"servizi\" chips [maxSelected]=\"3\" formControlName=\"servizi\" />\r\n * ```\r\n */\r\n@Component({\r\n selector: 'wm-sirio-checklist',\r\n imports: [NgTemplateOutlet, SirioInfoButton, SirioPendingIndicator],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [provideSirioControl(() => SirioChecklist, { validator: true })],\r\n styleUrl: './sirio-checklist.scss',\r\n templateUrl: './sirio-checklist.html',\r\n})\r\nexport class SirioChecklist<T = unknown> extends SirioControlBase<T[]> implements Validator {\r\n readonly options = input<SirioOption<T>[]>([]);\r\n /** Optional custom option label (`<ng-template wmSirioOptionLabel let-option>`). */\r\n protected readonly optionLabel = contentChild(SirioOptionLabel);\r\n /** Options on one row (horizontal) instead of one per line. */\r\n readonly inline = input(false, { transform: booleanAttribute });\r\n /** Renders the options as Sirio selection chips (`sirio-chip-selection`), on one row. */\r\n readonly chips = input(false, { transform: booleanAttribute });\r\n readonly compareWith = input<SirioCompareWith<T>>(sirioDefaultCompare);\r\n\r\n /** valueSync compares values (and array items) with `compareWith`. */\r\n protected override sameItem(a: unknown, b: unknown): boolean {\r\n return this.compareWith()(a as T | null, b as T | null);\r\n }\r\n /** Minimum number of checked options (error `sirioMinSelected`); an empty selection is left to `required`. */\r\n readonly minSelected = input<number | null, unknown>(null, { transform: optionalNumber });\r\n /** Maximum number of checked options (error `sirioMaxSelected`). */\r\n readonly maxSelected = input<number | null, unknown>(null, { transform: optionalNumber });\r\n\r\n private onValidatorChange: () => void = () => {};\r\n\r\n constructor() {\r\n super();\r\n // Re-validate the bound control when the limits change.\r\n effect(() => {\r\n this.minSelected();\r\n this.maxSelected();\r\n this.onValidatorChange();\r\n });\r\n }\r\n\r\n protected override fromModel(value: unknown): T[] {\r\n return Array.isArray(value) ? [...value] : [];\r\n }\r\n\r\n protected isChecked(option: SirioOption<T>): boolean {\r\n const compare = this.compareWith();\r\n return (this.value() ?? []).some((v) => compare(v, option.value));\r\n }\r\n\r\n /** Adds/removes an option; the result keeps the option order (unknown values stay at the end). */\r\n protected toggle(option: SirioOption<T>, checked: boolean): void {\r\n const compare = this.compareWith();\r\n const current = this.value() ?? [];\r\n const options = this.options();\r\n const isOption = (v: T) => options.some((o) => compare(v, o.value));\r\n const selected = options\r\n .filter((o) =>\r\n o === option ? checked : current.some((v) => compare(v, o.value)),\r\n )\r\n .map((o) => o.value);\r\n this.updateValue([...selected, ...current.filter((v) => !isOption(v))]);\r\n }\r\n\r\n // ---- Validator ------------------------------------------------------------------------------\r\n validate(control: AbstractControl): ValidationErrors | null {\r\n const count = Array.isArray(control.value) ? control.value.length : 0;\r\n const min = this.minSelected();\r\n const max = this.maxSelected();\r\n if (min !== null && count > 0 && count < min) {\r\n return { sirioMinSelected: { min, actual: count } };\r\n }\r\n if (max !== null && count > max) {\r\n return { sirioMaxSelected: { max, actual: count } };\r\n }\r\n return null;\r\n }\r\n\r\n registerOnValidatorChange(fn: () => void): void {\r\n this.onValidatorChange = fn;\r\n }\r\n}\r\n","<!-- A fieldset is a group: aria-required / aria-invalid are not supported on it. -->\r\n<fieldset\r\n [attr.aria-labelledby]=\"!ariaLabel() && label() ? labelTextId() : null\" [attr.aria-label]=\"ariaLabel() || null\" [attr.aria-describedby]=\"describedBy()\" [disabled]=\"isDisabled()\">\r\n @if (label()) {\r\n <legend\r\n class=\"sirio-label\"\r\n [class.sirio-text-danger]=\"validationState() === 'invalid'\"\r\n [class.sirio-text-warning]=\"validationState() === 'warning'\"\r\n [class.sirio-text-success]=\"validationState() === 'valid'\"\r\n >\r\n <!-- The group is named by the label text only (not by the info button or the status). -->\r\n <span [id]=\"labelTextId()\">{{ label() }}</span>\r\n @if (isRequired()) {\r\n <span aria-hidden=\"true\">*</span>\r\n }\r\n @if (info(); as info) {\r\n <wm-sirio-info-button\r\n [content]=\"info\"\r\n [title]=\"infoTitle() ?? label()\"\r\n [label]=\"infoButtonLabel()\"\r\n [placement]=\"infoPlacement()\"\r\n />\r\n }\r\n <wm-sirio-pending placement=\"inline\" [active]=\"pendingVisible()\" [label]=\"pendingLabel()\" />\r\n </legend>\r\n }\r\n @if (chips()) {\r\n <div class=\"sirio-checklist-chips\">\r\n @for (option of options(); track $index; let i = $index) {\r\n <div class=\"sirio-chip-selection\">\r\n <ng-container *ngTemplateOutlet=\"check; context: { $implicit: option, i: i }\" />\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n @for (option of options(); track $index; let i = $index) {\r\n <div class=\"sirio-form-check\" [class.sirio-form-check-inline]=\"inline()\">\r\n <ng-container *ngTemplateOutlet=\"check; context: { $implicit: option, i: i }\" />\r\n </div>\r\n }\r\n }\r\n <ng-template #check let-option let-i=\"i\">\r\n <input\r\n type=\"checkbox\"\r\n [id]=\"inputId() + '-' + i\"\r\n [attr.name]=\"name()\"\r\n [checked]=\"isChecked(option)\"\r\n [disabled]=\"isDisabled() || readonly() || !!option.disabled\"\r\n (change)=\"toggle(option, $any($event.target).checked)\"\r\n (blur)=\"markTouched()\"\r\n />\r\n <label [attr.for]=\"inputId() + '-' + i\">\r\n @if (optionLabel(); as custom) {\r\n <ng-container *ngTemplateOutlet=\"custom.template; context: { $implicit: option, index: i }\" />\r\n } @else {\r\n {{ option.label }}\r\n }\r\n </label>\r\n </ng-template>\r\n <!-- Sirio web kit: the help text is placed below the options. -->\r\n @if (helpText()) {\r\n <span class=\"sirio-form-text-help\" [id]=\"helpId()\">{{ helpText() }}</span>\r\n }\r\n <span\r\n class=\"sirio-form-feedback\"\r\n [class.sirio-visible]=\"!!feedbackMessage()\"\r\n [class.sirio-feedback-invalid]=\"validationState() === 'invalid'\"\r\n [class.sirio-feedback-warning]=\"validationState() === 'warning'\"\r\n [class.sirio-feedback-valid]=\"validationState() === 'valid'\"\r\n [id]=\"errorId()\"\r\n aria-live=\"polite\"\r\n >\r\n {{ feedbackMessage() }}\r\n </span>\r\n</fieldset>\r\n","import { NgTemplateOutlet } from '@angular/common';\r\nimport { booleanAttribute, ChangeDetectionStrategy, Component, contentChild, input } from '@angular/core';\r\nimport { provideSirioControl, SirioControlBase, sirioUniqueId } from '../core/sirio-control-base';\r\nimport { SirioPendingIndicator } from '../pending/sirio-pending';\r\nimport { SirioInfoButton } from '../tooltip/sirio-info-button';\r\nimport { SirioOptionLabel } from '../core/sirio-option-label';\r\nimport { sirioDefaultCompare, SirioCompareWith, SirioOption } from '../core/sirio-option';\r\n\r\n/**\r\n * Group of radio buttons bound to a single value.\r\n * Options are vertical, as recommended by the Sirio web kit; `inline` lays them out horizontally\r\n * (`sirio-form-check-inline`, the kit class used for horizontal checks).\r\n * `chips` renders the options as Sirio selection chips (\"Chips di selezione (Radio button)\":\r\n * `.sirio-chip-selection` with the radio and its label), always on one row that wraps.\r\n *\r\n * ```html\r\n * <wm-sirio-radio-group label=\"Sesso\" [options]=\"[{ value: 'M', label: 'Maschio' }, { value: 'F', label: 'Femmina' }]\"\r\n * inline formControlName=\"gender\" />\r\n * ```\r\n */\r\n@Component({\r\n selector: 'wm-sirio-radio-group',\r\n imports: [NgTemplateOutlet, SirioInfoButton, SirioPendingIndicator],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [provideSirioControl(() => SirioRadioGroup)],\r\n styleUrl: './sirio-radio-group.scss',\r\n templateUrl: './sirio-radio-group.html',\r\n})\r\nexport class SirioRadioGroup<T = unknown> extends SirioControlBase<T> {\r\n readonly options = input<SirioOption<T>[]>([]);\r\n /** Optional custom option label (`<ng-template wmSirioOptionLabel let-option>`). */\r\n protected readonly optionLabel = contentChild(SirioOptionLabel);\r\n /** Options on one row (horizontal) instead of one per line. */\r\n readonly inline = input(false, { transform: booleanAttribute });\r\n /** Renders the options as Sirio selection chips (`sirio-chip-selection`), on one row. */\r\n readonly chips = input(false, { transform: booleanAttribute });\r\n readonly compareWith = input<SirioCompareWith<T>>(sirioDefaultCompare);\r\n\r\n /** valueSync compares values (and array items) with `compareWith`. */\r\n protected override sameItem(a: unknown, b: unknown): boolean {\r\n return this.compareWith()(a as T | null, b as T | null);\r\n }\r\n\r\n /** Native radio \"name\": uses the name input or a generated unique one. */\r\n protected get groupName(): string {\r\n return this.name() ?? this.fallbackName;\r\n }\r\n private readonly fallbackName = sirioUniqueId('sirio-radio');\r\n\r\n protected isChecked(option: SirioOption<T>): boolean {\r\n return this.value() !== null && this.compareWith()(this.value(), option.value);\r\n }\r\n\r\n protected select(option: SirioOption<T>): void {\r\n this.updateValue(option.value);\r\n this.markTouched();\r\n }\r\n}\r\n","<!-- role=radiogroup: aria-required / aria-invalid are not supported on a plain group. -->\r\n<fieldset\r\n [attr.aria-labelledby]=\"!ariaLabel() && label() ? labelTextId() : null\"\r\n [attr.aria-label]=\"ariaLabel() || null\"\r\n role=\"radiogroup\"\r\n [attr.aria-orientation]=\"inline() || chips() ? 'horizontal' : 'vertical'\"\r\n [attr.aria-required]=\"isRequired() || null\"\r\n [attr.aria-invalid]=\"showError() || null\"\r\n [attr.aria-describedby]=\"describedBy()\"\r\n [disabled]=\"isDisabled()\"\r\n>\r\n @if (label()) {\r\n <legend\r\n class=\"sirio-label\"\r\n [class.sirio-text-danger]=\"validationState() === 'invalid'\"\r\n [class.sirio-text-warning]=\"validationState() === 'warning'\"\r\n [class.sirio-text-success]=\"validationState() === 'valid'\"\r\n >\r\n <!-- The group is named by the label text only (not by the info button or the status). -->\r\n <span [id]=\"labelTextId()\">{{ label() }}</span>\r\n @if (isRequired()) {\r\n <span aria-hidden=\"true\">*</span>\r\n }\r\n @if (info(); as info) {\r\n <wm-sirio-info-button\r\n [content]=\"info\"\r\n [title]=\"infoTitle() ?? label()\"\r\n [label]=\"infoButtonLabel()\"\r\n [placement]=\"infoPlacement()\"\r\n />\r\n }\r\n <wm-sirio-pending placement=\"inline\" [active]=\"pendingVisible()\" [label]=\"pendingLabel()\" />\r\n </legend>\r\n }\r\n @if (chips()) {\r\n <div class=\"sirio-radio-chips\">\r\n @for (option of options(); track $index; let i = $index) {\r\n <div class=\"sirio-chip-selection\">\r\n <ng-container *ngTemplateOutlet=\"radio; context: { $implicit: option, i: i }\" />\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n @for (option of options(); track $index; let i = $index) {\r\n <div class=\"sirio-form-check\" [class.sirio-form-check-inline]=\"inline()\">\r\n <ng-container *ngTemplateOutlet=\"radio; context: { $implicit: option, i: i }\" />\r\n </div>\r\n }\r\n }\r\n <ng-template #radio let-option let-i=\"i\">\r\n <input\r\n type=\"radio\"\r\n [id]=\"inputId() + '-' + i\"\r\n [name]=\"groupName\"\r\n [checked]=\"isChecked(option)\"\r\n [disabled]=\"isDisabled() || readonly() || !!option.disabled\"\r\n (change)=\"select(option)\"\r\n (blur)=\"markTouched()\"\r\n />\r\n <label [attr.for]=\"inputId() + '-' + i\">\r\n @if (optionLabel(); as custom) {\r\n <ng-container *ngTemplateOutlet=\"custom.template; context: { $implicit: option, index: i }\" />\r\n } @else {\r\n {{ option.label }}\r\n }\r\n </label>\r\n </ng-template>\r\n <!-- Sirio web kit: the help text is placed below the options. -->\r\n @if (helpText()) {\r\n <span class=\"sirio-form-text-help\" [id]=\"helpId()\">{{ helpText() }}</span>\r\n }\r\n <span\r\n class=\"sirio-form-feedback\"\r\n [class.sirio-visible]=\"!!feedbackMessage()\"\r\n [class.sirio-feedback-invalid]=\"validationState() === 'invalid'\"\r\n [class.sirio-feedback-warning]=\"validationState() === 'warning'\"\r\n [class.sirio-feedback-valid]=\"validationState() === 'valid'\"\r\n [id]=\"errorId()\"\r\n aria-live=\"polite\"\r\n >\r\n {{ feedbackMessage() }}\r\n </span>\r\n</fieldset>\r\n","import { NgTemplateOutlet } from '@angular/common';\r\nimport {\r\n booleanAttribute,\r\n ChangeDetectionStrategy,\r\n Component,\r\n computed,\r\n effect,\r\n ElementRef,\r\n inject,\r\n input,\r\n numberAttribute,\r\n output,\r\n signal,\r\n untracked,\r\n viewChild,\r\n} from '@angular/core';\r\nimport { AbstractControl, ValidationErrors, Validator } from '@angular/forms';\r\nimport { provideSirioControl, SirioControlBase } from '../core/sirio-control-base';\r\nimport { sirioDefaultCompare, SirioCompareWith, SirioOption } from '../core/sirio-option';\r\nimport { SirioField } from '../field/sirio-field';\r\n\r\n/** Height of the Sirio listbox (`.sirio-dropdown-menu[role=listbox]{max-height:240px}`) plus margin. */\r\nconst MENU_HEIGHT = 250;\r\n\r\ninterface SelectItem<T> {\r\n label: string;\r\n value: T | null;\r\n disabled: boolean;\r\n isPlaceholder: boolean;\r\n isEmpty: boolean;\r\n /** \"Select all\" row of a multiple select. */\r\n isSelectAll: boolean;\r\n selected: boolean;\r\n}\r\n\r\n/** Emitted by `optionSelected` when the user chooses an option (click, Enter, Space). */\r\nexport interface SirioSelectOptionEvent<T = unknown> {\r\n /** The chosen option (value and label). */\r\n option: SirioOption<T>;\r\n /** True when the option is now selected; false when a multiple select deselects it. */\r\n selected: boolean;\r\n}\r\n\r\n/** Text shown instead of the labels when more than `maxVisibleSelections` options are selected. */\r\nexport type SirioSelectionSummary = string | ((count: number) => string);\r\n\r\n/** Default summary: \"1 elemento selezionato\", \"5 elementi selezionati\". */\r\nexport const SIRIO_DEFAULT_SELECTION_SUMMARY = (count: number): string =>\r\n count === 1 ? '1 elemento selezionato' : `${count} elementi selezionati`;\r\n\r\n/** Lower case without accents, for accent-insensitive search (\"citta\" finds \"Città\"). */\r\nfunction normalizeText(text: string): string {\r\n return text.normalize('NFD').replace(/[̀-ͯ]/g, '').toLocaleLowerCase();\r\n}\r\n\r\n/**\r\n * Sirio \"Dropdown Select\" (single or multiple choice), rendered with the same markup and classes\r\n * the Sirio web kit generates for `<select data-sirio-component=\"select\">`:\r\n * `.sirio-dropdown` > `button.sirio-dropdown-select.sirio-form-control` + `ul.sirio-dropdown-menu`\r\n * with `li.sirio-dropdown-item` options. Behaviour is implemented in Angular (the Sirio JS is not\r\n * used) following the WAI-ARIA \"select-only combobox\" pattern: focus stays on the combobox and\r\n * the active option is tracked with aria-activedescendant.\r\n *\r\n * With `searchable` the combobox is a text field that filters the options, rendered like the Sirio\r\n * \"Dropdown Autocomplete\" (`.sirio-input-group.sirio-input-group-autocomplete`, reset button\r\n * `.sirio-btn-reset`), still limited to the given options (WAI-ARIA \"combobox with list autocomplete\").\r\n *\r\n * Option values can be of any type (objects included); `compareWith` matches the model value.\r\n * Model: `T | null` (single) or `T[]` (multiple).\r\n *\r\n * ```html\r\n * <wm-sirio-select label=\"Provincia\" placeholder=\"Seleziona un valore\" [options]=\"province\" formControlName=\"prov\" />\r\n * <wm-sirio-select label=\"Comune\" searchable [options]=\"comuni\" formControlName=\"comune\" />\r\n * <wm-sirio-select label=\"Servizi\" multiple searchable [options]=\"servizi\" formControlName=\"servizi\" />\r\n * <wm-sirio-select label=\"Servizi\" multiple selectAll [maxVisibleSelections]=\"2\" [options]=\"servizi\" formControlName=\"servizi\" />\r\n * ```\r\n *\r\n * `strict`: while the control exists, a validator checks that the model value (every value with\r\n * `multiple`) is one of the options; otherwise the `sirioSelectValue` error (\"\\\"X\\\" non è un valore\r\n * valido\") is shown. It runs again when the options change and ignores an empty options list\r\n * (options still loading).\r\n *\r\n * Multiple choice extras: `selectAll` adds a \"Seleziona tutto\" row at the top of the list (it selects or\r\n * deselects all the enabled options shown, the search results when searching); `maxVisibleSelections`\r\n * shows \"n elementi selezionati\" (`selectionSummary`) instead of the labels when more options are selected.\r\n */\r\n@Component({\r\n selector: 'wm-sirio-select',\r\n imports: [SirioField, NgTemplateOutlet],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [provideSirioControl(() => SirioSelect, { validator: true })],\r\n host: {\r\n '(focusout)': 'onFocusOut($event)',\r\n },\r\n styleUrl: './sirio-select.scss',\r\n templateUrl: './sirio-select.html',\r\n})\r\nexport class SirioSelect<T = unknown> extends SirioControlBase<T | T[]> implements Validator {\r\n readonly options = input<SirioOption<T>[]>([]);\r\n readonly compareWith = input<SirioCompareWith<T>>(sirioDefaultCompare);\r\n\r\n /** valueSync compares values (and array items) with `compareWith`. */\r\n protected override sameItem(a: unknown, b: unknown): boolean {\r\n return this.compareWith()(a as T | null, b as T | null);\r\n }\r\n /** Multiple choice: the model is an array of values. */\r\n readonly multiple = input(false, { transform: booleanAttribute });\r\n /** Text field that filters the options (Sirio Dropdown Autocomplete look). */\r\n readonly searchable = input(false, { transform: booleanAttribute });\r\n /** Characters to type before the list is filtered (0 = filter from the first character). */\r\n readonly searchMinLength = input(0, { transform: numberAttribute });\r\n /** Text of the row shown when the search finds nothing. */\r\n readonly noResultsText = input('Nessun risultato');\r\n /** Accessible name of the reset button (searchable). */\r\n readonly resetLabel = input('Cancella testo');\r\n /** Screen reader hint of the search field (as the sr-only text in the kit Autocomplete example). */\r\n readonly searchHint = input('Digita per filtrare le opzioni, usa le frecce per sceglierle.');\r\n /** The model value must be one of the options (`sirioSelectValue` error otherwise). */\r\n readonly strict = input(false, { transform: booleanAttribute });\r\n /** Multiple: \"select all\" row at the top of the list. */\r\n readonly selectAll = input(false, { transform: booleanAttribute });\r\n /** Text of the \"select all\" row. */\r\n readonly selectAllLabel = input('Seleziona tutto');\r\n /**\r\n * Multiple: labels shown in the field at most; with more selected options the field shows\r\n * `selectionSummary` (null = always the labels).\r\n */\r\n readonly maxVisibleSelections = input<number | null, unknown>(null, {\r\n transform: (v: unknown) => (v === null || v === undefined || v === '' ? null : numberAttribute(v)),\r\n });\r\n /** Text with more than `maxVisibleSelections` selected options: '{n}' is the count, or a function. */\r\n readonly selectionSummary = input<SirioSelectionSummary>(SIRIO_DEFAULT_SELECTION_SUMMARY);\r\n /**\r\n * The user chose an option (click or keyboard). Not emitted for values set from code, the\r\n * placeholder row, the \"select all\" row or the reset button: use `valueChanges` of the control\r\n * for every change.\r\n */\r\n readonly optionSelected = output<SirioSelectOptionEvent<T>>();\r\n\r\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\r\n private readonly comboboxRef = viewChild<ElementRef<HTMLElement>>('combobox');\r\n private readonly listboxRef = viewChild<ElementRef<HTMLUListElement>>('listboxEl');\r\n\r\n protected readonly open = signal(false);\r\n protected readonly openUpwards = signal(false);\r\n /** Option highlighted with the keyboard/mouse (index in view(), aria-activedescendant). */\r\n protected readonly activeIndex = signal(-1);\r\n /** Search text while the user is typing (null = not searching: the field shows the selection). */\r\n protected readonly query = signal<string | null>(null);\r\n\r\n protected readonly listboxId = computed(() => `${this.inputId()}-listbox`);\r\n protected readonly valueId = computed(() => `${this.inputId()}-value`);\r\n\r\n /** Selected values as an array (single and multiple). */\r\n private readonly selectedValues = computed<T[]>(() => {\r\n const value = this.value();\r\n if (value === null || value === undefined) {\r\n return [];\r\n }\r\n return this.multiple() ? (Array.isArray(value) ? value : [value as T]) : [value as T];\r\n });\r\n\r\n /**\r\n * All options. In single mode, when a placeholder is set and the field is not required,\r\n * the placeholder is the first option and selecting it clears the value (as in the Sirio example).\r\n */\r\n protected readonly items = computed<SelectItem<T>[]>(() => {\r\n const compare = this.compareWith();\r\n const selected = this.selectedValues();\r\n const items: SelectItem<T>[] = this.options().map((option) => ({\r\n label: option.label,\r\n value: option.value as T | null,\r\n disabled: !!option.disabled,\r\n isPlaceholder: false,\r\n isEmpty: false,\r\n isSelectAll: false,\r\n selected: selected.some((v) => compare(v, option.value)),\r\n }));\r\n if (!this.multiple() && !this.searchable() && this.placeholder() && !this.isRequired()) {\r\n items.unshift({\r\n label: this.placeholder(),\r\n value: null,\r\n disabled: false,\r\n isPlaceholder: true,\r\n isEmpty: false,\r\n isSelectAll: false,\r\n selected: selected.length === 0,\r\n });\r\n }\r\n return items;\r\n });\r\n\r\n /** Options shown in the list (with the \"select all\" row first when enabled). */\r\n protected readonly view = computed<SelectItem<T>[]>(() => {\r\n const list = this.filtered();\r\n if (!this.multiple() || !this.selectAll() || list.some((i) => i.isEmpty)) {\r\n return list;\r\n }\r\n const targets = list.filter((i) => !i.disabled);\r\n return [\r\n {\r\n label: this.selectAllLabel(),\r\n value: null,\r\n disabled: targets.length === 0,\r\n isPlaceholder: false,\r\n isEmpty: false,\r\n isSelectAll: true,\r\n selected: targets.length > 0 && targets.every((i) => i.selected),\r\n },\r\n ...list,\r\n ];\r\n });\r\n\r\n /** Options matching the search (all of them when not searching). */\r\n private readonly filtered = computed<SelectItem<T>[]>(() => {\r\n const items = this.items();\r\n const query = this.query();\r\n if (\r\n !this.searchable() ||\r\n query === null ||\r\n query.length < Math.max(this.searchMinLength(), 1)\r\n ) {\r\n return items;\r\n }\r\n const needle = normalizeText(query);\r\n const found = items.filter((i) => normalizeText(i.label).includes(needle));\r\n return found.length\r\n ? found\r\n : [\r\n {\r\n label: this.noResultsText(),\r\n value: null,\r\n disabled: true,\r\n isPlaceholder: false,\r\n isEmpty: true,\r\n isSelectAll: false,\r\n selected: false,\r\n },\r\n ];\r\n });\r\n\r\n protected readonly hasSelection = computed(() => this.selectedValues().length > 0);\r\n\r\n /**\r\n * Labels of the selected options (\"Opzione 1, Opzione 3\"), '' when nothing is selected; with more\r\n * than `maxVisibleSelections` selected options the summary (\"5 elementi selezionati\").\r\n */\r\n protected readonly displayText = computed(() => {\r\n const labels = this.items()\r\n .filter((i) => i.selected && !i.isPlaceholder)\r\n .map((i) => i.label);\r\n const max = this.maxVisibleSelections();\r\n if (this.multiple() && max !== null && labels.length > max) {\r\n const summary = this.selectionSummary();\r\n return typeof summary === 'function'\r\n ? summary(labels.length)\r\n : summary.replace('{n}', String(labels.length));\r\n }\r\n return labels.join(', ');\r\n });\r\n\r\n /** Searchable: the field shows the search text while typing, the selection otherwise. */\r\n protected readonly inputText = computed(() => this.query() ?? this.displayText());\r\n\r\n protected readonly searchHintId = computed(() => `${this.inputId()}-search-hint`);\r\n\r\n protected readonly canReset = computed(\r\n () => !this.isDisabled() && !this.readonly() && (!!this.query() || this.hasSelection()),\r\n );\r\n\r\n protected readonly activeDescendant = computed(() =>\r\n this.open() && this.activeIndex() >= 0 ? this.optionId(this.activeIndex()) : null,\r\n );\r\n\r\n private onValidatorChange: () => void = () => {};\r\n\r\n constructor() {\r\n super();\r\n // Validate again when the options (e.g. loaded later), the comparison or the strict mode change.\r\n effect(() => {\r\n this.options();\r\n this.compareWith();\r\n this.strict();\r\n untracked(() => this.onValidatorChange());\r\n });\r\n }\r\n\r\n // ---- Validator ------------------------------------------------------------------------------\r\n /** With `strict`: values of the model that are not among the options. */\r\n validate(control: AbstractControl): ValidationErrors | null {\r\n const options = this.options();\r\n if (!this.strict() || options.length === 0) {\r\n return null;\r\n }\r\n const value = control.value;\r\n const values: T[] = Array.isArray(value)\r\n ? value\r\n : value === null || value === undefined || value === ''\r\n ? []\r\n : [value as T];\r\n const compare = this.compareWith();\r\n const missing = values.filter((v) => !options.some((o) => compare(v, o.value)));\r\n return missing.length ? { sirioSelectValue: { values: missing } } : null;\r\n }\r\n\r\n registerOnValidatorChange(fn: () => void): void {\r\n this.onValidatorChange = fn;\r\n }\r\n\r\n private typeahead = '';\r\n private typeaheadTimer: ReturnType<typeof setTimeout> | undefined;\r\n\r\n protected override describedByExtra(): string[] {\r\n return this.searchable() ? [this.searchHintId()] : [];\r\n }\r\n\r\n protected optionId(index: number): string {\r\n return `${this.inputId()}-option-${index}`;\r\n }\r\n\r\n protected override fromModel(value: unknown): T | T[] | null {\r\n if (this.multiple()) {\r\n return Array.isArray(value)\r\n ? (value as T[])\r\n : value === null || value === undefined\r\n ? []\r\n : [value as T];\r\n }\r\n return (value ?? null) as T | null;\r\n }\r\n\r\n // ---- Open / close ---------------------------------------------------------------------------\r\n protected toggle(): void {\r\n if (this.open()) {\r\n this.close();\r\n } else {\r\n this.openList();\r\n }\r\n }\r\n\r\n protected openList(focus: 'selected' | 'first' | 'last' = 'selected'): void {\r\n if (this.isDisabled() || this.readonly() || this.open()) {\r\n return;\r\n }\r\n // Open upwards when there is not enough room below (Sirio class sirio-dropdown-menu-top).\r\n const rect = this.comboboxRef()?.nativeElement.getBoundingClientRect();\r\n const viewport = this.host.nativeElement.ownerDocument.defaultView?.innerHeight ?? 0;\r\n this.openUpwards.set(!!rect && rect.bottom + MENU_HEIGHT > viewport && rect.top > MENU_HEIGHT);\r\n this.open.set(true);\r\n\r\n const view = this.view();\r\n const firstSelected = view.findIndex((i) => i.selected);\r\n const index =\r\n focus === 'first'\r\n ? this.nextEnabled(-1, 1)\r\n : focus === 'last'\r\n ? this.nextEnabled(view.length, -1)\r\n : firstSelected >= 0\r\n ? firstSelected\r\n : this.nextEnabled(-1, 1);\r\n this.setActive(index);\r\n }\r\n\r\n private close(): void {\r\n this.open.set(false);\r\n this.activeIndex.set(-1);\r\n }\r\n\r\n protected onBlur(): void {\r\n if (this.searchable()) {\r\n // Leaving the search field (also towards the reset button) ends the search:\r\n // only listed options can be chosen, the typed text is discarded.\r\n this.query.set(null);\r\n this.close();\r\n }\r\n this.markTouched();\r\n }\r\n\r\n /** Closes the list (and ends the search) when the focus leaves the component. */\r\n protected onFocusOut(event: FocusEvent): void {\r\n const next = event.relatedTarget as Node | null;\r\n if (!next || !this.host.nativeElement.contains(next)) {\r\n this.close();\r\n // Only listed options can be chosen: the typed text is discarded.\r\n this.query.set(null);\r\n }\r\n }\r\n\r\n // ---- Search ---------------------------------------------------------------------------------\r\n protected onSearchFocus(event: FocusEvent): void {\r\n // Typing replaces the shown selection instead of appending to it.\r\n (event.target as HTMLInputElement).select();\r\n }\r\n\r\n protected onSearch(event: Event): void {\r\n const text = (event.target as HTMLInputElement).value;\r\n this.query.set(text);\r\n if (!this.open()) {\r\n this.openList('first');\r\n }\r\n // The first enabled match becomes the active option.\r\n this.setActive(this.nextEnabled(-1, 1));\r\n }\r\n\r\n /** Reset button: clears the search and the selection, as the Sirio autocomplete reset. */\r\n protected reset(): void {\r\n this.query.set(null);\r\n this.updateValue(this.multiple() ? [] : null);\r\n this.close();\r\n this.comboboxRef()?.nativeElement.focus();\r\n }\r\n\r\n // ---- Selection ------------------------------------------------------------------------------\r\n protected choose(index: number): void {\r\n const item = this.view()[index];\r\n if (!item || item.disabled) {\r\n return;\r\n }\r\n if (item.isSelectAll) {\r\n this.toggleAll(item.selected);\r\n this.setActive(index);\r\n } else if (this.multiple()) {\r\n const compare = this.compareWith();\r\n const current = this.selectedValues();\r\n const next = item.selected\r\n ? current.filter((v) => !compare(v, item.value))\r\n : [...current, item.value as T];\r\n this.updateValue(next);\r\n this.setActive(index);\r\n this.emitSelected(item, !item.selected);\r\n } else {\r\n this.updateValue(item.value);\r\n this.query.set(null);\r\n this.close();\r\n // The placeholder row clears the selection: it is not an option.\r\n if (!item.isPlaceholder) {\r\n this.emitSelected(item, true);\r\n }\r\n }\r\n this.comboboxRef()?.nativeElement.focus();\r\n }\r\n\r\n private emitSelected(item: SelectItem<T>, selected: boolean): void {\r\n this.optionSelected.emit({ option: { value: item.value as T, label: item.label }, selected });\r\n }\r\n\r\n /** \"Select all\" row: selects the enabled options shown, or deselects them when all are selected. */\r\n private toggleAll(allSelected: boolean): void {\r\n const compare = this.compareWith();\r\n const targets = this.view()\r\n .filter((i) => !i.isSelectAll && !i.disabled && !i.isEmpty)\r\n .map((i) => i.value as T);\r\n const current = this.selectedValues();\r\n const next = allSelected\r\n ? current.filter((v) => !targets.some((t) => compare(v, t)))\r\n : [...current, ...targets.filter((t) => !current.some((v) => compare(v, t)))];\r\n this.updateValue(next);\r\n }\r\n\r\n // ---- Keyboard (WAI-ARIA combobox) -----------------------------------------------------------\r\n protected onKeydown(event: KeyboardEvent): void {\r\n if (this.readonly() || this.isDisabled()) {\r\n return;\r\n }\r\n const open = this.open();\r\n const count = this.view().length;\r\n const searchable = this.searchable();\r\n let handled = true;\r\n\r\n switch (event.key) {\r\n case 'ArrowDown':\r\n if (!open) {\r\n this.openList();\r\n } else if (event.altKey) {\r\n handled = false;\r\n } else {\r\n this.setActive(this.nextEnabled(this.activeIndex(), 1));\r\n }\r\n break;\r\n case 'ArrowUp':\r\n if (!open) {\r\n this.openList();\r\n } else if (event.altKey) {\r\n this.choose(this.activeIndex());\r\n this.close();\r\n } else {\r\n this.setActive(this.nextEnabled(this.activeIndex(), -1));\r\n }\r\n break;\r\n case 'Home':\r\n case 'End':\r\n // In the search field Home/End move the caret.\r\n if (searchable) {\r\n handled = false;\r\n } else if (event.key === 'Home') {\r\n open ? this.setActive(this.nextEnabled(-1, 1)) : this.openList('first');\r\n } else {\r\n open ? this.setActive(this.nextEnabled(count, -1)) : this.openList('last');\r\n }\r\n break;\r\n case 'PageDown':\r\n if (open) this.setActive(this.nextEnabled(Math.min(count - 1, this.activeIndex() + 9), 1));\r\n break;\r\n case 'PageUp':\r\n if (open) this.setActive(this.nextEnabled(Math.max(0, this.activeIndex() - 9), -1));\r\n break;\r\n case 'Enter':\r\n if (open && this.activeIndex() >= 0) {\r\n this.choose(this.activeIndex());\r\n } else if (!open) {\r\n this.openList();\r\n }\r\n break;\r\n case ' ':\r\n // In the search field the space is a character.\r\n if (searchable) {\r\n handled = false;\r\n } else if (open && this.activeIndex() >= 0) {\r\n this.choose(this.activeIndex());\r\n } else if (!open) {\r\n this.openList();\r\n }\r\n break;\r\n case 'Escape':\r\n if (open) {\r\n this.close();\r\n } else if (searchable && this.query() !== null) {\r\n this.query.set(null);\r\n } else {\r\n handled = false;\r\n }\r\n break;\r\n case 'Tab':\r\n this.close();\r\n handled = false;\r\n break;\r\n default:\r\n handled = searchable ? false : this.onTypeahead(event);\r\n }\r\n\r\n if (handled) {\r\n event.preventDefault();\r\n }\r\n }\r\n\r\n /** Typing letters moves to the first option starting with them (opens the list if closed). */\r\n private onTypeahead(event: KeyboardEvent): boolean {\r\n if (event.key.length !== 1 || event.ctrlKey || event.metaKey || event.altKey) {\r\n return false;\r\n }\r\n clearTimeout(this.typeaheadTimer);\r\n this.typeahead += event.key.toLocaleLowerCase();\r\n this.typeaheadTimer = setTimeout(() => (this.typeahead = ''), 600);\r\n\r\n const items = this.view();\r\n const start = Math.max(this.activeIndex(), 0);\r\n const offset = this.typeahead.length === 1 ? 1 : 0;\r\n const order = [...items.keys()].map((k) => (start + offset + k) % items.length);\r\n const match = order.find(\r\n (i) =>\r\n !items[i].disabled &&\r\n normalizeText(items[i].label).startsWith(normalizeText(this.typeahead)),\r\n );\r\n if (match !== undefined) {\r\n if (!this.open()) {\r\n this.openList();\r\n }\r\n this.setActive(match);\r\n }\r\n return true;\r\n }\r\n\r\n /** Next enabled option from `from` in `direction` (stays on `from` at the ends). */\r\n private nextEnabled(from: number, direction: 1 | -1): number {\r\n const items = this.view();\r\n for (let i = from + direction; i >= 0 && i < items.length; i += direction) {\r\n if (!items[i].disabled) {\r\n return i;\r\n }\r\n }\r\n return from >= 0 && from < items.length && !items[from].disabled ? from : -1;\r\n }\r\n\r\n private setActive(index: number): void {\r\n this.activeIndex.set(index);\r\n if (index < 0) {\r\n return;\r\n }\r\n // Keep the active option visible inside the scrollable listbox.\r\n queueMicrotask(() => {\r\n const list = this.listboxRef()?.nativeElement;\r\n const option = list?.querySelector<HTMLElement>(`#${CSS.escape(this.optionId(index))}`);\r\n if (list && option) {\r\n if (option.offsetTop < list.scrollTop) {\r\n list.scrollTop = option.offsetTop;\r\n } else if (option.offsetTop + option.offsetHeight > list.scrollTop + list.clientHeight) {\r\n list.scrollTop = option.offsetTop + option.offsetHeight - list.clientHeight;\r\n }\r\n }\r\n });\r\n }\r\n}\r\n","<wm-sirio-field\r\n [inputId]=\"inputId()\"\r\n [labelId]=\"labelId()\"\r\n [helpId]=\"helpId()\"\r\n [errorId]=\"errorId()\"\r\n [label]=\"label()\"\r\n [helpText]=\"helpText()\"\r\n [required]=\"isRequired()\"\r\n [errorMessage]=\"feedbackMessage()\"\r\n [state]=\"validationState()\"\r\n>\r\n @if (searchable()) {\r\n <!-- Sirio \"Dropdown Autocomplete\" markup (with the kit's screen reader hint). -->\r\n <span class=\"sr-only\" [id]=\"searchHintId()\">{{ searchHint() }}</span>\r\n <div class=\"sirio-input-group sirio-input-group-autocomplete\">\r\n <div class=\"sirio-dropdown\">\r\n <input\r\n #combobox\r\n type=\"text\"\r\n class=\"sirio-form-control sirio-dropdown-select\"\r\n role=\"combobox\"\r\n aria-autocomplete=\"list\"\r\n autocomplete=\"off\"\r\n [class.sirio-is-invalid]=\"showError()\"\r\n [class.sirio-is-valid]=\"validationState() === 'valid'\"\r\n [class.sirio-is-warning]=\"validationState() === 'warning'\"\r\n [class.filled]=\"hasSelection()\"\r\n [id]=\"inputId()\"\r\n [attr.aria-label]=\"ariaLabel() || null\"\r\n [attr.name]=\"name()\"\r\n [value]=\"inputText()\"\r\n [attr.placeholder]=\"placeholder() || null\"\r\n [disabled]=\"isDisabled()\"\r\n [readOnly]=\"readonly()\"\r\n [attr.aria-expanded]=\"open()\"\r\n [attr.aria-controls]=\"listboxId()\"\r\n [attr.aria-activedescendant]=\"activeDescendant()\"\r\n [attr.aria-required]=\"isRequired() || null\"\r\n [attr.aria-invalid]=\"showError() || null\"\r\n [attr.aria-describedby]=\"describedBy()\"\r\n (input)=\"onSearch($event)\"\r\n (click)=\"openList()\"\r\n (focus)=\"onSearchFocus($event)\"\r\n (keydown)=\"onKeydown($event)\"\r\n (blur)=\"onBlur()\"\r\n />\r\n <ng-container *ngTemplateOutlet=\"listbox\" />\r\n </div>\r\n <!-- As in the kit Autocomplete: always present, disabled when there is nothing to clear. -->\r\n <button\r\n type=\"button\"\r\n class=\"sirio-btn sirio-btn-icon sirio-btn-reset\"\r\n [attr.aria-label]=\"resetLabel()\"\r\n [title]=\"resetLabel()\"\r\n [disabled]=\"!canReset()\"\r\n (click)=\"reset()\"\r\n >\r\n <span class=\"fas fa-remove\" aria-hidden=\"true\"></span>\r\n </button>\r\n </div>\r\n } @else {\r\n <div class=\"sirio-dropdown\">\r\n <button\r\n #combobox\r\n type=\"button\"\r\n class=\"sirio-dropdown-select sirio-form-control\"\r\n role=\"combobox\"\r\n aria-haspopup=\"listbox\"\r\n [class.sirio-is-invalid]=\"showError()\"\r\n [class.sirio-is-valid]=\"validationState() === 'valid'\"\r\n [class.sirio-is-warning]=\"validationState() === 'warning'\"\r\n [class.filled]=\"hasSelection()\"\r\n [id]=\"inputId()\"\r\n [disabled]=\"isDisabled()\"\r\n [attr.aria-labelledby]=\"\r\n ariaLabel() ? ariaLabelId() + ' ' + valueId() : label() ? labelId() + ' ' + valueId() : null\r\n \"\r\n [attr.aria-expanded]=\"open()\"\r\n [attr.aria-controls]=\"listboxId()\"\r\n [attr.aria-activedescendant]=\"activeDescendant()\"\r\n [attr.aria-required]=\"isRequired() || null\"\r\n [attr.aria-invalid]=\"showError() || null\"\r\n [attr.aria-readonly]=\"readonly() || null\"\r\n [attr.aria-describedby]=\"describedBy()\"\r\n (click)=\"toggle()\"\r\n (keydown)=\"onKeydown($event)\"\r\n (blur)=\"onBlur()\"\r\n >\r\n <span [id]=\"valueId()\">{{ displayText() || placeholder() }}</span>\r\n </button>\r\n <ng-container *ngTemplateOutlet=\"listbox\" />\r\n </div>\r\n }\r\n @if (ariaLabel()) {\r\n <!-- Name of the combobox (with the value) and of the listbox, instead of the label. -->\r\n <span hidden [id]=\"ariaLabelId()\">{{ ariaLabel() }}</span>\r\n }\r\n</wm-sirio-field>\r\n\r\n<ng-template #listbox>\r\n <ul\r\n #listboxEl\r\n class=\"sirio-dropdown-menu\"\r\n role=\"listbox\"\r\n tabindex=\"-1\"\r\n [class.sirio-dropdown-menu-top]=\"openUpwards()\"\r\n [id]=\"listboxId()\"\r\n [attr.aria-labelledby]=\"ariaLabel() ? ariaLabelId() : label() ? labelId() : null\"\r\n [attr.aria-multiselectable]=\"multiple() || null\"\r\n [attr.data-sirio-visible]=\"open()\"\r\n >\r\n @for (item of view(); track $index; let i = $index) {\r\n <li\r\n role=\"option\"\r\n class=\"sirio-dropdown-item\"\r\n [id]=\"optionId(i)\"\r\n [class.active]=\"item.selected\"\r\n [class.hover]=\"i === activeIndex()\"\r\n [class.disabled]=\"item.disabled\"\r\n [class.sirio-select-all]=\"item.isSelectAll\"\r\n [attr.aria-selected]=\"item.isEmpty ? null : item.selected\"\r\n [attr.aria-disabled]=\"item.disabled || null\"\r\n (mousedown)=\"$event.preventDefault()\"\r\n (click)=\"choose(i)\"\r\n (mousemove)=\"item.disabled || activeIndex.set(i)\"\r\n >\r\n {{ item.label }}\r\n </li>\r\n }\r\n </ul>\r\n</ng-template>\r\n","import {\r\n booleanAttribute,\r\n ChangeDetectionStrategy,\r\n Component,\r\n computed,\r\n effect,\r\n ElementRef,\r\n input,\r\n numberAttribute,\r\n output,\r\n signal,\r\n untracked,\r\n viewChild,\r\n} from '@angular/core';\r\nimport { AbstractControl, ValidationErrors, Validator } from '@angular/forms';\r\nimport { provideSirioControl, SirioControlBase } from '../core/sirio-control-base';\r\nimport { SirioField } from '../field/sirio-field';\r\n\r\n/** How the options are matched with the typed text (kit: `startsWith`). */\r\nexport type SirioAutocompleteFilter = 'startsWith' | 'contains';\r\n\r\n/**\r\n * Autocomplete of the Sirio web kit (\"Autocomplete\"): text input with the list of suggestions\r\n * (`.sirio-input-group.sirio-input-group-autocomplete` > `.sirio-dropdown` with the input\r\n * `role=\"combobox\"` and `ul.sirio-dropdown-menu[role=listbox]` of `li.sirio-dropdown-item[role=option]`)\r\n * and the \"Cancella testo\" button (`.sirio-btn-reset`).\r\n *\r\n * Behaviour of the kit script (SirioDropdownAutocomplete) reproduced in Angular: the list opens\r\n * from the third typed character (`minChars`), options starting with the text (case-insensitive),\r\n * the first one highlighted (`hover`); ↑/↓ move (wrapping), Enter or a click choose, Esc closes,\r\n * the reset button clears the text. Unlike the kit there is no inline completion of the typed text\r\n * (`aria-autocomplete=\"list\"`), so the form value is always what the user typed or chose, and Tab\r\n * accepts the highlighted option only after moving with the arrows.\r\n *\r\n * The value is the text (`string | null`); with `strict` it must be one of the options\r\n * (`sirioOption` error). For server-side suggestions listen to `(search)` and update `options`\r\n * (set `[clientFilter]=\"false\"` when the server already filters).\r\n *\r\n * ```html\r\n * <wm-sirio-autocomplete label=\"Comune di nascita\" formControlName=\"comune\" [options]=\"comuni\" strict />\r\n * ```\r\n */\r\n@Component({\r\n selector: 'wm-sirio-autocomplete',\r\n imports: [SirioField],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [provideSirioControl(() => SirioAutocomplete, { validator: true })],\r\n styleUrl: './sirio-autocomplete.scss',\r\n templateUrl: './sirio-autocomplete.html',\r\n})\r\nexport class SirioAutocomplete extends SirioControlBase<string> implements Validator {\r\n /** Suggestions. */\r\n readonly options = input<string[]>([]);\r\n /** Characters to type before the list opens (kit: 3). */\r\n readonly minChars = input(3, { transform: (v: unknown) => Math.max(0, numberAttribute(v, 3)) });\r\n /** Matching of the options (kit: `startsWith`). */\r\n readonly filter = input<SirioAutocompleteFilter>('startsWith');\r\n /** Filter the options in the component (false when the server already filters on `(search)`). */\r\n readonly clientFilter = input(true, { transform: booleanAttribute });\r\n /** Maximum number of suggestions shown (null = all). */\r\n readonly maxResults = input<number | null, unknown>(null, {\r\n transform: (v: unknown) => (v == null || v === '' ? null : numberAttribute(v)),\r\n });\r\n /** The value must be one of the options (`sirioOption` error otherwise). */\r\n readonly strict = input(false, { transform: booleanAttribute });\r\n readonly clearLabel = input('Cancella testo');\r\n /** sr-only hint of the kit (default built from `minChars`). */\r\n readonly hintText = input<string | null>(null);\r\n readonly noResultsLabel = input('Nessun risultato');\r\n /** Accessible name and tooltip of the search button (`wm-sirio-searchbar`). */\r\n readonly searchButtonLabel = input('Avvia ricerca');\r\n /** Text of the search button, visible from 768px (`wm-sirio-searchbar`). */\r\n readonly searchButtonText = input('Ricerca');\r\n\r\n /** The typed text, when it is long enough to search (`minChars`): load `options` from a server. */\r\n readonly search = output<string>();\r\n /** An option was chosen. */\r\n readonly optionSelected = output<string>();\r\n\r\n /** Search button and search on Enter (set by `wm-sirio-searchbar`). */\r\n protected readonly searchMode: boolean = false;\r\n /** The search was started (`wm-sirio-searchbar`): the text, or null when empty. */\r\n readonly searched = output<string | null>();\r\n\r\n private readonly inputRef = viewChild.required<ElementRef<HTMLInputElement>>('input');\r\n protected readonly listId = computed(() => `${this.inputId()}-listbox`);\r\n protected readonly hintId = computed(() => `${this.inputId()}-hint`);\r\n\r\n protected readonly open = signal(false);\r\n /**\r\n * Highlighted option (kit class `hover`, announced through `aria-activedescendant`;\r\n * `aria-selected` stays false as in the kit, whose CSS shows a check mark on selected options).\r\n */\r\n protected readonly active = signal(-1);\r\n /** The user moved in the list with the arrows (Tab then accepts the option). */\r\n private navigated = false;\r\n /** The list may open (after typing, not after choosing an option or Esc). */\r\n private readonly searching = signal(false);\r\n\r\n protected readonly term = computed(() => (this.value() ?? '').trim());\r\n\r\n protected readonly results = computed(() => {\r\n const term = this.term().toLocaleLowerCase();\r\n const max = this.maxResults();\r\n let list = this.options();\r\n if (this.clientFilter()) {\r\n list = list.filter((o) => {\r\n const option = o.toLocaleLowerCase();\r\n return this.filter() === 'contains' ? option.includes(term) : option.startsWith(term);\r\n });\r\n }\r\n return max ? list.slice(0, max) : list;\r\n });\r\n\r\n protected readonly hint = computed(() => {\r\n const custom = this.hintText();\r\n if (custom !== null) {\r\n return custom;\r\n }\r\n const n = this.minChars();\r\n const ordinals = ['', 'primo', 'secondo', 'terzo', 'quarto', 'quinto'];\r\n return n <= 1\r\n ? 'Le possibili scelte vengono mostrate durante la digitazione'\r\n : `Si avvisa che solo dopo la digitazione del ${ordinals[n] ?? `${n}°`} carattere vengono mostrate le possibili scelte`;\r\n });\r\n\r\n protected readonly listLabel = computed(\r\n () => `Autocomplete ${this.label()}. Lista risultati trovati`,\r\n );\r\n\r\n /** Live announcement of the number of suggestions. */\r\n protected readonly status = computed(() => {\r\n if (!this.searching() || this.term().length < this.minChars()) {\r\n return '';\r\n }\r\n const n = this.results().length;\r\n return n === 0 ? this.noResultsLabel() : n === 1 ? '1 risultato disponibile' : `${n} risultati disponibili`;\r\n });\r\n\r\n private onValidatorChange: () => void = () => {};\r\n\r\n constructor() {\r\n super();\r\n // The list follows the typed text and the (possibly async) options.\r\n effect(() => {\r\n const show =\r\n this.searching() && this.term().length >= this.minChars() && this.results().length > 0;\r\n untracked(() => {\r\n this.open.set(show);\r\n if (show && (this.active() < 0 || this.active() >= this.results().length)) {\r\n this.active.set(0); // kit: the first option is highlighted\r\n }\r\n if (!show) {\r\n this.active.set(-1);\r\n }\r\n });\r\n });\r\n // Re-validate when the options or the strict mode change.\r\n effect(() => {\r\n this.options();\r\n this.strict();\r\n this.onValidatorChange();\r\n });\r\n }\r\n\r\n protected override describedByExtra(): string[] {\r\n return [this.hintId()];\r\n }\r\n\r\n protected optionId(index: number): string {\r\n return `${this.inputId()}-option-${index}`;\r\n }\r\n\r\n protected onInput(event: Event): void {\r\n const text = (event.target as HTMLInputElement).value;\r\n this.navigated = false;\r\n this.active.set(-1);\r\n this.searching.set(true);\r\n this.updateValue(text === '' ? null : text);\r\n if (text.trim().length >= this.minChars()) {\r\n this.search.emit(text.trim());\r\n }\r\n }\r\n\r\n protected onKeydown(event: KeyboardEvent): void {\r\n const count = this.results().length;\r\n switch (event.key) {\r\n case 'ArrowDown':\r\n case 'ArrowUp': {\r\n if (!this.open()) {\r\n if (this.term().length >= this.minChars() && count) {\r\n this.searching.set(true);\r\n }\r\n event.preventDefault();\r\n return;\r\n }\r\n event.preventDefault();\r\n const step = event.key === 'ArrowDown' ? 1 : -1;\r\n const current = this.active();\r\n // Kit: the list wraps (↑ on the first option goes to the last one).\r\n this.active.set(current < 0 ? (step > 0 ? 0 : count - 1) : (current + step + count) % count);\r\n this.navigated = true;\r\n this.scrollActiveIntoView();\r\n break;\r\n }\r\n case 'Enter':\r\n if (this.open() && this.active() >= 0) {\r\n event.preventDefault(); // do not submit the form\r\n this.choose(this.results()[this.active()]);\r\n } else if (this.searchMode) {\r\n event.preventDefault();\r\n this.submitSearch();\r\n }\r\n break;\r\n case 'Tab':\r\n if (this.open() && this.navigated && this.active() >= 0) {\r\n this.choose(this.results()[this.active()], false);\r\n } else {\r\n this.close();\r\n }\r\n break;\r\n case 'Escape':\r\n if (this.open()) {\r\n event.preventDefault();\r\n this.close();\r\n }\r\n break;\r\n }\r\n }\r\n\r\n protected onBlur(): void {\r\n this.close();\r\n this.markTouched();\r\n }\r\n\r\n /** Chooses an option: the text becomes the value and the list closes. */\r\n choose(option: string, focus = true): void {\r\n this.updateValue(option);\r\n this.close();\r\n this.optionSelected.emit(option);\r\n if (focus) {\r\n this.inputRef().nativeElement.focus();\r\n }\r\n }\r\n\r\n /** Starts the search (`wm-sirio-searchbar` button or Enter with the list closed). */\r\n submitSearch(): void {\r\n this.close();\r\n this.searched.emit(this.term() || null);\r\n }\r\n\r\n /** Clears the text (kit \"Cancella testo\") and returns the focus to the input. */\r\n clear(): void {\r\n this.updateValue(null);\r\n this.close();\r\n this.inputRef().nativeElement.focus();\r\n }\r\n\r\n private close(): void {\r\n this.searching.set(false);\r\n this.navigated = false;\r\n }\r\n\r\n private scrollActiveIntoView(): void {\r\n const index = this.active();\r\n queueMicrotask(() =>\r\n this.inputRef()\r\n .nativeElement.ownerDocument.getElementById(this.optionId(index))\r\n ?.scrollIntoView?.({ block: 'nearest' }),\r\n );\r\n }\r\n\r\n // ---- Validator ------------------------------------------------------------------------------\r\n validate(control: AbstractControl): ValidationErrors | null {\r\n const value = control.value as string | null;\r\n if (!this.strict() || value === null || value === '' || this.options().includes(value)) {\r\n return null;\r\n }\r\n return { sirioOption: { value } };\r\n }\r\n\r\n registerOnValidatorChange(fn: () => void): void {\r\n this.onValidatorChange = fn;\r\n }\r\n}\r\n\r\n/**\r\n * Searchbar of the Sirio web kit (\"Searchbar\"): the kit autocomplete (`wm-sirio-autocomplete`, same\r\n * markup and behaviour) followed by the search button (`sirio-btn sirio-btn-primary sirio-btn-icon\r\n * px-md-4`, \"Avvia ricerca\", text \"Ricerca\" visible from 768px). The host is a `search` landmark.\r\n *\r\n * The search starts with the button or with Enter when the suggestion list is closed (Enter on a\r\n * highlighted suggestion chooses it, as in the kit; `searchOnSelect` searches right away).\r\n *\r\n * ```html\r\n * <wm-sirio-searchbar label=\"Cerca nel sito\" placeholder=\"Cosa cerchi?\" [options]=\"suggestions\"\r\n * [(ngModel)]=\"query\" (searched)=\"search($event)\" />\r\n * ```\r\n */\r\n@Component({\r\n selector: 'wm-sirio-searchbar',\r\n imports: [SirioField],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [provideSirioControl(() => SirioSearchbar, { validator: true })],\r\n host: {\r\n role: 'search',\r\n '[attr.aria-labelledby]': 'label() ? labelId() : null',\r\n },\r\n styleUrl: './sirio-autocomplete.scss',\r\n templateUrl: './sirio-autocomplete.html',\r\n})\r\nexport class SirioSearchbar extends SirioAutocomplete {\r\n protected override readonly searchMode = true;\r\n /** Choosing a suggestion starts the search at once. */\r\n readonly searchOnSelect = input(false, { transform: booleanAttribute });\r\n\r\n override choose(option: string, focus = true): void {\r\n super.choose(option, focus);\r\n if (this.searchOnSelect()) {\r\n this.searched.emit(option);\r\n }\r\n }\r\n}\r\n","<wm-sirio-field\r\n [inputId]=\"inputId()\"\r\n [helpId]=\"helpId()\"\r\n [errorId]=\"errorId()\"\r\n [label]=\"label()\"\r\n [labelId]=\"labelId()\"\r\n [helpText]=\"helpText()\"\r\n [required]=\"isRequired()\"\r\n [errorMessage]=\"feedbackMessage()\"\r\n [state]=\"validationState()\"\r\n>\r\n <span class=\"sr-only\" [id]=\"hintId()\">{{ hint() }}</span>\r\n <div class=\"sirio-input-group sirio-input-group-autocomplete\">\r\n <div class=\"sirio-dropdown\" data-sirio-component=\"dropdown\">\r\n <input\r\n #input\r\n class=\"sirio-form-control\"\r\n type=\"text\"\r\n role=\"combobox\"\r\n aria-autocomplete=\"list\"\r\n data-sirio-component=\"autocomplete\"\r\n data-sirio-toggle=\"dropdown\"\r\n autocomplete=\"off\"\r\n [class.sirio-is-invalid]=\"showError()\"\r\n [class.sirio-is-valid]=\"validationState() === 'valid'\"\r\n [class.sirio-is-warning]=\"validationState() === 'warning'\"\r\n [class.filled]=\"!!value()\"\r\n [id]=\"inputId()\"\r\n [attr.aria-label]=\"ariaLabel() || null\"\r\n [attr.name]=\"name()\"\r\n [value]=\"value() ?? ''\"\r\n [attr.placeholder]=\"placeholder() || null\"\r\n [disabled]=\"isDisabled()\"\r\n [readOnly]=\"readonly()\"\r\n [attr.aria-expanded]=\"open()\"\r\n [attr.aria-controls]=\"listId()\"\r\n [attr.aria-activedescendant]=\"open() && active() >= 0 ? optionId(active()) : null\"\r\n [attr.aria-required]=\"isRequired() || null\"\r\n [attr.aria-invalid]=\"showError() || null\"\r\n [attr.aria-describedby]=\"describedBy()\"\r\n (input)=\"onInput($event)\"\r\n (keydown)=\"onKeydown($event)\"\r\n (blur)=\"onBlur()\"\r\n />\r\n <ul\r\n class=\"sirio-dropdown-menu\"\r\n role=\"listbox\"\r\n tabindex=\"-1\"\r\n [id]=\"listId()\"\r\n [attr.aria-label]=\"listLabel()\"\r\n [attr.data-sirio-visible]=\"open()\"\r\n >\r\n @for (option of results(); track option; let i = $index) {\r\n <li\r\n role=\"option\"\r\n class=\"sirio-dropdown-item\"\r\n [class.hover]=\"i === active()\"\r\n [id]=\"optionId(i)\"\r\n aria-selected=\"false\"\r\n (mousedown)=\"$event.preventDefault()\"\r\n (mousemove)=\"active.set(i)\"\r\n (click)=\"choose(option)\"\r\n >\r\n {{ option }}\r\n </li>\r\n }\r\n </ul>\r\n </div>\r\n <button\r\n type=\"button\"\r\n class=\"sirio-btn sirio-btn-icon sirio-btn-reset\"\r\n [attr.aria-label]=\"clearLabel()\"\r\n [attr.title]=\"clearLabel()\"\r\n [disabled]=\"!value() || isDisabled() || readonly()\"\r\n (click)=\"clear()\"\r\n >\r\n <span class=\"fas fa-remove\" aria-hidden=\"true\"></span>\r\n </button>\r\n @if (searchMode) {\r\n <button\r\n type=\"button\"\r\n class=\"sirio-btn sirio-btn-primary sirio-btn-icon px-md-4\"\r\n [attr.aria-label]=\"searchButtonLabel()\"\r\n [attr.title]=\"searchButtonLabel()\"\r\n [disabled]=\"isDisabled()\"\r\n (click)=\"submitSearch()\"\r\n >\r\n <span class=\"d-none d-md-inline-block\">{{ searchButtonText() }}</span>\r\n <span class=\"fas fa-search\" aria-hidden=\"true\"></span>\r\n </button>\r\n }\r\n </div>\r\n <span class=\"sr-only\" role=\"status\">{{ status() }}</span>\r\n</wm-sirio-field>\r\n","import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n computed,\r\n effect,\r\n input,\r\n numberAttribute,\r\n signal,\r\n untracked,\r\n} from '@angular/core';\r\nimport { provideSirioControl, SirioControlBase } from '../core/sirio-control-base';\r\nimport { SirioField } from '../field/sirio-field';\r\n\r\n/** Decimal places of a number (step 0.5 -> 1), used to round away floating point noise. */\r\nfunction decimalsOf(value: number): number {\r\n const text = String(value);\r\n if (text.includes('e-')) {\r\n return Number(text.split('e-')[1]);\r\n }\r\n return text.includes('.') ? text.split('.')[1].length : 0;\r\n}\r\n\r\n/**\r\n * Slider of the Sirio web kit: `.sirio-slider` with the range (`input.sirio-form-range`), the\r\n * number field of the selected value (`input.sirio-form-control`) and the limits below the track\r\n * (`.sirio-slider-range`). As in the kit guide the help text sits between the label and the\r\n * slider, and a visually hidden text announces the allowed interval.\r\n *\r\n * Behaviour of the kit script (SirioSlider) reproduced in Angular:\r\n * - the track fill follows the value (CSS variables `--min`, `--max`, `--val` on the range);\r\n * - range and number field stay in sync; a typed value above `max` is brought back to `max` at\r\n * once, a value below `min` when the field is left;\r\n * - the typed value is aligned to `step` when the field is left.\r\n *\r\n * Model: number, or null when the number field is emptied (the range then shows `min`).\r\n * `min` / `max` are not validators: a value outside the limits (set from code, or left outside by a\r\n * change of the limits) is moved to the nearest limit and written back to the model.\r\n *\r\n * ```html\r\n * <wm-sirio-slider label=\"Percentuale\" [min]=\"0\" [max]=\"100\" [step]=\"5\" formControlName=\"percent\" />\r\n * ```\r\n */\r\n@Component({\r\n selector: 'wm-sirio-slider',\r\n imports: [SirioField],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [provideSirioControl(() => SirioSlider)],\r\n templateUrl: './sirio-slider.html',\r\n})\r\nexport class SirioSlider extends SirioControlBase<number> {\r\n readonly min = input(0, { transform: numberAttribute });\r\n readonly max = input(100, { transform: numberAttribute });\r\n readonly step = input(1, { transform: numberAttribute });\r\n /** Accessible name of the number field (kit: \"Valore selezionato\"). */\r\n readonly valueLabel = input('Valore selezionato');\r\n /** Visually hidden description of the interval; default \"I valori rientrano nell'intervallo tra min e max\". */\r\n readonly rangeDescription = input<string | null>(null);\r\n\r\n /** Text of the number field (may differ from the value while typing). */\r\n protected readonly text = signal('');\r\n protected readonly rangeTextId = computed(() => `${this.inputId()}-range`);\r\n protected readonly rangeText = computed(\r\n () =>\r\n this.rangeDescription() ??\r\n `I valori rientrano nell'intervallo tra ${this.min()} e ${this.max()}`,\r\n );\r\n /** Position of the thumb: the value within the limits, `min` when there is no value. */\r\n protected readonly rangeValue = computed(() => {\r\n const value = this.value();\r\n return value === null ? this.min() : Math.min(this.max(), Math.max(this.min(), value));\r\n });\r\n\r\n constructor() {\r\n super();\r\n // A value outside the limits (from code, or after the limits changed) goes to the nearest limit.\r\n // An effect, not writeValue: it runs after the form has registered its change callback.\r\n effect(() => {\r\n const value = this.value();\r\n const min = this.min();\r\n const max = this.max();\r\n if (value === null || min > max || (value >= min && value <= max)) {\r\n return;\r\n }\r\n untracked(() => {\r\n const clamped = Math.min(max, Math.max(min, value));\r\n this.text.set(this.format(clamped));\r\n this.updateValue(clamped);\r\n });\r\n });\r\n }\r\n\r\n protected override describedByExtra(): string[] {\r\n return [this.rangeTextId()];\r\n }\r\n\r\n override writeValue(value: unknown): void {\r\n super.writeValue(value as number | null);\r\n this.text.set(this.format(this.value()));\r\n }\r\n\r\n protected override fromModel(value: unknown): number | null {\r\n if (value === null || value === undefined || value === '') {\r\n return null;\r\n }\r\n const n = typeof value === 'number' ? value : Number(value);\r\n return Number.isFinite(n) ? n : null;\r\n }\r\n\r\n // ---- User interaction -----------------------------------------------------------------------\r\n protected onRangeInput(event: Event): void {\r\n const el = event.target as HTMLInputElement;\r\n if (this.readonly()) {\r\n el.value = String(this.rangeValue());\r\n return;\r\n }\r\n const value = this.round(Number(el.value));\r\n this.text.set(this.format(value));\r\n this.setValue(value);\r\n }\r\n\r\n protected onNumberInput(event: Event): void {\r\n const el = event.target as HTMLInputElement;\r\n const raw = el.value.trim();\r\n this.text.set(raw);\r\n if (raw === '') {\r\n // A partially typed number (\"-\", \"1e\") is reported as '' by the browser: wait for the blur.\r\n if (!el.validity.badInput) {\r\n this.setValue(null);\r\n }\r\n return;\r\n }\r\n const value = Number(raw);\r\n if (!Number.isFinite(value)) {\r\n return;\r\n }\r\n if (value > this.max()) {\r\n // Kit behaviour: a value above the maximum is replaced by the maximum at once.\r\n const max = this.max();\r\n this.text.set(this.format(max));\r\n el.value = this.format(max);\r\n this.setValue(max);\r\n } else if (value >= this.min()) {\r\n this.setValue(value);\r\n }\r\n // Below the minimum: the user may still be typing (\"1\" on the way to \"15\"); fixed on blur.\r\n }\r\n\r\n protected onNumberBlur(event: Event): void {\r\n const el = event.target as HTMLInputElement;\r\n const raw = el.value.trim();\r\n const value = raw === '' ? null : this.normalize(Number(raw));\r\n this.text.set(this.format(value));\r\n el.value = this.format(value);\r\n this.setValue(value);\r\n this.markTouched();\r\n }\r\n\r\n // ---- Helpers --------------------------------------------------------------------------------\r\n private setValue(value: number | null): void {\r\n if (value !== this.value()) {\r\n this.updateValue(value);\r\n }\r\n }\r\n\r\n /** Clamps to the limits and aligns to the step (counted from min). */\r\n private normalize(value: number): number | null {\r\n if (!Number.isFinite(value)) {\r\n return this.value();\r\n }\r\n const min = this.min();\r\n const max = this.max();\r\n const step = this.step() > 0 ? this.step() : 1;\r\n const clamped = Math.min(max, Math.max(min, value));\r\n const stepped = min + Math.round((clamped - min) / step) * step;\r\n return this.round(Math.min(max, stepped));\r\n }\r\n\r\n /** Removes floating point noise (0.1 + 0.2) using the precision of step and min. */\r\n private round(value: number): number {\r\n const digits = Math.max(decimalsOf(this.step()), decimalsOf(this.min()));\r\n return Number(value.toFixed(digits));\r\n }\r\n\r\n private format(value: number | null): string {\r\n return value === null ? '' : String(value);\r\n }\r\n}\r\n","<!-- Range input: the async validation spinner goes next to the label. -->\r\n<wm-sirio-field\r\n pendingPlacement=\"label\"\r\n [inputId]=\"inputId()\"\r\n [helpId]=\"helpId()\"\r\n [errorId]=\"errorId()\"\r\n [label]=\"label()\"\r\n [helpText]=\"helpText()\"\r\n helpPosition=\"above\"\r\n [required]=\"isRequired()\"\r\n [errorMessage]=\"feedbackMessage()\"\r\n [state]=\"validationState()\"\r\n>\r\n <span class=\"sr-only\" [id]=\"rangeTextId()\">{{ rangeText() }}</span>\r\n <div class=\"sirio-slider\">\r\n <input\r\n type=\"range\"\r\n class=\"sirio-form-range\"\r\n [id]=\"inputId()\"\r\n [attr.aria-label]=\"ariaLabel() || null\"\r\n [attr.name]=\"name()\"\r\n [attr.min]=\"min()\"\r\n [attr.max]=\"max()\"\r\n [attr.step]=\"step()\"\r\n [value]=\"rangeValue()\"\r\n [style.--min]=\"min()\"\r\n [style.--max]=\"max()\"\r\n [style.--val]=\"rangeValue()\"\r\n [disabled]=\"isDisabled()\"\r\n [attr.aria-readonly]=\"readonly() || null\"\r\n [attr.aria-required]=\"isRequired() || null\"\r\n [attr.aria-invalid]=\"showError() || null\"\r\n [attr.aria-describedby]=\"describedBy()\"\r\n (input)=\"onRangeInput($event)\"\r\n (blur)=\"markTouched()\"\r\n />\r\n <input\r\n autocomplete=\"off\"\r\n type=\"number\"\r\n class=\"sirio-form-control\"\r\n inputmode=\"decimal\"\r\n [id]=\"inputId() + '-value'\"\r\n [attr.min]=\"min()\"\r\n [attr.max]=\"max()\"\r\n [attr.step]=\"step()\"\r\n [value]=\"text()\"\r\n [class.sirio-is-invalid]=\"showError()\"\r\n [class.sirio-is-valid]=\"validationState() === 'valid'\"\r\n [class.sirio-is-warning]=\"validationState() === 'warning'\"\r\n [disabled]=\"isDisabled()\"\r\n [readOnly]=\"readonly()\"\r\n [attr.aria-label]=\"valueLabel()\"\r\n [attr.aria-invalid]=\"showError() || null\"\r\n [attr.aria-describedby]=\"feedbackMessage() ? errorId() : null\"\r\n (input)=\"onNumberInput($event)\"\r\n (blur)=\"onNumberBlur($event)\"\r\n />\r\n <div class=\"sirio-slider-range\" aria-hidden=\"true\">\r\n <span>{{ min() }}</span><span>{{ max() }}</span>\r\n </div>\r\n </div>\r\n</wm-sirio-field>\r\n","import { NgTemplateOutlet } from '@angular/common';\r\nimport {\r\n afterNextRender,\r\n booleanAttribute,\r\n ChangeDetectionStrategy,\r\n Component,\r\n computed,\r\n DestroyRef,\r\n effect,\r\n ElementRef,\r\n inject,\r\n Injector,\r\n input,\r\n numberAttribute,\r\n output,\r\n signal,\r\n} from '@angular/core';\r\nimport { AbstractControl, ValidationErrors, Validator } from '@angular/forms';\r\nimport { firstValueFrom, isObservable, Observable } from 'rxjs';\r\nimport { provideSirioControl, SirioControlBase } from '../core/sirio-control-base';\r\nimport { SirioPendingIndicator } from '../pending/sirio-pending';\r\nimport { SirioInfoButton } from '../tooltip/sirio-info-button';\r\n\r\n/**\r\n * A file that is not a browser `File`: typically a file already stored on a server (initial value\r\n * of the form, or a value restored from a draft). Only `name` is required; `type` and `size` are\r\n * shown when present, the other properties (ids, urls...) are kept untouched in the model.\r\n */\r\nexport interface SirioFileDescriptor {\r\n name: string;\r\n type?: string;\r\n size?: number;\r\n [key: string]: unknown;\r\n}\r\n\r\n/** An item of the model: a file chosen in the browser or a descriptor of a stored file. */\r\nexport type SirioFileItem = File | SirioFileDescriptor;\r\n\r\n/** Operation in progress on a file of the list. */\r\nexport type SirioFileStatus = 'uploading' | 'deleting' | 'downloading';\r\n\r\n/** Result of a handler: an Observable (first value), a Promise or a plain value. */\r\nexport type SirioFileTask<T> = Observable<T> | Promise<T> | T;\r\n\r\n/**\r\n * Uploads a chosen file. The result, when it is an object, is merged into the `File` (its\r\n * properties are added, existing ones such as `name` are kept): e.g. the id given by the server.\r\n */\r\nexport type SirioFileUploadHandler = (file: File) => SirioFileTask<unknown>;\r\n\r\n/** Deletes a stored file (a descriptor or an uploaded `File`); `false` or an error keep it in the list. */\r\nexport type SirioFileDeleteHandler = (file: SirioFileItem) => SirioFileTask<unknown>;\r\n\r\n/**\r\n * Gives the content of a stored file: a URL, a data URI, a base64 string or a `Blob`.\r\n * Chosen files (`File`) are saved directly, without the handler.\r\n */\r\nexport type SirioFileDownloadHandler = (\r\n file: SirioFileDescriptor,\r\n) => SirioFileTask<string | Blob | null | undefined>;\r\n\r\n/** Failure of a handler (output `fileError`). */\r\nexport interface SirioFileErrorEvent {\r\n file: SirioFileItem;\r\n action: 'upload' | 'delete' | 'download';\r\n error: unknown;\r\n}\r\n\r\n/** Optional number input: empty/null means \"no limit\". */\r\nfunction optionalNumber(value: unknown): number | null {\r\n return value === null || value === undefined || value === '' ? null : numberAttribute(value);\r\n}\r\n\r\n/** Human readable size, Italian format (1,5 MB). */\r\nexport function sirioFormatFileSize(bytes: number): string {\r\n const units = ['byte', 'KB', 'MB', 'GB'];\r\n let size = bytes;\r\n let unit = 0;\r\n while (size >= 1024 && unit < units.length - 1) {\r\n size /= 1024;\r\n unit++;\r\n }\r\n const text = unit === 0 ? String(size) : size.toFixed(size < 10 ? 1 : 0).replace('.', ',');\r\n return `${text.replace(/,0$/, '')} ${units[unit]}`;\r\n}\r\n\r\n/** True when the file matches the `accept` list (extensions `.pdf`, MIME types, `image/*`). */\r\nexport function sirioFileAccepted(file: Pick<File, 'name' | 'type'>, accept: string | null): boolean {\r\n const rules = (accept ?? '')\r\n .split(',')\r\n .map((r) => r.trim().toLowerCase())\r\n .filter(Boolean);\r\n if (!rules.length) {\r\n return true;\r\n }\r\n const name = file.name.toLowerCase();\r\n const type = (file.type ?? '').toLowerCase();\r\n return rules.some((rule) => {\r\n if (rule.startsWith('.')) {\r\n return name.endsWith(rule);\r\n }\r\n if (rule.endsWith('/*')) {\r\n return type.startsWith(rule.slice(0, -1));\r\n }\r\n return type === rule;\r\n });\r\n}\r\n\r\n/** Extension of a file name in upper case (`PDF`), empty when missing. */\r\nexport function sirioFileExtension(name: string): string {\r\n const index = name.lastIndexOf('.');\r\n return index > 0 && index < name.length - 1 ? name.slice(index + 1).toUpperCase() : '';\r\n}\r\n\r\nconst FILE_ICONS: Record<string, string> = {\r\n pdf: 'fa-file-pdf',\r\n doc: 'fa-file-word',\r\n docx: 'fa-file-word',\r\n odt: 'fa-file-word',\r\n xls: 'fa-file-excel',\r\n xlsx: 'fa-file-excel',\r\n ods: 'fa-file-excel',\r\n csv: 'fa-file-csv',\r\n ppt: 'fa-file-powerpoint',\r\n pptx: 'fa-file-powerpoint',\r\n txt: 'fa-file-lines',\r\n log: 'fa-file-lines',\r\n md: 'fa-file-lines',\r\n zip: 'fa-file-zipper',\r\n rar: 'fa-file-zipper',\r\n '7z': 'fa-file-zipper',\r\n tar: 'fa-file-zipper',\r\n gz: 'fa-file-zipper',\r\n jpg: 'fa-file-image',\r\n jpeg: 'fa-file-image',\r\n png: 'fa-file-image',\r\n gif: 'fa-file-image',\r\n bmp: 'fa-file-image',\r\n svg: 'fa-file-image',\r\n webp: 'fa-file-image',\r\n mp3: 'fa-file-audio',\r\n wav: 'fa-file-audio',\r\n ogg: 'fa-file-audio',\r\n m4a: 'fa-file-audio',\r\n mp4: 'fa-file-video',\r\n avi: 'fa-file-video',\r\n mov: 'fa-file-video',\r\n mkv: 'fa-file-video',\r\n webm: 'fa-file-video',\r\n html: 'fa-file-code',\r\n css: 'fa-file-code',\r\n js: 'fa-file-code',\r\n ts: 'fa-file-code',\r\n json: 'fa-file-code',\r\n xml: 'fa-file-code',\r\n};\r\n\r\n/** Font Awesome icon of a file, from its extension (`fa-file-pdf`, default `fa-file`). */\r\nexport function sirioFileIcon(name: string): string {\r\n return FILE_ICONS[sirioFileExtension(name).toLowerCase()] ?? 'fa-file';\r\n}\r\n\r\n/** True for browser File objects. */\r\nfunction isFile(value: unknown): value is File {\r\n return typeof File !== 'undefined' && value instanceof File;\r\n}\r\n\r\n/** Items accepted in the model: `File` objects and objects with a string `name`. */\r\nfunction isItem(value: unknown): value is SirioFileItem {\r\n return (\r\n isFile(value) ||\r\n (typeof value === 'object' && value !== null && typeof (value as { name?: unknown }).name === 'string')\r\n );\r\n}\r\n\r\n/** First value of an Observable, or the value of a Promise / plain value. */\r\nfunction settle<T>(task: SirioFileTask<T>): Promise<T | undefined> {\r\n return isObservable(task) ? firstValueFrom(task, { defaultValue: undefined }) : Promise.resolve(task);\r\n}\r\n\r\n/** True for a plain base64 string (no data URI). */\r\nfunction isBase64(value: string): boolean {\r\n return value.length > 0 && value.length % 4 === 0 && /^[A-Za-z0-9+/]+={0,2}$/.test(value);\r\n}\r\n\r\n/**\r\n * Files uploaded by any `wm-sirio-file-upload` of the page: removing one of them calls the\r\n * `deleteHandler` (also when the file reached this control through the model of another one).\r\n */\r\nconst UPLOADED = new WeakSet<File>();\r\n\r\n/**\r\n * File upload of the Sirio web kit (\"File Upload\"): `.sirio-upload` with the group label\r\n * (`div.sirio-label`), the help text, the hidden `input.sirio-upload-file` and its\r\n * `label.sirio-btn.sirio-btn-primary` button; chosen files are listed as chips\r\n * (`ul.sirio-upload-file-list` > `li` > `.sirio-chip` with the \"Elimina file\" button), exactly as\r\n * generated by the kit script (SirioFileUpload).\r\n *\r\n * Behaviour of the kit script reproduced in Angular: files are added to the list (a file with\r\n * the same name replaces the previous one), each chip removes its file, `maxFiles` limits the\r\n * list (extra files are not added and the button is disabled when the list is full).\r\n * In addition: focus moves to the next chip after a removal, files not added are announced,\r\n * `accept` / `maxFileSize` are checked on the chosen files (errors `sirioFileType` / `sirioFileSize`).\r\n *\r\n * Model: `File[]` with `multiple` (or with `valueType=\"array\"`), otherwise `File | null` (a new\r\n * choice replaces the file). Besides `File` objects the model accepts descriptors of stored files\r\n * (`{ name, type?, size?, ... }`, see `SirioFileDescriptor`), shown and kept as they are.\r\n *\r\n * Stored files (optional):\r\n * - `uploadHandler` + `instantUpload`: each chosen file is uploaded at once; the chip shows\r\n * \"Caricamento in corso\", the result of the handler is merged into the `File`, a failure removes\r\n * the file from the list (output `fileError`);\r\n * - `deleteHandler`: removing a stored file (descriptor or uploaded `File`) waits for the handler\r\n * (`false` or an error keep the file); a file replaced by a new choice is deleted too;\r\n * - `downloadHandler` / `downloadable`: \"Scarica\" action next to the chips (stored files through\r\n * the handler, chosen files directly);\r\n * - `details`: icon, extension and size next to each chip.\r\n *\r\n * ```html\r\n * <wm-sirio-file-upload label=\"Allegati\" multiple [maxFiles]=\"4\" accept=\".pdf,image/*\" formControlName=\"allegati\" />\r\n * <wm-sirio-file-upload label=\"Documento\" valueType=\"array\" details downloadable instantUpload\r\n * [uploadHandler]=\"upload\" [deleteHandler]=\"delete\" [downloadHandler]=\"download\" formControlName=\"doc\" />\r\n * ```\r\n */\r\n@Component({\r\n selector: 'wm-sirio-file-upload',\r\n imports: [NgTemplateOutlet, SirioInfoButton, SirioPendingIndicator],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [provideSirioControl(() => SirioFileUpload, { validator: true })],\r\n host: {\r\n '(focusout)': 'onFocusOut($event)',\r\n },\r\n styleUrl: './sirio-file-upload.scss',\r\n templateUrl: './sirio-file-upload.html',\r\n})\r\nexport class SirioFileUpload extends SirioControlBase<SirioFileItem[]> implements Validator {\r\n /** Several files (model `File[]`); otherwise one file (model `File | null`). */\r\n readonly multiple = input(false, { transform: booleanAttribute });\r\n /** `array`: the model is an array also with a single file (`[]` when empty). */\r\n readonly valueType = input<'auto' | 'array'>('auto');\r\n /** Maximum number of files (kit `data-sirio-maxfiles`); empty = no limit. */\r\n readonly maxFiles = input<number | null, unknown>(null, { transform: optionalNumber });\r\n /** Allowed types, as the native `accept` (`.pdf,image/*`); checked also on the chosen files. */\r\n readonly accept = input<string | null>(null);\r\n /** Maximum size of each file in bytes (error `sirioFileSize`); empty = no limit. */\r\n readonly maxFileSize = input<number | null, unknown>(null, { transform: optionalNumber });\r\n /** Text of the button (kit: \"Upload\"). */\r\n readonly buttonLabel = input('Upload');\r\n /** Text of the chip button, followed by the file name (kit: \"Elimina file\"). */\r\n readonly removeLabel = input('Elimina file');\r\n /** Accessible name of the list of chosen files. */\r\n readonly listLabel = input('File selezionati');\r\n\r\n /** Icon, extension and size next to each chip. */\r\n readonly details = input(false, { transform: booleanAttribute });\r\n /** \"Scarica\" action also for the chosen files (`File`), saved directly. */\r\n readonly downloadable = input(false, { transform: booleanAttribute });\r\n /** Upload each chosen file at once with `uploadHandler`. */\r\n readonly instantUpload = input(false, { transform: booleanAttribute });\r\n readonly uploadHandler = input<SirioFileUploadHandler | null | undefined>(null);\r\n readonly deleteHandler = input<SirioFileDeleteHandler | null | undefined>(null);\r\n readonly downloadHandler = input<SirioFileDownloadHandler | null | undefined>(null);\r\n\r\n /** Texts of the operations (localizable). */\r\n readonly downloadLabel = input('Scarica');\r\n readonly uploadingLabel = input('Caricamento in corso');\r\n readonly deletingLabel = input('Eliminazione in corso');\r\n readonly downloadingLabel = input('Download in corso');\r\n readonly uploadedLabel = input('File caricato');\r\n readonly uploadErrorLabel = input('Caricamento non riuscito');\r\n readonly deleteErrorLabel = input('Eliminazione non riuscita');\r\n readonly downloadErrorLabel = input('Download non riuscito');\r\n\r\n /** Files added by the user (after the model update, before any upload ends). */\r\n readonly filesAdded = output<File[]>();\r\n /** File removed by the user (after the `deleteHandler`, when present). */\r\n readonly fileRemoved = output<SirioFileItem>();\r\n /** A handler failed (the message is also announced under the list). */\r\n readonly fileError = output<SirioFileErrorEvent>();\r\n\r\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\r\n private readonly elementInjector = inject(Injector);\r\n private onValidatorChange: () => void = () => {};\r\n private destroyed = false;\r\n\r\n protected readonly status = signal('');\r\n private readonly statuses = signal(new Map<SirioFileItem, SirioFileStatus>());\r\n protected readonly buttonTextId = computed(() => `${this.inputId()}-button`);\r\n protected readonly files = computed(() => this.value() ?? []);\r\n protected readonly canEdit = computed(() => !this.isDisabled() && !this.readonly());\r\n /** False when disabled/readonly or when the list already holds `maxFiles` files. */\r\n protected readonly canAdd = computed(() => {\r\n const max = this.effectiveMax();\r\n return this.canEdit() && (max === null || this.files().length < max);\r\n });\r\n private readonly effectiveMax = computed(() => (this.multiple() ? this.maxFiles() : null));\r\n\r\n /** True while an upload or a deletion is in progress. */\r\n readonly busy = computed(() =>\r\n [...this.statuses().values()].some((s) => s === 'uploading' || s === 'deleting'),\r\n );\r\n\r\n constructor() {\r\n super();\r\n inject(DestroyRef).onDestroy(() => (this.destroyed = true));\r\n // Re-validate the bound control when the constraints change.\r\n effect(() => {\r\n this.multiple();\r\n this.maxFiles();\r\n this.accept();\r\n this.maxFileSize();\r\n this.onValidatorChange();\r\n });\r\n }\r\n\r\n /** Operation in progress on a file of the list (`null` when idle). */\r\n statusOf(file: SirioFileItem): SirioFileStatus | null {\r\n return this.statuses().get(file) ?? null;\r\n }\r\n\r\n protected override fromModel(value: unknown): SirioFileItem[] {\r\n if (Array.isArray(value)) {\r\n return value.filter(isItem);\r\n }\r\n if (typeof FileList !== 'undefined' && value instanceof FileList) {\r\n return Array.from(value);\r\n }\r\n return isItem(value) ? [value] : [];\r\n }\r\n\r\n protected override toModel(value: SirioFileItem[] | null): SirioFileItem[] | SirioFileItem | null {\r\n const files = value ?? [];\r\n return this.multiple() || this.valueType() === 'array' ? files : (files[0] ?? null);\r\n }\r\n\r\n // ---- User interaction -----------------------------------------------------------------------\r\n protected onFilesChosen(input: HTMLInputElement): void {\r\n const chosen = Array.from(input.files ?? []);\r\n // Kit behaviour: the native input is emptied, the list is the source of the files.\r\n input.value = '';\r\n if (!chosen.length) {\r\n return;\r\n }\r\n if (!this.multiple()) {\r\n this.status.set('');\r\n this.files().forEach((previous) => this.discard(previous));\r\n this.addFiles([chosen[0]], [chosen[0]]);\r\n return;\r\n }\r\n const files = [...this.files()];\r\n const max = this.effectiveMax();\r\n const added: File[] = [];\r\n let skipped = 0;\r\n for (const file of chosen) {\r\n const same = files.findIndex((f) => f.name === file.name);\r\n if (same >= 0) {\r\n // Kit behaviour: a file with the same name replaces the previous one.\r\n this.discard(files[same]);\r\n files[same] = file;\r\n added.push(file);\r\n } else if (max === null || files.length < max) {\r\n files.push(file);\r\n added.push(file);\r\n } else {\r\n skipped++;\r\n }\r\n }\r\n this.status.set(\r\n skipped\r\n ? `${skipped === 1 ? '1 file non aggiunto' : `${skipped} file non aggiunti`}: ` +\r\n `si possono caricare al massimo ${max} file.`\r\n : '',\r\n );\r\n if (added.length) {\r\n this.addFiles(files, added);\r\n }\r\n }\r\n\r\n private addFiles(files: SirioFileItem[], added: File[]): void {\r\n this.updateValue(files);\r\n this.filesAdded.emit(added);\r\n if (this.instantUpload() && this.uploadHandler()) {\r\n added.forEach((file) => void this.upload(file));\r\n }\r\n }\r\n\r\n protected async remove(index: number): Promise<void> {\r\n const file = this.files()[index];\r\n if (!file || !this.canEdit() || this.statusOf(file)) {\r\n return;\r\n }\r\n this.status.set('');\r\n const handler = this.deleteHandler();\r\n if (handler && this.isStored(file)) {\r\n this.setStatus(file, 'deleting');\r\n // The remove button disappears: keep the focus inside the control (on the upload input).\r\n this.focusAfterRender(() => this.host.nativeElement.querySelector<HTMLInputElement>('input[type=file]'));\r\n try {\r\n if ((await settle(handler(file))) === false) {\r\n throw new Error();\r\n }\r\n } catch (error) {\r\n this.setStatus(file, null);\r\n this.fail(file, 'delete', error);\r\n // The file stays: focus back on its remove button.\r\n this.focusAfterRender(() => this.chipButtons()[index] ?? null);\r\n return;\r\n }\r\n this.setStatus(file, null);\r\n if (this.destroyed) {\r\n return;\r\n }\r\n }\r\n this.drop(file);\r\n this.fileRemoved.emit(file);\r\n // Keep the keyboard position: next chip, previous chip, or the upload button.\r\n this.focusAfterRender(() => {\r\n const buttons = this.chipButtons();\r\n return (\r\n buttons[Math.min(index, buttons.length - 1)] ??\r\n this.host.nativeElement.querySelector<HTMLInputElement>('input[type=file]')\r\n );\r\n });\r\n }\r\n\r\n private chipButtons(): NodeListOf<HTMLButtonElement> {\r\n return this.host.nativeElement.querySelectorAll<HTMLButtonElement>('.sirio-upload-file-list .sirio-chip button');\r\n }\r\n\r\n /** Focuses an element after the next render (no-op when the control was destroyed). */\r\n private focusAfterRender(target: () => HTMLElement | null): void {\r\n if (this.destroyed) {\r\n return;\r\n }\r\n afterNextRender(() => target()?.focus(), { injector: this.elementInjector });\r\n }\r\n\r\n protected async download(file: SirioFileItem): Promise<void> {\r\n if (!this.canDownload(file)) {\r\n return;\r\n }\r\n if (isFile(file)) {\r\n this.saveBlob(file, file.name);\r\n return;\r\n }\r\n const handler = this.downloadHandler()!;\r\n this.setStatus(file, 'downloading');\r\n try {\r\n const result = await settle(handler(file));\r\n if (!this.destroyed && result) {\r\n this.saveResult(result, file);\r\n }\r\n } catch (error) {\r\n this.fail(file, 'download', error);\r\n } finally {\r\n this.setStatus(file, null);\r\n }\r\n }\r\n\r\n /** Upload or deletion in progress: the remove button of the chip is hidden. */\r\n protected isBusy(file: SirioFileItem): boolean {\r\n const status = this.statusOf(file);\r\n return status === 'uploading' || status === 'deleting';\r\n }\r\n\r\n protected canDownload(file: SirioFileItem): boolean {\r\n if (this.isDisabled() || this.statusOf(file)) {\r\n return false;\r\n }\r\n return isFile(file) ? this.downloadable() : !!this.downloadHandler();\r\n }\r\n\r\n protected fileTitle(file: SirioFileItem): string {\r\n return typeof file.size === 'number' ? `${file.name} (${sirioFormatFileSize(file.size)})` : file.name;\r\n }\r\n\r\n protected fileIcon(file: SirioFileItem): string {\r\n return `fas ${sirioFileIcon(file.name)}`;\r\n }\r\n\r\n /** Extension and size (\"PDF, 1,5 MB\"). */\r\n protected fileInfo(file: SirioFileItem): string {\r\n const size = typeof file.size === 'number' && file.size >= 0 ? sirioFormatFileSize(file.size) : '';\r\n return [sirioFileExtension(file.name), size].filter(Boolean).join(', ');\r\n }\r\n\r\n protected statusText(status: SirioFileStatus): string {\r\n return status === 'uploading'\r\n ? this.uploadingLabel()\r\n : status === 'deleting'\r\n ? this.deletingLabel()\r\n : this.downloadingLabel();\r\n }\r\n\r\n /** Touched when the focus leaves the whole component (input and chips). */\r\n protected onFocusOut(event: FocusEvent): void {\r\n const next = event.relatedTarget as Node | null;\r\n if (!next || !this.host.nativeElement.contains(next)) {\r\n this.markTouched();\r\n }\r\n }\r\n\r\n // ---- Stored files ---------------------------------------------------------------------------\r\n /** Descriptors and uploaded files live on a server: removing them calls the `deleteHandler`. */\r\n private isStored(file: SirioFileItem): boolean {\r\n return !isFile(file) || UPLOADED.has(file);\r\n }\r\n\r\n private async upload(file: File): Promise<void> {\r\n const handler = this.uploadHandler();\r\n if (!handler) {\r\n return;\r\n }\r\n this.setStatus(file, 'uploading');\r\n let result: unknown;\r\n try {\r\n result = await settle(handler(file));\r\n } catch (error) {\r\n this.setStatus(file, null);\r\n if (!this.destroyed) {\r\n this.drop(file);\r\n this.fail(file, 'upload', error);\r\n }\r\n return;\r\n }\r\n this.setStatus(file, null);\r\n this.merge(file, result);\r\n UPLOADED.add(file);\r\n if (this.destroyed) {\r\n return;\r\n }\r\n this.status.set(`${this.uploadedLabel()}: ${file.name}`);\r\n // The model is emitted again: validators and listeners see the data added by the upload.\r\n const files = this.files();\r\n if (files.includes(file)) {\r\n this.updateValue([...files]);\r\n }\r\n }\r\n\r\n /** A file replaced by a new choice: a stored one is deleted (errors are only reported). */\r\n private discard(file: SirioFileItem): void {\r\n const handler = this.deleteHandler();\r\n if (!handler || !this.isStored(file)) {\r\n return;\r\n }\r\n settle(handler(file)).then(\r\n (result) => result === false && this.fail(file, 'delete', new Error()),\r\n (error) => this.fail(file, 'delete', error),\r\n );\r\n }\r\n\r\n /** Adds the properties of the upload result to the File (existing ones are kept). */\r\n private merge(file: File, result: unknown): void {\r\n if (typeof result !== 'object' || result === null) {\r\n return;\r\n }\r\n for (const [key, value] of Object.entries(result)) {\r\n if (!(key in file)) {\r\n Object.defineProperty(file, key, { value, enumerable: true, writable: true, configurable: true });\r\n }\r\n }\r\n }\r\n\r\n private drop(file: SirioFileItem): void {\r\n const files = this.files();\r\n if (files.includes(file)) {\r\n this.updateValue(files.filter((f) => f !== file));\r\n }\r\n }\r\n\r\n private fail(file: SirioFileItem, action: SirioFileErrorEvent['action'], error: unknown): void {\r\n if (this.destroyed) {\r\n return;\r\n }\r\n const label =\r\n action === 'upload'\r\n ? this.uploadErrorLabel()\r\n : action === 'delete'\r\n ? this.deleteErrorLabel()\r\n : this.downloadErrorLabel();\r\n const detail = error instanceof Error && error.message ? ` (${error.message})` : '';\r\n this.status.set(`${label}: ${file.name}${detail}`);\r\n this.fileError.emit({ file, action, error });\r\n }\r\n\r\n private setStatus(file: SirioFileItem, status: SirioFileStatus | null): void {\r\n this.statuses.update((map) => {\r\n const next = new Map(map);\r\n if (status) {\r\n next.set(file, status);\r\n } else {\r\n next.delete(file);\r\n }\r\n return next;\r\n });\r\n }\r\n\r\n /** Saves the content returned by the `downloadHandler` (URL, data URI, base64 or Blob). */\r\n private saveResult(result: string | Blob, file: SirioFileDescriptor): void {\r\n if (typeof result !== 'string') {\r\n this.saveBlob(result, file.name);\r\n } else if (!result.startsWith('data:') && isBase64(result)) {\r\n const bytes = Uint8Array.from(atob(result), (c) => c.charCodeAt(0));\r\n this.saveBlob(new Blob([bytes], { type: file.type || 'application/octet-stream' }), file.name);\r\n } else {\r\n this.saveUrl(result, file.name);\r\n }\r\n }\r\n\r\n private saveBlob(blob: Blob, name: string): void {\r\n const url = URL.createObjectURL(blob);\r\n this.saveUrl(url, name);\r\n setTimeout(() => URL.revokeObjectURL(url), 1000);\r\n }\r\n\r\n /** Opens/saves a URL with a temporary link (protected: replaced in the tests). */\r\n protected saveUrl(url: string, name: string): void {\r\n const link = document.createElement('a');\r\n link.href = url;\r\n link.download = name;\r\n link.target = '_blank';\r\n link.rel = 'noopener';\r\n link.click();\r\n }\r\n\r\n // ---- Validator ------------------------------------------------------------------------------\r\n validate(control: AbstractControl): ValidationErrors | null {\r\n const items = this.fromModel(control.value);\r\n const max = this.effectiveMax();\r\n if (max !== null && items.length > max) {\r\n return { sirioMaxFiles: { max, actual: items.length } };\r\n }\r\n // Type and size are checked on the chosen files only (stored files were checked before).\r\n const files = items.filter(isFile);\r\n const accept = this.accept();\r\n const wrongType = files.filter((f) => !sirioFileAccepted(f, accept)).map((f) => f.name);\r\n if (wrongType.length) {\r\n return { sirioFileType: { files: wrongType, accept } };\r\n }\r\n const maxSize = this.maxFileSize();\r\n if (maxSize !== null) {\r\n const tooBig = files.filter((f) => f.size > maxSize).map((f) => f.name);\r\n if (tooBig.length) {\r\n return {\r\n sirioFileSize: { files: tooBig, max: maxSize, maxLabel: sirioFormatFileSize(maxSize) },\r\n };\r\n }\r\n }\r\n return null;\r\n }\r\n\r\n registerOnValidatorChange(fn: () => void): void {\r\n this.onValidatorChange = fn;\r\n }\r\n}\r\n","<div class=\"sirio-upload\">\r\n <ng-template #labelTpl>\r\n <div\r\n class=\"sirio-label\"\r\n [id]=\"labelId()\"\r\n [class.sirio-text-danger]=\"validationState() === 'invalid'\"\r\n [class.sirio-text-warning]=\"validationState() === 'warning'\"\r\n [class.sirio-text-success]=\"validationState() === 'valid'\"\r\n >\r\n {{ label() }}\r\n @if (isRequired()) {\r\n <span class=\"sirio-required-marker\" aria-hidden=\"true\">*</span>\r\n }\r\n </div>\r\n </ng-template>\r\n @if (label()) {\r\n @if (info(); as info) {\r\n <!-- Kit info button next to the label, outside it (the label names the file input). -->\r\n <div class=\"sirio-label-info\">\r\n <ng-container [ngTemplateOutlet]=\"labelTpl\" />\r\n <wm-sirio-info-button\r\n [content]=\"info\"\r\n [title]=\"infoTitle() ?? label()\"\r\n [label]=\"infoButtonLabel()\"\r\n [placement]=\"infoPlacement()\"\r\n />\r\n </div>\r\n } @else {\r\n <ng-container [ngTemplateOutlet]=\"labelTpl\" />\r\n }\r\n }\r\n <!-- Sirio web kit: the help text is placed between the label and the button. -->\r\n @if (helpText()) {\r\n <span class=\"sirio-form-text-help\" [id]=\"helpId()\">{{ helpText() }}</span>\r\n }\r\n <input\r\n #fileInput\r\n type=\"file\"\r\n class=\"sirio-upload-file\"\r\n [id]=\"inputId()\"\r\n [attr.name]=\"name()\"\r\n [multiple]=\"multiple()\"\r\n [attr.accept]=\"accept()\"\r\n [disabled]=\"!canAdd()\"\r\n [attr.aria-labelledby]=\"\r\n ariaLabel() ? ariaLabelId() + ' ' + buttonTextId() : label() ? labelId() + ' ' + buttonTextId() : null\r\n \"\r\n [attr.aria-describedby]=\"describedBy()\"\r\n [attr.aria-required]=\"isRequired() || null\"\r\n [attr.aria-invalid]=\"showError() || null\"\r\n (change)=\"onFilesChosen(fileInput)\"\r\n />\r\n @if (ariaLabel()) {\r\n <span hidden [id]=\"ariaLabelId()\">{{ ariaLabel() }}</span>\r\n }\r\n <label\r\n class=\"sirio-btn sirio-btn-primary\"\r\n [class.disabled]=\"!canAdd()\"\r\n [attr.aria-disabled]=\"!canAdd() || null\"\r\n [attr.for]=\"inputId()\"\r\n >\r\n <span [id]=\"buttonTextId()\">{{ buttonLabel() }}</span>\r\n <span class=\"fas fa-arrow-up\" aria-hidden=\"true\"></span>\r\n </label>\r\n <!-- Async validation of the chosen files: spinner next to the upload button. -->\r\n <wm-sirio-pending placement=\"inline\" [active]=\"pendingVisible()\" [label]=\"pendingLabel()\" />\r\n @if (files().length) {\r\n <ul class=\"sirio-upload-file-list\" [attr.aria-label]=\"listLabel()\">\r\n @for (file of files(); track file; let i = $index) {\r\n <li>\r\n <div class=\"sirio-chip\" [class.disabled]=\"!canEdit()\" [attr.title]=\"fileTitle(file)\">\r\n @if (details()) {\r\n <span class=\"sirio-chip-label\"><span [class]=\"fileIcon(file)\" aria-hidden=\"true\"></span>{{ file.name }}</span>\r\n } @else {\r\n <span class=\"sirio-chip-label\">{{ file.name }}</span>\r\n }\r\n <!-- Hidden while an upload/deletion of the file is in progress. -->\r\n @if (!isBusy(file)) {\r\n <button\r\n type=\"button\"\r\n class=\"sirio-btn sirio-btn-primary\"\r\n data-sirio-dismiss=\"file\"\r\n [disabled]=\"!canEdit()\"\r\n (click)=\"remove(i)\"\r\n >\r\n <span class=\"fas fa-times\" aria-hidden=\"true\"></span>\r\n <span class=\"sr-only\">{{ removeLabel() }} {{ file.name }}</span>\r\n </button>\r\n }\r\n </div>\r\n @if (details() && fileInfo(file); as info) {\r\n <span class=\"sirio-upload-file-info\">{{ info }}</span>\r\n }\r\n @if (statusOf(file); as fileStatus) {\r\n <span class=\"sirio-upload-file-state\">\r\n {{ statusText(fileStatus) }}\r\n <wm-sirio-pending placement=\"inline\" [active]=\"true\" [label]=\"statusText(fileStatus) + ' ' + file.name\" />\r\n </span>\r\n } @else if (canDownload(file)) {\r\n <button type=\"button\" class=\"sirio-btn sirio-btn-link sirio-upload-file-download\" (click)=\"download(file)\">\r\n <span class=\"fas fa-download\" aria-hidden=\"true\"></span>\r\n {{ downloadLabel() }}<span class=\"sr-only\"> {{ file.name }}</span>\r\n </button>\r\n }\r\n </li>\r\n }\r\n </ul>\r\n }\r\n <!-- Outcome of the last choice (files not added): announced and shown under the list. -->\r\n <span class=\"sirio-form-text-help sirio-upload-status\" role=\"status\">{{ status() }}</span>\r\n <span\r\n class=\"sirio-form-feedback\"\r\n [class.sirio-visible]=\"!!feedbackMessage()\"\r\n [class.sirio-feedback-invalid]=\"validationState() === 'invalid'\"\r\n [class.sirio-feedback-warning]=\"validationState() === 'warning'\"\r\n [class.sirio-feedback-valid]=\"validationState() === 'valid'\"\r\n [id]=\"errorId()\"\r\n aria-live=\"polite\"\r\n >\r\n {{ feedbackMessage() }}\r\n </span>\r\n</div>\r\n","import { SirioPrefix, SirioSuffix } from './adorner/sirio-adorner';\r\nimport { SirioButton } from './button/sirio-button';\r\nimport { SirioCheckbox } from './checkbox/sirio-checkbox';\r\nimport { SirioChecklist } from './checklist/sirio-checklist';\r\nimport { SirioOptionLabel } from './core/sirio-option-label';\r\nimport { SirioDate } from './date/sirio-date';\r\nimport { SirioFileUpload } from './file-upload/sirio-file-upload';\r\nimport { SirioDateTime } from './datetime/sirio-datetime';\r\nimport { SirioTime } from './time/sirio-time';\r\nimport { SirioNumber } from './number/sirio-number';\r\nimport { SirioRadioGroup } from './radio-group/sirio-radio-group';\r\nimport { SirioSelect } from './select/sirio-select';\r\nimport { SirioAutocomplete, SirioSearchbar } from './autocomplete/sirio-autocomplete';\r\nimport { SirioSlider } from './slider/sirio-slider';\r\nimport { SirioTextarea } from './textarea/sirio-textarea';\r\nimport { SirioTextbox } from './textbox/sirio-textbox';\r\n\r\n/** All Sirio data-entry controls, buttons and helper directives, for `imports: [SIRIO_FORM_CONTROLS]`. */\r\nexport const SIRIO_FORM_CONTROLS = [\r\n SirioTextbox,\r\n SirioTextarea,\r\n SirioNumber,\r\n SirioDate,\r\n SirioTime,\r\n SirioDateTime,\r\n SirioCheckbox,\r\n SirioChecklist,\r\n Sirio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