@arsedizioni/ars-utils 22.5.20 → 22.5.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/arsedizioni-ars-utils-core.validators.mjs +54 -48
- package/fesm2022/arsedizioni-ars-utils-core.validators.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.auth.mjs +11 -1
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.auth.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.prompt.mjs +3 -1
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.prompt.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.select.mjs +4 -1
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.select.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.files.mjs +2 -0
- package/fesm2022/arsedizioni-ars-utils-ui.files.mjs.map +1 -1
- package/package.json +1 -1
- package/types/arsedizioni-ars-utils-core.validators.d.ts +30 -20
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arsedizioni-ars-utils-ui.files.mjs","sources":["../../../projects/ars-utils/ui.files/file-input/file-input.component.ts","../../../projects/ars-utils/ui.files/file-input/file-input.component.html","../../../projects/ars-utils/ui.files/file-preview/file-preview.component.ts","../../../projects/ars-utils/ui.files/file-preview/file-preview.component.html","../../../projects/ars-utils/ui.files/select-file/select-file-dialog.component.ts","../../../projects/ars-utils/ui.files/select-file/select-file-dialog.component.html","../../../projects/ars-utils/ui.files/select-picture/select-picture-dialog.component.ts","../../../projects/ars-utils/ui.files/select-picture/select-picture-dialog.component.html","../../../projects/ars-utils/ui.files/public_api.ts","../../../projects/ars-utils/ui.files/arsedizioni-ars-utils-ui.files.ts"],"sourcesContent":["import { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { afterNextRender, ChangeDetectionStrategy, Component, DoCheck, effect, ElementRef, Input, OnDestroy, Optional, Renderer2, Self, inject, input, model, output, signal, viewChild } from '@angular/core';\nimport { ControlValueAccessor, NgControl } from '@angular/forms';\nimport { FormField, disabled as disabledSchema, form, required as requiredSchema, validate } from '@angular/forms/signals';\nimport { MatFormFieldControl, MatFormFieldModule } from '@angular/material/form-field';\nimport { FileInfo, SystemUtils } from '@arsedizioni/ars-utils/core';\nimport { Subject } from 'rxjs';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatInputModule } from '@angular/material/input';\nimport { UIService } from '@arsedizioni/ars-utils/ui';\n\n@Component({\n selector: 'file-input',\n templateUrl: './file-input.component.html',\n styleUrl: './file-input.component.scss',\n providers: [{ provide: MatFormFieldControl, useExisting: FileInputComponent }],\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [MatFormFieldModule, MatInputModule, FormField, MatButtonModule,\n MatIconModule, MatTooltipModule],\n host: {\n '[id]': 'id',\n '[class.floating]': 'shouldLabelFloat',\n '[attr.aria-describedBy]': 'describedBy',\n },\n})\nexport class FileInputComponent\n implements\n OnDestroy,\n DoCheck,\n MatFormFieldControl<FileInfo>,\n ControlValueAccessor {\n\n /** Reference to the hidden native file input element. */\n protected readonly __file = viewChild.required<ElementRef>('__file');\n\n private readonly renderer = inject(Renderer2);\n private readonly uiService = inject(UIService);\n\n // Initialize\n static nextId = 0;\n readonly stateChanges = new Subject<void>();\n private previousNativeValue: any;\n controlType: string = 'file-input';\n focused = false;\n\n /** Whether the device supports camera capture. */\n protected readonly canCapture = signal<boolean>(false);\n\n /** Size in MB of the currently selected file. */\n protected readonly fileSize = signal<number>(0);\n\n private readonly _placeholder = signal<string>('');\n\n private _value: FileInfo = new FileInfo();\n set value(value: FileInfo) {\n this.setValue(value, true);\n }\n\n /**\n * Updates the internal state. Form propagation is skipped for model->view\n * writes (writeValue) to avoid the CVA echo loop, and performed for\n * user-driven changes (selectFile/clearFile) and the public value setter.\n * @param value - The new file info to store and display.\n * @param propagate - When `true`, notifies the registered onChange callback.\n */\n private setValue(value: FileInfo, propagate: boolean): void {\n this._value = value;\n if (propagate) {\n this.propagateChange(this._value);\n }\n this.stateChanges.next();\n this.changed.emit(this._value);\n }\n get value() {\n return this._value;\n }\n get size() {\n return this._value?.file?.size;\n }\n\n /** Backing signal so the internal form schema reacts to `required` changes. */\n private readonly _required = signal<boolean>(false);\n @Input()\n get required() {\n return this._required();\n }\n set required(value: boolean) {\n this._required.set(coerceBooleanProperty(value));\n this.stateChanges.next();\n }\n /** Backing signal so the internal form schema reacts to `disabled` changes. */\n private readonly _disabled = signal<boolean>(false);\n @Input()\n get disabled() {\n if (this.ngControl && this.ngControl.disabled != null) {\n return this.ngControl.disabled;\n }\n return this._disabled();\n }\n set disabled(value: boolean) {\n this._disabled.set(coerceBooleanProperty(value));\n if (this.focused) {\n this.focused = false;\n this.stateChanges.next();\n }\n }\n @Input()\n get placeholder(): string {\n return this._placeholder();\n }\n set placeholder(value: string) {\n this._placeholder.set(value);\n this.stateChanges.next();\n }\n\n /** The currently displayed file name. Can be bound two-way from outside or updated on file selection. */\n readonly fileName = model<string | undefined>(undefined);\n readonly maxSizeMb = input<number>(5);\n readonly minSizeMb = input<number>(0);\n readonly isNew = input<boolean>(false);\n readonly canPreview = input<boolean>(false);\n readonly appearance = input<'fill' | 'outline' | undefined>(this.uiService.appearance());\n readonly accept = input<string>();\n get empty(): boolean {\n return !this._value || !this._value.file;\n }\n /** True when the control has validation errors and has been touched. */\n get errorState(): boolean {\n return (this.ngControl?.errors != null) && (this.ngControl?.touched ?? false);\n }\n\n id = `${this.controlType}-${FileInputComponent.nextId++}`;\n\n /** True when the label should float above the field. */\n get shouldLabelFloat(): boolean {\n return this.focused || !this.empty;\n }\n\n describedBy = '';\n\n readonly changed = output<FileInfo>();\n readonly download = output();\n readonly preview = output();\n\n /** Model backing the internal display form: the (readonly) file-name text. */\n private readonly nameModel = signal<{ name: string }>({ name: '' });\n\n /**\n * Internal signal form for the file-name input. It reproduces the previous\n * template-driven validators: `required` follows the `required` input and the\n * size rule mirrors FileSizeValidatorDirective (empty name is left to `required`).\n */\n protected readonly nameForm = form(this.nameModel, p => {\n requiredSchema(p.name, { when: () => this._required() });\n // The outer-form path is covered by setDisabledState, which writes the DOM directly.\n disabledSchema(p.name, () => this._disabled());\n validate(p.name, ({ value }) => {\n if (!value()) return undefined;\n const s = this.fileSize() ?? 0;\n return s <= this.maxSizeMb() && s >= this.minSizeMb()\n ? undefined\n : { kind: 'fileSize', message: 'Non valido.' };\n });\n });\n\n private propagateChange: (_: any) => void = (_: any) => { };\n private propagateTouched: () => void = () => { };\n\n\n constructor(\n @Optional() @Self() public ngControl: NgControl) {\n if (this.ngControl != null) {\n this.ngControl.valueAccessor = this;\n }\n\n // Keep the internal form model in sync with the two-way bindable fileName.\n effect(() => this.nameModel.set({ name: this.fileName() ?? '' }));\n\n // Detect camera availability and set the default placeholder after the first render.\n // The file-name input is also made read-only imperatively: marking the field as\n // readonly in the form schema would skip its validation entirely by design.\n afterNextRender(() => {\n this.setupDevices();\n const elem = document.getElementById(this.id);\n if (elem) {\n this.renderer.setProperty(elem, 'readOnly', true);\n }\n });\n }\n\n /**\n * Detects camera availability and updates the placeholder accordingly.\n */\n private async setupDevices(): Promise<void> {\n this.canCapture.set(false);\n if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {\n try {\n const stream = await navigator.mediaDevices.getUserMedia({ video: true });\n if (stream) {\n this.canCapture.set(true);\n }\n } catch { }\n }\n if (!this.placeholder || this.placeholder === 'Seleziona file') {\n this._placeholder.set(\n this.canCapture()\n ? 'Seleziona file o acquisisci con fotocamera'\n : 'Seleziona file'\n );\n }\n }\n\n ngOnDestroy(): void {\n this.stateChanges.complete();\n }\n\n ngDoCheck(): void {\n this.updateInputDirtyCheck();\n }\n\n /**\n * Writes a new value to the component (called by the form layer).\n * @param value - The new file info to display.\n */\n writeValue(value: any): void {\n // Model -> view write: must NOT propagate back to the form (echo loop)\n this.setValue(value as FileInfo, false);\n }\n\n /**\n * Registers the on-change callback (called by the form layer).\n * @param fn - Callback to invoke whenever the value changes.\n */\n registerOnChange(fn: any): void {\n this.propagateChange = fn;\n }\n\n /**\n * Registers the on-touched callback (called by the form layer).\n * @param fn - Callback to invoke when the control is touched.\n */\n registerOnTouched(fn: any): void {\n this.propagateTouched = fn;\n }\n\n /**\n * Sets the ARIA describedby attribute from the given element IDs.\n * @param ids - Array of element IDs that describe this control.\n */\n setDescribedByIds(ids: string[]): void {\n this.describedBy = ids.join(' ');\n }\n\n /**\n * Updates the disabled state of the underlying native element.\n * @param isDisabled - Whether the control should be disabled.\n */\n setDisabledState?(isDisabled: boolean): void {\n this._disabled.set(isDisabled);\n if (!SystemUtils.isBrowser()) return;\n const elem = document.getElementById(this.id);\n if (elem) {\n this.renderer.setProperty(elem, 'disabled', isDisabled);\n }\n }\n\n /** Focuses the native input element and marks the control as touched. */\n onContainerClick(): void {\n if (!this.focused) {\n if (!SystemUtils.isBrowser()) return;\n const elem = document.getElementById(this.id);\n if (elem) {\n elem.focus();\n this.propagateTouched();\n }\n }\n }\n\n /**\n * Checks whether the value has changed since the last dirty check and emits `stateChanges` if needed.\n */\n protected updateInputDirtyCheck(): void {\n const newValue = this._value;\n if (this.previousNativeValue !== newValue) {\n this.previousNativeValue = newValue;\n this.stateChanges.next();\n }\n }\n\n /**\n * Handles file selection from the native input element.\n * @param e - The DOM change event from the file input.\n */\n protected selectFile(e: Event): void {\n const input = e.target as HTMLInputElement;\n if (input.files?.length) {\n const f = input.files[0];\n const fileInfo = new FileInfo();\n const fileSizeMb = f.size / 1048576;\n fileInfo.file = f;\n fileInfo.valid =\n (!this.maxSizeMb() || fileSizeMb <= this.maxSizeMb()) &&\n (!this.minSizeMb() || fileSizeMb >= this.minSizeMb());\n this.setValue(fileInfo, true);\n this.fileName.set(f.name);\n this.fileSize.set(Math.round(fileSizeMb));\n }\n }\n\n /**\n * Checks whether a file is currently selected.\n * @returns `true` if a file is attached to the current value.\n */\n protected hasFile(): boolean {\n return !!(this._value?.file);\n }\n\n /**\n * Clears the currently selected file and resets the control.\n */\n protected clearFile(): void {\n if (this.hasFile()) {\n this.fileName.set(undefined);\n this.fileSize.set(0);\n const fi = new FileInfo();\n fi.file = undefined;\n fi.valid = !this.required;\n this.setValue(fi, true);\n this.__file().nativeElement.value = '';\n }\n }\n\n /**\n * Emits the `download` output event if the file is not newly added.\n */\n protected downloadFile(): void {\n if (!this.isNew()) this.download.emit();\n }\n\n /**\n * Emits the `preview` output event if the file is not new and preview is enabled.\n */\n protected previewFile(): void {\n if (!this.isNew() && this.canPreview()) this.preview.emit();\n }\n}\n","<mat-form-field style=\"width:100%\" [appearance]=\"appearance()\">\n <mat-label>{{placeholder}}</mat-label>\n <input type=\"file\" [hidden]=\"true\" [accept]=\"accept()\" (change)=\"selectFile($event)\" #__file />\n <input [formField]=\"nameForm.name\" [id]=\"id\" matInput />\n @if (hasFile()) {\n <button type=\"button\" tabindex=\"-1\" mat-icon-button matSuffix aria-label=\"Azzera\" (click)=\"clearFile()\" [disabled]=\"disabled\">\n <mat-icon>close</mat-icon>\n </button>\n }\n @if (!disabled) {\n <button type=\"button\" type=\"button\" mat-icon-button matSuffix (click)=\"__file.click()\" aria-label=\"Seleziona file\"\n matTooltip=\"Seleziona\" [disabled]=\"disabled\">\n <mat-icon>add</mat-icon>\n </button>\n }\n @if (!isNew() && canPreview()) {\n <button type=\"button\" mat-icon-button matSuffix (click)=\"previewFile()\" aria-label=\"Anteprima\" matTooltip=\"Anteprima\" [disabled]=\"disabled\">\n <mat-icon>preview</mat-icon>\n </button>\n }\n @if (!isNew()) {\n <button type=\"button\" mat-icon-button matSuffix (click)=\"downloadFile()\" aria-label=\"Scarica file\"\n matTooltip=\"Scarica\" [disabled]=\"disabled\">\n <mat-icon>save_alt</mat-icon>\n </button>\n }\n @if (hasFile() && fileSize() > 0) {\n <mat-hint align=\"start\">{{fileSize()}} MB</mat-hint>\n }\n @if (hasFile() && fileSize() == 0) {\n <mat-hint align=\"start\">\n > 1 MB</mat-hint>\n } @if (maxSizeMb()) {\n <mat-hint align=\"end\">Massimo {{maxSizeMb()}} MB\n </mat-hint>\n }\n @if (nameForm.name().invalid() && !hasFile()) {\n <mat-error>Obbligatorio.</mat-error>\n }\n @if (nameForm.name().invalid() && hasFile()) {\n <mat-error>Dimensione non consentita.</mat-error>\n }\n</mat-form-field>","import { HttpClient, HttpHeaders } from '@angular/common/http';\nimport { FlexLayoutModule } from '@arsedizioni/ars-utils/ui';\nimport { DialogService } from '@arsedizioni/ars-utils/ui.dialogs';\nimport { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, inject, signal, viewChild } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { MAT_DIALOG_DATA, MatDialogActions, MatDialogClose, MatDialogContent } from '@angular/material/dialog';\nimport { SafeUrlPipe } from '@arsedizioni/ars-utils/core';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { MatButtonModule } from '@angular/material/button';\n\nexport interface FilePreviewDialogData {\n url?: string;\n embed?: boolean;\n authToken?: string;\n}\n\n\n@Component({\n templateUrl: './file-preview.component.html',\n styleUrl: './file-preview.component.scss',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [MatDialogContent, FlexLayoutModule, MatDialogActions, MatButtonModule, MatTooltipModule,\n MatDialogClose, SafeUrlPipe]\n})\nexport class FilePreviewComponent {\n readonly iframe = viewChild<ElementRef>('iframe');\n private readonly httpClient = inject(HttpClient);\n private readonly dialogService = inject(DialogService);\n protected readonly dialogData = inject<FilePreviewDialogData>(MAT_DIALOG_DATA) ?? {};\n protected readonly url = signal<string | null>(null);\n\n constructor() {\n // Revoke the blob object URL on destroy: createObjectURL keeps the whole\n // downloaded blob alive until revoked — repeated previews leaked memory.\n inject(DestroyRef).onDestroy(() => {\n const u = this.url();\n if (u?.startsWith('blob:')) URL.revokeObjectURL(u);\n });\n\n const data = this.dialogData;\n if (!data?.url) return;\n\n if (!data.embed) {\n this.dialogService.setBusy('Download in corso...');\n this.httpClient.get(data.url, {\n headers: data.authToken\n ? new HttpHeaders().set('Authorization', data.authToken)\n : new HttpHeaders(),\n responseType: 'blob'\n })\n .pipe(takeUntilDestroyed())\n .subscribe({\n next: (res: Blob) => {\n this.url.set(URL.createObjectURL(res));\n this.dialogService.clearBusy();\n },\n error: () => {\n this.dialogService.clearBusy();\n }\n });\n } else {\n this.url.set('https://view.officeapps.live.com/op/embed.aspx?src=' + encodeURIComponent(data.url));\n }\n }\n\n /**\n * Handles the iframe load event: scrolls to the top and centers a single image when present.\n */\n protected loaded(): void {\n const iframe = this.iframe()?.nativeElement;\n if (!iframe) { return; }\n \n try {\n iframe.contentWindow?.scrollTo(0, 0);\n \n // Resize and center single image\n if (!this.dialogData?.embed && iframe.contentDocument) { \n const images = iframe.contentDocument.querySelectorAll('img') || [];\n if (images.length === 1) { \n Object.assign(images[0].style, {\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n maxWidth: images[0].style.maxWidth || '100%',\n maxHeight: images[0].style.maxHeight || '100%'\n });\n const iframeBody = iframe.contentDocument.body;\n if (iframeBody && !iframeBody.style.height) {\n iframeBody.style.height = '100%';\n }\n }\n }\n } catch (e) {\n console.error('Impossibile accedere al contenuto dell\\'iframe:', e);\n }\n }\n\n /**\n * Opens the current file URL in a new browser tab for manual download.\n */\n protected download(): void {\n const currentUrl = this.url();\n if (currentUrl) {\n window.open(currentUrl, '_blank');\n }\n }\n\n /**\n * Displays a help dialog with browser-specific instructions for enabling PDF preview.\n */\n protected troubles(): void {\n this.dialogService.info(\n \"<p>Se non riesci a visualizzare l'anteprima dei file PDF probabilmente devi abilitare un'impostazione del tuo browser.</p>\" +\n \"<b>Per Google Chrome</b><br>\" +\n \"<p class='small' style='padding-left:10px'><i>impostazioni > privacy e sicurezza > impostazioni sito > documenti PDF</i></p>\" +\n \"<b>Per Microsoft Edge</b><br>\" +\n \"<p class='small' style='padding-left:10px'><i>impostazioni > cookie e autorizzazioni sito > documenti PDF</i></p>\" +\n \"<b>Per Mozilla Firefox</b><br>\" +\n \"<p class='small' style='padding-left:10px'><i>impostazioni > generale > applicazioni</i></p>\" +\n \"<b>Altri browser</b><br>\" +\n \"<p class='small' style='padding-left:10px'>Fate riferimento alla documentazione specifica del vostro browser.</p>\",\n \"Problemi con le anteprime dei file PDF?\"\n )\n }\n}\n\n\n\n","<mat-dialog-content class=\"file-preview\" id=\"file-preview-scrollable\">\r\n <div class=\"content\">\r\n @if (!url()) {\r\n <div class=\"loading\">Caricamento in corso...</div>\r\n } @else {\r\n <iframe class=\"iframe\" #iframe (load)=\"loaded()\" [src]=\"url() | safeUrl\"></iframe>\r\n }\r\n </div>\r\n</mat-dialog-content>\r\n<mat-dialog-actions id=\"file-preview-fixed\">\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap=\"10px\" fxFill>\r\n <div fxFlex=\"50\">\r\n <button mat-stroked-button (click)=\"troubles()\"\r\n matTooltip=\"Fai click se non riesci a visualizzare l'anteprima dei file PDF\">Problemi con i PDF?</button>\r\n </div>\r\n <div fxFlex=\"50\" fxLayoutAlign=\"end\">\r\n <button mat-stroked-button (click)=\"download()\">Scarica</button>\r\n <button mat-stroked-button [mat-dialog-close]=\"true\" >Chiudi</button>\r\n </div>\r\n </div>\r\n</mat-dialog-actions>","import { ChangeDetectionStrategy, Component, inject, output, signal } from '@angular/core';\nimport { FlexLayoutModule, SelectFile, SelectFileDialogData } from '@arsedizioni/ars-utils/ui';\nimport { DialogService } from '@arsedizioni/ars-utils/ui.dialogs';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MAT_DIALOG_DATA, MatDialogActions, MatDialogClose, MatDialogContent, MatDialogRef, MatDialogTitle } from '@angular/material/dialog';\nimport { SafeHtmlPipe, SystemUtils } from '@arsedizioni/ars-utils/core';\n\n@Component({\n templateUrl: './select-file-dialog.component.html',\n styleUrl: './select-file-dialog.component.scss',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [MatDialogTitle, MatDialogContent, FlexLayoutModule, MatButtonModule, MatCheckboxModule,\n MatDialogActions, MatDialogClose, SafeHtmlPipe]\n})\nexport class SelectFileDialogComponent {\n readonly done = output<SelectFile>();\n private readonly dialogService = inject(DialogService);\n private readonly dialogRef = inject(MatDialogRef<SelectFileDialogComponent>);\n protected readonly dialogData = signal<SelectFileDialogData>(inject(MAT_DIALOG_DATA) ?? {});\n protected readonly file = signal<File | undefined>(undefined);\n protected fileClass = signal<'selectfile-file' | 'selectfile-file-drop'>('selectfile-file');\n\n /**\n * Handles the native file input change event and delegates to `selectFile`.\n * @param e - The DOM change event from the file input.\n */\n protected update(e: Event): void {\n const input = e.target as HTMLInputElement;\n if (input.files?.length) {\n this.selectFile(input.files[0]);\n }\n }\n\n /**\n * Validates and sets the selected file, showing an error if size or type constraints are violated.\n * @param file - The `File` object to validate and store.\n */\n private selectFile(file: File): void {\n const data = this.dialogData();\n const maxSize = data.maxSize ?? 0;\n if (maxSize > 0) {\n const size = file.size / 1048576;\n if (size > maxSize) {\n this.dialogService.error(`File troppo grande (massimo ${SystemUtils.formatFileSize(maxSize * 1048576)})`);\n return;\n }\n }\n if (data.accept) {\n const accept = data.accept.toLowerCase();\n const a = file.name.split('.').pop()?.toLowerCase();\n let b = file.type.toLowerCase();\n if (b.startsWith('image/') && accept.includes('image/*')) {\n b = 'image/*';\n } else if (b.startsWith('video/') && accept.includes('video/*')) {\n b = 'video/*';\n } else if (b.startsWith('audio/') && accept.includes('audio/*')) {\n b = 'audio/*';\n }\n if (!accept.includes(a ?? '') && !accept.includes(b)) {\n this.dialogService.error(`Sono accettati solo questi tipi di file: ${accept}`);\n return;\n }\n }\n this.file.set(file);\n }\n\n /**\n * Formats a byte count into a human-readable size string.\n * @param size - File size in bytes.\n * @returns A formatted size string (e.g. \"1.2 MB\").\n */\n protected size(size: number): string {\n return SystemUtils.formatFileSize(size);\n }\n\n /** Emits the selected file and options, then closes the dialog. */\n protected ok(): void {\n this.done.emit({ file: this.file(), options: this.dialogData().options });\n setTimeout(() => {\n this.dialogRef.close();\n }, 500);\n }\n\n /** Highlights the drop zone when a drag enters the area.\n * @param e - The drag event.\n */\n protected onDragOver(e: DragEvent): void {\n this.fileClass.set('selectfile-file-drop');\n e.preventDefault();\n }\n\n /** Highlights the drop zone when a dragged item enters.\n * @param e - The drag event.\n */\n protected onDragEnter(e: DragEvent): void {\n this.fileClass.set('selectfile-file-drop');\n e.preventDefault();\n }\n\n /** Resets the drop zone style when dragging ends.\n * @param e - The drag event.\n */\n protected onDragEnd(e: DragEvent): void {\n this.fileClass.set('selectfile-file');\n e.preventDefault();\n }\n\n /** Resets the drop zone style when a dragged item leaves the area.\n * @param e - The drag event.\n */\n protected onDragLeave(e: DragEvent): void {\n this.fileClass.set('selectfile-file');\n e.preventDefault();\n }\n\n /**\n * Handles a file drop event, extracting and processing the dropped files.\n * @param e - The drop event.\n */\n protected onDrop(e: DragEvent): void {\n this.fileClass.set('selectfile-file');\n e.preventDefault();\n e.stopPropagation();\n if (e.dataTransfer?.files?.length) {\n this.addFiles(e.dataTransfer.files);\n }\n }\n\n /**\n * Picks the first file from the list and passes it to `selectFile`.\n * @param files - The `FileList` from the drag-and-drop event.\n */\n private addFiles(files: FileList): void {\n if (files.length > 0) {\n this.selectFile(files[0]);\n }\n }\n}\n\n","<div mat-dialog-title [innerHTML]=\"dialogData().title | safeHtml\"></div>\n@if (dialogData().description) {\n<div class=\"selectfile-description\" [innerHtml]=\"dialogData().description | safeHtml\"></div>\n}\n<mat-dialog-content class=\"dialog-content\">\n <div fxLayout=\"column\" fxLayoutGap=\"24px\" fxLayoutAlign=\"center center\" fxFill>\n <div fxFlex=\"*\" [class]=\"fileClass()\" (drop)=\"onDrop($event)\" (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave($event)\" (dragenter)=\"onDragEnter($event)\" (dragend)=\"onDragEnd($event)\">\n <div fxLayout=\"column\" fxLayoutGap=\"24px\" fxLayoutAlign=\"center center\" fxFill>\n <div fxFlex=\"10px\" fxFlexAlign=\"start\" class=\"x-small secondary\"><i>Trascina qui il file o selezionalo</i></div>\n <div>\n <input #_file type=\"file\" [accept]=\"dialogData().accept\" [hidden]=\"true\" (change)=\"update($event)\" />\n <button type=\"button\" mat-stroked-button (click)=\"_file.click()\">Seleziona file...</button>\n </div>\n @if (file()) {\n <div style=\"padding:0 24px\">\n <div fxLayout=\"column\" fxLayoutAlign=\"center center\" fxFill>\n <div class=\"small accent bold\"><i>{{file().name}}</i></div>\n <div class=\"small\">Dimensioni: <i>{{size(file().size)}}</i></div>\n </div>\n </div>\n }\n </div>\n </div>\n @if (dialogData().options) {\n <div style=\"padding-bottom: 24px;\">\n @for (o of dialogData().options; track o; let i = $index) {\n <div>\n <mat-checkbox (change)=\"o.selected = $event.checked\" [checked]=\"o.selected === true\" name=\"opt_{{i}}\" >\n {{o.description}}\n </mat-checkbox>\n </div>\n }\n </div>\n }\n </div>\n</mat-dialog-content>\n<mat-dialog-actions>\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill>\n <div fxFlex=\"50\">\n @if (dialogData().helpLink) {\n <a mat-stroked-button href=\"{{dialogData().helpLink}}\" target=\"_blank\">{{dialogData().helpCaption}}</a>\n }\n </div>\n <div fxFlex=\"50\" fxLayoutAlign=\"end\">\n <button mat-flat-button (click)=\"ok()\" [disabled]=\"!file()\">{{dialogData().okCaption}}</button>\n <button mat-stroked-button [mat-dialog-close]=\"true\">Annulla</button>\n </div>\n </div>\n</mat-dialog-actions>","import { ChangeDetectionStrategy, Component, inject, output, signal } from '@angular/core';\nimport { FlexLayoutModule, SelectFile, SelectPictureFileDialogData } from '@arsedizioni/ars-utils/ui';\nimport { DialogService } from '@arsedizioni/ars-utils/ui.dialogs';\nimport { MatDialogRef, MAT_DIALOG_DATA, MatDialogTitle, MatDialogContent, MatDialogActions, MatDialogClose } from '@angular/material/dialog';\nimport { SafeHtmlPipe, SystemUtils } from '@arsedizioni/ars-utils/core';\n\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatButtonModule } from '@angular/material/button';\n\n@Component({\n templateUrl: './select-picture-dialog.component.html',\n styleUrl: './select-picture-dialog.component.scss',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [MatDialogTitle, MatDialogContent, FlexLayoutModule, MatButtonModule, MatCheckboxModule,\n MatDialogActions, MatDialogClose, SafeHtmlPipe]\n})\nexport class SelectPictureDialogComponent {\n readonly done = output<SelectFile>();\n private readonly dialogService = inject(DialogService);\n private readonly dialogRef = inject(MatDialogRef<SelectPictureDialogComponent>);\n protected readonly dialogData = signal<SelectPictureFileDialogData>(inject(MAT_DIALOG_DATA) ?? {});\n protected readonly file = signal<File | undefined>(undefined);\n protected fileClass = signal<'selectpicture-file' | 'selectpicture-file-drop'>('selectpicture-file');\n protected pictureWidth = signal<number>(0);\n protected pictureHeight = signal<number>(0);\n protected picturePreview = signal<any>(undefined);\n\n /**\n * Handles the native file input change event and delegates to `selectFile`.\n * @param e - The DOM change event from the file input.\n */\n protected update(e: Event): void {\n const input = e.target as HTMLInputElement;\n if (input.files?.length) {\n this.selectFile(input.files[0]);\n }\n }\n\n /**\n * Validates the file size and type, then reads it as a data URL to generate a preview.\n * @param file - The `File` object to validate and preview.\n */\n private selectFile(file: File): void {\n const data = this.dialogData();\n const maxSize = data.maxSize ?? 0;\n if (maxSize > 0) {\n const size = file.size / 1048576;\n if (size > maxSize) {\n this.dialogService.error(`File troppo grande (massimo ${SystemUtils.formatFileSize(maxSize * 1048576)})`);\n return;\n }\n }\n if (data.accept) {\n const accept = data.accept.toLowerCase();\n const a = file.name.split('.').pop()?.toLowerCase();\n let b = file.type.toLowerCase();\n if (b.startsWith('image/') && accept.includes('image/*')) {\n b = 'image/*';\n } else if (b.startsWith('video/') && accept.includes('video/*')) {\n b = 'video/*';\n } else if (b.startsWith('audio/') && accept.includes('audio/*')) {\n b = 'audio/*';\n }\n if (!accept.includes(a ?? '') && !accept.includes(b)) {\n this.dialogService.error(`Sono accettati solo questi tipi di file: ${accept}`);\n return;\n }\n }\n const reader = new FileReader();\n reader.onload = (_e: ProgressEvent<FileReader>) => {\n const img = new Image();\n img.onload = () => {\n const maxWidth = data.maxWidth ?? 0;\n if (maxWidth > 0 && img.width > maxWidth) {\n this.dialogService.error(`Immagine troppo larga (massimo ${maxWidth} pixel)`);\n return;\n }\n const maxHeight = data.maxHeight ?? 0;\n if (maxHeight > 0 && img.height > maxHeight) {\n this.dialogService.error(`Immagine troppo alta (massimo ${maxHeight} pixel)`);\n return;\n }\n this.pictureWidth.set(img.width);\n this.pictureHeight.set(img.height);\n this.picturePreview.set((_e.target as FileReader).result);\n this.file.set(file);\n };\n img.src = (_e.target as FileReader).result as string;\n };\n reader.readAsDataURL(file);\n }\n\n /**\n * Formats a byte count into a human-readable size string.\n * @param size - File size in bytes.\n * @returns A formatted size string (e.g. \"1.2 MB\").\n */\n protected size(size: number): string {\n return SystemUtils.formatFileSize(size);\n }\n\n /** Emits the selected file and options, then closes the dialog. */\n protected ok(): void {\n this.done.emit({ file: this.file(), options: this.dialogData().options });\n setTimeout(() => {\n this.dialogRef.close();\n }, 500);\n }\n\n /** Highlights the drop zone when a dragged item is over it.\n * @param e - The drag event.\n */\n protected onDragOver(e: DragEvent): void {\n this.fileClass.set('selectpicture-file-drop');\n e.preventDefault();\n }\n\n /** Highlights the drop zone when a dragged item enters.\n * @param e - The drag event.\n */\n protected onDragEnter(e: DragEvent): void {\n this.fileClass.set('selectpicture-file-drop');\n e.preventDefault();\n }\n\n /** Resets the drop zone style when dragging ends.\n * @param e - The drag event.\n */\n protected onDragEnd(e: DragEvent): void {\n this.fileClass.set('selectpicture-file');\n e.preventDefault();\n }\n\n /** Resets the drop zone style when a dragged item leaves.\n * @param e - The drag event.\n */\n protected onDragLeave(e: DragEvent): void {\n this.fileClass.set('selectpicture-file');\n e.preventDefault();\n }\n\n /**\n * Handles a file drop event, extracting and processing the dropped image.\n * @param e - The drop event.\n */\n protected onDrop(e: DragEvent): void {\n this.fileClass.set('selectpicture-file');\n e.preventDefault();\n e.stopPropagation();\n if (e.dataTransfer?.files?.length) {\n this.addFiles(e.dataTransfer.files);\n }\n }\n\n /**\n * Picks the first file from the list and passes it to `selectFile`.\n * @param files - The `FileList` from the drag-and-drop event.\n */\n private addFiles(files: FileList): void {\n if (files.length > 0) {\n this.selectFile(files[0]);\n }\n }\n}\n\n","<div mat-dialog-title [innerHTML]=\"dialogData().title | safeHtml\"></div>\n@if (dialogData().description) {\n<div class=\"selectpicture-description\" [innerHtml]=\"dialogData().description | safeHtml\"></div>\n}\n<mat-dialog-content class=\"dialog-content\">\n <div fxLayout=\"column\" fxLayoutAlign=\"center center\" fxLayoutGap=\"24px\" fxFill>\n <div fxFlex=\"*\" [class]=\"fileClass()\" (drop)=\"onDrop($event)\" (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave($event)\" (dragenter)=\"onDragEnter($event)\" (dragend)=\"onDragEnd($event)\">\n <div fxLayout=\"column\" fxLayoutGap=\"24px\" fxLayoutAlign=\"center center\" fxFill>\n <div fxFlex=\"10px\" fxFlexAlign=\"start\" class=\"x-small secondary\"><i>Trascina qui l'immagine o selezionala</i></div>\n <div>\n <input #_file type=\"file\" [hidden]=\"true\" [accept]=\"dialogData().accept ?? 'image/*'\"\n (change)=\"update($event)\" />\n <button type=\"button\" mat-stroked-button (click)=\"_file.click()\">Seleziona file...</button>\n </div>\n @if (file()) {\n <div style=\"padding:0 24px\">\n <div fxLayout=\"column\" fxLayoutAlign=\"center center\" fxFill>\n <img [src]=\"picturePreview()\" class=\"selectpicture-preview\">\n <div class=\"small accent bold \"><i>{{file().name}}</i></div>\n <div class=\"small\">Dimensioni:<i>{{pictureWidth()}} x {{pictureHeight()}} ({{size(file().size)}})</i></div>\n </div>\n </div>\n }\n </div>\n </div>\n @if (dialogData().options) {\n <div style=\"padding-bottom: 24px;\">\n @for (o of dialogData().options; track o; let i = $index) {\n <div>\n <mat-checkbox (change)=\"o.selected = $event.checked\" [checked]=\"o.selected === true\" name=\"opt_{{i}}\" >\n {{o.description}}\n </mat-checkbox>\n </div>\n }\n </div>\n }\n </div>\n</mat-dialog-content>\n<mat-dialog-actions>\n <div fxLayout=\"row\" fxLayoutAlign=\"end\" fxFill>\n <button mat-flat-button (click)=\"ok()\" [disabled]=\"!file()\">{{dialogData().okCaption}}</button>\n <button mat-stroked-button mat-dialog-close >Annulla</button>\n </div>\n</mat-dialog-actions>\n","/*\n * Public API Surface of @arsedizioni/ars-utils/ui.files\n */\nexport * from './file-input/file-input.component';\nexport * from './file-preview/file-preview.component';\nexport * from './select-file/select-file-dialog.component';\nexport * from './select-picture/select-picture-dialog.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["requiredSchema","disabledSchema","i4","i1","i2","i3"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;MA4Ba,kBAAkB,CAAA;;aActB,IAAA,CAAA,MAAM,GAAG,CAAH,CAAK;IAelB,IAAI,KAAK,CAAC,KAAe,EAAA;AACvB,QAAA,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC;IAC5B;AAEA;;;;;;AAMG;IACK,QAAQ,CAAC,KAAe,EAAE,SAAkB,EAAA;AAClD,QAAA,IAAI,CAAC,MAAM,GAAG,KAAK;QACnB,IAAI,SAAS,EAAE;AACb,YAAA,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,MAAM,CAAC;QACnC;AACA,QAAA,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE;QACxB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC;IAChC;AACA,IAAA,IAAI,KAAK,GAAA;QACP,OAAO,IAAI,CAAC,MAAM;IACpB;AACA,IAAA,IAAI,IAAI,GAAA;AACN,QAAA,OA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aAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAC9F,gBAAgB,EAAA,QAAA,EAAA,8DAAA,EAAA,MAAA,EAAA,CAAA,OAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,cAAc,gLAAE,YAAY,EAAA,IAAA,EAAA,UAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAErC,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBARxC,SAAS;AAGI,YAAA,IAAA,EAAA,CAAA,EAAA,UAAA,EAAA,IAAI,EAAA,eAAA,EACC,uBAAuB,CAAC,MAAM,WACtC,CAAC,cAAc,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,eAAe,EAAE,iBAAiB;AAC9F,wBAAA,gBAAgB,EAAE,cAAc,EAAE,YAAY,CAAC,EAAA,QAAA,EAAA,utEAAA,EAAA,MAAA,EAAA,CAAA,23JAAA,CAAA,EAAA;;;AEfnD;;AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"arsedizioni-ars-utils-ui.files.mjs","sources":["../../../projects/ars-utils/ui.files/file-input/file-input.component.ts","../../../projects/ars-utils/ui.files/file-input/file-input.component.html","../../../projects/ars-utils/ui.files/file-preview/file-preview.component.ts","../../../projects/ars-utils/ui.files/file-preview/file-preview.component.html","../../../projects/ars-utils/ui.files/select-file/select-file-dialog.component.ts","../../../projects/ars-utils/ui.files/select-file/select-file-dialog.component.html","../../../projects/ars-utils/ui.files/select-picture/select-picture-dialog.component.ts","../../../projects/ars-utils/ui.files/select-picture/select-picture-dialog.component.html","../../../projects/ars-utils/ui.files/public_api.ts","../../../projects/ars-utils/ui.files/arsedizioni-ars-utils-ui.files.ts"],"sourcesContent":["import { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { afterNextRender, ChangeDetectionStrategy, Component, DoCheck, effect, ElementRef, Input, OnDestroy, Optional, Renderer2, Self, inject, input, model, output, signal, viewChild } from '@angular/core';\nimport { ControlValueAccessor, NgControl } from '@angular/forms';\nimport { FormField, disabled as disabledSchema, form, required as requiredSchema, validate } from '@angular/forms/signals';\nimport { notEmpty } from '@arsedizioni/ars-utils/core.validators';\nimport { MatFormFieldControl, MatFormFieldModule } from '@angular/material/form-field';\nimport { FileInfo, SystemUtils } from '@arsedizioni/ars-utils/core';\nimport { Subject } from 'rxjs';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatInputModule } from '@angular/material/input';\nimport { UIService } from '@arsedizioni/ars-utils/ui';\n\n@Component({\n selector: 'file-input',\n templateUrl: './file-input.component.html',\n styleUrl: './file-input.component.scss',\n providers: [{ provide: MatFormFieldControl, useExisting: FileInputComponent }],\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [MatFormFieldModule, MatInputModule, FormField, MatButtonModule,\n MatIconModule, MatTooltipModule],\n host: {\n '[id]': 'id',\n '[class.floating]': 'shouldLabelFloat',\n '[attr.aria-describedBy]': 'describedBy',\n },\n})\nexport class FileInputComponent\n implements\n OnDestroy,\n DoCheck,\n MatFormFieldControl<FileInfo>,\n ControlValueAccessor {\n\n /** Reference to the hidden native file input element. */\n protected readonly __file = viewChild.required<ElementRef>('__file');\n\n private readonly renderer = inject(Renderer2);\n private readonly uiService = inject(UIService);\n\n // Initialize\n static nextId = 0;\n readonly stateChanges = new Subject<void>();\n private previousNativeValue: any;\n controlType: string = 'file-input';\n focused = false;\n\n /** Whether the device supports camera capture. */\n protected readonly canCapture = signal<boolean>(false);\n\n /** Size in MB of the currently selected file. */\n protected readonly fileSize = signal<number>(0);\n\n private readonly _placeholder = signal<string>('');\n\n private _value: FileInfo = new FileInfo();\n set value(value: FileInfo) {\n this.setValue(value, true);\n }\n\n /**\n * Updates the internal state. Form propagation is skipped for model->view\n * writes (writeValue) to avoid the CVA echo loop, and performed for\n * user-driven changes (selectFile/clearFile) and the public value setter.\n * @param value - The new file info to store and display.\n * @param propagate - When `true`, notifies the registered onChange callback.\n */\n private setValue(value: FileInfo, propagate: boolean): void {\n this._value = value;\n if (propagate) {\n this.propagateChange(this._value);\n }\n this.stateChanges.next();\n this.changed.emit(this._value);\n }\n get value() {\n return this._value;\n }\n get size() {\n return this._value?.file?.size;\n }\n\n /** Backing signal so the internal form schema reacts to `required` changes. */\n private readonly _required = signal<boolean>(false);\n @Input()\n get required() {\n return this._required();\n }\n set required(value: boolean) {\n this._required.set(coerceBooleanProperty(value));\n this.stateChanges.next();\n }\n /** Backing signal so the internal form schema reacts to `disabled` changes. */\n private readonly _disabled = signal<boolean>(false);\n @Input()\n get disabled() {\n if (this.ngControl && this.ngControl.disabled != null) {\n return this.ngControl.disabled;\n }\n return this._disabled();\n }\n set disabled(value: boolean) {\n this._disabled.set(coerceBooleanProperty(value));\n if (this.focused) {\n this.focused = false;\n this.stateChanges.next();\n }\n }\n @Input()\n get placeholder(): string {\n return this._placeholder();\n }\n set placeholder(value: string) {\n this._placeholder.set(value);\n this.stateChanges.next();\n }\n\n /** The currently displayed file name. Can be bound two-way from outside or updated on file selection. */\n readonly fileName = model<string | undefined>(undefined);\n readonly maxSizeMb = input<number>(5);\n readonly minSizeMb = input<number>(0);\n readonly isNew = input<boolean>(false);\n readonly canPreview = input<boolean>(false);\n readonly appearance = input<'fill' | 'outline' | undefined>(this.uiService.appearance());\n readonly accept = input<string>();\n get empty(): boolean {\n return !this._value || !this._value.file;\n }\n /** True when the control has validation errors and has been touched. */\n get errorState(): boolean {\n return (this.ngControl?.errors != null) && (this.ngControl?.touched ?? false);\n }\n\n id = `${this.controlType}-${FileInputComponent.nextId++}`;\n\n /** True when the label should float above the field. */\n get shouldLabelFloat(): boolean {\n return this.focused || !this.empty;\n }\n\n describedBy = '';\n\n readonly changed = output<FileInfo>();\n readonly download = output();\n readonly preview = output();\n\n /** Model backing the internal display form: the (readonly) file-name text. */\n private readonly nameModel = signal<{ name: string }>({ name: '' });\n\n /**\n * Internal signal form for the file-name input. It reproduces the previous\n * template-driven validators: `required` follows the `required` input and the\n * size rule mirrors FileSizeValidatorDirective (empty name is left to `required`).\n */\n protected readonly nameForm = form(this.nameModel, p => {\n requiredSchema(p.name, { when: () => this._required() });\n notEmpty(p.name, { when: () => this._required() });\n // The outer-form path is covered by setDisabledState, which writes the DOM directly.\n disabledSchema(p.name, () => this._disabled());\n validate(p.name, ({ value }) => {\n if (!value()) return undefined;\n const s = this.fileSize() ?? 0;\n return s <= this.maxSizeMb() && s >= this.minSizeMb()\n ? undefined\n : { kind: 'fileSize', message: 'Non valido.' };\n });\n });\n\n private propagateChange: (_: any) => void = (_: any) => { };\n private propagateTouched: () => void = () => { };\n\n\n constructor(\n @Optional() @Self() public ngControl: NgControl) {\n if (this.ngControl != null) {\n this.ngControl.valueAccessor = this;\n }\n\n // Keep the internal form model in sync with the two-way bindable fileName.\n effect(() => this.nameModel.set({ name: this.fileName() ?? '' }));\n\n // Detect camera availability and set the default placeholder after the first render.\n // The file-name input is also made read-only imperatively: marking the field as\n // readonly in the form schema would skip its validation entirely by design.\n afterNextRender(() => {\n this.setupDevices();\n const elem = document.getElementById(this.id);\n if (elem) {\n this.renderer.setProperty(elem, 'readOnly', true);\n }\n });\n }\n\n /**\n * Detects camera availability and updates the placeholder accordingly.\n */\n private async setupDevices(): Promise<void> {\n this.canCapture.set(false);\n if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {\n try {\n const stream = await navigator.mediaDevices.getUserMedia({ video: true });\n if (stream) {\n this.canCapture.set(true);\n }\n } catch { }\n }\n if (!this.placeholder || this.placeholder === 'Seleziona file') {\n this._placeholder.set(\n this.canCapture()\n ? 'Seleziona file o acquisisci con fotocamera'\n : 'Seleziona file'\n );\n }\n }\n\n ngOnDestroy(): void {\n this.stateChanges.complete();\n }\n\n ngDoCheck(): void {\n this.updateInputDirtyCheck();\n }\n\n /**\n * Writes a new value to the component (called by the form layer).\n * @param value - The new file info to display.\n */\n writeValue(value: any): void {\n // Model -> view write: must NOT propagate back to the form (echo loop)\n this.setValue(value as FileInfo, false);\n }\n\n /**\n * Registers the on-change callback (called by the form layer).\n * @param fn - Callback to invoke whenever the value changes.\n */\n registerOnChange(fn: any): void {\n this.propagateChange = fn;\n }\n\n /**\n * Registers the on-touched callback (called by the form layer).\n * @param fn - Callback to invoke when the control is touched.\n */\n registerOnTouched(fn: any): void {\n this.propagateTouched = fn;\n }\n\n /**\n * Sets the ARIA describedby attribute from the given element IDs.\n * @param ids - Array of element IDs that describe this control.\n */\n setDescribedByIds(ids: string[]): void {\n this.describedBy = ids.join(' ');\n }\n\n /**\n * Updates the disabled state of the underlying native element.\n * @param isDisabled - Whether the control should be disabled.\n */\n setDisabledState?(isDisabled: boolean): void {\n this._disabled.set(isDisabled);\n if (!SystemUtils.isBrowser()) return;\n const elem = document.getElementById(this.id);\n if (elem) {\n this.renderer.setProperty(elem, 'disabled', isDisabled);\n }\n }\n\n /** Focuses the native input element and marks the control as touched. */\n onContainerClick(): void {\n if (!this.focused) {\n if (!SystemUtils.isBrowser()) return;\n const elem = document.getElementById(this.id);\n if (elem) {\n elem.focus();\n this.propagateTouched();\n }\n }\n }\n\n /**\n * Checks whether the value has changed since the last dirty check and emits `stateChanges` if needed.\n */\n protected updateInputDirtyCheck(): void {\n const newValue = this._value;\n if (this.previousNativeValue !== newValue) {\n this.previousNativeValue = newValue;\n this.stateChanges.next();\n }\n }\n\n /**\n * Handles file selection from the native input element.\n * @param e - The DOM change event from the file input.\n */\n protected selectFile(e: Event): void {\n const input = e.target as HTMLInputElement;\n if (input.files?.length) {\n const f = input.files[0];\n const fileInfo = new FileInfo();\n const fileSizeMb = f.size / 1048576;\n fileInfo.file = f;\n fileInfo.valid =\n (!this.maxSizeMb() || fileSizeMb <= this.maxSizeMb()) &&\n (!this.minSizeMb() || fileSizeMb >= this.minSizeMb());\n this.setValue(fileInfo, true);\n this.fileName.set(f.name);\n this.fileSize.set(Math.round(fileSizeMb));\n }\n }\n\n /**\n * Checks whether a file is currently selected.\n * @returns `true` if a file is attached to the current value.\n */\n protected hasFile(): boolean {\n return !!(this._value?.file);\n }\n\n /**\n * Clears the currently selected file and resets the control.\n */\n protected clearFile(): void {\n if (this.hasFile()) {\n this.fileName.set(undefined);\n this.fileSize.set(0);\n const fi = new FileInfo();\n fi.file = undefined;\n fi.valid = !this.required;\n this.setValue(fi, true);\n this.__file().nativeElement.value = '';\n }\n }\n\n /**\n * Emits the `download` output event if the file is not newly added.\n */\n protected downloadFile(): void {\n if (!this.isNew()) this.download.emit();\n }\n\n /**\n * Emits the `preview` output event if the file is not new and preview is enabled.\n */\n protected previewFile(): void {\n if (!this.isNew() && this.canPreview()) this.preview.emit();\n }\n}\n","<mat-form-field style=\"width:100%\" [appearance]=\"appearance()\">\n <mat-label>{{placeholder}}</mat-label>\n <input type=\"file\" [hidden]=\"true\" [accept]=\"accept()\" (change)=\"selectFile($event)\" #__file />\n <input [formField]=\"nameForm.name\" [id]=\"id\" matInput />\n @if (hasFile()) {\n <button type=\"button\" tabindex=\"-1\" mat-icon-button matSuffix aria-label=\"Azzera\" (click)=\"clearFile()\" [disabled]=\"disabled\">\n <mat-icon>close</mat-icon>\n </button>\n }\n @if (!disabled) {\n <button type=\"button\" type=\"button\" mat-icon-button matSuffix (click)=\"__file.click()\" aria-label=\"Seleziona file\"\n matTooltip=\"Seleziona\" [disabled]=\"disabled\">\n <mat-icon>add</mat-icon>\n </button>\n }\n @if (!isNew() && canPreview()) {\n <button type=\"button\" mat-icon-button matSuffix (click)=\"previewFile()\" aria-label=\"Anteprima\" matTooltip=\"Anteprima\" [disabled]=\"disabled\">\n <mat-icon>preview</mat-icon>\n </button>\n }\n @if (!isNew()) {\n <button type=\"button\" mat-icon-button matSuffix (click)=\"downloadFile()\" aria-label=\"Scarica file\"\n matTooltip=\"Scarica\" [disabled]=\"disabled\">\n <mat-icon>save_alt</mat-icon>\n </button>\n }\n @if (hasFile() && fileSize() > 0) {\n <mat-hint align=\"start\">{{fileSize()}} MB</mat-hint>\n }\n @if (hasFile() && fileSize() == 0) {\n <mat-hint align=\"start\">\n > 1 MB</mat-hint>\n } @if (maxSizeMb()) {\n <mat-hint align=\"end\">Massimo {{maxSizeMb()}} MB\n </mat-hint>\n }\n @if (nameForm.name().invalid() && !hasFile()) {\n <mat-error>Obbligatorio.</mat-error>\n }\n @if (nameForm.name().invalid() && hasFile()) {\n <mat-error>Dimensione non consentita.</mat-error>\n }\n</mat-form-field>","import { HttpClient, HttpHeaders } from '@angular/common/http';\nimport { FlexLayoutModule } from '@arsedizioni/ars-utils/ui';\nimport { DialogService } from '@arsedizioni/ars-utils/ui.dialogs';\nimport { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, inject, signal, viewChild } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { MAT_DIALOG_DATA, MatDialogActions, MatDialogClose, MatDialogContent } from '@angular/material/dialog';\nimport { SafeUrlPipe } from '@arsedizioni/ars-utils/core';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { MatButtonModule } from '@angular/material/button';\n\nexport interface FilePreviewDialogData {\n url?: string;\n embed?: boolean;\n authToken?: string;\n}\n\n\n@Component({\n templateUrl: './file-preview.component.html',\n styleUrl: './file-preview.component.scss',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [MatDialogContent, FlexLayoutModule, MatDialogActions, MatButtonModule, MatTooltipModule,\n MatDialogClose, SafeUrlPipe]\n})\nexport class FilePreviewComponent {\n readonly iframe = viewChild<ElementRef>('iframe');\n private readonly httpClient = inject(HttpClient);\n private readonly dialogService = inject(DialogService);\n protected readonly dialogData = inject<FilePreviewDialogData>(MAT_DIALOG_DATA) ?? {};\n protected readonly url = signal<string | null>(null);\n\n constructor() {\n // Revoke the blob object URL on destroy: createObjectURL keeps the whole\n // downloaded blob alive until revoked — repeated previews leaked memory.\n inject(DestroyRef).onDestroy(() => {\n const u = this.url();\n if (u?.startsWith('blob:')) URL.revokeObjectURL(u);\n });\n\n const data = this.dialogData;\n if (!data?.url) return;\n\n if (!data.embed) {\n this.dialogService.setBusy('Download in corso...');\n this.httpClient.get(data.url, {\n headers: data.authToken\n ? new HttpHeaders().set('Authorization', data.authToken)\n : new HttpHeaders(),\n responseType: 'blob'\n })\n .pipe(takeUntilDestroyed())\n .subscribe({\n next: (res: Blob) => {\n this.url.set(URL.createObjectURL(res));\n this.dialogService.clearBusy();\n },\n error: () => {\n this.dialogService.clearBusy();\n }\n });\n } else {\n this.url.set('https://view.officeapps.live.com/op/embed.aspx?src=' + encodeURIComponent(data.url));\n }\n }\n\n /**\n * Handles the iframe load event: scrolls to the top and centers a single image when present.\n */\n protected loaded(): void {\n const iframe = this.iframe()?.nativeElement;\n if (!iframe) { return; }\n \n try {\n iframe.contentWindow?.scrollTo(0, 0);\n \n // Resize and center single image\n if (!this.dialogData?.embed && iframe.contentDocument) { \n const images = iframe.contentDocument.querySelectorAll('img') || [];\n if (images.length === 1) { \n Object.assign(images[0].style, {\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n maxWidth: images[0].style.maxWidth || '100%',\n maxHeight: images[0].style.maxHeight || '100%'\n });\n const iframeBody = iframe.contentDocument.body;\n if (iframeBody && !iframeBody.style.height) {\n iframeBody.style.height = '100%';\n }\n }\n }\n } catch (e) {\n console.error('Impossibile accedere al contenuto dell\\'iframe:', e);\n }\n }\n\n /**\n * Opens the current file URL in a new browser tab for manual download.\n */\n protected download(): void {\n const currentUrl = this.url();\n if (currentUrl) {\n window.open(currentUrl, '_blank');\n }\n }\n\n /**\n * Displays a help dialog with browser-specific instructions for enabling PDF preview.\n */\n protected troubles(): void {\n this.dialogService.info(\n \"<p>Se non riesci a visualizzare l'anteprima dei file PDF probabilmente devi abilitare un'impostazione del tuo browser.</p>\" +\n \"<b>Per Google Chrome</b><br>\" +\n \"<p class='small' style='padding-left:10px'><i>impostazioni > privacy e sicurezza > impostazioni sito > documenti PDF</i></p>\" +\n \"<b>Per Microsoft Edge</b><br>\" +\n \"<p class='small' style='padding-left:10px'><i>impostazioni > cookie e autorizzazioni sito > documenti PDF</i></p>\" +\n \"<b>Per Mozilla Firefox</b><br>\" +\n \"<p class='small' style='padding-left:10px'><i>impostazioni > generale > applicazioni</i></p>\" +\n \"<b>Altri browser</b><br>\" +\n \"<p class='small' style='padding-left:10px'>Fate riferimento alla documentazione specifica del vostro browser.</p>\",\n \"Problemi con le anteprime dei file PDF?\"\n )\n }\n}\n\n\n\n","<mat-dialog-content class=\"file-preview\" id=\"file-preview-scrollable\">\r\n <div class=\"content\">\r\n @if (!url()) {\r\n <div class=\"loading\">Caricamento in corso...</div>\r\n } @else {\r\n <iframe class=\"iframe\" #iframe (load)=\"loaded()\" [src]=\"url() | safeUrl\"></iframe>\r\n }\r\n </div>\r\n</mat-dialog-content>\r\n<mat-dialog-actions id=\"file-preview-fixed\">\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap=\"10px\" fxFill>\r\n <div fxFlex=\"50\">\r\n <button mat-stroked-button (click)=\"troubles()\"\r\n matTooltip=\"Fai click se non riesci a visualizzare l'anteprima dei file PDF\">Problemi con i PDF?</button>\r\n </div>\r\n <div fxFlex=\"50\" fxLayoutAlign=\"end\">\r\n <button mat-stroked-button (click)=\"download()\">Scarica</button>\r\n <button mat-stroked-button [mat-dialog-close]=\"true\" >Chiudi</button>\r\n </div>\r\n </div>\r\n</mat-dialog-actions>","import { ChangeDetectionStrategy, Component, inject, output, signal } from '@angular/core';\nimport { FlexLayoutModule, SelectFile, SelectFileDialogData } from '@arsedizioni/ars-utils/ui';\nimport { DialogService } from '@arsedizioni/ars-utils/ui.dialogs';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MAT_DIALOG_DATA, MatDialogActions, MatDialogClose, MatDialogContent, MatDialogRef, MatDialogTitle } from '@angular/material/dialog';\nimport { SafeHtmlPipe, SystemUtils } from '@arsedizioni/ars-utils/core';\n\n@Component({\n templateUrl: './select-file-dialog.component.html',\n styleUrl: './select-file-dialog.component.scss',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [MatDialogTitle, MatDialogContent, FlexLayoutModule, MatButtonModule, MatCheckboxModule,\n MatDialogActions, MatDialogClose, SafeHtmlPipe]\n})\nexport class SelectFileDialogComponent {\n readonly done = output<SelectFile>();\n private readonly dialogService = inject(DialogService);\n private readonly dialogRef = inject(MatDialogRef<SelectFileDialogComponent>);\n protected readonly dialogData = signal<SelectFileDialogData>(inject(MAT_DIALOG_DATA) ?? {});\n protected readonly file = signal<File | undefined>(undefined);\n protected fileClass = signal<'selectfile-file' | 'selectfile-file-drop'>('selectfile-file');\n\n /**\n * Handles the native file input change event and delegates to `selectFile`.\n * @param e - The DOM change event from the file input.\n */\n protected update(e: Event): void {\n const input = e.target as HTMLInputElement;\n if (input.files?.length) {\n this.selectFile(input.files[0]);\n }\n }\n\n /**\n * Validates and sets the selected file, showing an error if size or type constraints are violated.\n * @param file - The `File` object to validate and store.\n */\n private selectFile(file: File): void {\n const data = this.dialogData();\n const maxSize = data.maxSize ?? 0;\n if (maxSize > 0) {\n const size = file.size / 1048576;\n if (size > maxSize) {\n this.dialogService.error(`File troppo grande (massimo ${SystemUtils.formatFileSize(maxSize * 1048576)})`);\n return;\n }\n }\n if (data.accept) {\n const accept = data.accept.toLowerCase();\n const a = file.name.split('.').pop()?.toLowerCase();\n let b = file.type.toLowerCase();\n if (b.startsWith('image/') && accept.includes('image/*')) {\n b = 'image/*';\n } else if (b.startsWith('video/') && accept.includes('video/*')) {\n b = 'video/*';\n } else if (b.startsWith('audio/') && accept.includes('audio/*')) {\n b = 'audio/*';\n }\n if (!accept.includes(a ?? '') && !accept.includes(b)) {\n this.dialogService.error(`Sono accettati solo questi tipi di file: ${accept}`);\n return;\n }\n }\n this.file.set(file);\n }\n\n /**\n * Formats a byte count into a human-readable size string.\n * @param size - File size in bytes.\n * @returns A formatted size string (e.g. \"1.2 MB\").\n */\n protected size(size: number): string {\n return SystemUtils.formatFileSize(size);\n }\n\n /** Emits the selected file and options, then closes the dialog. */\n protected ok(): void {\n this.done.emit({ file: this.file(), options: this.dialogData().options });\n setTimeout(() => {\n this.dialogRef.close();\n }, 500);\n }\n\n /** Highlights the drop zone when a drag enters the area.\n * @param e - The drag event.\n */\n protected onDragOver(e: DragEvent): void {\n this.fileClass.set('selectfile-file-drop');\n e.preventDefault();\n }\n\n /** Highlights the drop zone when a dragged item enters.\n * @param e - The drag event.\n */\n protected onDragEnter(e: DragEvent): void {\n this.fileClass.set('selectfile-file-drop');\n e.preventDefault();\n }\n\n /** Resets the drop zone style when dragging ends.\n * @param e - The drag event.\n */\n protected onDragEnd(e: DragEvent): void {\n this.fileClass.set('selectfile-file');\n e.preventDefault();\n }\n\n /** Resets the drop zone style when a dragged item leaves the area.\n * @param e - The drag event.\n */\n protected onDragLeave(e: DragEvent): void {\n this.fileClass.set('selectfile-file');\n e.preventDefault();\n }\n\n /**\n * Handles a file drop event, extracting and processing the dropped files.\n * @param e - The drop event.\n */\n protected onDrop(e: DragEvent): void {\n this.fileClass.set('selectfile-file');\n e.preventDefault();\n e.stopPropagation();\n if (e.dataTransfer?.files?.length) {\n this.addFiles(e.dataTransfer.files);\n }\n }\n\n /**\n * Picks the first file from the list and passes it to `selectFile`.\n * @param files - The `FileList` from the drag-and-drop event.\n */\n private addFiles(files: FileList): void {\n if (files.length > 0) {\n this.selectFile(files[0]);\n }\n }\n}\n\n","<div mat-dialog-title [innerHTML]=\"dialogData().title | safeHtml\"></div>\n@if (dialogData().description) {\n<div class=\"selectfile-description\" [innerHtml]=\"dialogData().description | safeHtml\"></div>\n}\n<mat-dialog-content class=\"dialog-content\">\n <div fxLayout=\"column\" fxLayoutGap=\"24px\" fxLayoutAlign=\"center center\" fxFill>\n <div fxFlex=\"*\" [class]=\"fileClass()\" (drop)=\"onDrop($event)\" (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave($event)\" (dragenter)=\"onDragEnter($event)\" (dragend)=\"onDragEnd($event)\">\n <div fxLayout=\"column\" fxLayoutGap=\"24px\" fxLayoutAlign=\"center center\" fxFill>\n <div fxFlex=\"10px\" fxFlexAlign=\"start\" class=\"x-small secondary\"><i>Trascina qui il file o selezionalo</i></div>\n <div>\n <input #_file type=\"file\" [accept]=\"dialogData().accept\" [hidden]=\"true\" (change)=\"update($event)\" />\n <button type=\"button\" mat-stroked-button (click)=\"_file.click()\">Seleziona file...</button>\n </div>\n @if (file()) {\n <div style=\"padding:0 24px\">\n <div fxLayout=\"column\" fxLayoutAlign=\"center center\" fxFill>\n <div class=\"small accent bold\"><i>{{file().name}}</i></div>\n <div class=\"small\">Dimensioni: <i>{{size(file().size)}}</i></div>\n </div>\n </div>\n }\n </div>\n </div>\n @if (dialogData().options) {\n <div style=\"padding-bottom: 24px;\">\n @for (o of dialogData().options; track o; let i = $index) {\n <div>\n <mat-checkbox (change)=\"o.selected = $event.checked\" [checked]=\"o.selected === true\" name=\"opt_{{i}}\" >\n {{o.description}}\n </mat-checkbox>\n </div>\n }\n </div>\n }\n </div>\n</mat-dialog-content>\n<mat-dialog-actions>\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill>\n <div fxFlex=\"50\">\n @if (dialogData().helpLink) {\n <a mat-stroked-button href=\"{{dialogData().helpLink}}\" target=\"_blank\">{{dialogData().helpCaption}}</a>\n }\n </div>\n <div fxFlex=\"50\" fxLayoutAlign=\"end\">\n <button mat-flat-button (click)=\"ok()\" [disabled]=\"!file()\">{{dialogData().okCaption}}</button>\n <button mat-stroked-button [mat-dialog-close]=\"true\">Annulla</button>\n </div>\n </div>\n</mat-dialog-actions>","import { ChangeDetectionStrategy, Component, inject, output, signal } from '@angular/core';\nimport { FlexLayoutModule, SelectFile, SelectPictureFileDialogData } from '@arsedizioni/ars-utils/ui';\nimport { DialogService } from '@arsedizioni/ars-utils/ui.dialogs';\nimport { MatDialogRef, MAT_DIALOG_DATA, MatDialogTitle, MatDialogContent, MatDialogActions, MatDialogClose } from '@angular/material/dialog';\nimport { SafeHtmlPipe, SystemUtils } from '@arsedizioni/ars-utils/core';\n\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatButtonModule } from '@angular/material/button';\n\n@Component({\n templateUrl: './select-picture-dialog.component.html',\n styleUrl: './select-picture-dialog.component.scss',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [MatDialogTitle, MatDialogContent, FlexLayoutModule, MatButtonModule, MatCheckboxModule,\n MatDialogActions, MatDialogClose, SafeHtmlPipe]\n})\nexport class SelectPictureDialogComponent {\n readonly done = output<SelectFile>();\n private readonly dialogService = inject(DialogService);\n private readonly dialogRef = inject(MatDialogRef<SelectPictureDialogComponent>);\n protected readonly dialogData = signal<SelectPictureFileDialogData>(inject(MAT_DIALOG_DATA) ?? {});\n protected readonly file = signal<File | undefined>(undefined);\n protected fileClass = signal<'selectpicture-file' | 'selectpicture-file-drop'>('selectpicture-file');\n protected pictureWidth = signal<number>(0);\n protected pictureHeight = signal<number>(0);\n protected picturePreview = signal<any>(undefined);\n\n /**\n * Handles the native file input change event and delegates to `selectFile`.\n * @param e - The DOM change event from the file input.\n */\n protected update(e: Event): void {\n const input = e.target as HTMLInputElement;\n if (input.files?.length) {\n this.selectFile(input.files[0]);\n }\n }\n\n /**\n * Validates the file size and type, then reads it as a data URL to generate a preview.\n * @param file - The `File` object to validate and preview.\n */\n private selectFile(file: File): void {\n const data = this.dialogData();\n const maxSize = data.maxSize ?? 0;\n if (maxSize > 0) {\n const size = file.size / 1048576;\n if (size > maxSize) {\n this.dialogService.error(`File troppo grande (massimo ${SystemUtils.formatFileSize(maxSize * 1048576)})`);\n return;\n }\n }\n if (data.accept) {\n const accept = data.accept.toLowerCase();\n const a = file.name.split('.').pop()?.toLowerCase();\n let b = file.type.toLowerCase();\n if (b.startsWith('image/') && accept.includes('image/*')) {\n b = 'image/*';\n } else if (b.startsWith('video/') && accept.includes('video/*')) {\n b = 'video/*';\n } else if (b.startsWith('audio/') && accept.includes('audio/*')) {\n b = 'audio/*';\n }\n if (!accept.includes(a ?? '') && !accept.includes(b)) {\n this.dialogService.error(`Sono accettati solo questi tipi di file: ${accept}`);\n return;\n }\n }\n const reader = new FileReader();\n reader.onload = (_e: ProgressEvent<FileReader>) => {\n const img = new Image();\n img.onload = () => {\n const maxWidth = data.maxWidth ?? 0;\n if (maxWidth > 0 && img.width > maxWidth) {\n this.dialogService.error(`Immagine troppo larga (massimo ${maxWidth} pixel)`);\n return;\n }\n const maxHeight = data.maxHeight ?? 0;\n if (maxHeight > 0 && img.height > maxHeight) {\n this.dialogService.error(`Immagine troppo alta (massimo ${maxHeight} pixel)`);\n return;\n }\n this.pictureWidth.set(img.width);\n this.pictureHeight.set(img.height);\n this.picturePreview.set((_e.target as FileReader).result);\n this.file.set(file);\n };\n img.src = (_e.target as FileReader).result as string;\n };\n reader.readAsDataURL(file);\n }\n\n /**\n * Formats a byte count into a human-readable size string.\n * @param size - File size in bytes.\n * @returns A formatted size string (e.g. \"1.2 MB\").\n */\n protected size(size: number): string {\n return SystemUtils.formatFileSize(size);\n }\n\n /** Emits the selected file and options, then closes the dialog. */\n protected ok(): void {\n this.done.emit({ file: this.file(), options: this.dialogData().options });\n setTimeout(() => {\n this.dialogRef.close();\n }, 500);\n }\n\n /** Highlights the drop zone when a dragged item is over it.\n * @param e - The drag event.\n */\n protected onDragOver(e: DragEvent): void {\n this.fileClass.set('selectpicture-file-drop');\n e.preventDefault();\n }\n\n /** Highlights the drop zone when a dragged item enters.\n * @param e - The drag event.\n */\n protected onDragEnter(e: DragEvent): void {\n this.fileClass.set('selectpicture-file-drop');\n e.preventDefault();\n }\n\n /** Resets the drop zone style when dragging ends.\n * @param e - The drag event.\n */\n protected onDragEnd(e: DragEvent): void {\n this.fileClass.set('selectpicture-file');\n e.preventDefault();\n }\n\n /** Resets the drop zone style when a dragged item leaves.\n * @param e - The drag event.\n */\n protected onDragLeave(e: DragEvent): void {\n this.fileClass.set('selectpicture-file');\n e.preventDefault();\n }\n\n /**\n * Handles a file drop event, extracting and processing the dropped image.\n * @param e - The drop event.\n */\n protected onDrop(e: DragEvent): void {\n this.fileClass.set('selectpicture-file');\n e.preventDefault();\n e.stopPropagation();\n if (e.dataTransfer?.files?.length) {\n this.addFiles(e.dataTransfer.files);\n }\n }\n\n /**\n * Picks the first file from the list and passes it to `selectFile`.\n * @param files - The `FileList` from the drag-and-drop event.\n */\n private addFiles(files: FileList): void {\n if (files.length > 0) {\n this.selectFile(files[0]);\n }\n }\n}\n\n","<div mat-dialog-title [innerHTML]=\"dialogData().title | safeHtml\"></div>\n@if (dialogData().description) {\n<div class=\"selectpicture-description\" [innerHtml]=\"dialogData().description | safeHtml\"></div>\n}\n<mat-dialog-content class=\"dialog-content\">\n <div fxLayout=\"column\" fxLayoutAlign=\"center center\" fxLayoutGap=\"24px\" fxFill>\n <div fxFlex=\"*\" [class]=\"fileClass()\" (drop)=\"onDrop($event)\" (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave($event)\" (dragenter)=\"onDragEnter($event)\" (dragend)=\"onDragEnd($event)\">\n <div fxLayout=\"column\" fxLayoutGap=\"24px\" fxLayoutAlign=\"center center\" fxFill>\n <div fxFlex=\"10px\" fxFlexAlign=\"start\" class=\"x-small secondary\"><i>Trascina qui l'immagine o selezionala</i></div>\n <div>\n <input #_file type=\"file\" [hidden]=\"true\" [accept]=\"dialogData().accept ?? 'image/*'\"\n (change)=\"update($event)\" />\n <button type=\"button\" mat-stroked-button (click)=\"_file.click()\">Seleziona file...</button>\n </div>\n @if (file()) {\n <div style=\"padding:0 24px\">\n <div fxLayout=\"column\" fxLayoutAlign=\"center center\" fxFill>\n <img [src]=\"picturePreview()\" class=\"selectpicture-preview\">\n <div class=\"small accent bold \"><i>{{file().name}}</i></div>\n <div class=\"small\">Dimensioni:<i>{{pictureWidth()}} x {{pictureHeight()}} ({{size(file().size)}})</i></div>\n </div>\n </div>\n }\n </div>\n </div>\n @if (dialogData().options) {\n <div style=\"padding-bottom: 24px;\">\n @for (o of dialogData().options; track o; let i = $index) {\n <div>\n <mat-checkbox (change)=\"o.selected = $event.checked\" [checked]=\"o.selected === true\" name=\"opt_{{i}}\" >\n {{o.description}}\n </mat-checkbox>\n </div>\n }\n </div>\n }\n </div>\n</mat-dialog-content>\n<mat-dialog-actions>\n <div fxLayout=\"row\" fxLayoutAlign=\"end\" fxFill>\n <button mat-flat-button (click)=\"ok()\" [disabled]=\"!file()\">{{dialogData().okCaption}}</button>\n <button mat-stroked-button mat-dialog-close >Annulla</button>\n </div>\n</mat-dialog-actions>\n","/*\n * Public API Surface of @arsedizioni/ars-utils/ui.files\n */\nexport * from './file-input/file-input.component';\nexport * from './file-preview/file-preview.component';\nexport * from './select-file/select-file-dialog.component';\nexport * from './select-picture/select-picture-dialog.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["requiredSchema","disabledSchema","i4","i1","i2","i3"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;MA6Ba,kBAAkB,CAAA;;aActB,IAAA,CAAA,MAAM,GAAG,CAAH,CAAK;IAelB,IAAI,KAAK,CAAC,KAAe,EAAA;AACvB,QAAA,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC;IAC5B;AAEA;;;;;;AAMG;IACK,QAAQ,CAAC,KAAe,EAAE,SAAkB,EAAA;AAClD,QAAA,IAAI,CAAC,MAAM,GAAG,KAAK;QACnB,IAAI,SAAS,EAAE;AACb,YAAA,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,MAAM,CAAC;QACnC;AACA,QAAA,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE;QACxB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC;IAChC;AACA,IAAA,IAAI,KAAK,GA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AAA,MAAA,EAAA,OAAA,EAAA,eAAA,EAAA,UAAA,EAAA,OAAA,EAAA,qBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,eAAA,CAAA,EAAA,OAAA,EAAA,CAAA,QAAA,EAAA,qBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,aAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAC9F,gBAAgB,EAAA,QAAA,EAAA,8DAAA,EAAA,MAAA,EAAA,CAAA,OAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,cAAc,gLAAE,YAAY,EAAA,IAAA,EAAA,UAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAErC,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBARxC,SAAS;AAGI,YAAA,IAAA,EAAA,CAAA,EAAA,UAAA,EAAA,IAAI,EAAA,eAAA,EACC,uBAAuB,CAAC,MAAM,WACtC,CAAC,cAAc,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,eAAe,EAAE,iBAAiB;AAC9F,wBAAA,gBAAgB,EAAE,cAAc,EAAE,YAAY,CAAC,EAAA,QAAA,EAAA,utEAAA,EAAA,MAAA,EAAA,CAAA,23JAAA,CAAA,EAAA;;;AEfnD;;AAEG;;ACFH;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Validator, AbstractControl, ValidationErrors } from '@angular/forms';
|
|
3
|
-
import { PathKind, SchemaPath, SchemaPathRules } from '@angular/forms/signals';
|
|
3
|
+
import { PathKind, SchemaPath, SchemaPathRules, LogicFn } from '@angular/forms/signals';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Directive that delegates validation to an externally provided validator function.
|
|
@@ -67,21 +67,6 @@ declare class EqualsValidatorDirective implements Validator {
|
|
|
67
67
|
static ɵdir: i0.ɵɵDirectiveDeclaration<EqualsValidatorDirective, "[equals]", never, { "equals": { "alias": "equals"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
/**
|
|
71
|
-
* Directive that validates a semicolon-separated list of email addresses.
|
|
72
|
-
* Apply `emails` to a text input containing one or more addresses separated by `;`.
|
|
73
|
-
*/
|
|
74
|
-
declare class EmailsValidatorDirective implements Validator {
|
|
75
|
-
/**
|
|
76
|
-
* Validates each address in a semicolon-separated email list.
|
|
77
|
-
* Returns `null` when the control is empty.
|
|
78
|
-
* @param control - The form control to validate.
|
|
79
|
-
*/
|
|
80
|
-
validate(control: AbstractControl): ValidationErrors | null;
|
|
81
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<EmailsValidatorDirective, never>;
|
|
82
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<EmailsValidatorDirective, "[emails]", never, {}, {}, never, never, true, never>;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
70
|
/**
|
|
86
71
|
* Directive that validates that the host control's value is different from another control's value.
|
|
87
72
|
* Bind `[notEqual]="otherControl"`.
|
|
@@ -115,6 +100,21 @@ declare class NotEqualValidatorDirective implements Validator {
|
|
|
115
100
|
static ɵdir: i0.ɵɵDirectiveDeclaration<NotEqualValidatorDirective, "[notEqual]", never, { "notEqual": { "alias": "notEqual"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
116
101
|
}
|
|
117
102
|
|
|
103
|
+
/**
|
|
104
|
+
* Directive that validates a semicolon-separated list of email addresses.
|
|
105
|
+
* Apply `emails` to a text input containing one or more addresses separated by `;`.
|
|
106
|
+
*/
|
|
107
|
+
declare class EmailsValidatorDirective implements Validator {
|
|
108
|
+
/**
|
|
109
|
+
* Validates each address in a semicolon-separated email list.
|
|
110
|
+
* Returns `null` when the control is empty.
|
|
111
|
+
* @param control - The form control to validate.
|
|
112
|
+
*/
|
|
113
|
+
validate(control: AbstractControl): ValidationErrors | null;
|
|
114
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EmailsValidatorDirective, never>;
|
|
115
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<EmailsValidatorDirective, "[emails]", never, {}, {}, never, never, true, never>;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
118
|
/**
|
|
119
119
|
* Directive that validates a control value as a GUID / UUID string.
|
|
120
120
|
* Apply `guid` to a text input that expects a valid UUID.
|
|
@@ -322,9 +322,19 @@ declare function otpValidator<TPathKind extends PathKind = PathKind.Root>(path:
|
|
|
322
322
|
* Mirrors the `config` argument of the Angular built-ins (`required`, `email`, ...) but carries
|
|
323
323
|
* only what these validators need: the message shown to the user in place of the default one.
|
|
324
324
|
*/
|
|
325
|
-
interface ArsValidatorConfig {
|
|
325
|
+
interface ArsValidatorConfig<TValue = string, TPathKind extends PathKind = PathKind.Root> {
|
|
326
326
|
/** Message attached to the error, in place of the default Italian text. */
|
|
327
327
|
message?: string;
|
|
328
|
+
/**
|
|
329
|
+
* Applies the rule only while this returns `true`, exactly like the `when` of `required()`
|
|
330
|
+
* and of the other Angular built-ins.
|
|
331
|
+
*
|
|
332
|
+
* It exists because these validators are meant to be paired with `required()` on the same
|
|
333
|
+
* field, and a field that is only required in one mode of a dialog must only be validated in
|
|
334
|
+
* that mode: without this, a leftover value would keep a form invalid in a mode where the
|
|
335
|
+
* field is not even shown.
|
|
336
|
+
*/
|
|
337
|
+
when?: NoInfer<LogicFn<TValue, boolean, TPathKind>>;
|
|
328
338
|
}
|
|
329
339
|
/**
|
|
330
340
|
* Requires the value to be a well-formed GUID / UUID.
|
|
@@ -339,7 +349,7 @@ interface ArsValidatorConfig {
|
|
|
339
349
|
* @example
|
|
340
350
|
* const f = form(this.model, p => { required(p.serial); guid(p.serial); });
|
|
341
351
|
*/
|
|
342
|
-
declare function guid<TPathKind extends PathKind = PathKind.Root>(path: SchemaPath<string, SchemaPathRules.Supported, TPathKind>, config?: ArsValidatorConfig): void;
|
|
352
|
+
declare function guid<TPathKind extends PathKind = PathKind.Root>(path: SchemaPath<string, SchemaPathRules.Supported, TPathKind>, config?: ArsValidatorConfig<string, TPathKind>): void;
|
|
343
353
|
/**
|
|
344
354
|
* Requires the value to be a password strong enough for {@link SystemUtils.calculatePasswordStrength}.
|
|
345
355
|
*
|
|
@@ -350,7 +360,7 @@ declare function guid<TPathKind extends PathKind = PathKind.Root>(path: SchemaPa
|
|
|
350
360
|
* @param config - Optional message override.
|
|
351
361
|
* @returns void
|
|
352
362
|
*/
|
|
353
|
-
declare function password<TPathKind extends PathKind = PathKind.Root>(path: SchemaPath<string, SchemaPathRules.Supported, TPathKind>, config?: ArsValidatorConfig): void;
|
|
363
|
+
declare function password<TPathKind extends PathKind = PathKind.Root>(path: SchemaPath<string, SchemaPathRules.Supported, TPathKind>, config?: ArsValidatorConfig<string, TPathKind>): void;
|
|
354
364
|
/**
|
|
355
365
|
* Requires the value not to be made of whitespace alone.
|
|
356
366
|
*
|
|
@@ -368,7 +378,7 @@ declare function password<TPathKind extends PathKind = PathKind.Root>(path: Sche
|
|
|
368
378
|
* @example
|
|
369
379
|
* const f = form(this.model, p => { required(p.city); notEmpty(p.city); });
|
|
370
380
|
*/
|
|
371
|
-
declare function notEmpty<TPathKind extends PathKind = PathKind.Root>(path: SchemaPath<string, SchemaPathRules.Supported, TPathKind>, config?: ArsValidatorConfig): void;
|
|
381
|
+
declare function notEmpty<TPathKind extends PathKind = PathKind.Root>(path: SchemaPath<string, SchemaPathRules.Supported, TPathKind>, config?: ArsValidatorConfig<string, TPathKind>): void;
|
|
372
382
|
|
|
373
383
|
export { EmailsValidatorDirective, EqualsValidatorDirective, FileSizeValidatorDirective, GuidValidatorDirective, MaxTermsValidatorDirective, NotEmptyValidatorDirective, NotEqualValidatorDirective, NotFutureValidatorDirective, PasswordValidatorDirective, SqlDateValidatorDirective, TimeValidatorDirective, UrlValidatorDirective, ValidIfDirective, ValidatorDirective, emailsValidator, equalsValidator, guid, notEmpty, otpValidator, password, passwordValidator, timeValidator };
|
|
374
384
|
export type { ArsValidatorConfig };
|