@4sh/ui-kit 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.fr.md +46 -22
- package/README.md +45 -23
- package/fesm2022/4sh-ui-kit-actions-ui-button-split.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-actions-ui-button.mjs +2 -2
- package/fesm2022/4sh-ui-kit-actions-ui-button.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-actions-ui-link.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-actions-ui-speed-dial.mjs +439 -0
- package/fesm2022/4sh-ui-kit-actions-ui-speed-dial.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-base-ui-icon.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-base-ui-image.mjs +111 -10
- package/fesm2022/4sh-ui-kit-base-ui-image.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs +10 -4
- package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-checkbox.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs +457 -75
- package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-editor.mjs +1107 -0
- package/fesm2022/4sh-ui-kit-forms-ui-editor.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-forms-ui-field.mjs +30 -3
- package/fesm2022/4sh-ui-kit-forms-ui-field.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-group.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs +8 -2
- package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs +15 -2
- package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs +8 -4
- package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input.mjs +40 -4
- package/fesm2022/4sh-ui-kit-forms-ui-input.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-label.mjs +2 -2
- package/fesm2022/4sh-ui-kit-forms-ui-label.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-nudger.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-radio.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-rating.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-segment-control.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-select.mjs +5 -2
- package/fesm2022/4sh-ui-kit-forms-ui-select.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-slider.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-swatch-picker.mjs +317 -0
- package/fesm2022/4sh-ui-kit-forms-ui-swatch-picker.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs +8 -2
- package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-toggle-button.mjs +372 -0
- package/fesm2022/4sh-ui-kit-forms-ui-toggle-button.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-forms-ui-toggle.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms.mjs +44 -14
- package/fesm2022/4sh-ui-kit-forms.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-accordion.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-alert.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-avatar-group.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-avatar.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs +2 -2
- package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs +2 -2
- package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-empty-state.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-helper.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-progress-bar.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-read-only.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-separator.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-skeleton.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-spinner.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs +2 -2
- package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-toast.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs +2 -2
- package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-layout-ui-card.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-layout-ui-drawer.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs +45 -4
- package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-layout-ui-popover.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-motion.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs +2 -2
- package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-context-menu.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs +22 -10
- package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs +15 -4
- package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-overlay.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-table-ui-table.mjs +2 -2
- package/fesm2022/4sh-ui-kit-table-ui-table.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-theming.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit.mjs.map +1 -1
- package/mcp/data/text-search-docs.json +712 -92
- package/mcp/data/ui-config.json +5908 -3732
- package/mcp/index.js +682 -410
- package/mcp/package.json +1 -1
- package/package.json +17 -1
- package/schematics/index.cjs +1 -1
- package/styles/component-vars.scss +119 -2
- package/styles/generated/_tokens-breakpoint.scss +1 -1
- package/styles/generated/_tokens-metrics.scss +1 -1
- package/styles/generated/_tokens-primitives.scss +1 -1
- package/styles/generated/_tokens-responsive.scss +17 -17
- package/styles/generated/_tokens-semantics.scss +15 -15
- package/styles/generated/_tokens-styles.scss +1 -1
- package/styles/generated/_tokens-transitions.scss +1 -1
- package/styles/generated/_tokens-typography.scss +1 -1
- package/styles/generated/_tokens.scss +1 -1
- package/styles/utils/_helpers.scss +15 -0
- package/styles/utils/_mixins.scss +17 -1
- package/styles.css +1 -1
- package/types/4sh-ui-kit-actions-ui-speed-dial.d.ts +234 -0
- package/types/4sh-ui-kit-base-ui-image.d.ts +16 -3
- package/types/4sh-ui-kit-forms-ui-autocomplete.d.ts +4 -1
- package/types/4sh-ui-kit-forms-ui-datepicker.d.ts +186 -36
- package/types/4sh-ui-kit-forms-ui-editor.d.ts +481 -0
- package/types/4sh-ui-kit-forms-ui-field.d.ts +20 -2
- package/types/4sh-ui-kit-forms-ui-input-mask.d.ts +4 -0
- package/types/4sh-ui-kit-forms-ui-input-number.d.ts +9 -0
- package/types/4sh-ui-kit-forms-ui-input-tags.d.ts +4 -1
- package/types/4sh-ui-kit-forms-ui-input.d.ts +28 -2
- package/types/4sh-ui-kit-forms-ui-select.d.ts +2 -0
- package/types/4sh-ui-kit-forms-ui-swatch-picker.d.ts +126 -0
- package/types/4sh-ui-kit-forms-ui-textarea.d.ts +4 -0
- package/types/4sh-ui-kit-forms-ui-toggle-button.d.ts +220 -0
- package/types/4sh-ui-kit-forms.d.ts +34 -7
- package/types/4sh-ui-kit-layout-ui-modal.d.ts +7 -0
- package/types/4sh-ui-kit-navigation-ui-stepper.d.ts +8 -3
- package/types/4sh-ui-kit-navigation-ui-tabs.d.ts +14 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"4sh-ui-kit-forms-ui-file-upload.mjs","sources":["../../../projects/ui-kit/forms/ui-file-upload/src/lib/ui-file-upload.model.ts","../../../projects/ui-kit/forms/ui-file-upload/src/lib/ui-file-upload-list.ts","../../../projects/ui-kit/forms/ui-file-upload/src/lib/ui-file-upload-list.html","../../../projects/ui-kit/forms/ui-file-upload/src/lib/ui-file-upload.ts","../../../projects/ui-kit/forms/ui-file-upload/src/lib/ui-file-upload.html","../../../projects/ui-kit/forms/ui-file-upload/src/public-api.ts","../../../projects/ui-kit/forms/ui-file-upload/src/4sh-ui-kit-forms-ui-file-upload.ts"],"sourcesContent":["// =====================================================================\n// Shared model for ui-file-upload and its file-row (ui-file-upload-list).\n// =====================================================================\n\n/** Lifecycle of a selected file. */\nexport type UiUploadStatus = 'pending' | 'uploading' | 'completed' | 'error';\n\n/** A file selected in the uploader, plus its upload/validation state. */\nexport interface UiUploadFile {\n /** Stable id for tracking (kept across re-renders). */\n readonly id: string;\n /** The underlying browser File. */\n readonly file: File;\n /** File name (from the File, exposed for template convenience). */\n readonly name: string;\n /** Size in bytes. */\n readonly size: number;\n /** MIME type reported by the browser. */\n readonly type: string;\n /** Current lifecycle state. */\n status: UiUploadStatus;\n /** Upload progress, 0–100 (meaningful while `status === 'uploading'`). */\n progress: number;\n /** Object URL for image previews — MUST be revoked when the file is removed. */\n objectUrl?: string;\n /** Validation or upload error message, when `status === 'error'`. */\n error?: string;\n}\n\n/** Payload for the custom upload handler (customUpload = true). */\nexport interface UiUploadHandlerEvent {\n /** Files awaiting upload (status `pending`). */\n files: UiUploadFile[];\n /** Marks a file as uploaded (sets status `completed`, progress 100). */\n markUploaded: (file: UiUploadFile) => void;\n /** Marks a file as failed with an optional message. */\n markError: (file: UiUploadFile, message?: string) => void;\n /** Updates a file's progress (0–100). */\n setProgress: (file: UiUploadFile, progress: number) => void;\n}\n\n/** Emitted when files finish uploading (built-in uploader). */\nexport interface UiUploadEvent {\n files: UiUploadFile[];\n /** Raw XHR of the last request (built-in uploader only). */\n xhr?: XMLHttpRequest;\n}\n\n/** Emitted on a validation or upload error. */\nexport interface UiUploadErrorEvent {\n file: UiUploadFile;\n /** 'type' | 'size' | 'limit' | 'upload'. */\n reason: 'type' | 'size' | 'limit' | 'upload';\n message: string;\n}\n\n/** Human-readable file size (e.g. \"2.5 MB\"). Base-1024. */\nexport function formatFileSize(bytes: number): string {\n if (!bytes || bytes < 0) return '0 B';\n const k = 1024;\n const units = ['B', 'KB', 'MB', 'GB', 'TB'];\n const i = Math.min(Math.floor(Math.log(bytes) / Math.log(k)), units.length - 1);\n const value = bytes / Math.pow(k, i);\n const rounded = Math.round(value * 10) / 10;\n return `${rounded} ${units[i]}`;\n}\n\n/**\n * Whether a File matches an `accept` string (e.g. \"image/*,.pdf\").\n * Empty/absent accept means everything is allowed.\n */\nexport function isFileTypeAccepted(file: File, accept: string | undefined): boolean {\n if (!accept) return true;\n const patterns = accept\n .split(',')\n .map((t) => t.trim().toLowerCase())\n .filter(Boolean);\n if (!patterns.length) return true;\n\n const name = file.name.toLowerCase();\n const mime = (file.type || '').toLowerCase();\n\n return patterns.some((pattern) => {\n if (pattern.startsWith('.')) return name.endsWith(pattern); // extension\n if (pattern.endsWith('/*')) return mime.startsWith(pattern.slice(0, -1)); // \"image/\"\n return mime === pattern; // exact mime\n });\n}\n\n/** Whether a File is a previewable image. */\nexport function isImageFile(file: File): boolean {\n return /^image\\//.test(file.type);\n}\n","import { booleanAttribute, Component, computed, input, output } from '@angular/core';\nimport { UiIcon, UiIconSize } from '@4sh/ui-kit/base/ui-icon';\nimport { UiSpinner } from '@4sh/ui-kit/informative/ui-spinner';\nimport { formatFileSize, UiUploadFile } from './ui-file-upload.model';\nimport { formatLabel } from '@4sh/ui-kit/forms';\n\nexport type UiFileUploadListSize = 'default' | 'small';\n\n/**\n * ui-file-upload-list — a single file row (the repeatable unit of an upload list).\n *\n * Presentational: shows a leading thumbnail (for images) or file icon, the file\n * name + size/status, and a remove button. While the file is uploading it swaps\n * the leading icon for a `ui-spinner` and reveals a slim progress bar.\n *\n * Named to mirror the Figma component; the uploader stacks one row per file.\n */\n@Component({\n selector: 'ui-file-upload-list',\n imports: [UiIcon, UiSpinner],\n templateUrl: './ui-file-upload-list.html',\n styleUrl: './ui-file-upload-list.scss',\n})\nexport class UiFileUploadList {\n /** The file to display (name/size/status/progress/preview). */\n file = input.required<UiUploadFile>();\n size = input<UiFileUploadListSize>('default');\n /** FontAwesome icon for non-image files. */\n icon = input<string>('file');\n /** Whether the remove button is shown. */\n removable = input(true, { transform: booleanAttribute });\n /** Accessible name of the remove button (raw text — the file name is appended in the template). */\n removeAriaLabel = input<string>('Supprimer le fichier');\n /** Fallback error text when the file carries no message. */\n failedLabel = input<string>('Échec');\n /** Accessible name of the upload spinner — `{0}` is the file name. */\n uploadingLabel = input<string>('Téléversement de {0}');\n /** Accessible name of the progress bar — `{0}` is the file name. */\n progressLabel = input<string>('Progression du téléversement de {0}');\n\n /** Emitted when the remove button is activated. */\n remove = output<UiUploadFile>();\n\n /** @ignore Formatted size (e.g. \"2.5 MB\"). */\n protected readonly sizeLabel = computed(() => formatFileSize(this.file().size));\n\n /** @ignore Accessible name of the upload spinner (`{0}` filled with the file name). */\n protected readonly uploadingAriaLabel = computed(() =>\n formatLabel(this.uploadingLabel(), this.file().name),\n );\n\n /** @ignore Accessible name of the progress bar (`{0}` filled with the file name). */\n protected readonly progressAriaLabel = computed(() =>\n formatLabel(this.progressLabel(), this.file().name),\n );\n\n /** @ignore Uploading in progress → show the spinner + progress bar. */\n protected readonly isUploading = computed(() => this.file().status === 'uploading');\n\n /** @ignore Error state → surface the message + error styling. */\n protected readonly isError = computed(() => this.file().status === 'error');\n\n /** @ignore Image with a usable preview URL → render a thumbnail. */\n protected readonly thumbnail = computed(() => this.file().objectUrl ?? null);\n\n /** @ignore Secondary line: error message, else size (+ status hint). */\n protected readonly infoLabel = computed(() => {\n const f = this.file();\n if (f.status === 'error') return f.error ?? this.failedLabel();\n if (f.status === 'uploading') return `${this.sizeLabel()} · ${Math.round(f.progress)} %`;\n return this.sizeLabel();\n });\n\n /** @ignore */\n protected readonly iconSize = computed<UiIconSize>(() => (this.size() === 'small' ? 'sm' : 'md'));\n\n /** @ignore */\n protected readonly classes = computed(() => {\n const c = ['ui-file-upload-list'];\n if (this.size() !== 'default') c.push(`_${this.size()}`);\n if (this.isError()) c.push('_error');\n if (this.thumbnail()) c.push('_has-thumb');\n return c.join(' ');\n });\n\n /** @ignore */\n protected onRemove(): void {\n this.remove.emit(this.file());\n }\n}\n","<div [class]=\"classes()\">\n <div class=\"ui-file-upload-list-file\">\n <span class=\"ui-file-upload-list-media\">\n @if (isUploading()) {\n <ui-spinner size=\"small\" [ariaLabel]=\"uploadingAriaLabel()\" />\n } @else if (thumbnail(); as src) {\n <img class=\"ui-file-upload-list-thumb\" [src]=\"src\" alt=\"\" />\n } @else {\n <ui-icon [name]=\"isError() ? 'triangle-exclamation' : icon()\" [size]=\"iconSize()\" />\n }\n </span>\n\n <span class=\"ui-file-upload-list-infos\">\n <span class=\"ui-file-upload-list-name\" [title]=\"file().name\">{{ file().name }}</span>\n <span class=\"ui-file-upload-list-meta\">{{ infoLabel() }}</span>\n </span>\n </div>\n\n @if (removable()) {\n <button\n type=\"button\"\n class=\"ui-file-upload-list-remove\"\n [attr.aria-label]=\"removeAriaLabel() + ' : ' + file().name\"\n (click)=\"onRemove()\"\n >\n <ui-icon name=\"trash\" [size]=\"iconSize()\" />\n </button>\n }\n\n @if (isUploading()) {\n <div\n class=\"ui-file-upload-list-progress\"\n role=\"progressbar\"\n [attr.aria-valuenow]=\"file().progress\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n [attr.aria-label]=\"progressAriaLabel()\"\n >\n <span class=\"ui-file-upload-list-progress-bar\" [style.width.%]=\"file().progress\"></span>\n </div>\n }\n</div>\n","import {\n booleanAttribute,\n Component,\n computed,\n DestroyRef,\n effect,\n ElementRef,\n inject,\n input,\n isDevMode,\n numberAttribute,\n output,\n signal,\n TemplateRef,\n viewChild,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { UiIcon } from '@4sh/ui-kit/base/ui-icon';\nimport { UiButton } from '@4sh/ui-kit/actions/ui-button';\nimport { UiFileUploadList } from './ui-file-upload-list';\nimport { formatLabel } from '@4sh/ui-kit/forms';\nimport {\n isFileTypeAccepted,\n isImageFile,\n UiUploadErrorEvent,\n UiUploadEvent,\n UiUploadFile,\n UiUploadHandlerEvent,\n} from './ui-file-upload.model';\n\nexport type UiFileUploadMode = 'field' | 'drag';\nexport type UiFileUploadSize = 'default' | 'small';\n\nlet nextUploadId = 0;\nlet nextInstanceId = 0;\n\n/**\n * ui-file-upload — headless file uploader (field + drag-and-drop).\n *\n * A native `<input type=\"file\">` (visually hidden) drives selection, so the OS\n * picker, keyboard and screen readers work natively; the whole component is also\n * a drop target. Selection is validated client-side (type / size / count) and\n * files can be uploaded automatically (`auto`), on demand, or via a custom\n * handler (`customUpload`). Progress is tracked with `XMLHttpRequest` so no\n * global HTTP provider is required.\n *\n * Security notes: client-side validation is a UX convenience — always re-validate\n * server-side. Image previews use object URLs that are revoked on removal/clear.\n */\n@Component({\n selector: 'ui-file-upload',\n imports: [NgTemplateOutlet, UiIcon, UiButton, UiFileUploadList],\n templateUrl: './ui-file-upload.html',\n styleUrl: './ui-file-upload.scss',\n})\nexport class UiFileUpload {\n // --- Layout ----------------------------------------------------------\n /** `field` = compact input + Browse button; `drag` = full drop zone. */\n mode = input<UiFileUploadMode>('field');\n size = input<UiFileUploadSize>('default');\n\n // --- Selection -------------------------------------------------------\n /** Native input `name` (submitted with a surrounding form). */\n name = input<string>();\n /** Allow selecting more than one file. */\n multiple = input(false, { transform: booleanAttribute });\n /** Native `accept` filter, e.g. \"image/*,.pdf\". Also enforced on drop. */\n accept = input<string>();\n /** Max size per file, in bytes. */\n maxFileSize = input<number, unknown>(undefined, { transform: numberAttribute });\n /** Max number of files kept at once. */\n fileLimit = input<number, unknown>(undefined, { transform: numberAttribute });\n disabled = input(false, { transform: booleanAttribute });\n\n // --- Upload behaviour ------------------------------------------------\n /** Upload each file as soon as it is selected. */\n auto = input(false, { transform: booleanAttribute });\n /** Delegate uploading to the `uploadHandler` output instead of the built-in XHR. */\n customUpload = input(false, { transform: booleanAttribute });\n /** Endpoint for the built-in uploader. */\n url = input<string>();\n /** HTTP method for the built-in uploader. */\n method = input<'post' | 'put'>('post');\n /** Field name used for each file in the multipart body. */\n fieldName = input<string>('files');\n /** Send credentials (cookies) with the built-in upload request. */\n withCredentials = input(false, { transform: booleanAttribute });\n\n // --- Presentation / labels ------------------------------------------\n /** Show the file list under the control. */\n showFileList = input(true, { transform: booleanAttribute });\n /** Show the Upload/Cancel toolbar buttons (drag mode). */\n showControls = input(true, { transform: booleanAttribute });\n browseLabel = input<string>('Parcourir');\n /** Placeholder shown in field mode before any selection. */\n chooseLabel = input<string>('Choisir un fichier…');\n uploadLabel = input<string>('Téléverser');\n cancelLabel = input<string>('Effacer');\n /** Drag-zone link + prompt. */\n dragLinkLabel = input<string>('Cliquer pour téléverser');\n dragPromptLabel = input<string>('ou glisser-déposer les fichiers ici');\n /** Small hint under the drag prompt (e.g. \"JPG, PNG (max 5 MB)\"). */\n hint = input<string>();\n /** Accessible name for the whole control. */\n // Composite widget (dropzone + file list), not a single-value CVA control: unlike the other\n // form components it doesn't extend BaseFieldControl, so it redeclares its own `ariaLabel`\n // here — with a non-undefined default, since the dropzone always needs an accessible name.\n ariaLabel = input<string>('Téléversement de fichiers');\n /** Multi-file summary in field mode — `{0}` is replaced by the file count. */\n filesSummaryLabel = input<string>('{0} fichiers');\n /** Rejection message: file type not accepted — `{0}` is the file name. */\n invalidTypeMessage = input<string>('Type de fichier non autorisé : {0}');\n /** Rejection message: file too large — `{0}` is the file name. */\n invalidSizeMessage = input<string>('Fichier trop volumineux : {0}');\n /** Rejection message: `fileLimit` reached — `{0}` is the limit. */\n limitReachedMessage = input<string>('Nombre maximum de fichiers atteint ({0}).');\n /** Error shown when an upload fails without a server message. */\n uploadErrorMessage = input<string>('Échec du téléversement');\n /** Error shown when the upload request fails at the network level. */\n networkErrorMessage = input<string>('Erreur réseau');\n /** Error shown on a non-2xx response — `{0}` is the HTTP status. */\n httpErrorMessage = input<string>('Erreur {0}');\n\n // --- Templates (drag/advanced) --------------------------------------\n /** Overrides a single file row (context: `{ $implicit: UiUploadFile, remove }`). */\n fileTemplate = input<TemplateRef<unknown>>();\n /** Overrides the content section (context: `{ $implicit: UiUploadFile[], remove, clear }`). */\n contentTemplate = input<TemplateRef<unknown>>();\n /** Custom toolbar content (context: `{ $implicit: UiUploadFile[], choose, upload, clear }`). */\n toolbarTemplate = input<TemplateRef<unknown>>();\n\n // --- Outputs ---------------------------------------------------------\n /** Files added to the selection (validated). */\n selected = output<UiUploadFile[]>();\n /** The full current selection changed. */\n filesChange = output<UiUploadFile[]>();\n /** A custom upload was requested (customUpload = true). */\n uploadHandler = output<UiUploadHandlerEvent>();\n /** Built-in upload completed for a batch. */\n uploaded = output<UiUploadEvent>();\n /** A file failed validation or upload. */\n uploadError = output<UiUploadErrorEvent>();\n /** A file was removed. */\n removed = output<UiUploadFile>();\n /** The selection was cleared. */\n cleared = output<void>();\n\n /** @ignore Stable id linking the visible label(s) to the native input. */\n protected readonly inputId = `ui-file-upload-${nextInstanceId++}`;\n\n private readonly host = inject(ElementRef<HTMLElement>);\n private readonly destroyRef = inject(DestroyRef);\n private readonly fileInput = viewChild.required<ElementRef<HTMLInputElement>>('fileInput');\n\n /** In-flight requests, keyed by file id, so we can abort. */\n private readonly requests = new Map<string, XMLHttpRequest>();\n\n /** @ignore Current selection. */\n private readonly selection = signal<UiUploadFile[]>([]);\n /** Read-only view of the current files. */\n readonly files = this.selection.asReadonly();\n\n /** @ignore Drop-zone highlight while dragging over. */\n protected readonly dragging = signal(false);\n /** @ignore Transient validation messages (rendered in a live region). */\n protected readonly messages = signal<string[]>([]);\n\n constructor() {\n // Revoke every object URL when the component is destroyed (no leaks).\n this.destroyRef.onDestroy(() => {\n for (const f of this.selection()) this.revoke(f);\n for (const xhr of this.requests.values()) xhr.abort();\n });\n\n // A11y safeguard: the control needs an accessible name.\n if (isDevMode()) {\n effect(() => {\n if (!this.ariaLabel()) {\n console.warn('[ui-file-upload] Provide `ariaLabel` to name the control.');\n }\n });\n }\n }\n\n /** @ignore */\n protected readonly hasFiles = computed(() => this.selection().length > 0);\n /** @ignore */\n protected readonly pending = computed(() =>\n this.selection().filter((f) => f.status === 'pending'),\n );\n /** @ignore Single-file summary shown in field mode. */\n protected readonly fieldSummary = computed(() => {\n const files = this.selection();\n if (!files.length) return this.chooseLabel();\n if (files.length === 1) return files[0].name;\n return formatLabel(this.filesSummaryLabel(), files.length);\n });\n /** @ignore */\n protected readonly canUpload = computed(\n () => !this.disabled() && this.pending().length > 0 && (this.customUpload() || !!this.url()),\n );\n\n /** @ignore */\n protected readonly classes = computed(() => {\n const c = ['ui-file-upload', `_${this.mode()}`];\n if (this.size() !== 'default') c.push(`_${this.size()}`);\n if (this.dragging()) c.push('_dragging');\n if (this.disabled()) c.push('_disabled');\n return c.join(' ');\n });\n\n // --- Bound refs for custom templates (stable identities) -------------\n /** @ignore */ protected readonly removeFn = (f: UiUploadFile): void => this.remove(f);\n /** @ignore */ protected readonly clearFn = (): void => this.clear();\n /** @ignore */ protected readonly chooseFn = (): void => this.choose();\n /** @ignore */ protected readonly uploadFn = (): void => this.upload();\n\n // --- Public API ------------------------------------------------------\n\n /** Opens the native file picker. */\n choose(): void {\n if (this.disabled()) return;\n this.fileInput().nativeElement.click();\n }\n\n /** Uploads all pending files (built-in XHR, or emits `uploadHandler`). */\n upload(): void {\n const pending = this.pending();\n if (!pending.length) return;\n\n if (this.customUpload()) {\n this.emitCustomUpload(pending);\n return;\n }\n const endpoint = this.url();\n if (!endpoint) return;\n for (const f of pending) this.xhrUpload(f, endpoint);\n }\n\n /** Removes a file (aborts its upload, revokes its preview). */\n remove(target: UiUploadFile): void {\n this.requests.get(target.id)?.abort();\n this.requests.delete(target.id);\n this.revoke(target);\n this.selection.update((files) => files.filter((f) => f.id !== target.id));\n this.removed.emit(target);\n this.filesChange.emit(this.selection());\n }\n\n /** Clears the whole selection. */\n clear(): void {\n for (const xhr of this.requests.values()) xhr.abort();\n this.requests.clear();\n for (const f of this.selection()) this.revoke(f);\n this.selection.set([]);\n this.messages.set([]);\n this.resetInput();\n this.cleared.emit();\n this.filesChange.emit([]);\n }\n\n // --- Native input / drop --------------------------------------------\n\n /** @ignore */\n protected onInputChange(event: Event): void {\n const input = event.target as HTMLInputElement;\n this.ingest(input.files);\n // Reset so selecting the same file again re-triggers `change`.\n this.resetInput();\n }\n\n /** @ignore */\n protected onDragOver(event: DragEvent): void {\n if (this.disabled()) return;\n event.preventDefault();\n event.stopPropagation();\n this.dragging.set(true);\n }\n\n /** @ignore */\n protected onDragLeave(event: DragEvent): void {\n if (this.disabled()) return;\n event.preventDefault();\n // Ignore leave events bubbling from children still inside the zone.\n if (this.host.nativeElement.contains(event.relatedTarget as Node)) return;\n this.dragging.set(false);\n }\n\n /** @ignore */\n protected onDrop(event: DragEvent): void {\n if (this.disabled()) return;\n event.preventDefault();\n event.stopPropagation();\n this.dragging.set(false);\n this.ingest(event.dataTransfer?.files ?? null);\n }\n\n // --- Internals -------------------------------------------------------\n\n /** Validate + add a FileList to the selection. */\n private ingest(list: FileList | null): void {\n if (!list || !list.length || this.disabled()) return;\n\n const incoming = Array.from(list);\n const added: UiUploadFile[] = [];\n const newMessages: string[] = [];\n const limit = this.fileLimit();\n const maxSize = this.maxFileSize();\n\n for (const file of incoming) {\n // Single-file mode: the new file replaces the current one, so only cap the incoming batch.\n if (!this.multiple() && added.length >= 1) break;\n\n const item = this.toUploadFile(file);\n\n if (!isFileTypeAccepted(file, this.accept())) {\n this.fail(item, 'type', formatLabel(this.invalidTypeMessage(), file.name), newMessages);\n continue;\n }\n if (maxSize != null && file.size > maxSize) {\n this.fail(item, 'size', formatLabel(this.invalidSizeMessage(), file.name), newMessages);\n continue;\n }\n if (\n limit != null &&\n (this.multiple() ? this.selection().length : 0) + added.length >= limit\n ) {\n this.fail(item, 'limit', formatLabel(this.limitReachedMessage(), limit), newMessages);\n continue;\n }\n added.push(item);\n }\n\n this.messages.set(newMessages);\n if (!added.length) return;\n\n if (!this.multiple()) {\n // Replacement: release resources held by the previous selection.\n for (const previous of this.selection()) {\n this.requests.get(previous.id)?.abort();\n this.requests.delete(previous.id);\n this.revoke(previous);\n }\n }\n this.selection.update((files) => (this.multiple() ? [...files, ...added] : added));\n this.selected.emit(added);\n this.filesChange.emit(this.selection());\n\n if (this.auto()) this.upload();\n }\n\n private toUploadFile(file: File): UiUploadFile {\n return {\n id: `uifu-${nextUploadId++}`,\n file,\n name: file.name,\n size: file.size,\n type: file.type,\n status: 'pending',\n progress: 0,\n objectUrl: isImageFile(file) ? URL.createObjectURL(file) : undefined,\n };\n }\n\n private fail(\n item: UiUploadFile,\n reason: UiUploadErrorEvent['reason'],\n message: string,\n sink: string[],\n ): void {\n this.revoke(item);\n sink.push(message);\n this.uploadError.emit({ file: { ...item, status: 'error', error: message }, reason, message });\n }\n\n /** Mutates one file in place (immutably) and pushes a new array reference. */\n private patch(id: string, changes: Partial<UiUploadFile>): void {\n this.selection.update((files) => files.map((f) => (f.id === id ? { ...f, ...changes } : f)));\n }\n\n private emitCustomUpload(pending: UiUploadFile[]): void {\n for (const f of pending) this.patch(f.id, { status: 'uploading', progress: 0 });\n this.uploadHandler.emit({\n files: pending,\n setProgress: (file, progress) =>\n this.patch(file.id, {\n status: 'uploading',\n progress: Math.max(0, Math.min(100, progress)),\n }),\n markUploaded: (file) => {\n this.patch(file.id, { status: 'completed', progress: 100 });\n this.filesChange.emit(this.selection());\n },\n markError: (file, msg) => {\n this.patch(file.id, { status: 'error', error: msg ?? this.uploadErrorMessage() });\n this.uploadError.emit({\n file,\n reason: 'upload',\n message: msg ?? this.uploadErrorMessage(),\n });\n },\n });\n }\n\n private xhrUpload(item: UiUploadFile, endpoint: string): void {\n const xhr = new XMLHttpRequest();\n this.requests.set(item.id, xhr);\n this.patch(item.id, { status: 'uploading', progress: 0 });\n\n const body = new FormData();\n body.append(this.fieldName(), item.file, item.name);\n\n xhr.upload.addEventListener('progress', (e) => {\n if (e.lengthComputable)\n this.patch(item.id, { progress: Math.round((e.loaded / e.total) * 100) });\n });\n xhr.addEventListener('load', () => {\n this.requests.delete(item.id);\n if (xhr.status >= 200 && xhr.status < 300) {\n this.patch(item.id, { status: 'completed', progress: 100 });\n this.uploaded.emit({ files: [item], xhr });\n this.filesChange.emit(this.selection());\n } else {\n this.uploadFailed(item, formatLabel(this.httpErrorMessage(), xhr.status));\n }\n });\n xhr.addEventListener('error', () => this.uploadFailed(item, this.networkErrorMessage()));\n xhr.addEventListener('abort', () => this.requests.delete(item.id));\n\n xhr.open(this.method().toUpperCase(), endpoint, true);\n xhr.withCredentials = this.withCredentials();\n xhr.send(body);\n }\n\n private uploadFailed(item: UiUploadFile, message: string): void {\n this.requests.delete(item.id);\n this.patch(item.id, { status: 'error', error: message });\n this.uploadError.emit({ file: item, reason: 'upload', message });\n }\n\n private revoke(file: UiUploadFile): void {\n if (file.objectUrl) URL.revokeObjectURL(file.objectUrl);\n }\n\n private resetInput(): void {\n const el = this.fileInput().nativeElement;\n if (el) el.value = '';\n }\n}\n","<div\n [class]=\"classes()\"\n (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave($event)\"\n (drop)=\"onDrop($event)\"\n>\n <!-- Real native control (visually hidden, keeps keyboard + screen-reader support) -->\n <input\n #fileInput\n class=\"ui-file-upload-input\"\n type=\"file\"\n [id]=\"inputId\"\n [attr.name]=\"name()\"\n [attr.accept]=\"accept() || null\"\n [multiple]=\"multiple()\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"ariaLabel() || null\"\n (change)=\"onInputChange($event)\"\n />\n\n @if (mode() === 'field') {\n <!-- Field mode: compact summary + Browse trigger (whole label opens picker) -->\n <label class=\"ui-file-upload-field\" [attr.for]=\"inputId\">\n <span class=\"ui-file-upload-field-text\" [class._placeholder]=\"!hasFiles()\">{{\n fieldSummary()\n }}</span>\n <span class=\"ui-file-upload-browse\" aria-hidden=\"true\">{{ browseLabel() }}</span>\n </label>\n } @else {\n <!-- Drag mode: full drop zone -->\n <label class=\"ui-file-upload-zone\" [attr.for]=\"inputId\">\n <ui-icon class=\"ui-file-upload-zone-icon\" name=\"cloud-arrow-up\" size=\"lg\" />\n <span class=\"ui-file-upload-zone-content\">\n <span class=\"ui-file-upload-zone-title\">\n <span class=\"ui-file-upload-zone-link\">{{ dragLinkLabel() }}</span>\n <span class=\"ui-file-upload-zone-prompt\">{{ dragPromptLabel() }}</span>\n </span>\n @if (hint(); as h) {\n <span class=\"ui-file-upload-zone-hint\">{{ h }}</span>\n }\n </span>\n </label>\n\n <!-- Toolbar (custom, or default Upload/Clear actions) -->\n @if (toolbarTemplate(); as tpl) {\n <div class=\"ui-file-upload-toolbar\">\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: files(),\n choose: chooseFn,\n upload: uploadFn,\n clear: clearFn,\n }\"\n />\n </div>\n } @else if (showControls() && hasFiles()) {\n <div class=\"ui-file-upload-toolbar\">\n @if (!auto()) {\n <ui-button\n [label]=\"uploadLabel()\"\n [size]=\"size() === 'small' ? 'small' : 'default'\"\n icon=\"cloud-arrow-up\"\n [disabled]=\"!canUpload()\"\n (buttonClick)=\"upload()\"\n />\n }\n <ui-button\n [label]=\"cancelLabel()\"\n level=\"low\"\n [size]=\"size() === 'small' ? 'small' : 'default'\"\n icon=\"xmark\"\n (buttonClick)=\"clear()\"\n />\n </div>\n }\n }\n\n <!-- Content section: the file list -->\n @if (contentTemplate(); as tpl) {\n <div class=\"ui-file-upload-content\">\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: files(), remove: removeFn, clear: clearFn }\"\n />\n </div>\n } @else if (showFileList() && hasFiles()) {\n <ul class=\"ui-file-upload-content\" role=\"list\">\n @for (f of files(); track f.id) {\n <li>\n @if (fileTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: f, remove: removeFn }\"\n />\n } @else {\n <ui-file-upload-list [file]=\"f\" [size]=\"size()\" (remove)=\"remove($event)\" />\n }\n </li>\n }\n </ul>\n }\n\n <!-- Validation messages (assertive live region) -->\n @if (messages().length) {\n <div class=\"ui-file-upload-messages\" role=\"alert\" aria-live=\"assertive\">\n @for (msg of messages(); track msg) {\n <p class=\"ui-file-upload-message\">{{ msg }}</p>\n }\n </div>\n }\n</div>\n","/*\n * Public API Surface of ui-kit/ui-file-upload\n *\n * Includes `ui-file-upload-list`: it renders the upload's own file model,\n * so the two live in one entry point (a separate one would be a cycle).\n */\n\nexport * from './lib/ui-file-upload-list';\nexport * from './lib/ui-file-upload.model';\nexport * from './lib/ui-file-upload';\n","/**\n * Generated bundle index. Do not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AA,UAAA,EAAA,CAAA;kBANxB,SAAS;+BACE,gBAAgB,EAAA,OAAA,EACjB,CAAC,gBAAgB,EAAE,MAAM,EAAE,QAAQ,EAAE,gBAAgB,CAAC,EAAA,QAAA,EAAA,muHAAA,EAAA,MAAA,EAAA,CAAA,qwNAAA,CAAA,EAAA;43HAqGe,WAAW,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AExJ3F;;;;;AAKG;;ACLH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"4sh-ui-kit-forms-ui-file-upload.mjs","sources":["../../../projects/ui-kit/forms/ui-file-upload/src/lib/ui-file-upload.model.ts","../../../projects/ui-kit/forms/ui-file-upload/src/lib/ui-file-upload-list.ts","../../../projects/ui-kit/forms/ui-file-upload/src/lib/ui-file-upload-list.html","../../../projects/ui-kit/forms/ui-file-upload/src/lib/ui-file-upload.ts","../../../projects/ui-kit/forms/ui-file-upload/src/lib/ui-file-upload.html","../../../projects/ui-kit/forms/ui-file-upload/src/public-api.ts","../../../projects/ui-kit/forms/ui-file-upload/src/4sh-ui-kit-forms-ui-file-upload.ts"],"sourcesContent":["// =====================================================================\n// Shared model for ui-file-upload and its file-row (ui-file-upload-list).\n// =====================================================================\n\n/** Lifecycle of a selected file. */\nexport type UiUploadStatus = 'pending' | 'uploading' | 'completed' | 'error';\n\n/** A file selected in the uploader, plus its upload/validation state. */\nexport interface UiUploadFile {\n /** Stable id for tracking (kept across re-renders). */\n readonly id: string;\n /** The underlying browser File. */\n readonly file: File;\n /** File name (from the File, exposed for template convenience). */\n readonly name: string;\n /** Size in bytes. */\n readonly size: number;\n /** MIME type reported by the browser. */\n readonly type: string;\n /** Current lifecycle state. */\n status: UiUploadStatus;\n /** Upload progress, 0–100 (meaningful while `status === 'uploading'`). */\n progress: number;\n /** Object URL for image previews — MUST be revoked when the file is removed. */\n objectUrl?: string;\n /** Validation or upload error message, when `status === 'error'`. */\n error?: string;\n}\n\n/** Payload for the custom upload handler (customUpload = true). */\nexport interface UiUploadHandlerEvent {\n /** Files awaiting upload (status `pending`). */\n files: UiUploadFile[];\n /** Marks a file as uploaded (sets status `completed`, progress 100). */\n markUploaded: (file: UiUploadFile) => void;\n /** Marks a file as failed with an optional message. */\n markError: (file: UiUploadFile, message?: string) => void;\n /** Updates a file's progress (0–100). */\n setProgress: (file: UiUploadFile, progress: number) => void;\n}\n\n/** Emitted when files finish uploading (built-in uploader). */\nexport interface UiUploadEvent {\n files: UiUploadFile[];\n /** Raw XHR of the last request (built-in uploader only). */\n xhr?: XMLHttpRequest;\n}\n\n/** Emitted on a validation or upload error. */\nexport interface UiUploadErrorEvent {\n file: UiUploadFile;\n /** 'type' | 'size' | 'limit' | 'upload'. */\n reason: 'type' | 'size' | 'limit' | 'upload';\n message: string;\n}\n\n/** Human-readable file size (e.g. \"2.5 MB\"). Base-1024. */\nexport function formatFileSize(bytes: number): string {\n if (!bytes || bytes < 0) return '0 B';\n const k = 1024;\n const units = ['B', 'KB', 'MB', 'GB', 'TB'];\n const i = Math.min(Math.floor(Math.log(bytes) / Math.log(k)), units.length - 1);\n const value = bytes / Math.pow(k, i);\n const rounded = Math.round(value * 10) / 10;\n return `${rounded} ${units[i]}`;\n}\n\n/**\n * Whether a File matches an `accept` string (e.g. \"image/*,.pdf\").\n * Empty/absent accept means everything is allowed.\n */\nexport function isFileTypeAccepted(file: File, accept: string | undefined): boolean {\n if (!accept) return true;\n const patterns = accept\n .split(',')\n .map((t) => t.trim().toLowerCase())\n .filter(Boolean);\n if (!patterns.length) return true;\n\n const name = file.name.toLowerCase();\n const mime = (file.type || '').toLowerCase();\n\n return patterns.some((pattern) => {\n if (pattern.startsWith('.')) return name.endsWith(pattern); // extension\n if (pattern.endsWith('/*')) return mime.startsWith(pattern.slice(0, -1)); // \"image/\"\n return mime === pattern; // exact mime\n });\n}\n\n/** Whether a File is a previewable image. */\nexport function isImageFile(file: File): boolean {\n return /^image\\//.test(file.type);\n}\n","import { booleanAttribute, Component, computed, input, output } from '@angular/core';\nimport { UiIcon, UiIconSize } from '@4sh/ui-kit/base/ui-icon';\nimport { UiSpinner } from '@4sh/ui-kit/informative/ui-spinner';\nimport { formatFileSize, UiUploadFile } from './ui-file-upload.model';\nimport { formatLabel } from '@4sh/ui-kit/forms';\n\nexport type UiFileUploadListSize = 'default' | 'small';\n\n/**\n * ui-file-upload-list — a single file row (the repeatable unit of an upload list).\n *\n * Presentational: shows a leading thumbnail (for images) or file icon, the file\n * name + size/status, and a remove button. While the file is uploading it swaps\n * the leading icon for a `ui-spinner` and reveals a slim progress bar.\n *\n * Named to mirror the Figma component; the uploader stacks one row per file.\n */\n@Component({\n selector: 'ui-file-upload-list',\n imports: [UiIcon, UiSpinner],\n templateUrl: './ui-file-upload-list.html',\n styleUrl: './ui-file-upload-list.scss',\n})\nexport class UiFileUploadList {\n /** The file to display (name/size/status/progress/preview). */\n file = input.required<UiUploadFile>();\n size = input<UiFileUploadListSize>('default');\n /** FontAwesome icon for non-image files. */\n icon = input<string>('file');\n /** Whether the remove button is shown. */\n removable = input(true, { transform: booleanAttribute });\n /** Accessible name of the remove button (raw text — the file name is appended in the template). */\n removeAriaLabel = input<string>('Supprimer le fichier');\n /** Fallback error text when the file carries no message. */\n failedLabel = input<string>('Échec');\n /** Accessible name of the upload spinner — `{0}` is the file name. */\n uploadingLabel = input<string>('Téléversement de {0}');\n /** Accessible name of the progress bar — `{0}` is the file name. */\n progressLabel = input<string>('Progression du téléversement de {0}');\n\n /** Emitted when the remove button is activated. */\n remove = output<UiUploadFile>();\n\n /** @ignore Formatted size (e.g. \"2.5 MB\"). */\n protected readonly sizeLabel = computed(() => formatFileSize(this.file().size));\n\n /** @ignore Accessible name of the upload spinner (`{0}` filled with the file name). */\n protected readonly uploadingAriaLabel = computed(() =>\n formatLabel(this.uploadingLabel(), this.file().name),\n );\n\n /** @ignore Accessible name of the progress bar (`{0}` filled with the file name). */\n protected readonly progressAriaLabel = computed(() =>\n formatLabel(this.progressLabel(), this.file().name),\n );\n\n /** @ignore Uploading in progress → show the spinner + progress bar. */\n protected readonly isUploading = computed(() => this.file().status === 'uploading');\n\n /** @ignore Error state → surface the message + error styling. */\n protected readonly isError = computed(() => this.file().status === 'error');\n\n /** @ignore Image with a usable preview URL → render a thumbnail. */\n protected readonly thumbnail = computed(() => this.file().objectUrl ?? null);\n\n /** @ignore Secondary line: error message, else size (+ status hint). */\n protected readonly infoLabel = computed(() => {\n const f = this.file();\n if (f.status === 'error') return f.error ?? this.failedLabel();\n if (f.status === 'uploading') return `${this.sizeLabel()} · ${Math.round(f.progress)} %`;\n return this.sizeLabel();\n });\n\n /** @ignore */\n protected readonly iconSize = computed<UiIconSize>(() => (this.size() === 'small' ? 'sm' : 'md'));\n\n /** @ignore */\n protected readonly classes = computed(() => {\n const c = ['ui-file-upload-list'];\n if (this.size() !== 'default') c.push(`_${this.size()}`);\n if (this.isError()) c.push('_error');\n if (this.thumbnail()) c.push('_has-thumb');\n return c.join(' ');\n });\n\n /** @ignore */\n protected onRemove(): void {\n this.remove.emit(this.file());\n }\n}\n","<div [class]=\"classes()\">\n <div class=\"ui-file-upload-list-file\">\n <span class=\"ui-file-upload-list-media\">\n @if (isUploading()) {\n <ui-spinner size=\"small\" [ariaLabel]=\"uploadingAriaLabel()\" />\n } @else if (thumbnail(); as src) {\n <img class=\"ui-file-upload-list-thumb\" [src]=\"src\" alt=\"\" />\n } @else {\n <ui-icon [name]=\"isError() ? 'triangle-exclamation' : icon()\" [size]=\"iconSize()\" />\n }\n </span>\n\n <span class=\"ui-file-upload-list-infos\">\n <span class=\"ui-file-upload-list-name\" [title]=\"file().name\">{{ file().name }}</span>\n <span class=\"ui-file-upload-list-meta\">{{ infoLabel() }}</span>\n </span>\n </div>\n\n @if (removable()) {\n <button\n type=\"button\"\n class=\"ui-file-upload-list-remove\"\n [attr.aria-label]=\"removeAriaLabel() + ' : ' + file().name\"\n (click)=\"onRemove()\"\n >\n <ui-icon name=\"trash\" [size]=\"iconSize()\" />\n </button>\n }\n\n @if (isUploading()) {\n <div\n class=\"ui-file-upload-list-progress\"\n role=\"progressbar\"\n [attr.aria-valuenow]=\"file().progress\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n [attr.aria-label]=\"progressAriaLabel()\"\n >\n <span class=\"ui-file-upload-list-progress-bar\" [style.width.%]=\"file().progress\"></span>\n </div>\n }\n</div>\n","import {\n booleanAttribute,\n Component,\n computed,\n DestroyRef,\n effect,\n ElementRef,\n inject,\n input,\n isDevMode,\n numberAttribute,\n output,\n signal,\n TemplateRef,\n viewChild,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { UiIcon } from '@4sh/ui-kit/base/ui-icon';\nimport { UiButton } from '@4sh/ui-kit/actions/ui-button';\nimport { UiFileUploadList } from './ui-file-upload-list';\nimport { formatLabel } from '@4sh/ui-kit/forms';\nimport {\n isFileTypeAccepted,\n isImageFile,\n UiUploadErrorEvent,\n UiUploadEvent,\n UiUploadFile,\n UiUploadHandlerEvent,\n} from './ui-file-upload.model';\n\nexport type UiFileUploadMode = 'field' | 'drag';\nexport type UiFileUploadSize = 'default' | 'small';\n\nlet nextUploadId = 0;\nlet nextInstanceId = 0;\n\n/**\n * ui-file-upload — headless file uploader (field + drag-and-drop).\n *\n * A native `<input type=\"file\">` (visually hidden) drives selection, so the OS\n * picker, keyboard and screen readers work natively; the whole component is also\n * a drop target. Selection is validated client-side (type / size / count) and\n * files can be uploaded automatically (`auto`), on demand, or via a custom\n * handler (`customUpload`). Progress is tracked with `XMLHttpRequest` so no\n * global HTTP provider is required.\n *\n * Security notes: client-side validation is a UX convenience — always re-validate\n * server-side. Image previews use object URLs that are revoked on removal/clear.\n */\n@Component({\n selector: 'ui-file-upload',\n imports: [NgTemplateOutlet, UiIcon, UiButton, UiFileUploadList],\n templateUrl: './ui-file-upload.html',\n styleUrl: './ui-file-upload.scss',\n})\nexport class UiFileUpload {\n // --- Layout ----------------------------------------------------------\n /** `field` = compact input + Browse button; `drag` = full drop zone. */\n mode = input<UiFileUploadMode>('field');\n size = input<UiFileUploadSize>('default');\n\n // --- Selection -------------------------------------------------------\n /** Native input `name` (submitted with a surrounding form). */\n name = input<string>();\n /** Allow selecting more than one file. */\n multiple = input(false, { transform: booleanAttribute });\n /** Native `accept` filter, e.g. \"image/*,.pdf\". Also enforced on drop. */\n accept = input<string>();\n /** Max size per file, in bytes. */\n maxFileSize = input<number, unknown>(undefined, { transform: numberAttribute });\n /** Max number of files kept at once. */\n fileLimit = input<number, unknown>(undefined, { transform: numberAttribute });\n disabled = input(false, { transform: booleanAttribute });\n\n // --- Upload behaviour ------------------------------------------------\n /** Upload each file as soon as it is selected. */\n auto = input(false, { transform: booleanAttribute });\n /** Delegate uploading to the `uploadHandler` output instead of the built-in XHR. */\n customUpload = input(false, { transform: booleanAttribute });\n /** Endpoint for the built-in uploader. */\n url = input<string>();\n /** HTTP method for the built-in uploader. */\n method = input<'post' | 'put'>('post');\n /** Field name used for each file in the multipart body. */\n fieldName = input<string>('files');\n /** Send credentials (cookies) with the built-in upload request. */\n withCredentials = input(false, { transform: booleanAttribute });\n\n // --- Presentation / labels ------------------------------------------\n /** Show the file list under the control. */\n showFileList = input(true, { transform: booleanAttribute });\n /** Show the Upload/Cancel toolbar buttons (drag mode). */\n showControls = input(true, { transform: booleanAttribute });\n browseLabel = input<string>('Parcourir');\n /** Placeholder shown in field mode before any selection. */\n chooseLabel = input<string>('Choisir un fichier…');\n uploadLabel = input<string>('Téléverser');\n cancelLabel = input<string>('Effacer');\n /** Drag-zone link + prompt. */\n dragLinkLabel = input<string>('Cliquer pour téléverser');\n dragPromptLabel = input<string>('ou glisser-déposer les fichiers ici');\n /** Small hint under the drag prompt (e.g. \"JPG, PNG (max 5 MB)\"). */\n hint = input<string>();\n /** Accessible name for the whole control. */\n // Composite widget (dropzone + file list), not a single-value CVA control: unlike the other\n // form components it doesn't extend BaseFieldControl, so it redeclares its own `ariaLabel`\n // here — with a non-undefined default, since the dropzone always needs an accessible name.\n ariaLabel = input<string>('Téléversement de fichiers');\n /** Multi-file summary in field mode — `{0}` is replaced by the file count. */\n filesSummaryLabel = input<string>('{0} fichiers');\n /** Rejection message: file type not accepted — `{0}` is the file name. */\n invalidTypeMessage = input<string>('Type de fichier non autorisé : {0}');\n /** Rejection message: file too large — `{0}` is the file name. */\n invalidSizeMessage = input<string>('Fichier trop volumineux : {0}');\n /** Rejection message: `fileLimit` reached — `{0}` is the limit. */\n limitReachedMessage = input<string>('Nombre maximum de fichiers atteint ({0}).');\n /** Error shown when an upload fails without a server message. */\n uploadErrorMessage = input<string>('Échec du téléversement');\n /** Error shown when the upload request fails at the network level. */\n networkErrorMessage = input<string>('Erreur réseau');\n /** Error shown on a non-2xx response — `{0}` is the HTTP status. */\n httpErrorMessage = input<string>('Erreur {0}');\n\n // --- Templates (drag/advanced) --------------------------------------\n /** Overrides a single file row (context: `{ $implicit: UiUploadFile, remove }`). */\n fileTemplate = input<TemplateRef<unknown>>();\n /** Overrides the content section (context: `{ $implicit: UiUploadFile[], remove, clear }`). */\n contentTemplate = input<TemplateRef<unknown>>();\n /** Custom toolbar content (context: `{ $implicit: UiUploadFile[], choose, upload, clear }`). */\n toolbarTemplate = input<TemplateRef<unknown>>();\n\n // --- Outputs ---------------------------------------------------------\n /** Files added to the selection (validated). */\n selected = output<UiUploadFile[]>();\n /** The full current selection changed. */\n filesChange = output<UiUploadFile[]>();\n /** A custom upload was requested (customUpload = true). */\n uploadHandler = output<UiUploadHandlerEvent>();\n /** Built-in upload completed for a batch. */\n uploaded = output<UiUploadEvent>();\n /** A file failed validation or upload. */\n uploadError = output<UiUploadErrorEvent>();\n /** A file was removed. */\n removed = output<UiUploadFile>();\n /** The selection was cleared. */\n cleared = output<void>();\n\n /** @ignore Stable id linking the visible label(s) to the native input. */\n protected readonly inputId = `ui-file-upload-${nextInstanceId++}`;\n\n private readonly host = inject(ElementRef<HTMLElement>);\n private readonly destroyRef = inject(DestroyRef);\n private readonly fileInput = viewChild.required<ElementRef<HTMLInputElement>>('fileInput');\n\n /** In-flight requests, keyed by file id, so we can abort. */\n private readonly requests = new Map<string, XMLHttpRequest>();\n\n /** @ignore Current selection. */\n private readonly selection = signal<UiUploadFile[]>([]);\n /** Read-only view of the current files. */\n readonly files = this.selection.asReadonly();\n\n /** @ignore Drop-zone highlight while dragging over. */\n protected readonly dragging = signal(false);\n /** @ignore Transient validation messages (rendered in a live region). */\n protected readonly messages = signal<string[]>([]);\n\n constructor() {\n // Revoke every object URL when the component is destroyed (no leaks).\n this.destroyRef.onDestroy(() => {\n for (const f of this.selection()) this.revoke(f);\n for (const xhr of this.requests.values()) xhr.abort();\n });\n\n // A11y safeguard: the control needs an accessible name.\n if (isDevMode()) {\n effect(() => {\n if (!this.ariaLabel()) {\n console.warn('[ui-file-upload] Provide `ariaLabel` to name the control.');\n }\n });\n }\n }\n\n /** @ignore */\n protected readonly hasFiles = computed(() => this.selection().length > 0);\n /** @ignore */\n protected readonly pending = computed(() =>\n this.selection().filter((f) => f.status === 'pending'),\n );\n /** @ignore Single-file summary shown in field mode. */\n protected readonly fieldSummary = computed(() => {\n const files = this.selection();\n if (!files.length) return this.chooseLabel();\n if (files.length === 1) return files[0].name;\n return formatLabel(this.filesSummaryLabel(), files.length);\n });\n /** @ignore */\n protected readonly canUpload = computed(\n () => !this.disabled() && this.pending().length > 0 && (this.customUpload() || !!this.url()),\n );\n\n /** @ignore */\n protected readonly classes = computed(() => {\n const c = ['ui-file-upload', `_${this.mode()}`];\n if (this.size() !== 'default') c.push(`_${this.size()}`);\n if (this.dragging()) c.push('_dragging');\n if (this.disabled()) c.push('_disabled');\n return c.join(' ');\n });\n\n // --- Bound refs for custom templates (stable identities) -------------\n /** @ignore */ protected readonly removeFn = (f: UiUploadFile): void => this.remove(f);\n /** @ignore */ protected readonly clearFn = (): void => this.clear();\n /** @ignore */ protected readonly chooseFn = (): void => this.choose();\n /** @ignore */ protected readonly uploadFn = (): void => this.upload();\n\n // --- Public API ------------------------------------------------------\n\n /** Opens the native file picker. */\n choose(): void {\n if (this.disabled()) return;\n this.fileInput().nativeElement.click();\n }\n\n /** Uploads all pending files (built-in XHR, or emits `uploadHandler`). */\n upload(): void {\n const pending = this.pending();\n if (!pending.length) return;\n\n if (this.customUpload()) {\n this.emitCustomUpload(pending);\n return;\n }\n const endpoint = this.url();\n if (!endpoint) return;\n for (const f of pending) this.xhrUpload(f, endpoint);\n }\n\n /** Removes a file (aborts its upload, revokes its preview). */\n remove(target: UiUploadFile): void {\n this.requests.get(target.id)?.abort();\n this.requests.delete(target.id);\n this.revoke(target);\n this.selection.update((files) => files.filter((f) => f.id !== target.id));\n this.removed.emit(target);\n this.filesChange.emit(this.selection());\n }\n\n /** Clears the whole selection. */\n clear(): void {\n for (const xhr of this.requests.values()) xhr.abort();\n this.requests.clear();\n for (const f of this.selection()) this.revoke(f);\n this.selection.set([]);\n this.messages.set([]);\n this.resetInput();\n this.cleared.emit();\n this.filesChange.emit([]);\n }\n\n // --- Native input / drop --------------------------------------------\n\n /** @ignore */\n protected onInputChange(event: Event): void {\n const input = event.target as HTMLInputElement;\n this.ingest(input.files);\n // Reset so selecting the same file again re-triggers `change`.\n this.resetInput();\n }\n\n /** @ignore */\n protected onDragOver(event: DragEvent): void {\n if (this.disabled()) return;\n event.preventDefault();\n event.stopPropagation();\n this.dragging.set(true);\n }\n\n /** @ignore */\n protected onDragLeave(event: DragEvent): void {\n if (this.disabled()) return;\n event.preventDefault();\n // Ignore leave events bubbling from children still inside the zone.\n if (this.host.nativeElement.contains(event.relatedTarget as Node)) return;\n this.dragging.set(false);\n }\n\n /** @ignore */\n protected onDrop(event: DragEvent): void {\n if (this.disabled()) return;\n event.preventDefault();\n event.stopPropagation();\n this.dragging.set(false);\n this.ingest(event.dataTransfer?.files ?? null);\n }\n\n // --- Internals -------------------------------------------------------\n\n /** Validate + add a FileList to the selection. */\n private ingest(list: FileList | null): void {\n if (!list || !list.length || this.disabled()) return;\n\n const incoming = Array.from(list);\n const added: UiUploadFile[] = [];\n const newMessages: string[] = [];\n const limit = this.fileLimit();\n const maxSize = this.maxFileSize();\n\n for (const file of incoming) {\n // Single-file mode: the new file replaces the current one, so only cap the incoming batch.\n if (!this.multiple() && added.length >= 1) break;\n\n const item = this.toUploadFile(file);\n\n if (!isFileTypeAccepted(file, this.accept())) {\n this.fail(item, 'type', formatLabel(this.invalidTypeMessage(), file.name), newMessages);\n continue;\n }\n if (maxSize != null && file.size > maxSize) {\n this.fail(item, 'size', formatLabel(this.invalidSizeMessage(), file.name), newMessages);\n continue;\n }\n if (\n limit != null &&\n (this.multiple() ? this.selection().length : 0) + added.length >= limit\n ) {\n this.fail(item, 'limit', formatLabel(this.limitReachedMessage(), limit), newMessages);\n continue;\n }\n added.push(item);\n }\n\n this.messages.set(newMessages);\n if (!added.length) return;\n\n if (!this.multiple()) {\n // Replacement: release resources held by the previous selection.\n for (const previous of this.selection()) {\n this.requests.get(previous.id)?.abort();\n this.requests.delete(previous.id);\n this.revoke(previous);\n }\n }\n this.selection.update((files) => (this.multiple() ? [...files, ...added] : added));\n this.selected.emit(added);\n this.filesChange.emit(this.selection());\n\n if (this.auto()) this.upload();\n }\n\n private toUploadFile(file: File): UiUploadFile {\n return {\n id: `uifu-${nextUploadId++}`,\n file,\n name: file.name,\n size: file.size,\n type: file.type,\n status: 'pending',\n progress: 0,\n objectUrl: isImageFile(file) ? URL.createObjectURL(file) : undefined,\n };\n }\n\n private fail(\n item: UiUploadFile,\n reason: UiUploadErrorEvent['reason'],\n message: string,\n sink: string[],\n ): void {\n this.revoke(item);\n sink.push(message);\n this.uploadError.emit({ file: { ...item, status: 'error', error: message }, reason, message });\n }\n\n /** Mutates one file in place (immutably) and pushes a new array reference. */\n private patch(id: string, changes: Partial<UiUploadFile>): void {\n this.selection.update((files) => files.map((f) => (f.id === id ? { ...f, ...changes } : f)));\n }\n\n private emitCustomUpload(pending: UiUploadFile[]): void {\n for (const f of pending) this.patch(f.id, { status: 'uploading', progress: 0 });\n this.uploadHandler.emit({\n files: pending,\n setProgress: (file, progress) =>\n this.patch(file.id, {\n status: 'uploading',\n progress: Math.max(0, Math.min(100, progress)),\n }),\n markUploaded: (file) => {\n this.patch(file.id, { status: 'completed', progress: 100 });\n this.filesChange.emit(this.selection());\n },\n markError: (file, msg) => {\n this.patch(file.id, { status: 'error', error: msg ?? this.uploadErrorMessage() });\n this.uploadError.emit({\n file,\n reason: 'upload',\n message: msg ?? this.uploadErrorMessage(),\n });\n },\n });\n }\n\n private xhrUpload(item: UiUploadFile, endpoint: string): void {\n const xhr = new XMLHttpRequest();\n this.requests.set(item.id, xhr);\n this.patch(item.id, { status: 'uploading', progress: 0 });\n\n const body = new FormData();\n body.append(this.fieldName(), item.file, item.name);\n\n xhr.upload.addEventListener('progress', (e) => {\n if (e.lengthComputable)\n this.patch(item.id, { progress: Math.round((e.loaded / e.total) * 100) });\n });\n xhr.addEventListener('load', () => {\n this.requests.delete(item.id);\n if (xhr.status >= 200 && xhr.status < 300) {\n this.patch(item.id, { status: 'completed', progress: 100 });\n this.uploaded.emit({ files: [item], xhr });\n this.filesChange.emit(this.selection());\n } else {\n this.uploadFailed(item, formatLabel(this.httpErrorMessage(), xhr.status));\n }\n });\n xhr.addEventListener('error', () => this.uploadFailed(item, this.networkErrorMessage()));\n xhr.addEventListener('abort', () => this.requests.delete(item.id));\n\n xhr.open(this.method().toUpperCase(), endpoint, true);\n xhr.withCredentials = this.withCredentials();\n xhr.send(body);\n }\n\n private uploadFailed(item: UiUploadFile, message: string): void {\n this.requests.delete(item.id);\n this.patch(item.id, { status: 'error', error: message });\n this.uploadError.emit({ file: item, reason: 'upload', message });\n }\n\n private revoke(file: UiUploadFile): void {\n if (file.objectUrl) URL.revokeObjectURL(file.objectUrl);\n }\n\n private resetInput(): void {\n const el = this.fileInput().nativeElement;\n if (el) el.value = '';\n }\n}\n","<div\n [class]=\"classes()\"\n (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave($event)\"\n (drop)=\"onDrop($event)\"\n>\n <!-- Real native control (visually hidden, keeps keyboard + screen-reader support) -->\n <input\n #fileInput\n class=\"ui-file-upload-input\"\n type=\"file\"\n [id]=\"inputId\"\n [attr.name]=\"name()\"\n [attr.accept]=\"accept() || null\"\n [multiple]=\"multiple()\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"ariaLabel() || null\"\n (change)=\"onInputChange($event)\"\n />\n\n @if (mode() === 'field') {\n <!-- Field mode: compact summary + Browse trigger (whole label opens picker) -->\n <label class=\"ui-file-upload-field\" [attr.for]=\"inputId\">\n <span class=\"ui-file-upload-field-text\" [class._placeholder]=\"!hasFiles()\">{{\n fieldSummary()\n }}</span>\n <span class=\"ui-file-upload-browse\" aria-hidden=\"true\">{{ browseLabel() }}</span>\n </label>\n } @else {\n <!-- Drag mode: full drop zone -->\n <label class=\"ui-file-upload-zone\" [attr.for]=\"inputId\">\n <ui-icon class=\"ui-file-upload-zone-icon\" name=\"cloud-arrow-up\" size=\"lg\" />\n <span class=\"ui-file-upload-zone-content\">\n <span class=\"ui-file-upload-zone-title\">\n <span class=\"ui-file-upload-zone-link\">{{ dragLinkLabel() }}</span>\n <span class=\"ui-file-upload-zone-prompt\">{{ dragPromptLabel() }}</span>\n </span>\n @if (hint(); as h) {\n <span class=\"ui-file-upload-zone-hint\">{{ h }}</span>\n }\n </span>\n </label>\n\n <!-- Toolbar (custom, or default Upload/Clear actions) -->\n @if (toolbarTemplate(); as tpl) {\n <div class=\"ui-file-upload-toolbar\">\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: files(),\n choose: chooseFn,\n upload: uploadFn,\n clear: clearFn,\n }\"\n />\n </div>\n } @else if (showControls() && hasFiles()) {\n <div class=\"ui-file-upload-toolbar\">\n @if (!auto()) {\n <ui-button\n [label]=\"uploadLabel()\"\n [size]=\"size() === 'small' ? 'small' : 'default'\"\n icon=\"cloud-arrow-up\"\n [disabled]=\"!canUpload()\"\n (buttonClick)=\"upload()\"\n />\n }\n <ui-button\n [label]=\"cancelLabel()\"\n level=\"low\"\n [size]=\"size() === 'small' ? 'small' : 'default'\"\n icon=\"xmark\"\n (buttonClick)=\"clear()\"\n />\n </div>\n }\n }\n\n <!-- Content section: the file list -->\n @if (contentTemplate(); as tpl) {\n <div class=\"ui-file-upload-content\">\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: files(), remove: removeFn, clear: clearFn }\"\n />\n </div>\n } @else if (showFileList() && hasFiles()) {\n <ul class=\"ui-file-upload-content\" role=\"list\">\n @for (f of files(); track f.id) {\n <li>\n @if (fileTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: f, remove: removeFn }\"\n />\n } @else {\n <ui-file-upload-list [file]=\"f\" [size]=\"size()\" (remove)=\"remove($event)\" />\n }\n </li>\n }\n </ul>\n }\n\n <!-- Validation messages (assertive live region) -->\n @if (messages().length) {\n <div class=\"ui-file-upload-messages\" role=\"alert\" aria-live=\"assertive\">\n @for (msg of messages(); track msg) {\n <p class=\"ui-file-upload-message\">{{ msg }}</p>\n }\n </div>\n }\n</div>\n","/*\n * Public API Surface of ui-kit/ui-file-upload\n *\n * Includes `ui-file-upload-list`: it renders the upload's own file model,\n * so the two live in one entry point (a separate one would be a cycle).\n */\n\nexport * from './lib/ui-file-upload-list';\nexport * from './lib/ui-file-upload.model';\nexport * from './lib/ui-file-upload';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAAA;AACA;AACA;AAsDA;AACM,SAAU,cAAc,CAAC,KAAa,EAAA;AAC1C,IAAA,IAAI,CAAC,KAAK,IAAI,KAAK,GAAG,CAAC;AAAE,QAAA,OAAO,KAAK;IACrC,MAAM,CAAC,GAAG,IAAI;AACd,IAAA,MAAM,KAAK,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,I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,CAAA;;AExJ3F;;;;;AAKG;;ACLH;;AAEG;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"4sh-ui-kit-forms-ui-input-group.mjs","sources":["../../../projects/ui-kit/forms/ui-input-group/src/lib/ui-input-group.ts","../../../projects/ui-kit/forms/ui-input-group/src/lib/ui-input-group.html","../../../projects/ui-kit/forms/ui-input-group/src/lib/ui-input-group-addon.ts","../../../projects/ui-kit/forms/ui-input-group/src/lib/ui-input-group-addon.html","../../../projects/ui-kit/forms/ui-input-group/src/public-api.ts","../../../projects/ui-kit/forms/ui-input-group/src/4sh-ui-kit-forms-ui-input-group.ts"],"sourcesContent":["import {\n afterNextRender,\n Component,\n DestroyRef,\n ElementRef,\n inject,\n input,\n viewChild,\n} from '@angular/core';\nimport { FieldSize } from '@4sh/ui-kit/forms';\n\n/**\n * ui-input-group — glues a control and its add-ons into a single visual field.\n *\n * Purely presentational: each child keeps its own API and states; the group\n * only lays them out on one row, squares the inner corners and collapses the\n * shared borders. The children are **projected**, so that shaping is applied\n * on the DOM (custom properties + flex), not through scoped selectors which\n * cannot reach projected content.\n *\n * Add-ons (text, icon, checkbox…) go through `ui-input-group-addon`; controls\n * (`ui-input`, `ui-select`, `ui-button`…) are placed directly in the group.\n */\n@Component({\n selector: 'ui-input-group',\n templateUrl: './ui-input-group.html',\n styleUrl: './ui-input-group.scss',\n host: {\n '(focusin)': 'onFocusIn($event)',\n '(focusout)': 'onFocusOut()',\n },\n})\nexport class UiInputGroup {\n /** Size shared with the projected `ui-input-group-addon` (controls keep their own `size`). */\n size = input<FieldSize>('default');\n\n /** @ignore */\n private readonly destroyRef = inject(DestroyRef);\n /** @ignore */\n private readonly row = viewChild.required<ElementRef<HTMLElement>>('row');\n\n constructor() {\n afterNextRender(() => {\n this.shape();\n // Items are projected: follow the `@if`/`@for` of the consumer template.\n const observer = new MutationObserver(() => this.shape());\n observer.observe(this.row().nativeElement, { childList: true });\n this.destroyRef.onDestroy(() => observer.disconnect());\n });\n }\n\n /** @ignore Direct items of the row. */\n private items(): HTMLElement[] {\n return Array.from(this.row().nativeElement.children) as HTMLElement[];\n }\n\n /** @ignore Only the edges keep a rounded corner, and shared borders overlap instead of doubling. */\n private shape(): void {\n const items = this.items();\n const last = items.length - 1;\n items.forEach((el, index) => {\n const start = index === 0 ? 'var(--_radius)' : '0';\n const end = index === last ? 'var(--_radius)' : '0';\n const radius = `${start} ${end} ${end} ${start}`;\n // Radius hooks exposed by the children (custom properties inherit\n // across the component boundary — no ::ng-deep).\n el.style.setProperty('--ui-field-radius', radius);\n el.style.setProperty('--ui-button-radius', radius);\n el.style.setProperty('--ui-input-group-item-radius', radius);\n el.style.position = 'relative'; // lets the focused item paint above its neighbours\n el.style.marginInlineStart = index === 0 ? '' : 'var(--_overlap)';\n // Add-ons and buttons keep their natural width; the controls take the rest.\n const fixed = el.matches('ui-input-group-addon, ui-button');\n el.style.flex = fixed ? '0 0 auto' : '1 1 0';\n el.style.minWidth = fixed ? '' : '0';\n });\n }\n\n /** @ignore Raises the focused item so its focus ring is not covered by the overlap. */\n protected onFocusIn(event: FocusEvent): void {\n for (const el of this.items()) {\n el.style.zIndex = el.contains(event.target as Node) ? '1' : '';\n }\n }\n\n /** @ignore */\n protected onFocusOut(): void {\n for (const el of this.items()) el.style.zIndex = '';\n }\n}\n","<div #row class=\"ui-input-group\">\n <ng-content />\n</div>\n","import { Component, computed, inject, input } from '@angular/core';\nimport { FieldSize } from '@4sh/ui-kit/forms';\nimport { UiInputGroup } from './ui-input-group';\n\n/**\n * ui-input-group-addon — non-interactive cell of a `ui-input-group`\n * (text, icon, checkbox, radio…).\n *\n * Projects its content in a box aligned on the field height. `size` falls back\n * to the parent group's when it is not set.\n */\n@Component({\n selector: 'ui-input-group-addon',\n templateUrl: './ui-input-group-addon.html',\n styleUrl: './ui-input-group-addon.scss',\n})\nexport class UiInputGroupAddon {\n /** Size (defaults to the parent `ui-input-group` size). */\n size = input<FieldSize>();\n\n /** @ignore */\n private readonly group = inject(UiInputGroup, { optional: true });\n\n /** @ignore */\n protected readonly classes = computed(() => {\n const size = this.size() ?? this.group?.size() ?? 'default';\n return size === 'default' ? 'ui-input-group-addon' : `ui-input-group-addon _${size}`;\n });\n}\n","<div [class]=\"classes()\">\n <ng-content />\n</div>\n","/*\n * Public API Surface of ui-kit/ui-input-group\n */\n\nexport * from './lib/ui-input-group-addon';\nexport * from './lib/ui-input-group';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AAWA;;;;;;;;;;;AAWG;MAUU,YAAY,CAAA;AASvB,IAAA,WAAA,GAAA;;QAPA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAY,SAAS;iFAAC;;AAGjB,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;;AAE/B,QAAA,IAAA,CAAA,GAAG,GAAG,SAAS,CAAC,QAAQ,CAA0B,KAAK;gFAAC;QAGvE,eAAe,CAAC,MAAK;YACnB,IAAI,CAAC,KAAK,EAAE;;AAEZ,YAAA,MAAM,QAAQ,GAAG,IAAI,gBAAgB,CAAC,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC;AACzD,YAAA,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,aAAa,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;AAC/D,YAAA,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,MAAM,QAAQ,CAAC,UAAU,EAAE,CAAC;AACxD,QAAA,CAAC,CAAC;IACJ;;IAGQ,KAAK,GAAA;AACX,QAAA,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,aAAa,CAAC,QAAQ,CAAkB;IACvE;;IAGQ,KAAK,GAAA;AACX,QAAA,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,EAAE;AAC1B,QAAA,MAAM,IAAI,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC;Q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;QACtF,CAAC;oFAAC;AACH,IAAA;8GAZY,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAjB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,iBAAiB,iNChB9B,yDAGA,EAAA,MAAA,EAAA,CAAA,q1CAAA,CAAA,EAAA,CAAA,CAAA;;2FDaa,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAL7B,SAAS;+BACE,sBAAsB,EAAA,QAAA,EAAA,yDAAA,EAAA,MAAA,EAAA,CAAA,q1CAAA,CAAA,EAAA;;;AEZlC;;AAEG;;ACFH;;AAEG
|
|
1
|
+
{"version":3,"file":"4sh-ui-kit-forms-ui-input-group.mjs","sources":["../../../projects/ui-kit/forms/ui-input-group/src/lib/ui-input-group.ts","../../../projects/ui-kit/forms/ui-input-group/src/lib/ui-input-group.html","../../../projects/ui-kit/forms/ui-input-group/src/lib/ui-input-group-addon.ts","../../../projects/ui-kit/forms/ui-input-group/src/lib/ui-input-group-addon.html","../../../projects/ui-kit/forms/ui-input-group/src/public-api.ts","../../../projects/ui-kit/forms/ui-input-group/src/4sh-ui-kit-forms-ui-input-group.ts"],"sourcesContent":["import {\n afterNextRender,\n Component,\n DestroyRef,\n ElementRef,\n inject,\n input,\n viewChild,\n} from '@angular/core';\nimport { FieldSize } from '@4sh/ui-kit/forms';\n\n/**\n * ui-input-group — glues a control and its add-ons into a single visual field.\n *\n * Purely presentational: each child keeps its own API and states; the group\n * only lays them out on one row, squares the inner corners and collapses the\n * shared borders. The children are **projected**, so that shaping is applied\n * on the DOM (custom properties + flex), not through scoped selectors which\n * cannot reach projected content.\n *\n * Add-ons (text, icon, checkbox…) go through `ui-input-group-addon`; controls\n * (`ui-input`, `ui-select`, `ui-button`…) are placed directly in the group.\n */\n@Component({\n selector: 'ui-input-group',\n templateUrl: './ui-input-group.html',\n styleUrl: './ui-input-group.scss',\n host: {\n '(focusin)': 'onFocusIn($event)',\n '(focusout)': 'onFocusOut()',\n },\n})\nexport class UiInputGroup {\n /** Size shared with the projected `ui-input-group-addon` (controls keep their own `size`). */\n size = input<FieldSize>('default');\n\n /** @ignore */\n private readonly destroyRef = inject(DestroyRef);\n /** @ignore */\n private readonly row = viewChild.required<ElementRef<HTMLElement>>('row');\n\n constructor() {\n afterNextRender(() => {\n this.shape();\n // Items are projected: follow the `@if`/`@for` of the consumer template.\n const observer = new MutationObserver(() => this.shape());\n observer.observe(this.row().nativeElement, { childList: true });\n this.destroyRef.onDestroy(() => observer.disconnect());\n });\n }\n\n /** @ignore Direct items of the row. */\n private items(): HTMLElement[] {\n return Array.from(this.row().nativeElement.children) as HTMLElement[];\n }\n\n /** @ignore Only the edges keep a rounded corner, and shared borders overlap instead of doubling. */\n private shape(): void {\n const items = this.items();\n const last = items.length - 1;\n items.forEach((el, index) => {\n const start = index === 0 ? 'var(--_radius)' : '0';\n const end = index === last ? 'var(--_radius)' : '0';\n const radius = `${start} ${end} ${end} ${start}`;\n // Radius hooks exposed by the children (custom properties inherit\n // across the component boundary — no ::ng-deep).\n el.style.setProperty('--ui-field-radius', radius);\n el.style.setProperty('--ui-button-radius', radius);\n el.style.setProperty('--ui-input-group-item-radius', radius);\n el.style.position = 'relative'; // lets the focused item paint above its neighbours\n el.style.marginInlineStart = index === 0 ? '' : 'var(--_overlap)';\n // Add-ons and buttons keep their natural width; the controls take the rest.\n const fixed = el.matches('ui-input-group-addon, ui-button');\n el.style.flex = fixed ? '0 0 auto' : '1 1 0';\n el.style.minWidth = fixed ? '' : '0';\n });\n }\n\n /** @ignore Raises the focused item so its focus ring is not covered by the overlap. */\n protected onFocusIn(event: FocusEvent): void {\n for (const el of this.items()) {\n el.style.zIndex = el.contains(event.target as Node) ? '1' : '';\n }\n }\n\n /** @ignore */\n protected onFocusOut(): void {\n for (const el of this.items()) el.style.zIndex = '';\n }\n}\n","<div #row class=\"ui-input-group\">\n <ng-content />\n</div>\n","import { Component, computed, inject, input } from '@angular/core';\nimport { FieldSize } from '@4sh/ui-kit/forms';\nimport { UiInputGroup } from './ui-input-group';\n\n/**\n * ui-input-group-addon — non-interactive cell of a `ui-input-group`\n * (text, icon, checkbox, radio…).\n *\n * Projects its content in a box aligned on the field height. `size` falls back\n * to the parent group's when it is not set.\n */\n@Component({\n selector: 'ui-input-group-addon',\n templateUrl: './ui-input-group-addon.html',\n styleUrl: './ui-input-group-addon.scss',\n})\nexport class UiInputGroupAddon {\n /** Size (defaults to the parent `ui-input-group` size). */\n size = input<FieldSize>();\n\n /** @ignore */\n private readonly group = inject(UiInputGroup, { optional: true });\n\n /** @ignore */\n protected readonly classes = computed(() => {\n const size = this.size() ?? this.group?.size() ?? 'default';\n return size === 'default' ? 'ui-input-group-addon' : `ui-input-group-addon _${size}`;\n });\n}\n","<div [class]=\"classes()\">\n <ng-content />\n</div>\n","/*\n * Public API Surface of ui-kit/ui-input-group\n */\n\nexport * from './lib/ui-input-group-addon';\nexport * from './lib/ui-input-group';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AAWA;;;;;;;;;;;AAWG;MAUU,YAAY,CAAA;AASvB,IAAA,WAAA,GAAA;;QAPA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAY,SAAS;iFAAC;;AAGjB,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;;AAE/B,QAAA,IAAA,CAAA,GAAG,GAAG,SAAS,CAAC,QAAQ,CAA0B,KAAK;gFAAC;QAGvE,eAAe,CAAC,MAAK;YACnB,IAAI,CAAC,KAAK,EAAE;;AAEZ,YAAA,MAAM,QAAQ,GAAG,IAAI,gBAAgB,CAAC,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC;AACzD,YAAA,QAAQ,CAAC,OAAO,CAAC,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;;;;AAMG;MAMU,iBAAiB,CAAA;AAL9B,IAAA,WAAA,GAAA;;AAOE,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK;4FAAa;;QAGR,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,YAAY,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;AAG9C,QAAA,IAAA,CAAA,OAAO,GAAG,QAAQ,CAAC,MAAK;AACzC,YAAA,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,IAAI,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,SAAS;AAC3D,YAAA,OAAO,IAAI,KAAK,SAAS,GAAG,sBAAsB,GAAG,CAAA,sBAAA,EAAyB,IAAI,EAAE;QACtF,CAAC;oFAAC;AACH,IAAA;8GAZY,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAjB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,iBAAiB,iNChB9B,yDAGA,EAAA,MAAA,EAAA,CAAA,q1CAAA,CAAA,EAAA,CAAA,CAAA;;2FDaa,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAL7B,SAAS;+BACE,sBAAsB,EAAA,QAAA,EAAA,yDAAA,EAAA,MAAA,EAAA,CAAA,q1CAAA,CAAA,EAAA;;;AEZlC;;AAEG;;ACFH;;AAEG;;"}
|
|
@@ -50,6 +50,12 @@ class UiInputMask extends BaseFormField {
|
|
|
50
50
|
/** @ignore Masked displayed text. */
|
|
51
51
|
this.text = signal('', /* @ts-ignore */
|
|
52
52
|
...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
|
|
53
|
+
/** @ignore Keeps a floating label raised once focus leaves. */
|
|
54
|
+
this.isFilled = computed(() => this.text() !== '', /* @ts-ignore */
|
|
55
|
+
...(ngDevMode ? [{ debugName: "isFilled" }] : /* istanbul ignore next */ []));
|
|
56
|
+
/** @ignore At rest the floating label already holds that spot. */
|
|
57
|
+
this.effectivePlaceholder = computed(() => this.hasFloatLabel() ? '' : (this.placeholder() ?? ''), /* @ts-ignore */
|
|
58
|
+
...(ngDevMode ? [{ debugName: "effectivePlaceholder" }] : /* istanbul ignore next */ []));
|
|
53
59
|
/** @ignore */
|
|
54
60
|
this.iconSize = computed(() => (this.size() === 'small' ? 'sm' : 'md'), /* @ts-ignore */
|
|
55
61
|
...(ngDevMode ? [{ debugName: "iconSize" }] : /* istanbul ignore next */ []));
|
|
@@ -104,13 +110,13 @@ class UiInputMask extends BaseFormField {
|
|
|
104
110
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: UiInputMask, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
105
111
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.2", type: UiInputMask, isStandalone: true, selector: "ui-input-mask", inputs: { mask: { classPropertyName: "mask", publicName: "mask", isSignal: true, isRequired: true, transformFunction: null }, ranges: { classPropertyName: "ranges", publicName: "ranges", isSignal: true, isRequired: false, transformFunction: null }, slotChar: { classPropertyName: "slotChar", publicName: "slotChar", isSignal: true, isRequired: false, transformFunction: null }, unmask: { classPropertyName: "unmask", publicName: "unmask", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, iconLeft: { classPropertyName: "iconLeft", publicName: "iconLeft", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", inputBlur: "inputBlur" }, providers: [
|
|
106
112
|
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiInputMask), multi: true },
|
|
107
|
-
], viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["inputEl"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<ui-field\n [label]=\"label()\"\n [for]=\"resolvedId()\"\n [required]=\"required()\"\n [size]=\"size()\"\n [level]=\"effectiveLevel()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [message]=\"displayMessage()\"\n [messageId]=\"messageId()\"\n>\n @if (iconLeft(); as name) {\n <ui-icon\n uiFieldPrefix\n class=\"ui-input-mask-icon\"\n [class._disabled]=\"isDisabled()\"\n [name]=\"name\"\n [size]=\"iconSize()\"\n />\n }\n\n <input\n #inputEl\n class=\"ui-input-mask-native\"\n [class._small]=\"size() === 'small'\"\n type=\"text\"\n [id]=\"resolvedId()\"\n [value]=\"text()\"\n [placeholder]=\"
|
|
113
|
+
], viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["inputEl"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<ui-field\n [label]=\"label()\"\n [for]=\"resolvedId()\"\n [required]=\"required()\"\n [size]=\"size()\"\n [level]=\"effectiveLevel()\"\n [floatLabel]=\"floatLabel()\"\n [filled]=\"isFilled()\"\n [hasPrefix]=\"!!iconLeft()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [message]=\"displayMessage()\"\n [messageId]=\"messageId()\"\n>\n @if (iconLeft(); as name) {\n <ui-icon\n uiFieldPrefix\n class=\"ui-input-mask-icon\"\n [class._disabled]=\"isDisabled()\"\n [name]=\"name\"\n [size]=\"iconSize()\"\n />\n }\n\n <input\n #inputEl\n class=\"ui-input-mask-native\"\n [class._small]=\"size() === 'small'\"\n type=\"text\"\n [id]=\"resolvedId()\"\n [value]=\"text()\"\n [placeholder]=\"effectivePlaceholder()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly()\"\n [required]=\"required()\"\n [attr.name]=\"name() || null\"\n [attr.tabindex]=\"tabindex()\"\n [attr.aria-label]=\"label() ? null : ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-describedby]=\"displayMessage() ? messageId() : null\"\n [attr.aria-invalid]=\"effectiveLevel() === 'error' ? 'true' : null\"\n (input)=\"onInput()\"\n (blur)=\"onBlur($event)\"\n />\n</ui-field>\n", styles: [".ui-input-mask-native{flex:1 1 auto;align-self:stretch;min-width:0;margin:0;padding:0;border:none;border-radius:inherit;background:transparent;outline:none;font-family:var(--fontfamily-base);font-size:var(--size-typography-text-default);color:var(--form-high-content-default)}.ui-input-mask-native:first-child{padding-inline-start:var(--ui-form-field-padding-x, var(--units-md))}.ui-input-mask-native:last-child{padding-inline-end:var(--ui-form-field-padding-x, var(--units-md))}.ui-input-mask-native{padding-block-start:calc(0px + var(--_field-inset-block-start, 0px))}.ui-input-mask-native::placeholder{color:var(--form-low-content-default);opacity:1}.ui-input-mask-native:disabled{cursor:not-allowed;color:var(--form-high-content-disabled)}.ui-input-mask-native._small{font-size:var(--ui-input-mask-font-size-small, var(--size-typography-text-md))}.ui-input-mask-icon{flex-shrink:0;color:var(--form-low-content-default)}.ui-input-mask-icon:first-child{margin-inline-start:var(--ui-form-field-padding-x, var(--units-md))}.ui-input-mask-icon:last-child{margin-inline-end:var(--ui-form-field-padding-x, var(--units-md))}.ui-input-mask-icon._disabled{color:var(--form-high-content-disabled)}\n"], dependencies: [{ kind: "component", type: UiField, selector: "ui-field", inputs: ["label", "for", "required", "size", "level", "floatLabel", "filled", "disabled", "readonly", "multiline", "autoHeight", "message", "messageId", "hasFooter", "hasPrefix"] }, { kind: "component", type: UiIcon, selector: "ui-icon", inputs: ["name", "size", "type", "family", "decorative", "ariaLabel"] }] }); }
|
|
108
114
|
}
|
|
109
115
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: UiInputMask, decorators: [{
|
|
110
116
|
type: Component,
|
|
111
117
|
args: [{ selector: 'ui-input-mask', imports: [UiField, UiIcon], providers: [
|
|
112
118
|
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiInputMask), multi: true },
|
|
113
|
-
], template: "<ui-field\n [label]=\"label()\"\n [for]=\"resolvedId()\"\n [required]=\"required()\"\n [size]=\"size()\"\n [level]=\"effectiveLevel()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [message]=\"displayMessage()\"\n [messageId]=\"messageId()\"\n>\n @if (iconLeft(); as name) {\n <ui-icon\n uiFieldPrefix\n class=\"ui-input-mask-icon\"\n [class._disabled]=\"isDisabled()\"\n [name]=\"name\"\n [size]=\"iconSize()\"\n />\n }\n\n <input\n #inputEl\n class=\"ui-input-mask-native\"\n [class._small]=\"size() === 'small'\"\n type=\"text\"\n [id]=\"resolvedId()\"\n [value]=\"text()\"\n [placeholder]=\"
|
|
119
|
+
], template: "<ui-field\n [label]=\"label()\"\n [for]=\"resolvedId()\"\n [required]=\"required()\"\n [size]=\"size()\"\n [level]=\"effectiveLevel()\"\n [floatLabel]=\"floatLabel()\"\n [filled]=\"isFilled()\"\n [hasPrefix]=\"!!iconLeft()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [message]=\"displayMessage()\"\n [messageId]=\"messageId()\"\n>\n @if (iconLeft(); as name) {\n <ui-icon\n uiFieldPrefix\n class=\"ui-input-mask-icon\"\n [class._disabled]=\"isDisabled()\"\n [name]=\"name\"\n [size]=\"iconSize()\"\n />\n }\n\n <input\n #inputEl\n class=\"ui-input-mask-native\"\n [class._small]=\"size() === 'small'\"\n type=\"text\"\n [id]=\"resolvedId()\"\n [value]=\"text()\"\n [placeholder]=\"effectivePlaceholder()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly()\"\n [required]=\"required()\"\n [attr.name]=\"name() || null\"\n [attr.tabindex]=\"tabindex()\"\n [attr.aria-label]=\"label() ? null : ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-describedby]=\"displayMessage() ? messageId() : null\"\n [attr.aria-invalid]=\"effectiveLevel() === 'error' ? 'true' : null\"\n (input)=\"onInput()\"\n (blur)=\"onBlur($event)\"\n />\n</ui-field>\n", styles: [".ui-input-mask-native{flex:1 1 auto;align-self:stretch;min-width:0;margin:0;padding:0;border:none;border-radius:inherit;background:transparent;outline:none;font-family:var(--fontfamily-base);font-size:var(--size-typography-text-default);color:var(--form-high-content-default)}.ui-input-mask-native:first-child{padding-inline-start:var(--ui-form-field-padding-x, var(--units-md))}.ui-input-mask-native:last-child{padding-inline-end:var(--ui-form-field-padding-x, var(--units-md))}.ui-input-mask-native{padding-block-start:calc(0px + var(--_field-inset-block-start, 0px))}.ui-input-mask-native::placeholder{color:var(--form-low-content-default);opacity:1}.ui-input-mask-native:disabled{cursor:not-allowed;color:var(--form-high-content-disabled)}.ui-input-mask-native._small{font-size:var(--ui-input-mask-font-size-small, var(--size-typography-text-md))}.ui-input-mask-icon{flex-shrink:0;color:var(--form-low-content-default)}.ui-input-mask-icon:first-child{margin-inline-start:var(--ui-form-field-padding-x, var(--units-md))}.ui-input-mask-icon:last-child{margin-inline-end:var(--ui-form-field-padding-x, var(--units-md))}.ui-input-mask-icon._disabled{color:var(--form-high-content-disabled)}\n"] }]
|
|
114
120
|
}], propDecorators: { mask: [{ type: i0.Input, args: [{ isSignal: true, alias: "mask", required: true }] }], ranges: [{ type: i0.Input, args: [{ isSignal: true, alias: "ranges", required: false }] }], slotChar: [{ type: i0.Input, args: [{ isSignal: true, alias: "slotChar", required: false }] }], unmask: [{ type: i0.Input, args: [{ isSignal: true, alias: "unmask", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], iconLeft: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconLeft", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], inputBlur: [{ type: i0.Output, args: ["inputBlur"] }], inputEl: [{ type: i0.ViewChild, args: ['inputEl', { isSignal: true }] }] } });
|
|
115
121
|
|
|
116
122
|
/*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"4sh-ui-kit-forms-ui-input-mask.mjs","sources":["../../../projects/ui-kit/forms/ui-input-mask/src/lib/ui-input-mask.ts","../../../projects/ui-kit/forms/ui-input-mask/src/lib/ui-input-mask.html","../../../projects/ui-kit/forms/ui-input-mask/src/public-api.ts","../../../projects/ui-kit/forms/ui-input-mask/src/4sh-ui-kit-forms-ui-input-mask.ts"],"sourcesContent":["import {\n booleanAttribute,\n Component,\n computed,\n ElementRef,\n forwardRef,\n input,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { BaseFormField } from '@4sh/ui-kit/forms';\nimport { UiField } from '@4sh/ui-kit/forms/ui-field';\nimport { UiIcon, UiIconSize } from '@4sh/ui-kit/base/ui-icon';\nimport {\n applyMaskTemplate,\n buildMaskSlots,\n caretForMask,\n extractMaskData,\n MaskBounds,\n MaskSlot,\n parseMaskRanges,\n} from '@4sh/ui-kit/forms';\n\n/**\n * ui-input-mask — headless masked field (`ui-field` shell).\n *\n * `mask` describes the template: `9` digit, `a` letter, `*` alphanumeric; any\n * other character is a literal inserted automatically (e.g. `99/99/9999`,\n * `(999) 999-9999`). Empty positions show `slotChar`.\n *\n * Model value = string: masked (`12/09/2024`) by default, or raw (`12092024`)\n * when `unmask`. Standalone, `[(ngModel)]` or reactive forms.\n */\n@Component({\n selector: 'ui-input-mask',\n imports: [UiField, UiIcon],\n templateUrl: './ui-input-mask.html',\n styleUrl: './ui-input-mask.scss',\n providers: [\n { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiInputMask), multi: true },\n ],\n})\nexport class UiInputMask extends BaseFormField<string> {\n /** Mask template (9 digit · a letter · * alphanumeric · other = literal). */\n mask = input.required<string>();\n /**\n * Inclusive bounds of each numeric segment (run of consecutive `9` tokens),\n * in mask order and space-separated: `\"0-23 0-59\"` for `99:99`,\n * `\"1-31 1-12 1900-2100\"` for `99/99/9999`. `*` leaves a segment unbounded.\n * A character that could not lead to an in-range segment is rejected.\n */\n ranges = input('');\n /** Fill character for empty positions. */\n slotChar = input('_');\n /** Emit the raw value (without literals) instead of the masked value. */\n unmask = input(false, { transform: booleanAttribute });\n /** Native placeholder (shown when the field is empty). */\n placeholder = input<string>();\n /** Left FontAwesome icon name (decorative). */\n iconLeft = input<string>();\n\n /** Emitted on each value change. */\n valueChange = output<string>();\n /** Emitted when the input loses focus. */\n inputBlur = output<FocusEvent>();\n\n /** @ignore */\n private readonly inputEl = viewChild.required<ElementRef<HTMLInputElement>>('inputEl');\n /** @ignore Masked displayed text. */\n protected readonly text = signal('');\n\n /** @ignore */\n protected readonly iconSize = computed<UiIconSize>(() => (this.size() === 'small' ? 'sm' : 'md'));\n\n /** @ignore Bounds declared by `ranges`, one entry per numeric segment (`null` = unbounded). */\n private readonly parsedRanges = computed<(MaskBounds | null)[]>(() =>\n parseMaskRanges(this.ranges()),\n );\n\n /**\n * @ignore The mask resolved once per template: literals, input slots, and the\n * `ranges` bounds attached to every slot of the numeric segment it belongs to.\n */\n private readonly slots = computed<MaskSlot[]>(() =>\n buildMaskSlots(this.mask(), this.parsedRanges()),\n );\n\n override writeValue(value: string | null): void {\n const built = applyMaskTemplate(this.slots(), extractMaskData(value ?? ''), this.slotChar());\n this.modelValue.set(this.emitValue(built));\n this.text.set(built.data.length ? built.display : '');\n }\n\n /** Focuses the input. */\n focus(options?: FocusOptions): void {\n this.inputEl().nativeElement.focus(options);\n }\n\n /** @ignore Input: apply the mask, update model + display + caret. */\n protected onInput(): void {\n const el = this.inputEl().nativeElement;\n const raw = el.value;\n const caret = el.selectionStart ?? raw.length;\n // Number of data characters located BEFORE the caret (stable anchor).\n const dataBeforeCaret = extractMaskData(raw.slice(0, caret)).length;\n\n const built = applyMaskTemplate(this.slots(), extractMaskData(raw), this.slotChar());\n const value = this.emitValue(built);\n const display = built.data.length ? built.display : '';\n\n this.text.set(display);\n this.modelValue.set(value);\n this.emitChange(value);\n this.valueChange.emit(value);\n\n // Apply synchronously + restore the caret after the Nth typed character\n // (auto-inserted literals skipped). The [value] binding becomes a no-op.\n el.value = display;\n const pos = caretForMask(built.tokenIndices, dataBeforeCaret, display.length);\n el.setSelectionRange(pos, pos);\n }\n\n /** @ignore */\n protected onBlur(event: FocusEvent): void {\n this.emitTouch();\n this.inputBlur.emit(event);\n }\n\n /** @ignore Emitted value depending on `unmask`. */\n private emitValue(built: { masked: string; data: string }): string {\n return this.unmask() ? built.data : built.masked;\n }\n}\n","<ui-field\n [label]=\"label()\"\n [for]=\"resolvedId()\"\n [required]=\"required()\"\n [size]=\"size()\"\n [level]=\"effectiveLevel()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [message]=\"displayMessage()\"\n [messageId]=\"messageId()\"\n>\n @if (iconLeft(); as name) {\n <ui-icon\n uiFieldPrefix\n class=\"ui-input-mask-icon\"\n [class._disabled]=\"isDisabled()\"\n [name]=\"name\"\n [size]=\"iconSize()\"\n />\n }\n\n <input\n #inputEl\n class=\"ui-input-mask-native\"\n [class._small]=\"size() === 'small'\"\n type=\"text\"\n [id]=\"resolvedId()\"\n [value]=\"text()\"\n [placeholder]=\"placeholder() ?? ''\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly()\"\n [required]=\"required()\"\n [attr.name]=\"name() || null\"\n [attr.tabindex]=\"tabindex()\"\n [attr.aria-label]=\"label() ? null : ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-describedby]=\"displayMessage() ? messageId() : null\"\n [attr.aria-invalid]=\"effectiveLevel() === 'error' ? 'true' : null\"\n (input)=\"onInput()\"\n (blur)=\"onBlur($event)\"\n />\n</ui-field>\n","/*\n * Public API Surface of ui-kit/ui-input-mask\n */\n\nexport * from './lib/ui-input-mask';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAyBA;;;;;;;;;AASG;AAUG,MAAO,WAAY,SAAQ,aAAqB,CAAA;AATtD,IAAA,W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,MAAA,EAAA,MAAA,EAAA,QAAA,EAAA,YAAA,EAAA,WAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAOd,WAAW,EAAA,UAAA,EAAA,CAAA;kBATvB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,eAAe,WAChB,CAAC,OAAO,EAAE,MAAM,CAAC,EAAA,SAAA,EAGf;AACT,wBAAA,EAAE,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,UAAU,CAAC,iBAAiB,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE;AACxF,qBAAA,EAAA,QAAA,EAAA,yrCAAA,EAAA,MAAA,EAAA,CAAA,+kCAAA,CAAA,EAAA;4uBA2B2E,SAAS,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AErEvF;;AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"4sh-ui-kit-forms-ui-input-mask.mjs","sources":["../../../projects/ui-kit/forms/ui-input-mask/src/lib/ui-input-mask.ts","../../../projects/ui-kit/forms/ui-input-mask/src/lib/ui-input-mask.html","../../../projects/ui-kit/forms/ui-input-mask/src/public-api.ts","../../../projects/ui-kit/forms/ui-input-mask/src/4sh-ui-kit-forms-ui-input-mask.ts"],"sourcesContent":["import {\n booleanAttribute,\n Component,\n computed,\n ElementRef,\n forwardRef,\n input,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { BaseFormField } from '@4sh/ui-kit/forms';\nimport { UiField } from '@4sh/ui-kit/forms/ui-field';\nimport { UiIcon, UiIconSize } from '@4sh/ui-kit/base/ui-icon';\nimport {\n applyMaskTemplate,\n buildMaskSlots,\n caretForMask,\n extractMaskData,\n MaskBounds,\n MaskSlot,\n parseMaskRanges,\n} from '@4sh/ui-kit/forms';\n\n/**\n * ui-input-mask — headless masked field (`ui-field` shell).\n *\n * `mask` describes the template: `9` digit, `a` letter, `*` alphanumeric; any\n * other character is a literal inserted automatically (e.g. `99/99/9999`,\n * `(999) 999-9999`). Empty positions show `slotChar`.\n *\n * Model value = string: masked (`12/09/2024`) by default, or raw (`12092024`)\n * when `unmask`. Standalone, `[(ngModel)]` or reactive forms.\n */\n@Component({\n selector: 'ui-input-mask',\n imports: [UiField, UiIcon],\n templateUrl: './ui-input-mask.html',\n styleUrl: './ui-input-mask.scss',\n providers: [\n { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiInputMask), multi: true },\n ],\n})\nexport class UiInputMask extends BaseFormField<string> {\n /** Mask template (9 digit · a letter · * alphanumeric · other = literal). */\n mask = input.required<string>();\n /**\n * Inclusive bounds of each numeric segment (run of consecutive `9` tokens),\n * in mask order and space-separated: `\"0-23 0-59\"` for `99:99`,\n * `\"1-31 1-12 1900-2100\"` for `99/99/9999`. `*` leaves a segment unbounded.\n * A character that could not lead to an in-range segment is rejected.\n */\n ranges = input('');\n /** Fill character for empty positions. */\n slotChar = input('_');\n /** Emit the raw value (without literals) instead of the masked value. */\n unmask = input(false, { transform: booleanAttribute });\n /** Native placeholder (shown when the field is empty). */\n placeholder = input<string>();\n /** Left FontAwesome icon name (decorative). */\n iconLeft = input<string>();\n\n /** Emitted on each value change. */\n valueChange = output<string>();\n /** Emitted when the input loses focus. */\n inputBlur = output<FocusEvent>();\n\n /** @ignore */\n private readonly inputEl = viewChild.required<ElementRef<HTMLInputElement>>('inputEl');\n /** @ignore Masked displayed text. */\n protected readonly text = signal('');\n /** @ignore Keeps a floating label raised once focus leaves. */\n protected readonly isFilled = computed(() => this.text() !== '');\n /** @ignore At rest the floating label already holds that spot. */\n protected readonly effectivePlaceholder = computed(() =>\n this.hasFloatLabel() ? '' : (this.placeholder() ?? ''),\n );\n\n /** @ignore */\n protected readonly iconSize = computed<UiIconSize>(() => (this.size() === 'small' ? 'sm' : 'md'));\n\n /** @ignore Bounds declared by `ranges`, one entry per numeric segment (`null` = unbounded). */\n private readonly parsedRanges = computed<(MaskBounds | null)[]>(() =>\n parseMaskRanges(this.ranges()),\n );\n\n /**\n * @ignore The mask resolved once per template: literals, input slots, and the\n * `ranges` bounds attached to every slot of the numeric segment it belongs to.\n */\n private readonly slots = computed<MaskSlot[]>(() =>\n buildMaskSlots(this.mask(), this.parsedRanges()),\n );\n\n override writeValue(value: string | null): void {\n const built = applyMaskTemplate(this.slots(), extractMaskData(value ?? ''), this.slotChar());\n this.modelValue.set(this.emitValue(built));\n this.text.set(built.data.length ? built.display : '');\n }\n\n /** Focuses the input. */\n focus(options?: FocusOptions): void {\n this.inputEl().nativeElement.focus(options);\n }\n\n /** @ignore Input: apply the mask, update model + display + caret. */\n protected onInput(): void {\n const el = this.inputEl().nativeElement;\n const raw = el.value;\n const caret = el.selectionStart ?? raw.length;\n // Number of data characters located BEFORE the caret (stable anchor).\n const dataBeforeCaret = extractMaskData(raw.slice(0, caret)).length;\n\n const built = applyMaskTemplate(this.slots(), extractMaskData(raw), this.slotChar());\n const value = this.emitValue(built);\n const display = built.data.length ? built.display : '';\n\n this.text.set(display);\n this.modelValue.set(value);\n this.emitChange(value);\n this.valueChange.emit(value);\n\n // Apply synchronously + restore the caret after the Nth typed character\n // (auto-inserted literals skipped). The [value] binding becomes a no-op.\n el.value = display;\n const pos = caretForMask(built.tokenIndices, dataBeforeCaret, display.length);\n el.setSelectionRange(pos, pos);\n }\n\n /** @ignore */\n protected onBlur(event: FocusEvent): void {\n this.emitTouch();\n this.inputBlur.emit(event);\n }\n\n /** @ignore Emitted value depending on `unmask`. */\n private emitValue(built: { masked: string; data: string }): string {\n return this.unmask() ? built.data : built.masked;\n }\n}\n","<ui-field\n [label]=\"label()\"\n [for]=\"resolvedId()\"\n [required]=\"required()\"\n [size]=\"size()\"\n [level]=\"effectiveLevel()\"\n [floatLabel]=\"floatLabel()\"\n [filled]=\"isFilled()\"\n [hasPrefix]=\"!!iconLeft()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [message]=\"displayMessage()\"\n [messageId]=\"messageId()\"\n>\n @if (iconLeft(); as name) {\n <ui-icon\n uiFieldPrefix\n class=\"ui-input-mask-icon\"\n [class._disabled]=\"isDisabled()\"\n [name]=\"name\"\n [size]=\"iconSize()\"\n />\n }\n\n <input\n #inputEl\n class=\"ui-input-mask-native\"\n [class._small]=\"size() === 'small'\"\n type=\"text\"\n [id]=\"resolvedId()\"\n [value]=\"text()\"\n [placeholder]=\"effectivePlaceholder()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly()\"\n [required]=\"required()\"\n [attr.name]=\"name() || null\"\n [attr.tabindex]=\"tabindex()\"\n [attr.aria-label]=\"label() ? null : ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-describedby]=\"displayMessage() ? messageId() : null\"\n [attr.aria-invalid]=\"effectiveLevel() === 'error' ? 'true' : null\"\n (input)=\"onInput()\"\n (blur)=\"onBlur($event)\"\n />\n</ui-field>\n","/*\n * Public API Surface of ui-kit/ui-input-mask\n */\n\nexport * from './lib/ui-input-mask';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAyBA;;;;;;;;;AASG;AAUG,MAAO,WAAY,SAAQ,aAAqB,CAAA;AATtD,IAAA,WAAA,GAAA;;;QAWE,IAAA,CAAA,IAAI,GAAG,KAAK,CAAC,QAAQ;iFAAU;AAC/B;;;;;AAKG;QACH,IAAA,CAAA,MAAM,GAAG,KAAK,CAAC,EAAE;mFAAC;;QAElB,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,GAAG;qFAAC;;QAErB,IAAA,CAAA,MAAM,GAAG,KAAK,CAAC,KAAK,8EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;AAEtD,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK;mGAAU;;AAE7B,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK;gGAAU;;QAG1B,IAAA,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kBATvB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,eAAe,WAChB,CAAC,OAAO,EAAE,MAAM,CAAC,EAAA,SAAA,EAGf;AACT,wBAAA,EAAE,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,UAAU,CAAC,iBAAiB,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE;AACxF,qBAAA,EAAA,QAAA,EAAA,wxCAAA,EAAA,MAAA,EAAA,CAAA,0qCAAA,CAAA,EAAA;4uBA2B2E,SAAS,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AErEvF;;AAEG;;ACFH;;AAEG;;"}
|
|
@@ -67,6 +67,12 @@ class UiInputNumber extends BaseFormField {
|
|
|
67
67
|
/** @ignore Raw displayed text (independent from the model while typing). */
|
|
68
68
|
this.text = signal('', /* @ts-ignore */
|
|
69
69
|
...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
|
|
70
|
+
/** @ignore Keeps a floating label raised once focus leaves. */
|
|
71
|
+
this.isFilled = computed(() => this.text() !== '', /* @ts-ignore */
|
|
72
|
+
...(ngDevMode ? [{ debugName: "isFilled" }] : /* istanbul ignore next */ []));
|
|
73
|
+
/** @ignore At rest the floating label already holds that spot. */
|
|
74
|
+
this.effectivePlaceholder = computed(() => this.hasFloatLabel() ? '' : (this.placeholder() ?? ''), /* @ts-ignore */
|
|
75
|
+
...(ngDevMode ? [{ debugName: "effectivePlaceholder" }] : /* istanbul ignore next */ []));
|
|
70
76
|
/** @ignore Suffix unit, ignored when `currency` is set (the formatted value already carries it). */
|
|
71
77
|
this.displayUnit = computed(() => (this.currency() ? null : (this.unit() ?? null)), /* @ts-ignore */
|
|
72
78
|
...(ngDevMode ? [{ debugName: "displayUnit" }] : /* istanbul ignore next */ []));
|
|
@@ -86,6 +92,13 @@ class UiInputNumber extends BaseFormField {
|
|
|
86
92
|
return v != null && min != null && v <= min;
|
|
87
93
|
}, /* @ts-ignore */
|
|
88
94
|
...(ngDevMode ? [{ debugName: "atMin" }] : /* istanbul ignore next */ []));
|
|
95
|
+
/** @ignore `numberAttribute(undefined)` yields NaN, and `aria-valuemin="NaN"` is an invalid
|
|
96
|
+
* ARIA value — omit the attribute entirely rather than advertise a bound that does not exist. */
|
|
97
|
+
this.ariaValueMin = computed(() => (Number.isFinite(this.min()) ? this.min() : null), /* @ts-ignore */
|
|
98
|
+
...(ngDevMode ? [{ debugName: "ariaValueMin" }] : /* istanbul ignore next */ []));
|
|
99
|
+
/** @ignore Same as `ariaValueMin`, for the upper bound. */
|
|
100
|
+
this.ariaValueMax = computed(() => (Number.isFinite(this.max()) ? this.max() : null), /* @ts-ignore */
|
|
101
|
+
...(ngDevMode ? [{ debugName: "ariaValueMax" }] : /* istanbul ignore next */ []));
|
|
89
102
|
/** @ignore Group/decimal separators of the current locale. */
|
|
90
103
|
this.separators = computed(() => {
|
|
91
104
|
const parts = new Intl.NumberFormat(this.locale()).formatToParts(11111.1);
|
|
@@ -213,13 +226,13 @@ class UiInputNumber extends BaseFormField {
|
|
|
213
226
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: UiInputNumber, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
214
227
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.2", type: UiInputNumber, isStandalone: true, selector: "ui-input-number", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, allowDecimals: { classPropertyName: "allowDecimals", publicName: "allowDecimals", isSignal: true, isRequired: false, transformFunction: null }, unit: { classPropertyName: "unit", publicName: "unit", isSignal: true, isRequired: false, transformFunction: null }, showButtons: { classPropertyName: "showButtons", publicName: "showButtons", isSignal: true, isRequired: false, transformFunction: null }, incrementAriaLabel: { classPropertyName: "incrementAriaLabel", publicName: "incrementAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, decrementAriaLabel: { classPropertyName: "decrementAriaLabel", publicName: "decrementAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, currency: { classPropertyName: "currency", publicName: "currency", isSignal: true, isRequired: false, transformFunction: null }, useGrouping: { classPropertyName: "useGrouping", publicName: "useGrouping", isSignal: true, isRequired: false, transformFunction: null }, minFractionDigits: { classPropertyName: "minFractionDigits", publicName: "minFractionDigits", isSignal: true, isRequired: false, transformFunction: null }, maxFractionDigits: { classPropertyName: "maxFractionDigits", publicName: "maxFractionDigits", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", inputFocus: "inputFocus", inputBlur: "inputBlur" }, providers: [
|
|
215
228
|
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiInputNumber), multi: true },
|
|
216
|
-
], viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["inputEl"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<ui-field\n [label]=\"label()\"\n [for]=\"resolvedId()\"\n [required]=\"required()\"\n [size]=\"size()\"\n [level]=\"effectiveLevel()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [message]=\"displayMessage()\"\n [messageId]=\"messageId()\"\n>\n <input\n #inputEl\n class=\"ui-input-number-native\"\n [class._small]=\"size() === 'small'\"\n type=\"text\"\n inputmode=\"decimal\"\n [id]=\"resolvedId()\"\n [value]=\"text()\"\n [placeholder]=\"
|
|
229
|
+
], viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["inputEl"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<ui-field\n [label]=\"label()\"\n [for]=\"resolvedId()\"\n [required]=\"required()\"\n [size]=\"size()\"\n [level]=\"effectiveLevel()\"\n [floatLabel]=\"floatLabel()\"\n [filled]=\"isFilled()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [message]=\"displayMessage()\"\n [messageId]=\"messageId()\"\n>\n <input\n #inputEl\n class=\"ui-input-number-native\"\n [class._small]=\"size() === 'small'\"\n type=\"text\"\n inputmode=\"decimal\"\n [id]=\"resolvedId()\"\n [value]=\"text()\"\n [placeholder]=\"effectivePlaceholder()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly()\"\n [required]=\"required()\"\n [attr.name]=\"name() || null\"\n [attr.tabindex]=\"tabindex()\"\n [attr.aria-label]=\"label() ? null : ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-describedby]=\"displayMessage() ? messageId() : null\"\n [attr.aria-invalid]=\"effectiveLevel() === 'error' ? 'true' : null\"\n role=\"spinbutton\"\n [attr.aria-valuenow]=\"modelValue() ?? null\"\n [attr.aria-valuemin]=\"ariaValueMin()\"\n [attr.aria-valuemax]=\"ariaValueMax()\"\n (input)=\"onInput()\"\n (keydown)=\"onKeydown($event)\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\"\n />\n\n @if (displayUnit(); as u) {\n <span\n uiFieldSuffix\n class=\"ui-input-number-unit\"\n [class._small]=\"unitSmall()\"\n [class._disabled]=\"isDisabled()\"\n >{{ u }}</span\n >\n }\n\n @if (showButtons()) {\n <span uiFieldSuffix class=\"ui-input-number-spinner\">\n <button\n type=\"button\"\n tabindex=\"-1\"\n [attr.aria-label]=\"incrementAriaLabel()\"\n [disabled]=\"isDisabled() || readonly() || atMax()\"\n (click)=\"stepBy(1)\"\n >\n <ui-icon name=\"angle-up\" size=\"sm\" />\n </button>\n <button\n type=\"button\"\n tabindex=\"-1\"\n [attr.aria-label]=\"decrementAriaLabel()\"\n [disabled]=\"isDisabled() || readonly() || atMin()\"\n (click)=\"stepBy(-1)\"\n >\n <ui-icon name=\"angle-down\" size=\"sm\" />\n </button>\n </span>\n }\n</ui-field>\n", styles: [".ui-input-number-native{flex:1 1 auto;align-self:stretch;min-width:0;margin:0;padding:0;border:none;border-radius:inherit;background:transparent;outline:none;font-family:var(--fontfamily-base);font-size:var(--size-typography-text-default);color:var(--form-high-content-default)}.ui-input-number-native:first-child{padding-inline-start:var(--ui-form-field-padding-x, var(--units-md))}.ui-input-number-native:last-child{padding-inline-end:var(--ui-form-field-padding-x, var(--units-md))}.ui-input-number-native{padding-block-start:calc(0px + var(--_field-inset-block-start, 0px))}.ui-input-number-native::placeholder{color:var(--form-low-content-default);opacity:1}.ui-input-number-native:disabled{cursor:not-allowed;color:var(--form-high-content-disabled)}.ui-input-number-native._small{font-size:var(--ui-input-number-font-size-small, var(--size-typography-text-md))}.ui-input-number-unit{flex-shrink:0;color:var(--form-low-content-default)}.ui-input-number-unit:first-child{margin-inline-start:var(--ui-form-field-padding-x, var(--units-md))}.ui-input-number-unit:last-child{margin-inline-end:var(--ui-form-field-padding-x, var(--units-md))}.ui-input-number-unit._disabled{color:var(--form-high-content-disabled)}.ui-input-number-unit{font-family:var(--fontfamily-base);font-size:var(--ui-input-number-unit-font-size, var(--size-typography-text-default));white-space:nowrap;-webkit-user-select:none;user-select:none}.ui-input-number-unit._small{font-size:var(--ui-input-number-font-size-small, var(--size-typography-text-md))}.ui-input-number-spinner{display:flex;flex-direction:column;align-self:stretch;flex-shrink:0;width:var(--ui-input-number-spinner-width, 1.875rem);border-left:var(--ui-control-stroke-width, var(--stroke-default)) solid var(--form-high-stroke-default);border-radius:0 var(--ui-form-field-radius, var(--radius-sm)) var(--ui-form-field-radius, var(--radius-sm)) 0;overflow:hidden}.ui-input-number-spinner button{display:flex;flex:1 1 50%;align-items:center;justify-content:center;min-height:0;padding:0;border:none;background:none;line-height:0;color:var(--form-low-content-default);cursor:pointer;transition:color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),background-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-input-number-spinner button:hover:not(:disabled){color:var(--form-high-content-hover);background-color:var(--form-high-surface-hover)}.ui-input-number-spinner button:disabled{cursor:not-allowed;color:var(--form-high-content-disabled)}.ui-input-number-spinner button+button{border-top:var(--ui-control-stroke-width, var(--stroke-default)) solid var(--form-high-stroke-default)}\n"], dependencies: [{ kind: "component", type: UiField, selector: "ui-field", inputs: ["label", "for", "required", "size", "level", "floatLabel", "filled", "disabled", "readonly", "multiline", "autoHeight", "message", "messageId", "hasFooter", "hasPrefix"] }, { kind: "component", type: UiIcon, selector: "ui-icon", inputs: ["name", "size", "type", "family", "decorative", "ariaLabel"] }] }); }
|
|
217
230
|
}
|
|
218
231
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: UiInputNumber, decorators: [{
|
|
219
232
|
type: Component,
|
|
220
233
|
args: [{ selector: 'ui-input-number', imports: [UiField, UiIcon], providers: [
|
|
221
234
|
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiInputNumber), multi: true },
|
|
222
|
-
], template: "<ui-field\n [label]=\"label()\"\n [for]=\"resolvedId()\"\n [required]=\"required()\"\n [size]=\"size()\"\n [level]=\"effectiveLevel()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [message]=\"displayMessage()\"\n [messageId]=\"messageId()\"\n>\n <input\n #inputEl\n class=\"ui-input-number-native\"\n [class._small]=\"size() === 'small'\"\n type=\"text\"\n inputmode=\"decimal\"\n [id]=\"resolvedId()\"\n [value]=\"text()\"\n [placeholder]=\"
|
|
235
|
+
], template: "<ui-field\n [label]=\"label()\"\n [for]=\"resolvedId()\"\n [required]=\"required()\"\n [size]=\"size()\"\n [level]=\"effectiveLevel()\"\n [floatLabel]=\"floatLabel()\"\n [filled]=\"isFilled()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [message]=\"displayMessage()\"\n [messageId]=\"messageId()\"\n>\n <input\n #inputEl\n class=\"ui-input-number-native\"\n [class._small]=\"size() === 'small'\"\n type=\"text\"\n inputmode=\"decimal\"\n [id]=\"resolvedId()\"\n [value]=\"text()\"\n [placeholder]=\"effectivePlaceholder()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly()\"\n [required]=\"required()\"\n [attr.name]=\"name() || null\"\n [attr.tabindex]=\"tabindex()\"\n [attr.aria-label]=\"label() ? null : ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-describedby]=\"displayMessage() ? messageId() : null\"\n [attr.aria-invalid]=\"effectiveLevel() === 'error' ? 'true' : null\"\n role=\"spinbutton\"\n [attr.aria-valuenow]=\"modelValue() ?? null\"\n [attr.aria-valuemin]=\"ariaValueMin()\"\n [attr.aria-valuemax]=\"ariaValueMax()\"\n (input)=\"onInput()\"\n (keydown)=\"onKeydown($event)\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\"\n />\n\n @if (displayUnit(); as u) {\n <span\n uiFieldSuffix\n class=\"ui-input-number-unit\"\n [class._small]=\"unitSmall()\"\n [class._disabled]=\"isDisabled()\"\n >{{ u }}</span\n >\n }\n\n @if (showButtons()) {\n <span uiFieldSuffix class=\"ui-input-number-spinner\">\n <button\n type=\"button\"\n tabindex=\"-1\"\n [attr.aria-label]=\"incrementAriaLabel()\"\n [disabled]=\"isDisabled() || readonly() || atMax()\"\n (click)=\"stepBy(1)\"\n >\n <ui-icon name=\"angle-up\" size=\"sm\" />\n </button>\n <button\n type=\"button\"\n tabindex=\"-1\"\n [attr.aria-label]=\"decrementAriaLabel()\"\n [disabled]=\"isDisabled() || readonly() || atMin()\"\n (click)=\"stepBy(-1)\"\n >\n <ui-icon name=\"angle-down\" size=\"sm\" />\n </button>\n </span>\n }\n</ui-field>\n", styles: [".ui-input-number-native{flex:1 1 auto;align-self:stretch;min-width:0;margin:0;padding:0;border:none;border-radius:inherit;background:transparent;outline:none;font-family:var(--fontfamily-base);font-size:var(--size-typography-text-default);color:var(--form-high-content-default)}.ui-input-number-native:first-child{padding-inline-start:var(--ui-form-field-padding-x, var(--units-md))}.ui-input-number-native:last-child{padding-inline-end:var(--ui-form-field-padding-x, var(--units-md))}.ui-input-number-native{padding-block-start:calc(0px + var(--_field-inset-block-start, 0px))}.ui-input-number-native::placeholder{color:var(--form-low-content-default);opacity:1}.ui-input-number-native:disabled{cursor:not-allowed;color:var(--form-high-content-disabled)}.ui-input-number-native._small{font-size:var(--ui-input-number-font-size-small, var(--size-typography-text-md))}.ui-input-number-unit{flex-shrink:0;color:var(--form-low-content-default)}.ui-input-number-unit:first-child{margin-inline-start:var(--ui-form-field-padding-x, var(--units-md))}.ui-input-number-unit:last-child{margin-inline-end:var(--ui-form-field-padding-x, var(--units-md))}.ui-input-number-unit._disabled{color:var(--form-high-content-disabled)}.ui-input-number-unit{font-family:var(--fontfamily-base);font-size:var(--ui-input-number-unit-font-size, var(--size-typography-text-default));white-space:nowrap;-webkit-user-select:none;user-select:none}.ui-input-number-unit._small{font-size:var(--ui-input-number-font-size-small, var(--size-typography-text-md))}.ui-input-number-spinner{display:flex;flex-direction:column;align-self:stretch;flex-shrink:0;width:var(--ui-input-number-spinner-width, 1.875rem);border-left:var(--ui-control-stroke-width, var(--stroke-default)) solid var(--form-high-stroke-default);border-radius:0 var(--ui-form-field-radius, var(--radius-sm)) var(--ui-form-field-radius, var(--radius-sm)) 0;overflow:hidden}.ui-input-number-spinner button{display:flex;flex:1 1 50%;align-items:center;justify-content:center;min-height:0;padding:0;border:none;background:none;line-height:0;color:var(--form-low-content-default);cursor:pointer;transition:color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),background-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-input-number-spinner button:hover:not(:disabled){color:var(--form-high-content-hover);background-color:var(--form-high-surface-hover)}.ui-input-number-spinner button:disabled{cursor:not-allowed;color:var(--form-high-content-disabled)}.ui-input-number-spinner button+button{border-top:var(--ui-control-stroke-width, var(--stroke-default)) solid var(--form-high-stroke-default)}\n"] }]
|
|
223
236
|
}], propDecorators: { placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], allowDecimals: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowDecimals", required: false }] }], unit: [{ type: i0.Input, args: [{ isSignal: true, alias: "unit", required: false }] }], showButtons: [{ type: i0.Input, args: [{ isSignal: true, alias: "showButtons", required: false }] }], incrementAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "incrementAriaLabel", required: false }] }], decrementAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "decrementAriaLabel", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], currency: [{ type: i0.Input, args: [{ isSignal: true, alias: "currency", required: false }] }], useGrouping: [{ type: i0.Input, args: [{ isSignal: true, alias: "useGrouping", required: false }] }], minFractionDigits: [{ type: i0.Input, args: [{ isSignal: true, alias: "minFractionDigits", required: false }] }], maxFractionDigits: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxFractionDigits", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], inputFocus: [{ type: i0.Output, args: ["inputFocus"] }], inputBlur: [{ type: i0.Output, args: ["inputBlur"] }], inputEl: [{ type: i0.ViewChild, args: ['inputEl', { isSignal: true }] }] } });
|
|
224
237
|
|
|
225
238
|
/*
|