@wemake4u/form-controls 0.0.0-stage → 2.0.1

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-readonly-appearance.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/data-grid/sirio-data-grid-types.ts","../../../projects/form-controls/src/lib/data-grid/sirio-grid-formats.ts","../../../projects/form-controls/src/lib/data-grid/sirio-grid-column.ts","../../../projects/form-controls/src/lib/data-grid/sirio-grid-column.html","../../../projects/form-controls/src/lib/data-grid/sirio-grid-form-array.ts","../../../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/core/sirio-floating.ts","../../../projects/form-controls/src/lib/datetime/vanillajs-datepicker.ts","../../../projects/form-controls/src/lib/datetime/sirio-datetime-utils.ts","../../../projects/form-controls/src/lib/datetime/sirio-datepicker.ts","../../../projects/form-controls/src/lib/datetime/sirio-datetime-base.ts","../../../projects/form-controls/src/lib/field/sirio-field.ts","../../../projects/form-controls/src/lib/field/sirio-field.html","../../../projects/form-controls/src/lib/date/sirio-date.ts","../../../projects/form-controls/src/lib/date/sirio-date.html","../../../projects/form-controls/src/lib/number/sirio-number.ts","../../../projects/form-controls/src/lib/number/sirio-number.html","../../../projects/form-controls/src/lib/select/sirio-select.ts","../../../projects/form-controls/src/lib/select/sirio-select.html","../../../projects/form-controls/src/lib/textbox/sirio-textbox.ts","../../../projects/form-controls/src/lib/textbox/sirio-textbox.html","../../../projects/form-controls/src/lib/data-grid/sirio-grid-keyboard.ts","../../../projects/form-controls/src/lib/data-grid/sirio-data-grid.ts","../../../projects/form-controls/src/lib/data-grid/sirio-data-grid.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/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/textarea/sirio-textarea.ts","../../../projects/form-controls/src/lib/textarea/sirio-textarea.html","../../../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/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/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\n\r\n/**\r\n * Look of a read-only data entry field:\r\n * - `filled`: Sirio kit style, grey background and border (`.sirio-form-control[readonly]`, the same look as disabled);\r\n * - `outline`: white background with the kit light border, so a read-only field (focusable, its text can be selected\r\n * and copied) is told apart from a disabled one. Disabled fields keep the kit grey fill in both cases.\r\n */\r\nexport type SirioReadonlyAppearance = 'filled' | 'outline';\r\n\r\n/** Default `readonlyAppearance` of every Sirio data entry control. */\r\nexport const SIRIO_READONLY_APPEARANCE = new InjectionToken<SirioReadonlyAppearance>(\r\n 'SIRIO_READONLY_APPEARANCE',\r\n { providedIn: 'root', factory: () => 'filled' },\r\n);\r\n\r\n/**\r\n * Sets the default `readonlyAppearance` of the Sirio controls (each control can override it).\r\n * Usage: `providers: [provideSirioReadonlyAppearance('outline')]` (application or component providers).\r\n */\r\nexport function provideSirioReadonlyAppearance(appearance: SirioReadonlyAppearance): Provider {\r\n return { provide: SIRIO_READONLY_APPEARANCE, useValue: appearance };\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_READONLY_APPEARANCE, SirioReadonlyAppearance } from './sirio-readonly-appearance';\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\n host: { '[class.wm-sirio-readonly-outline]': \"resolvedReadonlyAppearance() === 'outline'\" },\r\n})\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 /**\r\n * Look of the field when `readonly`: `filled` (kit grey fill, as disabled) or `outline` (white background with the\r\n * kit light border). null = application default (`provideSirioReadonlyAppearance()`, `filled` otherwise).\r\n * Disabled fields always keep the kit grey fill.\r\n */\r\n readonly readonlyAppearance = input<SirioReadonlyAppearance | null>(null);\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 private readonly defaultReadonlyAppearance = inject(SIRIO_READONLY_APPEARANCE);\r\n\r\n /**\r\n * `readonlyAppearance` or the application default. With `outline` the host gets the class\r\n * `wm-sirio-readonly-outline`, used by the control styles (core/_sirio-readonly.scss).\r\n */\r\n readonly resolvedReadonlyAppearance = computed<SirioReadonlyAppearance>(\r\n () => this.readonlyAppearance() ?? this.defaultReadonlyAppearance,\r\n );\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` > `.splide__list` > `.splide__slide` (div elements: the slide roles set by Splide\r\n * are not allowed on list items), 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 <!-- div, not ul/li (kit markup): with the pagination Splide gives the slides role=\"tabpanel\",\r\n not allowed on a list item; the kit styles use the classes. -->\r\n <div class=\"splide__list\">\r\n @for (slide of slides(); track slide) {\r\n <div class=\"splide__slide\"><ng-container [ngTemplateOutlet]=\"slide.template\" /></div>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n","import {\n afterNextRender,\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n effect,\n ElementRef,\n inject,\n Injector,\n input,\n output,\n signal,\n untracked,\n viewChild,\n} from '@angular/core';\n\n/**\n * An item of the breadcrumb. The last item is the current page (never a link); the other items are\n * links when they have an `href` (or `clickable: true`), otherwise plain text.\n */\nexport interface SirioBreadcrumbItem {\n label: string;\n /** Link of the item; without it the item is plain text (unless `clickable: true`). */\n href?: string;\n /** Font Awesome icon before the label (kit: `fa-home`). */\n icon?: string;\n /**\n * Overrides the default (clickable only with an `href`): `true` renders a link without `href`\n * that only emits `(itemClick)` (e.g. for router navigation), `false` renders plain text even\n * with an `href`.\n */\n clickable?: boolean;\n}\n\n/** Payload of `(itemClick)`. */\nexport interface SirioBreadcrumbClick {\n item: SirioBreadcrumbItem;\n index: number;\n /** Call `event.preventDefault()` to navigate with the router instead of the href. */\n event: MouseEvent;\n}\n\n/** Wait after a resize before checking the layout again (kit: 200ms). */\nconst RESIZE_DEBOUNCE_MS = 200;\n\n/**\n * Breadcrumb of the Sirio web kit (`nav[data-sirio-component=breadcrumb]` with the sr-only\n * \"Ti trovi in:\" and `ol.sirio-breadcrumb[role=list]`; the current page is `li.active` with the\n * sr-only \"Pagina corrente\"; optional Font Awesome icons; `dark` → `sirio-breadcrumb-dark`).\n *\n * Behaviour of the kit script (SirioBreadcrumb) reproduced in Angular: with 3+ items, when the\n * breadcrumb does not fit on one line it is truncated (`data-sirio-visible=\"truncate\"` on the\n * list, as in the kit): first item, a \"...\" button (\"Apri il breadcrumb completo\") and the current\n * page. The button shows the whole path (`data-sirio-visible=\"visible\"`) and moves the focus to the\n * first restored link; after a resize the layout is checked again.\n *\n * ```html\n * <wm-sirio-breadcrumb [items]=\"[\n * { label: 'Home', href: '/', icon: 'fa-home' },\n * { label: 'Servizi', href: '/servizi' },\n * { label: 'Certificati' }\n * ]\" />\n * ```\n *\n * Items without `href` are plain text. For router navigation set the `href` and call\n * `event.preventDefault()` in `(itemClick)`, or use `clickable: true` without `href`.\n */\n@Component({\n selector: 'wm-sirio-breadcrumb',\n changeDetection: ChangeDetectionStrategy.OnPush,\n styleUrl: './sirio-breadcrumb.scss',\n templateUrl: './sirio-breadcrumb.html',\n})\nexport class SirioBreadcrumb {\n readonly items = input<SirioBreadcrumbItem[]>([]);\n /** Dark version for dark backgrounds (`sirio-breadcrumb-dark`). */\n readonly dark = input(false, { transform: booleanAttribute });\n /** Truncate the path when it does not fit on one line (kit behaviour). */\n readonly truncate = input(true, { transform: booleanAttribute });\n readonly ariaLabel = input('Breadcrumb');\n readonly locationLabel = input('Ti trovi in:');\n readonly currentPageLabel = input('Pagina corrente');\n readonly expandLabel = input('Apri il breadcrumb completo');\n /** Click on an item link (call `event.preventDefault()` to navigate with the router). */\n readonly itemClick = output<SirioBreadcrumbClick>();\n\n private readonly list = viewChild.required<ElementRef<HTMLElement>>('list');\n private readonly injector = inject(Injector);\n private readonly destroyRef = inject(DestroyRef);\n /** Kit `data-sirio-visible`: `truncate` when shortened, `visible` after the user expanded it. */\n protected readonly state = signal<'truncate' | 'visible' | null>(null);\n protected readonly truncated = computed(() => this.state() === 'truncate');\n\n /** Items to render: all, or first + \"...\" (index -1) + current page when truncated. */\n protected readonly visible = computed(() => {\n const entries = this.items().map((item, index) => ({ item, index }));\n if (!this.truncated() || entries.length < 3) {\n return entries;\n }\n return [entries[0], { item: { label: '...' }, index: -1 }, entries[entries.length - 1]];\n });\n\n constructor() {\n // New items or truncation switched on/off: show everything, then measure.\n effect(() => {\n this.items();\n const enabled = this.truncate();\n untracked(() => {\n this.state.set(null);\n if (enabled) {\n afterNextRender(() => this.checkWrap(), { injector: this.injector });\n }\n });\n });\n\n // Kit: on window resize (200ms debounce) the path is expanded and measured again. The width of\n // the breadcrumb is observed too, for layout changes that are not window resizes.\n let timer: ReturnType<typeof setTimeout> | undefined;\n const schedule = () => {\n clearTimeout(timer);\n timer = setTimeout(() => this.recheck(), RESIZE_DEBOUNCE_MS);\n };\n afterNextRender(() => {\n const view = this.list().nativeElement.ownerDocument.defaultView;\n view?.addEventListener('resize', schedule);\n let lastWidth = -1;\n const observer =\n typeof ResizeObserver === 'undefined'\n ? null\n : new ResizeObserver((entries) => {\n const width = Math.round(entries[0]?.contentRect.width ?? 0);\n if (lastWidth !== -1 && width !== lastWidth) {\n schedule();\n }\n lastWidth = width;\n });\n observer?.observe(this.list().nativeElement.parentElement as HTMLElement);\n this.destroyRef.onDestroy(() => {\n view?.removeEventListener('resize', schedule);\n observer?.disconnect();\n clearTimeout(timer);\n });\n });\n }\n\n /** Shows the whole path (kit \"...\" button) and moves the focus to the first restored link. */\n expand(): void {\n if (!this.truncated()) {\n return;\n }\n this.state.set('visible');\n // First link after the first item (items that are not clickable have no link to focus).\n afterNextRender(\n () => this.list().nativeElement.querySelector<HTMLElement>(':scope > li ~ li a')?.focus(),\n { injector: this.injector },\n );\n }\n\n /** Clickable item: explicit `clickable`, otherwise only when it has an `href`. */\n protected isLink(item: SirioBreadcrumbItem): boolean {\n return item.clickable ?? !!item.href;\n }\n\n protected onClick(item: SirioBreadcrumbItem, index: number, event: MouseEvent): void {\n if (!item.href) {\n event.preventDefault();\n }\n this.itemClick.emit({ item, index, event });\n }\n\n protected iconClasses(icon: string): string {\n const value = icon.trim();\n return value.includes(' ') ? value : `fas ${value}`;\n }\n\n /** Kit: expand, then truncate again if the full path wraps. */\n private recheck(): void {\n if (!this.truncate()) {\n return;\n }\n this.state.set(null);\n afterNextRender(() => this.checkWrap(), { injector: this.injector });\n }\n\n /** Truncates when the first and the last item are not on the same line. */\n private checkWrap(): void {\n const items = this.list().nativeElement.querySelectorAll<HTMLElement>(':scope > li');\n if (items.length < 3) {\n return;\n }\n const first = items[0].getBoundingClientRect().top;\n const last = items[items.length - 1].getBoundingClientRect().top;\n if (first < last) {\n this.state.set('truncate');\n }\n }\n}\n","<nav data-sirio-component=\"breadcrumb\" [attr.aria-label]=\"ariaLabel()\">\n <p class=\"sr-only\">{{ locationLabel() }}</p>\n <ol\n #list\n class=\"sirio-breadcrumb\"\n role=\"list\"\n [class.sirio-breadcrumb-dark]=\"dark()\"\n [attr.data-sirio-visible]=\"state()\"\n >\n @for (entry of visible(); track entry.index) {\n @if (entry.index === -1) {\n <li>\n <button\n type=\"button\"\n data-sirio-toggle=\"breadcrumb\"\n [attr.title]=\"expandLabel()\"\n [attr.aria-label]=\"expandLabel()\"\n (click)=\"expand()\"\n >...</button>\n </li>\n } @else if (entry.index === items().length - 1) {\n <!-- No whitespace around the label: the kit markup has none (icon margin comes from the CSS). -->\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>\n } @else if (!isLink(entry.item)) {\n <!-- Plain text: the kit gives it the list color (same as the current page). -->\n <li>@if (entry.item.icon) {<span [attr.class]=\"iconClasses(entry.item.icon)\" aria-hidden=\"true\"></span>}{{ entry.item.label }}</li>\n } @else {\n <li>\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>\n </li>\n }\n }\n </ol>\n</nav>\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';\nimport {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n input,\n model,\n numberAttribute,\n output,\n untracked,\n} from '@angular/core';\nimport { sirioUniqueId } from '../core/sirio-control-base';\n\n/**\n * Layouts of the Sirio pagination:\n * - `full`: kit \"Paginazione con alto numero di pagine\" (elements per page, range, page select,\n * previous/next);\n * - `numbers`: page numbers with ellipsis (kit `.sirio-pagination-center` > `.sirio-pagination-list`);\n * - `compact`: the `full` row in a single thin bar for tables (smaller fields and buttons, \"Pagina 1\n * di 6\" as text, first / previous / next / last).\n */\nexport type SirioPaginationVariant = 'full' | 'numbers' | 'compact';\n\n/** Payload of `(paged)`. */\nexport interface SirioPageEvent {\n /** Current page (1-based). */\n page: number;\n pageSize: number;\n /** Index of the first item of the page (0-based), e.g. for `slice()` or `$skip`. */\n offset: number;\n}\n\n/** An entry of the numbered list: a page or an ellipsis. */\ntype PageEntry = { page: number } | { ellipsis: true; key: string };\n\n/**\n * Pagination of the Sirio web kit (\"Paginazione\").\n *\n * `full` (default, kit example): `.sirio-pagination` with `.sirio-pagination-items` (select\n * \"Elementi per pagina\" and the range \"1 - 10 di 100 elementi\"), `.sirio-pagination-page` (select\n * \"Vai alla pagina\", \"di 10 pagine\") and `.sirio-pagination-cursor` (previous/next in\n * `ul.sirio-pagination-list`, `disabled` + `aria-disabled` at the ends). The kit CSS hides the\n * items select below 992px and the page select below 768px.\n *\n * `numbers`: `.sirio-pagination-center` with previous, page numbers (`aria-current=\"page\"`,\n * `.ellipsis` for the gaps) and next.\n *\n * Page changes are announced to screen readers (sr-only live region).\n *\n * `full` without `showItems` (no \"Elementi per pagina\" block) and with `pageSize` 1 is an item\n * navigator (\"1 di 5 elementi\" + previous/next); with no items only the projected content is shown.\n * Content projected in `full` (e.g. action buttons) is placed at the end of the `.sirio-pagination`\n * row.\n *\n * ```html\n * <wm-sirio-pagination [total]=\"items.length\" [(page)]=\"page\" [(pageSize)]=\"size\" (paged)=\"load($event)\" />\n * ```\n */\n@Component({\n selector: 'wm-sirio-pagination',\n imports: [NgTemplateOutlet],\n changeDetection: ChangeDetectionStrategy.OnPush,\n styleUrl: './sirio-pagination.scss',\n templateUrl: './sirio-pagination.html',\n})\nexport class SirioPagination {\n readonly variant = input<SirioPaginationVariant>('full');\n /** Total number of items. */\n readonly total = input(0, { transform: (v: unknown) => Math.max(0, numberAttribute(v, 0)) });\n /**\n * The real total is not known yet: there are more items after `total` (the items known so far,\n * e.g. a server without a count). \"Successiva\" stays active on the last known page and the totals\n * are shown as \"30+\" (\"oltre 30\" for screen readers).\n */\n readonly hasMore = input(false, { transform: booleanAttribute });\n /** Current page, 1-based (two-way: `[(page)]`). */\n readonly page = model(1);\n /** Items per page (two-way: `[(pageSize)]`). */\n readonly pageSize = model(10);\n /** \"Elementi per pagina\" block (select + range) of `full`; false for an item navigator. */\n readonly showItems = input(true, { transform: booleanAttribute });\n /** Options of the \"Elementi per pagina\" select (kit: 10, 20, 30). */\n readonly pageSizeOptions = input<number[]>([10, 20, 30]);\n /** Pages shown on each side of the current one (`numbers`). */\n readonly siblings = input(1, { transform: (v: unknown) => Math.max(0, numberAttribute(v, 1)) });\n /**\n * Link of a page (real navigation, e.g. `?page=3`); default `#` with the change handled by the\n * component (`(paged)`).\n */\n readonly pageHref = input<((page: number) => string) | null>(null);\n\n readonly ariaLabel = input('Paginazione');\n readonly itemsPerPageLabel = input('Elementi per pagina:');\n readonly itemsPerPageA11yLabel = input('Scegli il numero di elementi per pagina');\n readonly rangeFromLabel = input('Stai vedendo da');\n readonly rangeToLabel = input('al');\n readonly ofLabel = input('di');\n readonly itemsLabel = input('elementi');\n readonly goToPageLabel = input('Vai alla pagina');\n readonly pagesLabel = input('pagine');\n readonly pageLabel = input('Pagina');\n readonly previousLabel = input('Pagina precedente');\n readonly nextLabel = input('Pagina successiva');\n /** First / last page buttons of the `compact` variant. */\n readonly firstLabel = input('Prima pagina');\n readonly lastLabel = input('Ultima pagina');\n /** Read before an open total (`hasMore`): \"di oltre 30 elementi\". */\n readonly moreLabel = input('oltre');\n\n /** Emitted when the user changes page or page size. */\n readonly paged = output<SirioPageEvent>();\n\n private readonly baseId = sirioUniqueId('sirio-pagination');\n protected readonly sizeId = `${this.baseId}-size`;\n protected readonly pageId = `${this.baseId}-page`;\n\n /** Pages known (with `hasMore` the next one can also be reached). */\n readonly pageCount = computed(() => Math.max(1, Math.ceil(this.total() / Math.max(1, this.pageSize()))));\n /** Last page that can be reached: one more than the known ones with `hasMore`. */\n private readonly lastPage = computed(() => this.pageCount() + (this.hasMore() ? 1 : 0));\n protected readonly pages = computed(() =>\n Array.from({ length: Math.max(this.pageCount(), this.hasMore() ? this.page() : 0) }, (_, i) => i + 1),\n );\n protected readonly rangeStart = computed(() =>\n this.total() === 0 ? 0 : (this.page() - 1) * this.pageSize() + 1,\n );\n protected readonly rangeEnd = computed(() => Math.min(this.page() * this.pageSize(), this.total()));\n /** Page select and previous/next of `full`: hidden when there is nothing to navigate without the items block. */\n protected readonly showPages = computed(() => this.showItems() || this.total() > 0);\n protected readonly status = computed(() =>\n this.showPages()\n ? `${this.pageLabel()} ${this.page()} ${this.ofLabel()} ${this.hasMore() ? this.moreLabel() + ' ' : ''}${this.pageCount()}`\n : '',\n );\n /** Previous / next disabled at the ends (next stays active while more items exist). */\n protected readonly atEnd = computed(() => this.page() >= this.lastPage());\n\n /** Numbered list: first, last, current ± siblings, ellipsis for the gaps. */\n protected readonly entries = computed<PageEntry[]>(() => {\n const count = this.pageCount();\n const current = this.page();\n const siblings = this.siblings();\n const shown = new Set<number>([1, count]);\n for (let p = current - siblings; p <= current + siblings; p++) {\n if (p >= 1 && p <= count) {\n shown.add(p);\n }\n }\n if (this.hasMore() && current > count) {\n shown.add(current); // the page after the known ones, while it loads\n }\n const sorted = [...shown].sort((a, b) => a - b);\n const result: PageEntry[] = [];\n sorted.forEach((p, i) => {\n const previous = sorted[i - 1];\n if (previous !== undefined && p - previous === 2) {\n result.push({ page: p - 1 }); // a single missing page is shown instead of \"…\"\n } else if (previous !== undefined && p - previous > 2) {\n result.push({ ellipsis: true, key: `gap-${previous}` });\n }\n result.push({ page: p });\n });\n if (this.hasMore()) {\n result.push({ ellipsis: true, key: 'gap-more' }); // more pages after the known ones\n }\n return result;\n });\n\n constructor() {\n // Keep the page in range when the total or the page size change.\n effect(() => {\n const count = this.lastPage();\n const page = untracked(() => this.page());\n if (page > count || page < 1) {\n untracked(() => this.page.set(Math.min(Math.max(page, 1), count)));\n }\n });\n }\n\n protected trackEntry(entry: PageEntry): string {\n return 'page' in entry ? `p${entry.page}` : entry.key;\n }\n\n protected hrefOf(page: number): string {\n return this.pageHref()?.(page) ?? '#';\n }\n\n /** Goes to a page (1-based). */\n goTo(page: number): void {\n const target = Math.min(Math.max(1, Math.trunc(page)), this.lastPage());\n if (target !== this.page()) {\n this.page.set(target);\n this.emit();\n }\n }\n\n protected go(page: number, event: Event, disabled = false): void {\n if (disabled || !this.pageHref()) {\n event.preventDefault();\n }\n if (!disabled) {\n this.goTo(page);\n }\n }\n\n protected onPageSelect(event: Event): void {\n this.goTo(Number((event.target as HTMLSelectElement).value));\n }\n\n protected onSizeChange(event: Event): void {\n const size = Number((event.target as HTMLSelectElement).value);\n if (!size || size === this.pageSize()) {\n return;\n }\n // Keep the first visible item on screen.\n const first = (this.page() - 1) * this.pageSize();\n this.pageSize.set(size);\n this.page.set(Math.floor(first / size) + 1);\n this.emit();\n }\n\n private emit(): void {\n this.paged.emit({\n page: this.page(),\n pageSize: this.pageSize(),\n offset: (this.page() - 1) * this.pageSize(),\n });\n }\n}\n","<ng-template #prevNext let-next=\"next\">\n @let target = next ? page() + 1 : page() - 1;\n @let disabled = next ? atEnd() : page() <= 1;\n <li>\n <a\n [attr.href]=\"disabled ? '#' : hrefOf(target)\"\n [class.disabled]=\"disabled\"\n [attr.tabindex]=\"disabled ? -1 : null\"\n [attr.aria-disabled]=\"disabled ? 'true' : null\"\n (click)=\"go(target, $event, disabled)\"\n >\n <span class=\"sr-only\">{{ next ? nextLabel() : previousLabel() }}</span>\n <span [attr.class]=\"next ? 'fas fa-angle-right' : 'fas fa-angle-left'\" aria-hidden=\"true\"></span>\n </a>\n </li>\n</ng-template>\n\n<!-- First / last page (compact variant). -->\n<ng-template #firstLast let-last=\"last\">\n @let target = last ? pageCount() : 1;\n @let disabled = last ? page() >= pageCount() : page() <= 1;\n <li>\n <a\n [attr.href]=\"disabled ? '#' : hrefOf(target)\"\n [class.disabled]=\"disabled\"\n [attr.tabindex]=\"disabled ? -1 : null\"\n [attr.aria-disabled]=\"disabled ? 'true' : null\"\n (click)=\"go(target, $event, disabled)\"\n >\n <span class=\"sr-only\">{{ last ? lastLabel() : firstLabel() }}</span>\n <span [attr.class]=\"last ? 'fas fa-angle-double-right' : 'fas fa-angle-double-left'\" aria-hidden=\"true\"></span>\n </a>\n </li>\n</ng-template>\n\n@if (variant() === 'numbers') {\n <nav class=\"sirio-pagination-center\" [attr.aria-label]=\"ariaLabel()\">\n <ul class=\"sirio-pagination-list\">\n <ng-container *ngTemplateOutlet=\"prevNext; context: { next: false }\" />\n @for (entry of entries(); track trackEntry(entry)) {\n <li>\n @if ('page' in entry) {\n <a\n [attr.href]=\"hrefOf(entry.page)\"\n [attr.aria-current]=\"entry.page === page() ? 'page' : null\"\n (click)=\"go(entry.page, $event)\"\n >\n <span class=\"sr-only\">{{ pageLabel() }}&#32;</span>{{ entry.page }}\n </a>\n } @else {\n <span class=\"ellipsis\" aria-hidden=\"true\">…</span>\n }\n </li>\n }\n <ng-container *ngTemplateOutlet=\"prevNext; context: { next: true }\" />\n </ul>\n </nav>\n} @else {\n @let compact = variant() === 'compact';\n <nav class=\"sirio-pagination\" [class.wm-sirio-pagination-compact]=\"compact\" [attr.aria-label]=\"ariaLabel()\">\n @if (showItems()) {\n <div class=\"sirio-pagination-items\">\n <!-- Explicit spaces (&ngsp;): the text read by screen readers must not glue the parts. -->\n <span class=\"sirio-pagination-label\" aria-hidden=\"true\">{{ itemsPerPageLabel() }}</span>&ngsp;\n <label class=\"sr-only\" [attr.for]=\"sizeId\">{{ itemsPerPageA11yLabel() }}</label>&ngsp;\n <select class=\"sirio-form-control\" [id]=\"sizeId\" (change)=\"onSizeChange($event)\">\n @for (size of pageSizeOptions(); track size) {\n <option [value]=\"size\" [selected]=\"size === pageSize()\">{{ size }}</option>\n }\n </select>&ngsp;\n <span class=\"sr-only\">{{ rangeFromLabel() }}</span>&ngsp;<span>{{ rangeStart() }}</span>&ngsp;-&ngsp;<span\n class=\"sr-only\"\n >{{ rangeToLabel() }}</span\n >&ngsp;<span>{{ rangeEnd() }}</span>&ngsp;{{ ofLabel() }}&ngsp;@if (hasMore()) {<span class=\"sr-only\">{{ moreLabel() }}</span>&ngsp;}<span>{{ total() }}@if (hasMore()) {<span aria-hidden=\"true\">+</span>}</span>&ngsp;{{ itemsLabel() }}\n </div>\n }\n @if (showPages()) {\n <div class=\"sirio-pagination-page\">\n @if (compact) {\n {{ pageLabel() }}&ngsp;<span>{{ page() }}</span>&ngsp;{{ ofLabel() }}&ngsp;@if (hasMore()) {<span class=\"sr-only\">{{ moreLabel() }}</span>&ngsp;}<span>{{ pageCount() }}@if (hasMore()) {<span aria-hidden=\"true\">+</span>}</span>\n } @else {\n <label class=\"sr-only\" [attr.for]=\"pageId\">{{ goToPageLabel() }}</label>&ngsp;\n <select class=\"sirio-form-control\" [id]=\"pageId\" (change)=\"onPageSelect($event)\">\n @for (p of pages(); track p) {\n <option [value]=\"p\" [selected]=\"p === page()\">{{ p }}</option>\n }\n </select>&ngsp;{{ ofLabel() }}&ngsp;@if (hasMore()) {<span class=\"sr-only\">{{ moreLabel() }}</span>&ngsp;}<span>{{ pageCount() }}@if (hasMore()) {<span aria-hidden=\"true\">+</span>}</span>&ngsp;{{ pagesLabel() }}\n }\n </div>\n <div class=\"sirio-pagination-cursor\">\n <ul class=\"sirio-pagination-list\">\n @if (compact) {\n <ng-container *ngTemplateOutlet=\"firstLast; context: { last: false }\" />\n }\n <ng-container *ngTemplateOutlet=\"prevNext; context: { next: false }\" />\n <ng-container *ngTemplateOutlet=\"prevNext; context: { next: true }\" />\n @if (compact) {\n <ng-container *ngTemplateOutlet=\"firstLast; context: { last: true }\" />\n }\n </ul>\n </div>\n }\n <ng-content />\n </nav>\n}\n<span class=\"sr-only\" role=\"status\">{{ status() }}</span>\n","import { Observable } from 'rxjs';\r\n\r\n/** Sort direction of a column. */\r\nexport type SirioSortDirection = 'asc' | 'desc';\r\n\r\n/** A sort criterion of the grid (`[(sort)]` is the list of criteria in priority order). */\r\nexport interface SirioGridSort {\r\n /** Sort key of the column (`sortKey`, or its `field`). */\r\n field: string;\r\n direction: SirioSortDirection;\r\n}\r\n\r\n/** Request sent to a server side data source. */\r\nexport interface SirioGridQuery {\r\n /** Current page, 1-based. */\r\n page: number;\r\n pageSize: number;\r\n /** Index of the first row of the page (0-based), e.g. for `$skip` / `OFFSET`. */\r\n offset: number;\r\n /** Sort criteria in priority order; empty = no sort. */\r\n sort: SirioGridSort[];\r\n /** Active column filters by filter key (see `SirioGridFilters`); empty object = no filter. */\r\n filters: SirioGridFilters;\r\n}\r\n\r\n/**\r\n * Filter of a column (`wm-sirio-grid-column [filter]`), edited with the controls of the library:\r\n * - `text`: `wm-sirio-textbox`, rows whose cell text contains the value (case and accent insensitive);\r\n * - `number`: two `wm-sirio-number` (from / to), value `SirioGridRange<number>`;\r\n * - `date`: two `wm-sirio-date` (from / to), value `SirioGridRange<string>` with 'yyyy-MM-dd';\r\n * - `select`: `wm-sirio-select` with `filterOptions` (one value, or an array with `filterMultiple`);\r\n * - `boolean`: `wm-sirio-select` Sì / No, value `true` / `false`.\r\n */\r\nexport type SirioGridFilterType = 'text' | 'number' | 'date' | 'select' | 'boolean';\r\n\r\n/** Value of a range filter (`number`, `date`); a missing bound is open. */\r\nexport interface SirioGridRange<T = number | string> {\r\n from?: T | null;\r\n to?: T | null;\r\n}\r\n\r\n/**\r\n * Operator of a filter condition (`filterOperators`):\r\n * - text: `contains`, `notContains`, `equals`, `notEquals`, `startsWith`, `endsWith`;\r\n * - number: `equals`, `notEquals`, `greaterThan`, `greaterThanOrEqual`, `lessThan`,\r\n * `lessThanOrEqual`, `between` (`value` and `to` included);\r\n * - date ('yyyy-MM-dd'): `equals`, `notEquals`, `before`, `after`, `between`;\r\n * - select: `in`, `notIn` (one value or an array);\r\n * - boolean: `equals`;\r\n * - every type: `blank`, `notBlank` (no value).\r\n */\r\nexport type SirioGridFilterOperator =\r\n | 'contains'\r\n | 'notContains'\r\n | 'equals'\r\n | 'notEquals'\r\n | 'startsWith'\r\n | 'endsWith'\r\n | 'greaterThan'\r\n | 'greaterThanOrEqual'\r\n | 'lessThan'\r\n | 'lessThanOrEqual'\r\n | 'between'\r\n | 'before'\r\n | 'after'\r\n | 'in'\r\n | 'notIn'\r\n | 'blank'\r\n | 'notBlank';\r\n\r\n/**\r\n * Filter value of a column with operators: `{ operator: 'greaterThan', value: 1000 }`,\r\n * `{ operator: 'between', value: '2026-01-01', to: '2026-03-31' }`, `{ operator: 'blank' }`.\r\n */\r\nexport interface SirioGridFilterCondition<V = unknown> {\r\n operator: SirioGridFilterOperator;\r\n value?: V | null;\r\n /** Upper bound of `between`. */\r\n to?: V | null;\r\n}\r\n\r\n/** Operators of each filter type, in the order of the choice; the first one is the default. */\r\nexport const SIRIO_GRID_FILTER_OPERATORS: Readonly<Record<SirioGridFilterType, readonly SirioGridFilterOperator[]>> = {\r\n text: ['contains', 'notContains', 'equals', 'notEquals', 'startsWith', 'endsWith', 'blank', 'notBlank'],\r\n number: ['equals', 'notEquals', 'greaterThan', 'greaterThanOrEqual', 'lessThan', 'lessThanOrEqual', 'between', 'blank', 'notBlank'],\r\n date: ['equals', 'notEquals', 'before', 'after', 'between', 'blank', 'notBlank'],\r\n select: ['in', 'notIn', 'blank', 'notBlank'],\r\n boolean: ['equals', 'blank', 'notBlank'],\r\n};\r\n\r\n/** The value is a filter condition (`{ operator, value?, to? }`). */\r\nexport function sirioIsFilterCondition(value: unknown): value is SirioGridFilterCondition {\r\n return typeof value === 'object' && value !== null && !Array.isArray(value) && typeof (value as SirioGridFilterCondition).operator === 'string';\r\n}\r\n\r\n/** Column filters by filter key (`filterKey` of the column, default its sort key / field). */\r\nexport type SirioGridFilters = Record<string, unknown>;\r\n\r\n/** True when a filter value restricts the rows (not empty, not an empty range or list). */\r\nexport function sirioGridFilterActive(value: unknown): boolean {\r\n if (value === null || value === undefined || value === '') {\r\n return false;\r\n }\r\n if (Array.isArray(value)) {\r\n return value.length > 0;\r\n }\r\n if (sirioIsFilterCondition(value)) {\r\n if (value.operator === 'blank' || value.operator === 'notBlank') {\r\n return true;\r\n }\r\n return sirioGridFilterActive(value.value) || (value.operator === 'between' && sirioGridFilterActive(value.to));\r\n }\r\n if (typeof value === 'object' && !(value instanceof Date)) {\r\n const range = value as SirioGridRange;\r\n return sirioGridFilterActive(range.from) || sirioGridFilterActive(range.to);\r\n }\r\n return true;\r\n}\r\n\r\n/** Only the active filters (the object sent to a server data source). */\r\nexport function sirioActiveGridFilters(filters: SirioGridFilters | null | undefined): SirioGridFilters {\r\n const active: SirioGridFilters = {};\r\n for (const [key, value] of Object.entries(filters ?? {})) {\r\n if (sirioGridFilterActive(value)) {\r\n active[key] = value;\r\n }\r\n }\r\n return active;\r\n}\r\n\r\n/** Response of a server side data source: the rows of the page and the total number of rows. */\r\nexport interface SirioGridResult<T> {\r\n rows: readonly T[];\r\n /**\r\n * Rows that pass the filters on the server. Without it (null / undefined) the total is open: a\r\n * full page means there are more rows (\"Successiva\" active, totals as \"30+\"), a shorter page is\r\n * the last one.\r\n */\r\n total?: number | null;\r\n}\r\n\r\n/**\r\n * Server side data source: receives the query (page, page size, sort, filters) and returns the page.\r\n * Called again whenever the query changes and on `reload()`; responses of outdated queries are\r\n * ignored.\r\n *\r\n * ```ts\r\n * readonly load: SirioGridDataSource<Pratica> = (q) =>\r\n * this.http.get<SirioGridResult<Pratica>>('/api/pratiche', { params: { ... } });\r\n * ```\r\n */\r\nexport type SirioGridDataSource<T> = (\r\n query: SirioGridQuery,\r\n) => Observable<SirioGridResult<T>> | Promise<SirioGridResult<T>> | SirioGridResult<T>;\r\n\r\n/** Sort on one column at a time (`single`) or on more columns with Shift+click (`multiple`). */\r\nexport type SirioGridSortMode = 'single' | 'multiple';\r\n\r\n/** Aggregation of a column in the group rows (`wm-sirio-grid-column [aggregate]`). */\r\nexport type SirioGridAggregate = 'sum' | 'mean' | 'min' | 'max' | 'count';\r\n\r\n/**\r\n * Expanded rows by row id (the `rowId` value as text; group rows: `<column>:<value>`), or `true`\r\n * for every row (two-way: `[(expanded)]`).\r\n */\r\nexport type SirioGridExpanded = Record<string, boolean> | true;\r\n\r\n/** Sub-rows of a row for tree data: the name of a property or a function. */\r\nexport type SirioGridSubRows<T> = string | ((row: T) => readonly T[] | null | undefined);\r\n\r\n/**\r\n * State of a grid chosen by the user, to save it and restore it when the page opens again\r\n * (`getState()` / `setState()` / `(stateChange)`); plain JSON.\r\n */\r\nexport interface SirioGridState {\r\n /** Version of the format, for future migrations. */\r\n version: 1;\r\n sort: SirioGridSort[];\r\n filters: SirioGridFilters;\r\n page: number;\r\n pageSize: number;\r\n /** Column keys in display order (empty = declaration order). */\r\n columnOrder: string[];\r\n /** Widths (px) of the resized columns by key. */\r\n columnWidths: Record<string, number>;\r\n grouping: string[];\r\n expanded: SirioGridExpanded;\r\n /** `rowId` of the selected rows (only with a `rowId` giving texts or numbers). */\r\n selected?: (string | number)[];\r\n}\r\n\r\n/** Row selection mode. */\r\nexport type SirioGridSelection = 'none' | 'single' | 'multiple';\r\n\r\n/** Look of the table (kit classes `sirio-table-dark` / `sirio-table-light`). */\r\nexport type SirioGridVariant = 'default' | 'dark' | 'striped';\r\n\r\n/** Density of the cells (kit classes `sirio-table-xs` / `-sm` / `-lg`). */\r\nexport type SirioGridSize = 'xs' | 'sm' | 'md' | 'lg';\r\n\r\n/**\r\n * Rows taken by \"seleziona tutto\" (header checkbox of the multiple selection): `page` the rows of the\r\n * current page, `filtered` every row that passes the filters (all the pages), `all` every row, also\r\n * the ones excluded by the filters. With a server data source only the loaded page is available.\r\n */\r\nexport type SirioGridSelectAll = 'page' | 'filtered' | 'all';\r\n\r\n/** Horizontal alignment of a column (header and cells). */\r\nexport type SirioGridAlign = 'start' | 'center' | 'end';\r\n\r\n/**\r\n * Side where a column stays fixed during the horizontal scroll (`wm-sirio-grid-column fixed`).\r\n * More columns can be fixed on both sides; the fixed columns are shown at that side of the table.\r\n */\r\nexport type SirioGridFixed = 'left' | 'right';\r\n\r\n/** Identity of a row: the name of a property or a function. null = the row object itself. */\r\nexport type SirioGridRowId<T> = string | ((row: T) => unknown) | null;\r\n\r\n/** Payload of `(rowClick)`. */\r\nexport interface SirioGridRowEvent<T> {\r\n row: T;\r\n /** Index of the row in the current page (0-based). */\r\n index: number;\r\n event: MouseEvent | KeyboardEvent;\r\n}\r\n\r\n/**\r\n * Reads a property by path (`'indirizzo.citta'`); undefined when a step is missing.\r\n * @internal\r\n */\r\nexport function sirioReadPath(row: unknown, path: string): unknown {\r\n if (!path) {\r\n return undefined;\r\n }\r\n let current: unknown = row;\r\n for (const key of path.split('.')) {\r\n if (current === null || current === undefined) {\r\n return undefined;\r\n }\r\n current = (current as Record<string, unknown>)[key];\r\n }\r\n return current;\r\n}\r\n\r\n/**\r\n * Text normalized for the `text` filter: lower case, without accents and repeated spaces.\r\n * @internal\r\n */\r\nexport function sirioNormalizeText(value: unknown): string {\r\n return String(value ?? '')\r\n .normalize('NFD')\r\n .replace(/[\\u0300-\\u036f]/g, '')\r\n .replace(/\\s+/g, ' ')\r\n .trim()\r\n .toLowerCase();\r\n}\r\n\r\n/**\r\n * 'yyyy-MM-dd' of a cell value for the `date` filter: a Date (local day) or the start of an ISO\r\n * string; null when the value is not a date.\r\n * @internal\r\n */\r\nexport function sirioIsoDay(value: unknown): string | null {\r\n if (value instanceof Date) {\r\n if (isNaN(value.getTime())) {\r\n return null;\r\n }\r\n const pad = (n: number) => String(n).padStart(2, '0');\r\n return `${value.getFullYear()}-${pad(value.getMonth() + 1)}-${pad(value.getDate())}`;\r\n }\r\n if (typeof value === 'string' && /^\\d{4}-\\d{2}-\\d{2}/.test(value)) {\r\n return value.slice(0, 10);\r\n }\r\n return null;\r\n}\r\n\r\n/** Text collators by locale (numeric aware, case and accent insensitive). */\r\nconst collators = new Map<string, Intl.Collator>();\r\n\r\nfunction collatorOf(locale: string | undefined): Intl.Collator {\r\n const key = locale ?? '';\r\n let collator = collators.get(key);\r\n if (!collator) {\r\n collator = new Intl.Collator(locale || undefined, { numeric: true, sensitivity: 'base' });\r\n collators.set(key, collator);\r\n }\r\n return collator;\r\n}\r\n\r\n/**\r\n * Default comparison of two cell values: null/undefined last, numbers and dates by value,\r\n * booleans false before true, the rest as text with the collation of `locale` (numeric aware;\r\n * the grid passes its `LOCALE_ID`, default the browser language).\r\n */\r\nexport function sirioDefaultGridCompare(a: unknown, b: unknown, locale?: string): number {\r\n const aEmpty = a === null || a === undefined || a === '';\r\n const bEmpty = b === null || b === undefined || b === '';\r\n if (aEmpty || bEmpty) {\r\n return aEmpty === bEmpty ? 0 : aEmpty ? 1 : -1;\r\n }\r\n if (typeof a === 'number' && typeof b === 'number') {\r\n return a - b;\r\n }\r\n if (a instanceof Date && b instanceof Date) {\r\n return a.getTime() - b.getTime();\r\n }\r\n if (typeof a === 'boolean' && typeof b === 'boolean') {\r\n return a === b ? 0 : a ? 1 : -1;\r\n }\r\n return collatorOf(locale).compare(String(a), String(b));\r\n}\r\n\r\n/**\r\n * Classes of rows, cells and headers, as with `ngClass`: a text (`'a b'`), a list (`['a', 'b']`)\r\n * or an object `{ classe: condizione }` (classes with a true condition).\r\n */\r\nexport type SirioGridClass = string | readonly string[] | Readonly<Record<string, unknown>> | null | undefined;\r\n\r\n/**\r\n * Inline styles of rows, cells and headers, as with `ngStyle`: CSS text (`'color: red'`) or an\r\n * object `{ proprietà: valore }` (camelCase or kebab-case names, unit in the key: `'width.px': 80`).\r\n */\r\nexport type SirioGridStyle = string | Readonly<Record<string, string | number | null | undefined>> | null | undefined;\r\n\r\n/** Classes or styles of a row: fixed, or a function of the row and its index in the page. */\r\nexport type SirioGridRowClass<T> = SirioGridClass | ((row: T, index: number) => SirioGridClass);\r\nexport type SirioGridRowStyle<T> = SirioGridStyle | ((row: T, index: number) => SirioGridStyle);\r\n\r\n/** Classes or styles of the cells of a column: fixed, or a function of the row and of the cell value. */\r\nexport type SirioGridCellClass<T> = SirioGridClass | ((row: T, value: unknown) => SirioGridClass);\r\nexport type SirioGridCellStyle<T> = SirioGridStyle | ((row: T, value: unknown) => SirioGridStyle);\r\n\r\n/**\r\n * Class names of a `SirioGridClass`, separated by spaces ('' when none).\r\n * @internal\r\n */\r\nexport function sirioGridClassText(value: SirioGridClass): string {\r\n if (!value) {\r\n return '';\r\n }\r\n if (typeof value === 'string') {\r\n return value.trim();\r\n }\r\n if (Array.isArray(value)) {\r\n return value.filter((c) => typeof c === 'string' && c.trim()).join(' ');\r\n }\r\n return Object.entries(value as Record<string, unknown>)\r\n .filter(([name, on]) => !!on && name.trim())\r\n .map(([name]) => name.trim())\r\n .join(' ');\r\n}\r\n\r\nconst kebab = (name: string) => (name.startsWith('--') ? name : name.replace(/[A-Z]/g, (c) => `-${c.toLowerCase()}`));\r\n\r\n/**\r\n * Style object of a `SirioGridStyle` (kebab-case names, units applied; empty values dropped),\r\n * null when there are no styles.\r\n * @internal\r\n */\r\nexport function sirioGridStyleObject(value: SirioGridStyle): Record<string, string> | null {\r\n if (!value) {\r\n return null;\r\n }\r\n const result: Record<string, string> = {};\r\n if (typeof value === 'string') {\r\n for (const declaration of value.split(';')) {\r\n const colon = declaration.indexOf(':');\r\n if (colon > 0) {\r\n const name = declaration.slice(0, colon).trim();\r\n const text = declaration.slice(colon + 1).trim();\r\n if (name && text) {\r\n result[kebab(name)] = text;\r\n }\r\n }\r\n }\r\n } else {\r\n for (const [key, raw] of Object.entries(value)) {\r\n if (raw === null || raw === undefined || raw === '') {\r\n continue;\r\n }\r\n const dot = key.lastIndexOf('.');\r\n const name = dot > 0 && !key.startsWith('--') ? key.slice(0, dot) : key;\r\n const unit = dot > 0 && !key.startsWith('--') ? key.slice(dot + 1) : '';\r\n result[kebab(name.trim())] = `${raw}${unit}`;\r\n }\r\n }\r\n return Object.keys(result).length ? result : null;\r\n}\r\n","import { InjectionToken, makeEnvironmentProviders, EnvironmentProviders } from '@angular/core';\r\nimport { SirioOption } from '../core/sirio-option';\r\n\r\n/**\r\n * Predefined formats of `wm-sirio-grid-column [format]` (all in the format of `LOCALE_ID`):\r\n * - `number`: 1.234,5 (decimals / grouping options);\r\n * - `currency`: 1.234,50 € (`currency`, default EUR);\r\n * - `percentage`: 15 % from 0.15 (`scale: 'percent'` when the value is already 15);\r\n * - `date`: 31/01/2026 (`precision`: `day`, `month` → 01/2026, `year` → 2026);\r\n * - `dateTime`: 31/01/2026 14:30 (`seconds`);\r\n * - `time`: 14:30 (`seconds`);\r\n * - `boolean`: Sì / No (`trueLabel`, `falseLabel`);\r\n * - `map`: a code shown with its label (`values`: object or `SirioOption[]`).\r\n */\r\nexport type SirioGridFormatName =\r\n | 'number'\r\n | 'currency'\r\n | 'percentage'\r\n | 'date'\r\n | 'dateTime'\r\n | 'time'\r\n | 'boolean'\r\n | 'map';\r\n\r\n/** Options of the predefined formats (`wm-sirio-grid-column [formatOptions]`). */\r\nexport interface SirioGridFormatOptions {\r\n /** Text of an empty value (null, undefined, ''); default ''. */\r\n empty?: string;\r\n /** Number of decimals (fixed) of `number`, `currency`, `percentage`. */\r\n decimals?: number;\r\n /** Minimum / maximum decimals of `number`, `currency`, `percentage` (instead of `decimals`). */\r\n minDecimals?: number;\r\n maxDecimals?: number;\r\n /** Thousands separator of `number`, `currency` (rule of the locale); false = none. */\r\n grouping?: boolean;\r\n /** ISO 4217 code of `currency`; default 'EUR'. */\r\n currency?: string;\r\n /** Unit of the `percentage` value: `fraction` (0.15 = 15 %, default) or `percent` (15 = 15 %). */\r\n scale?: 'fraction' | 'percent';\r\n /** What `date` shows: the day (default), the month or the year. */\r\n precision?: 'day' | 'month' | 'year';\r\n /** Seconds in `dateTime` and `time`. */\r\n seconds?: boolean;\r\n /** Labels of `boolean`; default \"Sì\" / \"No\". */\r\n trueLabel?: string;\r\n falseLabel?: string;\r\n /** Labels of `map`: `{ A: 'Aperta' }` or `[{ value: 'A', label: 'Aperta' }]`. */\r\n values?: Readonly<Record<string, string>> | readonly SirioOption[];\r\n /** Options of the formats registered with `provideSirioGridFormats`. */\r\n [option: string]: unknown;\r\n}\r\n\r\n/** A named format: the text of a value (row undefined for group rows and filter values). */\r\nexport type SirioGridFormatFn = (value: unknown, row: unknown, options: SirioGridFormatOptions, locale: string) => string;\r\n\r\n/** Configuration of `provideSirioGridFormats`. */\r\nexport interface SirioGridFormatsConfig {\r\n /** Options of every format (e.g. `{ empty: '—', currency: 'EUR' }`). */\r\n defaults?: SirioGridFormatOptions;\r\n /** Options of a single format, over `defaults` (e.g. `{ percentage: { decimals: 1 } }`). */\r\n formatDefaults?: Partial<Record<string, SirioGridFormatOptions>>;\r\n /** Formats added (or predefined ones replaced) by name. */\r\n formats?: Record<string, SirioGridFormatFn>;\r\n}\r\n\r\n/** @internal */\r\nexport const SIRIO_GRID_FORMATS = new InjectionToken<SirioGridFormatsConfig>('SIRIO_GRID_FORMATS');\r\n\r\n/**\r\n * Formats of the grid columns for the whole application (or part of it): default options and\r\n * formats by name, used as `format=\"nome\"` on the columns.\r\n *\r\n * ```ts\r\n * providers: [\r\n * provideSirioGridFormats({\r\n * defaults: { empty: '—' },\r\n * formatDefaults: { currency: { currency: 'EUR', decimals: 2 } },\r\n * formats: { codiceFiscale: (v) => String(v ?? '').toUpperCase() },\r\n * }),\r\n * ]\r\n * ```\r\n */\r\nexport function provideSirioGridFormats(config: SirioGridFormatsConfig): EnvironmentProviders {\r\n return makeEnvironmentProviders([{ provide: SIRIO_GRID_FORMATS, useValue: config }]);\r\n}\r\n\r\n/** Kind of a predefined format: numbers and dates are aligned / sorted / shown as such. */\r\nexport type SirioGridFormatKind = 'number' | 'date' | null;\r\n\r\n/** @internal */\r\nexport function sirioGridFormatKind(name: string | null): SirioGridFormatKind {\r\n switch (name) {\r\n case 'number':\r\n case 'currency':\r\n case 'percentage':\r\n return 'number';\r\n case 'date':\r\n case 'dateTime':\r\n case 'time':\r\n return 'date';\r\n default:\r\n return null;\r\n }\r\n}\r\n\r\nfunction isEmpty(value: unknown): boolean {\r\n return value === null || value === undefined || value === '';\r\n}\r\n\r\n/**\r\n * Number of a cell value: numbers, bigints and numeric texts ('1234.5'); NaN otherwise.\r\n * @internal\r\n */\r\nexport function sirioGridToNumber(value: unknown): number {\r\n if (typeof value === 'number') {\r\n return value;\r\n }\r\n if (typeof value === 'bigint') {\r\n return Number(value);\r\n }\r\n if (typeof value === 'string' && value.trim() !== '') {\r\n return Number(value);\r\n }\r\n return NaN;\r\n}\r\n\r\nconst ISO_DAY = /^(\\d{4})-(\\d{2})-(\\d{2})$/;\r\nconst TIME = /^(\\d{1,2}):(\\d{2})(?::(\\d{2}))?$/;\r\n\r\n/**\r\n * Date of a cell value: `Date`, milliseconds, ISO texts ('2026-01-31' as a local day,\r\n * '2026-01-31T14:30' local, with an offset as given) and times ('14:30', today); null otherwise.\r\n * @internal\r\n */\r\nexport function sirioGridToDate(value: unknown): Date | null {\r\n let date: Date | null = null;\r\n if (value instanceof Date) {\r\n date = value;\r\n } else if (typeof value === 'number') {\r\n date = new Date(value);\r\n } else if (typeof value === 'string' && value.trim() !== '') {\r\n const text = value.trim();\r\n const day = ISO_DAY.exec(text);\r\n const time = TIME.exec(text);\r\n if (day) {\r\n date = new Date(Number(day[1]), Number(day[2]) - 1, Number(day[3]));\r\n } else if (time) {\r\n date = new Date();\r\n date.setHours(Number(time[1]), Number(time[2]), Number(time[3] ?? 0), 0);\r\n } else {\r\n date = new Date(text);\r\n }\r\n }\r\n return date && !isNaN(date.getTime()) ? date : null;\r\n}\r\n\r\n/** Decimal digits of the number formats. */\r\nfunction digits(options: SirioGridFormatOptions, min: number | undefined, max: number | undefined): Intl.NumberFormatOptions {\r\n if (options.decimals !== undefined) {\r\n return { minimumFractionDigits: options.decimals, maximumFractionDigits: options.decimals };\r\n }\r\n const result: Intl.NumberFormatOptions = {};\r\n const minimum = options.minDecimals ?? min;\r\n const maximum = options.maxDecimals ?? max;\r\n if (minimum !== undefined) {\r\n result.minimumFractionDigits = minimum;\r\n }\r\n if (maximum !== undefined) {\r\n result.maximumFractionDigits = Math.max(maximum, minimum ?? 0);\r\n }\r\n return result;\r\n}\r\n\r\n/** Thousands separator: the rule of the locale (e.g. it-IT from 10.000), none with `grouping: false`. */\r\nfunction grouping(options: SirioGridFormatOptions): Intl.NumberFormatOptions {\r\n return options.grouping === false ? { useGrouping: false } : {};\r\n}\r\n\r\n/** Intl formatters by locale and options (a grid shows many cells with the same format). */\r\nconst numberFormats = new Map<string, Intl.NumberFormat>();\r\nconst dateFormats = new Map<string, Intl.DateTimeFormat>();\r\n\r\nfunction numberFormat(locale: string, options: Intl.NumberFormatOptions): Intl.NumberFormat {\r\n const key = `${locale}|${JSON.stringify(options)}`;\r\n let format = numberFormats.get(key);\r\n if (!format) {\r\n format = new Intl.NumberFormat(locale, options);\r\n numberFormats.set(key, format);\r\n }\r\n return format;\r\n}\r\n\r\nfunction dateFormat(locale: string, options: Intl.DateTimeFormatOptions): Intl.DateTimeFormat {\r\n const key = `${locale}|${JSON.stringify(options)}`;\r\n let format = dateFormats.get(key);\r\n if (!format) {\r\n format = new Intl.DateTimeFormat(locale, options);\r\n dateFormats.set(key, format);\r\n }\r\n return format;\r\n}\r\n\r\nconst DAY: Intl.DateTimeFormatOptions = { day: '2-digit', month: '2-digit', year: 'numeric' };\r\n\r\nfunction timeOptions(options: SirioGridFormatOptions): Intl.DateTimeFormatOptions {\r\n return options.seconds\r\n ? { hour: '2-digit', minute: '2-digit', second: '2-digit' }\r\n : { hour: '2-digit', minute: '2-digit' };\r\n}\r\n\r\n/** Label of a `map` value. */\r\nfunction mapLabel(value: unknown, values: SirioGridFormatOptions['values']): string | undefined {\r\n if (!values) {\r\n return undefined;\r\n }\r\n if (Array.isArray(values)) {\r\n const option = (values as readonly SirioOption[]).find((o) => o.value === value || String(o.value) === String(value));\r\n return option?.label;\r\n }\r\n return (values as Record<string, string>)[String(value)];\r\n}\r\n\r\n/** Predefined formats; an unusable value (e.g. text in `number`) is shown as it is. */\r\nconst PREDEFINED: Record<SirioGridFormatName, SirioGridFormatFn> = {\r\n number: (value, _row, options, locale) => {\r\n const n = sirioGridToNumber(value);\r\n return isNaN(n)\r\n ? String(value)\r\n : numberFormat(locale, { ...grouping(options), ...digits(options, undefined, undefined) }).format(n);\r\n },\r\n currency: (value, _row, options, locale) => {\r\n const n = sirioGridToNumber(value);\r\n return isNaN(n)\r\n ? String(value)\r\n : numberFormat(locale, {\r\n style: 'currency',\r\n currency: options.currency ?? 'EUR',\r\n ...grouping(options),\r\n ...digits(options, undefined, undefined),\r\n }).format(n);\r\n },\r\n percentage: (value, _row, options, locale) => {\r\n const n = sirioGridToNumber(value);\r\n if (isNaN(n)) {\r\n return String(value);\r\n }\r\n const fraction = options.scale === 'percent' ? n / 100 : n;\r\n return numberFormat(locale, { style: 'percent', ...digits(options, 0, 0) }).format(fraction);\r\n },\r\n date: (value, _row, options, locale) => {\r\n const date = sirioGridToDate(value);\r\n if (!date) {\r\n return String(value);\r\n }\r\n const precision = options.precision ?? 'day';\r\n const parts: Intl.DateTimeFormatOptions =\r\n precision === 'year' ? { year: 'numeric' } : precision === 'month' ? { month: '2-digit', year: 'numeric' } : DAY;\r\n return dateFormat(locale, parts).format(date);\r\n },\r\n dateTime: (value, _row, options, locale) => {\r\n const date = sirioGridToDate(value);\r\n // Date and time joined by a space (\"31/01/2026 14:30\"), without the comma of some locales.\r\n return date ? `${dateFormat(locale, DAY).format(date)} ${dateFormat(locale, timeOptions(options)).format(date)}` : String(value);\r\n },\r\n time: (value, _row, options, locale) => {\r\n const date = sirioGridToDate(value);\r\n return date ? dateFormat(locale, timeOptions(options)).format(date) : String(value);\r\n },\r\n boolean: (value, _row, options) => {\r\n if (value === true || value === 'true') {\r\n return options.trueLabel ?? 'Sì';\r\n }\r\n if (value === false || value === 'false') {\r\n return options.falseLabel ?? 'No';\r\n }\r\n return String(value);\r\n },\r\n map: (value, _row, options) => mapLabel(value, options.values) ?? String(value),\r\n};\r\n\r\n/**\r\n * Text function of a named format with its options (registered formats first, then the\r\n * predefined ones); null for an unknown name. Empty values give `options.empty`.\r\n * @internal\r\n */\r\nexport function sirioGridNamedFormat(\r\n name: string,\r\n options: SirioGridFormatOptions | null,\r\n config: SirioGridFormatsConfig | null,\r\n locale: string,\r\n): ((value: unknown, row: unknown) => string) | null {\r\n const format = config?.formats?.[name] ?? PREDEFINED[name as SirioGridFormatName];\r\n if (!format) {\r\n return null;\r\n }\r\n const merged: SirioGridFormatOptions = { ...config?.defaults, ...config?.formatDefaults?.[name], ...options };\r\n return (value, row) => (isEmpty(value) ? (merged.empty ?? '') : format(value, row, merged, locale));\r\n}\r\n\r\n/**\r\n * Choices of a `map` format for a select filter: every code of `values` with its label.\r\n * @internal\r\n */\r\nexport function sirioGridMapOptions(values: SirioGridFormatOptions['values']): SirioOption[] {\r\n if (!values) {\r\n return [];\r\n }\r\n if (Array.isArray(values)) {\r\n return (values as readonly SirioOption[]).map((o) => ({ value: o.value, label: o.label }));\r\n }\r\n return Object.entries(values as Record<string, string>).map(([value, label]) => ({ value, label }));\r\n}\r\n","import {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n Directive,\n inject,\n input,\n LOCALE_ID,\n TemplateRef,\n} from '@angular/core';\nimport { SirioOption } from '../core/sirio-option';\nimport {\n SIRIO_GRID_FORMATS,\n SirioGridFormatName,\n SirioGridFormatOptions,\n sirioGridFormatKind,\n sirioGridNamedFormat,\n sirioGridToDate,\n sirioGridToNumber,\n} from './sirio-grid-formats';\nimport {\n SirioGridAggregate,\n SirioGridAlign,\n SirioGridCellClass,\n SirioGridCellStyle,\n SirioGridClass,\n SirioGridStyle,\n sirioGridClassText,\n sirioGridStyleObject,\n SirioGridFilterCondition,\n SirioGridFilterOperator,\n SirioGridFilterType,\n SirioGridFixed,\n SirioGridRange,\n SIRIO_GRID_FILTER_OPERATORS,\n sirioDefaultGridCompare,\n sirioIsFilterCondition,\n sirioGridFilterActive,\n sirioIsoDay,\n sirioNormalizeText,\n sirioReadPath,\n} from './sirio-data-grid-types';\n\n/** Context of a `wmSirioGridCell` template. */\nexport interface SirioGridCellContext<T = any> {\n /** The row. */\n $implicit: T;\n row: T;\n /** Value of the column for the row (`value` function or `field`). */\n value: unknown;\n /** Index of the row in the current page (0-based). */\n index: number;\n}\n\n/** Context of a `wmSirioGridHeader` template. */\nexport interface SirioGridHeaderContext {\n /** The column. */\n $implicit: SirioGridColumn;\n}\n\n/**\n * Custom cell of a column:\n * `<ng-template wmSirioGridCell let-row let-value=\"value\">{{ value | currency: 'EUR' }}</ng-template>`.\n */\n@Directive({ selector: 'ng-template[wmSirioGridCell]' })\nexport class SirioGridCell {\n static ngTemplateContextGuard(_dir: SirioGridCell, ctx: unknown): ctx is SirioGridCellContext {\n return true;\n }\n}\n\n/** Custom header of a column (rich content instead of the `header` text). */\n@Directive({ selector: 'ng-template[wmSirioGridHeader]' })\nexport class SirioGridHeader {\n static ngTemplateContextGuard(_dir: SirioGridHeader, ctx: unknown): ctx is SirioGridHeaderContext {\n return true;\n }\n}\n\n/** Context of a `wmSirioGridDetail` template. */\nexport interface SirioGridDetailContext<T = any> {\n /** The row. */\n $implicit: T;\n row: T;\n}\n\n/**\n * Detail panel of an expandable row, shown below it when expanded (the grid adds the expand\n * column): `<ng-template wmSirioGridDetail let-row>...</ng-template>` inside `wm-sirio-data-grid`.\n */\n@Directive({ selector: 'ng-template[wmSirioGridDetail]' })\nexport class SirioGridDetail {\n static ngTemplateContextGuard(_dir: SirioGridDetail, ctx: unknown): ctx is SirioGridDetailContext {\n return true;\n }\n}\n\n/** Content of the grid when there are no rows (instead of the `emptyText` text). */\n@Directive({ selector: 'ng-template[wmSirioGridEmpty]' })\nexport class SirioGridEmpty {}\n\n/** Context of a `wmSirioGridError` template. */\nexport interface SirioGridErrorContext {\n /** Error of the data source. */\n $implicit: unknown;\n error: unknown;\n /** Calls the data source again (as `reload()`). */\n retry: () => void;\n}\n\n/**\n * Content of the grid when the server data source fails (instead of the `loadErrorText` message\n * with \"Riprova\"): `<ng-template wmSirioGridError let-error let-retry=\"retry\">...</ng-template>`.\n */\n@Directive({ selector: 'ng-template[wmSirioGridError]' })\nexport class SirioGridError {\n static ngTemplateContextGuard(_dir: SirioGridError, ctx: unknown): ctx is SirioGridErrorContext {\n return true;\n }\n}\n\n/**\n * Column of `wm-sirio-data-grid`. Renders nothing by itself: it describes the column (value,\n * header, sorting, alignment, width) and holds its optional cell/header templates.\n *\n * ```html\n * <wm-sirio-grid-column field=\"nome\" header=\"Nome\" sortable />\n * <wm-sirio-grid-column field=\"importo\" header=\"Importo\" align=\"end\" [format]=\"euro\" filter=\"number\" />\n * <wm-sirio-grid-column field=\"stato\" header=\"Stato\" filter=\"select\" [filterOptions]=\"stati\" />\n * ```\n */\n@Component({\n selector: 'wm-sirio-grid-column',\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './sirio-grid-column.html',\n})\nexport class SirioGridColumn<T = any> {\n /** Property of the row shown in the column; dotted paths are allowed (`indirizzo.citta`). */\n readonly field = input('');\n /** Header text (also the label of the cell in the card layout). */\n readonly header = input('');\n /** Click on the header sorts by this column (asc → desc → none). */\n readonly sortable = input(false, { transform: booleanAttribute });\n /** Key of the sort (`SirioGridSort.field`, sent to a server data source); default `field`. */\n readonly sortKey = input<string | null>(null);\n /** Alignment of header and cells; default `end` for the number formats, `start` otherwise. */\n readonly align = input<SirioGridAlign | null>(null);\n /** CSS width of the column (`120px`, `20%`); null = automatic. */\n readonly width = input<string | null>(null);\n /**\n * Share of the free width of the grid taken by the column, as `flex` in CSS / ag-grid: the\n * columns with `flex` fill the width left by the others in proportion (`flex=\"2\"` takes twice\n * `flex=\"1\"`), within `minWidth` / `maxWidth`. `flex` without a value = 1. The other columns keep\n * their `width`, or their content width.\n */\n readonly flex = input<number | null, unknown>(null, {\n transform: (v: unknown) => {\n if (v === '' || v === true) {\n return 1;\n }\n const n = Number(v);\n return v !== null && v !== undefined && v !== false && n > 0 ? n : null;\n },\n });\n readonly hidden = input(false, { transform: booleanAttribute });\n /**\n * Long texts wrap on more lines (default). With `false` the cell text stays on one line: the\n * column widens, or the text is cut with an ellipsis when the column has a width.\n */\n readonly wrap = input(true, { transform: booleanAttribute });\n /**\n * The column is as wide as its content (as the actions column): it does not take a share of the\n * free room of the table, and its cells stay on one line (e.g. a row of buttons).\n */\n readonly fit = input(false, { transform: booleanAttribute });\n /**\n * Group of the column in the grouped headers: the group names from the top level down, separated\n * by `/` (or `\\`), e.g. `\"Pratica\"` or `\"Dati/Richiedente\"`. Adjacent columns with the same groups\n * share the group header cells; null = no group.\n */\n readonly group = input<string | null>(null);\n /**\n * The column stays fixed at the left or right side during the horizontal scroll of the kit\n * responsive container (more columns can be fixed on both sides); null = it scrolls.\n */\n readonly fixed = input<SirioGridFixed | null, SirioGridFixed | null | undefined | ''>(null, {\n transform: (v: SirioGridFixed | null | undefined | '') => (v === 'left' || v === 'right' ? v : null),\n });\n /** Value of the cell computed from the row (instead of `field`); also used for sorting. */\n readonly value = input<((row: T) => unknown) | null>(null);\n /**\n * Text of the cell from its value: a function `(value, row) => string`, or the name of a\n * predefined format (`number`, `currency`, `percentage`, `date`, `dateTime`, `time`, `boolean`,\n * `map`, see `SirioGridFormatName`, options in `formatOptions`) or of a format registered with\n * `provideSirioGridFormats`. Default: numbers with the decimal separator of `LOCALE_ID` (no\n * thousands grouping, so codes and years stay as they are), `Date` values as a date of\n * `LOCALE_ID`, the rest as `String(value)`.\n */\n readonly format = input<((value: unknown, row: T) => string) | SirioGridFormatName | (string & {}) | null>(null);\n /** Options of a named `format` (see `SirioGridFormatOptions`), over the `provideSirioGridFormats` defaults. */\n readonly formatOptions = input<SirioGridFormatOptions | null>(null);\n /** Comparison used by the client side sort; default `sirioDefaultGridCompare`. */\n readonly compare = input<((a: unknown, b: unknown) => number) | null>(null);\n /** The rows can be grouped by this column (\"Raggruppa per\" of the grid, `[(grouping)]`). */\n readonly groupable = input(false, { transform: booleanAttribute });\n /** Value of the column in the group rows: sum, mean, min, max or count of the grouped rows. */\n readonly aggregate = input<SirioGridAggregate | null>(null);\n /** With a `resizable` grid: false keeps the width of this column fixed. */\n readonly resizable = input(true, { transform: booleanAttribute });\n /** Minimum width in pixels when resized. */\n readonly minWidth = input(60, { transform: (v: unknown) => Math.max(20, Number(v) || 60) });\n /** Maximum width in pixels when resized; null = none. */\n readonly maxWidth = input<number | null, unknown>(null, {\n transform: (v: unknown) => (v === null || v === undefined || v === '' ? null : Number(v) || null),\n });\n /**\n * Classes of the cells: text, list or object `{ classe: condizione }`, or a function of the row\n * and of the cell value (e.g. `(row, value) => ({ 'sirio-text-danger': value < 0 })`).\n */\n readonly cellClass = input<SirioGridCellClass<T>>(null);\n /** Inline styles of the cells: CSS text or object, or a function of the row and of the cell value. */\n readonly cellStyle = input<SirioGridCellStyle<T>>(null);\n /** Classes of the header cell (text, list or object). */\n readonly headerClass = input<SirioGridClass>(null);\n /** Inline styles of the header cell (CSS text or object). */\n readonly headerStyle = input<SirioGridStyle>(null);\n\n /** Filter of the column, edited in the popover of its header (see `SirioGridFilterType`); null = none. */\n readonly filter = input<SirioGridFilterType | null>(null);\n /** Key of the filter (`SirioGridFilters`, sent to a server data source); default the sort key. */\n readonly filterKey = input<string | null>(null);\n /** Options of a `select` filter. */\n readonly filterOptions = input<SirioOption[]>([]);\n /** `select` filter with more values (rows matching any of them). */\n readonly filterMultiple = input(false, { transform: booleanAttribute });\n /** Placeholder of a `text` filter. */\n readonly filterPlaceholder = input('');\n /** Client side match of a row (instead of the default one of the filter type). */\n readonly filterPredicate = input<((value: unknown, filter: unknown, row: T) => boolean) | null>(null);\n /**\n * Operators of the filter (a \"Condizione\" choice above the value, the value becomes a\n * `SirioGridFilterCondition`): true = every operator of the filter type, a list = those\n * operators (see `SIRIO_GRID_FILTER_OPERATORS`), false = none; null (default) = the grid\n * `filterOperators`.\n */\n readonly filterOperators = input<boolean | readonly SirioGridFilterOperator[] | null, unknown>(null, {\n transform: (v: unknown) =>\n v === null || v === undefined ? null : Array.isArray(v) ? (v as SirioGridFilterOperator[]) : booleanAttribute(v),\n });\n\n /** Operators offered for the filter (empty = simple filter without operators). @internal */\n operatorsFor(gridDefault: boolean): readonly SirioGridFilterOperator[] {\n const type = this.filter();\n if (!type) {\n return [];\n }\n const own = this.filterOperators();\n const all = SIRIO_GRID_FILTER_OPERATORS[type];\n if (Array.isArray(own)) {\n return all.filter((op) => own.includes(op));\n }\n return (own ?? gridDefault) ? all : [];\n }\n\n /** @internal */\n readonly cellTemplate = contentChild(SirioGridCell, { read: TemplateRef });\n /** @internal */\n readonly headerTemplate = contentChild(SirioGridHeader, { read: TemplateRef });\n\n /** Key used in `SirioGridSort.field`. */\n readonly key = computed(() => this.sortKey() ?? this.field());\n /** Group names of `group`, top level first (empty = no group). */\n readonly groupPath = computed(() =>\n (this.group() ?? '')\n .split(/[\\\\/]/)\n .map((part) => part.trim())\n .filter((part) => part.length > 0),\n );\n /**\n * Key used in `SirioGridFilters` for a column alone on its field; the grid makes it unique for\n * columns on the same field (see `SirioDataGrid.filterIdOf`).\n */\n readonly filterId = computed(() => this.filterKey() ?? this.key());\n\n /** Value of the column for a row. */\n valueOf(row: T): unknown {\n const fn = this.value();\n return fn ? fn(row) : sirioReadPath(row, this.field());\n }\n\n /** Initial width in pixels from `width` (`'160px'`); null when it is not a pixel value. */\n readonly widthPx = computed(() => {\n const match = /^\\s*(\\d+(?:\\.\\d+)?)px\\s*$/.exec(this.width() ?? '');\n return match ? Number(match[1]) : null;\n });\n\n private readonly locale = inject(LOCALE_ID);\n private readonly formats = inject(SIRIO_GRID_FORMATS, { optional: true });\n\n /** Name of the `format` when it is a predefined / registered format. */\n readonly formatName = computed(() => {\n const format = this.format();\n return typeof format === 'string' ? format : null;\n });\n /** Numbers or dates by their predefined format (alignment, font, sort). */\n readonly formatKind = computed(() => sirioGridFormatKind(this.formatName()));\n /** Effective alignment: `align`, or `end` for the number formats. */\n readonly alignment = computed<SirioGridAlign>(() => this.align() ?? (this.formatKind() === 'number' ? 'end' : 'start'));\n\n /** Text function of `format` (a function or a named format); null = default text. */\n private readonly formatter = computed<((value: unknown, row: T | undefined) => string) | null>(() => {\n const format = this.format();\n if (typeof format === 'function') {\n return format as (value: unknown, row: T | undefined) => string;\n }\n if (typeof format === 'string' && format) {\n const named = sirioGridNamedFormat(format, this.formatOptions(), this.formats, this.locale);\n if (!named && typeof console !== 'undefined') {\n console.warn(`wm-sirio-grid-column: unknown format \"${format}\"`);\n }\n return named;\n }\n return null;\n });\n private readonly numberText = new Intl.NumberFormat(this.locale, { useGrouping: false, maximumFractionDigits: 20 });\n private readonly dateText = new Intl.DateTimeFormat(this.locale, { day: '2-digit', month: '2-digit', year: 'numeric' });\n\n /** Default text of a value without `format`: numbers and dates of `LOCALE_ID`. */\n private defaultText(value: unknown): string {\n if (value === null || value === undefined) {\n return '';\n }\n if (typeof value === 'number') {\n return Number.isFinite(value) ? this.numberText.format(value) : '';\n }\n if (value instanceof Date) {\n return isNaN(value.getTime()) ? '' : this.dateText.format(value);\n }\n return String(value);\n }\n\n /** Text of a value of the column without a row (group rows, filter values). */\n formatValue(value: unknown): string {\n const format = this.formatter();\n return format ? format(value, undefined) : this.defaultText(value);\n }\n\n /** Text of the cell for a row (cells without a template). */\n textOf(row: T): string {\n const value = this.valueOf(row);\n const format = this.formatter();\n return format ? format(value, row) : this.defaultText(value);\n }\n\n /**\n * Default comparison of the client side sort: by number / date for the number and date formats\n * (also when the values are texts), otherwise `sirioDefaultGridCompare` with the locale.\n * @internal\n */\n compareValues(a: unknown, b: unknown): number {\n const kind = this.formatKind();\n if (kind === 'number') {\n const toValue = (v: unknown) => {\n const n = sirioGridToNumber(v);\n return isNaN(n) ? null : n;\n };\n return sirioDefaultGridCompare(toValue(a), toValue(b), this.locale);\n }\n if (kind === 'date') {\n const toValue = (v: unknown) => sirioGridToDate(v)?.getTime() ?? null;\n return sirioDefaultGridCompare(toValue(a), toValue(b), this.locale);\n }\n return sirioDefaultGridCompare(a, b, this.locale);\n }\n\n /** True when the row passes the filter value of this column (client side filtering). */\n matches(row: T, filter: unknown): boolean {\n if (!sirioGridFilterActive(filter)) {\n return true;\n }\n const value = this.valueOf(row);\n const predicate = this.filterPredicate();\n if (predicate) {\n return predicate(value, filter, row);\n }\n if (sirioIsFilterCondition(filter)) {\n return this.matchesCondition(row, value, filter);\n }\n switch (this.filter()) {\n case 'number': {\n const range = filter as SirioGridRange<number>;\n const n = typeof value === 'number' ? value : value === null || value === '' ? NaN : Number(value);\n if (isNaN(n)) {\n return false;\n }\n return (range.from == null || n >= range.from) && (range.to == null || n <= range.to);\n }\n case 'date': {\n const range = filter as SirioGridRange<string>;\n const day = sirioIsoDay(value);\n if (!day) {\n return false;\n }\n return (!range.from || day >= range.from) && (!range.to || day <= range.to);\n }\n case 'boolean':\n return !!value === filter;\n case 'select':\n return Array.isArray(filter) ? filter.includes(value) : value === filter;\n default:\n return sirioNormalizeText(this.textOf(row)).includes(sirioNormalizeText(filter));\n }\n }\n\n /** Client side match of a filter condition. */\n private matchesCondition(row: T, value: unknown, condition: SirioGridFilterCondition): boolean {\n const blank = value === null || value === undefined || value === '' || (Array.isArray(value) && !value.length);\n const { operator } = condition;\n if (operator === 'blank') {\n return blank;\n }\n if (operator === 'notBlank') {\n return !blank;\n }\n switch (this.filter()) {\n case 'number': {\n const n = sirioGridToNumber(value);\n const a = sirioGridToNumber(condition.value);\n const b = sirioGridToNumber(condition.to);\n if (isNaN(n)) {\n return operator === 'notEquals';\n }\n switch (operator) {\n case 'equals':\n return n === a;\n case 'notEquals':\n return n !== a;\n case 'greaterThan':\n return n > a;\n case 'greaterThanOrEqual':\n return n >= a;\n case 'lessThan':\n return n < a;\n case 'lessThanOrEqual':\n return n <= a;\n case 'between':\n return (isNaN(a) || n >= a) && (isNaN(b) || n <= b);\n default:\n return true;\n }\n }\n case 'date': {\n const day = sirioIsoDay(value) ?? (sirioGridToDate(value) ? sirioIsoDay(sirioGridToDate(value)) : null);\n const a = (condition.value as string | null) ?? null;\n const b = (condition.to as string | null) ?? null;\n if (!day) {\n return operator === 'notEquals';\n }\n switch (operator) {\n case 'equals':\n return day === a;\n case 'notEquals':\n return day !== a;\n case 'before':\n return !a || day < a;\n case 'after':\n return !a || day > a;\n case 'between':\n return (!a || day >= a) && (!b || day <= b);\n default:\n return true;\n }\n }\n case 'select': {\n const chosen = Array.isArray(condition.value) ? condition.value : [condition.value];\n const found = chosen.some((c) => c === value || String(c) === String(value));\n return operator === 'notIn' ? !found : found;\n }\n case 'boolean':\n return !!value === condition.value;\n default: {\n const text = sirioNormalizeText(this.textOf(row));\n const term = sirioNormalizeText(condition.value);\n switch (operator) {\n case 'contains':\n return text.includes(term);\n case 'notContains':\n return !text.includes(term);\n case 'equals':\n return text === term;\n case 'notEquals':\n return text !== term;\n case 'startsWith':\n return text.startsWith(term);\n case 'endsWith':\n return text.endsWith(term);\n default:\n return true;\n }\n }\n }\n }\n\n /**\n * Numbers in the kit font (`font-mono`, Roboto Mono, as the kit numeric fields, dates and\n * pagination): true / false forces it; null (default) = numeric and date cells, i.e. columns\n * with a `number` / `date` filter or with a number / `Date` value.\n */\n readonly mono = input<boolean | null, unknown>(null, {\n transform: (v: unknown) => (v === null || v === undefined ? null : booleanAttribute(v)),\n });\n\n /** The cell of a row is shown in the kit numbers font (see `mono`). @internal */\n isMono(row: T): boolean {\n const mono = this.mono();\n if (mono !== null) {\n return mono;\n }\n const filter = this.filter();\n if (filter === 'number' || filter === 'date' || this.formatKind()) {\n return true;\n }\n const value = this.valueOf(row);\n return typeof value === 'number' || typeof value === 'bigint' || value instanceof Date;\n }\n\n /** @internal */\n /** Class names of a cell (`cellClass`), '' when none. */\n classOf(row: T): string {\n const cls = this.cellClass();\n return sirioGridClassText(typeof cls === 'function' ? cls(row, this.valueOf(row)) : cls);\n }\n\n /** Inline styles of a cell (`cellStyle`), null when none. */\n styleOf(row: T): Record<string, string> | null {\n const style = this.cellStyle();\n return sirioGridStyleObject(typeof style === 'function' ? style(row, this.valueOf(row)) : style);\n }\n\n /** Class names of the header cell (`headerClass`). */\n readonly headerClassText = computed(() => sirioGridClassText(this.headerClass()));\n /** Inline styles of the header cell (`headerStyle`). */\n readonly headerStyleObject = computed(() => sirioGridStyleObject(this.headerStyle()));\n}\n","<!-- Column definition only: wm-sirio-data-grid renders the header and the cells. -->\r\n","import { Directive } from '@angular/core';\nimport { AbstractControl, FormArray, FormControl, FormGroup } from '@angular/forms';\nimport { Observable } from 'rxjs';\nimport { SirioErrorMessages } from '../core/sirio-error-messages';\n\n/**\n * Builds the form group of a row of a `[formArray]` grid, with its validators: from the value of an\n * existing row (copy edited in the dialog) or from null / the initial values of a new row.\n */\nexport type SirioGridRowFactory<T extends object = any> = (value: T | null) => FormGroup;\n\n/** Context of the `wmSirioGridEditor` template (form of the edit dialog). */\nexport interface SirioGridEditorContext<T extends object = any> {\n /** Form group to bind (`[formGroup]=\"group\"`): a copy of the row, applied by \"Salva\". */\n $implicit: FormGroup;\n group: FormGroup;\n /** Value of the row being edited; null for a new row. */\n row: T | null;\n /** New row (\"Aggiungi\"). */\n isNew: boolean;\n /** Dialog opened to view the row (form array or row disabled, `rowEditable` false). */\n readonly: boolean;\n}\n\n/** `(rowSave)` and `saveHandler`: a row saved from the edit dialog. */\nexport interface SirioGridRowSaveEvent<T extends object = any> {\n /** New value of the row. */\n row: T;\n /** Value before the change; null for a new row. */\n previous: T | null;\n /**\n * Form group of the row: for `saveHandler` the edited copy (not applied yet), for `(rowSave)` the\n * group of the form array (the copy itself for a new row).\n */\n group: FormGroup;\n isNew: boolean;\n /** Position in the form array (for a new row: the position it takes, at the end). */\n index: number;\n}\n\n/** `(rowDelete)` and `deleteHandler`: a row removed from the form array. */\nexport interface SirioGridRowDeleteEvent<T extends object = any> {\n row: T;\n group: FormGroup;\n index: number;\n}\n\n/**\n * Check before applying a change (e.g. a call to the server): false, an exception or a rejected\n * promise / observable keep the change from happening (the edit dialog stays open with the error).\n */\nexport type SirioGridChangeHandler<E> = (\n event: E,\n) => boolean | void | Promise<boolean | void> | Observable<boolean | void>;\n\n/**\n * Form of the edit dialog of a `[formArray]` grid, bound to the copy of the row:\n *\n * ```html\n * <ng-template wmSirioGridEditor let-group let-isNew=\"isNew\">\n * <div [formGroup]=\"group\">\n * <wm-sirio-textbox formControlName=\"descrizione\" label=\"Descrizione\" />\n * </div>\n * </ng-template>\n * ```\n */\n@Directive({ selector: 'ng-template[wmSirioGridEditor]' })\nexport class SirioGridEditor<T extends object = any> {\n static ngTemplateContextGuard<T extends object>(\n _dir: SirioGridEditor<T>,\n ctx: unknown,\n ): ctx is SirioGridEditorContext<T> {\n return true;\n }\n}\n\n/** Default messages of the form array errors (the global ones talk about characters). */\nexport const SIRIO_GRID_ARRAY_MESSAGES: SirioErrorMessages = {\n required: 'Inserire almeno una riga',\n minlength: (e) => (e.requiredLength === 1 ? 'Inserire almeno una riga' : `Inserire almeno ${e.requiredLength} righe`),\n maxlength: (e) => (e.requiredLength === 1 ? 'Inserire al massimo una riga' : `Inserire al massimo ${e.requiredLength} righe`),\n};\n\n/**\n * Copy of a control with the same structure, values, disabled state, validators (the composed\n * validator functions) and `updateOn`: the form edited in the dialog when there is no `rowFactory`.\n * @internal\n */\nexport function sirioCloneControl<C extends AbstractControl>(control: C): C {\n const options = {\n validators: control.validator,\n asyncValidators: control.asyncValidator,\n updateOn: control.updateOn,\n };\n let copy: AbstractControl;\n if (control instanceof FormGroup) {\n const children: Record<string, AbstractControl> = {};\n for (const [name, child] of Object.entries(control.controls)) {\n children[name] = sirioCloneControl(child);\n }\n copy = new FormGroup(children, options);\n } else if (control instanceof FormArray) {\n copy = new FormArray(control.controls.map((c) => sirioCloneControl(c)), options);\n } else {\n copy = new FormControl(control.value, options);\n }\n if (control.disabled) {\n copy.disable({ emitEvent: false });\n }\n return copy as C;\n}\n\n/**\n * Writes the values of `source` into `target` (same structure): nested form arrays get the rows\n * added / removed in the dialog (copies of the source controls). Returns true when something changed.\n * @internal\n */\nexport function sirioSyncControl(target: AbstractControl, source: AbstractControl): boolean {\n if (target instanceof FormGroup && source instanceof FormGroup) {\n let changed = false;\n for (const [name, child] of Object.entries(source.controls)) {\n const own = target.controls[name];\n if (own) {\n changed = sirioSyncControl(own, child) || changed;\n }\n }\n return changed;\n }\n if (target instanceof FormArray && source instanceof FormArray) {\n let changed = false;\n while (target.length > source.length) {\n target.removeAt(target.length - 1);\n changed = true;\n }\n source.controls.forEach((child, i) => {\n if (i < target.length) {\n changed = sirioSyncControl(target.at(i), child) || changed;\n } else {\n target.push(sirioCloneControl(child));\n changed = true;\n }\n });\n return changed;\n }\n if (target.disabled) {\n return false; // disabled controls are not edited in the dialog\n }\n const value = source.value;\n const current = target.value;\n const same =\n Object.is(current, value) ||\n (typeof current === 'object' &&\n typeof value === 'object' &&\n current !== null &&\n value !== null &&\n JSON.stringify(current) === JSON.stringify(value));\n if (same) {\n return false;\n }\n target.setValue(value);\n return true;\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","/**\n * Panels of the controls (select list, date picker) inside a box that clips its content, e.g. the\n * scrolling data grid where the filter fields are: the open panel floats over the page (fixed\n * position under its field, above it when there is no room below) instead of being cut.\n */\n\n/** True when a box around the element clips its content (overflow other than visible). */\nexport function sirioInClippingBox(element: HTMLElement): boolean {\n const document = element.ownerDocument;\n const view = document.defaultView;\n for (let node = element.parentElement; node && node !== document.body; node = node.parentElement) {\n const style = view?.getComputedStyle(node);\n const clips = (value: string | undefined) => !!value && value !== 'visible';\n if (style && (clips(style.overflowX) || clips(style.overflowY) || clips(style.overflow))) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * Keeps `panel` fixed under (or above) `anchor` while the page or a box scrolls; the returned\n * function stops it and clears the position. `gap`: distance from the field.\n */\nexport function sirioFloatPanel(anchor: HTMLElement, panel: HTMLElement, gap = 0): () => void {\n const view = anchor.ownerDocument.defaultView;\n // !important: the kit fixes the position of its panels (e.g. `position: absolute !important`).\n const set = (name: string, value: string) => panel.style.setProperty(name, value, 'important');\n const names = ['position', 'inset', 'top', 'right', 'bottom', 'left', 'transform', 'margin', 'width', 'z-index'];\n // Inline values of the panel before floating, given back when it stops.\n const saved = names.map((name) => [name, panel.style.getPropertyValue(name), panel.style.getPropertyPriority(name)] as const);\n const width = panel.offsetWidth;\n const place = () => {\n if (!view) {\n return;\n }\n const field = anchor.getBoundingClientRect();\n const height = panel.offsetHeight;\n const below = field.bottom + gap + height <= view.innerHeight || field.top - gap < height;\n set('position', 'fixed');\n set('inset', 'auto');\n set('transform', 'none');\n set('margin', '0');\n if (width > 0) {\n set('width', `${width}px`);\n }\n set('top', `${below ? field.bottom + gap : field.top - gap - height}px`);\n set('left', `${Math.max(0, Math.min(field.left, view.innerWidth - width))}px`);\n set('z-index', '1070');\n };\n place();\n view?.addEventListener('scroll', place, { capture: true, passive: true });\n view?.addEventListener('resize', place);\n return () => {\n view?.removeEventListener('scroll', place, true);\n view?.removeEventListener('resize', place);\n for (const name of names) {\n panel.style.removeProperty(name);\n }\n for (const [name, value, priority] of saved) {\n if (value) {\n panel.style.setProperty(name, value, priority);\n }\n }\n };\n}\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 /** Opens the picker also on a readonly input (library default: true). */\r\n enableOnReadonly?: boolean;\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","/**\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 {\r\n afterNextRender,\r\n CSP_NONCE,\r\n Directive,\r\n DOCUMENT,\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 { sirioFloatPanel, sirioInClippingBox } from '../core/sirio-floating';\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/** Class of the picker while it is driven with the keyboard (the focused day is marked). */\r\nconst KEYBOARD_CLASS = 'wm-sirio-datepicker-keyboard';\r\nconst KEYBOARD_STYLE_ID = 'wm-sirio-datepicker-keyboard-style';\r\n\r\n/**\r\n * Focused day of the picker moved with the arrows. The kit hides it (`.datepicker-cell.focused`\r\n * transparent, webkit.min.css), so the arrows seemed to do nothing: it gets the kit focus ring\r\n * (`:focus-visible`, 2px #2f6dd5), white on the selected day (kit blue). A global style: the open\r\n * picker may be moved to the page body, out of the component styles.\r\n */\r\nconst KEYBOARD_CSS =\r\n `.datepicker.${KEYBOARD_CLASS} .datepicker-cell.focused{outline:2px solid #2f6dd5;outline-offset:-2px}` +\r\n `.datepicker.${KEYBOARD_CLASS} .datepicker-cell.focused.selected{outline-color:#fff;outline-offset:-4px}`;\r\n\r\n/** Keys that move the focused day (or open the picker) in VanillaJS Datepicker. */\r\nconst NAV_KEYS = new Set(['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown']);\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 * Inside a box that clips its content (e.g. the scrolling data grid, where the date filters are) the\r\n * open picker floats over the page, under the field, so it is never cut.\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(); float()',\r\n '(hide)': 'unfloat(); keyboard(false)',\r\n '(keydown)': 'onKeydown($event)',\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 private readonly document = inject(DOCUMENT);\r\n private readonly nonce = inject(CSP_NONCE, { optional: true });\r\n /** Open picker moved over the page: where it was, and the listeners that keep it under the field. */\r\n private floating: { parent: Node; next: Node | null; stop: () => void } | 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 this.unfloat();\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 /** The arrows move the focused day: it is marked until the picker closes or the mouse is used. */\r\n protected onKeydown(event: KeyboardEvent): void {\r\n if (NAV_KEYS.has(event.key)) {\r\n this.keyboard(true);\r\n }\r\n }\r\n\r\n protected keyboard(on: boolean): void {\r\n const element = this.picker?.picker.element;\r\n if (!element) {\r\n return;\r\n }\r\n if (on) {\r\n this.addKeyboardStyle();\r\n }\r\n element.classList.toggle(KEYBOARD_CLASS, on);\r\n }\r\n\r\n /** Once per page: the rule of the focused day (see KEYBOARD_CSS). */\r\n private addKeyboardStyle(): void {\r\n if (this.document.getElementById(KEYBOARD_STYLE_ID)) {\r\n return;\r\n }\r\n const style = this.document.createElement('style');\r\n style.id = KEYBOARD_STYLE_ID;\r\n if (this.nonce) {\r\n style.setAttribute('nonce', this.nonce);\r\n }\r\n style.textContent = KEYBOARD_CSS;\r\n this.document.head.appendChild(style);\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 /**\r\n * Opened inside a box that clips its content: the picker goes to the end of the page body, fixed\r\n * under the field (above it when there is no room below), following it while the page or the box\r\n * scrolls.\r\n */\r\n protected float(): void {\r\n const element = this.picker?.picker.element;\r\n if (!element || this.floating || !sirioInClippingBox(this.element)) {\r\n return;\r\n }\r\n const parent = element.parentNode!;\r\n const next = element.nextSibling;\r\n // Moved to the page body: out of the stacking of the box (e.g. the sticky grid headers).\r\n this.document.body.appendChild(element);\r\n this.floating = { parent, next, stop: sirioFloatPanel(this.element, element) };\r\n }\r\n\r\n /** Back in its place after the input when the picker closes. */\r\n protected unfloat(): void {\r\n const floating = this.floating;\r\n if (!floating) {\r\n return;\r\n }\r\n this.floating = null;\r\n floating.stop();\r\n const element = this.picker?.picker.element;\r\n if (element) {\r\n floating.parent.insertBefore(element, floating.next?.parentNode === floating.parent ? floating.next : null);\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 // A readonly field must not open the picker (VanillaJS Datepicker opens it by default).\r\n enableOnReadonly: 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 // A click in the picker: the mouse is used, the focused day is no longer marked.\r\n picker.picker.element.addEventListener('mousedown', () => this.keyboard(false));\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 { 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","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 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 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","import { NgTemplateOutlet } from '@angular/common';\r\nimport {\r\n afterRenderEffect,\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 DestroyRef,\r\n} from '@angular/core';\r\nimport { AbstractControl, ValidationErrors, Validator } from '@angular/forms';\r\nimport { provideSirioControl, SirioControlBase } from '../core/sirio-control-base';\r\nimport { sirioFloatPanel, sirioInClippingBox } from '../core/sirio-floating';\r\nimport { sirioDefaultCompare, SirioCompareWith, SirioOption } from '../core/sirio-option';\r\nimport { SirioField } from '../field/sirio-field';\r\nimport { SirioPendingIndicator } from '../pending/sirio-pending';\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 /** Row shown while the options are loading (`loading`). */\r\n isLoading?: 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, SirioPendingIndicator, 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 /**\r\n * Options still loading (e.g. from a service): the list shows `loadingText` with the kit spinner,\r\n * the closed field shows it instead of the placeholder and a spinner, the combobox is aria-busy.\r\n */\r\n readonly loading = input(false, { transform: booleanAttribute });\r\n readonly loadingText = input('Caricamento in corso');\r\n /** Accessible name of the reset button (searchable). */\r\n readonly resetLabel = input('Cancella testo');\r\n /**\r\n * Shows the reset button (\"X\") of the kit autocomplete that clears the search and the selection (searchable).\r\n * Default false: the button is not rendered, the value is changed by choosing another option or cleared from code.\r\n */\r\n readonly clearable = input(false, { transform: booleanAttribute });\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 if (this.loading()) {\r\n return [\r\n {\r\n label: this.loadingText(),\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 isLoading: true,\r\n },\r\n ];\r\n }\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 // Inside a box that clips its content (e.g. the filter row of the data grid) the open list\r\n // floats over the page under the field (sirioFloatPanel); placed again when the options change.\r\n let stopFloating: (() => void) | null = null;\r\n afterRenderEffect(() => {\r\n const open = this.open();\r\n this.view();\r\n untracked(() => {\r\n stopFloating?.();\r\n stopFloating = null;\r\n const combobox = this.comboboxRef()?.nativeElement;\r\n const list = this.listboxRef()?.nativeElement;\r\n if (open && combobox && list && sirioInClippingBox(combobox)) {\r\n stopFloating = sirioFloatPanel(combobox, list, 8);\r\n }\r\n });\r\n });\r\n inject(DestroyRef).onDestroy(() => stopFloating?.());\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]=\"(loading() && !hasSelection() ? loadingText() : 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 [attr.aria-busy]=\"loading() || null\"\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 <wm-sirio-pending [active]=\"loading()\" [label]=\"loadingText()\" />\r\n <ng-container *ngTemplateOutlet=\"listbox\" />\r\n </div>\r\n @if (clearable()) {\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 }\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]=\"ariaLabel() ? ariaLabelId() : label() ? labelId() : null\"\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 [attr.aria-busy]=\"loading() || null\"\r\n (click)=\"toggle()\"\r\n (keydown)=\"onKeydown($event)\"\r\n (blur)=\"onBlur()\"\r\n >\r\n <span [id]=\"valueId()\">{{ displayText() || (loading() ? loadingText() : placeholder()) }}</span>\r\n </button>\r\n <wm-sirio-pending [active]=\"loading()\" [label]=\"loadingText()\" />\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 @if (item.isLoading) {\r\n <wm-sirio-pending placement=\"inline\" [active]=\"true\" label=\"\" />\r\n }\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 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","/**\n * Keyboard navigation of the data grid (ARIA \"grid\" pattern, as ag-grid): the grid is one tab stop,\n * entered on the first column header, the arrows move between the cells, Tab leaves the grid. A\n * cell with controls (buttons, check boxes, fields of a cell template) passes the focus to them:\n * each control is a stop of the row.\n * The filter row is not part of it: its fields keep their own tab stops (they use the arrows). With a\n * filter row the grid has two stops, the headers and the body, so that Tab goes from the filters to the\n * rows instead of leaving the grid; the arrows still move over the whole table.\n * @internal\n */\n\n/** Elements of a cell reached by the navigation (whatever their tab index, the grid sets it). */\nconst NAV_CONTENT =\n 'a[href], button:not([disabled]), input:not([disabled]):not([type=\"hidden\"]), select:not([disabled]), ' +\n 'textarea:not([disabled]), [contenteditable=\"true\"]';\n\n/** Controls that use the arrows themselves (text caret, options): the grid leaves them the keys. */\nconst OWN_ARROWS =\n 'input:not([type=\"checkbox\"]):not([type=\"radio\"]):not([type=\"button\"]), textarea, select, ' +\n '[contenteditable=\"true\"], [role=\"combobox\"], [role=\"listbox\"]';\n\nconst FILTER_ROW = 'wm-sirio-grid-filter-row';\n\n/** Rendered (not in a hidden or display: none box); true where the browser cannot tell. */\nfunction visible(element: HTMLElement): boolean {\n return typeof element.checkVisibility === 'function' ? element.checkVisibility() : !element.closest('[hidden]');\n}\n\ninterface Stop {\n element: HTMLElement;\n row: number;\n cell: number;\n /** Position among the stops of its cell. */\n inCell: number;\n}\n\n/** Part of the table with its own tab stop: the whole table, or headers and body with a filter row. */\ntype Section = 'all' | 'head' | 'body';\n\nexport class SirioGridKeyboard {\n /** Element with tab index 0 of each section. */\n private readonly active = new Map<Section, HTMLElement>();\n /** The table has a filter row: headers and body are separate tab stops. */\n private split = false;\n private stops: Stop[] = [];\n private byElement = new Map<HTMLElement, Stop>();\n private rows: Stop[][] = [];\n /** Tab index of the elements before the grid managed them (null: no attribute). */\n private readonly original = new Map<HTMLElement, string | null>();\n private observer: MutationObserver | null = null;\n private pending = false;\n\n constructor(private readonly table: HTMLTableElement) {}\n\n start(): void {\n if (this.observer || typeof MutationObserver === 'undefined') {\n return;\n }\n this.table.addEventListener('keydown', this.onKeydown);\n this.table.addEventListener('focusin', this.onFocusin);\n this.observer = new MutationObserver(() => this.schedule());\n this.observer.observe(this.table, { childList: true, subtree: true, attributes: true, attributeFilter: ['disabled'] });\n this.sync();\n }\n\n stop(): void {\n if (!this.observer) {\n return;\n }\n this.observer.disconnect();\n this.observer = null;\n this.table.removeEventListener('keydown', this.onKeydown);\n this.table.removeEventListener('focusin', this.onFocusin);\n for (const [element, value] of this.original) {\n if (value === null) {\n element.removeAttribute('tabindex');\n } else {\n element.setAttribute('tabindex', value);\n }\n }\n this.original.clear();\n this.active.clear();\n }\n\n /** Recomputes the stops after a change of the rows or cells (sort, page, filters, templates). */\n private schedule(): void {\n if (!this.pending) {\n this.pending = true;\n queueMicrotask(() => {\n this.pending = false;\n if (this.observer) {\n this.sync();\n }\n });\n }\n }\n\n private sync(): void {\n this.collect();\n const filterRow = this.table.querySelector<HTMLElement>(`tr.${FILTER_ROW}`);\n const split = !!filterRow && visible(filterRow);\n if (split !== this.split) {\n this.split = split;\n this.active.clear();\n }\n const sections: Section[] = split ? ['head', 'body'] : ['all'];\n const actives = new Set<HTMLElement>();\n for (const section of sections) {\n let element = this.active.get(section);\n if (!element || !this.byElement.has(element)) {\n element = this.entry(section);\n if (element) {\n this.active.set(section, element);\n } else {\n this.active.delete(section);\n }\n }\n if (element) {\n actives.add(element);\n }\n }\n for (const { element } of this.stops) {\n this.setTabIndex(element, actives.has(element) ? '0' : '-1');\n }\n // Elements that are no longer stops (e.g. a button disabled) get their own tab index back.\n for (const [element, value] of this.original) {\n if (!this.byElement.has(element)) {\n if (value === null) {\n element.removeAttribute('tabindex');\n } else {\n element.setAttribute('tabindex', value);\n }\n this.original.delete(element);\n }\n }\n }\n\n private collect(): void {\n this.stops = [];\n this.byElement.clear();\n this.rows = [];\n const rows = Array.from(this.table.rows).filter(\n (row) => !row.classList.contains(FILTER_ROW) && row.parentElement?.tagName !== 'TFOOT',\n );\n rows.forEach((row, r) => {\n const stops: Stop[] = [];\n Array.from(row.cells).forEach((cell, c) => {\n const content = Array.from(cell.querySelectorAll<HTMLElement>(NAV_CONTENT)).filter(visible);\n // Header cells are stops themselves (sort, reading), body cells only without controls.\n const elements = cell.tagName === 'TH' || !content.length ? [cell, ...(cell.tagName === 'TH' ? content : [])] : content;\n elements.forEach((element, i) => stops.push({ element, row: r, cell: c, inCell: i }));\n });\n stops.forEach((stop) => this.byElement.set(stop.element, stop));\n this.stops.push(...stops);\n this.rows.push(stops);\n });\n }\n\n /**\n * First stop of a section: as ag-grid, the grid is entered on the first column header (sort and\n * filters at hand, the rows below with ArrowDown), the last header row, not the group headers above\n * it; the body on its first cell.\n */\n private entry(section: Section): HTMLElement | undefined {\n const inHead = (row: Stop[]) => !!row[0].element.closest('thead');\n const header = [...this.rows].reverse().find((row) => row.length && inHead(row));\n const body = this.rows.find((row) => row.length && !inHead(row));\n const row = section === 'head' ? header : section === 'body' ? body : (header ?? body);\n return row?.[0]?.element;\n }\n\n private sectionOf(element: HTMLElement): Section {\n return this.split ? (element.closest('thead') ? 'head' : 'body') : 'all';\n }\n\n private setTabIndex(element: HTMLElement, value: string): void {\n if (!this.original.has(element)) {\n this.original.set(element, element.getAttribute('tabindex'));\n }\n if (element.getAttribute('tabindex') !== value) {\n element.setAttribute('tabindex', value);\n }\n }\n\n private readonly onFocusin = (event: FocusEvent): void => {\n const element = event.target as HTMLElement;\n if (this.byElement.has(element) && element !== this.active.get(this.sectionOf(element))) {\n this.moveActive(element);\n }\n };\n\n private readonly onKeydown = (event: KeyboardEvent): void => {\n const element = event.target as HTMLElement;\n const stop = this.byElement.get(element);\n const horizontal = event.key === 'ArrowLeft' || event.key === 'ArrowRight';\n if (stop && horizontal && event.altKey && !event.defaultPrevented && element.closest('thead')) {\n // Alt+Left is \"back\" in the browsers: never on a header (resize there, as ag-grid).\n event.preventDefault();\n return;\n }\n // Shift / Alt + arrows belong to the headers (move and resize the columns).\n if (!stop || event.defaultPrevented || event.altKey || event.metaKey || (event.shiftKey && event.key.startsWith('Arrow')) || element.matches(OWN_ARROWS)) {\n return;\n }\n const row = this.rows[stop.row];\n let target: Stop | undefined;\n switch (event.key) {\n case 'ArrowRight':\n target = row[row.indexOf(stop) + 1];\n break;\n case 'ArrowLeft':\n target = row[row.indexOf(stop) - 1];\n break;\n case 'ArrowDown':\n target = this.vertical(stop, 1);\n break;\n case 'ArrowUp':\n target = this.vertical(stop, -1);\n break;\n case 'Home':\n target = event.ctrlKey ? this.rows.find((r) => r.length)?.[0] : row[0];\n break;\n case 'End':\n target = event.ctrlKey ? [...this.rows].reverse().find((r) => r.length)?.at(-1) : row.at(-1);\n break;\n default:\n return;\n }\n event.preventDefault();\n if (target) {\n this.moveActive(target.element);\n target.element.focus();\n }\n };\n\n /** Stop of the same column in the next row with stops (a cell spanning more columns included). */\n private vertical(stop: Stop, step: number): Stop | undefined {\n for (let r = stop.row + step; r >= 0 && r < this.rows.length; r += step) {\n const row = this.rows[r];\n if (!row.length) {\n continue;\n }\n const lastCell = row[row.length - 1].cell;\n const cell = Math.min(stop.cell, lastCell);\n const inCell = row.filter((s) => s.cell === cell);\n if (inCell.length) {\n return inCell[Math.min(stop.inCell, inCell.length - 1)];\n }\n return row.find((s) => s.cell > cell) ?? row[row.length - 1];\n }\n return undefined;\n }\n\n private moveActive(element: HTMLElement): void {\n const section = this.sectionOf(element);\n const previous = this.active.get(section);\n if (previous && this.byElement.has(previous)) {\n this.setTabIndex(previous, '-1');\n }\n this.active.set(section, element);\n this.setTabIndex(element, '0');\n }\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n afterNextRender,\n afterRenderEffect,\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n contentChildren,\n DestroyRef,\n Directive,\n DOCUMENT,\n effect,\n ElementRef,\n inject,\n Injector,\n input,\n LOCALE_ID,\n model,\n numberAttribute,\n output,\n signal,\n TemplateRef,\n untracked,\n viewChild,\n} from '@angular/core';\nimport { AbstractControl, FormArray, FormGroup, FormsModule } from '@angular/forms';\nimport {\n aggregationFn_count,\n aggregationFn_max,\n aggregationFn_mean,\n aggregationFn_min,\n aggregationFn_sum,\n ColumnDef,\n columnFacetingFeature,\n columnFilteringFeature,\n ColumnFiltersState,\n columnGroupingFeature,\n columnOrderingFeature,\n columnSizingFeature,\n createExpandedRowModel,\n createFacetedRowModel,\n createFacetedUniqueValues,\n createFilteredRowModel,\n createGroupedRowModel,\n createPaginatedRowModel,\n createSortedRowModel,\n ExpandedState,\n functionalUpdate,\n injectTable,\n Row,\n rowAggregationFeature,\n rowExpandingFeature,\n rowPaginationFeature,\n rowSortingFeature,\n SortingState,\n tableFeatures,\n Updater,\n} from '@tanstack/angular-table';\nimport { filter as rxFilter, firstValueFrom, isObservable, lastValueFrom, Observable, Subscription } from 'rxjs';\nimport { SirioButton } from '../button/sirio-button';\nimport { sirioUniqueId } from '../core/sirio-control-base';\nimport { resolveSirioErrorMessage, SIRIO_ERROR_MESSAGES, SirioErrorMessages } from '../core/sirio-error-messages';\nimport { SirioOption } from '../core/sirio-option';\nimport { SirioDialog, SirioDialogFooter, SirioDialogSize } from '../dialog/sirio-dialog';\nimport { SirioDialogService } from '../dialog/sirio-dialog.service';\nimport { SirioAlert } from '../notification/sirio-alert';\nimport { SirioDate } from '../date/sirio-date';\nimport { SirioFilterChip, SirioFilterChips } from '../filter/sirio-filter';\nimport { SirioNumber } from '../number/sirio-number';\nimport { SirioPagination, SirioPaginationVariant } from '../pagination/sirio-pagination';\nimport { SirioPendingIndicator } from '../pending/sirio-pending';\nimport { SirioSelect } from '../select/sirio-select';\nimport { SirioTextbox } from '../textbox/sirio-textbox';\nimport { SirioPopover } from '../tooltip/sirio-tooltip';\nimport {\n SirioGridDataSource,\n SirioGridExpanded,\n SirioGridFilterCondition,\n SirioGridFilterOperator,\n SirioGridFilters,\n SirioGridFixed,\n SirioGridQuery,\n SirioGridRange,\n SirioGridResult,\n SirioGridRowEvent,\n SirioGridRowClass,\n SirioGridRowId,\n SirioGridRowStyle,\n SirioGridSelectAll,\n SirioGridSelection,\n sirioGridClassText,\n sirioGridStyleObject,\n SirioGridSize,\n SirioGridSort,\n SirioGridSortMode,\n SirioGridState,\n SirioGridSubRows,\n SirioGridVariant,\n sirioActiveGridFilters,\n sirioDefaultGridCompare,\n sirioGridFilterActive,\n sirioIsFilterCondition,\n sirioReadPath,\n} from './sirio-data-grid-types';\nimport {\n SirioGridCell,\n SirioGridColumn,\n SirioGridDetail,\n SirioGridEmpty,\n SirioGridError,\n SirioGridHeader,\n} from './sirio-grid-column';\nimport { sirioGridMapOptions } from './sirio-grid-formats';\nimport { SirioGridKeyboard } from './sirio-grid-keyboard';\nimport {\n SIRIO_GRID_ARRAY_MESSAGES,\n SirioGridChangeHandler,\n SirioGridEditor,\n SirioGridEditorContext,\n SirioGridRowDeleteEvent,\n SirioGridRowFactory,\n SirioGridRowSaveEvent,\n sirioCloneControl,\n sirioSyncControl,\n} from './sirio-grid-form-array';\n\n/** Breakpoint of the kit card layout (`.sirio-table-card`). */\nconst CARD_QUERY = 'screen and (max-width: 768px)';\n\n/** Width (px) of the selection and expand columns in the resized (fixed) layout. */\nconst TOOL_COLUMN_WIDTH = 48;\n/**\n * Width the collapsed borders add to the table (half of the outer cell borders of the kit, 1px):\n * kept out of the flex columns so the table fits the container without a horizontal scrollbar.\n */\nconst COLLAPSED_BORDERS_WIDTH = 1;\n/**\n * The fixed blocks stick 1px past the edge of the scroll container (under its border): with a\n * fractional position (browser zoom, container width) the edge of the sticky cells and the clip of\n * the container are rounded differently, and the scrolled content showed in the gap between them.\n */\nconst PIN_OVERHANG = 1;\n/** Width (px) of the row number column in the resized (fixed) layout. */\nconst ROW_NUMBER_WIDTH = 64;\n/** Step (px) of the keyboard resizing. */\nconst RESIZE_STEP = 16;\n/** Indentation (px) of a tree / group level. */\nconst LEVEL_INDENT = 24;\n\n/**\n * TanStack Table features of the grid: filtering (with faceted values), grouping with\n * aggregation, sorting, expanding (detail rows, tree data, groups), pagination, column ordering\n * and sizing.\n */\nconst GRID_FEATURES = tableFeatures({\n columnFilteringFeature,\n filteredRowModel: createFilteredRowModel(),\n columnFacetingFeature,\n facetedRowModel: createFacetedRowModel(),\n facetedUniqueValues: createFacetedUniqueValues(),\n columnGroupingFeature,\n groupedRowModel: createGroupedRowModel(),\n rowAggregationFeature,\n aggregationFns: {\n sum: aggregationFn_sum,\n mean: aggregationFn_mean,\n min: aggregationFn_min,\n max: aggregationFn_max,\n count: aggregationFn_count,\n },\n rowSortingFeature,\n sortedRowModel: createSortedRowModel(),\n rowExpandingFeature,\n expandedRowModel: createExpandedRowModel(),\n rowPaginationFeature,\n paginatedRowModel: createPaginatedRowModel(),\n columnOrderingFeature,\n columnSizingFeature,\n});\ntype GridFeatures = typeof GRID_FEATURES;\n/** A row of the TanStack row model (data row, sub-row or group row). */\nexport type SirioGridRow<T extends object = any> = Row<GridFeatures, T>;\n\n/** Stable empty data (a new [] on every options run would rebuild the row models). */\nconst NO_ROWS: never[] = [];\n\n\n/** Italian labels of the filter operators (`filterOperatorLabels` overrides them). */\nconst OPERATOR_LABELS: Record<SirioGridFilterOperator, string> = {\n contains: 'Contiene',\n notContains: 'Non contiene',\n equals: 'Uguale a',\n notEquals: 'Diverso da',\n startsWith: 'Inizia con',\n endsWith: 'Finisce con',\n greaterThan: 'Maggiore di',\n greaterThanOrEqual: 'Maggiore o uguale a',\n lessThan: 'Minore di',\n lessThanOrEqual: 'Minore o uguale a',\n between: 'Compreso tra',\n before: 'Prima del',\n after: 'Dopo il',\n in: 'È uno di',\n notIn: 'Non è uno di',\n blank: 'Vuoto',\n notBlank: 'Non vuoto',\n};\n\n/** Deep copy of a JSON value (the state must not share objects with the grid models). */\nfunction structuredCloneSafe<V>(value: V): V {\n return JSON.parse(JSON.stringify(value)) as V;\n}\n\n/** Deep copy of a row value for `rowFactory` (dates kept as `Date`). */\nfunction structuredCloneSafeValue<V>(value: V): V {\n return typeof structuredClone === 'function' ? structuredClone(value) : value;\n}\n\n/** Disabled controls of `source` disabled in `target` too (same structure). */\nfunction copyDisabledState(source: AbstractControl, target: AbstractControl): void {\n if (source.disabled) {\n target.disable({ emitEvent: false });\n return;\n }\n if (source instanceof FormGroup && target instanceof FormGroup) {\n for (const [name, child] of Object.entries(source.controls)) {\n const other = target.controls[name];\n if (other) {\n copyDisabledState(child, other);\n }\n }\n } else if (source instanceof FormArray && target instanceof FormArray) {\n source.controls.forEach((child, i) => {\n const other = target.at(i);\n if (other) {\n copyDisabledState(child, other);\n }\n });\n }\n}\n\n/** Result of a change handler: a value, a promise or an observable (its last value). */\nasync function runHandler(result: boolean | void | Promise<boolean | void> | Observable<boolean | void>): Promise<boolean | void> {\n if (isObservable(result)) {\n return lastValueFrom(result, { defaultValue: undefined });\n }\n return result;\n}\n\n/** Message of a failed save: a text or the message of an Error (none for other values). */\nfunction errorText(error: unknown): string | null {\n if (typeof error === 'string' && error.trim()) {\n return error;\n }\n if (error instanceof Error && error.message) {\n return error.message;\n }\n return null;\n}\n\n/**\n * A background color of a row / cell style goes in a custom property, applied to the cells by the\n * grid CSS over the kit stripes (`!important`) and the white of the fixed cells.\n */\nfunction withBackground(\n cls: string,\n style: Record<string, string> | null,\n kind: 'row' | 'cell',\n): { cls: string; style: Record<string, string> | null } {\n const background = style?.['background-color'] ?? style?.['background'];\n if (!style || !background) {\n return { cls, style };\n }\n return {\n cls: `${cls ? cls + ' ' : ''}wm-sirio-grid-${kind}-bg`,\n style: { ...style, [`--wm-grid-${kind}-bg`]: background },\n };\n}\n\n/** Same value (by JSON), for filters and sort criteria. */\nfunction sameJson(a: unknown, b: unknown): boolean {\n return JSON.stringify(a ?? null) === JSON.stringify(b ?? null);\n}\n\n/** Default accessible label of the selection box of a row (shared: same default for every grid). */\nconst defaultRowLabel = (_row: unknown, index: number) => `Seleziona la riga ${index + 1}`;\n/** Default name of a row in the expand button labels. */\nconst defaultRowName = (_row: unknown, index: number) => `la riga ${index + 1}`;\n/** Default announcement of a moved column. */\nconst defaultColumnMoved = (header: string, position: number, total: number) =>\n `Colonna ${header} spostata in posizione ${position} di ${total}`;\n\n/** Drop position while dragging a header. */\ninterface DropTarget {\n id: string;\n side: 'before' | 'after';\n}\n\n/** Keys of the service cells (selection, expand, row number) for the fixed columns. */\nconst SELECT_KEY = '__select';\nconst EXPAND_KEY = '__expand';\nconst ROWNUM_KEY = '__rownum';\nconst ACTIONS_KEY = '__actions';\n/** Actions column of a `[formArray]` grid in the resized (fixed) layout: cell padding, kit small icon button, gap. */\nconst ACTIONS_PADDING = 32;\nconst ACTION_BUTTON_WIDTH = 26;\nconst ACTION_GAP = 4;\n/** Width (px) of the error icon of a row with errors. */\nconst ACTION_ICON_WIDTH = 16;\n\n/** Total of the server rows (see `nextServerTotal`). */\ninterface ServerTotal {\n /** Query without the page (sort, filters, page size). */\n key: string;\n total: number;\n /** The last row is known (given by the server or reached with a shorter page). */\n exact: boolean;\n /** Given by the server in the response. */\n given: boolean;\n}\n\n/** Edit dialog of a `[formArray]` grid: the copy being edited and the row it comes from. */\ninterface EditSession<T extends object> {\n context: SirioGridEditorContext<T>;\n /** Group of the form array (null for a new row). */\n original: FormGroup | null;\n}\n\n/**\n * A cell of the grouped headers: a group header (over `colspan` adjacent columns of the same block)\n * or a column header (with `rowspan` below a shorter group path).\n */\ntype HeaderCell<T extends object> =\n | {\n kind: 'group';\n track: string;\n label: string;\n colspan: number;\n /** First and last column ids, for the fixed position. */\n pin: readonly [string, string];\n }\n | { kind: 'column'; track: string; column: SirioGridColumn<T>; rowspan: number };\n\n/**\n * Cell of a fixed column (header and body): sticky position at the offset measured by the grid,\n * with the separator / scroll marker on the edge of the fixed block. A group header passes the\n * first and last column ids it spans.\n * @internal\n */\n@Directive({\n selector: '[wmSirioGridPin]',\n host: {\n '[class.wm-sirio-grid-pin]': 'side() !== null',\n '[class.wm-sirio-grid-pin-l]': \"side() === 'left'\",\n '[class.wm-sirio-grid-pin-r]': \"side() === 'right'\",\n '[class.wm-sirio-grid-pin-edge-left]': \"edge() === 'left'\",\n '[class.wm-sirio-grid-pin-edge-right]': \"edge() === 'right'\",\n '[style.left.px]': \"side() === 'left' ? offset() : null\",\n '[style.right.px]': \"side() === 'right' ? offset() : null\",\n '[attr.data-pin-key]': 'side() ? measureKey() : null',\n },\n})\nexport class SirioGridPinCell {\n readonly key = input.required<string | readonly [string, string]>({ alias: 'wmSirioGridPin' });\n private readonly grid = inject(SirioDataGrid);\n private readonly first = computed(() => (typeof this.key() === 'string' ? (this.key() as string) : this.key()[0]));\n private readonly last = computed(() => (typeof this.key() === 'string' ? (this.key() as string) : this.key()[1]));\n /** Only single cells are measured (a group header spans more columns). */\n protected readonly measureKey = computed(() => (typeof this.key() === 'string' ? (this.key() as string) : null));\n protected readonly side = computed(() => this.grid.pinSideOf(this.first()));\n /** Left block: offset of the first column; right block: offset of the last one (see PIN_OVERHANG). */\n protected readonly offset = computed(\n () => (this.grid.pinOffsets()[this.side() === 'right' ? this.last() : this.first()] ?? 0) - PIN_OVERHANG,\n );\n protected readonly edge = computed(() => {\n const side = this.side();\n const edge = side === 'right' ? this.grid.pinEdgeOf(this.first()) : this.grid.pinEdgeOf(this.last());\n return edge === side ? edge : null;\n });\n}\n\n/**\n * Data grid based on the Sirio web kit table (\"Tabelle\"): `table.sirio-table` with the kit\n * variants (`sirio-table-dark`, `sirio-table-light`), densities (`sirio-table-xs/sm/lg`), sortable\n * headers (`.sirio-sorting`, `-asc`, `-desc`), selection checkboxes (`.sirio-table-check`), the\n * responsive container (`.sirio-table-responsive` with the `overflow-start/end` scroll markers),\n * fixed header / first column / last column and the card layout for small screens\n * (`.sirio-table-card` with `data-label`), followed by `wm-sirio-pagination`.\n *\n * Data processing is done by TanStack Table (`@tanstack/angular-table`, `injectTable`): column\n * filters (with the values present in the column for the select filters), sorting on one or more\n * columns, grouping with aggregations, expanding (detail panel, tree data, groups), pagination,\n * column order and widths. With a server data source filtering, sorting and pagination run in\n * manual mode (the page is shown as received) and grouping is not available.\n *\n * Columns are declared with `wm-sirio-grid-column` (optional `wmSirioGridCell` / `wmSirioGridHeader`\n * templates); `wmSirioGridDetail` adds expandable detail rows.\n *\n * ```html\n * <wm-sirio-data-grid [data]=\"pratiche\" rowId=\"id\" selection=\"multiple\" [(selected)]=\"scelte\">\n * <wm-sirio-grid-column field=\"numero\" header=\"Numero\" sortable />\n * <wm-sirio-grid-column field=\"importo\" header=\"Importo\" align=\"end\" [format]=\"euro\" sortable />\n * </wm-sirio-data-grid>\n * ```\n */\n@Component({\n selector: 'wm-sirio-data-grid',\n imports: [\n NgTemplateOutlet,\n FormsModule,\n SirioPagination,\n SirioPendingIndicator,\n SirioButton,\n SirioPopover,\n SirioFilterChips,\n SirioTextbox,\n SirioNumber,\n SirioDate,\n SirioSelect,\n SirioGridPinCell,\n SirioDialog,\n SirioDialogFooter,\n SirioAlert,\n ],\n host: {\n '[class.wm-sirio-grid-sized]': 'sized()',\n '[style.height]': 'height()',\n '[style.min-height]': 'minHeight()',\n '[style.max-height]': 'maxHeight()',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n styleUrls: ['./sirio-data-grid.scss', './sirio-data-grid-filters.scss', './sirio-data-grid-focus.scss'],\n templateUrl: './sirio-data-grid.html',\n})\nexport class SirioDataGrid<T extends object = any> {\n private readonly document = inject(DOCUMENT);\n private readonly injector = inject(Injector);\n\n // ---- Data -----------------------------------------------------------------------------------\n\n /** Rows in memory: filtered, sorted, grouped and paged by the grid. Ignored with `dataSource`. */\n readonly data = input<readonly T[] | null>(null);\n /** Server side data source (see `SirioGridDataSource`); takes precedence over `data`. */\n readonly dataSource = input<SirioGridDataSource<T> | null>(null);\n /** Identity of a row (property name or function) for tracking and selection; null = the object. */\n readonly rowId = input<SirioGridRowId<T>>(null);\n /** Sub-rows of a row (tree data): property name or function; the rows get an expand button. */\n readonly subRows = input<SirioGridSubRows<T> | null>(null);\n /** External loading flag (e.g. while the page fetches `data`); the data source sets its own. */\n readonly loading = input(false, { transform: booleanAttribute });\n\n // ---- Form array -------------------------------------------------------------------------------\n\n /**\n * Rows from a form array, one form group per row (instead of `data`; ignored with `dataSource`).\n * The grid shows `getRawValue()` of each group and follows the changes of the array; rows are\n * edited in a dialog (`wmSirioGridEditor`), added (`addable`) and removed (`deletable`).\n */\n readonly formArray = input<FormArray | null>(null);\n /**\n * Form group of a row with its validators: for a new row (null or the initial values) and for the\n * copy edited in the dialog. Without it existing rows are edited on a generic copy of their group\n * (same controls, values and validators) and new rows cannot be added.\n */\n readonly rowFactory = input<SirioGridRowFactory<T> | null>(null);\n /** \"Aggiungi\" button: a new row edited in the dialog, added at the end (needs `rowFactory`). */\n readonly addable = input(false, { transform: booleanAttribute });\n /** \"Elimina\" button on the rows (and \"Elimina selezionati\" with multiple selection). */\n readonly deletable = input(false, { transform: booleanAttribute });\n /** Rows that can be changed (the others open the dialog read-only); null = every row. */\n readonly rowEditable = input<((row: T) => boolean) | null>(null);\n /** Rows that can be removed; null = every row. */\n readonly rowDeletable = input<((row: T) => boolean) | null>(null);\n /** A double click on a row opens the dialog. */\n readonly editOnDoubleClick = input(true, { transform: booleanAttribute });\n /** Confirmation dialog before removing rows. */\n readonly confirmDelete = input(true, { transform: booleanAttribute });\n /** Check before applying a save (e.g. a call to the server): see `SirioGridChangeHandler`. */\n readonly saveHandler = input<SirioGridChangeHandler<SirioGridRowSaveEvent<T>> | null>(null);\n /** Check before removing a row: see `SirioGridChangeHandler`. */\n readonly deleteHandler = input<SirioGridChangeHandler<SirioGridRowDeleteEvent<T>> | null>(null);\n /** Size of the edit dialog (kit `sirio-dialog-sm/lg/xl`). */\n readonly editorSize = input<SirioDialogSize>('default');\n /** Messages of the form array errors under the grid (over the global and the grid defaults). */\n readonly errorMessages = input<SirioErrorMessages | null>(null);\n\n // ---- Sort, paging, selection, filters, grouping, expansion ------------------------------------\n\n /** Sort criteria in priority order (two-way: `[(sort)]`); empty = original order. */\n readonly sort = model<SirioGridSort[]>([]);\n /** `multiple`: Shift+click (or Shift+Enter) on a header adds it to the sort. */\n readonly sortMode = input<SirioGridSortMode>('single');\n /** Shows `wm-sirio-pagination` and pages the rows; false shows every row. */\n readonly pageable = input(true, { transform: booleanAttribute });\n /** Current page, 1-based (two-way: `[(page)]`). */\n readonly page = model(1);\n /** Rows per page (two-way: `[(pageSize)]`); with groups or tree data the top level rows count. */\n readonly pageSize = model(10);\n readonly pageSizeOptions = input<number[]>([10, 20, 30]);\n /**\n * Layout of the pagination (`wm-sirio-pagination variant`): `full` (elements per page, range,\n * page select, previous/next) or `numbers` (page numbers with ellipsis).\n */\n readonly paginationVariant = input<SirioPaginationVariant>('full');\n /** Pages shown on each side of the current one with `paginationVariant=\"numbers\"`. */\n readonly paginationSiblings = input(1, { transform: (v: unknown) => Math.max(0, numberAttribute(v, 1)) });\n /** \"Elementi per pagina\" block (select + range) of the `full` pagination. */\n readonly paginationShowItems = input(true, { transform: booleanAttribute });\n readonly selection = input<SirioGridSelection>('none');\n /** Selected rows (two-way: `[(selected)]`), compared by `rowId`. */\n readonly selected = model<readonly T[]>([]);\n /** Column filters by filter key (two-way: `[(filters)]`), see `SirioGridFilterType`. */\n readonly filters = model<SirioGridFilters>({});\n /** Delay (ms) before a typed text filter is applied; the other filters apply at once. */\n readonly filterDebounce = input(300, { transform: (v: unknown) => Math.max(0, Number(v) || 0) });\n /**\n * Filters with operators on every column with a filter (a \"Condizione\" choice: contiene, uguale\n * a, maggiore di, compreso tra, vuoto, ...): the filter values become `SirioGridFilterCondition`.\n * A column can override it with its own `filterOperators`.\n */\n readonly filterOperators = input(false, { transform: booleanAttribute });\n /** Active filters as kit chips above the table (each one removable). */\n readonly showFilterChips = input(true, { transform: booleanAttribute });\n /**\n * Filter buttons of the headers: `always` visible (default), `hover` (as ag-grid: shown on mouse\n * over, with the keyboard focus or when the filter is active; the space stays reserved) or `none`\n * (no filter controls in the grid, card panel included: the filters are set from code, e.g.\n * `[(filters)]` or `setFilter`, as the ag-grid columns with a filter and no floating filter).\n */\n readonly filterButton = input<'always' | 'hover' | 'none'>('always');\n /**\n * Row of filters under the column headers (as the floating filters of ag-grid): a field for the\n * simple condition of each filterable column, the filter button for the others. The filter chips\n * are not shown; in the card layout the \"Filtri\" panel stays.\n */\n readonly filterRow = input(false, { transform: booleanAttribute });\n /** Keys of the columns the rows are grouped by, in order (two-way: `[(grouping)]`). */\n readonly grouping = model<string[]>([]);\n /** Expanded rows (two-way: `[(expanded)]`): detail rows, tree rows and groups. */\n readonly expanded = model<SirioGridExpanded>({});\n /** With `wmSirioGridDetail`: which rows have a detail (default every data row). */\n readonly rowExpandable = input<((row: T) => boolean) | null>(null);\n /**\n * Row number column at the start (after selection and expand columns): continuous across pages,\n * in the current filter and sort order; group rows have no number, tree rows are numbered by\n * level (1, 1.1, 1.2). It is the row header (`role=\"rowheader\"`) for screen readers.\n */\n readonly rowNumbers = input(false, { transform: booleanAttribute });\n /** A click on the row (outside links, buttons and fields) also selects it. */\n readonly selectOnRowClick = input(false, { transform: booleanAttribute });\n /**\n * Column of the selection checkboxes / radios (with \"select all\" in multiple mode). False: no\n * column, the rows are selected with a click (multiple: each click toggles the row, no Ctrl or\n * Shift needed) or with Space / Enter on the focused row.\n */\n readonly selectionColumn = input(true, { transform: booleanAttribute });\n /**\n * Keyboard navigation as ag-grid (ARIA grid): the grid is one tab stop (entered on the first\n * column header, then the last cell visited), the arrows move between\n * headers and cells (Home / End: start and end of the row, Ctrl+Home / Ctrl+End: first and last\n * cell), Tab leaves the grid. A cell with buttons or fields passes the focus to them (e.g. the\n * actions, one stop each). Space / Enter on a cell selects its row when the rows are selected\n * without the checkbox column. The fields of the filter row keep their own tab stops.\n * False: a plain table, only the interactive headers and the controls are tab stops.\n */\n readonly keyboardNavigation = input(true, { transform: booleanAttribute });\n /** Navigation active (not in the card layout of small screens). */\n protected readonly navigation = computed(() => this.keyboardNavigation() && !this.cardMode());\n /**\n * Role of the cells of the filter row: data cells, not column headers (an empty header was announced\n * as a header without name, and the body cells must keep the titles of the first row as headers).\n */\n protected readonly filterCellRole = computed(() => (this.gridRole() ? 'gridcell' : 'cell'));\n /** ARIA role of the table with the navigation: grid, treegrid with tree or grouped rows (aria-level). */\n protected readonly gridRole = computed(() =>\n this.navigation() ? (this.treeMode() || this.activeGrouping().length > 0 ? 'treegrid' : 'grid') : null,\n );\n /**\n * Which rows can be selected (as `isRowSelectable` of ag-grid); null = every row. The other rows\n * have a disabled box (hidden with `hideUnselectable`), are skipped by \"select all\" and by the\n * click / keyboard selection. Rows already in `selected` stay selected.\n */\n readonly rowSelectable = input<((row: T) => boolean) | null>(null);\n /** The selection box of the rows that cannot be selected is hidden instead of disabled. */\n readonly hideUnselectable = input(false, { transform: booleanAttribute });\n /**\n * Rows taken by \"seleziona tutto\" (multiple selection): `page` (default) the current page,\n * `filtered` every row that passes the filters over all the pages (ag-grid `selectAll: 'filtered'`),\n * `all` every row. With a server data source it is always the loaded page.\n */\n readonly selectAll = input<SirioGridSelectAll>('page');\n /**\n * Classes of the data rows: text, list or object `{ classe: condizione }`, or a function of the row\n * and of its index in the page (e.g. `(row) => ({ 'riga-scaduta': row.scaduta })`).\n */\n readonly rowClass = input<SirioGridRowClass<T>>(null);\n /**\n * Inline styles of the data rows: CSS text or object, or a function of the row and of its index.\n * A background color is applied to the cells (over the stripes and the fixed cells; the\n * selection still shows).\n */\n readonly rowStyle = input<SirioGridRowStyle<T>>(null);\n\n // ---- Columns ----------------------------------------------------------------------------------\n\n /** The column widths can be changed by dragging the right edge of the headers (or with the keyboard). */\n readonly resizable = input(false, { transform: booleanAttribute });\n /** The columns can be moved by dragging the headers (or with Alt+arrows on a header). */\n readonly reorderable = input(false, { transform: booleanAttribute });\n /** Widths in pixels by column key (two-way: `[(columnWidths)]`); empty = automatic layout. */\n readonly columnWidths = model<Record<string, number>>({});\n /** Column keys in display order (two-way: `[(columnOrder)]`); empty = declaration order. */\n readonly columnOrder = model<string[]>([]);\n\n // ---- Look -------------------------------------------------------------------------------------\n\n readonly variant = input<SirioGridVariant>('default');\n readonly size = input<SirioGridSize>('md');\n /** Horizontal scroll container of the kit with the scroll markers. */\n readonly responsive = input(true, { transform: booleanAttribute });\n /**\n * Header fixed while the rows scroll (kit `sirio-table-th-fixed`). Without `height` /\n * `maxHeight` the rows area takes the kit height (450px).\n */\n readonly stickyHeader = input(false, { transform: booleanAttribute });\n /**\n * First data column fixed during the horizontal scroll (with the selection, expand and row number\n * columns before it), like the kit `sirio-table-column-fixed-first`. Shortcut of `fixed=\"left\"`\n * on the first column; ignored when a column is already fixed at the left.\n */\n readonly fixedFirstColumn = input(false, { transform: booleanAttribute });\n /**\n * Last column (e.g. actions) fixed during the horizontal scroll, like the kit\n * `sirio-table-action-fixed`. Shortcut of `fixed=\"right\"` on the last column; ignored when a\n * column is already fixed at the right.\n */\n readonly fixedLastColumn = input(false, { transform: booleanAttribute });\n /**\n * Height of the grid (CSS, as `style.height`: `400px`, `50vh`); null (default) = the height of\n * the content, every row shown. The rows scroll inside, the header stays visible; toolbar,\n * filter chips and pagination stay out of the scroll area.\n */\n readonly height = input<string | null>(null);\n /** Minimum height of the grid (CSS): with fewer rows the rows area grows, the pagination stays at the bottom. */\n readonly minHeight = input<string | null>(null);\n /** Maximum height of the grid (CSS): the grid follows its content up to this height, then the rows scroll. */\n readonly maxHeight = input<string | null>(null);\n /** A height limit is set: the rows area fills the grid and scrolls. */\n protected readonly sized = computed(() => !!(this.height() || this.maxHeight() || this.minHeight()));\n /**\n * Card layout on small screens (kit `sirio-table-card`: up to 768px wide every row becomes a\n * card and each cell shows its header as label).\n */\n readonly cardOnMobile = input(false, { transform: booleanAttribute });\n\n // ---- Texts ------------------------------------------------------------------------------------\n\n /** Caption of the table (accessible name). */\n readonly caption = input('');\n /** Shows the caption; otherwise it is visually hidden (still read by screen readers). */\n readonly captionVisible = input(false, { transform: booleanAttribute });\n readonly emptyText = input('Nessun risultato');\n readonly loadingText = input('Caricamento in corso');\n /** Message of a failed server data source (with the \"Riprova\" button); empty = no message. */\n readonly loadErrorText = input('Non è stato possibile caricare i dati.');\n readonly retryLabel = input('Riprova');\n /** Read before an open server total (no `total` in the response): \"oltre 30 risultati\". */\n readonly moreLabel = input('oltre');\n readonly resultsLabel = input('risultati');\n /** Accessible label of the \"seleziona tutto\" checkbox; null = the text of `selectAll`. */\n readonly selectAllLabel = input<string | null>(null);\n /** Screen reader hint of the rows selected without the checkbox column (`selectionColumn` false). */\n readonly selectRowHint = input('Premi Spazio per selezionare o deselezionare la riga');\n /** Accessible label of the selection box of a row. */\n /**\n * Control of the rows with single selection: `radio` (default) or `checkbox` (as ag-grid; a checked\n * box is unchecked by selecting another row or by clicking it again).\n */\n readonly singleSelectionControl = input<'radio' | 'checkbox'>('radio');\n /** Radio buttons in the selection column (single selection with `singleSelectionControl=\"radio\"`). */\n protected readonly singleRadio = computed(() => this.selection() === 'single' && this.singleSelectionControl() === 'radio');\n /** Header of the selection column with single selection (screen readers only). */\n readonly selectionHeaderLabel = input('Selezione');\n readonly selectRowLabel = input<(row: T, index: number) => string>(defaultRowLabel);\n readonly sortAscendingLabel = input('ordinamento crescente');\n readonly sortDescendingLabel = input('ordinamento decrescente');\n /** Hint of the sortable headers with `sortMode=\"multiple\"`. */\n readonly multiSortHint = input('Maiusc+clic per ordinare anche per questa colonna');\n readonly paginationAriaLabel = input('Paginazione della tabella');\n /**\n * Accessible name of the paginator: `paginationAriaLabel` followed by the `caption`, so that the\n * paginators of more grids in a page are told apart (\"Paginazione della tabella Prodotti\").\n */\n protected readonly paginationName = computed(() => {\n const caption = this.caption().trim();\n return caption ? `${this.paginationAriaLabel()} ${caption}` : this.paginationAriaLabel();\n });\n /** Prefix of the filter button and of the popover title: \"Filtra per <header>\". */\n readonly filterLabel = input('Filtra per');\n readonly filterFromLabel = input('Da');\n readonly filterToLabel = input('A');\n /** Empty choice of the select filters. */\n readonly filterAllLabel = input('Tutti');\n /**\n * Prefix of the filter button in the filter row (\"Altre condizioni per <header>\"): the field of the\n * cell is already \"Filtra per <header>\".\n */\n readonly filterMoreLabel = input('Altre condizioni per');\n readonly filterYesLabel = input('Sì');\n readonly filterNoLabel = input('No');\n /** Added to the label of the filter button when its filter is active. */\n readonly filterActiveLabel = input('filtro attivo');\n readonly clearFilterLabel = input('Rimuovi filtro');\n readonly clearFiltersLabel = input('Rimuovi tutti i filtri');\n /** Label of the operator choice of the filters with operators. */\n readonly filterConditionLabel = input('Condizione');\n /** Label of the value of a filter with operators. */\n readonly filterValueLabel = input('Valore');\n /** Joins the bounds of `between` in the filter chips (\"compreso tra 10 e 20\"). */\n readonly filterAndLabel = input('e');\n /** Labels of the filter operators, over the Italian defaults (e.g. `{ contains: 'Contains' }`). */\n readonly filterOperatorLabels = input<Partial<Record<SirioGridFilterOperator, string>>>({});\n /** Title of the filter panel of the card layout and sr-only title of the chips. */\n readonly filtersLabel = input('Filtri');\n /** Visible header of the row number column. */\n readonly rowNumberHeader = input('N.');\n /** Accessible name of the row number column. */\n readonly rowNumberLabel = input('Numero di riga');\n readonly groupByLabel = input('Raggruppa per');\n readonly expandAllLabel = input('Espandi tutto');\n readonly collapseAllLabel = input('Comprimi tutto');\n /** Name of a row in the labels of its expand button (\"Espandi <name>\"). */\n readonly rowName = input<(row: T, index: number) => string>(defaultRowName);\n readonly expandRowLabel = input('Espandi');\n readonly collapseRowLabel = input('Comprimi');\n /** Accessible label of the resize handle: \"<label> <header>\". */\n readonly resizeColumnLabel = input('Ridimensiona la colonna');\n /** Hint of the headers of a reorderable grid. */\n readonly reorderHint = input('Trascina o usa Shift+frecce per spostare la colonna');\n /** Hint of a resizable header (keyboard of ag-grid: Alt+arrows). */\n readonly resizeHint = input('Alt+frecce per cambiare la larghezza della colonna');\n /** Hint of a header with a filter button (Ctrl+Enter opens it, as ag-grid). */\n readonly filterHint = input('Ctrl+Invio per aprire il filtro');\n readonly resetColumnsLabel = input('Ripristina colonne');\n /** Announcement of a moved column. */\n readonly columnMovedLabel = input<(header: string, position: number, total: number) => string>(defaultColumnMoved);\n /** Texts of the `[formArray]` editing. */\n readonly actionsHeader = input('Azioni');\n readonly addLabel = input('Aggiungi');\n readonly editLabel = input('Modifica');\n readonly viewLabel = input('Visualizza');\n readonly deleteLabel = input('Elimina');\n readonly deleteSelectedLabel = input('Elimina selezionati');\n readonly newRowTitle = input('Nuova riga');\n readonly editRowTitle = input('Modifica riga');\n readonly viewRowTitle = input('Dettaglio riga');\n readonly saveLabel = input('Salva');\n readonly cancelLabel = input('Annulla');\n readonly closeLabel = input('Chiudi');\n readonly deleteConfirmTitle = input('Vuoi eliminare la riga?');\n readonly deleteSelectedConfirmTitle = input('Vuoi eliminare le righe selezionate?');\n readonly deleteConfirmMessage = input(\"L'operazione non può essere annullata.\");\n /** Hint of a row with errors (icon in the actions column). */\n readonly invalidRowLabel = input('Riga con errori');\n readonly saveErrorTitle = input('Salvataggio non riuscito');\n /** Text of a failed save when the error has no message of its own. */\n readonly saveErrorText = input('Riprova più tardi.');\n\n // ---- Outputs ----------------------------------------------------------------------------------\n\n /** Click on a data row, outside links, buttons and fields. */\n readonly rowClick = output<SirioGridRowEvent<T>>();\n /** Error of the data source (the grid shows no rows). */\n readonly loadError = output<unknown>();\n /** The state chosen by the user changed (sort, filters, page, columns, grouping, expansion, selection). */\n readonly stateChange = output<SirioGridState>();\n /** A row of the form array was saved from the dialog (changed or added). */\n readonly rowSave = output<SirioGridRowSaveEvent<T>>();\n /** A row was removed from the form array. */\n readonly rowDelete = output<SirioGridRowDeleteEvent<T>>();\n\n // ---- Internals --------------------------------------------------------------------------------\n\n /** @internal */\n readonly columns = contentChildren(SirioGridColumn);\n protected readonly emptyTemplate = contentChild(SirioGridEmpty, { read: TemplateRef });\n protected readonly detailTemplate = contentChild(SirioGridDetail, { read: TemplateRef });\n protected readonly errorTemplate = contentChild(SirioGridError, { read: TemplateRef });\n protected readonly editorTemplate = contentChild(SirioGridEditor, { read: TemplateRef });\n private readonly scroller = viewChild<ElementRef<HTMLElement>>('scroller');\n private readonly tableEl = viewChild.required<ElementRef<HTMLTableElement>>('table');\n\n protected readonly baseId = sirioUniqueId('sirio-grid');\n /** Numbers (counts, filter values) and dates (filter chips) in the format of `LOCALE_ID`. */\n private readonly locale = inject(LOCALE_ID);\n private readonly numberFormat = new Intl.NumberFormat(this.locale);\n private readonly dateFormat = new Intl.DateTimeFormat(this.locale, { day: '2-digit', month: '2-digit', year: 'numeric' });\n /** Default sort of the columns without `compare`: text collation of `LOCALE_ID`. */\n private readonly defaultCompare = (a: unknown, b: unknown) => sirioDefaultGridCompare(a, b, this.locale);\n /** Widths (px) of the service columns in the resized layout (colgroup). */\n protected readonly toolColumnWidth = TOOL_COLUMN_WIDTH;\n protected readonly rowNumberWidth = ROW_NUMBER_WIDTH;\n /** Width of the actions column: its buttons, plus the error icon when a row has errors. */\n protected readonly actionsWidth = computed(() => {\n const buttons = (this.editorTemplate() ? 1 : 0) + (this.deletable() && !this.formDisabled() ? 1 : 0);\n const invalid = (this.formRows() ?? []).some((row) => this.rowInvalid(row));\n const items = buttons + (invalid ? 1 : 0);\n return (\n ACTIONS_PADDING +\n buttons * ACTION_BUTTON_WIDTH +\n (invalid ? ACTION_ICON_WIDTH : 0) +\n Math.max(0, items - 1) * ACTION_GAP\n );\n });\n\n private readonly serverResult = signal<SirioGridResult<T> | null>(null);\n /**\n * Total of the server rows: from the response, or found from the pages (open while every page\n * received is full). `key` is the query without the page: a new sort, filter or page size\n * starts again.\n */\n private readonly serverTotal = signal<ServerTotal | null>(null);\n /** Error of the last request of the data source (null after a successful one). */\n protected readonly serverError = signal<{ error: unknown } | null>(null);\n /** Context of the error template. */\n protected readonly errorContext = computed(() => {\n const failure = this.serverError();\n return failure ? { $implicit: failure.error, error: failure.error, retry: () => this.reload() } : null;\n });\n private readonly serverLoading = signal(false);\n private readonly reloadTick = signal(0);\n private subscription: Subscription | null = null;\n /** The next filter change is applied without the debounce (not a typed text). */\n private immediateFilter = false;\n private request = 0;\n\n protected readonly overflowStart = signal(false);\n protected readonly overflowEnd = signal(false);\n /** Viewport within the kit card breakpoint (768px). */\n private readonly mobile = signal(false);\n /** The card layout is active now (scroll container, fixed and resized columns are turned off). */\n protected readonly cardMode = computed(() => this.cardOnMobile() && this.mobile());\n\n readonly isLoading = computed(() => this.loading() || this.serverLoading());\n protected readonly server = computed(() => !!this.dataSource());\n\n /** Filters in use (the typed text ones after `filterDebounce`). */\n private readonly appliedFilters = signal<SirioGridFilters>({});\n /** Filter panel of the card layout open. */\n protected readonly filtersOpen = signal(false);\n /** Announcement of the last column move (sr-only live region). */\n protected readonly announcement = signal('');\n /** Header being dragged and drop position. */\n protected readonly dragId = signal<string | null>(null);\n protected readonly dropTarget = signal<DropTarget | null>(null);\n /** Width of each column measured when the resizing starts (reset target). */\n private initialWidths: Record<string, number> = {};\n\n // ---- Columns ----------------------------------------------------------------------------------\n\n /**\n * Id of a column in the TanStack table: its key, or its position when it has none. A key already\n * used by a previous column (the same field shown twice, e.g. with another format) gets a suffix.\n */\n columnId(column: SirioGridColumn<T>): string {\n return this.columnIds().get(column) ?? (column.key() || `__column-${this.columns().indexOf(column)}`);\n }\n\n private readonly columnIds = computed(() => {\n const ids = new Map<SirioGridColumn<T>, string>();\n const used = new Set<string>();\n this.columns().forEach((column, index) => {\n const base = column.key() || `__column-${index}`;\n let id = base;\n for (let n = 2; used.has(id); n++) {\n id = `${base}~${n}`;\n }\n used.add(id);\n ids.set(column, id);\n });\n return ids;\n });\n\n /**\n * Key of a column in `filters` (and in the query of a server source): its `filterKey`, otherwise\n * its id, unique also for columns on the same field (`data`, `data~2`): a date shown as date and\n * as time must not share the filter of the other column.\n */\n filterIdOf(column: SirioGridColumn<T>): string {\n return column.filterKey() ?? this.columnId(column);\n }\n\n private readonly columnsById = computed(() => {\n const map = new Map<string, SirioGridColumn<T>>();\n this.columns().forEach((c) => map.set(this.columnId(c), c));\n return map;\n });\n\n /**\n * TanStack Table definitions of the columns. The column inputs that change the processing are\n * read here, so the definitions (and the row models) are rebuilt when they change.\n */\n private readonly columnDefs = computed<ColumnDef<GridFeatures, T, unknown>[]>(() =>\n this.columns().map((column) => {\n column.field();\n column.value();\n column.format();\n column.filter();\n column.filterPredicate();\n column.formatOptions();\n const compare = column.compare() ?? ((a: unknown, b: unknown) => column.compareValues(a, b));\n const aggregate = column.aggregate();\n return {\n id: this.columnId(column),\n accessorFn: (row: T) => column.valueOf(row),\n enableSorting: column.sortable(),\n enableColumnFilter: !!column.filter(),\n enableGrouping: column.groupable(),\n sortFn: (a, b, id) => compare(a.getValue(id), b.getValue(id)),\n filterFn: (row, _id, value) => column.matches(row.original, value),\n ...(aggregate ? { aggregationFn: aggregate } : {}),\n size: column.widthPx() ?? 150,\n minSize: column.minWidth(),\n maxSize: column.maxWidth() ?? Number.MAX_SAFE_INTEGER,\n } as ColumnDef<GridFeatures, T, unknown>;\n }),\n );\n\n /** Columns in the TanStack column order, hidden ones excluded. */\n private readonly orderedColumns = computed(() => {\n const byId = this.columnsById();\n return this.table\n .getAllLeafColumns()\n .map((c) => byId.get(c.id))\n .filter((c): c is SirioGridColumn<T> => !!c && !c.hidden());\n });\n\n /**\n * Fixed side of the columns: their `fixed` input, plus `fixedFirstColumn` / `fixedLastColumn`.\n * Columns are fixed only in the kit scroll container (not in the card layout).\n */\n private readonly fixedSides = computed(() => {\n const sides = new Map<SirioGridColumn<T>, SirioGridFixed>();\n if (!this.responsive() || this.cardMode()) {\n return sides;\n }\n const ordered = this.orderedColumns();\n ordered.forEach((c) => c.fixed() && sides.set(c, c.fixed()!));\n const free = ordered.filter((c) => !sides.has(c));\n const has = (side: SirioGridFixed) => [...sides.values()].includes(side);\n if (this.fixedFirstColumn() && !has('left') && free.length) {\n sides.set(free.shift()!, 'left');\n }\n if (this.fixedLastColumn() && !has('right') && free.length) {\n sides.set(free.pop()!, 'right');\n }\n return sides;\n });\n\n /** Group levels of the headers (0 = no grouped headers). */\n protected readonly headerDepth = computed(() =>\n this.visibleColumns().reduce((depth, c) => Math.max(depth, c.groupPath().length), 0),\n );\n /** Rowspan of the service headers (selection, expand, row number) over every header row. */\n protected readonly headerRowspan = computed(() => (this.headerDepth() ? this.headerDepth() + 1 : null));\n\n /**\n * Header rows: one per group level, then the column headers. Adjacent columns of the same fixed\n * block with the same groups share a group cell; a column with fewer group levels has its header\n * in the row after its last group, spanning the rows below.\n */\n protected readonly headerRows = computed<HeaderCell<T>[][]>(() => {\n const columns = this.visibleColumns();\n const depth = this.headerDepth();\n const rows: HeaderCell<T>[][] = Array.from({ length: depth + 1 }, () => []);\n for (let level = 0; level <= depth; level++) {\n let run: (HeaderCell<T> & { kind: 'group' }) | null = null;\n let runKey = '';\n for (const column of columns) {\n const path = column.groupPath();\n const id = this.columnId(column);\n if (path.length > level) {\n const key = JSON.stringify([this.fixedOf(column), path.slice(0, level + 1)]);\n if (run && runKey === key) {\n run.colspan++;\n run.pin = [run.pin[0], id];\n } else {\n run = { kind: 'group', track: `g${level}:${id}`, label: path[level], colspan: 1, pin: [id, id] };\n runKey = key;\n rows[level].push(run);\n }\n } else {\n run = null;\n if (path.length === level) {\n rows[level].push({ kind: 'column', track: `c:${id}`, column, rowspan: depth - level + 1 });\n }\n }\n }\n }\n return rows;\n });\n\n /** Sticky top (px) of each header row with the fixed header: height of the rows above. */\n private readonly headerTops = signal<number[]>([]);\n /** Height of the header rows: the cells focused with Tab are scrolled out from under the fixed header. */\n protected readonly headerHeight = signal(0);\n private headerObserver: ResizeObserver | null = null;\n\n protected headerTop(row: number): number | null {\n return row > 0 ? (this.headerTops()[row] ?? null) : null;\n }\n\n private measureHeaderRows(): void {\n const rows = Array.from(this.tableEl().nativeElement.tHead?.rows ?? []);\n const tops: number[] = [];\n let total = 0;\n for (const row of rows) {\n tops.push(total);\n total += row.getBoundingClientRect().height;\n }\n if (!sameJson(tops, untracked(this.headerTops))) {\n this.headerTops.set(tops);\n }\n if (total !== untracked(this.headerHeight)) {\n this.headerHeight.set(total);\n }\n }\n\n /** Fixed side of a column (null = it scrolls). */\n protected fixedOf(column: SirioGridColumn<T>): SirioGridFixed | null {\n return this.fixedSides().get(column) ?? null;\n }\n\n /** Columns in display order: the left fixed ones, the scrolling ones, the right fixed ones. */\n protected readonly visibleColumns = computed(() => {\n const ordered = this.orderedColumns();\n const side = (s: SirioGridFixed | null) => ordered.filter((c) => this.fixedOf(c) === s);\n return [...side('left'), ...side(null), ...side('right')];\n });\n\n /**\n * Keys of the fixed cells by side, in display order. The service columns (selection, expand,\n * row number) are fixed with the left fixed columns, which follow them.\n */\n private readonly pinKeys = computed(() => {\n const columns = this.visibleColumns();\n const keys = (side: SirioGridFixed) => columns.filter((c) => this.fixedOf(c) === side).map((c) => this.columnId(c));\n const left = keys('left');\n if (left.length) {\n const tools = [\n this.checkColumn() ? SELECT_KEY : null,\n this.hasDetail() ? EXPAND_KEY : null,\n this.rowNumbers() ? ROWNUM_KEY : null,\n ].filter((k): k is string => !!k);\n left.unshift(...tools);\n }\n const right = keys('right');\n if (this.actionsColumn()) {\n // The actions of a form array grid stay visible at the right end.\n right.push(ACTIONS_KEY);\n }\n return { left, right };\n });\n protected readonly hasPinLeft = computed(() => this.pinKeys().left.length > 0);\n protected readonly hasPinRight = computed(() => this.pinKeys().right.length > 0);\n\n /** Sticky offset (px) of each fixed cell, measured on the headers. @internal */\n readonly pinOffsets = signal<Record<string, number>>({});\n private pinObserver: ResizeObserver | null = null;\n\n /** Side of a fixed cell (column id or service key). @internal */\n pinSideOf(key: string): SirioGridFixed | null {\n const { left, right } = this.pinKeys();\n return left.includes(key) ? 'left' : right.includes(key) ? 'right' : null;\n }\n\n /** Edge of the fixed block where the cell is (last left / first right cell). @internal */\n pinEdgeOf(key: string): SirioGridFixed | null {\n const { left, right } = this.pinKeys();\n return left.at(-1) === key ? 'left' : right[0] === key ? 'right' : null;\n }\n\n /** Offsets of the fixed cells: sum of the widths of the fixed headers before them on their side. */\n private measurePins(): void {\n const table = this.tableEl().nativeElement;\n const { left, right } = untracked(this.pinKeys);\n const width = (key: string) =>\n table.querySelector(`thead th[data-pin-key=\"${CSS.escape(key)}\"]`)?.getBoundingClientRect().width ?? 0;\n const offsets: Record<string, number> = {};\n let total = 0;\n for (const key of left) {\n offsets[key] = total;\n total += width(key);\n }\n const leftWidth = total;\n total = 0;\n for (const key of [...right].reverse()) {\n offsets[key] = total;\n total += width(key);\n }\n if (!sameJson(offsets, untracked(this.pinOffsets))) {\n this.pinOffsets.set(offsets);\n }\n // Inner edges of the blocks for the scroll markers, with the blocks past the edge (PIN_OVERHANG).\n const widths = { left: Math.max(0, leftWidth - PIN_OVERHANG), right: Math.max(0, total - PIN_OVERHANG) };\n if (!sameJson(widths, untracked(this.pinBlockWidths))) {\n this.pinBlockWidths.set(widths);\n }\n }\n\n /** Widths of the fixed blocks: the kit scroll markers of the container are drawn at their inner edge. */\n protected readonly pinBlockWidths = signal({ left: 0, right: 0 });\n\n protected readonly filterColumns = computed(() => this.visibleColumns().filter((c) => !!c.filter()));\n /** Filter row shown (`filterRow`, a filterable column, not in the card layout). */\n protected readonly filterRowActive = computed(() => this.filterRow() && !this.cardMode() && this.filterColumns().length > 0);\n protected readonly groupableColumns = computed(() => this.columns().filter((c) => c.groupable() && !c.hidden()));\n protected readonly groupOptions = computed<SirioOption<string>[]>(() =>\n this.groupableColumns().map((c) => ({ value: c.key(), label: c.header() })),\n );\n /** Grouping in use (client side only, groupable columns only). */\n protected readonly activeGrouping = computed(() => {\n if (this.server()) {\n return [];\n }\n const groupable = new Set(this.groupableColumns().map((c) => c.key()));\n return this.grouping().filter((key) => groupable.has(key));\n });\n protected readonly treeMode = computed(() => !!this.subRows());\n protected readonly hasDetail = computed(() => !!this.detailTemplate());\n /** Column of the selection checkboxes / radios shown. */\n protected readonly checkColumn = computed(() => this.selection() !== 'none' && this.selectionColumn());\n /** Rows selected with a click: `selectOnRowClick`, or no checkbox column. */\n protected readonly clickSelect = computed(\n () => this.selection() !== 'none' && (this.selectOnRowClick() || !this.selectionColumn()),\n );\n /** Rows focusable and selected with Space / Enter (no checkbox to reach with the keyboard). */\n protected readonly keySelect = computed(() => this.selection() !== 'none' && !this.selectionColumn());\n protected readonly colCount = computed(\n () =>\n this.visibleColumns().length +\n (this.checkColumn() ? 1 : 0) +\n (this.hasDetail() ? 1 : 0) +\n (this.rowNumbers() ? 1 : 0) +\n (this.actionsColumn() ? 1 : 0),\n );\n // ---- Flex columns -----------------------------------------------------------------------------\n\n /** Inner width of the scroll container (px), for the flex columns. */\n private readonly containerWidth = signal(0);\n /** Content width of the columns without `width`, measured in the automatic layout. */\n private readonly naturalWidths = signal<Record<string, number>>({});\n\n /** Columns sized by `flex` now (a resized column keeps its width). */\n private readonly flexColumns = computed(() =>\n this.cardMode()\n ? []\n : this.visibleColumns().filter((c) => c.flex() && this.columnWidths()[this.columnId(c)] === undefined),\n );\n\n /** Width of a column that is not flex: resized, declared (`width` in px) or content width. */\n private fixedWidthOf(column: SirioGridColumn<T>): number | undefined {\n const id = this.columnId(column);\n return this.columnWidths()[id] ?? column.widthPx() ?? this.naturalWidths()[id];\n }\n\n /** Width of the service columns (selection, expand, row number). */\n private readonly toolsWidth = computed(\n () =>\n ((this.checkColumn() ? 1 : 0) + (this.hasDetail() ? 1 : 0)) * TOOL_COLUMN_WIDTH +\n (this.rowNumbers() ? ROW_NUMBER_WIDTH : 0) +\n (this.actionsColumn() ? this.actionsWidth() : 0),\n );\n\n /**\n * Widths of the flex columns: the free width (container - service columns - other columns)\n * shared by `flex`, within min / max width; null while a width is still to be measured.\n */\n private readonly flexWidths = computed<Record<string, number> | null>(() => {\n const flex = this.flexColumns();\n const container = this.containerWidth();\n if (!flex.length || container <= 0) {\n return null;\n }\n let used = this.toolsWidth();\n for (const column of this.visibleColumns()) {\n if (!flex.includes(column)) {\n const width = this.fixedWidthOf(column);\n if (width === undefined) {\n return null;\n }\n used += width;\n }\n }\n const free = Math.max(0, container - used - COLLAPSED_BORDERS_WIDTH);\n const total = flex.reduce((sum, c) => sum + c.flex()!, 0);\n const widths: Record<string, number> = {};\n for (const column of flex) {\n const max = column.maxWidth() ?? Number.MAX_SAFE_INTEGER;\n widths[this.columnId(column)] = Math.floor(Math.min(Math.max((free * column.flex()!) / total, column.minWidth()), max));\n }\n return widths;\n });\n\n /** Fixed layout with the widths of `columnWidths` (after a resize) or of the flex columns. */\n protected readonly fixedLayout = computed(\n () =>\n !this.cardMode() &&\n ((this.resizable() && Object.keys(this.columnWidths()).length > 0) || this.flexWidths() !== null),\n );\n\n /** Content widths of the columns without a width, while the automatic layout is shown. */\n private measureNaturalWidths(): void {\n const table = this.tableEl().nativeElement;\n const current = untracked(this.naturalWidths);\n const measured = { ...current };\n let changed = false;\n for (const column of untracked(this.visibleColumns)) {\n const id = this.columnId(column);\n if (column.flex() || column.widthPx() !== null || current[id] !== undefined) {\n continue;\n }\n const th = table.querySelector<HTMLElement>(`thead th[data-column=\"${CSS.escape(id)}\"]`);\n const width = th ? Math.ceil(th.getBoundingClientRect().width) : 0;\n if (width > 0) {\n measured[id] = width;\n changed = true;\n }\n }\n if (changed) {\n this.naturalWidths.set(measured);\n }\n }\n protected readonly tableWidth = computed(() => {\n if (!this.fixedLayout()) {\n return null;\n }\n return this.visibleColumns().reduce((sum, c) => sum + this.widthOf(c), 0) + this.toolsWidth();\n });\n protected readonly columnsCustomized = computed(\n () => Object.keys(this.columnWidths()).length > 0 || this.columnOrder().length > 0,\n );\n\n protected readonly booleanOptions = computed<SirioOption[]>(() => [\n { value: true, label: this.filterYesLabel() },\n { value: false, label: this.filterNoLabel() },\n ]);\n /** Active filters as chips: \"<header>: <value>\". */\n protected readonly filterChips = computed<SirioFilterChip[]>(() => {\n const filters = this.filters();\n return this.columns()\n .filter((c) => c.filter() && sirioGridFilterActive(filters[this.filterIdOf(c)]))\n .map((c) => ({ label: `${c.header()}: ${this.filterText(c, filters[this.filterIdOf(c)])}`, value: this.filterIdOf(c) }));\n });\n\n // ---- TanStack state ---------------------------------------------------------------------------\n\n /** Sort criteria as TanStack sorting state (criteria of unknown columns are dropped). */\n private readonly sortingState = computed<SortingState>(() => {\n const byKey = new Map(this.columns().map((c) => [c.key(), c]));\n return this.sort()\n .filter((s) => byKey.has(s.field))\n .map((s) => ({ id: this.columnId(byKey.get(s.field)!), desc: s.direction === 'desc' }));\n });\n\n /** Applied filters as TanStack column filters state. */\n private readonly columnFiltersState = computed<ColumnFiltersState>(() => {\n const filters = this.appliedFilters();\n return this.columns()\n .filter((c) => c.filter() && sirioGridFilterActive(filters[this.filterIdOf(c)]))\n .map((c) => ({ id: this.columnId(c), value: filters[this.filterIdOf(c)] }));\n });\n\n /**\n * TanStack Table instance: filtering, grouping, sorting, expanding and pagination of `data`\n * (client side), or the page of the data source as it is (`manual*`, server side). Exposed for\n * advanced uses (e.g. `table.getFilteredRowModel()`); the grid owns its state.\n */\n readonly table = injectTable<GridFeatures, T>(() => {\n const server = this.server();\n const pageable = this.pageable();\n const rowId = this.rowId();\n const subRows = this.subRows();\n const detail = this.hasDetail();\n const expandable = this.rowExpandable();\n return {\n features: GRID_FEATURES,\n columns: this.columnDefs(),\n data: (server ? (this.serverResult()?.rows ?? NO_ROWS) : (this.localRows() ?? NO_ROWS)) as T[],\n getRowId: rowId\n ? (row: T, index: number, parent?: SirioGridRow<T>) => String(this.keyOf(row) ?? (parent ? `${parent.id}.${index}` : index))\n : undefined,\n getSubRows: subRows\n ? (row: T) => {\n const children = typeof subRows === 'function' ? subRows(row) : sirioReadPath(row, subRows);\n return Array.isArray(children) && children.length ? (children as T[]) : undefined;\n }\n : undefined,\n getRowCanExpand: (row: SirioGridRow<T>) =>\n row.getIsGrouped() || row.subRows.length > 0 || (detail && (expandable?.(row.original) ?? true)),\n state: {\n sorting: this.sortingState(),\n columnFilters: this.columnFiltersState(),\n grouping: this.activeGrouping(),\n expanded: this.expanded() as ExpandedState,\n columnOrder: this.columnOrder(),\n columnSizing: this.columnWidths(),\n pagination: { pageIndex: Math.max(0, this.page() - 1), pageSize: Math.max(1, this.pageSize()) },\n },\n onExpandedChange: (updater: Updater<ExpandedState>) =>\n this.expanded.set(functionalUpdate(updater, this.expanded() as ExpandedState) as SirioGridExpanded),\n manualSorting: server,\n manualFiltering: server,\n manualGrouping: server,\n manualPagination: server || !pageable,\n rowCount: server ? (this.serverTotal()?.total ?? 0) : undefined,\n paginateExpandedRows: false,\n groupedColumnMode: false,\n autoResetPageIndex: false,\n autoResetExpanded: false,\n enableMultiSort: true,\n enableSortingRemoval: true,\n };\n });\n\n /** Total number of top level rows (groups, tree roots or rows): the pagination total. */\n readonly total = computed(() =>\n this.server() ? (this.serverTotal()?.total ?? 0) : this.table.getPrePaginatedRowModel().rows.length,\n );\n /** Number of rows that pass the filters (not the groups). */\n readonly resultCount = computed(() =>\n this.server() ? (this.serverTotal()?.total ?? 0) : this.table.getFilteredRowModel().rows.length,\n );\n /** The server did not give the total and the last page is not reached yet: more rows exist. */\n readonly totalOpen = computed(() => this.server() && !!this.serverTotal() && !this.serverTotal()!.exact);\n readonly pageCount = computed(() =>\n this.pageable() ? Math.max(1, Math.ceil(this.total() / Math.max(1, this.pageSize()))) : 1,\n );\n\n /** Rows rendered: rows of the page with the expanded sub-rows and groups. */\n protected readonly renderedRows = computed<SirioGridRow<T>[]>(() => this.table.getRowModel().rows);\n\n /**\n * Row numbers by row id: data rows counted in the current filter / group / sort order over every\n * page (server side from the query offset); sub-rows of tree data numbered within their parent.\n */\n private readonly rowNumberMap = computed(() => {\n const map = new Map<string, string>();\n if (!this.rowNumbers()) {\n return map;\n }\n let counter = this.server() ? this.query().offset : 0;\n const visit = (rows: readonly SirioGridRow<T>[], parent: string | null) => {\n let child = 0;\n for (const row of rows) {\n if (row.getIsGrouped()) {\n visit(row.subRows, null);\n continue;\n }\n const number = parent ? `${parent}.${++child}` : String(++counter);\n map.set(row.id, number);\n if (row.subRows.length) {\n visit(row.subRows, number);\n }\n }\n };\n visit(this.table.getPreExpandedRowModel().rows, null);\n return map;\n });\n\n /** Number of a rendered row (`rowNumbers`). */\n protected rowNumberOf(row: SirioGridRow<T>): string {\n return this.rowNumberMap().get(row.id) ?? '';\n }\n\n /** Data rows shown (current page, expanded sub-rows included, group rows excluded). */\n readonly rows = computed<readonly T[]>(() =>\n this.renderedRows()\n .filter((r) => !r.getIsGrouped())\n .map((r) => r.original),\n );\n\n /** Query of the server data source (`pageSize` 0 = every row, when not pageable). */\n readonly query = computed<SirioGridQuery>(() => {\n const pageable = this.pageable();\n const page = pageable ? Math.max(1, this.page()) : 1;\n const pageSize = pageable ? this.pageSize() : 0;\n return {\n page,\n pageSize,\n offset: (page - 1) * pageSize,\n sort: this.sort(),\n filters: sirioActiveGridFilters(this.appliedFilters()),\n };\n });\n\n private readonly selectedKeys = computed(() => new Set(this.selected().map((r) => this.keyOf(r))));\n /** Rows of the page that can be selected (`rowSelectable`), the target of \"select all\". */\n /** Mode of \"seleziona tutto\" in use (a server data source has only the loaded page). */\n protected readonly selectAllMode = computed<SirioGridSelectAll>(() => (this.server() ? 'page' : this.selectAll()));\n /** Selectable rows taken by \"seleziona tutto\" (`selectAll`): page, filtered rows or every row. */\n protected readonly selectableRows = computed(() => {\n let rows: readonly T[];\n switch (this.selectAllMode()) {\n case 'filtered':\n rows = this.table.getFilteredRowModel().flatRows.map((r) => r.original);\n break;\n case 'all':\n rows = this.table.getCoreRowModel().flatRows.map((r) => r.original);\n break;\n default:\n rows = this.rows();\n }\n return rows.filter((r) => this.canSelect(r));\n });\n protected readonly pageSelectedCount = computed(() => {\n const keys = this.selectedKeys();\n return this.selectableRows().filter((r) => keys.has(this.keyOf(r))).length;\n });\n protected readonly allPageSelected = computed(\n () => this.selectableRows().length > 0 && this.pageSelectedCount() === this.selectableRows().length,\n );\n /** Label of the \"seleziona tutto\" checkbox. */\n protected readonly selectAllText = computed(() => {\n const label = this.selectAllLabel();\n if (label) {\n return label;\n }\n switch (this.selectAllMode()) {\n case 'filtered':\n return 'Seleziona tutte le righe filtrate';\n case 'all':\n return 'Seleziona tutte le righe';\n default:\n return 'Seleziona tutte le righe della pagina';\n }\n });\n\n /** The row can be selected (selection active and `rowSelectable`). */\n canSelect(row: T): boolean {\n if (this.selection() === 'none') {\n return false;\n }\n const selectable = this.rowSelectable();\n return !selectable || selectable(row);\n }\n\n protected readonly status = computed(() => {\n if (this.isLoading()) {\n return this.loadingText();\n }\n const byKey = new Map(this.columns().map((c) => [c.key(), c]));\n const sorted = this.sort()\n .filter((s) => byKey.has(s.field))\n .map((s) => `${byKey.get(s.field)!.header()} ${s.direction === 'asc' ? this.sortAscendingLabel() : this.sortDescendingLabel()}`);\n const count = `${this.totalOpen() ? this.moreLabel() + ' ' : ''}${this.numberFormat.format(this.resultCount())}`;\n return `${count} ${this.resultsLabel()}${sorted.length ? ', ' + sorted.join(', ') : ''}`;\n });\n\n constructor() {\n const destroyRef = inject(DestroyRef);\n this.watchFormArray(destroyRef);\n\n // (stateChange) on every change of the state, not for the initial one.\n let initialState = true;\n effect(() => {\n const state = this.state();\n if (initialState) {\n initialState = false;\n return;\n }\n untracked(() => this.stateChange.emit(state));\n });\n\n // Filters: applied after filterDebounce (typed text); a change of the applied filters goes\n // back to the first page.\n let firstFilters = true;\n effect((onCleanup) => {\n const filters = this.filters();\n const delay = this.filterDebounce();\n const apply = () => {\n const changed = !sameJson(filters, untracked(() => this.appliedFilters()));\n this.appliedFilters.set(filters);\n if (changed && !firstFilters) {\n this.page.set(1);\n }\n firstFilters = false;\n };\n if (!delay || firstFilters || this.immediateFilter) {\n this.immediateFilter = false;\n untracked(apply);\n return;\n }\n const timer = setTimeout(() => untracked(apply), delay);\n onCleanup(() => clearTimeout(timer));\n });\n\n // Server side data source: a new request whenever the query changes (latest one wins).\n effect(() => {\n const source = this.dataSource();\n const query = this.query();\n this.reloadTick();\n untracked(() => this.load(source, query));\n });\n destroyRef.onDestroy(() => this.subscription?.unsubscribe());\n\n // Kit card breakpoint (`@media screen and (max-width: 768px)` of .sirio-table-card).\n const view = this.document.defaultView;\n const media = view?.matchMedia ? view.matchMedia(CARD_QUERY) : null;\n if (media) {\n this.mobile.set(media.matches);\n const onChange = (event: MediaQueryListEvent) => this.mobile.set(event.matches);\n media.addEventListener('change', onChange);\n destroyRef.onDestroy(() => media.removeEventListener('change', onChange));\n }\n\n // Keyboard navigation (roving tab index over headers and cells), off in the card layout.\n let keyboard: SirioGridKeyboard | null = null;\n afterRenderEffect(() => {\n const on = this.navigation();\n untracked(() => {\n keyboard ??= new SirioGridKeyboard(this.tableEl().nativeElement);\n if (on) {\n keyboard.start();\n } else {\n keyboard.stop();\n }\n });\n });\n destroyRef.onDestroy(() => keyboard?.stop());\n\n // Scroll markers of the kit: recomputed when the container or the table change size.\n afterNextRender(() => {\n this.updateOverflow();\n const view = this.document.defaultView as (Window & typeof globalThis) | null;\n if (!view?.ResizeObserver) {\n return;\n }\n // The widths of the fixed blocks follow the table too (a header observed by pinObserver can be\n // rendered again): the markers stay at the inner edge of the blocks.\n const observer = new view.ResizeObserver(() => {\n if (untracked(this.hasPinLeft) || untracked(this.hasPinRight)) {\n this.measurePins();\n }\n this.updateOverflow();\n });\n const scroller = this.scroller()?.nativeElement;\n if (scroller) {\n observer.observe(scroller);\n }\n observer.observe(this.tableEl().nativeElement);\n destroyRef.onDestroy(() => observer.disconnect());\n });\n\n // Fixed columns: the headers of the fixed cells are observed, their widths give the offsets.\n afterRenderEffect(() => {\n const { left, right } = this.pinKeys();\n this.pinObserver?.disconnect();\n if (!left.length && !right.length) {\n if (Object.keys(untracked(this.pinOffsets)).length) {\n this.pinOffsets.set({});\n }\n return;\n }\n const view = this.document.defaultView as (Window & typeof globalThis) | null;\n if (view?.ResizeObserver) {\n this.pinObserver ??= new view.ResizeObserver(() => this.measurePins());\n const headers = this.tableEl().nativeElement.querySelectorAll('thead th[data-pin-key]');\n headers.forEach((th) => this.pinObserver!.observe(th));\n }\n this.measurePins();\n });\n destroyRef.onDestroy(() => this.pinObserver?.disconnect());\n\n // Flex columns: the content widths of the other columns are measured in the automatic layout,\n // then the fixed layout shares the free width.\n afterRenderEffect(() => {\n if (this.flexColumns().length && !this.fixedLayout() && !(this.isLoading() && !this.renderedRows().length)) {\n this.measureNaturalWidths();\n }\n });\n\n // Grouped headers: the rows are stacked with the fixed header (sticky top of each row).\n afterRenderEffect(() => {\n const depth = this.headerDepth();\n const filterRow = this.filterRowActive();\n // The fixed header also gives the scroll padding of the cells focused with Tab.\n const sticky = this.stickyHeader() && this.navigation();\n this.headerRows();\n this.headerObserver?.disconnect();\n if (!depth && !filterRow && !sticky) {\n if (untracked(this.headerTops).length) {\n this.headerTops.set([]);\n }\n if (untracked(this.headerHeight)) {\n this.headerHeight.set(0);\n }\n return;\n }\n const view = this.document.defaultView as (Window & typeof globalThis) | null;\n const thead = this.tableEl().nativeElement.tHead;\n if (view?.ResizeObserver && thead) {\n this.headerObserver ??= new view.ResizeObserver(() => this.measureHeaderRows());\n Array.from(thead.rows).forEach((row) => this.headerObserver!.observe(row));\n }\n this.measureHeaderRows();\n });\n destroyRef.onDestroy(() => this.headerObserver?.disconnect());\n }\n\n /** Calls the data source again with the current query. */\n reload(): void {\n this.reloadTick.update((n) => n + 1);\n }\n\n // ---- Rows and selection -----------------------------------------------------------------------\n\n /** Identity of a row (`rowId`). */\n keyOf(row: T): unknown {\n const id = this.rowId();\n if (typeof id === 'function') {\n return id(row);\n }\n // Form array rows without rowId: the form group (the value object changes with every edit).\n return id ? sirioReadPath(row, id) : (this.rowGroups.get(row) ?? row);\n }\n\n isSelected(row: T): boolean {\n return this.selectedKeys().has(this.keyOf(row));\n }\n\n /** Selects or deselects a row (single: selects it). */\n toggleRow(row: T, force?: boolean): void {\n const mode = this.selection();\n if (mode === 'none' || !this.canSelect(row)) {\n return;\n }\n const selected = force ?? !this.isSelected(row);\n if (mode === 'single') {\n if (selected) {\n this.selected.set([row]);\n } else if (this.isSelected(row)) {\n this.selected.set([]);\n }\n return;\n }\n const key = this.keyOf(row);\n const others = this.selected().filter((r) => this.keyOf(r) !== key);\n this.selected.set(selected ? [...others, row] : others);\n }\n\n /** Selects or deselects the selectable rows of \"seleziona tutto\" (`selectAll`: page, filtered rows or every row). */\n toggleAll(selected = !this.allPageSelected()): void {\n if (this.selection() !== 'multiple') {\n return;\n }\n const rows = this.selectableRows();\n const pageKeys = new Set(rows.map((r) => this.keyOf(r)));\n const others = this.selected().filter((r) => !pageKeys.has(this.keyOf(r)));\n this.selected.set(selected ? [...others, ...rows] : others);\n }\n\n // ---- Form array -------------------------------------------------------------------------------\n\n /** Changes of the form array (values, rows, status, touched): the rows are read again. */\n private readonly formTick = signal(0);\n /** Value object of each form group, reused while its value does not change (stable rows). */\n private readonly formValues = new WeakMap<AbstractControl, { json: string; value: T }>();\n /** Form group of each value object shown. */\n private readonly rowGroups = new WeakMap<object, FormGroup>();\n\n /** Form array editing active: a form array and no server data source. */\n protected readonly formMode = computed(() => !!this.formArray() && !this.server());\n\n /** Values of the form array rows (null without a form array). */\n private readonly formRows = computed<readonly T[] | null>(() => {\n const array = this.formArray();\n if (!array) {\n return null;\n }\n this.formTick();\n return array.controls.map((control) => this.formValueOf(control));\n });\n\n /** Rows of the client side grid: the form array values or `data`. */\n private readonly localRows = computed(() => this.formRows() ?? this.data());\n\n /** The form array (or a parent of it) is disabled: rows can only be viewed. */\n protected readonly formDisabled = computed(() => {\n this.formTick();\n return !!this.formArray()?.disabled;\n });\n\n /** Column of the row actions (edit / view, delete) at the right end. */\n protected readonly actionsColumn = computed(\n () => this.formMode() && (!!this.editorTemplate() || (this.deletable() && !this.formDisabled())),\n );\n\n /** \"Aggiungi\" shown. */\n protected readonly canAdd = computed(\n () => this.formMode() && this.addable() && !!this.rowFactory() && !!this.editorTemplate() && !this.formDisabled(),\n );\n\n /** Selected rows that can be removed (\"Elimina selezionati\"). */\n protected readonly deletableSelected = computed(() =>\n this.formMode() && this.deletable() && this.selection() === 'multiple' && !this.formDisabled()\n ? this.selected().filter((r) => this.canDelete(r))\n : [],\n );\n\n /** Error of the form array shown under the grid (after it is touched or changed). */\n protected readonly formError = computed(() => {\n this.formTick();\n const array = this.formArray();\n if (!this.formMode() || !array?.errors || !(array.touched || array.dirty)) {\n return null;\n }\n return resolveSirioErrorMessage(\n array.errors,\n this.caption(),\n { ...this.globalMessages, ...SIRIO_GRID_ARRAY_MESSAGES },\n this.errorMessages(),\n );\n });\n\n private readonly globalMessages = inject(SIRIO_ERROR_MESSAGES);\n private readonly dialogs = inject(SirioDialogService);\n\n /** Edit dialog: the session shown (the template stays while the dialog closes). */\n protected readonly editing = signal<EditSession<T> | null>(null);\n protected readonly editorOpen = signal(false);\n protected readonly saving = signal(false);\n protected readonly saveError = signal<string | null>(null);\n protected readonly editorTitle = computed(() => {\n const context = this.editing()?.context;\n return !context ? '' : context.isNew ? this.newRowTitle() : context.readonly ? this.viewRowTitle() : this.editRowTitle();\n });\n\n /** Value object of a form group: the same object while the value does not change. */\n private formValueOf(control: AbstractControl): T {\n const raw = (control as FormGroup).getRawValue ? (control as FormGroup).getRawValue() : control.value;\n const json = JSON.stringify(raw ?? null);\n const cached = this.formValues.get(control);\n if (cached && cached.json === json) {\n return cached.value;\n }\n const value = (raw !== null && typeof raw === 'object' ? raw : { value: raw }) as T;\n this.formValues.set(control, { json, value });\n if (control instanceof FormGroup) {\n this.rowGroups.set(value, control);\n }\n return value;\n }\n\n /** Form group of a row of a `[formArray]` grid (null for other rows). */\n groupOf(row: T): FormGroup | null {\n return this.rowGroups.get(row) ?? null;\n }\n\n /** Position of a row in the form array (-1 if it is not there). */\n indexOf(row: T): number {\n const group = this.groupOf(row);\n return group ? (this.formArray()?.controls.indexOf(group) ?? -1) : -1;\n }\n\n /** The row can be changed in the dialog (otherwise it opens read-only). */\n canEdit(row: T): boolean {\n this.formTick();\n const group = this.groupOf(row);\n if (!this.formMode() || !group || this.formDisabled() || group.disabled) {\n return false;\n }\n return this.rowEditable()?.(row) ?? true;\n }\n\n /** The row can be removed. */\n canDelete(row: T): boolean {\n if (!this.formMode() || !this.deletable() || this.formDisabled() || !this.groupOf(row)) {\n return false;\n }\n return this.rowDeletable()?.(row) ?? true;\n }\n\n /** The row has errors (shown once it, or the form array, is touched). */\n protected rowInvalid(row: T): boolean {\n this.formTick();\n const group = this.groupOf(row);\n return !!group && group.invalid && (group.touched || !!this.formArray()?.touched);\n }\n\n /**\n * Opens the dialog of a row: a copy of its group (`rowFactory`, or a generic copy) applied by\n * \"Salva\"; read-only when the row cannot be changed.\n */\n editRow(row: T): void {\n const group = this.groupOf(row);\n if (!this.formMode() || !group || !this.editorTemplate()) {\n return;\n }\n const readonly = !this.canEdit(row);\n const factory = this.rowFactory();\n const copy = factory ? factory(structuredCloneSafeValue(group.getRawValue()) as T) : sirioCloneControl(group);\n if (factory) {\n // Disabled controls of the row stay disabled in the copy.\n copyDisabledState(group, copy);\n }\n if (readonly) {\n copy.disable({ emitEvent: false });\n }\n this.openEditor({ context: { $implicit: copy, group: copy, row, isNew: false, readonly }, original: group });\n }\n\n /** Opens the dialog of a new row (`rowFactory` with the initial values), added at the end by \"Salva\". */\n addRow(initial: Partial<T> | null = null): void {\n const factory = this.rowFactory();\n if (!this.formMode() || !factory || !this.editorTemplate() || this.formDisabled()) {\n return;\n }\n const group = factory((initial as T) ?? null);\n this.openEditor({ context: { $implicit: group, group, row: null, isNew: true, readonly: false }, original: null });\n }\n\n /** Closes the edit dialog without saving. */\n closeEditor(): void {\n this.editorOpen.set(false);\n }\n\n private openEditor(session: EditSession<T>): void {\n this.saveError.set(null);\n this.saving.set(false);\n this.editing.set(session);\n this.editorOpen.set(true);\n }\n\n /** Dialog open: the focus goes to the first field of the form. */\n protected onEditorOpened(): void {\n const body = this.document.getElementById(`${this.baseId}-editor`);\n body?.querySelector<HTMLElement>('input:not([disabled]), textarea:not([disabled]), select:not([disabled]), button.sirio-dropdown-select')?.focus();\n }\n\n protected onEditorClosed(): void {\n this.editing.set(null);\n this.saving.set(false);\n this.saveError.set(null);\n }\n\n /** \"Salva\": validation (pending validators awaited), `saveHandler`, then the change of the form array. */\n async saveEditor(): Promise<boolean> {\n const session = this.editing();\n const array = this.formArray();\n if (!session || !array || session.context.readonly || this.saving()) {\n return false;\n }\n const { group: copy, isNew, row } = session.context;\n copy.markAllAsTouched();\n this.saveError.set(null);\n this.saving.set(true);\n try {\n if (copy.pending) {\n await firstValueFrom(copy.statusChanges.pipe(rxFilter((status) => status !== 'PENDING')));\n }\n if (copy.invalid) {\n this.saving.set(false);\n this.focusFirstError();\n return false;\n }\n const original = session.original;\n const index = isNew ? array.length : original ? array.controls.indexOf(original) : -1;\n if (!isNew && index < 0) {\n this.saving.set(false);\n this.closeEditor(); // the row was removed in the meantime\n return false;\n }\n const value = copy.getRawValue() as T;\n const handler = this.saveHandler();\n if (handler) {\n const allowed = await runHandler(handler({ row: value, previous: row, group: copy, isNew, index }));\n if (allowed === false) {\n this.saving.set(false);\n return false;\n }\n }\n let target: FormGroup;\n if (isNew) {\n array.push(copy);\n target = copy;\n copy.markAsDirty();\n } else {\n target = original!;\n if (sirioSyncControl(target, copy)) {\n target.markAsDirty();\n }\n }\n this.saving.set(false);\n this.closeEditor();\n this.rowSave.emit({ row: this.formValueOf(target), previous: row, group: target, isNew, index });\n return true;\n } catch (error) {\n this.saving.set(false);\n this.saveError.set(errorText(error) ?? this.saveErrorText());\n return false;\n }\n }\n\n private focusFirstError(): void {\n afterNextRender(\n () => {\n const body = this.document.getElementById(`${this.baseId}-editor`);\n body?.querySelector<HTMLElement>('[aria-invalid=\"true\"], .sirio-is-invalid')?.focus();\n },\n { injector: this.injector },\n );\n }\n\n /** Removes a row (confirmation, `deleteHandler`); resolves true once it is removed. */\n async deleteRow(row: T): Promise<boolean> {\n if (!this.canDelete(row)) {\n return false;\n }\n if (this.confirmDelete() && !(await this.confirmRemoval(this.deleteConfirmTitle()))) {\n return false;\n }\n return this.removeRow(row);\n }\n\n /** Removes the selected rows that can be removed (one confirmation). */\n async deleteSelected(): Promise<number> {\n const rows = this.deletableSelected();\n if (!rows.length) {\n return 0;\n }\n const title = rows.length === 1 ? this.deleteConfirmTitle() : this.deleteSelectedConfirmTitle();\n if (this.confirmDelete() && !(await this.confirmRemoval(title))) {\n return 0;\n }\n let removed = 0;\n for (const row of rows) {\n if (await this.removeRow(row)) {\n removed++;\n }\n }\n return removed;\n }\n\n private confirmRemoval(title: string): Promise<boolean> {\n return this.dialogs.confirm({\n title,\n message: this.deleteConfirmMessage(),\n tone: 'danger',\n icon: 'fa-trash',\n confirmLabel: this.deleteLabel(),\n cancelLabel: this.cancelLabel(),\n });\n }\n\n private async removeRow(row: T): Promise<boolean> {\n const array = this.formArray();\n const group = this.groupOf(row);\n let index = group && array ? array.controls.indexOf(group) : -1;\n if (!array || !group || index < 0) {\n return false;\n }\n const handler = this.deleteHandler();\n if (handler) {\n try {\n if ((await runHandler(handler({ row, group, index }))) === false) {\n return false;\n }\n } catch {\n return false;\n }\n index = array.controls.indexOf(group);\n if (index < 0) {\n return false;\n }\n }\n array.removeAt(index);\n array.markAsDirty();\n this.rowDelete.emit({ row, group, index });\n return true;\n }\n\n /** Double click on a row: its dialog. */\n protected onRowDoubleClick(row: SirioGridRow<T>, event: MouseEvent): void {\n const target = event.target as HTMLElement | null;\n if (\n !this.editOnDoubleClick() ||\n row.getIsGrouped() ||\n target?.closest('a, button, input, select, textarea, label, [contenteditable=\"true\"]')\n ) {\n return;\n }\n // The double click also selected a word of the cell.\n this.document.getSelection()?.removeAllRanges();\n this.editRow(row.original);\n }\n\n /** Label of a row action: \"<action> <row name>\". */\n protected actionLabel(action: string, row: T, index: number): string {\n return `${action} ${this.rowName()(row, index)}`;\n }\n\n /** Follows the form array: its events refresh the rows; the selection follows the edited rows. */\n private watchFormArray(destroyRef: DestroyRef): void {\n effect((onCleanup) => {\n const array = this.formArray();\n if (!array) {\n return;\n }\n const subscription = array.events.subscribe(() => this.formTick.update((n) => n + 1));\n this.formTick.update((n) => n + 1);\n onCleanup(() => subscription.unsubscribe());\n });\n // Selected rows replaced by their current value; removed rows leave the selection.\n effect(() => {\n const rows = this.formRows();\n if (!rows) {\n return;\n }\n untracked(() => {\n const selected = this.selected();\n if (!selected.length) {\n return;\n }\n const byKey = new Map(rows.map((r) => [this.keyOf(r), r]));\n const next = selected.map((r) => byKey.get(this.keyOf(r))).filter((r): r is T => !!r);\n if (next.length !== selected.length || next.some((r, i) => r !== selected[i])) {\n this.selected.set(next);\n }\n });\n });\n destroyRef.onDestroy(() => this.editorOpen.set(false));\n }\n\n // ---- Row and cell classes / styles ------------------------------------------------------------\n\n /** Classes and styles of a data row (`rowClass`, `rowStyle`). */\n protected rowLook(row: T, index: number): { cls: string; style: Record<string, string> | null } {\n const cls = this.rowClass();\n const style = this.rowStyle();\n return withBackground(\n sirioGridClassText(typeof cls === 'function' ? cls(row, index) : cls),\n sirioGridStyleObject(typeof style === 'function' ? style(row, index) : style),\n 'row',\n );\n }\n\n /** Classes (alignment, `cellClass`) and styles (`cellStyle`) of a data cell. */\n protected cellLook(column: SirioGridColumn<T>, row: T): { cls: string; style: Record<string, string> | null } {\n const look = withBackground(column.classOf(row), column.styleOf(row), 'cell');\n look.cls = `wm-sirio-grid-align-${column.alignment()}${look.cls ? ' ' + look.cls : ''}`;\n return look;\n }\n\n // ---- Expansion and grouping -------------------------------------------------------------------\n\n /** Expands (or collapses) every row: groups, tree rows and detail rows. */\n expandAll(expanded = true): void {\n this.expanded.set(expanded ? true : {});\n }\n\n /** Expands or collapses one row (by its row id). */\n toggleExpanded(rowId: string, expanded?: boolean): void {\n this.table.getRow(rowId, true)?.toggleExpanded(expanded);\n }\n\n protected setGrouping(keys: string[] | null): void {\n this.grouping.set(keys ?? []);\n this.page.set(1);\n }\n\n /** Group row: the column it groups by. */\n protected groupColumnOf(row: SirioGridRow<T>): SirioGridColumn<T> | undefined {\n return row.groupingColumnId ? this.columnsById().get(row.groupingColumnId) : undefined;\n }\n\n /** Text of an aggregated value (group rows). */\n protected aggregateText(column: SirioGridColumn<T>, row: SirioGridRow<T>): string {\n const value = row.getValue(this.columnId(column));\n if (value === undefined || value === null) {\n return '';\n }\n return column.aggregate() === 'count' ? this.numberFormat.format(value as number) : column.formatValue(value);\n }\n\n /** First data column of the rendered order: it holds the tree / group indentation. */\n protected readonly firstColumn = computed(() => this.visibleColumns()[0]);\n\n protected indentOf(row: SirioGridRow<T>): number {\n return row.depth * LEVEL_INDENT;\n }\n\n protected expandLabel(row: SirioGridRow<T>, text: string): string {\n return `${row.getIsExpanded() ? this.collapseRowLabel() : this.expandRowLabel()} ${text}`.trim();\n }\n\n // ---- Sorting ----------------------------------------------------------------------------------\n\n /**\n * Sorts by a column: asc → desc → none. With `sortMode=\"multiple\"` and `add` (Shift) the column\n * is added to (or cycled within) the current criteria; otherwise it replaces them.\n */\n sortBy(column: SirioGridColumn<T>, add = false): void {\n if (!column.sortable()) {\n return;\n }\n const key = column.key();\n const current = this.sort();\n const existing = current.find((s) => s.field === key);\n const next: SirioGridSort | null = !existing\n ? { field: key, direction: 'asc' }\n : existing.direction === 'asc'\n ? { field: key, direction: 'desc' }\n : null;\n if (add && this.sortMode() === 'multiple') {\n const list = existing\n ? current.flatMap((s) => (s.field === key ? (next ? [next] : []) : [s]))\n : [...current, next!];\n this.sort.set(list);\n } else if (existing && current.length === 1) {\n // Only this column sorted: asc → desc → none.\n this.sort.set(next ? [next] : []);\n } else {\n // A new column (or one of several criteria) replaces the sort.\n this.sort.set([{ field: key, direction: 'asc' }]);\n }\n this.page.set(1);\n }\n\n protected directionOf(column: SirioGridColumn<T>): 'asc' | 'desc' | null {\n return this.sort().find((s) => s.field === column.key())?.direction ?? null;\n }\n\n /** Priority (1-based) of a sorted column when more columns are sorted; 0 otherwise. */\n protected sortIndexOf(column: SirioGridColumn<T>): number {\n const sort = this.sort();\n return sort.length > 1 ? sort.findIndex((s) => s.field === column.key()) + 1 : 0;\n }\n\n protected ariaSortOf(column: SirioGridColumn<T>): string | null {\n if (!column.sortable()) {\n return null;\n }\n const direction = this.directionOf(column);\n return direction === 'asc' ? 'ascending' : direction === 'desc' ? 'descending' : 'none';\n }\n\n protected onHeaderClick(column: SirioGridColumn<T>, event: MouseEvent): void {\n this.sortBy(column, event.shiftKey || event.ctrlKey || event.metaKey);\n }\n\n /**\n * Keys of a focused header, as ag-grid: Enter / Space sort (Shift: multiple sort), Alt+arrows\n * resize, Shift+arrows move the column, Ctrl+Enter opens its filter. Alt+arrows are always taken\n * on a header: Alt+Left is \"back\" in the browsers and would leave the page (and the form).\n */\n protected onHeaderKey(column: SirioGridColumn<T>, event: KeyboardEvent): void {\n // Keys pressed on the buttons inside the header (filter) are theirs.\n if (event.target !== event.currentTarget) {\n return;\n }\n const horizontal = event.key === 'ArrowLeft' || event.key === 'ArrowRight';\n const step = event.key === 'ArrowLeft' ? -1 : 1;\n if (horizontal && event.altKey) {\n event.preventDefault();\n if (this.canResize(column)) {\n this.setColumnWidth(column, this.widthOf(column) + step * RESIZE_STEP);\n }\n return;\n }\n if (horizontal && event.shiftKey) {\n if (this.reorderable() && !this.cardMode()) {\n event.preventDefault();\n this.moveColumn(column, step, true);\n }\n return;\n }\n if (event.key === 'Enter' && event.ctrlKey) {\n event.preventDefault();\n this.openFilterOf(column);\n return;\n }\n if ((event.key === 'Enter' || event.key === ' ') && column.sortable()) {\n event.preventDefault();\n this.sortBy(column, event.shiftKey);\n }\n }\n\n /** Opens the filter of a column from its header (its button in the header or in the filter row). */\n private openFilterOf(column: SirioGridColumn<T>): void {\n const table = this.tableEl().nativeElement;\n const id = CSS.escape(this.columnId(column));\n // The header cell first; with the filter row the button is in its cell of that row.\n const button =\n table.querySelector<HTMLButtonElement>(`thead th[data-column=\"${id}\"] .wm-sirio-grid-filter-btn`) ??\n table.querySelector<HTMLButtonElement>(`thead th[data-filter-column=\"${id}\"] .wm-sirio-grid-filter-btn`);\n button?.click();\n }\n\n\n protected headerFocusable(column: SirioGridColumn<T>): boolean {\n return column.sortable() || (this.reorderable() && !this.cardMode()) || this.canResize(column);\n }\n\n protected headerHintId(column: SirioGridColumn<T>): string | null {\n const ids: string[] = [];\n if (column.sortable() && this.sortMode() === 'multiple') {\n ids.push(`${this.baseId}-hint-sort`);\n }\n if (this.reorderable() && !this.cardMode()) {\n ids.push(`${this.baseId}-hint-reorder`);\n }\n if (this.canResize(column)) {\n ids.push(`${this.baseId}-hint-resize`);\n }\n if (column.filter() && this.filterButton() !== 'none') {\n ids.push(`${this.baseId}-hint-filter`);\n }\n return ids.length ? ids.join(' ') : null;\n }\n\n\n // ---- Column order -----------------------------------------------------------------------------\n\n /** Moves a column by `delta` positions (negative = towards the start). */\n moveColumn(column: SirioGridColumn<T>, delta: number, keepFocus = false): void {\n const order = this.table.getAllLeafColumns().map((c) => c.id);\n const id = this.columnId(column);\n const from = order.indexOf(id);\n // A column moves among the columns of its block (left fixed, scrolling, right fixed).\n const side = this.fixedOf(column);\n const visible = this.visibleColumns()\n .filter((c) => this.fixedOf(c) === side)\n .map((c) => this.columnId(c));\n const fromVisible = visible.indexOf(id);\n const targetVisible = Math.min(Math.max(fromVisible + delta, 0), visible.length - 1);\n if (from < 0 || targetVisible === fromVisible) {\n return;\n }\n const targetId = visible[targetVisible];\n order.splice(from, 1);\n const to = order.indexOf(targetId) + (delta > 0 ? 1 : 0);\n order.splice(to, 0, id);\n this.applyOrder(order, column, keepFocus);\n }\n\n /** Moves a column next to another one (drag and drop). */\n private moveColumnTo(id: string, target: DropTarget): void {\n if (id === target.id) {\n return;\n }\n const order = this.table.getAllLeafColumns().map((c) => c.id);\n order.splice(order.indexOf(id), 1);\n const index = order.indexOf(target.id) + (target.side === 'after' ? 1 : 0);\n order.splice(index, 0, id);\n const column = this.columnsById().get(id);\n if (column) {\n this.applyOrder(order, column, false);\n }\n }\n\n private applyOrder(order: string[], column: SirioGridColumn<T>, keepFocus: boolean): void {\n this.columnOrder.set(order);\n const ordered = order.map((id) => this.columnsById().get(id)).filter((c) => !!c && !c.hidden());\n const block = (side: SirioGridFixed | null) => ordered.filter((c) => this.fixedOf(c!) === side);\n const visible = [...block('left'), ...block(null), ...block('right')];\n this.announcement.set(this.columnMovedLabel()(column.header(), visible.indexOf(column) + 1, visible.length));\n if (keepFocus) {\n const id = this.columnId(column);\n afterNextRender(\n () => this.tableEl().nativeElement.querySelector<HTMLElement>(`th[data-column=\"${CSS.escape(id)}\"]`)?.focus(),\n { injector: this.injector },\n );\n }\n }\n\n protected onDragStart(column: SirioGridColumn<T>, event: DragEvent): void {\n if (!this.reorderable() || this.cardMode()) {\n return;\n }\n // A drag started on the resize handle or on a button is not a column move.\n if ((event.target as HTMLElement | null)?.closest?.('.wm-sirio-grid-resizer, button')) {\n event.preventDefault();\n return;\n }\n const id = this.columnId(column);\n this.dragId.set(id);\n event.dataTransfer?.setData('text/plain', id);\n if (event.dataTransfer) {\n event.dataTransfer.effectAllowed = 'move';\n }\n }\n\n protected onDragOver(column: SirioGridColumn<T>, event: DragEvent): void {\n const dragged = this.dragId();\n const draggedColumn = dragged ? this.columnsById().get(dragged) : null;\n // No drop on a column of another block (left fixed, scrolling, right fixed).\n if (!draggedColumn || this.fixedOf(draggedColumn) !== this.fixedOf(column)) {\n return;\n }\n event.preventDefault();\n if (event.dataTransfer) {\n event.dataTransfer.dropEffect = 'move';\n }\n const id = this.columnId(column);\n const th = event.currentTarget as HTMLElement;\n const rect = th.getBoundingClientRect();\n const side = event.clientX < rect.left + rect.width / 2 ? 'before' : 'after';\n const current = this.dropTarget();\n if (id !== dragged && (current?.id !== id || current.side !== side)) {\n this.dropTarget.set({ id, side });\n }\n }\n\n protected onDrop(event: DragEvent): void {\n event.preventDefault();\n const dragged = this.dragId();\n const target = this.dropTarget();\n this.onDragEnd();\n if (dragged && target) {\n this.moveColumnTo(dragged, target);\n }\n }\n\n protected onDragEnd(): void {\n this.dragId.set(null);\n this.dropTarget.set(null);\n }\n\n // ---- Column widths ----------------------------------------------------------------------------\n\n /** Width of a column (px) in the resized / flex layout. */\n protected widthOf(column: SirioGridColumn<T>): number {\n const id = this.columnId(column);\n return (\n this.columnWidths()[id] ??\n this.flexWidths()?.[id] ??\n column.widthPx() ??\n this.naturalWidths()[id] ??\n this.table.getColumn(id)?.getSize() ??\n 150\n );\n }\n\n /**\n * Minimum width of a header with a declared pixel `width` in the automatic layout: when the table\n * is wider than the grid the browser shrinks every column towards its content, also those with a\n * width (e.g. a date column of 300px shown at 200px). The fixed layout uses the widths as they are.\n */\n protected cssMinWidthOf(column: SirioGridColumn<T>): string | null {\n const px = this.fixedLayout() ? null : column.widthPx();\n return px === null ? null : `${px}px`;\n }\n\n /** CSS width of a header: the resized width, or the declared `width`. */\n protected cssWidthOf(column: SirioGridColumn<T>): string | null {\n return this.fixedLayout() ? `${this.widthOf(column)}px` : column.width();\n }\n\n protected canResize(column: SirioGridColumn<T>): boolean {\n return this.resizable() && column.resizable() && !this.cardMode();\n }\n\n /** Sets the width of a column (clamped to its min/max); the other columns keep their width. */\n setColumnWidth(column: SirioGridColumn<T>, width: number): void {\n this.seedWidths();\n const max = column.maxWidth() ?? Number.MAX_SAFE_INTEGER;\n const clamped = Math.round(Math.min(Math.max(width, column.minWidth()), max));\n const id = this.columnId(column);\n if (this.columnWidths()[id] !== clamped) {\n this.columnWidths.set({ ...this.columnWidths(), [id]: clamped });\n }\n }\n\n /** Back to the automatic layout and the declaration order of the columns. */\n resetColumns(): void {\n this.columnWidths.set({});\n this.columnOrder.set([]);\n this.naturalWidths.set({});\n this.initialWidths = {};\n }\n\n /**\n * First resize: the current widths of every visible column become the fixed widths (the flex\n * columns keep filling the free width, unless they are resized themselves).\n */\n private seedWidths(): void {\n const current = this.columnWidths();\n const fixed = this.visibleColumns().filter((c) => !c.flex());\n if (fixed.every((c) => current[this.columnId(c)] !== undefined)) {\n return;\n }\n const seeded = { ...current };\n for (const th of Array.from(this.tableEl().nativeElement.querySelectorAll<HTMLElement>('thead th[data-column]'))) {\n const id = th.dataset['column']!;\n if (this.columnsById().get(id)?.flex()) {\n continue;\n }\n const width = Math.round(th.getBoundingClientRect().width);\n if (seeded[id] === undefined && width > 0) {\n seeded[id] = width;\n }\n this.initialWidths[id] ??= seeded[id];\n }\n for (const column of fixed) {\n const id = this.columnId(column);\n seeded[id] ??= column.widthPx() ?? this.naturalWidths()[id] ?? 150;\n this.initialWidths[id] ??= seeded[id];\n }\n this.columnWidths.set(seeded);\n }\n\n protected onResizeStart(column: SirioGridColumn<T>, event: PointerEvent): void {\n event.preventDefault();\n event.stopPropagation();\n this.seedWidths();\n const handle = event.currentTarget as HTMLElement;\n const startX = event.clientX;\n const startWidth = this.widthOf(column);\n const rtl = this.document.defaultView?.getComputedStyle(handle).direction === 'rtl';\n handle.setPointerCapture?.(event.pointerId);\n const move = (e: PointerEvent) => {\n const delta = (e.clientX - startX) * (rtl ? -1 : 1);\n this.setColumnWidth(column, startWidth + delta);\n };\n const end = () => {\n handle.removeEventListener('pointermove', move);\n handle.removeEventListener('pointerup', end);\n handle.removeEventListener('pointercancel', end);\n };\n handle.addEventListener('pointermove', move);\n handle.addEventListener('pointerup', end);\n handle.addEventListener('pointercancel', end);\n }\n\n /** Back to the width the column had before resizing (a flex column is sized by `flex` again). */\n resetColumnWidth(column: SirioGridColumn<T>): void {\n const id = this.columnId(column);\n if (column.flex()) {\n const { [id]: _removed, ...others } = this.columnWidths();\n this.columnWidths.set(others);\n return;\n }\n const initial = this.initialWidths[id] ?? column.widthPx();\n if (initial) {\n this.setColumnWidth(column, initial);\n }\n }\n\n // ---- Filters ----------------------------------------------------------------------------------\n\n /** Value of the filter of a column. */\n filterValueOf(column: SirioGridColumn<T>): unknown {\n return this.filters()[this.filterIdOf(column)] ?? null;\n }\n\n /** Sets the filter of a column (null or empty clears it). */\n setFilter(column: SirioGridColumn<T> | string, value: unknown, immediate = true): void {\n const key = typeof column === 'string' ? column : this.filterIdOf(column);\n const next = { ...this.filters() };\n if (sirioGridFilterActive(value)) {\n next[key] = value;\n } else {\n delete next[key];\n }\n if (sameJson(next, this.filters())) {\n return;\n }\n this.immediateFilter = immediate;\n this.filters.set(next);\n }\n\n /** Removes the filter of a column. */\n clearFilter(column: SirioGridColumn<T> | string): void {\n const key = typeof column === 'string' ? column : this.filterIdOf(column);\n if (key in this.operatorDrafts()) {\n const { [key]: _removed, ...others } = this.operatorDrafts();\n this.operatorDrafts.set(others);\n }\n this.setFilter(column, null);\n }\n\n // ---- Filters with operators -------------------------------------------------------------------\n\n /** Operator chosen for a column while its value is still empty (the filter is not active yet). */\n private readonly operatorDrafts = signal<Record<string, SirioGridFilterOperator>>({});\n\n /** Operators of a column filter (empty = simple filter). */\n protected operatorsOf(column: SirioGridColumn<T>): readonly SirioGridFilterOperator[] {\n return column.operatorsFor(this.filterOperators());\n }\n\n /** Label of an operator (`filterOperatorLabels` over the Italian defaults). */\n protected operatorLabel(operator: SirioGridFilterOperator): string {\n return this.filterOperatorLabels()[operator] ?? OPERATOR_LABELS[operator];\n }\n\n protected operatorOptions(column: SirioGridColumn<T>): SirioOption<SirioGridFilterOperator>[] {\n return this.operatorsOf(column).map((op) => ({ value: op, label: this.operatorLabel(op) }));\n }\n\n /**\n * Condition of a column with operators: its filter value, a simple value converted (e.g. a\n * restored state: text → contains, range → between, list → in), or the chosen / default operator.\n */\n protected conditionOf(column: SirioGridColumn<T>): SirioGridFilterCondition {\n const value = this.filterValueOf(column);\n const operators = this.operatorsOf(column);\n if (sirioIsFilterCondition(value)) {\n return value;\n }\n const draft = this.operatorDrafts()[this.filterIdOf(column)];\n const fallback = draft && operators.includes(draft) ? draft : operators[0];\n if (!sirioGridFilterActive(value)) {\n return { operator: fallback };\n }\n switch (column.filter()) {\n case 'number':\n case 'date': {\n const range = value as SirioGridRange;\n return { operator: 'between', value: range.from ?? null, to: range.to ?? null };\n }\n case 'select':\n return { operator: 'in', value };\n case 'boolean':\n return { operator: 'equals', value };\n default:\n return { operator: 'contains', value };\n }\n }\n\n /** Chooses the operator of a column filter (the value is kept, dropped for blank / not blank). */\n protected setOperator(column: SirioGridColumn<T>, operator: SirioGridFilterOperator | null): void {\n if (!operator) {\n return;\n }\n this.operatorDrafts.set({ ...this.operatorDrafts(), [this.filterIdOf(column)]: operator });\n const current = this.conditionOf(column);\n const next: SirioGridFilterCondition =\n operator === 'blank' || operator === 'notBlank'\n ? { operator }\n : operator === 'between'\n ? { operator, value: current.value ?? null, to: current.to ?? null }\n : { operator, value: current.value ?? null };\n this.setFilter(column, next);\n }\n\n /** Sets the value (or the upper bound of `between`) of a column filter with operators. */\n protected setConditionPart(column: SirioGridColumn<T>, part: 'value' | 'to', value: unknown, immediate = true): void {\n const current = this.conditionOf(column);\n this.setFilter(column, { ...current, [part]: value === '' ? null : value }, immediate);\n }\n\n // ---- Filter row -------------------------------------------------------------------------------\n\n /**\n * Field of a column in the filter row: the value of a simple condition (text, a number or a day,\n * one option, yes / no, or the value of a single-value operator), otherwise a summary of the filter\n * (e.g. \"compreso tra\", \"vuoto\", several options) changed from the popover.\n */\n protected inlineFilterOf(column: SirioGridColumn<T>): InlineFilter {\n const type = column.filter();\n const value = this.filterValueOf(column);\n const active = sirioGridFilterActive(value);\n const kind: InlineFilter['kind'] =\n type === 'number' ? 'number' : type === 'date' ? 'date' : type === 'select' || type === 'boolean' ? 'select' : 'text';\n const summary = (): InlineFilter => ({ kind: 'summary', value: null, placeholder: '', summary: this.filterText(column, value) });\n if (this.operatorsOf(column).length) {\n const condition = this.conditionOf(column);\n const op = condition.operator;\n if (op === 'between' || op === 'blank' || op === 'notBlank' || op === 'notIn') {\n return active ? summary() : { kind, value: null, placeholder: this.operatorLabel(op) };\n }\n if (op === 'in') {\n const list = Array.isArray(condition.value) ? condition.value : [];\n return list.length > 1 ? summary() : { kind, value: list[0] ?? null, placeholder: '' };\n }\n return { kind, value: condition.value ?? null, placeholder: kind === 'select' ? '' : this.operatorLabel(op) };\n }\n if (!active) {\n return { kind, value: null, placeholder: kind === 'text' ? column.filterPlaceholder() : '' };\n }\n if (kind === 'number' || kind === 'date') {\n const range = value as SirioGridRange;\n return sirioGridFilterActive(range.from) && range.from === range.to ? { kind, value: range.from, placeholder: '' } : summary();\n }\n if (Array.isArray(value)) {\n return value.length > 1 ? summary() : { kind, value: value[0] ?? null, placeholder: '' };\n }\n return { kind, value, placeholder: '' };\n }\n\n /**\n * Value typed or chosen in the filter row: the value of the current operator, or the simple\n * filter (a number or a day as a one-value range, one option as a list with `filterMultiple`).\n */\n protected setInlineFilter(column: SirioGridColumn<T>, value: unknown, immediate = true): void {\n const empty = value === null || value === undefined || value === '';\n if (this.operatorsOf(column).length) {\n const condition = this.conditionOf(column);\n if (condition.operator === 'in') {\n this.setFilter(column, empty ? null : { operator: 'in', value: [value] }, immediate);\n } else {\n this.setConditionPart(column, 'value', value, immediate);\n }\n return;\n }\n if (empty) {\n this.setFilter(column, null, immediate);\n return;\n }\n switch (column.filter()) {\n case 'number':\n case 'date':\n this.setFilter(column, { from: value, to: value }, immediate);\n break;\n case 'select':\n this.setFilter(column, column.filterMultiple() ? [value] : value, immediate);\n break;\n default:\n this.setFilter(column, value, immediate);\n }\n }\n\n // ---- State ------------------------------------------------------------------------------------\n\n /** Current state as plain JSON (`getState()`), updated on every change. */\n readonly state = computed<SirioGridState>(() => {\n const state: SirioGridState = {\n version: 1,\n sort: this.sort(),\n filters: sirioActiveGridFilters(this.filters()),\n page: this.page(),\n pageSize: this.pageSize(),\n columnOrder: this.columnOrder(),\n columnWidths: this.columnWidths(),\n grouping: this.grouping(),\n expanded: this.expanded(),\n };\n if (this.rowId() && this.selection() !== 'none') {\n const keys = this.selected().map((r) => this.keyOf(r));\n if (keys.every((k) => typeof k === 'string' || typeof k === 'number')) {\n state.selected = keys as (string | number)[];\n }\n }\n return structuredCloneSafe(state);\n });\n\n /**\n * State of the grid to save (sort, filters, page and page size, column order and widths,\n * grouping, expanded rows, keys of the selected rows), e.g. in `localStorage` or on the server.\n */\n getState(): SirioGridState {\n return untracked(this.state);\n }\n\n /**\n * Restores a saved state (only the parts present; the others stay as they are). Filters apply at\n * once, without going back to the first page; sort criteria and filters of columns that no\n * longer exist are dropped; selected keys are matched to the rows of `data` (or of the page\n * loaded from `dataSource`).\n */\n setState(state: Partial<SirioGridState> | null | undefined): void {\n if (!state) {\n return;\n }\n const columns = this.columns();\n if (state.filters) {\n const known = new Set(columns.map((c) => this.filterIdOf(c)));\n const filters = Object.fromEntries(Object.entries(state.filters).filter(([key]) => known.has(key)));\n // Applied at once and without the page reset of a filter change.\n this.appliedFilters.set(filters);\n this.immediateFilter = true;\n this.filters.set(filters);\n }\n if (state.sort) {\n const keys = new Set(columns.map((c) => c.key()));\n this.sort.set(state.sort.filter((s) => keys.has(s.field) && (s.direction === 'asc' || s.direction === 'desc')));\n }\n if (state.columnOrder) {\n this.columnOrder.set([...state.columnOrder]);\n }\n if (state.columnWidths) {\n this.columnWidths.set({ ...state.columnWidths });\n }\n if (state.grouping) {\n this.grouping.set([...state.grouping]);\n }\n if (state.expanded) {\n this.expanded.set(state.expanded === true ? true : { ...state.expanded });\n }\n if (typeof state.pageSize === 'number' && state.pageSize > 0) {\n this.pageSize.set(state.pageSize);\n }\n if (typeof state.page === 'number' && state.page > 0) {\n this.page.set(state.page);\n }\n if (state.selected && this.selection() !== 'none') {\n const keys = new Set(state.selected.map(String));\n const rows = [...(this.localRows() ?? []), ...(this.serverResult()?.rows ?? [])];\n const found = new Map<string, T>();\n rows.forEach((r) => {\n const key = String(this.keyOf(r));\n if (keys.has(key) && !found.has(key)) {\n found.set(key, r);\n }\n });\n const selected = [...found.values()];\n this.selected.set(this.selection() === 'single' ? selected.slice(0, 1) : selected);\n }\n }\n\n /** Back to the initial state: no sort, filters, grouping, expansion or selection, first page, columns as declared. */\n resetState(): void {\n this.setState({ sort: [], filters: {}, grouping: [], expanded: {}, page: 1 });\n this.resetColumns();\n if (this.selection() !== 'none') {\n this.selected.set([]);\n }\n }\n\n /** Removes every column filter. */\n clearFilters(): void {\n this.operatorDrafts.set({});\n if (Object.keys(this.filters()).length) {\n this.immediateFilter = true;\n this.filters.set({});\n }\n }\n\n /**\n * Choices of a select filter: `filterOptions`, or the values present in the column (TanStack\n * faceted values, with the other filters applied) with their count.\n */\n protected filterOptionsOf(column: SirioGridColumn<T>): SirioOption[] {\n const options = column.filterOptions();\n if (options.length) {\n return options;\n }\n const facets = this.table.getColumn(this.columnId(column))?.getFacetedUniqueValues() ?? new Map<unknown, number>();\n if (column.formatName() === 'map' && column.formatOptions()?.values) {\n // Every code of the map, with the value type of the data (object keys are texts).\n const present = [...facets.keys()];\n return sirioGridMapOptions(column.formatOptions()!.values).map((option) => {\n const value = present.find((v) => String(v) === String(option.value)) ?? option.value;\n return { value, label: `${option.label} (${this.numberFormat.format(facets.get(value) ?? 0)})` };\n });\n }\n const selected = this.filterValueOf(column);\n const chosen = Array.isArray(selected) ? selected : selected === null ? [] : [selected];\n const values = new Map(facets);\n // A chosen value stays in the list even when the other filters exclude it.\n chosen.forEach((v) => values.set(v, values.get(v) ?? 0));\n return [...values.entries()]\n .filter(([value]) => value !== null && value !== undefined && value !== '')\n .sort(([a], [b]) => this.defaultCompare(a, b))\n .map(([value, count]) => ({ value, label: `${column.formatValue(value)} (${this.numberFormat.format(count)})` }));\n }\n\n protected rangeOf(column: SirioGridColumn<T>): SirioGridRange {\n return (this.filterValueOf(column) as SirioGridRange | null) ?? {};\n }\n\n protected setRange(column: SirioGridColumn<T>, bound: 'from' | 'to', value: unknown): void {\n const range = { ...this.rangeOf(column), [bound]: value === '' ? null : value };\n this.setFilter(column, range);\n }\n\n protected filterButtonLabel(column: SirioGridColumn<T>, inRow = false): string {\n const label = `${inRow ? this.filterMoreLabel() : this.filterLabel()} ${column.header()}`;\n return this.isFiltered(column) ? `${label} (${this.filterActiveLabel()})` : label;\n }\n\n protected filterIndex(column: SirioGridColumn<T>): number {\n return this.columns().indexOf(column);\n }\n\n protected isFiltered(column: SirioGridColumn<T>): boolean {\n return sirioGridFilterActive(this.filters()[this.filterIdOf(column)]);\n }\n\n /** Moves the focus into the filter popover of a column when it opens. */\n protected focusFilter(column: SirioGridColumn<T>): void {\n const panel = this.document.getElementById(`${this.baseId}-filter-${this.filterIndex(column)}`);\n panel?.querySelector<HTMLElement>('input, button.sirio-dropdown-select, select')?.focus();\n }\n\n /** A 'yyyy-MM-dd' day in the date format of `LOCALE_ID`. */\n private formatIsoDay(value: string): string {\n const [y, m, d] = value.slice(0, 10).split('-').map(Number);\n return y && m && d ? this.dateFormat.format(new Date(y, m - 1, d)) : value;\n }\n\n protected onChipRemoved(chip: SirioFilterChip): void {\n this.clearFilter(chip.value as string);\n }\n\n /** Text of a value of a column filter (number, date, select / boolean labels). */\n private filterValueText(column: SirioGridColumn<T>, value: unknown): string {\n switch (column.filter()) {\n case 'number':\n return this.numberFormat.format(Number(value));\n case 'date':\n return this.formatIsoDay(String(value));\n case 'boolean':\n return value ? this.filterYesLabel() : this.filterNoLabel();\n case 'select': {\n const options = column.filterOptions();\n const label = (v: unknown) => options.find((o) => o.value === v)?.label ?? column.formatValue(v);\n return Array.isArray(value) ? value.map(label).join(', ') : label(value);\n }\n default:\n return String(value);\n }\n }\n\n /** Text of a filter value in its chip. */\n protected filterText(column: SirioGridColumn<T>, value: unknown): string {\n if (sirioIsFilterCondition(value)) {\n const label = this.operatorLabel(value.operator).toLowerCase();\n if (value.operator === 'blank' || value.operator === 'notBlank') {\n return label;\n }\n if (value.operator === 'between') {\n const from = sirioGridFilterActive(value.value) ? this.filterValueText(column, value.value) : null;\n const to = sirioGridFilterActive(value.to) ? this.filterValueText(column, value.to) : null;\n if (from && to) {\n return `${label} ${from} ${this.filterAndLabel()} ${to}`;\n }\n return from\n ? `${this.filterFromLabel().toLowerCase()} ${from}`\n : `${this.filterToLabel().toLowerCase()} ${to}`;\n }\n return `${label} ${this.filterValueText(column, value.value)}`;\n }\n switch (column.filter()) {\n case 'number':\n case 'date': {\n const range = value as SirioGridRange;\n const show = (v: unknown) =>\n column.filter() === 'date' ? this.formatIsoDay(String(v)) : this.numberFormat.format(Number(v));\n const parts = [];\n if (sirioGridFilterActive(range.from)) {\n parts.push(`${this.filterFromLabel().toLowerCase()} ${show(range.from)}`);\n }\n if (sirioGridFilterActive(range.to)) {\n parts.push(`${this.filterToLabel().toLowerCase()} ${show(range.to)}`);\n }\n return parts.join(' ');\n }\n case 'boolean':\n return value ? this.filterYesLabel() : this.filterNoLabel();\n case 'select': {\n const options = column.filterOptions();\n const label = (v: unknown) => options.find((o) => o.value === v)?.label ?? column.formatValue(v);\n return Array.isArray(value) ? value.map(label).join(', ') : label(value);\n }\n default:\n return String(value);\n }\n }\n\n // ---- Misc -------------------------------------------------------------------------------------\n\n protected onRowActivate(row: SirioGridRow<T>, index: number, event: MouseEvent | KeyboardEvent): void {\n if (row.getIsGrouped()) {\n return;\n }\n const target = event.target as HTMLElement | null;\n if (target?.closest('a, button, input, select, textarea, label, [contenteditable=\"true\"]')) {\n return;\n }\n if (this.clickSelect()) {\n this.toggleRow(row.original);\n }\n this.rowClick.emit({ row: row.original, index, event });\n }\n\n /** Space / Enter on a focused row selects it (rows without the checkbox column). */\n protected onRowKey(row: SirioGridRow<T>, index: number, event: KeyboardEvent): void {\n const target = event.target as HTMLElement;\n // The row itself, or one of its cells with the keyboard navigation.\n const onRow = target === event.currentTarget || (this.navigation() && target.tagName === 'TD' && target.parentElement === event.currentTarget);\n if (!this.keySelect() || !onRow || (event.key !== ' ' && event.key !== 'Enter')) {\n return;\n }\n event.preventDefault();\n this.onRowActivate(row, index, event);\n }\n\n /**\n * Focus inside the grid (keyboard navigation): the focused cell is scrolled fully into\n * view, out from under the fixed blocks and the fixed header. The browser scrolls a partly visible\n * element only when it is fully out of view, and does not know about the sticky cells.\n */\n protected revealFocused(event: FocusEvent): void {\n const el = this.scroller()?.nativeElement;\n const cell = (event.target as HTMLElement | null)?.closest?.('td, th') as HTMLElement | null;\n if (!el || !cell || !el.contains(cell)) {\n return;\n }\n const box = el.getBoundingClientRect();\n const rect = cell.getBoundingClientRect();\n if (!cell.classList.contains('wm-sirio-grid-pin')) {\n const pins = this.pinBlockWidths();\n const left = box.left + el.clientLeft + pins.left;\n const right = box.left + el.clientLeft + el.clientWidth - pins.right;\n if (rect.left < left) {\n el.scrollLeft -= left - rect.left;\n } else if (rect.right > right) {\n // A cell wider than the free room shows its start.\n el.scrollLeft += Math.min(rect.right - right, rect.left - left);\n }\n }\n if (cell.parentElement?.parentElement?.tagName === 'TBODY') {\n const top = box.top + el.clientTop + (this.stickyHeader() ? this.headerHeight() : 0);\n const bottom = box.top + el.clientTop + el.clientHeight;\n if (rect.top < top) {\n el.scrollTop -= top - rect.top;\n } else if (rect.bottom > bottom) {\n el.scrollTop += Math.min(rect.bottom - bottom, rect.top - top);\n }\n }\n }\n\n protected onPaged(): void {\n this.scroller()?.nativeElement.scrollTo?.({ top: 0 });\n }\n\n protected updateOverflow(): void {\n const el = this.scroller()?.nativeElement;\n if (!el) {\n return;\n }\n if (el.clientWidth !== this.containerWidth()) {\n this.containerWidth.set(el.clientWidth);\n }\n // Overflow from the table width: the kit scroll markers are 8px wide boxes in the container and\n // would otherwise keep themselves visible when the table fits (e.g. flex columns).\n const overflowing = this.tableEl().nativeElement.offsetWidth > el.clientWidth + 1;\n const max = el.scrollWidth - el.clientWidth;\n const start = overflowing && el.scrollLeft > 0;\n const end = overflowing && max > 0 && Math.ceil(el.scrollLeft) < max;\n if (start !== this.overflowStart()) {\n this.overflowStart.set(start);\n }\n if (end !== this.overflowEnd()) {\n this.overflowEnd.set(end);\n }\n }\n\n /**\n * Total after a server page: the one of the response, otherwise found from the pages received for\n * the same query (as ag-grid infinite model): a page shorter than `pageSize` is the last one, a full\n * page leaves the total open.\n */\n private nextServerTotal(query: SirioGridQuery, page: SirioGridResult<T>): ServerTotal {\n const key = JSON.stringify([query.sort, query.filters, query.pageSize]);\n if (typeof page.total === 'number' && page.total >= 0) {\n return { key, total: page.total, exact: true, given: true };\n }\n const end = query.offset + page.rows.length;\n const full = query.pageSize > 0 && page.rows.length >= query.pageSize;\n if (!full) {\n return { key, total: end, exact: true, given: false };\n }\n // Only totals found from the pages carry over (a total given by the server is not a page end).\n const previous = untracked(this.serverTotal);\n const same = previous?.key === key && !previous.given;\n if (same && previous!.exact && previous!.total >= end) {\n return previous!; // the last page is already known\n }\n return { key, total: Math.max(end, same ? previous!.total : 0), exact: false, given: false };\n }\n\n private load(source: SirioGridDataSource<T> | null, query: SirioGridQuery): void {\n this.subscription?.unsubscribe();\n this.subscription = null;\n const request = ++this.request;\n if (!source) {\n this.serverLoading.set(false);\n this.serverResult.set(null);\n this.serverTotal.set(null);\n this.serverError.set(null);\n return;\n }\n const done = (result: SirioGridResult<T> | null, error?: unknown) => {\n if (request !== this.request) {\n return; // outdated response\n }\n this.serverLoading.set(false);\n if (error !== undefined) {\n // No rows; the known total stays, so the pagination can still go back.\n this.serverResult.set({ rows: [] });\n this.serverError.set({ error });\n this.loadError.emit(error);\n return;\n }\n const page = result ?? { rows: [] };\n this.serverError.set(null);\n this.serverResult.set(page);\n this.serverTotal.set(this.nextServerTotal(query, page));\n };\n this.serverLoading.set(true);\n let response: ReturnType<SirioGridDataSource<T>>;\n try {\n response = source(query);\n } catch (error) {\n done(null, error);\n return;\n }\n if (isObservable(response)) {\n let received = false;\n this.subscription = response.subscribe({\n next: (result) => {\n received = true;\n done(result);\n },\n error: (error) => done(null, error ?? new Error('Data source error')),\n complete: () => {\n if (!received) {\n done(null);\n }\n },\n });\n } else if (response && typeof (response as Promise<unknown>).then === 'function') {\n (response as Promise<SirioGridResult<T>>).then(\n (result) => done(result),\n (error) => done(null, error ?? new Error('Data source error')),\n );\n } else {\n done(response as SirioGridResult<T>);\n }\n }\n}\n\n/** The grid with its column and template directives, for `imports: [SIRIO_DATA_GRID]`. */\nexport const SIRIO_DATA_GRID = [\n SirioDataGrid,\n SirioGridColumn,\n SirioGridCell,\n SirioGridHeader,\n SirioGridEmpty,\n SirioGridDetail,\n SirioGridEditor,\n SirioGridError,\n] as const;\n\n/** Field of a column in the filter row (`inlineFilterOf`). */\ninterface InlineFilter {\n kind: 'text' | 'number' | 'date' | 'select' | 'summary';\n value: unknown;\n placeholder: string;\n summary?: string;\n}\n","<!-- Controls of a column filter: in the header popover (labelled = false) or in the card panel. -->\n<ng-template #filterControls let-column let-labelled=\"labelled\">\n @if (operatorsOf(column).length) {\n <ng-container *ngTemplateOutlet=\"conditionControls; context: { $implicit: column, labelled: labelled }\" />\n } @else {\n @switch (column.filter()) {\n @case ('number') {\n <ng-container *ngTemplateOutlet=\"range; context: { $implicit: column, labelled: labelled, date: false }\" />\n }\n @case ('date') {\n <ng-container *ngTemplateOutlet=\"range; context: { $implicit: column, labelled: labelled, date: true }\" />\n }\n @case ('select') {\n <!-- Without filterOptions: the values present in the column (TanStack faceted values). -->\n <wm-sirio-select\n [label]=\"labelled ? column.header() : ''\"\n [ariaLabel]=\"labelled ? null : filterLabel() + ' ' + column.header()\"\n [options]=\"filterOptionsOf(column)\"\n [multiple]=\"column.filterMultiple()\"\n [placeholder]=\"filterAllLabel()\"\n [ngModelOptions]=\"{ standalone: true }\"\n [ngModel]=\"filterValueOf(column)\"\n (ngModelChange)=\"setFilter(column, $event)\"\n />\n }\n @case ('boolean') {\n <wm-sirio-select\n [label]=\"labelled ? column.header() : ''\"\n [ariaLabel]=\"labelled ? null : filterLabel() + ' ' + column.header()\"\n [options]=\"booleanOptions()\"\n [placeholder]=\"filterAllLabel()\"\n [ngModelOptions]=\"{ standalone: true }\"\n [ngModel]=\"filterValueOf(column)\"\n (ngModelChange)=\"setFilter(column, $event)\"\n />\n }\n @default {\n <wm-sirio-textbox\n type=\"search\"\n [label]=\"labelled ? column.header() : ''\"\n [ariaLabel]=\"labelled ? null : filterLabel() + ' ' + column.header()\"\n [placeholder]=\"column.filterPlaceholder()\"\n [ngModelOptions]=\"{ standalone: true }\"\n [ngModel]=\"filterValueOf(column) ?? ''\"\n (ngModelChange)=\"setFilter(column, $event, false)\"\n />\n }\n }\n }\n</ng-template>\n\n<!-- Filter with operators: \"Condizione\" choice, then the value (two bounds for \"Compreso tra\", none for \"Vuoto\"). -->\n<ng-template #conditionControls let-column let-labelled=\"labelled\">\n @let condition = conditionOf(column);\n @let op = condition.operator;\n <fieldset class=\"wm-sirio-grid-filter-range\">\n <legend [class.sr-only]=\"!labelled\" class=\"sirio-label\">{{ column.header() }}</legend>\n <wm-sirio-select\n [label]=\"filterConditionLabel()\"\n [options]=\"operatorOptions(column)\"\n [ngModelOptions]=\"{ standalone: true }\"\n [ngModel]=\"op\"\n (ngModelChange)=\"setOperator(column, $event)\"\n />\n @if (op !== 'blank' && op !== 'notBlank') {\n @switch (column.filter()) {\n @case ('number') {\n <wm-sirio-number\n [label]=\"op === 'between' ? filterFromLabel() : filterValueLabel()\"\n [ngModelOptions]=\"{ standalone: true }\"\n [ngModel]=\"condition.value ?? null\"\n (ngModelChange)=\"setConditionPart(column, 'value', $event)\"\n />\n @if (op === 'between') {\n <wm-sirio-number [label]=\"filterToLabel()\" [ngModelOptions]=\"{ standalone: true }\" [ngModel]=\"condition.to ?? null\" (ngModelChange)=\"setConditionPart(column, 'to', $event)\" />\n }\n }\n @case ('date') {\n <wm-sirio-date\n [label]=\"op === 'between' ? filterFromLabel() : filterValueLabel()\"\n [max]=\"op === 'between' ? ($any(condition.to) ?? null) : null\"\n [ngModelOptions]=\"{ standalone: true }\"\n [ngModel]=\"condition.value ?? null\"\n (ngModelChange)=\"setConditionPart(column, 'value', $event)\"\n />\n @if (op === 'between') {\n <wm-sirio-date\n [label]=\"filterToLabel()\"\n [min]=\"$any(condition.value) ?? null\"\n [ngModelOptions]=\"{ standalone: true }\"\n [ngModel]=\"condition.to ?? null\"\n (ngModelChange)=\"setConditionPart(column, 'to', $event)\"\n />\n }\n }\n @case ('select') {\n <wm-sirio-select\n [label]=\"filterValueLabel()\"\n [options]=\"filterOptionsOf(column)\"\n [multiple]=\"column.filterMultiple()\"\n [placeholder]=\"filterAllLabel()\"\n [ngModelOptions]=\"{ standalone: true }\"\n [ngModel]=\"condition.value ?? null\"\n (ngModelChange)=\"setConditionPart(column, 'value', $event)\"\n />\n }\n @case ('boolean') {\n <wm-sirio-select\n [label]=\"filterValueLabel()\"\n [options]=\"booleanOptions()\"\n [placeholder]=\"filterAllLabel()\"\n [ngModelOptions]=\"{ standalone: true }\"\n [ngModel]=\"condition.value ?? null\"\n (ngModelChange)=\"setConditionPart(column, 'value', $event)\"\n />\n }\n @default {\n <wm-sirio-textbox\n type=\"search\"\n [label]=\"filterValueLabel()\"\n [placeholder]=\"column.filterPlaceholder()\"\n [ngModelOptions]=\"{ standalone: true }\"\n [ngModel]=\"condition.value ?? ''\"\n (ngModelChange)=\"setConditionPart(column, 'value', $event, false)\"\n />\n }\n }\n }\n </fieldset>\n</ng-template>\n\n<!-- Range filter (number / date): \"Da\" and \"A\", grouped by the column header in the card panel. -->\n<ng-template #range let-column let-labelled=\"labelled\" let-date=\"date\">\n @let value = rangeOf(column);\n <fieldset class=\"wm-sirio-grid-filter-range\">\n <legend [class.sr-only]=\"!labelled\" class=\"sirio-label\">{{ column.header() }}</legend>\n @if (date) {\n <wm-sirio-date [label]=\"filterFromLabel()\" [max]=\"$any(value.to) ?? null\" [ngModelOptions]=\"{ standalone: true }\" [ngModel]=\"value.from ?? null\" (ngModelChange)=\"setRange(column, 'from', $event)\" />\n <wm-sirio-date [label]=\"filterToLabel()\" [min]=\"$any(value.from) ?? null\" [ngModelOptions]=\"{ standalone: true }\" [ngModel]=\"value.to ?? null\" (ngModelChange)=\"setRange(column, 'to', $event)\" />\n } @else {\n <wm-sirio-number [label]=\"filterFromLabel()\" [ngModelOptions]=\"{ standalone: true }\" [ngModel]=\"value.from ?? null\" (ngModelChange)=\"setRange(column, 'from', $event)\" />\n <wm-sirio-number [label]=\"filterToLabel()\" [ngModelOptions]=\"{ standalone: true }\" [ngModel]=\"value.to ?? null\" (ngModelChange)=\"setRange(column, 'to', $event)\" />\n }\n </fieldset>\n</ng-template>\n\n<!-- Filter button of a column with its popover (in the header, or in the filter row with `filterRow`). -->\n<ng-template #filterBtnTpl let-column let-inRow=\"inRow\">\n <button\n wmSirioButton=\"ghost\"\n size=\"small\"\n type=\"button\"\n icon=\"fa-filter\"\n iconOnly\n class=\"wm-sirio-grid-filter-btn\"\n draggable=\"false\"\n [class.wm-sirio-grid-filter-active]=\"isFiltered(column)\"\n [white]=\"variant() === 'dark'\"\n [label]=\"filterButtonLabel(column, inRow)\"\n [wmSirioPopover]=\"filterPanel\"\n [popoverTitle]=\"filterLabel() + ' ' + column.header()\"\n popoverPlacement=\"bottom-end\"\n (opened)=\"focusFilter(column)\"\n (click)=\"$event.stopPropagation()\"\n ></button>\n <ng-template #filterPanel>\n <div class=\"wm-sirio-grid-filter-panel\" [id]=\"baseId + '-filter-' + filterIndex(column)\">\n <ng-container *ngTemplateOutlet=\"filterControls; context: { $implicit: column, labelled: false }\" />\n <button wmSirioButton=\"tertiary-light\" size=\"small\" type=\"button\" class=\"wm-sirio-grid-filter-clear\" [disabled]=\"!isFiltered(column)\" (click)=\"clearFilter(column)\">\n {{ clearFilterLabel() }}\n </button>\n </div>\n </ng-template>\n</ng-template>\n\n<!-- Cell of the filter row: the simple condition in a field, the others as a summary (the button opens the popover). -->\n<ng-template #filterRowCell let-column>\n @let inline = inlineFilterOf(column);\n @let aria = filterLabel() + ' ' + column.header();\n <div class=\"wm-sirio-grid-filter-inline\" (keydown.escape)=\"clearFilter(column)\">\n @switch (inline.kind) {\n @case ('summary') {\n <span class=\"wm-sirio-grid-filter-summary\" [attr.title]=\"inline.summary\">{{ inline.summary }}</span>\n }\n @case ('number') {\n <wm-sirio-number [ariaLabel]=\"aria\" [placeholder]=\"inline.placeholder\" [ngModelOptions]=\"{ standalone: true }\" [ngModel]=\"inline.value\" (ngModelChange)=\"setInlineFilter(column, $event)\" />\n }\n @case ('date') {\n <wm-sirio-date [ariaLabel]=\"aria\" [ngModelOptions]=\"{ standalone: true }\" [ngModel]=\"inline.value\" (ngModelChange)=\"setInlineFilter(column, $event)\" />\n }\n @case ('select') {\n <wm-sirio-select\n [ariaLabel]=\"aria\"\n [options]=\"column.filter() === 'boolean' ? booleanOptions() : filterOptionsOf(column)\"\n [placeholder]=\"filterAllLabel()\"\n [ngModelOptions]=\"{ standalone: true }\"\n [ngModel]=\"inline.value\"\n (ngModelChange)=\"setInlineFilter(column, $event)\"\n />\n }\n @default {\n <wm-sirio-textbox\n type=\"search\"\n [ariaLabel]=\"aria\"\n [placeholder]=\"inline.placeholder\"\n [ngModelOptions]=\"{ standalone: true }\"\n [ngModel]=\"inline.value ?? ''\"\n (ngModelChange)=\"setInlineFilter(column, $event, false)\"\n />\n }\n }\n <ng-container *ngTemplateOutlet=\"filterBtnTpl; context: { $implicit: column, inRow: true }\" />\n </div>\n</ng-template>\n\n<!-- Expand / collapse button of a row (tree rows, groups, detail rows). -->\n<ng-template #toggle let-row let-text=\"text\">\n <button\n type=\"button\"\n class=\"wm-sirio-grid-toggle\"\n [attr.aria-expanded]=\"row.getIsExpanded()\"\n [attr.aria-label]=\"expandLabel(row, text)\"\n [attr.title]=\"expandLabel(row, text)\"\n (click)=\"row.toggleExpanded()\"\n >\n <span [class]=\"row.getIsExpanded() ? 'fas fa-chevron-down' : 'fas fa-chevron-right'\" aria-hidden=\"true\"></span>\n </button>\n</ng-template>\n\n@let groups = groupableColumns().length > 0 && !server();\n@let expandTools = activeGrouping().length > 0 || treeMode() || hasDetail();\n@let formTools = canAdd() || deletableSelected().length > 0;\n@if (groups || expandTools || formTools || ((resizable() || reorderable()) && columnsCustomized())) {\n <div class=\"wm-sirio-grid-toolbar\">\n @if (groups) {\n <wm-sirio-select\n class=\"wm-sirio-grid-groupby\"\n [label]=\"groupByLabel()\"\n [options]=\"groupOptions()\"\n multiple\n [ngModelOptions]=\"{ standalone: true }\"\n [ngModel]=\"grouping()\"\n (ngModelChange)=\"setGrouping($event)\"\n />\n }\n <div class=\"wm-sirio-grid-toolbar-actions\">\n @if (canAdd()) {\n <button wmSirioButton=\"secondary\" size=\"small\" type=\"button\" icon=\"fa-plus\" iconPosition=\"start\" (click)=\"addRow()\">\n {{ addLabel() }}\n </button>\n }\n @if (deletableSelected().length) {\n <button wmSirioButton=\"tertiary\" size=\"small\" type=\"button\" icon=\"fa-trash\" iconPosition=\"start\" (click)=\"deleteSelected()\">\n {{ deleteSelectedLabel() }} ({{ deletableSelected().length }})\n </button>\n }\n @if (expandTools) {\n <button wmSirioButton=\"tertiary\" size=\"small\" type=\"button\" icon=\"fa-angle-double-down\" iconPosition=\"start\" (click)=\"expandAll(true)\">\n {{ expandAllLabel() }}\n </button>\n <button wmSirioButton=\"tertiary\" size=\"small\" type=\"button\" icon=\"fa-angle-double-up\" iconPosition=\"start\" (click)=\"expandAll(false)\">\n {{ collapseAllLabel() }}\n </button>\n }\n @if ((resizable() || reorderable()) && columnsCustomized()) {\n <button wmSirioButton=\"tertiary\" size=\"small\" type=\"button\" icon=\"fa-undo\" iconPosition=\"start\" (click)=\"resetColumns()\">\n {{ resetColumnsLabel() }}\n </button>\n }\n </div>\n </div>\n}\n\n@if (filterColumns().length && cardMode() && filterButton() !== 'none') {\n <!-- Card layout: the header (and its filter buttons) is hidden by the kit, filters go here. -->\n <div class=\"wm-sirio-grid-filters-mobile\">\n <button\n wmSirioButton=\"secondary\"\n size=\"small\"\n type=\"button\"\n icon=\"fa-filter\"\n iconPosition=\"start\"\n [attr.aria-expanded]=\"filtersOpen()\"\n [attr.aria-controls]=\"filtersOpen() ? baseId + '-filters' : null\"\n (click)=\"filtersOpen.set(!filtersOpen())\"\n >\n {{ filtersLabel() }}@if (filterChips().length) {&ngsp;({{ filterChips().length }})}\n </button>\n @if (filtersOpen()) {\n <div class=\"wm-sirio-grid-filters-panel\" role=\"group\" [id]=\"baseId + '-filters'\" [attr.aria-label]=\"filtersLabel()\">\n @for (column of filterColumns(); track column) {\n <ng-container *ngTemplateOutlet=\"filterControls; context: { $implicit: column, labelled: true }\" />\n }\n </div>\n }\n </div>\n}\n@if (showFilterChips() && !filterRowActive() && filterChips().length) {\n <div class=\"wm-sirio-grid-chips\">\n <wm-sirio-filter-chips [chips]=\"filterChips()\" [label]=\"filtersLabel()\" (removed)=\"onChipRemoved($event)\" />\n @if (filterChips().length > 1) {\n <button wmSirioButton=\"tertiary\" size=\"small\" type=\"button\" (click)=\"clearFilters()\">{{ clearFiltersLabel() }}</button>\n }\n </div>\n}\n<div\n #scroller\n class=\"wm-sirio-grid-scroller\"\n [class.sirio-table-responsive]=\"responsive() && !cardMode()\"\n [class.sirio-table-overflow-start]=\"responsive() && !cardMode() && overflowStart()\"\n [class.sirio-table-overflow-end]=\"responsive() && !cardMode() && overflowEnd()\"\n [class.sirio-table-th-fixed]=\"stickyHeader() && !cardMode()\"\n [class.wm-sirio-grid-pinned-left]=\"hasPinLeft()\"\n [class.wm-sirio-grid-pinned-right]=\"hasPinRight()\"\n (scroll)=\"updateOverflow()\"\n (focusin)=\"navigation() && revealFocused($event)\"\n [style.--wm-grid-pin-left]=\"pinBlockWidths().left + 'px'\"\n [style.--wm-grid-pin-right]=\"pinBlockWidths().right + 'px'\"\n>\n <table\n #table\n class=\"sirio-table\"\n [class.sirio-table-dark]=\"variant() === 'dark'\"\n [class.sirio-table-light]=\"variant() === 'striped'\"\n [class.sirio-table-xs]=\"size() === 'xs'\"\n [class.sirio-table-sm]=\"size() === 'sm'\"\n [class.sirio-table-lg]=\"size() === 'lg'\"\n [class.sirio-table-card]=\"cardOnMobile()\"\n [class.wm-sirio-grid-card-active]=\"cardMode()\"\n [class.wm-sirio-grid-selectable]=\"selection() !== 'none'\"\n [class.wm-sirio-grid-fixed-layout]=\"fixedLayout()\"\n [class.wm-sirio-grid-grouped]=\"headerDepth() > 0\"\n [class.wm-sirio-grid-filter-hover]=\"filterButton() === 'hover'\"\n [style.width.px]=\"tableWidth()\"\n [attr.aria-busy]=\"isLoading() || null\"\n [attr.role]=\"gridRole()\"\n [attr.aria-multiselectable]=\"gridRole() && selection() === 'multiple' ? true : null\"\n >\n @if (caption()) {\n <caption [class.sr-only]=\"!captionVisible()\">{{ caption() }}</caption>\n }\n @if (fixedLayout()) {\n <!-- Fixed layout: the widths come from the columns (the first header row may be a group row). -->\n <colgroup>\n @if (checkColumn()) {\n <col [style.width.px]=\"toolColumnWidth\" />\n }\n @if (hasDetail()) {\n <col [style.width.px]=\"toolColumnWidth\" />\n }\n @if (rowNumbers()) {\n <col [style.width.px]=\"rowNumberWidth\" />\n }\n @for (column of visibleColumns(); track column) {\n <col [style.width.px]=\"widthOf(column)\" />\n }\n @if (actionsColumn()) {\n <col [style.width.px]=\"actionsWidth()\" />\n }\n </colgroup>\n }\n <thead>\n <!-- Grouped headers: a row per group level, then the column headers (rowspan below shorter group paths). -->\n @for (headerRow of headerRows(); track $index; let r = $index) {\n <tr>\n @if (r === 0) {\n @if (checkColumn()) {\n <th scope=\"col\" class=\"w-0 wm-sirio-grid-check-col\" wmSirioGridPin=\"__select\" [attr.rowspan]=\"headerRowspan()\">\n @if (selection() === 'multiple') {\n <div class=\"sirio-table-check\">\n <div class=\"sirio-form-check\">\n <input\n type=\"checkbox\"\n [id]=\"baseId + '-all'\"\n [checked]=\"allPageSelected()\"\n [indeterminate]=\"pageSelectedCount() > 0 && !allPageSelected()\"\n [disabled]=\"!selectableRows().length\"\n (change)=\"toggleAll($any($event.target).checked)\"\n />\n <label [attr.for]=\"baseId + '-all'\"><span class=\"sr-only\">{{ selectAllText() }}</span></label>\n </div>\n </div>\n } @else {\n <span class=\"sr-only\">{{ selectionHeaderLabel() }}</span>\n }\n </th>\n }\n @if (hasDetail()) {\n <th scope=\"col\" class=\"w-0 wm-sirio-grid-expand-col\" wmSirioGridPin=\"__expand\" [attr.rowspan]=\"headerRowspan()\"><span class=\"sr-only\">{{ expandRowLabel() }}</span></th>\n }\n @if (rowNumbers()) {\n <th scope=\"col\" class=\"w-0 wm-sirio-grid-rownum-col\" wmSirioGridPin=\"__rownum\" [attr.rowspan]=\"headerRowspan()\">\n <span aria-hidden=\"true\">{{ rowNumberHeader() }}</span><span class=\"sr-only\">{{ rowNumberLabel() }}</span>\n </th>\n }\n }\n @for (cell of headerRow; track cell.track) {\n @if (cell.kind === 'group') {\n <th\n scope=\"colgroup\"\n class=\"wm-sirio-grid-group-th\"\n [attr.colspan]=\"cell.colspan > 1 ? cell.colspan : null\"\n [wmSirioGridPin]=\"cell.pin\"\n [style.top.px]=\"headerTop(r)\"\n >\n {{ cell.label }}\n </th>\n } @else {\n @let column = cell.column;\n @let direction = directionOf(column);\n @let id = columnId(column);\n @let drop = dropTarget();\n <th\n scope=\"col\"\n [attr.data-column]=\"id\"\n [attr.rowspan]=\"cell.rowspan > 1 ? cell.rowspan : null\"\n [style.top.px]=\"headerTop(r)\"\n [wmSirioGridPin]=\"id\"\n [class]=\"'wm-sirio-grid-align-' + column.alignment() + ' ' + column.headerClassText()\"\n [style]=\"column.headerStyleObject()\"\n [class.sirio-sorting]=\"column.sortable()\"\n [class.sirio-sorting-asc]=\"direction === 'asc'\"\n [class.sirio-sorting-desc]=\"direction === 'desc'\"\n [class.wm-sirio-grid-th-resizable]=\"canResize(column)\"\n [class.wm-sirio-grid-fit]=\"column.fit()\"\n [class.wm-sirio-grid-th-draggable]=\"reorderable() && !cardMode()\"\n [class.wm-sirio-grid-th-dragging]=\"dragId() === id\"\n [class.wm-sirio-grid-drop-before]=\"drop?.id === id && drop?.side === 'before'\"\n [class.wm-sirio-grid-drop-after]=\"drop?.id === id && drop?.side === 'after'\"\n [style.width]=\"cssWidthOf(column)\"\n [style.min-width]=\"cssMinWidthOf(column)\"\n [attr.aria-sort]=\"ariaSortOf(column)\"\n [attr.aria-describedby]=\"headerHintId(column)\"\n [attr.tabindex]=\"headerFocusable(column) ? 0 : null\"\n [attr.draggable]=\"reorderable() && !cardMode() ? 'true' : null\"\n (click)=\"onHeaderClick(column, $event)\"\n (keydown)=\"onHeaderKey(column, $event)\"\n (dragstart)=\"onDragStart(column, $event)\"\n (dragover)=\"onDragOver(column, $event)\"\n (drop)=\"onDrop($event)\"\n (dragend)=\"onDragEnd()\"\n >\n <!-- One line: the title is cut with an ellipsis, sort index and filter button stay visible. -->\n <span class=\"wm-sirio-grid-th-inner\">\n <span class=\"wm-sirio-grid-th-label\" [attr.title]=\"column.header()\">\n @if (column.headerTemplate(); as header) {\n <ng-container *ngTemplateOutlet=\"header; context: { $implicit: column }\" />\n } @else {\n {{ column.header() }}\n }\n </span>\n @if (sortIndexOf(column); as sortIndex) {\n <span class=\"wm-sirio-grid-sort-index\" aria-hidden=\"true\">{{ sortIndex }}</span>\n }\n @if (column.filter() && !filterRowActive() && filterButton() !== 'none') {\n <ng-container *ngTemplateOutlet=\"filterBtnTpl; context: { $implicit: column }\" />\n }\n </span>\n @if (canResize(column)) {\n <!-- Mouse handle: from the keyboard the focused header resizes with Alt+arrows (as ag-grid). -->\n <span\n class=\"wm-sirio-grid-resizer\"\n aria-hidden=\"true\"\n draggable=\"false\"\n [attr.title]=\"resizeColumnLabel() + ' ' + column.header()\"\n (pointerdown)=\"onResizeStart(column, $event)\"\n (mousedown)=\"$event.preventDefault(); $event.stopPropagation()\"\n (dragstart)=\"$event.preventDefault(); $event.stopPropagation()\"\n (click)=\"$event.stopPropagation()\"\n (dblclick)=\"resetColumnWidth(column)\"\n ></span>\n }\n </th>\n }\n }\n @if (r === 0 && actionsColumn()) {\n <th scope=\"col\" class=\"w-0 wm-sirio-grid-actions-col\" wmSirioGridPin=\"__actions\" [attr.rowspan]=\"headerRowspan()\">\n <span class=\"sr-only\">{{ actionsHeader() }}</span>\n </th>\n }\n </tr>\n }\n @if (filterRowActive()) {\n @let top = headerTop(headerRows().length);\n <!-- Filter row: cells of fields, not column headers (the body cells keep the titles as headers). -->\n <tr class=\"wm-sirio-grid-filter-row\">\n @if (checkColumn()) {\n <th class=\"w-0 wm-sirio-grid-check-col\" wmSirioGridPin=\"__select\" [style.top.px]=\"top\" [attr.role]=\"filterCellRole()\"></th>\n }\n @if (hasDetail()) {\n <th class=\"w-0 wm-sirio-grid-expand-col\" wmSirioGridPin=\"__expand\" [style.top.px]=\"top\" [attr.role]=\"filterCellRole()\"></th>\n }\n @if (rowNumbers()) {\n <th class=\"w-0 wm-sirio-grid-rownum-col\" wmSirioGridPin=\"__rownum\" [style.top.px]=\"top\" [attr.role]=\"filterCellRole()\"></th>\n }\n @for (column of visibleColumns(); track column) {\n <th [wmSirioGridPin]=\"columnId(column)\" [attr.data-filter-column]=\"columnId(column)\" [style.top.px]=\"top\" [attr.role]=\"filterCellRole()\">\n @if (column.filter()) {\n <ng-container *ngTemplateOutlet=\"filterRowCell; context: { $implicit: column }\" />\n }\n </th>\n }\n @if (actionsColumn()) {\n <th class=\"w-0 wm-sirio-grid-actions-col\" wmSirioGridPin=\"__actions\" [style.top.px]=\"top\" [attr.role]=\"filterCellRole()\"></th>\n }\n </tr>\n }\n </thead>\n <tbody>\n @if (isLoading() && !renderedRows().length) {\n <tr class=\"wm-sirio-grid-message\">\n <td [attr.colspan]=\"colCount()\">\n <!-- The pending status region announces the text: the visible copy is hidden from AT. -->\n <wm-sirio-pending placement=\"inline\" [active]=\"true\" [label]=\"loadingText()\" />\n <span aria-hidden=\"true\">{{ loadingText() }}</span>\n </td>\n </tr>\n } @else if (errorContext(); as failure) {\n <!-- Failed server data source: message and \"Riprova\" (or the wmSirioGridError template). -->\n <tr class=\"wm-sirio-grid-message wm-sirio-grid-error\">\n <td [attr.colspan]=\"colCount()\" role=\"alert\">\n @if (errorTemplate(); as template) {\n <ng-container *ngTemplateOutlet=\"template; context: failure\" />\n } @else if (loadErrorText()) {\n <span class=\"fas fa-exclamation-triangle sirio-text-danger\" aria-hidden=\"true\"></span>&ngsp;{{ loadErrorText() }}&ngsp;\n <button wmSirioButton=\"tertiary\" size=\"small\" type=\"button\" icon=\"fa-redo\" iconPosition=\"start\" (click)=\"reload()\">\n {{ retryLabel() }}\n </button>\n }\n </td>\n </tr>\n } @else {\n @for (row of renderedRows(); track row.id; let i = $index) {\n @if (row.getIsGrouped()) {\n <!-- Group row: toggle + value + count in the grouped column, aggregates in the others. -->\n @let groupColumn = groupColumnOf(row);\n <tr class=\"wm-sirio-grid-group-row\" [attr.aria-level]=\"gridRole() === 'treegrid' ? row.depth + 1 : null\">\n @if (checkColumn()) {\n <td class=\"w-0 wm-sirio-grid-check-col\" wmSirioGridPin=\"__select\"></td>\n }\n @if (hasDetail()) {\n <td class=\"w-0 wm-sirio-grid-expand-col\" wmSirioGridPin=\"__expand\"></td>\n }\n @if (rowNumbers()) {\n <td class=\"w-0 wm-sirio-grid-rownum-col\" wmSirioGridPin=\"__rownum\"></td>\n }\n @for (column of visibleColumns(); track column) {\n <td\n [class]=\"'wm-sirio-grid-align-' + column.alignment()\"\n [class.font-mono]=\"column !== groupColumn && !!column.aggregate()\"\n [attr.data-label]=\"column.header()\"\n [wmSirioGridPin]=\"columnId(column)\"\n >\n @if (column === groupColumn) {\n @let groupText = column.formatValue(row.groupingValue);\n <span class=\"wm-sirio-grid-cell-inner\" [style.padding-inline-start.px]=\"indentOf(row)\">\n <ng-container *ngTemplateOutlet=\"toggle; context: { $implicit: row, text: column.header() + ' ' + groupText }\" />\n <strong>{{ groupText }}</strong>&ngsp;<span class=\"wm-sirio-grid-group-count font-mono\">({{ row.getLeafRows().length }})</span>\n </span>\n } @else if (column.aggregate()) {\n {{ aggregateText(column, row) }}\n }\n </td>\n }\n @if (actionsColumn()) {\n <td class=\"w-0 wm-sirio-grid-actions-col\" wmSirioGridPin=\"__actions\"></td>\n }\n </tr>\n } @else {\n @let item = row.original;\n @let selected = isSelected(item);\n @let selectable = canSelect(item);\n @let look = rowLook(item, i);\n <tr\n [class]=\"look.cls\"\n [style]=\"look.style\"\n [class.wm-sirio-grid-row-selected]=\"selected\"\n [class.wm-sirio-grid-row-clickable]=\"clickSelect() && selectable\"\n [attr.tabindex]=\"keySelect() && selectable && !navigation() ? 0 : null\"\n [attr.aria-describedby]=\"keySelect() && selectable ? baseId + '-hint-select' : null\"\n [attr.aria-disabled]=\"selection() !== 'none' && !selectable ? 'true' : null\"\n [class.wm-sirio-grid-row-child]=\"row.depth > 0\"\n [attr.aria-selected]=\"selection() === 'none' ? null : selected\"\n [attr.aria-level]=\"gridRole() === 'treegrid' ? row.depth + 1 : null\"\n [class.wm-sirio-grid-row-invalid]=\"formMode() && rowInvalid(item)\"\n (click)=\"onRowActivate(row, i, $event)\"\n (dblclick)=\"onRowDoubleClick(row, $event)\"\n (keydown)=\"onRowKey(row, i, $event)\"\n >\n @if (checkColumn()) {\n <td class=\"w-0 sirio-table-btn wm-sirio-grid-check-col\" wmSirioGridPin=\"__select\">\n @if (selectable || !hideUnselectable()) {\n <div class=\"sirio-table-check\">\n <div class=\"sirio-form-check\">\n <input\n [type]=\"singleRadio() ? 'radio' : 'checkbox'\"\n [id]=\"baseId + '-row-' + i\"\n [attr.name]=\"singleRadio() ? baseId + '-row' : null\"\n [checked]=\"selected\"\n [disabled]=\"!selectable\"\n (change)=\"toggleRow(item, $any($event.target).checked)\"\n />\n <label [attr.for]=\"baseId + '-row-' + i\"><span class=\"sr-only\">{{ selectRowLabel()(item, i) }}</span></label>\n </div>\n </div>\n }\n </td>\n }\n @if (hasDetail()) {\n <td class=\"w-0 sirio-table-btn wm-sirio-grid-expand-col\" wmSirioGridPin=\"__expand\">\n @if (row.getCanExpand() && !row.subRows.length) {\n <ng-container *ngTemplateOutlet=\"toggle; context: { $implicit: row, text: rowName()(item, i) }\" />\n }\n </td>\n }\n @if (rowNumbers()) {\n <!-- Row header for screen readers; a td keeps the kit cell look (stripes, card layout). -->\n <td role=\"rowheader\" class=\"w-0 wm-sirio-grid-rownum-col font-mono\" wmSirioGridPin=\"__rownum\" [attr.data-label]=\"rowNumberLabel()\">{{ rowNumberOf(row) }}</td>\n }\n @for (column of visibleColumns(); track column) {\n @let cell = cellLook(column, item);\n <td\n [class]=\"cell.cls\"\n [style]=\"cell.style\"\n [class.font-mono]=\"column.isMono(item)\"\n [class.wm-sirio-grid-nowrap]=\"!column.wrap()\"\n [class.wm-sirio-grid-fit]=\"column.fit()\"\n [attr.data-label]=\"column.header()\"\n [wmSirioGridPin]=\"columnId(column)\"\n >\n @if (column === firstColumn() && (treeMode() || row.depth > 0)) {\n <span class=\"wm-sirio-grid-cell-inner\" [style.padding-inline-start.px]=\"indentOf(row)\">\n @if (treeMode()) {\n @if (row.subRows.length) {\n <ng-container *ngTemplateOutlet=\"toggle; context: { $implicit: row, text: column.textOf(item) }\" />\n } @else {\n <span class=\"wm-sirio-grid-toggle-spacer\" aria-hidden=\"true\"></span>\n }\n }\n <ng-container *ngTemplateOutlet=\"cellContent; context: { $implicit: column, item: item, i: i }\" />\n </span>\n } @else {\n <ng-container *ngTemplateOutlet=\"cellContent; context: { $implicit: column, item: item, i: i }\" />\n }\n </td>\n }\n @if (actionsColumn()) {\n <td class=\"w-0 sirio-table-btn wm-sirio-grid-actions-col\" wmSirioGridPin=\"__actions\" [attr.data-label]=\"actionsHeader()\">\n <span class=\"wm-sirio-grid-actions\">\n @if (rowInvalid(item)) {\n <span class=\"wm-sirio-grid-invalid\" [attr.title]=\"invalidRowLabel()\">\n <span class=\"fas fa-exclamation-circle sirio-text-danger\" aria-hidden=\"true\"></span>\n <span class=\"sr-only\">{{ invalidRowLabel() }}</span>\n </span>\n }\n @if (editorTemplate()) {\n @let editable = canEdit(item);\n <button\n wmSirioButton=\"ghost\"\n size=\"small\"\n type=\"button\"\n iconOnly\n [icon]=\"editable ? 'fa-pen' : 'fa-eye'\"\n [white]=\"variant() === 'dark'\"\n [label]=\"actionLabel(editable ? editLabel() : viewLabel(), item, i)\"\n (click)=\"editRow(item)\"\n ></button>\n }\n @if (canDelete(item)) {\n <button\n wmSirioButton=\"ghost\"\n size=\"small\"\n type=\"button\"\n icon=\"fa-trash\"\n iconOnly\n [white]=\"variant() === 'dark'\"\n [label]=\"actionLabel(deleteLabel(), item, i)\"\n (click)=\"deleteRow(item)\"\n ></button>\n }\n </span>\n </td>\n }\n </tr>\n @if (hasDetail() && row.getIsExpanded() && !row.subRows.length) {\n <tr class=\"wm-sirio-grid-detail-row\">\n <td [attr.colspan]=\"colCount()\">\n <ng-container *ngTemplateOutlet=\"detailTemplate()!; context: { $implicit: item, row: item }\" />\n </td>\n </tr>\n }\n }\n } @empty {\n <tr class=\"wm-sirio-grid-message\">\n <td [attr.colspan]=\"colCount()\">\n @if (emptyTemplate(); as empty) {\n <ng-container *ngTemplateOutlet=\"empty\" />\n } @else {\n {{ emptyText() }}\n }\n </td>\n </tr>\n }\n }\n </tbody>\n </table>\n</div>\n@if (formError(); as error) {\n <span class=\"sirio-form-feedback sirio-visible sirio-feedback-invalid wm-sirio-grid-form-error\" role=\"alert\">{{ error }}</span>\n}\n@if (pageable() && total() > 0) {\n <wm-sirio-pagination\n [total]=\"total()\"\n [hasMore]=\"totalOpen()\"\n [moreLabel]=\"moreLabel()\"\n [(page)]=\"page\"\n [(pageSize)]=\"pageSize\"\n [pageSizeOptions]=\"pageSizeOptions()\"\n [variant]=\"paginationVariant()\"\n [siblings]=\"paginationSiblings()\"\n [showItems]=\"paginationShowItems()\"\n [ariaLabel]=\"paginationName()\"\n (paged)=\"onPaged()\"\n />\n}\n\n<ng-template #cellContent let-column let-item=\"item\" let-i=\"i\">\n @if (column.cellTemplate(); as cell) {\n <ng-container *ngTemplateOutlet=\"cell; context: { $implicit: item, row: item, value: column.valueOf(item), index: i }\" />\n } @else {\n {{ column.textOf(item) }}\n }\n</ng-template>\n\n@if (formMode() && editorTemplate(); as editor) {\n <!-- Edit dialog of a form array row: the form of wmSirioGridEditor bound to a copy of the row. -->\n <wm-sirio-dialog\n [(open)]=\"editorOpen\"\n [title]=\"editorTitle()\"\n [icon]=\"null\"\n [size]=\"editorSize()\"\n [closeLabel]=\"closeLabel()\"\n [closeOnBackdrop]=\"false\"\n (opened)=\"onEditorOpened()\"\n (closed)=\"onEditorClosed()\"\n >\n @if (editing(); as session) {\n @if (saveError(); as error) {\n <wm-sirio-alert type=\"error\" class=\"wm-sirio-grid-save-error\" [title]=\"saveErrorTitle()\" [dismissible]=\"false\">{{ error }}</wm-sirio-alert>\n }\n <div class=\"wm-sirio-grid-editor\" [id]=\"baseId + '-editor'\">\n <ng-container *ngTemplateOutlet=\"editor; context: session.context\" />\n </div>\n }\n <div wmSirioDialogFooter>\n @if (editing()?.context?.readonly) {\n <button wmSirioButton=\"primary\" type=\"button\" (click)=\"closeEditor()\">{{ closeLabel() }}</button>\n } @else {\n <button wmSirioButton=\"secondary\" type=\"button\" [disabled]=\"saving()\" (click)=\"closeEditor()\">{{ cancelLabel() }}</button>\n <button wmSirioButton=\"primary\" type=\"button\" [disabled]=\"saving()\" [attr.aria-busy]=\"saving() || null\" (click)=\"saveEditor()\">\n @if (saving()) {\n <wm-sirio-pending placement=\"inline\" [active]=\"true\" [label]=\"saveLabel()\" />\n }\n {{ saveLabel() }}\n </button>\n }\n </div>\n </wm-sirio-dialog>\n}\n\n<span class=\"sr-only\" [id]=\"baseId + '-hint-sort'\">{{ multiSortHint() }}</span>\n<span class=\"sr-only\" [id]=\"baseId + '-hint-select'\">{{ selectRowHint() }}</span>\n<span class=\"sr-only\" [id]=\"baseId + '-hint-reorder'\">{{ reorderHint() }}</span>\n<span class=\"sr-only\" [id]=\"baseId + '-hint-resize'\">{{ resizeHint() }}</span>\n<span class=\"sr-only\" [id]=\"baseId + '-hint-filter'\">{{ filterHint() }}</span>\n<span class=\"sr-only\" role=\"status\">{{ status() }}</span>\n<span class=\"sr-only\" aria-live=\"polite\">{{ announcement() }}</span>\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 * Page landmarks of the layout (default): top bar as banner (`<header>`), menu as complementary\n * (`<aside>`), content as `<main>`. False for a dashboard placed inside a page that already has\n * them (e.g. an embedded example): the content is a region named `contentLabel`, the menu a region\n * named `sidebarLabel`, the top bar a group, so that the page keeps a single main landmark.\n */\n readonly landmarks = 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 /** Name of the content region with `landmarks` false. */\n readonly contentLabel = input('Contenuto');\n /** Name of the menu region with `landmarks` false. */\n readonly sidebarLabel = input('Barra laterale');\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 // Not required: the content element changes (main / region) with `landmarks`.\n private readonly contentRef = viewChild<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 const content = this.contentRef()?.nativeElement;\n if (content) {\n content.scrollTop = 0;\n }\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\n class=\"sirio-dashboard-brand\"\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 <ng-container [ngTemplateOutlet]=\"logoContent\" />\n </div>\n}\n\n<!-- Top bar -->\n<!-- landmarks=false (dashboard inside a page with its own landmarks): a group, not the banner of the page. -->\n<header\n #topbar\n [attr.role]=\"landmarks() ? null : 'group'\"\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' : landmarks() ? null : 'region'\"\n [attr.aria-modal]=\"mobileMenu() || null\"\n [attr.aria-label]=\"mobileMenu() ? menuLabel() : landmarks() ? null : sidebarLabel()\"\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 @if (landmarks()) {\n <main #content class=\"sirio-dashboard-content\" tabindex=\"-1\" [id]=\"contentId\">\n <router-outlet (activate)=\"onActivate($event)\" (deactivate)=\"onDeactivate()\" />\n </main>\n } @else {\n <!-- Inside a page with its own <main>: a named region, not a second main landmark. -->\n <div #content class=\"sirio-dashboard-content\" tabindex=\"-1\" role=\"region\" [attr.aria-label]=\"contentLabel()\" [id]=\"contentId\">\n <router-outlet (activate)=\"onActivate($event)\" (deactivate)=\"onDeactivate()\" />\n </div>\n }\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 { 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/** When the panels of an accordion are regions (see `SirioAccordion.panelRegions`). */\r\nexport type SirioAccordionPanelRegions = 'auto' | 'always' | 'never';\r\n\r\n/** Sections up to which the panels are regions with `panelRegions=\"auto\"`. */\r\nconst MAX_PANEL_REGIONS = 6;\r\n\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 /**\r\n * The panel is a region (`role=\"region\"`, named by its header and the `ariaLabel` of the accordion)\r\n * according to `panelRegions` of the accordion: by default up to 6 sections, as the ARIA accordion\r\n * pattern suggests (more regions crowd the landmarks of the page).\r\n */\r\n protected readonly isRegion = computed(() => {\r\n const mode = this.accordion?.panelRegions() ?? 'auto';\r\n return mode === 'always' || (mode === 'auto' && (this.accordion?.count() ?? 1) <= MAX_PANEL_REGIONS);\r\n });\r\n protected readonly regionLabelledBy = computed(() =>\r\n this.accordion?.ariaLabel() ? `${this.accordion.labelId} ${this.headerId}` : this.headerId,\r\n );\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 /**\r\n * Name of the accordion: it is part of the name of the panel regions (\"Anagrafica, Dati generali\"),\r\n * so that sections with the same title in different accordions of a page are told apart.\r\n */\r\n readonly ariaLabel = input<string | null>(null);\r\n /**\r\n * Panels as regions: `auto` (default) up to 6 sections, as the ARIA accordion pattern suggests,\r\n * `always` or `never`. A panel that is not a region keeps the link with its header button.\r\n */\r\n readonly panelRegions = input<SirioAccordionPanelRegions>('auto');\r\n\r\n /** @internal */\r\n readonly groupId = sirioUniqueId('sirio-accordion-group');\r\n /** @internal Element with the `ariaLabel` text, referenced by the panel regions. */\r\n readonly labelId = `${this.groupId}-label`;\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 [attr.role]=\"isRegion() ? 'region' : null\"\r\n [id]=\"bodyId\"\r\n [attr.aria-labelledby]=\"isRegion() ? regionLabelledBy() : null\"\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 @if (ariaLabel()) {\r\n <!-- Name of the accordion, read as the first part of the name of the panel regions. -->\r\n <span hidden [id]=\"labelId\">{{ ariaLabel() }}</span>\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 {\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 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 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 {\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 styleUrl: './sirio-slider.scss',\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 SirioRadioGroup,\r\n SirioSelect,\r\n SirioAutocomplete,\r\n SirioSearchbar,\r\n SirioSlider,\r\n SirioFileUpload,\r\n SirioButton,\r\n SirioPrefix,\r\n SirioSuffix,\r\n SirioOptionLabel,\r\n] as const;\r\n"],"mappings":";;;;;;;;;;;AAYA,MAAa,2BAA2B,IAAI,eAC1C,4BACA;CAAE,YAAY;CAAQ,eAAe;AAAQ,CAAE;AAOjD,SAAgB,8BAA8B,SAA+B;CAC3E,OAAO;EAAE,SAAS;EAA0B,UAAU;CAAO;AAC/D;ACbA,MAAa,mBAAmB,IAAI,eAAwB,oBAAoB;CAC9E,YAAY;CACZ,eAAe;AAChB,CAAA;AAMD,SAAgB,sBAAsB,UAAU,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