@ng-nest/ui 20.1.6 → 20.1.7

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.
Files changed (45) hide show
  1. package/attachments/index.d.ts +277 -0
  2. package/auto-complete/index.d.ts +1 -0
  3. package/card/index.d.ts +12 -2
  4. package/core/index.d.ts +40 -3
  5. package/dropdown/index.d.ts +30 -8
  6. package/fesm2022/ng-nest-ui-attachments.mjs +331 -0
  7. package/fesm2022/ng-nest-ui-attachments.mjs.map +1 -0
  8. package/fesm2022/ng-nest-ui-auto-complete.mjs +3 -0
  9. package/fesm2022/ng-nest-ui-auto-complete.mjs.map +1 -1
  10. package/fesm2022/ng-nest-ui-card.mjs +11 -5
  11. package/fesm2022/ng-nest-ui-card.mjs.map +1 -1
  12. package/fesm2022/ng-nest-ui-core.mjs +29 -1
  13. package/fesm2022/ng-nest-ui-core.mjs.map +1 -1
  14. package/fesm2022/ng-nest-ui-dropdown.mjs +160 -38
  15. package/fesm2022/ng-nest-ui-dropdown.mjs.map +1 -1
  16. package/fesm2022/ng-nest-ui-image.mjs +2 -2
  17. package/fesm2022/ng-nest-ui-image.mjs.map +1 -1
  18. package/fesm2022/ng-nest-ui-list.mjs +31 -7
  19. package/fesm2022/ng-nest-ui-list.mjs.map +1 -1
  20. package/fesm2022/ng-nest-ui-prompts.mjs +8 -3
  21. package/fesm2022/ng-nest-ui-prompts.mjs.map +1 -1
  22. package/fesm2022/ng-nest-ui-select.mjs +3 -0
  23. package/fesm2022/ng-nest-ui-select.mjs.map +1 -1
  24. package/fesm2022/ng-nest-ui-sender.mjs +6 -5
  25. package/fesm2022/ng-nest-ui-sender.mjs.map +1 -1
  26. package/fesm2022/ng-nest-ui-suggestion.mjs +110 -0
  27. package/fesm2022/ng-nest-ui-suggestion.mjs.map +1 -0
  28. package/fesm2022/ng-nest-ui-thought-chain.mjs +121 -0
  29. package/fesm2022/ng-nest-ui-thought-chain.mjs.map +1 -0
  30. package/fesm2022/ng-nest-ui-timeline.mjs +27 -5
  31. package/fesm2022/ng-nest-ui-timeline.mjs.map +1 -1
  32. package/fesm2022/ng-nest-ui-upload.mjs +205 -11
  33. package/fesm2022/ng-nest-ui-upload.mjs.map +1 -1
  34. package/fesm2022/ng-nest-ui.mjs +4 -0
  35. package/fesm2022/ng-nest-ui.mjs.map +1 -1
  36. package/index.d.ts +4 -0
  37. package/list/index.d.ts +30 -18
  38. package/package.json +57 -45
  39. package/prompts/index.d.ts +17 -2
  40. package/select/index.d.ts +1 -0
  41. package/sender/index.d.ts +1 -0
  42. package/suggestion/index.d.ts +96 -0
  43. package/thought-chain/index.d.ts +107 -0
  44. package/timeline/index.d.ts +35 -19
  45. package/upload/index.d.ts +39 -2
@@ -1 +1 @@
1
- {"version":3,"file":"ng-nest-ui-upload.mjs","sources":["../../../../lib/ng-nest/ui/upload/upload.property.ts","../../../../lib/ng-nest/ui/upload/upload-portal.component.ts","../../../../lib/ng-nest/ui/upload/upload-portal.component.html","../../../../lib/ng-nest/ui/upload/upload.component.ts","../../../../lib/ng-nest/ui/upload/upload.component.html","../../../../lib/ng-nest/ui/upload/upload.module.ts","../../../../lib/ng-nest/ui/upload/ng-nest-ui-upload.ts"],"sourcesContent":["import { XBoolean, XTemplate, XPosition, XCorner, XNumber, XToBoolean, XToNumber } from '@ng-nest/ui/core';\r\nimport { Component, input, output } from '@angular/core';\r\nimport { XFormControlFunction } from '@ng-nest/ui/base-form';\r\n\r\n/**\r\n * Upload\r\n * @selector x-upload\r\n * @decorator component\r\n */\r\nexport const XUploadPrefix = 'x-upload';\r\nconst X_UPLOAD_CONFIG_NAME = 'upload';\r\n\r\n/**\r\n * Upload Property\r\n */\r\n@Component({ selector: `${XUploadPrefix}-property`, template: '' })\r\nexport class XUploadProperty extends XFormControlFunction(X_UPLOAD_CONFIG_NAME) {\r\n /**\r\n * @zh_CN 显示文字\r\n * @en_US Display text\r\n */\r\n readonly text = input<XTemplate>();\r\n /**\r\n * @zh_CN 请求地址\r\n * @en_US Request address\r\n */\r\n readonly action = input<string>();\r\n /**\r\n * @zh_CN 上传文件类型,与原生的 input file 组件一致\r\n * @en_US Upload file type, consistent with native input file component\r\n */\r\n readonly accept = input<string>();\r\n /**\r\n * @zh_CN 文件显示类型\r\n * @en_US File display type\r\n */\r\n readonly type = input<XUploadType>('list');\r\n /**\r\n * @zh_CN 图片类型下面加载失败显示\r\n * @en_US Photo type below loading failed display\r\n */\r\n readonly imgFallback = input<string>();\r\n /**\r\n * @zh_CN 图片剪裁\r\n * @en_US Picture cropping\r\n */\r\n readonly imgCut = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 多文件上传\r\n * @en_US Multiple file upload\r\n */\r\n readonly multiple = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 点击下载\r\n * @en_US click download\r\n */\r\n readonly download = input<boolean, XBoolean>(this.config?.download ?? true, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 多次上传的模式,cover 覆盖现有, add 继续添加\r\n * @en_US For many upload mode, 'cover' covers the existing, 'add' continue to add\r\n */\r\n readonly multipleModel = input<XUploadMultipleModel>(this.config?.multipleModel ?? 'cover');\r\n /**\r\n * @zh_CN 文件列表自定义显示模板\r\n * @en_US File list custom display template\r\n */\r\n readonly filesTpl = input<XTemplate>();\r\n /**\r\n * @zh_CN 限制单次上传文件个数,只有开启多文件上传 multiple 时生效,默认不做限制\r\n * @en_US Limit the number of files uploaded files. Do not restrict the default\r\n */\r\n readonly maxLimit = input<number, XNumber>(-1, { transform: XToNumber });\r\n /**\r\n * @zh_CN 设置上传的请求头部\r\n * @en_US Set the upload request header\r\n */\r\n readonly headers = input<{ [key: string]: any }>();\r\n /**\r\n * @zh_CN 删除按钮的事件\r\n * @en_US Delete button event\r\n */\r\n readonly removeClick = output<{ file: XUploadNode; index: number }>();\r\n /**\r\n * @zh_CN 开始上传事件\r\n * @en_US Start upload event\r\n */\r\n readonly uploadReady = output<XUploadNode>();\r\n /**\r\n * @zh_CN 正在上传事件\r\n * @en_US Start upload event\r\n */\r\n readonly uploading = output<XUploadNode>();\r\n /**\r\n * @zh_CN 上传成功事件\r\n * @en_US Start upload event\r\n */\r\n readonly uploadSuccess = output<XUploadNode>();\r\n /**\r\n * @zh_CN 上传失败事件\r\n * @en_US Start upload event\r\n */\r\n readonly uploadError = output<XUploadNode>();\r\n}\r\n\r\n/**\r\n * @zh_CN Upload 数据对象\r\n * @en_US Upload data object\r\n */\r\nexport interface XUploadNode extends File {\r\n /**\r\n * @zh_CN 地址\r\n * @en_US address\r\n */\r\n url?: string;\r\n /**\r\n * @zh_CN 状态\r\n * @en_US status\r\n */\r\n state?: XStateType;\r\n /**\r\n * @zh_CN 上传进度\r\n * @en_US Upload progress\r\n */\r\n percent?: XNumber;\r\n /**\r\n * @zh_CN 上传返回数据\r\n * @en_US Upload body\r\n */\r\n body?: any;\r\n}\r\n\r\n/**\r\n * @zh_CN 文件状态\r\n * @en_US File status\r\n */\r\nexport type XStateType = 'ready' | 'uploading' | 'success' | 'error';\r\n\r\n/**\r\n * @zh_CN 文件显示类型\r\n * @en_US File display type\r\n */\r\nexport type XUploadType = 'list' | 'img';\r\n\r\n/**\r\n * @zh_CN 多次上传的模式,cover 覆盖现有 add 继续添加\r\n * @en_US For many upload mode, 'cover' covers the existing, 'add' continue to add\r\n */\r\nexport type XUploadMultipleModel = 'cover' | 'add';\r\n\r\n/**\r\n * @zh_CN 剪裁的方位\r\n * @en_US Tailored orientation\r\n */\r\nexport type XUploadCutType = XPosition | XCorner | '';\r\n\r\n/**\r\n * @zh_CN 上传显示窗口\r\n * @en_US Upload portal\r\n * @selector x-upload-portal\r\n * @decorator component\r\n */\r\nexport const XUploadPortalPrefix = 'x-upload-portal';\r\n","import { DOCUMENT } from '@angular/common';\r\nimport {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n ElementRef,\r\n Renderer2,\r\n inject,\r\n AfterViewInit,\r\n OnDestroy,\r\n input,\r\n computed,\r\n viewChild,\r\n signal,\r\n output\r\n} from '@angular/core';\r\nimport { fromEvent, Subject } from 'rxjs';\r\nimport { takeUntil } from 'rxjs/operators';\r\nimport { XClamp } from '@ng-nest/ui/core';\r\nimport { XUploadCutType, XUploadNode, XUploadPortalPrefix } from './upload.property';\r\nimport { XIconComponent } from '@ng-nest/ui/icon';\r\n\r\n@Component({\r\n selector: `${XUploadPortalPrefix}`,\r\n imports: [XIconComponent],\r\n templateUrl: './upload-portal.component.html',\r\n styleUrls: ['./upload-portal.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XUploadPortalComponent implements AfterViewInit, OnDestroy {\r\n file = input<XUploadNode>();\r\n name = computed(() => {\r\n return this.file()?.name;\r\n });\r\n url = computed(() => {\r\n return this.file()?.url;\r\n });\r\n imgRef = viewChild.required<ElementRef<HTMLElement>>('imgRef');\r\n imgClipRef = viewChild.required<ElementRef<HTMLElement>>('imgClipRef');\r\n boundaryRef = viewChild.required<ElementRef<HTMLElement>>('boundaryRef');\r\n cutRef = viewChild.required<ElementRef<HTMLElement>>('cutRef');\r\n ready = signal(false);\r\n cutType = signal<XUploadCutType>('');\r\n proportion = signal(1);\r\n originalSize = {\r\n width: 0,\r\n height: 0\r\n };\r\n boundaryBox = {\r\n width: 0,\r\n height: 0\r\n };\r\n cutBox = {\r\n width: 0,\r\n height: 0,\r\n x: 0,\r\n y: 0\r\n };\r\n clipRect!: {\r\n top: number;\r\n right: number;\r\n bottom: number;\r\n left: number;\r\n };\r\n\r\n doc = inject(DOCUMENT);\r\n\r\n closePortal = output<void>();\r\n surePortal = output<Blob>();\r\n private unSubject = new Subject<void>();\r\n private renderer = inject(Renderer2);\r\n\r\n ngAfterViewInit() {\r\n this.setCut();\r\n }\r\n\r\n ngOnDestroy() {\r\n this.unSubject.next();\r\n this.unSubject.complete();\r\n }\r\n\r\n setCut() {\r\n let width = this.imgRef().nativeElement.clientWidth;\r\n let height = this.imgRef().nativeElement.clientHeight;\r\n this.renderer.setStyle(this.cutRef().nativeElement, 'width', `${width}px`);\r\n this.renderer.setStyle(this.cutRef().nativeElement, 'height', `${height}px`);\r\n this.renderer.setStyle(this.boundaryRef().nativeElement, 'width', `${width}px`);\r\n this.renderer.setStyle(this.boundaryRef().nativeElement, 'height', `${height}px`);\r\n this.renderer.setStyle(this.imgRef().nativeElement, 'width', `${width}px`);\r\n this.renderer.setStyle(this.imgRef().nativeElement, 'height', `${height}px`);\r\n this.renderer.setStyle(this.imgClipRef().nativeElement, 'width', `${width}px`);\r\n this.renderer.setStyle(this.imgClipRef().nativeElement, 'height', `${height}px`);\r\n this.cutBox.width = width;\r\n this.cutBox.height = height;\r\n this.boundaryBox = { width, height };\r\n this.clipRect = {\r\n top: 0,\r\n right: width,\r\n bottom: height,\r\n left: 0\r\n };\r\n this.setOriginalSize();\r\n this.ready.set(true);\r\n\r\n const mouseDown = fromEvent<MouseEvent>(this.cutRef().nativeElement, 'mousedown').pipe(takeUntil(this.unSubject));\r\n\r\n mouseDown.subscribe((downMe: MouseEvent) => {\r\n let x = downMe.pageX;\r\n let y = downMe.pageY;\r\n let offsetX = 0;\r\n let offsetY = 0;\r\n const _unSub = new Subject<void>();\r\n let className = (downMe.target as HTMLDivElement).className;\r\n const spt = `${XUploadPortalPrefix}-cut-`;\r\n if (className.includes(spt)) {\r\n this.cutType.set(className.replace(spt, '') as XUploadCutType);\r\n }\r\n fromEvent<MouseEvent>(this.doc.documentElement, 'mousemove')\r\n .pipe(takeUntil(_unSub))\r\n .subscribe((moveMe: MouseEvent) => {\r\n offsetX = moveMe.pageX - x;\r\n offsetY = moveMe.pageY - y;\r\n x = moveMe.pageX;\r\n y = moveMe.pageY;\r\n this.setCutEle(this.cutType(), offsetX, offsetY);\r\n });\r\n fromEvent<MouseEvent>(this.doc.documentElement, 'mouseup')\r\n .pipe(takeUntil(_unSub))\r\n .subscribe(() => {\r\n this.cutType.set('');\r\n _unSub.next();\r\n _unSub.complete();\r\n });\r\n });\r\n }\r\n\r\n setOriginalSize() {\r\n const img = new Image();\r\n img.src = this.url()!;\r\n img.onload = () => {\r\n this.originalSize = { width: img.width, height: img.height };\r\n this.proportion.set(this.boundaryBox.width / this.originalSize.width);\r\n };\r\n }\r\n\r\n setCutEle(position: XUploadCutType, x: number, y: number) {\r\n switch (position) {\r\n case 'top-start':\r\n this.cutBox.width -= x;\r\n this.cutBox.height -= y;\r\n this.cutBox.x += x;\r\n this.cutBox.y += y;\r\n break;\r\n case 'top':\r\n this.cutBox.height -= y;\r\n this.cutBox.y += y;\r\n break;\r\n case 'top-end':\r\n this.cutBox.width += x;\r\n this.cutBox.height -= y;\r\n this.cutBox.y += y;\r\n break;\r\n case 'right':\r\n this.cutBox.width += x;\r\n break;\r\n case 'bottom-end':\r\n this.cutBox.width += x;\r\n this.cutBox.height += y;\r\n break;\r\n case 'bottom':\r\n this.cutBox.height += y;\r\n break;\r\n case 'bottom-start':\r\n this.cutBox.width -= x;\r\n this.cutBox.height += y;\r\n this.cutBox.x += x;\r\n break;\r\n case 'left':\r\n this.cutBox.width -= x;\r\n this.cutBox.x += x;\r\n break;\r\n case '':\r\n this.cutBox.x += x;\r\n this.cutBox.y += y;\r\n break;\r\n }\r\n const boundaryRect = this.boundaryRef().nativeElement.getBoundingClientRect();\r\n\r\n const maxY = boundaryRect.height - this.cutBox.height;\r\n const maxX = boundaryRect.width - this.cutBox.width;\r\n\r\n this.cutBox.x = XClamp(this.cutBox.x, 0, maxX);\r\n this.cutBox.y = XClamp(this.cutBox.y, 0, maxY);\r\n\r\n // const maxWidth = boundaryRect.height - this.cutBox.y;\r\n // const maxHeight = boundaryRect.width - this.cutBox.x;\r\n\r\n // this.cutBox.width = XClamp(this.cutBox.width, 0, maxWidth);\r\n // this.cutBox.height = XClamp(this.cutBox.width, 0, maxHeight);\r\n\r\n this.clipRect = {\r\n top: this.cutBox.y,\r\n right: this.cutBox.width + this.cutBox.x,\r\n bottom: this.cutBox.height + this.cutBox.y,\r\n left: this.cutBox.x\r\n };\r\n this.renderer.setStyle(\r\n this.imgClipRef().nativeElement,\r\n 'clip',\r\n `rect(${this.clipRect.top}px,${this.clipRect.right}px,${this.clipRect.bottom}px,${this.clipRect.left}px)`\r\n );\r\n this.renderer.setStyle(this.cutRef().nativeElement, 'width', `${this.cutBox.width}px`);\r\n this.renderer.setStyle(this.cutRef().nativeElement, 'height', `${this.cutBox.height}px`);\r\n this.renderer.setStyle(\r\n this.cutRef().nativeElement,\r\n 'transform',\r\n `translate3d(${this.cutBox.x}px, ${this.cutBox.y}px, 0)`\r\n );\r\n }\r\n\r\n sure() {\r\n const canvas = this.doc.createElement('canvas');\r\n canvas.width = this.cutBox.width / this.proportion();\r\n canvas.height = this.cutBox.height / this.proportion();\r\n const context = canvas.getContext('2d')!;\r\n const img = new Image();\r\n img.src = this.url()!;\r\n img.crossOrigin = 'anonymous';\r\n img.onload = () => {\r\n context.drawImage(img, -this.cutBox.x / this.proportion(), -this.cutBox.y / this.proportion());\r\n canvas.toBlob((blob) => {\r\n this.surePortal.emit(blob as Blob);\r\n this.closePortal.emit();\r\n });\r\n };\r\n }\r\n}\r\n","<div class=\"x-upload-portal {{ cutType() }}\" [class.x-upload-portal-ready]=\"ready()\">\r\n <div class=\"x-upload-portal-tools\">\r\n <div class=\"x-upload-portal-title\">\r\n <x-icon type=\"fto-image\"></x-icon>\r\n <span>{{ name() }}</span>\r\n </div>\r\n <x-icon class=\"x-upload-portal-close\" type=\"fto-x\" (click)=\"closePortal.emit()\"></x-icon>\r\n </div>\r\n <div class=\"x-upload-portal-img\">\r\n <img #imgRef class=\"x-upload-portal-full-img\" [src]=\"url()\" />\r\n <div #boundaryRef class=\"x-upload-portal-boundary\">\r\n <img #imgClipRef class=\"x-upload-portal-clip-img\" [src]=\"url()\" />\r\n <div #cutRef class=\"x-upload-portal-cut\">\r\n <div class=\"x-upload-portal-cut-top-start\"></div>\r\n <div class=\"x-upload-portal-cut-top\"></div>\r\n <div class=\"x-upload-portal-cut-top-end\"></div>\r\n <div class=\"x-upload-portal-cut-left\"></div>\r\n <div class=\"x-upload-portal-cut-right\"></div>\r\n <div class=\"x-upload-portal-cut-bottom-start\"></div>\r\n <div class=\"x-upload-portal-cut-bottom\"></div>\r\n <div class=\"x-upload-portal-cut-bottom-end\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"x-upload-portal-bottom-tools\">\r\n <x-icon class=\"x-upload-portal-close\" type=\"fto-check\" (click)=\"sure()\"></x-icon>\r\n </div>\r\n</div>\r\n","import { HttpClient, HttpEventType, HttpRequest, HttpEvent, HttpHeaders } from '@angular/common/http';\r\nimport {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n ElementRef,\r\n ViewContainerRef,\r\n inject,\r\n viewChild,\r\n signal,\r\n computed\r\n} from '@angular/core';\r\nimport { XUploadPrefix, XUploadNode, XUploadProperty, XUploadPortalPrefix } from './upload.property';\r\nimport { XIsArray, XIsEmpty, XIsTemplateRef } from '@ng-nest/ui/core';\r\nimport { map } from 'rxjs/operators';\r\nimport { XI18nService, XI18nUpload, zh_CN } from '@ng-nest/ui/i18n';\r\nimport { XPortalOverlayRef, XPortalService } from '@ng-nest/ui/portal';\r\nimport { XUploadPortalComponent } from './upload-portal.component';\r\nimport { XValueAccessor } from '@ng-nest/ui/base-form';\r\nimport { XIconComponent } from '@ng-nest/ui/icon';\r\nimport { XOutletDirective } from '@ng-nest/ui/outlet';\r\nimport { XButtonComponent } from '@ng-nest/ui/button';\r\nimport { XImageComponent, XImageGroupComponent } from '@ng-nest/ui/image';\r\nimport { XProgressComponent } from '@ng-nest/ui/progress';\r\nimport { NgTemplateOutlet } from '@angular/common';\r\nimport { toSignal } from '@angular/core/rxjs-interop';\r\n\r\n@Component({\r\n selector: `${XUploadPrefix}`,\r\n imports: [\r\n NgTemplateOutlet,\r\n XIconComponent,\r\n XOutletDirective,\r\n XButtonComponent,\r\n XImageGroupComponent,\r\n XImageComponent,\r\n XProgressComponent\r\n ],\r\n templateUrl: './upload.component.html',\r\n styleUrls: ['./upload.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [XValueAccessor(XUploadComponent)]\r\n})\r\nexport class XUploadComponent extends XUploadProperty {\r\n private http = inject(HttpClient, { optional: true });\r\n private portalService = inject(XPortalService);\r\n private viewContainerRef = inject(ViewContainerRef);\r\n private i18n = inject(XI18nService);\r\n\r\n file = viewChild.required<ElementRef<HTMLInputElement>>('file');\r\n files = signal<XUploadNode[]>([]);\r\n showUpload = signal(false);\r\n uploadNodes = signal<XUploadNode[]>([]);\r\n locale = toSignal(this.i18n.localeChange.pipe(map((x) => x.upload as XI18nUpload)), { initialValue: zh_CN.upload });\r\n portal!: XPortalOverlayRef<XUploadPortalComponent>;\r\n\r\n getText = computed(() => this.text() || this.locale().uploadText);\r\n\r\n isTemplateText = computed(() => XIsTemplateRef(this.getText()));\r\n\r\n override writeValue(value: XUploadNode[]) {\r\n this.value.set(value);\r\n this.setFiles();\r\n }\r\n\r\n acceptSignal = computed(() => {\r\n if (this.type() === 'img' && XIsEmpty(this.accept())) return 'image/*';\r\n return this.accept();\r\n });\r\n\r\n constructor() {\r\n super();\r\n if (!this.http) {\r\n throw new Error(\r\n `${XUploadPrefix}: Not found 'HttpClient', You can import 'HttpClientModule' in your root module.`\r\n );\r\n }\r\n }\r\n\r\n setFiles() {\r\n if (!Array.isArray(this.value())) return;\r\n this.files.set(\r\n this.value().map((x: XUploadNode) => {\r\n if (!x.state) x.state = 'success';\r\n return x;\r\n })\r\n );\r\n }\r\n\r\n change(event: Event) {\r\n let input = event.target as HTMLInputElement;\r\n if (typeof input === 'undefined' || input.files?.length === 0) return;\r\n let files: XUploadNode[] = [];\r\n let max = this.maxLimit() > -1 ? this.maxLimit() : (input.files as FileList).length;\r\n for (let i = 0; i < max; i++) {\r\n let file: XUploadNode = (input.files as FileList).item(i) as XUploadNode;\r\n file.state = 'ready';\r\n files = [...files, file];\r\n }\r\n if (files.length > 0) this.showUpload.set(true);\r\n if (this.multipleModel() === 'cover') {\r\n this.files.set(files);\r\n } else if (this.multipleModel() === 'add') {\r\n this.files.update((x) => [...x, ...files]);\r\n }\r\n this.value.set(this.files());\r\n this.onChange && this.onChange(this.value());\r\n this.onUploading();\r\n input.value = '';\r\n }\r\n\r\n remove(file: XUploadNode, index: number) {\r\n this.files.update((x) => {\r\n x.splice(index, 1);\r\n return [...x];\r\n });\r\n if (this.files().length === 0) this.file().nativeElement.value = '';\r\n this.showUpload.set(this.files().find((x) => x.state === 'ready') != null);\r\n const vindex = this.value().indexOf(file);\r\n if (vindex > -1) {\r\n this.value.update((x) => {\r\n x.splice(vindex, 1);\r\n return [...x];\r\n });\r\n this.onChange && this.onChange(this.value());\r\n }\r\n this.removeClick.emit({ file: file, index: index });\r\n }\r\n\r\n uploadClick() {\r\n if (this.disabledComputed()) return;\r\n this.file().nativeElement.click();\r\n }\r\n\r\n onUploading() {\r\n if (!this.action()) return;\r\n let readyFiles = this.files().filter((x) => x.state === 'ready');\r\n readyFiles.forEach((x) => {\r\n this.uploadFile(x);\r\n });\r\n }\r\n\r\n uploadFile(file: XUploadNode, index = -1) {\r\n let formData = new FormData();\r\n formData.append('file', file);\r\n const req = new HttpRequest('POST', this.action()!, formData, {\r\n reportProgress: true,\r\n responseType: 'arraybuffer',\r\n withCredentials: false,\r\n headers: new HttpHeaders(this.headers())\r\n });\r\n this.http\r\n ?.request(req)\r\n .pipe(\r\n map((event) =>\r\n this.getEventMessage(event, file, (body: BlobPart) => {\r\n let blob = new Blob([body]);\r\n let reader = new FileReader();\r\n reader.readAsText(blob, 'utf-8');\r\n reader.onload = () => {\r\n let body = [];\r\n try {\r\n body = JSON.parse(reader.result as string);\r\n if (XIsArray(body) && body.length > 0) {\r\n file.url = body[0] as string;\r\n }\r\n file.body = body;\r\n } catch (e) {\r\n console.error(e);\r\n }\r\n if (index !== -1) {\r\n this.files.update((x) => {\r\n x[index] = file;\r\n return [...x];\r\n });\r\n }\r\n this.uploadSuccess.emit(file);\r\n };\r\n })\r\n )\r\n )\r\n .subscribe({\r\n complete: () => {\r\n this.showUpload.set(this.files().find((y) => y.state === 'ready') != null);\r\n },\r\n error: () => {\r\n file.state = 'error';\r\n this.uploadError.emit(file);\r\n }\r\n });\r\n }\r\n\r\n getEventMessage(event: HttpEvent<any>, file: XUploadNode, successFunc: Function) {\r\n switch (event.type) {\r\n case HttpEventType.Sent:\r\n file.state = 'ready';\r\n this.uploadReady.emit(file);\r\n return this.locale().beginUploadText;\r\n case HttpEventType.UploadProgress:\r\n file.state = 'uploading';\r\n if (event.total) file.percent = Math.round((100 * event.loaded) / event.total);\r\n this.uploading.emit(file);\r\n return this.locale().uploadingText;\r\n case HttpEventType.Response:\r\n file.state = 'success';\r\n successFunc(event.body);\r\n return this.locale().uploadCompleted;\r\n }\r\n return;\r\n }\r\n\r\n onImgCut(file: XUploadNode, index: number) {\r\n this.portal = this.portalService.attach({\r\n content: XUploadPortalComponent,\r\n viewContainerRef: this.viewContainerRef,\r\n overlayConfig: {\r\n panelClass: [XUploadPortalPrefix],\r\n hasBackdrop: true,\r\n positionStrategy: this.portalService.setPlace('center')\r\n }\r\n });\r\n this.setInstance(file, index);\r\n }\r\n\r\n setInstance(file: XUploadNode, index: number) {\r\n let componentRef = this.portal?.componentRef;\r\n if (!componentRef) return;\r\n componentRef.setInput('file', file);\r\n const { closePortal, surePortal } = componentRef.instance;\r\n closePortal.subscribe(() => this.closePortal());\r\n surePortal.subscribe((blob) => {\r\n const fl = new File([blob], file.name, { type: blob.type }) as XUploadNode;\r\n fl.state = 'ready';\r\n this.uploadFile(fl, index);\r\n });\r\n }\r\n\r\n portalAttached() {\r\n return this.portal?.overlayRef?.hasAttached();\r\n }\r\n\r\n closePortal() {\r\n if (this.portalAttached()) {\r\n this.portal?.overlayRef?.detach();\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n imgError(_event: ErrorEvent, file: XUploadNode) {\r\n file.state = 'error';\r\n }\r\n imgLoad(file: XUploadNode) {\r\n file.state = 'success';\r\n }\r\n}\r\n","<div #upload class=\"x-upload x-upload-{{ type() }}\" [class.x-disabled]=\"disabledComputed()\">\r\n <input\r\n class=\"x-upload-input\"\r\n type=\"file\"\r\n #file\r\n (change)=\"change($event)\"\r\n [attr.accept]=\"acceptSignal()\"\r\n [multiple]=\"multiple()\"\r\n style=\"display: none\"\r\n />\r\n\r\n @switch (type()) {\r\n @case ('list') {\r\n <ng-container *ngTemplateOutlet=\"uploadBtnTpl\"></ng-container>\r\n <ng-container *xOutlet=\"filesTpl(); context: { $files: files() }\">\r\n <ul class=\"x-upload-files\">\r\n @for (file of files(); track file; let i = $index) {\r\n <li [class.x-upload-disabled]=\"!download()\">\r\n @if (download()) {\r\n <a [href]=\"file.url\" target=\"_blank\" [title]=\"file.name\">\r\n <x-icon type=\"fto-file-text\"></x-icon>\r\n <span class=\"x-upload-filename\">{{ file.name }}</span>\r\n </a>\r\n } @else {\r\n <a>\r\n <x-icon type=\"fto-file-text\"></x-icon>\r\n <span class=\"x-upload-filename\">{{ file.name }}</span>\r\n </a>\r\n }\r\n\r\n @switch (file.state) {\r\n @case ('ready') {\r\n <x-icon class=\"x-upload-state\" type=\"fto-clock\"></x-icon>\r\n }\r\n @case ('uploading') {\r\n <span class=\"x-upload-percent\">{{ file.percent }}%</span>\r\n }\r\n @case ('success') {\r\n <x-icon class=\"x-upload-state success\" type=\"fto-check\"></x-icon>\r\n }\r\n @case ('error') {\r\n <x-icon class=\"x-upload-state error\" type=\"fto-info\"></x-icon>\r\n }\r\n }\r\n @if (file.state !== 'uploading') {\r\n <x-button icon=\"fto-x\" (click)=\"remove(file, i)\" closable onlyIcon flat size=\"mini\"></x-button>\r\n }\r\n </li>\r\n }\r\n </ul>\r\n </ng-container>\r\n }\r\n @case ('img') {\r\n <x-image-group>\r\n @for (file of files(); track file; let i = $index) {\r\n <x-image\r\n [src]=\"file.url\"\r\n (load)=\"imgLoad(file)\"\r\n (error)=\"imgError($event, file)\"\r\n class=\"{{ file.state }}\"\r\n [previewTpl]=\"previewTpl\"\r\n [fallback]=\"imgFallback()\"\r\n >\r\n </x-image>\r\n <ng-template #previewTpl let-image=\"$image\">\r\n @if (file.state == 'uploading') {\r\n <div class=\"x-upload-uploading\">\r\n <x-progress [percent]=\"file.percent!\" info=\"false\"></x-progress>\r\n </div>\r\n }\r\n <div class=\"x-image-overlay\">\r\n @switch (file.state) {\r\n @case ('ready') {\r\n <x-icon class=\"x-upload-state\" type=\"fto-clock\"></x-icon>\r\n }\r\n @case ('success') {\r\n <x-icon type=\"fto-eye\" (click)=\"image.onPreview()\"></x-icon>\r\n }\r\n }\r\n @if (imgCut() && file.state === 'success') {\r\n <x-icon type=\"fto-crop\" (click)=\"onImgCut(file, i)\"></x-icon>\r\n }\r\n @if (file.state !== 'uploading') {\r\n <x-icon type=\"fto-trash-2\" (click)=\"remove(file, i)\"></x-icon>\r\n }\r\n </div>\r\n </ng-template>\r\n }\r\n <ng-container *ngTemplateOutlet=\"uploadBtnTpl\"></ng-container>\r\n </x-image-group>\r\n }\r\n }\r\n</div>\r\n\r\n<ng-template #uploadBtnTpl>\r\n <div class=\"x-upload-buttons\" [class.x-upload-buttons-template]=\"isTemplateText()\" (click)=\"uploadClick()\">\r\n <ng-container *xOutlet=\"getText()\">\r\n <x-button icon=\"fto-upload\" class=\"x-upload-text\" [disabled]=\"disabledComputed()\" type=\"primary\">{{\r\n getText()\r\n }}</x-button>\r\n </ng-container>\r\n </div>\r\n</ng-template>\r\n","import { NgModule } from '@angular/core';\r\nimport { XUploadComponent } from './upload.component';\r\n\r\n@NgModule({\r\n exports: [XUploadComponent],\r\n imports: [XUploadComponent]\r\n})\r\nexport class XUploadModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAIA;;;;AAIG;AACI,MAAM,aAAa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,CADhB,gBAAgB,CAAA,EAAA,CAAA,CAAA;AAGf,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,YAFd,gBAAgB,CAAA,EAAA,CAAA,CAAA;;2FAEf,aAAa,EAAA,UAAA,EAAA,CAAA;kBAJzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,gBAAgB,CAAC;oBAC3B,OAAO,EAAE,CAAC,gBAAgB;AAC3B,iBAAA;;;ACND;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-nest-ui-upload.mjs","sources":["../../../../lib/ng-nest/ui/upload/upload.property.ts","../../../../lib/ng-nest/ui/upload/upload-portal.component.ts","../../../../lib/ng-nest/ui/upload/upload-portal.component.html","../../../../lib/ng-nest/ui/upload/drag-overlay.component.ts","../../../../lib/ng-nest/ui/upload/drag-overlay.component.html","../../../../lib/ng-nest/ui/upload/drag-overlay.service.ts","../../../../lib/ng-nest/ui/upload/upload.component.ts","../../../../lib/ng-nest/ui/upload/upload.component.html","../../../../lib/ng-nest/ui/upload/upload.module.ts","../../../../lib/ng-nest/ui/upload/ng-nest-ui-upload.ts"],"sourcesContent":["import { XBoolean, XTemplate, XPosition, XCorner, XNumber, XToBoolean, XToNumber } from '@ng-nest/ui/core';\r\nimport { Component, ElementRef, input, output } from '@angular/core';\r\nimport { XFormControlFunction } from '@ng-nest/ui/base-form';\r\n\r\n/**\r\n * Upload\r\n * @selector x-upload\r\n * @decorator component\r\n */\r\nexport const XUploadPrefix = 'x-upload';\r\nconst X_UPLOAD_CONFIG_NAME = 'upload';\r\n\r\n/**\r\n * Upload Property\r\n */\r\n@Component({ selector: `${XUploadPrefix}-property`, template: '' })\r\nexport class XUploadProperty extends XFormControlFunction(X_UPLOAD_CONFIG_NAME) {\r\n /**\r\n * @zh_CN 显示文字\r\n * @en_US Display text\r\n */\r\n readonly text = input<XTemplate>();\r\n /**\r\n * @zh_CN 请求地址\r\n * @en_US Request address\r\n */\r\n readonly action = input<string>();\r\n /**\r\n * @zh_CN 可拖拽上传的区域\r\n * @en_US Drag and drop upload area\r\n */\r\n readonly dropContainer = input<ElementRef | HTMLElement>();\r\n /**\r\n * @zh_CN 可拖拽上传的区域的图标\r\n * @en_US Drag and drop upload area icon\r\n */\r\n readonly dropIcon = input<XTemplate>();\r\n /**\r\n * @zh_CN 可拖拽上传的区域的标题\r\n * @en_US Drag and drop upload area title\r\n */\r\n readonly dropTitle = input<XTemplate>();\r\n /**\r\n * @zh_CN 可拖拽上传的区域的描述\r\n * @en_US Drag and drop upload area description\r\n */\r\n readonly dropDescription = input<XTemplate>();\r\n /**\r\n * @zh_CN 直接显示可拖拽上传的区域\r\n * @en_US Show the drag and drop upload area directly\r\n */\r\n readonly showDrop = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 上传文件类型,与原生的 input file 组件一致\r\n * @en_US Upload file type, consistent with native input file component\r\n */\r\n readonly accept = input<string>();\r\n /**\r\n * @zh_CN 文件显示类型\r\n * @en_US File display type\r\n */\r\n readonly type = input<XUploadType>('list');\r\n /**\r\n * @zh_CN 图片类型下面加载失败显示\r\n * @en_US Photo type below loading failed display\r\n */\r\n readonly imgFallback = input<string>();\r\n /**\r\n * @zh_CN 图片剪裁\r\n * @en_US Picture cropping\r\n */\r\n readonly imgCut = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 多文件上传\r\n * @en_US Multiple file upload\r\n */\r\n readonly multiple = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 点击下载\r\n * @en_US click download\r\n */\r\n readonly download = input<boolean, XBoolean>(this.config?.download ?? true, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 多次上传的模式,cover 覆盖现有, add 继续添加\r\n * @en_US For many upload mode, 'cover' covers the existing, 'add' continue to add\r\n */\r\n readonly multipleModel = input<XUploadMultipleModel>(this.config?.multipleModel ?? 'cover');\r\n /**\r\n * @zh_CN 文件列表自定义显示模板\r\n * @en_US File list custom display template\r\n */\r\n readonly filesTpl = input<XTemplate>();\r\n /**\r\n * @zh_CN 限制单次上传文件个数,只有开启多文件上传 multiple 时生效,默认不做限制\r\n * @en_US Limit the number of files uploaded files. Do not restrict the default\r\n */\r\n readonly maxLimit = input<number, XNumber>(-1, { transform: XToNumber });\r\n /**\r\n * @zh_CN 设置上传的请求头部\r\n * @en_US Set the upload request header\r\n */\r\n readonly headers = input<{ [key: string]: any }>();\r\n /**\r\n * @zh_CN 删除按钮的事件\r\n * @en_US Delete button event\r\n */\r\n readonly removeClick = output<{ file: XUploadNode; index: number }>();\r\n /**\r\n * @zh_CN 开始上传事件\r\n * @en_US Start upload event\r\n */\r\n readonly uploadReady = output<XUploadNode>();\r\n /**\r\n * @zh_CN 正在上传事件\r\n * @en_US Start upload event\r\n */\r\n readonly uploading = output<XUploadNode>();\r\n /**\r\n * @zh_CN 上传成功事件\r\n * @en_US Start upload event\r\n */\r\n readonly uploadSuccess = output<XUploadNode>();\r\n /**\r\n * @zh_CN 上传失败事件\r\n * @en_US Start upload event\r\n */\r\n readonly uploadError = output<XUploadNode>();\r\n}\r\n\r\n/**\r\n * @zh_CN Upload 数据对象\r\n * @en_US Upload data object\r\n */\r\nexport interface XUploadNode extends File {\r\n /**\r\n * @zh_CN 地址\r\n * @en_US address\r\n */\r\n url?: string;\r\n /**\r\n * @zh_CN 状态\r\n * @en_US status\r\n */\r\n state?: XStateType;\r\n /**\r\n * @zh_CN 上传进度\r\n * @en_US Upload progress\r\n */\r\n percent?: XNumber;\r\n /**\r\n * @zh_CN 上传返回数据\r\n * @en_US Upload body\r\n */\r\n body?: any;\r\n}\r\n\r\n/**\r\n * @zh_CN 文件状态\r\n * @en_US File status\r\n */\r\nexport type XStateType = 'ready' | 'uploading' | 'success' | 'error';\r\n\r\n/**\r\n * @zh_CN 文件显示类型\r\n * @en_US File display type\r\n */\r\nexport type XUploadType = 'list' | 'img';\r\n\r\n/**\r\n * @zh_CN 多次上传的模式,cover 覆盖现有 add 继续添加\r\n * @en_US For many upload mode, 'cover' covers the existing, 'add' continue to add\r\n */\r\nexport type XUploadMultipleModel = 'cover' | 'add';\r\n\r\n/**\r\n * @zh_CN 剪裁的方位\r\n * @en_US Tailored orientation\r\n */\r\nexport type XUploadCutType = XPosition | XCorner | '';\r\n\r\n/**\r\n * @zh_CN 上传显示窗口\r\n * @en_US Upload portal\r\n * @selector x-upload-portal\r\n * @decorator component\r\n */\r\nexport const XUploadPortalPrefix = 'x-upload-portal';\r\n","import { DOCUMENT } from '@angular/common';\r\nimport {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n ElementRef,\r\n Renderer2,\r\n inject,\r\n AfterViewInit,\r\n OnDestroy,\r\n input,\r\n computed,\r\n viewChild,\r\n signal,\r\n output\r\n} from '@angular/core';\r\nimport { fromEvent, Subject } from 'rxjs';\r\nimport { takeUntil } from 'rxjs/operators';\r\nimport { XClamp } from '@ng-nest/ui/core';\r\nimport { XUploadCutType, XUploadNode, XUploadPortalPrefix } from './upload.property';\r\nimport { XIconComponent } from '@ng-nest/ui/icon';\r\n\r\n@Component({\r\n selector: `${XUploadPortalPrefix}`,\r\n imports: [XIconComponent],\r\n templateUrl: './upload-portal.component.html',\r\n styleUrls: ['./upload-portal.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XUploadPortalComponent implements AfterViewInit, OnDestroy {\r\n file = input<XUploadNode>();\r\n name = computed(() => {\r\n return this.file()?.name;\r\n });\r\n url = computed(() => {\r\n return this.file()?.url;\r\n });\r\n imgRef = viewChild.required<ElementRef<HTMLElement>>('imgRef');\r\n imgClipRef = viewChild.required<ElementRef<HTMLElement>>('imgClipRef');\r\n boundaryRef = viewChild.required<ElementRef<HTMLElement>>('boundaryRef');\r\n cutRef = viewChild.required<ElementRef<HTMLElement>>('cutRef');\r\n ready = signal(false);\r\n cutType = signal<XUploadCutType>('');\r\n proportion = signal(1);\r\n originalSize = {\r\n width: 0,\r\n height: 0\r\n };\r\n boundaryBox = {\r\n width: 0,\r\n height: 0\r\n };\r\n cutBox = {\r\n width: 0,\r\n height: 0,\r\n x: 0,\r\n y: 0\r\n };\r\n clipRect!: {\r\n top: number;\r\n right: number;\r\n bottom: number;\r\n left: number;\r\n };\r\n\r\n doc = inject(DOCUMENT);\r\n\r\n closePortal = output<void>();\r\n surePortal = output<Blob>();\r\n private unSubject = new Subject<void>();\r\n private renderer = inject(Renderer2);\r\n\r\n ngAfterViewInit() {\r\n this.setCut();\r\n }\r\n\r\n ngOnDestroy() {\r\n this.unSubject.next();\r\n this.unSubject.complete();\r\n }\r\n\r\n setCut() {\r\n let width = this.imgRef().nativeElement.clientWidth;\r\n let height = this.imgRef().nativeElement.clientHeight;\r\n this.renderer.setStyle(this.cutRef().nativeElement, 'width', `${width}px`);\r\n this.renderer.setStyle(this.cutRef().nativeElement, 'height', `${height}px`);\r\n this.renderer.setStyle(this.boundaryRef().nativeElement, 'width', `${width}px`);\r\n this.renderer.setStyle(this.boundaryRef().nativeElement, 'height', `${height}px`);\r\n this.renderer.setStyle(this.imgRef().nativeElement, 'width', `${width}px`);\r\n this.renderer.setStyle(this.imgRef().nativeElement, 'height', `${height}px`);\r\n this.renderer.setStyle(this.imgClipRef().nativeElement, 'width', `${width}px`);\r\n this.renderer.setStyle(this.imgClipRef().nativeElement, 'height', `${height}px`);\r\n this.cutBox.width = width;\r\n this.cutBox.height = height;\r\n this.boundaryBox = { width, height };\r\n this.clipRect = {\r\n top: 0,\r\n right: width,\r\n bottom: height,\r\n left: 0\r\n };\r\n this.setOriginalSize();\r\n this.ready.set(true);\r\n\r\n const mouseDown = fromEvent<MouseEvent>(this.cutRef().nativeElement, 'mousedown').pipe(takeUntil(this.unSubject));\r\n\r\n mouseDown.subscribe((downMe: MouseEvent) => {\r\n let x = downMe.pageX;\r\n let y = downMe.pageY;\r\n let offsetX = 0;\r\n let offsetY = 0;\r\n const _unSub = new Subject<void>();\r\n let className = (downMe.target as HTMLDivElement).className;\r\n const spt = `${XUploadPortalPrefix}-cut-`;\r\n if (className.includes(spt)) {\r\n this.cutType.set(className.replace(spt, '') as XUploadCutType);\r\n }\r\n fromEvent<MouseEvent>(this.doc.documentElement, 'mousemove')\r\n .pipe(takeUntil(_unSub))\r\n .subscribe((moveMe: MouseEvent) => {\r\n offsetX = moveMe.pageX - x;\r\n offsetY = moveMe.pageY - y;\r\n x = moveMe.pageX;\r\n y = moveMe.pageY;\r\n this.setCutEle(this.cutType(), offsetX, offsetY);\r\n });\r\n fromEvent<MouseEvent>(this.doc.documentElement, 'mouseup')\r\n .pipe(takeUntil(_unSub))\r\n .subscribe(() => {\r\n this.cutType.set('');\r\n _unSub.next();\r\n _unSub.complete();\r\n });\r\n });\r\n }\r\n\r\n setOriginalSize() {\r\n const img = new Image();\r\n img.src = this.url()!;\r\n img.onload = () => {\r\n this.originalSize = { width: img.width, height: img.height };\r\n this.proportion.set(this.boundaryBox.width / this.originalSize.width);\r\n };\r\n }\r\n\r\n setCutEle(position: XUploadCutType, x: number, y: number) {\r\n switch (position) {\r\n case 'top-start':\r\n this.cutBox.width -= x;\r\n this.cutBox.height -= y;\r\n this.cutBox.x += x;\r\n this.cutBox.y += y;\r\n break;\r\n case 'top':\r\n this.cutBox.height -= y;\r\n this.cutBox.y += y;\r\n break;\r\n case 'top-end':\r\n this.cutBox.width += x;\r\n this.cutBox.height -= y;\r\n this.cutBox.y += y;\r\n break;\r\n case 'right':\r\n this.cutBox.width += x;\r\n break;\r\n case 'bottom-end':\r\n this.cutBox.width += x;\r\n this.cutBox.height += y;\r\n break;\r\n case 'bottom':\r\n this.cutBox.height += y;\r\n break;\r\n case 'bottom-start':\r\n this.cutBox.width -= x;\r\n this.cutBox.height += y;\r\n this.cutBox.x += x;\r\n break;\r\n case 'left':\r\n this.cutBox.width -= x;\r\n this.cutBox.x += x;\r\n break;\r\n case '':\r\n this.cutBox.x += x;\r\n this.cutBox.y += y;\r\n break;\r\n }\r\n const boundaryRect = this.boundaryRef().nativeElement.getBoundingClientRect();\r\n\r\n const maxY = boundaryRect.height - this.cutBox.height;\r\n const maxX = boundaryRect.width - this.cutBox.width;\r\n\r\n this.cutBox.x = XClamp(this.cutBox.x, 0, maxX);\r\n this.cutBox.y = XClamp(this.cutBox.y, 0, maxY);\r\n\r\n // const maxWidth = boundaryRect.height - this.cutBox.y;\r\n // const maxHeight = boundaryRect.width - this.cutBox.x;\r\n\r\n // this.cutBox.width = XClamp(this.cutBox.width, 0, maxWidth);\r\n // this.cutBox.height = XClamp(this.cutBox.width, 0, maxHeight);\r\n\r\n this.clipRect = {\r\n top: this.cutBox.y,\r\n right: this.cutBox.width + this.cutBox.x,\r\n bottom: this.cutBox.height + this.cutBox.y,\r\n left: this.cutBox.x\r\n };\r\n this.renderer.setStyle(\r\n this.imgClipRef().nativeElement,\r\n 'clip',\r\n `rect(${this.clipRect.top}px,${this.clipRect.right}px,${this.clipRect.bottom}px,${this.clipRect.left}px)`\r\n );\r\n this.renderer.setStyle(this.cutRef().nativeElement, 'width', `${this.cutBox.width}px`);\r\n this.renderer.setStyle(this.cutRef().nativeElement, 'height', `${this.cutBox.height}px`);\r\n this.renderer.setStyle(\r\n this.cutRef().nativeElement,\r\n 'transform',\r\n `translate3d(${this.cutBox.x}px, ${this.cutBox.y}px, 0)`\r\n );\r\n }\r\n\r\n sure() {\r\n const canvas = this.doc.createElement('canvas');\r\n canvas.width = this.cutBox.width / this.proportion();\r\n canvas.height = this.cutBox.height / this.proportion();\r\n const context = canvas.getContext('2d')!;\r\n const img = new Image();\r\n img.src = this.url()!;\r\n img.crossOrigin = 'anonymous';\r\n img.onload = () => {\r\n context.drawImage(img, -this.cutBox.x / this.proportion(), -this.cutBox.y / this.proportion());\r\n canvas.toBlob((blob) => {\r\n this.surePortal.emit(blob as Blob);\r\n this.closePortal.emit();\r\n });\r\n };\r\n }\r\n}\r\n","<div class=\"x-upload-portal {{ cutType() }}\" [class.x-upload-portal-ready]=\"ready()\">\r\n <div class=\"x-upload-portal-tools\">\r\n <div class=\"x-upload-portal-title\">\r\n <x-icon type=\"fto-image\"></x-icon>\r\n <span>{{ name() }}</span>\r\n </div>\r\n <x-icon class=\"x-upload-portal-close\" type=\"fto-x\" (click)=\"closePortal.emit()\"></x-icon>\r\n </div>\r\n <div class=\"x-upload-portal-img\">\r\n <img #imgRef class=\"x-upload-portal-full-img\" [src]=\"url()\" />\r\n <div #boundaryRef class=\"x-upload-portal-boundary\">\r\n <img #imgClipRef class=\"x-upload-portal-clip-img\" [src]=\"url()\" />\r\n <div #cutRef class=\"x-upload-portal-cut\">\r\n <div class=\"x-upload-portal-cut-top-start\"></div>\r\n <div class=\"x-upload-portal-cut-top\"></div>\r\n <div class=\"x-upload-portal-cut-top-end\"></div>\r\n <div class=\"x-upload-portal-cut-left\"></div>\r\n <div class=\"x-upload-portal-cut-right\"></div>\r\n <div class=\"x-upload-portal-cut-bottom-start\"></div>\r\n <div class=\"x-upload-portal-cut-bottom\"></div>\r\n <div class=\"x-upload-portal-cut-bottom-end\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"x-upload-portal-bottom-tools\">\r\n <x-icon class=\"x-upload-portal-close\" type=\"fto-check\" (click)=\"sure()\"></x-icon>\r\n </div>\r\n</div>\r\n","import { input, ChangeDetectionStrategy, Component, ViewEncapsulation, computed } from '@angular/core';\r\nimport { XTemplate } from '@ng-nest/ui/core';\r\nimport { XOutletDirective } from '@ng-nest/ui/outlet';\r\nimport { XIconComponent } from '@ng-nest/ui/icon';\r\n\r\n@Component({\r\n selector: 'x-drag-overlay',\r\n templateUrl: './drag-overlay.component.html',\r\n styleUrl: './drag-overlay.component.scss',\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [XOutletDirective, XIconComponent]\r\n})\r\nexport class XDragOverlayComponent {\r\n icon = input<XTemplate>();\r\n title = input<XTemplate>();\r\n description = input<XTemplate>();\r\n\r\n iconString = computed(() => this.icon() as string);\r\n}\r\n","<div class=\"x-drag-overlay\">\r\n @if (icon()) {\r\n <div class=\"x-drag-overlay-icon\">\r\n <ng-container *xOutlet=\"icon()\">\r\n <x-icon [type]=\"iconString()\"></x-icon>\r\n </ng-container>\r\n </div>\r\n }\r\n @if (title()) {\r\n <div class=\"x-drag-overlay-title\">\r\n <ng-container *xOutlet=\"title()\">\r\n {{ title() }}\r\n </ng-container>\r\n </div>\r\n }\r\n @if (description()) {\r\n <div class=\"x-drag-overlay-description\">\r\n <ng-container *xOutlet=\"description()\">\r\n {{ description() }}\r\n </ng-container>\r\n </div>\r\n }\r\n</div>\r\n","import { Overlay, OverlayConfig, OverlayRef } from '@angular/cdk/overlay';\r\nimport { ComponentRef, DOCUMENT, inject, Injectable, Renderer2, RendererFactory2 } from '@angular/core';\r\nimport { XDragOverlayComponent } from './drag-overlay.component';\r\nimport { ComponentPortal } from '@angular/cdk/portal';\r\nimport { XComputedStyle, XTemplate } from '@ng-nest/ui/core';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class XDragOverlayService {\r\n overlay = inject(Overlay);\r\n document = inject(DOCUMENT);\r\n overlayRef: OverlayRef | null = null;\r\n componentRef: ComponentRef<XDragOverlayComponent> | null = null;\r\n containerPosition: string = '';\r\n private renderer!: Renderer2;\r\n private factory = inject(RendererFactory2);\r\n\r\n constructor() {\r\n this.renderer = this.factory.createRenderer(null, null);\r\n }\r\n\r\n createOverlay(container: HTMLElement, params: { icon: XTemplate; title: XTemplate; description: XTemplate }): void {\r\n this.removeOverlay(container);\r\n\r\n this.containerPosition = container.style.position;\r\n this.renderer.setStyle(container, 'position', 'relative');\r\n\r\n const overlayConfig = new OverlayConfig({\r\n positionStrategy: this.overlay.position().global(),\r\n hasBackdrop: false,\r\n scrollStrategy: this.overlay.scrollStrategies.reposition()\r\n });\r\n\r\n this.overlayRef = this.overlay.create(overlayConfig);\r\n\r\n if (this.overlayRef && this.overlayRef.overlayElement) {\r\n this.renderer.setStyle(this.overlayRef.overlayElement, 'width', container.offsetWidth + 'px');\r\n this.renderer.setStyle(this.overlayRef.overlayElement, 'height', container.offsetHeight + 'px');\r\n this.renderer.setStyle(\r\n this.overlayRef.overlayElement,\r\n 'border-radius',\r\n XComputedStyle(container, 'border-radius')\r\n );\r\n this.renderer.setStyle(this.overlayRef.overlayElement, 'position', 'absolute');\r\n this.renderer.setStyle(this.overlayRef.overlayElement, 'pointer-events', 'none');\r\n this.renderer.setStyle(this.overlayRef.overlayElement, 'z-index', 'none');\r\n }\r\n\r\n const portal = new ComponentPortal(XDragOverlayComponent);\r\n this.componentRef = this.overlayRef.attach(portal);\r\n this.componentRef.setInput('icon', params.icon);\r\n this.componentRef.setInput('title', params.title);\r\n this.componentRef.setInput('description', params.description);\r\n\r\n if (this.overlayRef && this.overlayRef.overlayElement) {\r\n container.appendChild(this.overlayRef.overlayElement);\r\n }\r\n }\r\n\r\n removeOverlay(container: HTMLElement): void {\r\n if (this.overlayRef) {\r\n const resizeObserver = (this.overlayRef as any).resizeObserver;\r\n if (resizeObserver) {\r\n resizeObserver.disconnect();\r\n }\r\n\r\n if (this.overlayRef.overlayElement && this.overlayRef.overlayElement.parentNode) {\r\n this.overlayRef.overlayElement.parentNode.removeChild(this.overlayRef.overlayElement);\r\n }\r\n\r\n this.renderer.setStyle(container, 'position', this.containerPosition);\r\n\r\n this.overlayRef.dispose();\r\n this.overlayRef = null;\r\n this.componentRef = null;\r\n }\r\n }\r\n}\r\n","import { HttpClient, HttpEventType, HttpRequest, HttpEvent, HttpHeaders } from '@angular/common/http';\r\nimport {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n ElementRef,\r\n ViewContainerRef,\r\n inject,\r\n viewChild,\r\n signal,\r\n computed,\r\n effect,\r\n untracked,\r\n HostBinding,\r\n Renderer2\r\n} from '@angular/core';\r\nimport { XUploadPrefix, XUploadNode, XUploadProperty, XUploadPortalPrefix } from './upload.property';\r\nimport { XIsArray, XIsEmpty, XIsTemplateRef } from '@ng-nest/ui/core';\r\nimport { map } from 'rxjs/operators';\r\nimport { XI18nService, XI18nUpload, zh_CN } from '@ng-nest/ui/i18n';\r\nimport { XPortalOverlayRef, XPortalService } from '@ng-nest/ui/portal';\r\nimport { XUploadPortalComponent } from './upload-portal.component';\r\nimport { XValueAccessor } from '@ng-nest/ui/base-form';\r\nimport { XIconComponent } from '@ng-nest/ui/icon';\r\nimport { XOutletDirective } from '@ng-nest/ui/outlet';\r\nimport { XButtonComponent } from '@ng-nest/ui/button';\r\nimport { XImageComponent, XImageGroupComponent } from '@ng-nest/ui/image';\r\nimport { XProgressComponent } from '@ng-nest/ui/progress';\r\nimport { NgTemplateOutlet } from '@angular/common';\r\nimport { toSignal } from '@angular/core/rxjs-interop';\r\nimport { fromEvent, Subscription } from 'rxjs';\r\nimport { XDragOverlayService } from './drag-overlay.service';\r\nimport { XDragOverlayComponent } from './drag-overlay.component';\r\n\r\n@Component({\r\n selector: `${XUploadPrefix}`,\r\n imports: [\r\n NgTemplateOutlet,\r\n XIconComponent,\r\n XOutletDirective,\r\n XButtonComponent,\r\n XImageGroupComponent,\r\n XImageComponent,\r\n XProgressComponent,\r\n XDragOverlayComponent\r\n ],\r\n templateUrl: './upload.component.html',\r\n styleUrls: ['./upload.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [XValueAccessor(XUploadComponent), XDragOverlayService]\r\n})\r\nexport class XUploadComponent extends XUploadProperty {\r\n private http = inject(HttpClient, { optional: true });\r\n private portalService = inject(XPortalService);\r\n private viewContainerRef = inject(ViewContainerRef);\r\n private i18n = inject(XI18nService);\r\n private renderer = inject(Renderer2);\r\n private dragOverlayService = inject(XDragOverlayService);\r\n private dropSubscription?: Subscription;\r\n private dragCounter = 0;\r\n elementRef = inject(ElementRef);\r\n\r\n @HostBinding('class.x-upload-show-drop') get getShowDrop() {\r\n return this.showDrop();\r\n }\r\n\r\n file = viewChild.required<ElementRef<HTMLInputElement>>('file');\r\n files = signal<XUploadNode[]>([]);\r\n showUpload = signal(false);\r\n uploadNodes = signal<XUploadNode[]>([]);\r\n locale = toSignal(this.i18n.localeChange.pipe(map((x) => x.upload as XI18nUpload)), { initialValue: zh_CN.upload });\r\n portal!: XPortalOverlayRef<XUploadPortalComponent>;\r\n\r\n getText = computed(() => this.text() || this.locale().uploadText);\r\n isTemplateText = computed(() => XIsTemplateRef(this.getText()));\r\n\r\n override writeValue(value: XUploadNode[]) {\r\n this.value.set(value);\r\n this.setFiles();\r\n }\r\n\r\n acceptSignal = computed(() => {\r\n if (this.type() === 'img' && XIsEmpty(this.accept())) return 'image/*';\r\n return this.accept();\r\n });\r\n\r\n constructor() {\r\n super();\r\n if (!this.http) {\r\n throw new Error(\r\n `${XUploadPrefix}: Not found 'HttpClient', You can import 'HttpClientModule' in your root module.`\r\n );\r\n }\r\n\r\n effect(() => {\r\n const container = this.dropContainer();\r\n untracked(() => {\r\n this.setupDropContainer(container);\r\n });\r\n });\r\n }\r\n\r\n ngAfterViewInit() {\r\n if (this.showDrop() && this.dropContainer()) {\r\n this.setupDropContainer(this.dropContainer());\r\n }\r\n }\r\n\r\n ngOnDestory() {\r\n if (this.dropSubscription) {\r\n this.dropSubscription.unsubscribe();\r\n }\r\n }\r\n\r\n private setupDropContainer(container: ElementRef | HTMLElement | undefined) {\r\n if (this.dropSubscription) {\r\n this.dropSubscription.unsubscribe();\r\n }\r\n\r\n if (!container) return;\r\n\r\n const element = container instanceof ElementRef ? container.nativeElement : container;\r\n\r\n const dragEnter$ = fromEvent<DragEvent>(element, 'dragenter');\r\n const dragOver$ = fromEvent<DragEvent>(element, 'dragover');\r\n const dragLeave$ = fromEvent<DragEvent>(element, 'dragleave');\r\n const drop$ = fromEvent<DragEvent>(element, 'drop');\r\n\r\n this.dropSubscription = new Subscription();\r\n\r\n this.dropSubscription.add(\r\n dragEnter$.subscribe((event) => {\r\n event.preventDefault();\r\n this.dragCounter++;\r\n if (this.dragCounter === 1) {\r\n this.addDragOverStyle(element);\r\n }\r\n })\r\n );\r\n\r\n this.dropSubscription.add(\r\n dragOver$.subscribe((event) => {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n })\r\n );\r\n\r\n this.dropSubscription.add(\r\n dragLeave$.subscribe((event) => {\r\n event.preventDefault();\r\n this.dragCounter--;\r\n if (this.dragCounter === 0) {\r\n this.removeDragOverStyle(element);\r\n }\r\n })\r\n );\r\n\r\n this.dropSubscription.add(\r\n drop$.subscribe((event) => {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n\r\n this.dragCounter = 0;\r\n this.removeDragOverStyle(element);\r\n\r\n const files = event.dataTransfer?.files;\r\n if (files && files.length > 0) {\r\n this.handleFiles(files);\r\n }\r\n })\r\n );\r\n }\r\n\r\n private addDragOverStyle(element: HTMLElement) {\r\n if (this.showDrop()) {\r\n this.renderer.addClass(this.elementRef.nativeElement, 'x-upload-drag-over');\r\n } else {\r\n const icon = this.dropIcon()!;\r\n const title = this.dropTitle()!;\r\n const description = this.dropDescription()!;\r\n this.dragOverlayService.createOverlay(element, { icon, title, description });\r\n }\r\n }\r\n\r\n private removeDragOverStyle(element: HTMLElement) {\r\n if (this.showDrop()) {\r\n this.renderer.removeClass(this.elementRef.nativeElement, 'x-upload-drag-over');\r\n } else {\r\n this.dragOverlayService.removeOverlay(element);\r\n }\r\n }\r\n\r\n setFiles() {\r\n if (!Array.isArray(this.value())) return;\r\n this.files.set(\r\n this.value().map((x: XUploadNode) => {\r\n if (!x.state) x.state = 'success';\r\n return x;\r\n })\r\n );\r\n }\r\n\r\n change(event: Event) {\r\n let input = event.target as HTMLInputElement;\r\n if (typeof input === 'undefined' || input.files?.length === 0) return;\r\n this.handleFiles(input.files!);\r\n input.value = '';\r\n }\r\n\r\n handleFiles(fileList: FileList) {\r\n let files: XUploadNode[] = [];\r\n let max = this.maxLimit() > -1 ? this.maxLimit() : fileList.length;\r\n for (let i = 0; i < max; i++) {\r\n let file: XUploadNode = fileList.item(i) as XUploadNode;\r\n file.state = 'ready';\r\n files = [...files, file];\r\n }\r\n if (files.length > 0) this.showUpload.set(true);\r\n if (this.multipleModel() === 'cover') {\r\n this.files.set(files);\r\n } else if (this.multipleModel() === 'add') {\r\n this.files.update((x) => [...x, ...files]);\r\n }\r\n this.value.set(this.files());\r\n this.onChange && this.onChange(this.value());\r\n this.onUploading();\r\n }\r\n\r\n remove(file: XUploadNode, index: number) {\r\n this.files.update((x) => {\r\n x.splice(index, 1);\r\n return [...x];\r\n });\r\n if (this.files().length === 0) this.file().nativeElement.value = '';\r\n this.showUpload.set(this.files().find((x) => x.state === 'ready') != null);\r\n const vindex = this.value().indexOf(file);\r\n if (vindex > -1) {\r\n this.value.update((x) => {\r\n x.splice(vindex, 1);\r\n return [...x];\r\n });\r\n this.onChange && this.onChange(this.value());\r\n }\r\n this.removeClick.emit({ file: file, index: index });\r\n }\r\n\r\n uploadClick() {\r\n if (this.disabledComputed()) return;\r\n this.file().nativeElement.click();\r\n }\r\n\r\n onUploading() {\r\n if (!this.action()) return;\r\n let readyFiles = this.files().filter((x) => x.state === 'ready');\r\n readyFiles.forEach((x) => {\r\n this.uploadFile(x);\r\n });\r\n }\r\n\r\n uploadFile(file: XUploadNode, index = -1) {\r\n let formData = new FormData();\r\n formData.append('file', file);\r\n const req = new HttpRequest('POST', this.action()!, formData, {\r\n reportProgress: true,\r\n responseType: 'arraybuffer',\r\n withCredentials: false,\r\n headers: new HttpHeaders(this.headers())\r\n });\r\n this.http\r\n ?.request(req)\r\n .pipe(\r\n map((event) =>\r\n this.getEventMessage(event, file, (body: BlobPart) => {\r\n let blob = new Blob([body]);\r\n let reader = new FileReader();\r\n reader.readAsText(blob, 'utf-8');\r\n reader.onload = () => {\r\n let body = [];\r\n try {\r\n body = JSON.parse(reader.result as string);\r\n if (XIsArray(body) && body.length > 0) {\r\n file.url = body[0] as string;\r\n }\r\n file.body = body;\r\n } catch (e) {\r\n console.error(e);\r\n }\r\n if (index !== -1) {\r\n this.files.update((x) => {\r\n x[index] = file;\r\n return [...x];\r\n });\r\n }\r\n this.uploadSuccess.emit(file);\r\n };\r\n })\r\n )\r\n )\r\n .subscribe({\r\n complete: () => {\r\n this.showUpload.set(this.files().find((y) => y.state === 'ready') != null);\r\n },\r\n error: () => {\r\n file.state = 'error';\r\n this.uploadError.emit(file);\r\n }\r\n });\r\n }\r\n\r\n getEventMessage(event: HttpEvent<any>, file: XUploadNode, successFunc: Function) {\r\n switch (event.type) {\r\n case HttpEventType.Sent:\r\n file.state = 'ready';\r\n this.uploadReady.emit(file);\r\n return this.locale().beginUploadText;\r\n case HttpEventType.UploadProgress:\r\n file.state = 'uploading';\r\n if (event.total) file.percent = Math.round((100 * event.loaded) / event.total);\r\n this.uploading.emit(file);\r\n return this.locale().uploadingText;\r\n case HttpEventType.Response:\r\n file.state = 'success';\r\n successFunc(event.body);\r\n return this.locale().uploadCompleted;\r\n }\r\n return;\r\n }\r\n\r\n onImgCut(file: XUploadNode, index: number) {\r\n this.portal = this.portalService.attach({\r\n content: XUploadPortalComponent,\r\n viewContainerRef: this.viewContainerRef,\r\n overlayConfig: {\r\n panelClass: [XUploadPortalPrefix],\r\n hasBackdrop: true,\r\n positionStrategy: this.portalService.setPlace('center')\r\n }\r\n });\r\n this.setInstance(file, index);\r\n }\r\n\r\n setInstance(file: XUploadNode, index: number) {\r\n let componentRef = this.portal?.componentRef;\r\n if (!componentRef) return;\r\n componentRef.setInput('file', file);\r\n const { closePortal, surePortal } = componentRef.instance;\r\n closePortal.subscribe(() => this.closePortal());\r\n surePortal.subscribe((blob) => {\r\n const fl = new File([blob], file.name, { type: blob.type }) as XUploadNode;\r\n fl.state = 'ready';\r\n this.uploadFile(fl, index);\r\n });\r\n }\r\n\r\n portalAttached() {\r\n return this.portal?.overlayRef?.hasAttached();\r\n }\r\n\r\n closePortal() {\r\n if (this.portalAttached()) {\r\n this.portal?.overlayRef?.detach();\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n imgError(_event: ErrorEvent, file: XUploadNode) {\r\n file.state = 'error';\r\n }\r\n imgLoad(file: XUploadNode) {\r\n file.state = 'success';\r\n }\r\n}\r\n","<div #upload class=\"x-upload x-upload-{{ type() }}\" [class.x-disabled]=\"disabledComputed()\">\r\n <input\r\n class=\"x-upload-input\"\r\n type=\"file\"\r\n #file\r\n (change)=\"change($event)\"\r\n [attr.accept]=\"acceptSignal()\"\r\n [multiple]=\"multiple()\"\r\n style=\"display: none\"\r\n />\r\n\r\n @switch (type()) {\r\n @case ('list') {\r\n <ng-container *ngTemplateOutlet=\"uploadBtnTpl\"></ng-container>\r\n <ng-container *xOutlet=\"filesTpl(); context: { $files: files() }\">\r\n @if (files() && files().length > 0) {\r\n <ul class=\"x-upload-files\">\r\n @for (file of files(); track file; let i = $index) {\r\n <li [class.x-upload-disabled]=\"!download()\">\r\n @if (download()) {\r\n <a [href]=\"file.url\" target=\"_blank\" [title]=\"file.name\">\r\n <x-icon type=\"fto-file-text\"></x-icon>\r\n <span class=\"x-upload-filename\">{{ file.name }}</span>\r\n </a>\r\n } @else {\r\n <a>\r\n <x-icon type=\"fto-file-text\"></x-icon>\r\n <span class=\"x-upload-filename\">{{ file.name }}</span>\r\n </a>\r\n }\r\n\r\n @switch (file.state) {\r\n @case ('ready') {\r\n <x-icon class=\"x-upload-state\" type=\"fto-clock\"></x-icon>\r\n }\r\n @case ('uploading') {\r\n <span class=\"x-upload-percent\">{{ file.percent }}%</span>\r\n }\r\n @case ('success') {\r\n <x-icon class=\"x-upload-state success\" type=\"fto-check\"></x-icon>\r\n }\r\n @case ('error') {\r\n <x-icon class=\"x-upload-state error\" type=\"fto-info\"></x-icon>\r\n }\r\n }\r\n @if (file.state !== 'uploading') {\r\n <x-button icon=\"fto-x\" (click)=\"remove(file, i)\" closable onlyIcon flat size=\"mini\"></x-button>\r\n }\r\n </li>\r\n }\r\n </ul>\r\n }\r\n </ng-container>\r\n }\r\n @case ('img') {\r\n <x-image-group>\r\n @for (file of files(); track file; let i = $index) {\r\n <x-image\r\n [src]=\"file.url\"\r\n (load)=\"imgLoad(file)\"\r\n (error)=\"imgError($event, file)\"\r\n class=\"{{ file.state }}\"\r\n [previewTpl]=\"previewTpl\"\r\n [fallback]=\"imgFallback()\"\r\n >\r\n </x-image>\r\n <ng-template #previewTpl let-image=\"$image\">\r\n @if (file.state == 'uploading') {\r\n <div class=\"x-upload-uploading\">\r\n <x-progress [percent]=\"file.percent!\" info=\"false\"></x-progress>\r\n </div>\r\n }\r\n <div class=\"x-image-overlay\">\r\n @switch (file.state) {\r\n @case ('ready') {\r\n <x-icon class=\"x-upload-state\" type=\"fto-clock\"></x-icon>\r\n }\r\n @case ('success') {\r\n <x-icon type=\"fto-eye\" (click)=\"image.onPreview()\"></x-icon>\r\n }\r\n }\r\n @if (imgCut() && file.state === 'success') {\r\n <x-icon type=\"fto-crop\" (click)=\"onImgCut(file, i)\"></x-icon>\r\n }\r\n @if (file.state !== 'uploading') {\r\n <x-icon type=\"fto-trash-2\" (click)=\"remove(file, i)\"></x-icon>\r\n }\r\n </div>\r\n </ng-template>\r\n }\r\n <ng-container *ngTemplateOutlet=\"uploadBtnTpl\"></ng-container>\r\n </x-image-group>\r\n }\r\n }\r\n</div>\r\n\r\n<ng-template #uploadBtnTpl>\r\n @if (showDrop()) {\r\n <x-drag-overlay\r\n class=\"x-upload-drag-overlay\"\r\n (click)=\"uploadClick()\"\r\n [icon]=\"dropIcon()\"\r\n [title]=\"dropTitle()\"\r\n [description]=\"dropDescription()\"\r\n ></x-drag-overlay>\r\n } @else {\r\n <div class=\"x-upload-buttons\" [class.x-upload-buttons-template]=\"isTemplateText()\" (click)=\"uploadClick()\">\r\n <ng-container *xOutlet=\"getText()\">\r\n <x-button icon=\"fto-upload\" class=\"x-upload-text\" [disabled]=\"disabledComputed()\" type=\"primary\">{{\r\n getText()\r\n }}</x-button>\r\n </ng-container>\r\n </div>\r\n }\r\n</ng-template>\r\n","import { NgModule } from '@angular/core';\r\nimport { XUploadComponent } from './upload.component';\r\n\r\n@NgModule({\r\n exports: [XUploadComponent],\r\n imports: [XUploadComponent]\r\n})\r\nexport class XUploadModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["DOCUMENT"],"mappings":";;;;;;;;;;;;;;;;;;;AAIA;;;;AAIG;AACI,MAAM,aAAa,GAAG;AAC7B,MAAM,oBAAoB,GAAG,QAAQ;AAErC;;AAEG;MAEU,eAAgB,SAAQ,oBAAoB,CAAC,oBAAoB,CAAC,CAAA;AAD/E,IAAA,WAAA,GAAA;;AAEE;;;AAGG;QACM,IAAA,CAAA,IAAI,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAa;AAClC;;;AAGG;QACM,IAAA,CAAA,MAAM,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,QAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;AACjC;;;AAGG;QACM,IAAA,CAAA,aAAa,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,eAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAA4B;AAC1D;;;AAGG;QACM,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,UAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAa;AACtC;;;AAGG;QACM,IAAA,CAAA,SAAS,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,WAAA,EAAA,CAAA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gBAAgB;wBAChB,cAAc;wBACd,gBAAgB;wBAChB,gBAAgB;wBAChB,oBAAoB;wBACpB,eAAe;wBACf,kBAAkB;wBAClB;AACD,qBAAA,EAAA,aAAA,EAGc,iBAAiB,CAAC,IAAI,EAAA,eAAA,EACpB,uBAAuB,CAAC,MAAM,EAAA,SAAA,EACpC,CAAC,cAAc,CAAA,gBAAA,CAAkB,EAAE,mBAAmB,CAAC,EAAA,QAAA,EAAA,u/IAAA,EAAA,MAAA,EAAA,CAAA,mnGAAA,CAAA,EAAA;wDAarB,WAAW,EAAA,CAAA;sBAAvD,WAAW;uBAAC,0BAA0B;;;MExD5B,aAAa,CAAA;iIAAb,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;kIAAb,aAAa,EAAA,OAAA,EAAA,CAFd,gBAAgB,CAAA,EAAA,OAAA,EAAA,CADhB,gBAAgB,CAAA,EAAA,CAAA,CAAA;AAGf,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,YAFd,gBAAgB,CAAA,EAAA,CAAA,CAAA;;2FAEf,aAAa,EAAA,UAAA,EAAA,CAAA;kBAJzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,gBAAgB,CAAC;oBAC3B,OAAO,EAAE,CAAC,gBAAgB;AAC3B,iBAAA;;;ACND;;AAEG;;;;"}
@@ -80,6 +80,10 @@ export * from '@ng-nest/ui/bubble';
80
80
  export * from '@ng-nest/ui/sender';
81
81
  export * from '@ng-nest/ui/coversations';
82
82
  export * from '@ng-nest/ui/welcome';
83
+ export * from '@ng-nest/ui/prompts';
84
+ export * from '@ng-nest/ui/attachments';
85
+ export * from '@ng-nest/ui/suggestion';
86
+ export * from '@ng-nest/ui/thought-chain';
83
87
  export * from '@ng-nest/ui/doc';
84
88
  export * from '@ng-nest/ui/examples';
85
89
  export * from '@ng-nest/ui/api';
@@ -1 +1 @@
1
- {"version":3,"file":"ng-nest-ui.mjs","sources":["../../../../lib/ng-nest/ui/index.ts","../../../../lib/ng-nest/ui/ng-nest-ui.ts"],"sourcesContent":["/**\r\n * Core\r\n */\r\nexport * from '@ng-nest/ui/core';\r\n\r\n/**\r\n * Basic\r\n */\r\nexport * from '@ng-nest/ui/button';\r\nexport * from '@ng-nest/ui/color';\r\nexport * from '@ng-nest/ui/container';\r\nexport * from '@ng-nest/ui/layout';\r\nexport * from '@ng-nest/ui/icon';\r\nexport * from '@ng-nest/ui/i18n';\r\nexport * from '@ng-nest/ui/link';\r\nexport * from '@ng-nest/ui/theme';\r\n\r\n/**\r\n * Data\r\n */\r\nexport * from '@ng-nest/ui/avatar';\r\nexport * from '@ng-nest/ui/badge';\r\nexport * from '@ng-nest/ui/card';\r\nexport * from '@ng-nest/ui/carousel';\r\nexport * from '@ng-nest/ui/collapse';\r\nexport * from '@ng-nest/ui/calendar';\r\nexport * from '@ng-nest/ui/comment';\r\nexport * from '@ng-nest/ui/description';\r\nexport * from '@ng-nest/ui/empty';\r\nexport * from '@ng-nest/ui/image';\r\nexport * from '@ng-nest/ui/outlet';\r\nexport * from '@ng-nest/ui/pagination';\r\nexport * from '@ng-nest/ui/progress';\r\nexport * from '@ng-nest/ui/ripple';\r\nexport * from '@ng-nest/ui/resizable';\r\nexport * from '@ng-nest/ui/drag';\r\nexport * from '@ng-nest/ui/statistic';\r\nexport * from '@ng-nest/ui/table';\r\nexport * from '@ng-nest/ui/table-view';\r\nexport * from '@ng-nest/ui/tag';\r\nexport * from '@ng-nest/ui/text-retract';\r\nexport * from '@ng-nest/ui/time-ago';\r\nexport * from '@ng-nest/ui/time-range';\r\nexport * from '@ng-nest/ui/timeline';\r\nexport * from '@ng-nest/ui/tree';\r\nexport * from '@ng-nest/ui/tree-file';\r\nexport * from '@ng-nest/ui/keyword';\r\n\r\n/**\r\n * Feedback\r\n */\r\nexport * from '@ng-nest/ui/alert';\r\nexport * from '@ng-nest/ui/dialog';\r\nexport * from '@ng-nest/ui/drawer';\r\nexport * from '@ng-nest/ui/loading';\r\nexport * from '@ng-nest/ui/message';\r\nexport * from '@ng-nest/ui/message-box';\r\nexport * from '@ng-nest/ui/notification';\r\nexport * from '@ng-nest/ui/popconfirm';\r\nexport * from '@ng-nest/ui/popover';\r\nexport * from '@ng-nest/ui/result';\r\nexport * from '@ng-nest/ui/skeleton';\r\nexport * from '@ng-nest/ui/tooltip';\r\n\r\n/**\r\n * Form\r\n */\r\nexport * from '@ng-nest/ui/auto-complete';\r\nexport * from '@ng-nest/ui/base-form';\r\nexport * from '@ng-nest/ui/cascade';\r\nexport * from '@ng-nest/ui/checkbox';\r\nexport * from '@ng-nest/ui/color-picker';\r\nexport * from '@ng-nest/ui/date-picker';\r\nexport * from '@ng-nest/ui/form';\r\nexport * from '@ng-nest/ui/find';\r\nexport * from '@ng-nest/ui/input';\r\nexport * from '@ng-nest/ui/input-number';\r\nexport * from '@ng-nest/ui/list';\r\nexport * from '@ng-nest/ui/radio';\r\nexport * from '@ng-nest/ui/rate';\r\nexport * from '@ng-nest/ui/select';\r\nexport * from '@ng-nest/ui/slider-select';\r\nexport * from '@ng-nest/ui/switch';\r\nexport * from '@ng-nest/ui/time-picker';\r\nexport * from '@ng-nest/ui/transfer';\r\nexport * from '@ng-nest/ui/tree-select';\r\nexport * from '@ng-nest/ui/textarea';\r\nexport * from '@ng-nest/ui/upload';\r\n\r\n/**\r\n * Navigation\r\n */\r\nexport * from '@ng-nest/ui/affix';\r\nexport * from '@ng-nest/ui/anchor';\r\nexport * from '@ng-nest/ui/back-top';\r\nexport * from '@ng-nest/ui/crumb';\r\nexport * from '@ng-nest/ui/dropdown';\r\nexport * from '@ng-nest/ui/menu';\r\nexport * from '@ng-nest/ui/page-header';\r\nexport * from '@ng-nest/ui/steps';\r\nexport * from '@ng-nest/ui/tabs';\r\n\r\n/**\r\n * AI\r\n */\r\nexport * from '@ng-nest/ui/bubble';\r\nexport * from '@ng-nest/ui/sender';\r\nexport * from '@ng-nest/ui/coversations';\r\nexport * from '@ng-nest/ui/welcome';\r\n\r\n/**\r\n * Others\r\n */\r\nexport * from '@ng-nest/ui/doc';\r\nexport * from '@ng-nest/ui/examples';\r\nexport * from '@ng-nest/ui/api';\r\nexport * from '@ng-nest/ui/pattern';\r\nexport * from '@ng-nest/ui/slider';\r\nexport * from '@ng-nest/ui/scrollable';\r\nexport * from '@ng-nest/ui/highlight';\r\nexport * from '@ng-nest/ui/inner';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAEG;;ACFH;;AAEG"}
1
+ {"version":3,"file":"ng-nest-ui.mjs","sources":["../../../../lib/ng-nest/ui/index.ts","../../../../lib/ng-nest/ui/ng-nest-ui.ts"],"sourcesContent":["/**\r\n * Core\r\n */\r\nexport * from '@ng-nest/ui/core';\r\n\r\n/**\r\n * Basic\r\n */\r\nexport * from '@ng-nest/ui/button';\r\nexport * from '@ng-nest/ui/color';\r\nexport * from '@ng-nest/ui/container';\r\nexport * from '@ng-nest/ui/layout';\r\nexport * from '@ng-nest/ui/icon';\r\nexport * from '@ng-nest/ui/i18n';\r\nexport * from '@ng-nest/ui/link';\r\nexport * from '@ng-nest/ui/theme';\r\n\r\n/**\r\n * Data\r\n */\r\nexport * from '@ng-nest/ui/avatar';\r\nexport * from '@ng-nest/ui/badge';\r\nexport * from '@ng-nest/ui/card';\r\nexport * from '@ng-nest/ui/carousel';\r\nexport * from '@ng-nest/ui/collapse';\r\nexport * from '@ng-nest/ui/calendar';\r\nexport * from '@ng-nest/ui/comment';\r\nexport * from '@ng-nest/ui/description';\r\nexport * from '@ng-nest/ui/empty';\r\nexport * from '@ng-nest/ui/image';\r\nexport * from '@ng-nest/ui/outlet';\r\nexport * from '@ng-nest/ui/pagination';\r\nexport * from '@ng-nest/ui/progress';\r\nexport * from '@ng-nest/ui/ripple';\r\nexport * from '@ng-nest/ui/resizable';\r\nexport * from '@ng-nest/ui/drag';\r\nexport * from '@ng-nest/ui/statistic';\r\nexport * from '@ng-nest/ui/table';\r\nexport * from '@ng-nest/ui/table-view';\r\nexport * from '@ng-nest/ui/tag';\r\nexport * from '@ng-nest/ui/text-retract';\r\nexport * from '@ng-nest/ui/time-ago';\r\nexport * from '@ng-nest/ui/time-range';\r\nexport * from '@ng-nest/ui/timeline';\r\nexport * from '@ng-nest/ui/tree';\r\nexport * from '@ng-nest/ui/tree-file';\r\nexport * from '@ng-nest/ui/keyword';\r\n\r\n/**\r\n * Feedback\r\n */\r\nexport * from '@ng-nest/ui/alert';\r\nexport * from '@ng-nest/ui/dialog';\r\nexport * from '@ng-nest/ui/drawer';\r\nexport * from '@ng-nest/ui/loading';\r\nexport * from '@ng-nest/ui/message';\r\nexport * from '@ng-nest/ui/message-box';\r\nexport * from '@ng-nest/ui/notification';\r\nexport * from '@ng-nest/ui/popconfirm';\r\nexport * from '@ng-nest/ui/popover';\r\nexport * from '@ng-nest/ui/result';\r\nexport * from '@ng-nest/ui/skeleton';\r\nexport * from '@ng-nest/ui/tooltip';\r\n\r\n/**\r\n * Form\r\n */\r\nexport * from '@ng-nest/ui/auto-complete';\r\nexport * from '@ng-nest/ui/base-form';\r\nexport * from '@ng-nest/ui/cascade';\r\nexport * from '@ng-nest/ui/checkbox';\r\nexport * from '@ng-nest/ui/color-picker';\r\nexport * from '@ng-nest/ui/date-picker';\r\nexport * from '@ng-nest/ui/form';\r\nexport * from '@ng-nest/ui/find';\r\nexport * from '@ng-nest/ui/input';\r\nexport * from '@ng-nest/ui/input-number';\r\nexport * from '@ng-nest/ui/list';\r\nexport * from '@ng-nest/ui/radio';\r\nexport * from '@ng-nest/ui/rate';\r\nexport * from '@ng-nest/ui/select';\r\nexport * from '@ng-nest/ui/slider-select';\r\nexport * from '@ng-nest/ui/switch';\r\nexport * from '@ng-nest/ui/time-picker';\r\nexport * from '@ng-nest/ui/transfer';\r\nexport * from '@ng-nest/ui/tree-select';\r\nexport * from '@ng-nest/ui/textarea';\r\nexport * from '@ng-nest/ui/upload';\r\n\r\n/**\r\n * Navigation\r\n */\r\nexport * from '@ng-nest/ui/affix';\r\nexport * from '@ng-nest/ui/anchor';\r\nexport * from '@ng-nest/ui/back-top';\r\nexport * from '@ng-nest/ui/crumb';\r\nexport * from '@ng-nest/ui/dropdown';\r\nexport * from '@ng-nest/ui/menu';\r\nexport * from '@ng-nest/ui/page-header';\r\nexport * from '@ng-nest/ui/steps';\r\nexport * from '@ng-nest/ui/tabs';\r\n\r\n/**\r\n * AI\r\n */\r\nexport * from '@ng-nest/ui/bubble';\r\nexport * from '@ng-nest/ui/sender';\r\nexport * from '@ng-nest/ui/coversations';\r\nexport * from '@ng-nest/ui/welcome';\r\nexport * from '@ng-nest/ui/prompts';\r\nexport * from '@ng-nest/ui/attachments';\r\nexport * from '@ng-nest/ui/suggestion';\r\nexport * from '@ng-nest/ui/thought-chain';\r\n\r\n/**\r\n * Others\r\n */\r\nexport * from '@ng-nest/ui/doc';\r\nexport * from '@ng-nest/ui/examples';\r\nexport * from '@ng-nest/ui/api';\r\nexport * from '@ng-nest/ui/pattern';\r\nexport * from '@ng-nest/ui/slider';\r\nexport * from '@ng-nest/ui/scrollable';\r\nexport * from '@ng-nest/ui/highlight';\r\nexport * from '@ng-nest/ui/inner';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAEG;;ACFH;;AAEG"}
package/index.d.ts CHANGED
@@ -80,6 +80,10 @@ export * from '@ng-nest/ui/bubble';
80
80
  export * from '@ng-nest/ui/sender';
81
81
  export * from '@ng-nest/ui/coversations';
82
82
  export * from '@ng-nest/ui/welcome';
83
+ export * from '@ng-nest/ui/prompts';
84
+ export * from '@ng-nest/ui/attachments';
85
+ export * from '@ng-nest/ui/suggestion';
86
+ export * from '@ng-nest/ui/thought-chain';
83
87
  export * from '@ng-nest/ui/doc';
84
88
  export * from '@ng-nest/ui/examples';
85
89
  export * from '@ng-nest/ui/api';
package/list/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { TemplateRef, ElementRef, OnChanges, QueryList, SimpleChanges, InjectionToken, OnDestroy } from '@angular/core';
2
+ import { ElementRef, TemplateRef, OnChanges, QueryList, SimpleChanges, InjectionToken, OnDestroy } from '@angular/core';
3
3
  import * as rxjs from 'rxjs';
4
4
  import { Subscription } from 'rxjs';
5
5
  import * as _ng_nest_ui_core from '@ng-nest/ui/core';
@@ -9,6 +9,23 @@ import { Highlightable, ActiveDescendantKeyManager } from '@angular/cdk/a11y';
9
9
  import { XI18nList } from '@ng-nest/ui/i18n';
10
10
  import { CdkVirtualScrollViewport } from '@angular/cdk/scrolling';
11
11
 
12
+ declare class XListOptionComponent extends XListOptionProperty implements Highlightable {
13
+ role: string;
14
+ elementRef: ElementRef<any>;
15
+ classMap: _angular_core.Signal<{}>;
16
+ disabled: boolean;
17
+ nodeStyleComputed: _angular_core.Signal<{
18
+ [x: string]: any;
19
+ }>;
20
+ constructor();
21
+ ngOnDestroy(): void;
22
+ setActiveStyles(): void;
23
+ setInactiveStyles(): void;
24
+ getLabel(): string;
25
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<XListOptionComponent, never>;
26
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<XListOptionComponent, "x-list-option", never, {}, {}, never, never, true, never>;
27
+ }
28
+
12
29
  /**
13
30
  * List
14
31
  * @selector x-list
@@ -135,6 +152,11 @@ declare class XListProperty extends XListProperty_base {
135
152
  * @en_US Rolling area element
136
153
  */
137
154
  readonly scrollElement: _angular_core.InputSignal<HTMLElement | undefined>;
155
+ /**
156
+ * @zh_CN 是否使用键盘控制
157
+ * @en_US Whether to use keyboard control
158
+ */
159
+ readonly isKeyboardControlled: _angular_core.InputSignalWithTransform<boolean, XBoolean>;
138
160
  /**
139
161
  * @zh_CN 加载更多
140
162
  * @en_US load more
@@ -233,7 +255,7 @@ declare class XListProperty extends XListProperty_base {
233
255
  */
234
256
  readonly size: _angular_core.InputSignal<XSize>;
235
257
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<XListProperty, never>;
236
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<XListProperty, "x-list-property", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "selectAll": { "alias": "selectAll"; "required": false; "isSignal": true; }; "selectAllText": { "alias": "selectAllText"; "required": false; "isSignal": true; }; "checked": { "alias": "checked"; "required": false; "isSignal": true; }; "drag": { "alias": "drag"; "required": false; "isSignal": true; }; "objectArray": { "alias": "objectArray"; "required": false; "isSignal": true; }; "nodeTpl": { "alias": "nodeTpl"; "required": false; "isSignal": true; }; "nodeStyle": { "alias": "nodeStyle"; "required": false; "isSignal": true; }; "groupTpl": { "alias": "groupTpl"; "required": false; "isSignal": true; }; "header": { "alias": "header"; "required": false; "isSignal": true; }; "footer": { "alias": "footer"; "required": false; "isSignal": true; }; "scrollElement": { "alias": "scrollElement"; "required": false; "isSignal": true; }; "loadMore": { "alias": "loadMore"; "required": false; "isSignal": true; }; "loadMoreText": { "alias": "loadMoreText"; "required": false; "isSignal": true; }; "loadingMoreText": { "alias": "loadingMoreText"; "required": false; "isSignal": true; }; "virtualScroll": { "alias": "virtualScroll"; "required": false; "isSignal": true; }; "scrollHeight": { "alias": "scrollHeight"; "required": false; "isSignal": true; }; "heightAdaption": { "alias": "heightAdaption"; "required": false; "isSignal": true; }; "minBufferPx": { "alias": "minBufferPx"; "required": false; "isSignal": true; }; "maxBufferPx": { "alias": "maxBufferPx"; "required": false; "isSignal": true; }; "keywordText": { "alias": "keywordText"; "required": false; "isSignal": true; }; "caseSensitive": { "alias": "caseSensitive"; "required": false; "isSignal": true; }; "inPortal": { "alias": "inPortal"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, { "onSelectAll": "onSelectAll"; "nodeMouseenter": "nodeMouseenter"; "nodeMouseleave": "nodeMouseleave"; "nodeClick": "nodeClick"; "dropListDropped": "dropListDropped"; "keyManagerTabOut": "keyManagerTabOut"; "keyManagerChange": "keyManagerChange"; }, never, never, true, never>;
258
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<XListProperty, "x-list-property", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "selectAll": { "alias": "selectAll"; "required": false; "isSignal": true; }; "selectAllText": { "alias": "selectAllText"; "required": false; "isSignal": true; }; "checked": { "alias": "checked"; "required": false; "isSignal": true; }; "drag": { "alias": "drag"; "required": false; "isSignal": true; }; "objectArray": { "alias": "objectArray"; "required": false; "isSignal": true; }; "nodeTpl": { "alias": "nodeTpl"; "required": false; "isSignal": true; }; "nodeStyle": { "alias": "nodeStyle"; "required": false; "isSignal": true; }; "groupTpl": { "alias": "groupTpl"; "required": false; "isSignal": true; }; "header": { "alias": "header"; "required": false; "isSignal": true; }; "footer": { "alias": "footer"; "required": false; "isSignal": true; }; "scrollElement": { "alias": "scrollElement"; "required": false; "isSignal": true; }; "isKeyboardControlled": { "alias": "isKeyboardControlled"; "required": false; "isSignal": true; }; "loadMore": { "alias": "loadMore"; "required": false; "isSignal": true; }; "loadMoreText": { "alias": "loadMoreText"; "required": false; "isSignal": true; }; "loadingMoreText": { "alias": "loadingMoreText"; "required": false; "isSignal": true; }; "virtualScroll": { "alias": "virtualScroll"; "required": false; "isSignal": true; }; "scrollHeight": { "alias": "scrollHeight"; "required": false; "isSignal": true; }; "heightAdaption": { "alias": "heightAdaption"; "required": false; "isSignal": true; }; "minBufferPx": { "alias": "minBufferPx"; "required": false; "isSignal": true; }; "maxBufferPx": { "alias": "maxBufferPx"; "required": false; "isSignal": true; }; "keywordText": { "alias": "keywordText"; "required": false; "isSignal": true; }; "caseSensitive": { "alias": "caseSensitive"; "required": false; "isSignal": true; }; "inPortal": { "alias": "inPortal"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, { "onSelectAll": "onSelectAll"; "nodeMouseenter": "nodeMouseenter"; "nodeMouseleave": "nodeMouseleave"; "nodeClick": "nodeClick"; "dropListDropped": "dropListDropped"; "keyManagerTabOut": "keyManagerTabOut"; "keyManagerChange": "keyManagerChange"; }, never, never, true, never>;
237
259
  }
238
260
  /**
239
261
  * @zh_CN List 数据对象
@@ -290,6 +312,11 @@ interface XListNode extends XParentIdentityProperty<XListNode> {
290
312
  * @en_US Group node
291
313
  */
292
314
  groupable?: boolean;
315
+ /**
316
+ * @zh_CN 对应的节点组件
317
+ * @en_US List option component
318
+ */
319
+ component?: XListOptionComponent;
293
320
  }
294
321
  /**
295
322
  * List Option
@@ -423,22 +450,6 @@ type XListDragDrop = {
423
450
  event: CdkDragDrop<XListNode[]>;
424
451
  };
425
452
 
426
- declare class XListOptionComponent extends XListOptionProperty implements Highlightable {
427
- role: string;
428
- elementRef: ElementRef<any>;
429
- classMap: _angular_core.Signal<{}>;
430
- disabled: boolean;
431
- nodeStyleComputed: _angular_core.Signal<{
432
- [x: string]: any;
433
- }>;
434
- constructor();
435
- setActiveStyles(): void;
436
- setInactiveStyles(): void;
437
- getLabel(): string;
438
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<XListOptionComponent, never>;
439
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<XListOptionComponent, "x-list-option", never, {}, {}, never, never, true, never>;
440
- }
441
-
442
453
  declare class XListComponent extends XListProperty implements OnChanges {
443
454
  private unSubject;
444
455
  private i18n;
@@ -468,6 +479,7 @@ declare class XListComponent extends XListProperty implements OnChanges {
468
479
  "x-list-group": boolean;
469
480
  }>;
470
481
  sizeChange: Subscription | null;
482
+ activeNode: _angular_core.WritableSignal<XListNode | null>;
471
483
  private resizeObserver;
472
484
  role: string;
473
485
  tabindex: number;