@shival99/z-ui 2.1.29 → 2.1.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/shival99-z-ui-components-z-autocomplete.mjs +1079 -0
- package/fesm2022/shival99-z-ui-components-z-autocomplete.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-drawer.mjs +742 -0
- package/fesm2022/shival99-z-ui-components-z-drawer.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-dropdown-menu.mjs +58 -0
- package/fesm2022/shival99-z-ui-components-z-dropdown-menu.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-editor.mjs +1750 -0
- package/fesm2022/shival99-z-ui-components-z-editor.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-gallery.mjs +2419 -0
- package/fesm2022/shival99-z-ui-components-z-gallery.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-kanban.mjs +981 -0
- package/fesm2022/shival99-z-ui-components-z-kanban.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-marquee.mjs +70 -0
- package/fesm2022/shival99-z-ui-components-z-marquee.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-media-player.mjs +668 -0
- package/fesm2022/shival99-z-ui-components-z-media-player.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-menu.mjs +843 -0
- package/fesm2022/shival99-z-ui-components-z-menu.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-metric-card.mjs +128 -0
- package/fesm2022/shival99-z-ui-components-z-metric-card.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-pagination.mjs +158 -0
- package/fesm2022/shival99-z-ui-components-z-pagination.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-qrcode.mjs +383 -0
- package/fesm2022/shival99-z-ui-components-z-qrcode.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-radio.mjs +167 -0
- package/fesm2022/shival99-z-ui-components-z-radio.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-scrollarea.mjs +131 -0
- package/fesm2022/shival99-z-ui-components-z-scrollarea.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-show-more.mjs +121 -0
- package/fesm2022/shival99-z-ui-components-z-show-more.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-skeleton-auto.mjs +61 -0
- package/fesm2022/shival99-z-ui-components-z-skeleton-auto.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-steps.mjs +396 -0
- package/fesm2022/shival99-z-ui-components-z-steps.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-table.mjs +10510 -0
- package/fesm2022/shival99-z-ui-components-z-table.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-tabs.mjs +507 -0
- package/fesm2022/shival99-z-ui-components-z-tabs.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-tags.mjs +349 -0
- package/fesm2022/shival99-z-ui-components-z-tags.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-timeline.mjs +237 -0
- package/fesm2022/shival99-z-ui-components-z-timeline.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-upload.mjs +523 -0
- package/fesm2022/shival99-z-ui-components-z-upload.mjs.map +1 -0
- package/package.json +1 -1
- package/types/shival99-z-ui-components-z-autocomplete.d.ts +290 -0
- package/types/shival99-z-ui-components-z-calendar.d.ts +4 -4
- package/types/shival99-z-ui-components-z-drawer.d.ts +266 -0
- package/types/shival99-z-ui-components-z-dropdown-menu.d.ts +54 -0
- package/types/shival99-z-ui-components-z-editor.d.ts +337 -0
- package/types/shival99-z-ui-components-z-gallery.d.ts +402 -0
- package/types/shival99-z-ui-components-z-kanban.d.ts +237 -0
- package/types/shival99-z-ui-components-z-marquee.d.ts +35 -0
- package/types/shival99-z-ui-components-z-media-player.d.ts +124 -0
- package/types/shival99-z-ui-components-z-menu.d.ts +222 -0
- package/types/shival99-z-ui-components-z-metric-card.d.ts +67 -0
- package/types/shival99-z-ui-components-z-pagination.d.ts +55 -0
- package/types/shival99-z-ui-components-z-qrcode.d.ts +76 -0
- package/types/shival99-z-ui-components-z-radio.d.ts +69 -0
- package/types/shival99-z-ui-components-z-scrollarea.d.ts +46 -0
- package/types/shival99-z-ui-components-z-show-more.d.ts +36 -0
- package/types/shival99-z-ui-components-z-skeleton-auto.d.ts +35 -0
- package/types/shival99-z-ui-components-z-steps.d.ts +106 -0
- package/types/shival99-z-ui-components-z-table.d.ts +1924 -0
- package/types/shival99-z-ui-components-z-tabs.d.ts +92 -0
- package/types/shival99-z-ui-components-z-tags.d.ts +128 -0
- package/types/shival99-z-ui-components-z-timeline.d.ts +71 -0
- package/types/shival99-z-ui-components-z-upload.d.ts +153 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shival99-z-ui-components-z-upload.mjs","sources":["../../../../libs/core-ui/components/z-upload/z-upload.types.ts","../../../../libs/core-ui/components/z-upload/z-upload.variants.ts","../../../../libs/core-ui/components/z-upload/z-upload.component.ts","../../../../libs/core-ui/components/z-upload/z-upload.component.html","../../../../libs/core-ui/components/z-upload/shival99-z-ui-components-z-upload.ts"],"sourcesContent":["import type { Signal } from '@angular/core';\n\nexport type ZUploadSize = 'sm' | 'default' | 'lg';\nexport type ZUploadStatus = 'pending' | 'uploading' | 'success' | 'error';\n\nexport interface ZUploadFile {\n id: string;\n name: string;\n size: number;\n type: string;\n file?: File;\n url?: string;\n progress: number;\n status: ZUploadStatus;\n}\n\nexport interface ZUploadError {\n file: File;\n error: string;\n}\n\nexport interface ZUploadValidator {\n error: string;\n message: string;\n validate?: (files: ZUploadFile[]) => boolean;\n}\n\nexport interface ZUploadControl {\n /** Trigger validation and return true if valid */\n valid: () => boolean;\n /**\n * Trigger validation and return true if has error.\n * @deprecated Use `valid()` for boolean form-submit checks.\n */\n validate: () => boolean;\n reset: () => void;\n clearFiles: () => void;\n openFileDialog: () => void;\n markAsTouched: () => void;\n markAsUntouched: () => void;\n markAsDirty: () => void;\n markAsPristine: () => void;\n hasError: Signal<boolean>;\n files: Signal<ZUploadFile[]>;\n errorMessage: Signal<string>;\n}\n\nexport const formatFileSize = (bytes: number): string => {\n if (bytes === 0) {\n return '0 B';\n }\n\n const units = ['B', 'KB', 'MB', 'GB'];\n const k = 1024;\n const i = Math.floor(Math.log(bytes) / Math.log(k));\n const size = bytes / Math.pow(k, i);\n return `${size.toFixed(i > 0 ? 1 : 0)} ${units[i]}`;\n};\n","import { cva, type VariantProps } from 'class-variance-authority';\n\nexport const zUploadDropzoneVariants = cva(\n [\n 'relative flex flex-col items-center justify-center rounded-sm border-2 border-dashed',\n 'transition-[border-color,background-color] duration-200 cursor-pointer',\n 'hover:border-primary/50 hover:bg-primary/5',\n ],\n {\n variants: {\n zSize: {\n sm: 'min-h-24 gap-1 p-3',\n default: 'min-h-32 gap-2 p-4',\n lg: 'min-h-40 gap-3 p-6',\n },\n zStatus: {\n default: 'border-input bg-background',\n active: 'border-primary bg-primary/10',\n disabled: 'opacity-50 cursor-not-allowed bg-muted border-muted',\n readonly: 'opacity-70 cursor-default bg-muted/50 border-muted',\n error: 'border-destructive! bg-destructive/5 hover:border-destructive!',\n },\n },\n defaultVariants: {\n zSize: 'default',\n zStatus: 'default',\n },\n }\n);\n\nexport type ZUploadDropzoneVariants = VariantProps<typeof zUploadDropzoneVariants>;\n\nexport const zUploadFileItemVariants = cva(\n ['relative flex items-center gap-3 rounded-sm border border-input bg-background p-3', 'transition-all duration-200'],\n {\n variants: {\n zStatus: {\n pending: '',\n uploading: '',\n success: '',\n error: '',\n },\n },\n defaultVariants: {\n zStatus: 'pending',\n },\n }\n);\n\nexport type ZUploadFileItemVariants = VariantProps<typeof zUploadFileItemVariants>;\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n ElementRef,\n forwardRef,\n inject,\n Injector,\n input,\n type OnInit,\n output,\n signal,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport {\n type AbstractControl,\n ControlValueAccessor,\n NG_VALUE_ACCESSOR,\n NgControl,\n NgModel,\n PristineChangeEvent,\n TouchedChangeEvent,\n} from '@angular/forms';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { ZIconComponent } from '@shival99/z-ui/components/z-icon';\nimport { ZLoadingComponent } from '@shival99/z-ui/components/z-loading';\nimport { ZTooltipDirective } from '@shival99/z-ui/components/z-tooltip';\nimport { ZTranslateService } from '@shival99/z-ui/services';\nimport { zUuid, zMergeClasses, zTransform, zCreateEvent, type ZEvent } from '@shival99/z-ui/utils';\nimport type { ClassValue } from 'clsx';\nimport { filter, merge } from 'rxjs';\nimport {\n formatFileSize,\n type ZUploadControl,\n type ZUploadError,\n type ZUploadFile,\n type ZUploadSize,\n type ZUploadValidator,\n} from './z-upload.types';\nimport { zUploadDropzoneVariants, zUploadFileItemVariants } from './z-upload.variants';\n\n@Component({\n selector: 'z-upload',\n imports: [ZIconComponent, ZLoadingComponent, ZTooltipDirective, TranslatePipe],\n standalone: true,\n templateUrl: './z-upload.component.html',\n styleUrl: './z-upload.component.scss',\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => ZUploadComponent),\n multi: true,\n },\n TranslatePipe,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n exportAs: 'zUpload',\n})\nexport class ZUploadComponent implements OnInit, ControlValueAccessor {\n private readonly _injector = inject(Injector);\n private readonly _destroyRef = inject(DestroyRef);\n private readonly _zTranslate = inject(ZTranslateService);\n\n protected readonly fileInputRef = viewChild<ElementRef<HTMLInputElement>>('fileInput');\n\n public readonly zOnUpload = output<ZUploadFile[]>();\n public readonly zOnRemove = output<ZUploadFile>();\n public readonly zOnDownload = output<ZUploadFile>();\n public readonly zOnError = output<ZUploadError>();\n public readonly zOnFileChange = output<File[]>();\n public readonly zOnDragover = output<DragEvent>();\n public readonly zOnDragleave = output<DragEvent>();\n public readonly zOnDrop = output<DragEvent>();\n public readonly zControl = output<ZUploadControl>();\n public readonly zEvent = output<ZEvent>();\n\n public readonly class = input<ClassValue>('');\n public readonly zLabel = input<string>('');\n public readonly zLabelClass = input<string>('');\n public readonly zNote = input<string>('');\n public readonly zSize = input<ZUploadSize>('default');\n public readonly zAcceptFile = input<string>('*');\n public readonly zMultipleFile = input(false, { transform: zTransform });\n public readonly zMaxSize = input<number>(10);\n public readonly zMaxFiles = input<number>(5);\n public readonly zRequired = input(false, { transform: zTransform });\n public readonly zDisabled = input(false, { transform: zTransform });\n public readonly zReadonly = input(false, { transform: zTransform });\n public readonly zLoading = input(false, { transform: zTransform });\n public readonly zShowProgress = input(true, { transform: zTransform });\n public readonly zValidators = input<ZUploadValidator[]>([]);\n\n public readonly files = signal<ZUploadFile[]>([]);\n protected readonly inputId = zUuid('z-upload');\n protected readonly labelId = zUuid('z-upload-label');\n protected readonly isDragOver = signal(false);\n\n protected readonly uiState = signal({\n touched: false,\n dirty: false,\n });\n\n private readonly _fileError = signal<string>('');\n private readonly _disabled = signal(false);\n private readonly _formControl = signal<AbstractControl | null>(null);\n private readonly _formStateVersion = signal(0);\n private readonly _isNgModel = signal(false);\n private _onChange: (value: ZUploadFile[]) => void = () => void 0;\n private _onTouched: () => void = () => void 0;\n private _ngControl: NgControl | null = null;\n\n protected readonly isDisabled = computed(() => this._disabled() || this.zDisabled());\n\n protected readonly isBlocked = computed(() => this.isDisabled() || this.zLoading() || this.zReadonly());\n\n private readonly _shouldShowValidation = computed(() => {\n const control = this._formControl();\n this._formStateVersion();\n\n if (this._isNgModel()) {\n return this.uiState().dirty || this.uiState().touched;\n }\n\n if (control) {\n return control.dirty;\n }\n\n return this.uiState().dirty || this.uiState().touched;\n });\n\n protected readonly hasError = computed(() => {\n if (this._fileError()) {\n return true;\n }\n\n const customErrors = this._getValidationErrors();\n if (customErrors.length > 0) {\n return true;\n }\n\n const control = this._formControl();\n this._formStateVersion();\n if (!control) {\n return false;\n }\n\n return control.invalid && this._shouldShowValidation();\n });\n\n protected readonly showError = computed(\n () => this.hasError() && (this._shouldShowValidation() || !!this._fileError())\n );\n\n protected readonly errorMessage = computed(() => {\n const fileError = this._fileError();\n if (fileError) {\n return fileError;\n }\n\n const customErrors = this._getValidationErrors();\n if (customErrors.length > 0) {\n return customErrors[0];\n }\n\n const control = this._formControl();\n const errors = control?.errors;\n if (!errors) {\n return '';\n }\n\n const validators = this.zValidators();\n for (const validator of validators) {\n if (errors[validator.error]) {\n return validator.message;\n }\n }\n\n return '';\n });\n\n protected readonly currentStatus = computed(() => {\n if (this.isDisabled()) {\n return 'disabled';\n }\n if (this.zReadonly()) {\n return 'readonly';\n }\n if (this._fileError()) {\n return 'error';\n }\n if (this.hasError() && this._shouldShowValidation()) {\n return 'error';\n }\n if (this.isDragOver()) {\n return 'active';\n }\n return 'default';\n });\n\n protected readonly dropzoneClasses = computed(() =>\n zMergeClasses(\n zUploadDropzoneVariants({\n zSize: this.zSize(),\n zStatus: this.currentStatus(),\n }),\n this.class()\n )\n );\n\n protected readonly acceptTypes = computed(() => {\n const accept = this.zAcceptFile();\n return accept === '*' ? '' : accept;\n });\n\n protected readonly formatFileSize = formatFileSize;\n protected readonly getFileItemClasses = (file: ZUploadFile) => zUploadFileItemVariants({ zStatus: file.status });\n\n public ngOnInit(): void {\n queueMicrotask(() => {\n try {\n this._ngControl = this._injector.get(NgControl, null);\n this._isNgModel.set(this._ngControl instanceof NgModel);\n\n if (this._ngControl?.control) {\n const { control } = this._ngControl;\n this._formControl.set(control);\n merge(\n control.statusChanges,\n control.valueChanges,\n control.events.pipe(\n filter(event => event instanceof PristineChangeEvent || event instanceof TouchedChangeEvent)\n )\n )\n .pipe(takeUntilDestroyed(this._destroyRef))\n .subscribe(() => {\n this._formStateVersion.update(v => v + 1);\n });\n }\n } catch {\n this._ngControl = null;\n }\n });\n\n setTimeout(() => this._emitControl());\n }\n\n public writeValue(value: ZUploadFile[] | null): void {\n this.files.set(value ?? []);\n }\n\n public registerOnChange(fn: (value: ZUploadFile[]) => void): void {\n this._onChange = fn;\n }\n\n public registerOnTouched(fn: () => void): void {\n this._onTouched = fn;\n }\n\n public setDisabledState(isDisabled: boolean): void {\n this._disabled.set(isDisabled);\n }\n\n public updateProgress(fileId: string, progress: number): void {\n this.files.update(files =>\n files.map(f => {\n if (f.id !== fileId) {\n return f;\n }\n return {\n ...f,\n progress: Math.min(100, Math.max(0, progress)),\n status: progress >= 100 ? 'success' : 'uploading',\n };\n })\n );\n this._notifyChange();\n }\n\n public setFileStatus(fileId: string, status: ZUploadFile['status']): void {\n this.files.update(files =>\n files.map(f => {\n if (f.id !== fileId) {\n return f;\n }\n return { ...f, status };\n })\n );\n this._notifyChange();\n }\n\n public clearFiles(): void {\n this.files.set([]);\n this._notifyChange();\n }\n\n /** @deprecated Use `valid()` for boolean form-submit checks. */\n public validate(): boolean {\n this.uiState.update(s => ({ ...s, touched: true, dirty: true }));\n this._onTouched();\n\n if (this._ngControl?.control) {\n this._ngControl.control.markAsDirty();\n this._ngControl.control.markAsTouched();\n }\n\n return this.hasError();\n }\n\n public valid(): boolean {\n return !this.validate();\n }\n\n public reset(): void {\n this.files.set([]);\n this.uiState.update(s => ({ ...s, touched: false, dirty: false }));\n this._fileError.set('');\n this._onChange([]);\n\n if (this._ngControl?.control) {\n this._ngControl.control.markAsPristine();\n this._ngControl.control.markAsUntouched();\n }\n }\n\n public markAsTouched(): void {\n this.uiState.update(s => ({ ...s, touched: true }));\n this._onTouched();\n }\n\n public markAsUntouched(): void {\n this.uiState.update(s => ({ ...s, touched: false }));\n }\n\n public markAsDirty(): void {\n this.uiState.update(s => ({ ...s, dirty: true }));\n }\n\n public markAsPristine(): void {\n this.uiState.update(s => ({ ...s, dirty: false }));\n }\n\n private _emitControl(): void {\n this.zControl.emit({\n valid: () => this.valid(),\n validate: () => this.validate(),\n reset: () => this.reset(),\n clearFiles: () => this.clearFiles(),\n openFileDialog: () => this.openFileDialog(),\n markAsTouched: () => this.markAsTouched(),\n markAsUntouched: () => this.markAsUntouched(),\n markAsDirty: () => this.markAsDirty(),\n markAsPristine: () => this.markAsPristine(),\n hasError: this.hasError,\n files: this.files.asReadonly(),\n errorMessage: this.errorMessage,\n });\n }\n\n public getFiles(): File[] {\n return this.files()\n .filter(f => f.file)\n .map(f => f.file as File);\n }\n\n protected openFileDialog(): void {\n if (this.isBlocked()) {\n return;\n }\n this.fileInputRef()?.nativeElement.click();\n }\n\n protected onFileSelected(event: Event): void {\n const input = event.target as HTMLInputElement;\n if (!input.files?.length) {\n return;\n }\n\n this._processFiles(Array.from(input.files));\n input.value = '';\n }\n\n protected onDragOver(event: DragEvent): void {\n event.preventDefault();\n event.stopPropagation();\n if (this.isBlocked()) {\n return;\n }\n this.isDragOver.set(true);\n this.zOnDragover.emit(event);\n this.zEvent.emit(zCreateEvent('dragover', event));\n }\n\n protected onDragLeave(event: DragEvent): void {\n event.preventDefault();\n event.stopPropagation();\n this.isDragOver.set(false);\n this.zOnDragleave.emit(event);\n this.zEvent.emit(zCreateEvent('dragleave', event));\n }\n\n protected onDrop(event: DragEvent): void {\n event.preventDefault();\n event.stopPropagation();\n this.isDragOver.set(false);\n this.zOnDrop.emit(event);\n this.zEvent.emit(zCreateEvent('drop', event));\n\n if (this.isBlocked()) {\n return;\n }\n\n const droppedFiles = event.dataTransfer?.files;\n if (!droppedFiles?.length) {\n return;\n }\n\n this._processFiles(Array.from(droppedFiles));\n }\n\n protected removeFile(file: ZUploadFile): void {\n if (this.zLoading()) {\n return;\n }\n\n this.files.update(files => files.filter(f => f.id !== file.id));\n this._notifyChange();\n this._emitFileChange();\n this.zOnRemove.emit(file);\n }\n\n protected downloadFile(file: ZUploadFile): void {\n if (this.zLoading()) {\n return;\n }\n\n this.zOnDownload.emit(file);\n if (file.url) {\n const link = document.createElement('a');\n link.href = file.url;\n link.download = file.name;\n link.target = '_blank';\n link.rel = 'noopener noreferrer';\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n return;\n }\n\n if (file.file) {\n const url = URL.createObjectURL(file.file);\n const link = document.createElement('a');\n link.href = url;\n link.download = file.name;\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n URL.revokeObjectURL(url);\n }\n }\n\n private _getValidationErrors(): string[] {\n const validators = this.zValidators();\n const currentFiles = this.files();\n const control = this._formControl();\n const errors: string[] = [];\n\n const isRequired = this.zRequired() || control?.errors?.['required'];\n if (isRequired && currentFiles.length === 0) {\n this._zTranslate.currentLang();\n errors.push(this._zTranslate.instant('i18n_z_ui_upload_required'));\n }\n\n for (const validator of validators) {\n if (validator.validate && !validator.validate(currentFiles)) {\n errors.push(validator.message);\n }\n }\n\n return errors;\n }\n\n private _processFiles(newFiles: File[]): void {\n const maxFiles = this.zMaxFiles();\n const maxSize = this.zMaxSize() * 1024 * 1024;\n const accept = this.zAcceptFile();\n const validFiles: ZUploadFile[] = [];\n if (!this.zMultipleFile()) {\n this.files.set([]);\n }\n\n for (const file of newFiles) {\n if (!this.zMultipleFile() && validFiles.length > 0) {\n break;\n }\n\n if (this.zMultipleFile()) {\n const currentCount = this.files().length + validFiles.length;\n if (currentCount >= maxFiles) {\n const errorMsg = this._zTranslate.instant('i18n_z_ui_upload_max_files', { count: maxFiles });\n this._fileError.set(errorMsg);\n this.zOnError.emit({ file, error: errorMsg });\n continue;\n }\n }\n\n if (file.size > maxSize) {\n const errorMsg = this._zTranslate.instant('i18n_z_ui_upload_max_size', { size: this.zMaxSize() + 'MB' });\n this._fileError.set(errorMsg);\n this.zOnError.emit({ file, error: errorMsg });\n continue;\n }\n\n if (accept !== '*' && !this._isValidFileType(file, accept)) {\n const errorMsg = this._zTranslate.instant('i18n_z_ui_upload_invalid_type');\n this._fileError.set(errorMsg);\n this.zOnError.emit({ file, error: errorMsg });\n continue;\n }\n\n validFiles.push({\n id: zUuid('file'),\n name: file.name,\n size: file.size,\n type: file.type,\n file,\n progress: 0,\n status: 'pending',\n });\n }\n\n if (validFiles.length === 0) {\n this._notifyChange();\n return;\n }\n\n this._fileError.set('');\n if (!this.zMultipleFile()) {\n this.files.set(validFiles.slice(0, 1));\n this.uiState.update(s => ({ ...s, touched: true, dirty: true }));\n this._onTouched();\n this._notifyChange();\n this._emitFileChange();\n this.zOnUpload.emit(validFiles);\n return;\n }\n\n this.files.update(files => [...files, ...validFiles]);\n this.uiState.update(s => ({ ...s, touched: true, dirty: true }));\n this._onTouched();\n this._notifyChange();\n this._emitFileChange();\n this.zOnUpload.emit(validFiles);\n }\n\n private _emitFileChange(): void {\n const rawFiles = this.getFiles();\n this.zOnFileChange.emit(rawFiles);\n }\n\n private _isValidFileType(file: File, accept: string): boolean {\n const acceptTypes = accept.split(',').map(t => t.trim().toLowerCase());\n\n for (const type of acceptTypes) {\n if (type.startsWith('.')) {\n if (file.name.toLowerCase().endsWith(type)) {\n return true;\n }\n continue;\n }\n\n if (type.endsWith('/*')) {\n const category = type.slice(0, -2);\n if (file.type.startsWith(category + '/')) {\n return true;\n }\n continue;\n }\n\n if (file.type.toLowerCase() === type) {\n return true;\n }\n }\n\n return false;\n }\n\n private _notifyChange(): void {\n this._onChange(this.files());\n }\n}\n","<div class=\"z-upload-wrapper flex w-full flex-col gap-2\">\n @if (zLabel()) {\n <label [id]=\"labelId\" class=\"text-xs leading-none font-medium\" [class]=\"zLabelClass()\">\n {{ zLabel() }}\n @if (zRequired()) {\n <span class=\"text-destructive! ml-0.5\">*</span>\n }\n </label>\n }\n\n <div\n class=\"z-upload-dropzone\"\n [class]=\"dropzoneClasses()\"\n (click)=\"openFileDialog()\"\n (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave($event)\"\n (drop)=\"onDrop($event)\">\n @if (zLoading()) {\n <div class=\"bg-background/80 absolute inset-0 z-10 flex items-center justify-center rounded-sm\">\n <svg\n class=\"text-primary size-6 animate-spin\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\">\n <path d=\"M21 12a9 9 0 1 1-6.219-8.56\" />\n </svg>\n </div>\n }\n\n <svg\n class=\"text-muted-foreground\"\n [class.size-5]=\"zSize() === 'sm'\"\n [class.size-6]=\"zSize() === 'default'\"\n [class.size-8]=\"zSize() === 'lg'\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\">\n @if (isDragOver()) {\n <path d=\"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242\" />\n <path d=\"M12 12v9\" />\n <path d=\"m16 16-4-4-4 4\" />\n } @else {\n <path d=\"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\" />\n <polyline points=\"17 8 12 3 7 8\" />\n <line x1=\"12\" x2=\"12\" y1=\"3\" y2=\"15\" />\n }\n </svg>\n\n <div class=\"text-center\">\n <p class=\"text-muted-foreground m-0 text-sm\">\n @if (isDragOver()) {\n {{ 'i18n_z_ui_upload_drop_here' | translate }}\n } @else {\n {{ 'i18n_z_ui_upload_drag_drop' | translate }}\n {{ 'i18n_z_ui_upload_or' | translate }}\n <span class=\"text-primary cursor-pointer font-medium\">{{ 'i18n_z_ui_upload_browse' | translate }}</span>\n }\n </p>\n\n @if (zNote() || zAcceptFile() !== '*') {\n <div class=\"text-muted-foreground/70 mt-2 flex flex-col gap-0.5 text-xs\">\n @if (zNote()) {\n <span>{{ zNote() }}</span>\n }\n @if (zAcceptFile() !== '*') {\n <span>{{ 'i18n_z_ui_upload_accepted' | translate }}: {{ zAcceptFile() }}</span>\n }\n </div>\n }\n </div>\n\n <input\n #fileInput\n type=\"file\"\n class=\"hidden\"\n [id]=\"inputId\"\n [accept]=\"acceptTypes()\"\n [multiple]=\"zMultipleFile()\"\n [disabled]=\"isBlocked()\"\n [attr.aria-labelledby]=\"zLabel() ? labelId : null\"\n (change)=\"onFileSelected($event)\" />\n </div>\n\n @if (showError()) {\n <p class=\"text-destructive animate-in fade-in slide-in-from-top-1 m-0 text-xs duration-200\">\n {{ errorMessage() }}\n </p>\n }\n\n @if (files().length > 0) {\n <div class=\"z-upload-file-list flex flex-col gap-1.5\">\n @for (file of files(); track file.id) {\n <div [class]=\"getFileItemClasses(file)\" class=\"relative overflow-hidden p-2!\">\n <!-- Progress border at bottom -->\n @if (zShowProgress() && file.status === 'uploading') {\n <div\n class=\"bg-primary absolute bottom-0 left-0 h-0.5 transition-all duration-300\"\n [style.width.%]=\"file.progress\"></div>\n }\n\n <div class=\"bg-muted relative flex size-8 shrink-0 items-center justify-center self-start rounded-sm\">\n <z-icon zType=\"lucideFile\" zSize=\"16\" class=\"text-muted-foreground\" />\n </div>\n\n <div class=\"flex min-w-0 flex-1 flex-col\">\n <div class=\"flex items-center gap-1.5\">\n <span class=\"line-clamp-2 text-xs font-medium\" z-tooltip [zContent]=\"file.name\" [zAlwaysShow]=\"false\">\n {{ file.name }}\n </span>\n\n @if (file.status === 'uploading') {\n <z-loading zSize=\"2xs\" class=\"shrink-0\" [zLoading]=\"true\" />\n @if (zShowProgress() && file.progress > 0) {\n <span class=\"text-primary shrink-0 text-[0.625rem] font-medium\">{{ file.progress }}%</span>\n }\n }\n @if (file.status === 'success') {\n <z-icon zType=\"lucideCheckCircle\" zSize=\"14\" class=\"shrink-0 text-green-500\" />\n }\n @if (file.status === 'error') {\n <z-icon zType=\"lucideXCircle\" zSize=\"14\" class=\"text-destructive shrink-0\" />\n }\n </div>\n\n <span class=\"text-muted-foreground mt-0.5 text-[0.625rem]\">\n {{ formatFileSize(file.size) }}\n </span>\n </div>\n\n <div class=\"flex shrink-0 items-center gap-0.5\">\n @if (file.url || file.file) {\n <button\n type=\"button\"\n class=\"group hover:bg-accent flex size-6 cursor-pointer items-center justify-center rounded-sm transition-colors\"\n [class.pointer-events-none]=\"zLoading()\"\n [class.opacity-50]=\"zLoading()\"\n (click)=\"downloadFile(file); $event.stopPropagation()\">\n <z-icon zType=\"lucideDownload\" zSize=\"14\" class=\"text-muted-foreground\" />\n </button>\n }\n\n @if (!zReadonly()) {\n <button\n type=\"button\"\n class=\"hover:bg-destructive/10 flex size-6 cursor-pointer items-center justify-center rounded-sm transition-colors\"\n [class.pointer-events-none]=\"zLoading()\"\n [class.opacity-50]=\"zLoading()\"\n (click)=\"removeFile(file); $event.stopPropagation()\">\n <z-icon zType=\"lucideX\" zSize=\"14\" class=\"text-destructive\" />\n </button>\n }\n </div>\n </div>\n }\n </div>\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AA+CO,MAAM,cAAc,GAAG,CAAC,KAAa,KAAY;AACtD,IAAA,IAAI,KAAK,KAAK,CAAC,EAAE;AACf,QAAA,OAAO,KAAK;IACd;IAEA,MAAM,KAAK,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;IACrC,MAAM,CAAC,GAAG,IAAI;IACd,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACnD,IAAA,MAAM,IAAI,GAAG,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;IACnC,OAAO,CAAA,EAAG,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAA,CAAA,EAAI,KAAK,CAAC,CAAC,CAAC,CAAA,CAAE;AACrD;;ACvDO,MAAM,uBAAuB,GAAG,GAAG,CACxC;IACE,sFAAsF;IACtF,wEAAwE;IACxE,4CAA4C;CAC7C,EACD;AACE,IAAA,QAAQ,EAAE;AACR,QAAA,KAAK,EAAE;AACL,YAAA,EAAE,EAAE,oBAAoB;AACxB,YAAA,OAAO,EAAE,oBAAoB;AAC7B,YAAA,EAAE,EAAE,oBAAoB;AACzB,SAAA;AACD,QAAA,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AAA,EAAA,KAAA,EAAA,aAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEnEvF;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shival99/z-ui",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.30",
|
|
4
4
|
"description": "Z-UI: Modern Angular UI Component Library - A comprehensive, high-performance design system built with Angular 21, featuring 40+ customizable components with dark mode, accessibility, and enterprise-ready features.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
import * as _shival99_angular_virtual from '@shival99/angular-virtual';
|
|
2
|
+
import * as _angular_core from '@angular/core';
|
|
3
|
+
import { TemplateRef, Signal, OnInit, ElementRef } from '@angular/core';
|
|
4
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
5
|
+
import { ZIcon } from '@shival99/z-ui/components/z-icon';
|
|
6
|
+
import { ZPopoverPosition, ZPopoverControl } from '@shival99/z-ui/components/z-popover';
|
|
7
|
+
import { ZAsyncOptionsConfig, ZEvent } from '@shival99/z-ui/utils';
|
|
8
|
+
import { ClassValue } from 'clsx';
|
|
9
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
10
|
+
import { VariantProps } from 'class-variance-authority';
|
|
11
|
+
|
|
12
|
+
declare class ZAutocompleteOptionDirective<T = unknown> {
|
|
13
|
+
readonly templateRef: TemplateRef<any>;
|
|
14
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ZAutocompleteOptionDirective<any>, never>;
|
|
15
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ZAutocompleteOptionDirective<any>, "[z-autocomplete-option], [zAutocompleteOption]", never, {}, {}, never, never, true, never>;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
interface ZAutocompleteOption<T = unknown> {
|
|
19
|
+
label: string;
|
|
20
|
+
value: T;
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
description?: string;
|
|
23
|
+
icon?: ZIcon;
|
|
24
|
+
}
|
|
25
|
+
interface ZAutocompleteConfig<T = unknown> {
|
|
26
|
+
/** Số ký tự tối thiểu trước khi bắt đầu search hoặc gọi async.load. */
|
|
27
|
+
minLength: number;
|
|
28
|
+
/** Thời gian chờ sau khi người dùng ngừng nhập rồi mới phát zOnSearch/call async.load, tính bằng mili giây. */
|
|
29
|
+
debounceTime: number;
|
|
30
|
+
/** Giới hạn số option hiển thị sau khi filter; đặt 0 để không giới hạn. */
|
|
31
|
+
maxDisplayed: number;
|
|
32
|
+
/** Bật highlight phần text khớp với keyword trong label của option. */
|
|
33
|
+
highlightMatch: boolean;
|
|
34
|
+
/** i18n key hoặc text hiển thị khi đã nhập keyword nhưng không có kết quả. */
|
|
35
|
+
emptyMessage: string;
|
|
36
|
+
/** i18n key hoặc text hiển thị khi chưa có dữ liệu ban đầu. */
|
|
37
|
+
noDataMessage: string;
|
|
38
|
+
/** Tự đóng dropdown sau khi chọn option. */
|
|
39
|
+
closeOnSelect: boolean;
|
|
40
|
+
/** Chiều cao mặc định của một option, dùng cho virtual scroll và layout dropdown. */
|
|
41
|
+
optionHeight: number;
|
|
42
|
+
/** Chiều cao tối đa của dropdown, tính bằng pixel. */
|
|
43
|
+
dropdownMaxHeight: number;
|
|
44
|
+
/** Bỏ filter local khi options đã được xử lý từ server qua zOnSearch. */
|
|
45
|
+
serverSearch: boolean;
|
|
46
|
+
/** Config để component tự search, load-more, loading và append options. */
|
|
47
|
+
async?: ZAsyncOptionsConfig<ZAutocompleteOption<T>>;
|
|
48
|
+
}
|
|
49
|
+
declare const Z_AUTOCOMPLETE_DEFAULT_CONFIG: Omit<ZAutocompleteConfig, 'async'>;
|
|
50
|
+
type ZAutocompleteSize = 'sm' | 'default' | 'lg';
|
|
51
|
+
type ZAutocompleteType = 'default' | 'address_bar';
|
|
52
|
+
interface ZAutocompleteState {
|
|
53
|
+
focused: boolean;
|
|
54
|
+
touched: boolean;
|
|
55
|
+
dirty: boolean;
|
|
56
|
+
disabled: boolean;
|
|
57
|
+
readonly: boolean;
|
|
58
|
+
open: boolean;
|
|
59
|
+
}
|
|
60
|
+
interface ZAutocompleteCommitEvent {
|
|
61
|
+
value: string;
|
|
62
|
+
source: 'enter' | 'blur';
|
|
63
|
+
}
|
|
64
|
+
interface ZAutocompleteLoadMoreEvent {
|
|
65
|
+
currentCount: number;
|
|
66
|
+
scrollTop: number;
|
|
67
|
+
}
|
|
68
|
+
interface ZAutocompleteOptionContext<T = unknown> {
|
|
69
|
+
$implicit: ZAutocompleteOption<T>;
|
|
70
|
+
active: boolean;
|
|
71
|
+
}
|
|
72
|
+
interface ZAutocompleteControl<T = unknown> {
|
|
73
|
+
focus: () => void;
|
|
74
|
+
blur: () => void;
|
|
75
|
+
clear: () => void;
|
|
76
|
+
reset: () => void;
|
|
77
|
+
open: () => void;
|
|
78
|
+
close: () => void;
|
|
79
|
+
setValue: (value: string) => void;
|
|
80
|
+
value: Signal<string>;
|
|
81
|
+
/** Signal with selected options. Autocomplete returns an empty or one-item array. */
|
|
82
|
+
selected: Signal<ZAutocompleteOption<T>[]>;
|
|
83
|
+
/**
|
|
84
|
+
* @deprecated Use individual event outputs (zOnFocus, zOnBlur, etc.) instead.
|
|
85
|
+
* Will be removed in a future version.
|
|
86
|
+
*/
|
|
87
|
+
state: Signal<ZAutocompleteState>;
|
|
88
|
+
}
|
|
89
|
+
type ZAutocompleteOptionTemplate<T = unknown> = TemplateRef<ZAutocompleteOptionContext<T>>;
|
|
90
|
+
|
|
91
|
+
declare class ZAutocompleteComponent<T = unknown> implements OnInit, ControlValueAccessor {
|
|
92
|
+
private readonly _injector;
|
|
93
|
+
private readonly _destroyRef;
|
|
94
|
+
private readonly _query$;
|
|
95
|
+
protected readonly triggerRef: _angular_core.Signal<ElementRef<HTMLDivElement> | undefined>;
|
|
96
|
+
protected readonly inputRef: _angular_core.Signal<ElementRef<HTMLInputElement> | undefined>;
|
|
97
|
+
protected readonly dropdownTpl: _angular_core.Signal<TemplateRef<unknown> | undefined>;
|
|
98
|
+
protected readonly virtualScrollRef: _angular_core.Signal<ElementRef<HTMLDivElement> | undefined>;
|
|
99
|
+
protected readonly optionsContainerRef: _angular_core.Signal<ElementRef<HTMLDivElement> | undefined>;
|
|
100
|
+
protected readonly loadMoreSentinelRef: _angular_core.Signal<ElementRef<HTMLDivElement> | undefined>;
|
|
101
|
+
protected readonly virtualOptionElements: _angular_core.Signal<readonly ElementRef<HTMLDivElement>[]>;
|
|
102
|
+
protected readonly customOptionDirective: _angular_core.Signal<ZAutocompleteOptionDirective<any> | undefined>;
|
|
103
|
+
readonly class: _angular_core.InputSignal<ClassValue>;
|
|
104
|
+
readonly zOptions: _angular_core.InputSignal<ZAutocompleteOption<T>[]>;
|
|
105
|
+
readonly zConfig: _angular_core.InputSignal<Partial<ZAutocompleteConfig<T>>>;
|
|
106
|
+
readonly zSize: _angular_core.InputSignal<ZAutocompleteSize>;
|
|
107
|
+
readonly zType: _angular_core.InputSignal<ZAutocompleteType>;
|
|
108
|
+
readonly zLabel: _angular_core.InputSignal<string>;
|
|
109
|
+
readonly zLabelClass: _angular_core.InputSignal<string>;
|
|
110
|
+
readonly zPlaceholder: _angular_core.InputSignal<string>;
|
|
111
|
+
readonly zDisabled: _angular_core.InputSignalWithTransform<boolean, string | boolean>;
|
|
112
|
+
readonly zReadonly: _angular_core.InputSignalWithTransform<boolean, string | boolean>;
|
|
113
|
+
readonly zLoading: _angular_core.InputSignalWithTransform<boolean, string | boolean>;
|
|
114
|
+
readonly zLoadingOutline: _angular_core.InputSignalWithTransform<boolean, string | boolean>;
|
|
115
|
+
readonly zRequired: _angular_core.InputSignalWithTransform<boolean, string | boolean>;
|
|
116
|
+
readonly zPrefix: _angular_core.InputSignal<"" | ZIcon>;
|
|
117
|
+
readonly zSuffix: _angular_core.InputSignal<"" | ZIcon>;
|
|
118
|
+
readonly zAllowClear: _angular_core.InputSignalWithTransform<boolean, string | boolean>;
|
|
119
|
+
readonly zVirtualScroll: _angular_core.InputSignalWithTransform<boolean, string | boolean>;
|
|
120
|
+
readonly zDynamicSize: _angular_core.InputSignalWithTransform<boolean, string | boolean>;
|
|
121
|
+
readonly zOptionHeight: _angular_core.InputSignal<number>;
|
|
122
|
+
readonly zHeightExpand: _angular_core.InputSignal<number>;
|
|
123
|
+
readonly zMaxVisible: _angular_core.InputSignal<number | null>;
|
|
124
|
+
readonly zResetOnSelect: _angular_core.InputSignalWithTransform<boolean, string | boolean>;
|
|
125
|
+
readonly zEmptyText: _angular_core.InputSignal<string>;
|
|
126
|
+
readonly zEmptyIcon: _angular_core.InputSignal<ZIcon>;
|
|
127
|
+
readonly zNoDataText: _angular_core.InputSignal<string>;
|
|
128
|
+
readonly zNoDataIcon: _angular_core.InputSignal<ZIcon>;
|
|
129
|
+
readonly zAllowCustomValue: _angular_core.InputSignalWithTransform<boolean, string | boolean>;
|
|
130
|
+
readonly zDebounceTime: _angular_core.InputSignal<number>;
|
|
131
|
+
readonly zLoadingMore: _angular_core.InputSignalWithTransform<boolean, string | boolean>;
|
|
132
|
+
readonly zEnableLoadMore: _angular_core.InputSignalWithTransform<boolean, string | boolean>;
|
|
133
|
+
readonly zScrollDistance: _angular_core.InputSignal<number>;
|
|
134
|
+
readonly zKey: _angular_core.InputSignal<string>;
|
|
135
|
+
readonly zOptionTemplate: _angular_core.InputSignal<ZAutocompleteOptionTemplate<T> | null>;
|
|
136
|
+
readonly zOnSearch: _angular_core.OutputEmitterRef<string>;
|
|
137
|
+
readonly zOnLoadMore: _angular_core.OutputEmitterRef<ZAutocompleteLoadMoreEvent>;
|
|
138
|
+
readonly zOnSelect: _angular_core.OutputEmitterRef<ZAutocompleteOption<T>>;
|
|
139
|
+
readonly zOnEnter: _angular_core.OutputEmitterRef<string>;
|
|
140
|
+
readonly zOnCommit: _angular_core.OutputEmitterRef<ZAutocompleteCommitEvent>;
|
|
141
|
+
readonly zValueChange: _angular_core.OutputEmitterRef<string>;
|
|
142
|
+
readonly zOnBlur: _angular_core.OutputEmitterRef<FocusEvent>;
|
|
143
|
+
readonly zOnFocus: _angular_core.OutputEmitterRef<FocusEvent>;
|
|
144
|
+
readonly zControl: _angular_core.OutputEmitterRef<ZAutocompleteControl<T>>;
|
|
145
|
+
readonly zEvent: _angular_core.OutputEmitterRef<ZEvent>;
|
|
146
|
+
private readonly _value;
|
|
147
|
+
private readonly _disabled;
|
|
148
|
+
private readonly _formControl;
|
|
149
|
+
private readonly _popoverControl;
|
|
150
|
+
private readonly _selectedOption;
|
|
151
|
+
private readonly _asyncOptions;
|
|
152
|
+
private readonly _asyncKeyword;
|
|
153
|
+
private readonly _asyncPage;
|
|
154
|
+
private readonly _asyncHasMore;
|
|
155
|
+
private readonly _asyncLoading;
|
|
156
|
+
private readonly _asyncLoadingMore;
|
|
157
|
+
protected readonly uiState: _angular_core.WritableSignal<{
|
|
158
|
+
isOpen: boolean;
|
|
159
|
+
isFocused: boolean;
|
|
160
|
+
touched: boolean;
|
|
161
|
+
dirty: boolean;
|
|
162
|
+
}>;
|
|
163
|
+
protected readonly actualPosition: _angular_core.WritableSignal<ZPopoverPosition>;
|
|
164
|
+
protected readonly autocompleteId: string;
|
|
165
|
+
protected readonly dropdownId: string;
|
|
166
|
+
protected readonly inputValue: _angular_core.WritableSignal<string>;
|
|
167
|
+
protected readonly debouncedQuery: _angular_core.WritableSignal<string>;
|
|
168
|
+
protected readonly searchQuery: _angular_core.WritableSignal<string>;
|
|
169
|
+
protected readonly activeIndex: _angular_core.WritableSignal<number>;
|
|
170
|
+
protected readonly dropdownWidth: _angular_core.WritableSignal<number>;
|
|
171
|
+
private readonly _pendingSearch;
|
|
172
|
+
private _localLoadingTimeout;
|
|
173
|
+
private _loadMoreObserver;
|
|
174
|
+
private _virtualScrollListener;
|
|
175
|
+
private _asyncLoadSubscription;
|
|
176
|
+
private _asyncRequestId;
|
|
177
|
+
private _lastFilteredOptionsLength;
|
|
178
|
+
private _shouldScrollActiveOption;
|
|
179
|
+
/** Stores input value before keyboard navigation for ESC revert */
|
|
180
|
+
private _valueBeforeNavigation;
|
|
181
|
+
protected readonly virtualizer: _shival99_angular_virtual.AngularVirtualizer<HTMLDivElement, Element>;
|
|
182
|
+
private readonly _measureVirtualItems;
|
|
183
|
+
protected readonly config: _angular_core.Signal<ZAutocompleteConfig<T>>;
|
|
184
|
+
protected readonly hasAsyncOptions: _angular_core.Signal<boolean>;
|
|
185
|
+
protected readonly asyncSelectedOptions: _angular_core.Signal<ZAutocompleteOption<T>[]>;
|
|
186
|
+
protected readonly sourceOptions: _angular_core.Signal<ZAutocompleteOption<T>[]>;
|
|
187
|
+
protected readonly isLoading: _angular_core.Signal<boolean>;
|
|
188
|
+
protected readonly isLoadingMore: _angular_core.Signal<boolean>;
|
|
189
|
+
protected readonly canLoadMore: _angular_core.Signal<boolean>;
|
|
190
|
+
protected readonly isDisabled: _angular_core.Signal<boolean>;
|
|
191
|
+
protected readonly isReadonly: _angular_core.Signal<boolean>;
|
|
192
|
+
protected readonly isInteractionDisabled: _angular_core.Signal<boolean>;
|
|
193
|
+
protected readonly effectiveOptionHeight: _angular_core.Signal<number>;
|
|
194
|
+
protected readonly effectiveHeightExpand: _angular_core.Signal<number>;
|
|
195
|
+
protected readonly effectiveEmptyText: _angular_core.Signal<string>;
|
|
196
|
+
protected readonly effectiveNoDataText: _angular_core.Signal<string>;
|
|
197
|
+
protected readonly effectiveDebounceTime: _angular_core.Signal<number>;
|
|
198
|
+
protected readonly effectiveOptionTemplate: _angular_core.Signal<TemplateRef<any> | null>;
|
|
199
|
+
protected readonly hasCustomOptionTemplate: _angular_core.Signal<boolean>;
|
|
200
|
+
protected readonly selected: _angular_core.Signal<ZAutocompleteOption<T>[]>;
|
|
201
|
+
protected readonly highlightQuery: _angular_core.Signal<string>;
|
|
202
|
+
/**
|
|
203
|
+
* Local-mode loading state after debounce to avoid quick flicker.
|
|
204
|
+
* Server mode relies only on zLoading from parent.
|
|
205
|
+
*/
|
|
206
|
+
protected readonly isLoadingState: _angular_core.Signal<boolean>;
|
|
207
|
+
protected readonly isPositionTop: _angular_core.Signal<boolean>;
|
|
208
|
+
protected readonly shouldUseVirtualScroll: _angular_core.Signal<boolean>;
|
|
209
|
+
protected readonly filteredOptions: _angular_core.Signal<ZAutocompleteOption<T>[]>;
|
|
210
|
+
protected readonly optionViews: _angular_core.Signal<{
|
|
211
|
+
option: ZAutocompleteOption<T>;
|
|
212
|
+
index: number;
|
|
213
|
+
trackKey: string;
|
|
214
|
+
}[]>;
|
|
215
|
+
protected readonly hasValue: _angular_core.Signal<boolean>;
|
|
216
|
+
protected readonly currentStatus: _angular_core.Signal<"default" | "disabled" | "readonly" | "open">;
|
|
217
|
+
protected readonly inputClasses: _angular_core.Signal<string>;
|
|
218
|
+
readonly state: _angular_core.Signal<ZAutocompleteState>;
|
|
219
|
+
private _onChange;
|
|
220
|
+
private _onTouched;
|
|
221
|
+
private _ngControl;
|
|
222
|
+
private _isNavigationFilling;
|
|
223
|
+
constructor();
|
|
224
|
+
ngOnInit(): void;
|
|
225
|
+
writeValue(value: string): void;
|
|
226
|
+
registerOnChange(fn: (value: string) => void): void;
|
|
227
|
+
registerOnTouched(fn: () => void): void;
|
|
228
|
+
setDisabledState(isDisabled: boolean): void;
|
|
229
|
+
protected onInput(event: Event): void;
|
|
230
|
+
protected onFocus(event: FocusEvent): void;
|
|
231
|
+
protected onInputClick(): void;
|
|
232
|
+
protected onBlur(event: FocusEvent): void;
|
|
233
|
+
protected onKeydown(event: KeyboardEvent): void;
|
|
234
|
+
private _handleEnterKey;
|
|
235
|
+
private _fillInputFromActiveOption;
|
|
236
|
+
private _revertToValueBeforeNavigation;
|
|
237
|
+
private _resetInput;
|
|
238
|
+
protected onPopoverControl(control: ZPopoverControl): void;
|
|
239
|
+
protected onPopoverShow(): void;
|
|
240
|
+
protected onPopoverHideStart(): void;
|
|
241
|
+
protected onPopoverHideEnd(): void;
|
|
242
|
+
protected onPositionChange(position: ZPopoverPosition): void;
|
|
243
|
+
protected selectOption(option: ZAutocompleteOption<T>): void;
|
|
244
|
+
protected clearInput(event: MouseEvent): void;
|
|
245
|
+
protected getOptionClasses(option: ZAutocompleteOption<T>, index: number): string;
|
|
246
|
+
protected trackByValue: (index: number, option: ZAutocompleteOption<T>) => unknown;
|
|
247
|
+
focus(): void;
|
|
248
|
+
blur(): void;
|
|
249
|
+
clear(): void;
|
|
250
|
+
reset(): void;
|
|
251
|
+
open(): void;
|
|
252
|
+
close(): void;
|
|
253
|
+
setValue(value: string): void;
|
|
254
|
+
private _openPanel;
|
|
255
|
+
private _closePanel;
|
|
256
|
+
private _setupDebounce;
|
|
257
|
+
private _loadAsyncOptionsOnFocus;
|
|
258
|
+
private _loadAsyncOptions;
|
|
259
|
+
private _handleAsyncOptionsError;
|
|
260
|
+
private _getAsyncOptionsScrollTop;
|
|
261
|
+
private _restoreAsyncOptionsScrollTop;
|
|
262
|
+
private _resetOptionsScrollTop;
|
|
263
|
+
private _getOptionsScrollElement;
|
|
264
|
+
private _resetAsyncOptions;
|
|
265
|
+
private _clearLocalLoadingTimer;
|
|
266
|
+
private _setupLoadMoreObserver;
|
|
267
|
+
private _cleanupLoadMoreObserver;
|
|
268
|
+
private _setupVirtualScrollLoadMore;
|
|
269
|
+
private _cleanupVirtualScrollListener;
|
|
270
|
+
private _handleLoadMore;
|
|
271
|
+
private _emitControl;
|
|
272
|
+
private _getOptionKey;
|
|
273
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ZAutocompleteComponent<any>, never>;
|
|
274
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ZAutocompleteComponent<any>, "z-autocomplete", ["zAutocomplete"], { "class": { "alias": "class"; "required": false; "isSignal": true; }; "zOptions": { "alias": "zOptions"; "required": false; "isSignal": true; }; "zConfig": { "alias": "zConfig"; "required": false; "isSignal": true; }; "zSize": { "alias": "zSize"; "required": false; "isSignal": true; }; "zType": { "alias": "zType"; "required": false; "isSignal": true; }; "zLabel": { "alias": "zLabel"; "required": false; "isSignal": true; }; "zLabelClass": { "alias": "zLabelClass"; "required": false; "isSignal": true; }; "zPlaceholder": { "alias": "zPlaceholder"; "required": false; "isSignal": true; }; "zDisabled": { "alias": "zDisabled"; "required": false; "isSignal": true; }; "zReadonly": { "alias": "zReadonly"; "required": false; "isSignal": true; }; "zLoading": { "alias": "zLoading"; "required": false; "isSignal": true; }; "zLoadingOutline": { "alias": "zLoadingOutline"; "required": false; "isSignal": true; }; "zRequired": { "alias": "zRequired"; "required": false; "isSignal": true; }; "zPrefix": { "alias": "zPrefix"; "required": false; "isSignal": true; }; "zSuffix": { "alias": "zSuffix"; "required": false; "isSignal": true; }; "zAllowClear": { "alias": "zAllowClear"; "required": false; "isSignal": true; }; "zVirtualScroll": { "alias": "zVirtualScroll"; "required": false; "isSignal": true; }; "zDynamicSize": { "alias": "zDynamicSize"; "required": false; "isSignal": true; }; "zOptionHeight": { "alias": "zOptionHeight"; "required": false; "isSignal": true; }; "zHeightExpand": { "alias": "zHeightExpand"; "required": false; "isSignal": true; }; "zMaxVisible": { "alias": "zMaxVisible"; "required": false; "isSignal": true; }; "zResetOnSelect": { "alias": "zResetOnSelect"; "required": false; "isSignal": true; }; "zEmptyText": { "alias": "zEmptyText"; "required": false; "isSignal": true; }; "zEmptyIcon": { "alias": "zEmptyIcon"; "required": false; "isSignal": true; }; "zNoDataText": { "alias": "zNoDataText"; "required": false; "isSignal": true; }; "zNoDataIcon": { "alias": "zNoDataIcon"; "required": false; "isSignal": true; }; "zAllowCustomValue": { "alias": "zAllowCustomValue"; "required": false; "isSignal": true; }; "zDebounceTime": { "alias": "zDebounceTime"; "required": false; "isSignal": true; }; "zLoadingMore": { "alias": "zLoadingMore"; "required": false; "isSignal": true; }; "zEnableLoadMore": { "alias": "zEnableLoadMore"; "required": false; "isSignal": true; }; "zScrollDistance": { "alias": "zScrollDistance"; "required": false; "isSignal": true; }; "zKey": { "alias": "zKey"; "required": false; "isSignal": true; }; "zOptionTemplate": { "alias": "zOptionTemplate"; "required": false; "isSignal": true; }; }, { "zOnSearch": "zOnSearch"; "zOnLoadMore": "zOnLoadMore"; "zOnSelect": "zOnSelect"; "zOnEnter": "zOnEnter"; "zOnCommit": "zOnCommit"; "zValueChange": "zValueChange"; "zOnBlur": "zOnBlur"; "zOnFocus": "zOnFocus"; "zControl": "zControl"; "zEvent": "zEvent"; }, ["customOptionDirective"], never, true, never>;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
declare const zAutocompleteInputVariants: (props?: ({
|
|
278
|
+
zSize?: "sm" | "default" | "lg" | null | undefined;
|
|
279
|
+
zStatus?: "default" | "open" | "error" | "disabled" | "readonly" | null | undefined;
|
|
280
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
281
|
+
type ZAutocompleteInputVariants = VariantProps<typeof zAutocompleteInputVariants>;
|
|
282
|
+
declare const zAutocompleteOptionVariants: (props?: ({
|
|
283
|
+
customTemplate?: boolean | null | undefined;
|
|
284
|
+
active?: boolean | null | undefined;
|
|
285
|
+
disabled?: boolean | null | undefined;
|
|
286
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
287
|
+
type ZAutocompleteOptionVariants = VariantProps<typeof zAutocompleteOptionVariants>;
|
|
288
|
+
|
|
289
|
+
export { ZAutocompleteComponent, ZAutocompleteOptionDirective, Z_AUTOCOMPLETE_DEFAULT_CONFIG, zAutocompleteInputVariants, zAutocompleteOptionVariants };
|
|
290
|
+
export type { ZAutocompleteCommitEvent, ZAutocompleteConfig, ZAutocompleteControl, ZAutocompleteInputVariants, ZAutocompleteLoadMoreEvent, ZAutocompleteOption, ZAutocompleteOptionContext, ZAutocompleteOptionTemplate, ZAutocompleteOptionVariants, ZAutocompleteSize, ZAutocompleteState, ZAutocompleteType };
|
|
@@ -431,16 +431,16 @@ declare class ZCalendarComponent implements OnInit, ControlValueAccessor {
|
|
|
431
431
|
|
|
432
432
|
declare const zCalendarVariants: (props?: ({
|
|
433
433
|
zSize?: "sm" | "default" | "lg" | null | undefined;
|
|
434
|
-
zStatus?: "default" | "disabled" | "
|
|
434
|
+
zStatus?: "default" | "disabled" | "open" | "error" | "readonly" | null | undefined;
|
|
435
435
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
436
436
|
declare const zCalendarDayVariants: (props?: ({
|
|
437
|
-
state?: "default" | "
|
|
437
|
+
state?: "default" | "today" | "selected" | "inRange" | "rangeStart" | "rangeEnd" | "rangeSingle" | "disabled" | "otherMonth" | "hovered" | null | undefined;
|
|
438
438
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
439
439
|
declare const zCalendarMonthVariants: (props?: ({
|
|
440
|
-
state?: "default" | "
|
|
440
|
+
state?: "default" | "selected" | "disabled" | "current" | null | undefined;
|
|
441
441
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
442
442
|
declare const zCalendarYearVariants: (props?: ({
|
|
443
|
-
state?: "default" | "
|
|
443
|
+
state?: "default" | "selected" | "disabled" | "current" | null | undefined;
|
|
444
444
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
445
445
|
|
|
446
446
|
export { ZCalendarComponent, zCalendarDayVariants, zCalendarMonthVariants, zCalendarVariants, zCalendarYearVariants };
|