@ng-nest/ui 14.0.13 → 14.0.14

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.
@@ -1 +1 @@
1
- {"version":3,"file":"ng-nest-ui-tree-file.mjs","sources":["../../../../lib/ng-nest/ui/tree-file/tree-file.property.ts","../../../../lib/ng-nest/ui/tree-file/tree-file.component.ts","../../../../lib/ng-nest/ui/tree-file/tree-file.component.html","../../../../lib/ng-nest/ui/tree-file/tree-file.module.ts","../../../../lib/ng-nest/ui/tree-file/ng-nest-ui-tree-file.ts"],"sourcesContent":["import { XDataConvert, XData, XInputBoolean, XBoolean, XInputNumber, XNumber, XWithConfig } from '@ng-nest/ui/core';\r\nimport { Component, Input } from '@angular/core';\r\nimport { XTreeNode, XTreeProperty } from '@ng-nest/ui/tree';\r\nimport { XCrumbNode } from '@ng-nest/ui/crumb';\r\nimport { XHighlightLines } from '@ng-nest/ui/highlight';\r\n\r\n/**\r\n * TreeFile\r\n * @selector x-tree-file\r\n * @decorator component\r\n */\r\nexport const XTreeFilePrefix = 'x-tree-file';\r\nconst X_CONFIG_NAME = 'treeFile';\r\n\r\n/**\r\n * TreeFile Property\r\n */\r\n@Component({ template: '' })\r\nexport class XTreeFileProperty extends XTreeProperty {\r\n /**\r\n * @zh_CN 节点数据\r\n * @en_US Node data\r\n */\r\n @Input() @XDataConvert() override data: XData<XTreeFileNode> = [];\r\n /**\r\n * @zh_CN 文件绝对路径地址前缀,为空表示取当前运行的地址\r\n * @en_US File absolute path address prefix, empty means to take the address of the current operation\r\n */\r\n @Input() domain: string = '';\r\n /**\r\n * @zh_CN 切换状态\r\n * @en_US Switch state\r\n */\r\n @Input() @XInputBoolean() toggle: XBoolean = true;\r\n /**\r\n * @zh_CN 显示切换按钮\r\n * @en_US Show toggle button\r\n */\r\n @Input() @XInputBoolean() showToggle: XBoolean = true;\r\n /**\r\n * @zh_CN 显示树,为 true 的时候隐藏切换按钮\r\n * @en_US Show the tree, hide the toggle button when true\r\n */\r\n @Input() @XInputBoolean() showTree: XBoolean = true;\r\n /**\r\n * @zh_CN 显示面包屑\r\n * @en_US Show breadcrumbs\r\n */\r\n @Input() @XInputBoolean() showCrumb: XBoolean = true;\r\n /**\r\n * @zh_CN 最大高度,单位 rem\r\n * @en_US Maximum height, unit rem\r\n */\r\n @Input() @XWithConfig<XNumber>(X_CONFIG_NAME, 37.5) @XInputNumber() maxHeight?: XNumber;\r\n /**\r\n * @zh_CN 单位间距,这个与层级的乘积算出节点的左边距,单位 rem\r\n * @en_US Unit spacing, the product of this and the level calculates the left margin of the node, the unit is rem\r\n */\r\n @Input() @XWithConfig<XNumber>(X_CONFIG_NAME, 0.5) @XInputNumber() override spacing?: XNumber;\r\n}\r\n\r\n/**\r\n * @zh_CN TreeFile 数据对象\r\n * @en_US TreeFile data object\r\n */\r\nexport interface XTreeFileNode extends XTreeNode {\r\n /**\r\n * @zh_CN 子节点\r\n * @en_US Child node\r\n */\r\n children?: XTreeFileNode[];\r\n /**\r\n * @zh_CN 文件内容\r\n * @en_US Document content\r\n */\r\n content?: string;\r\n /**\r\n * @zh_CN 文件类型\r\n * @en_US File type\r\n */\r\n type?: string;\r\n /**\r\n * @zh_CN 文件分类\r\n * @en_US File classification\r\n */\r\n fileType?: XTreeFileType;\r\n /**\r\n * @zh_CN 文件地址,配置了地址将从 url 中加载文件内容\r\n * @en_US File address, the configured address will load the file content from url\r\n */\r\n url?: string;\r\n /**\r\n * @zh_CN 文件的面包屑数据\r\n * @en_US Breadcrumb data\r\n */\r\n crumbData?: XCrumbNode[];\r\n /**\r\n * @zh_CN 文件内容已经加载过\r\n * @en_US File content has been loaded\r\n */\r\n contentLoaded?: boolean;\r\n /**\r\n * @zh_CN 行高亮着色\r\n * @en_US Line highlight coloring\r\n */\r\n highlightLines?: XHighlightLines;\r\n}\r\n\r\n/**\r\n * @zh_CN 文件分类\r\n * @en_US File classification\r\n */\r\nexport type XTreeFileType = 'code' | 'img';\r\n\r\n/**\r\n * @zh_CN 支持显示的图片格式\r\n * @en_US Supported picture format\r\n */\r\nexport const XTreeFileImgs = ['webp', 'png', 'jpg', 'gif', 'jpeg', 'ico'];\r\n","import { Component, ViewEncapsulation, Renderer2, ElementRef, ChangeDetectorRef, ChangeDetectionStrategy } from '@angular/core';\r\nimport { XTreeFilePrefix, XTreeFileProperty, XTreeFileNode, XTreeFileImgs } from './tree-file.property';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { XIsEmpty, XConfigService } from '@ng-nest/ui/core';\r\nimport { XCrumbNode } from '@ng-nest/ui/crumb';\r\nimport { delay } from 'rxjs/operators';\r\nimport { XHighlightLines } from '@ng-nest/ui/highlight';\r\n\r\n@Component({\r\n selector: `${XTreeFilePrefix}`,\r\n templateUrl: './tree-file.component.html',\r\n styleUrls: ['./tree-file.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XTreeFileComponent extends XTreeFileProperty {\r\n activatedNode?: XTreeFileNode;\r\n loading: boolean = false;\r\n time!: number;\r\n timeout: number = 200;\r\n\r\n get catalogHeight() {\r\n return Number(this.maxHeight);\r\n }\r\n\r\n get codeHeight() {\r\n return Number(this.maxHeight) - (Boolean(this.showCrumb) ? 1.5 : 0);\r\n }\r\n\r\n get getCrumbData() {\r\n return this.activatedNode?.crumbData as XCrumbNode[];\r\n }\r\n\r\n get getHighlightLines() {\r\n return this.activatedNode?.highlightLines as XHighlightLines;\r\n }\r\n\r\n constructor(\r\n public renderer: Renderer2,\r\n public elementRef: ElementRef,\r\n public cdr: ChangeDetectorRef,\r\n public http: HttpClient,\r\n public configService: XConfigService\r\n ) {\r\n super();\r\n }\r\n\r\n ngOnInit() {\r\n if (!this.showTree && this.activatedId) {\r\n this.catalogChange((this.data as XTreeFileNode[]).find((x) => x.id == this.activatedId) as XTreeFileNode);\r\n }\r\n }\r\n\r\n catalogChange(node: XTreeFileNode) {\r\n if (node?.leaf) return;\r\n if (node.url && !node.contentLoaded) {\r\n this.time = new Date().getTime();\r\n this.loading = true;\r\n this.cdr.detectChanges();\r\n this.activatedNode = node;\r\n node.fileType = XTreeFileImgs.indexOf((node.type as string).toLowerCase()) !== -1 ? 'img' : 'code';\r\n node.crumbData = this.setCurmbData(node);\r\n node.url = node.url?.indexOf(this.domain) === 0 ? node.url : `${this.domain}/${node.url}`;\r\n switch (node.fileType) {\r\n case 'code':\r\n this.http\r\n .get(node.url, { responseType: 'text' })\r\n .pipe(delay(new Date().getTime() - this.time > this.timeout ? 0 : this.timeout - new Date().getTime() + this.time))\r\n .subscribe((x) => {\r\n node.content = x;\r\n node.contentLoaded = true;\r\n this.loading = false;\r\n this.cdr.detectChanges();\r\n });\r\n break;\r\n case 'img':\r\n this.cdr.detectChanges();\r\n break;\r\n }\r\n } else {\r\n this.activatedNode = node;\r\n this.cdr.detectChanges();\r\n }\r\n }\r\n\r\n imgOnload() {\r\n this.loading = false;\r\n this.cdr.detectChanges();\r\n }\r\n\r\n setCurmbData(node: XTreeFileNode) {\r\n let crumbData: XCrumbNode[] = [{ id: node.id, label: node.label }];\r\n const getParent = (child: XTreeFileNode) => {\r\n if (XIsEmpty(child.pid)) return;\r\n const parent = (this.data as XTreeFileNode[]).find((x) => x.id === child.pid) as XTreeFileNode;\r\n if (!XIsEmpty(parent)) {\r\n crumbData = [{ id: parent.id, label: parent.label }, ...crumbData];\r\n getParent(parent);\r\n }\r\n };\r\n getParent(node);\r\n\r\n return crumbData;\r\n }\r\n\r\n menuToggle() {\r\n this.toggle = !this.toggle;\r\n this.cdr.detectChanges();\r\n }\r\n}\r\n","<div #treeFile class=\"x-tree-file\" [ngClass]=\"classMap\" [class.x-tree-file-toggle]=\"toggle\">\r\n <div class=\"x-tree-file-catalog\" [style.max-height.rem]=\"catalogHeight\" *ngIf=\"showTree\">\r\n <x-tree\r\n [data]=\"data\"\r\n (activatedChange)=\"catalogChange($event)\"\r\n nodeOpen\r\n [expandedAll]=\"expandedAll\"\r\n [expandedLevel]=\"expandedLevel\"\r\n [expanded]=\"expanded\"\r\n [spacing]=\"spacing\"\r\n [activatedId]=\"activatedId\"\r\n ></x-tree>\r\n </div>\r\n <div class=\"x-tree-file-body\" [x-loading]=\"loading\">\r\n <div class=\"x-tree-file-crumb\" *ngIf=\"showCrumb\">\r\n <x-link icon=\"fto-menu\" *ngIf=\"showToggle && showTree\" (click)=\"menuToggle()\"></x-link>\r\n <x-crumb [data]=\"getCrumbData\" [separator]=\"separatorTpl\"></x-crumb>\r\n <ng-template #separatorTpl>\r\n <x-icon type=\"fto-chevron-right\"></x-icon>\r\n </ng-template>\r\n </div>\r\n <div class=\"x-tree-file-content\" [style.max-height.rem]=\"codeHeight\" [ngSwitch]=\"activatedNode?.fileType\">\r\n <div *ngSwitchCase=\"'img'\" class=\"x-tree-file-img\"><img [src]=\"activatedNode?.url\" (load)=\"imgOnload()\"/></div>\r\n <x-highlight\r\n *ngSwitchCase=\"'code'\"\r\n [type]=\"activatedNode?.type\"\r\n [data]=\"activatedNode?.content\"\r\n [highlightLines]=\"getHighlightLines\"\r\n ></x-highlight>\r\n </div>\r\n </div>\r\n</div>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { HttpClientModule } from '@angular/common/http';\r\nimport { XTreeFileComponent } from './tree-file.component';\r\nimport { XTreeFileProperty } from './tree-file.property';\r\nimport { XTreeModule } from '@ng-nest/ui/tree';\r\nimport { XHighlightModule } from '@ng-nest/ui/highlight';\r\nimport { XCrumbModule } from '@ng-nest/ui/crumb';\r\nimport { XIconModule } from '@ng-nest/ui/icon';\r\nimport { XLinkModule } from '@ng-nest/ui/link';\r\nimport { XLoadingModule } from '@ng-nest/ui/loading';\r\n\r\n@NgModule({\r\n declarations: [XTreeFileComponent, XTreeFileProperty],\r\n exports: [XTreeFileComponent],\r\n imports: [CommonModule, HttpClientModule, XTreeModule, XLinkModule, XCrumbModule, XIconModule, XLoadingModule, XHighlightModule]\r\n})\r\nexport class XT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AkB,CAAA,EAAA,CAAA,CAAA;AAGjB,mBAAA,eAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,EAFhB,OAAA,EAAA,CAAA,YAAY,EAAE,gBAAgB,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,gBAAgB,CAAA,EAAA,CAAA,CAAA;4FAEpH,eAAe,EAAA,UAAA,EAAA,CAAA;kBAL3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,kBAAkB,EAAE,iBAAiB,CAAC;oBACrD,OAAO,EAAE,CAAC,kBAAkB,CAAC;AAC7B,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,gBAAgB,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,gBAAgB,CAAC;AACjI,iBAAA,CAAA;;;AChBD;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-nest-ui-tree-file.mjs","sources":["../../../../lib/ng-nest/ui/tree-file/tree-file.property.ts","../../../../lib/ng-nest/ui/tree-file/tree-file.component.ts","../../../../lib/ng-nest/ui/tree-file/tree-file.component.html","../../../../lib/ng-nest/ui/tree-file/tree-file.module.ts","../../../../lib/ng-nest/ui/tree-file/ng-nest-ui-tree-file.ts"],"sourcesContent":["import { XDataConvert, XData, XInputBoolean, XBoolean, XInputNumber, XNumber, XWithConfig } from '@ng-nest/ui/core';\r\nimport { Component, Input } from '@angular/core';\r\nimport { XTreeNode, XTreeProperty } from '@ng-nest/ui/tree';\r\nimport { XCrumbNode } from '@ng-nest/ui/crumb';\r\nimport { XHighlightLines } from '@ng-nest/ui/highlight';\r\n\r\n/**\r\n * TreeFile\r\n * @selector x-tree-file\r\n * @decorator component\r\n */\r\nexport const XTreeFilePrefix = 'x-tree-file';\r\nconst X_CONFIG_NAME = 'treeFile';\r\n\r\n/**\r\n * TreeFile Property\r\n */\r\n@Component({ template: '' })\r\nexport class XTreeFileProperty extends XTreeProperty {\r\n /**\r\n * @zh_CN 节点数据\r\n * @en_US Node data\r\n */\r\n @Input() @XDataConvert() override data: XData<XTreeFileNode> = [];\r\n /**\r\n * @zh_CN 文件绝对路径地址前缀,为空表示取当前运行的地址\r\n * @en_US File absolute path address prefix, empty means to take the address of the current operation\r\n */\r\n @Input() domain: string = '';\r\n /**\r\n * @zh_CN 切换状态\r\n * @en_US Switch state\r\n */\r\n @Input() @XInputBoolean() toggle: XBoolean = true;\r\n /**\r\n * @zh_CN 显示切换按钮\r\n * @en_US Show toggle button\r\n */\r\n @Input() @XInputBoolean() showToggle: XBoolean = true;\r\n /**\r\n * @zh_CN 显示树,为 true 的时候隐藏切换按钮\r\n * @en_US Show the tree, hide the toggle button when true\r\n */\r\n @Input() @XInputBoolean() showTree: XBoolean = true;\r\n /**\r\n * @zh_CN 显示面包屑\r\n * @en_US Show breadcrumbs\r\n */\r\n @Input() @XInputBoolean() showCrumb: XBoolean = true;\r\n /**\r\n * @zh_CN 最大高度,单位 rem\r\n * @en_US Maximum height, unit rem\r\n */\r\n @Input() @XWithConfig<XNumber>(X_CONFIG_NAME, 37.5) @XInputNumber() maxHeight?: XNumber;\r\n /**\r\n * @zh_CN 单位间距,这个与层级的乘积算出节点的左边距,单位 rem\r\n * @en_US Unit spacing, the product of this and the level calculates the left margin of the node, the unit is rem\r\n */\r\n @Input() @XWithConfig<XNumber>(X_CONFIG_NAME, 0.5) @XInputNumber() override spacing?: XNumber;\r\n}\r\n\r\n/**\r\n * @zh_CN TreeFile 数据对象\r\n * @en_US TreeFile data object\r\n */\r\nexport interface XTreeFileNode extends XTreeNode {\r\n /**\r\n * @zh_CN 子节点\r\n * @en_US Child node\r\n */\r\n children?: XTreeFileNode[];\r\n /**\r\n * @zh_CN 文件内容\r\n * @en_US Document content\r\n */\r\n content?: string;\r\n /**\r\n * @zh_CN 文件类型\r\n * @en_US File type\r\n */\r\n type?: string;\r\n /**\r\n * @zh_CN 文件分类\r\n * @en_US File classification\r\n */\r\n fileType?: XTreeFileType;\r\n /**\r\n * @zh_CN 文件地址,配置了地址将从 url 中加载文件内容\r\n * @en_US File address, the configured address will load the file content from url\r\n */\r\n url?: string;\r\n /**\r\n * @zh_CN 文件的面包屑数据\r\n * @en_US Breadcrumb data\r\n */\r\n crumbData?: XCrumbNode[];\r\n /**\r\n * @zh_CN 文件内容已经加载过\r\n * @en_US File content has been loaded\r\n */\r\n contentLoaded?: boolean;\r\n /**\r\n * @zh_CN 行高亮着色\r\n * @en_US Line highlight coloring\r\n */\r\n highlightLines?: XHighlightLines;\r\n}\r\n\r\n/**\r\n * @zh_CN 文件分类\r\n * @en_US File classification\r\n */\r\nexport type XTreeFileType = 'code' | 'img';\r\n\r\n/**\r\n * @zh_CN 支持显示的图片格式\r\n * @en_US Supported picture format\r\n */\r\nexport const XTreeFileImgs = ['webp', 'png', 'jpg', 'gif', 'jpeg', 'ico'];\r\n","import { Component, ViewEncapsulation, Renderer2, ElementRef, ChangeDetectorRef, ChangeDetectionStrategy, Optional } from '@angular/core';\r\nimport { XTreeFilePrefix, XTreeFileProperty, XTreeFileNode, XTreeFileImgs } from './tree-file.property';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { XIsEmpty, XConfigService } from '@ng-nest/ui/core';\r\nimport { XCrumbNode } from '@ng-nest/ui/crumb';\r\nimport { delay } from 'rxjs/operators';\r\nimport { XHighlightLines } from '@ng-nest/ui/highlight';\r\n\r\n@Component({\r\n selector: `${XTreeFilePrefix}`,\r\n templateUrl: './tree-file.component.html',\r\n styleUrls: ['./tree-file.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XTreeFileComponent extends XTreeFileProperty {\r\n activatedNode?: XTreeFileNode;\r\n loading: boolean = false;\r\n time!: number;\r\n timeout: number = 200;\r\n\r\n get catalogHeight() {\r\n return Number(this.maxHeight);\r\n }\r\n\r\n get codeHeight() {\r\n return Number(this.maxHeight) - (Boolean(this.showCrumb) ? 1.5 : 0);\r\n }\r\n\r\n get getCrumbData() {\r\n return this.activatedNode?.crumbData as XCrumbNode[];\r\n }\r\n\r\n get getHighlightLines() {\r\n return this.activatedNode?.highlightLines as XHighlightLines;\r\n }\r\n\r\n constructor(\r\n public renderer: Renderer2,\r\n public elementRef: ElementRef,\r\n public cdr: ChangeDetectorRef,\r\n @Optional() public http: HttpClient,\r\n public configService: XConfigService\r\n ) {\r\n super();\r\n if (!http) {\r\n throw new Error(`${XTreeFilePrefix}: Not found 'HttpClient', You can import 'HttpClientModule' in your root module.`);\r\n }\r\n }\r\n\r\n ngOnInit() {\r\n if (!this.showTree && this.activatedId) {\r\n this.catalogChange((this.data as XTreeFileNode[]).find((x) => x.id == this.activatedId) as XTreeFileNode);\r\n }\r\n }\r\n\r\n catalogChange(node: XTreeFileNode) {\r\n if (node?.leaf) return;\r\n if (node.url && !node.contentLoaded) {\r\n this.time = new Date().getTime();\r\n this.loading = true;\r\n this.cdr.detectChanges();\r\n this.activatedNode = node;\r\n node.fileType = XTreeFileImgs.indexOf((node.type as string).toLowerCase()) !== -1 ? 'img' : 'code';\r\n node.crumbData = this.setCurmbData(node);\r\n node.url = node.url?.indexOf(this.domain) === 0 ? node.url : `${this.domain}/${node.url}`;\r\n switch (node.fileType) {\r\n case 'code':\r\n this.http\r\n .get(node.url, { responseType: 'text' })\r\n .pipe(delay(new Date().getTime() - this.time > this.timeout ? 0 : this.timeout - new Date().getTime() + this.time))\r\n .subscribe((x) => {\r\n node.content = x;\r\n node.contentLoaded = true;\r\n this.loading = false;\r\n this.cdr.detectChanges();\r\n });\r\n break;\r\n case 'img':\r\n this.cdr.detectChanges();\r\n break;\r\n }\r\n } else {\r\n this.activatedNode = node;\r\n this.cdr.detectChanges();\r\n }\r\n }\r\n\r\n imgOnload() {\r\n this.loading = false;\r\n this.cdr.detectChanges();\r\n }\r\n\r\n setCurmbData(node: XTreeFileNode) {\r\n let crumbData: XCrumbNode[] = [{ id: node.id, label: node.label }];\r\n const getParent = (child: XTreeFileNode) => {\r\n if (XIsEmpty(child.pid)) return;\r\n const parent = (this.data as XTreeFileNode[]).find((x) => x.id === child.pid) as XTreeFileNode;\r\n if (!XIsEmpty(parent)) {\r\n crumbData = [{ id: parent.id, label: parent.label }, ...crumbData];\r\n getParent(parent);\r\n }\r\n };\r\n getParent(node);\r\n\r\n return crumbData;\r\n }\r\n\r\n menuToggle() {\r\n this.toggle = !this.toggle;\r\n this.cdr.detectChanges();\r\n }\r\n}\r\n","<div #treeFile class=\"x-tree-file\" [ngClass]=\"classMap\" [class.x-tree-file-toggle]=\"toggle\">\r\n <div class=\"x-tree-file-catalog\" [style.max-height.rem]=\"catalogHeight\" *ngIf=\"showTree\">\r\n <x-tree\r\n [data]=\"data\"\r\n (activatedChange)=\"catalogChange($event)\"\r\n nodeOpen\r\n [expandedAll]=\"expandedAll\"\r\n [expandedLevel]=\"expandedLevel\"\r\n [expanded]=\"expanded\"\r\n [spacing]=\"spacing\"\r\n [activatedId]=\"activatedId\"\r\n ></x-tree>\r\n </div>\r\n <div class=\"x-tree-file-body\" [x-loading]=\"loading\">\r\n <div class=\"x-tree-file-crumb\" *ngIf=\"showCrumb\">\r\n <x-link icon=\"fto-menu\" *ngIf=\"showToggle && showTree\" (click)=\"menuToggle()\"></x-link>\r\n <x-crumb [data]=\"getCrumbData\" [separator]=\"separatorTpl\"></x-crumb>\r\n <ng-template #separatorTpl>\r\n <x-icon type=\"fto-chevron-right\"></x-icon>\r\n </ng-template>\r\n </div>\r\n <div class=\"x-tree-file-content\" [style.max-height.rem]=\"codeHeight\" [ngSwitch]=\"activatedNode?.fileType\">\r\n <div *ngSwitchCase=\"'img'\" class=\"x-tree-file-img\"><img [src]=\"activatedNode?.url\" (load)=\"imgOnload()\"/></div>\r\n <x-highlight\r\n *ngSwitchCase=\"'code'\"\r\n [type]=\"activatedNode?.type\"\r\n [data]=\"activatedNode?.content\"\r\n [highlightLines]=\"getHighlightLines\"\r\n ></x-highlight>\r\n </div>\r\n </div>\r\n</div>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { XTreeFileComponent } from './tree-file.component';\r\nimport { XTreeFileProperty } from './tree-file.property';\r\nimport { XTreeModule } from '@ng-nest/ui/tree';\r\nimport { XHighlightModule } from '@ng-nest/ui/highlight';\r\nimport { XCrumbModule } from '@ng-nest/ui/crumb';\r\nimport { XIconModule } from '@ng-nest/ui/icon';\r\nimport { XLinkModule } from '@ng-nest/ui/link';\r\nimport { XLoadingModule } from '@ng-nest/ui/loading';\r\n\r\n@NgModule({\r\n declarations: [XTreeFileComponent, XTreeFileProperty],\r\n exports: [XTreeFileComponent],\r\n imports: [CommonModule, XTreeModule, XLinkModule, XCrumbModule, XIconModule, XLoadingModule, XHighlightModule]\r\n})\r\nexport class XTreeFileModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAMA;;;;AAIG;AACI,MAAM,eAAe,GAAG,cAAc;AAC7C,MAAM,aAAa,GAAG,UAAU,CAAC;AAEjC;;AAEG;AAEG,MAAO,iBAAkB,SAAQ,aAAa,CAAA;AADpD,IAAA,WAAA,GAAA;;AAEE;;;AAGG;QAC+B,IAAI,CAAA,IAAA,GAAyB,EAAE,CAAC;AAClE;;;AAGG;QACM,IAAM,CAAA,MAAA,GAAW,EAAE,CAAC;AAC7B;;;AAGG;QACuB,IAAM,CAAA,MAAA,GAAa,IAAI,CAAC;AAClD;;;AAGG;QACuB,IAAU,CAAA,UAAA,GAAa,IAAI,CAAC;AACtD;;;AAGG;QACuB,IAAQ,CAAA,QAAA,GAAa,IAAI,CAAC;AACpD;;;AAGG;QACuB,IAAS,CAAA,SAAA,GAAa,IAAI,CAAC;AAWt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AA,UAAA,EAAA,CAAA;kBAL3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,kBAAkB,EAAE,iBAAiB,CAAC;oBACrD,OAAO,EAAE,CAAC,kBAAkB,CAAC;AAC7B,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,gBAAgB,CAAC;AAC/G,iBAAA,CAAA;;;ACfD;;AAEG;;;;"}
@@ -1,7 +1,7 @@
1
1
  import * as i1$1 from '@angular/common/http';
2
2
  import { HttpRequest, HttpHeaders, HttpEventType } from '@angular/common/http';
3
3
  import * as i0 from '@angular/core';
4
- import { EventEmitter, Component, Input, Output, ViewEncapsulation, ChangeDetectionStrategy, Inject, ViewChild, NgModule } from '@angular/core';
4
+ import { EventEmitter, Component, Input, Output, ViewEncapsulation, ChangeDetectionStrategy, Inject, ViewChild, Optional, NgModule } from '@angular/core';
5
5
  import { __decorate } from 'tslib';
6
6
  import * as i4 from '@ng-nest/ui/core';
7
7
  import { XInputBoolean, XWithConfig, XInputNumber, XClamp, XIsTemplateRef, XIsArray } from '@ng-nest/ui/core';
@@ -342,6 +342,9 @@ class XUploadComponent extends XUploadProperty {
342
342
  this.uploadNodes = [];
343
343
  this.locale = {};
344
344
  this._unSubject = new Subject();
345
+ if (!http) {
346
+ throw new Error(`${XUploadPrefix}: Not found 'HttpClient', You can import 'HttpClientModule' in your root module.`);
347
+ }
345
348
  }
346
349
  get getText() {
347
350
  return this.text || this.locale.uploadText;
@@ -545,12 +548,14 @@ class XUploadComponent extends XUploadProperty {
545
548
  this.cdr.detectChanges();
546
549
  }
547
550
  }
548
- /** @nocollapse */ XUploadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: XUploadComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i1$1.HttpClient }, { token: i0.ChangeDetectorRef }, { token: i2.XPortalService }, { token: i0.ViewContainerRef }, { token: i3.XI18nService }, { token: i4.XConfigService }], target: i0.ɵɵFactoryTarget.Component });
551
+ /** @nocollapse */ XUploadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: XUploadComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i1$1.HttpClient, optional: true }, { token: i0.ChangeDetectorRef }, { token: i2.XPortalService }, { token: i0.ViewContainerRef }, { token: i3.XI18nService }, { token: i4.XConfigService }], target: i0.ɵɵFactoryTarget.Component });
549
552
  /** @nocollapse */ XUploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: XUploadComponent, selector: "x-upload", providers: [XValueAccessor(XUploadComponent)], viewQueries: [{ propertyName: "file", first: true, predicate: ["file"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<div #upload class=\"x-upload x-upload-{{ type }}\" [class.x-disabled]=\"disabled\">\r\n <input type=\"file\" #file (change)=\"change($event)\" [attr.accept]=\"accept\" [multiple]=\"multiple\" style=\"display: none\" />\r\n\r\n <ng-container [ngSwitch]=\"type\">\r\n <ng-container *ngSwitchCase=\"'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 <li *ngFor=\"let file of files; index as i; trackBy: trackByItem\" [class.x-upload-disabled]=\"!download\">\r\n <ng-container *ngIf=\"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 </ng-container>\r\n <ng-container *ngIf=\"!download\">\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 </ng-container>\r\n\r\n <ng-container [ngSwitch]=\"file.state\">\r\n <x-icon class=\"x-upload-state\" *ngSwitchCase=\"'ready'\" type=\"fto-clock\"></x-icon>\r\n <span class=\"x-upload-percent\" *ngSwitchCase=\"'uploading'\">{{ file.percent }}%</span>\r\n <x-icon class=\"x-upload-state success\" *ngSwitchCase=\"'success'\" type=\"fto-check\"></x-icon>\r\n <x-icon class=\"x-upload-state error\" *ngSwitchCase=\"'error'\" type=\"fto-info\"></x-icon>\r\n </ng-container>\r\n <x-button *ngIf=\"file.state !== 'uploading'\" icon=\"fto-x\" (click)=\"remove(file, i)\" onlyIcon closable size=\"mini\"></x-button>\r\n </li>\r\n </ul>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'img'\">\r\n <x-image-group>\r\n <ng-container *ngFor=\"let file of files; index as i; trackBy: trackByItem\">\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 <div class=\"x-upload-uploading\" *ngIf=\"file.state == 'uploading'\">\r\n <x-progress [percent]=\"file.percent!\" info=\"false\"></x-progress>\r\n </div>\r\n <div class=\"x-image-overlay\">\r\n <ng-container [ngSwitch]=\"file.state\">\r\n <x-icon class=\"x-upload-state\" *ngSwitchCase=\"'ready'\" type=\"fto-clock\"></x-icon>\r\n <x-icon type=\"fto-eye\" *ngSwitchCase=\"'success'\" (click)=\"image.onPreview()\"></x-icon>\r\n </ng-container>\r\n <x-icon *ngIf=\"imgCut && file.state === 'success'\" type=\"fto-crop\" (click)=\"onImgCut(file, i)\"></x-icon>\r\n <x-icon *ngIf=\"file.state !== 'uploading'\" type=\"fto-trash-2\" (click)=\"remove(file, i)\"></x-icon>\r\n </div>\r\n </ng-template>\r\n </ng-container>\r\n <ng-container *ngTemplateOutlet=\"uploadBtnTpl\"></ng-container>\r\n </x-image-group>\r\n </ng-container>\r\n </ng-container>\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\" [disabled]=\"disabled\" type=\"primary\">{{ getText }}</x-button>\r\n </ng-container>\r\n </div>\r\n</ng-template>\r\n", styles: [".x-upload{margin:0;padding:0;color:var(--x-text);font-size:var(--x-font-size)}.x-upload-buttons{display:inline-flex}.x-upload-buttons>.x-button:not(:first-child){margin-left:.4rem}.x-upload-buttons-template{cursor:pointer}.x-upload-files{margin-top:.4rem}.x-upload-files>li{padding:0 .2rem;height:calc(var(--x-font-size) + .6rem);line-height:calc(var(--x-font-size) + .6rem);display:flex;align-items:center;overflow:hidden;cursor:pointer;border-radius:var(--x-border-radius)}.x-upload-files>li .x-icon{color:var(--x-text-400);font-size:1rem}.x-upload-files>li .x-icon.x-upload-state.success{color:var(--x-success)}.x-upload-files>li .x-icon.x-upload-state.error{color:var(--x-danger)}.x-upload-files>li a{flex:1;display:flex;align-items:center;height:calc(var(--x-font-size) + .6rem);line-height:calc(var(--x-font-size) + .6rem);color:inherit;text-decoration:none;overflow:hidden}.x-upload-files>li span.x-upload-filename{margin-left:.2rem;flex:1;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.x-upload-files>li span.x-upload-percent{color:var(--x-text-400)}.x-upload-files>li>.x-button{display:none;padding:0}.x-upload-files>li:not(:first-child){margin-top:.2rem}.x-upload-files>li.x-upload-disabled{cursor:default}.x-upload-files>li.x-upload-disabled>a{cursor:default}.x-upload-files>li:hover:not(.x-upload-disabled){color:var(--x-primary);background-color:var(--x-background)}.x-upload-files>li:hover>.x-button{display:inline-block}.x-upload-files>li:hover>.x-upload-state{display:none}.x-upload-img{display:flex;flex-wrap:wrap}.x-upload-img .x-upload-buttons-template{display:inline-flex;align-items:center;justify-content:center;flex-direction:column;width:6.25rem;height:6.25rem;margin-right:.5rem;margin-bottom:.5rem;border:var(--x-border-width) dashed var(--x-border);background:var(--x-background);border-radius:var(--x-border-radius);transition:border-color var(--x-animation-duration-base)}.x-upload-img .x-upload-buttons-template:hover{border-color:var(--x-primary)}.x-upload-img .x-image{height:6.25rem;width:6.25rem;padding:.325rem;border:var(--x-border-width) var(--x-border-style) var(--x-border);border-radius:var(--x-border-radius);transition:border-color var(--x-animation-duration-base);margin-right:.5rem;margin-bottom:.5rem;position:relative;display:flex;align-items:center;justify-content:center}.x-upload-img .x-image-overlay x-icon{font-size:1rem;color:#fffc;padding:.25rem;transition:color var(--x-animation-duration-base)}.x-upload-img .x-image-overlay x-icon:hover{color:#fff}.x-upload-img x-image.error .x-image{border-color:var(--x-danger)}.x-upload-img x-image.error .x-image-error-icon{color:var(--x-danger)}.x-upload-uploading{position:absolute;margin-top:3rem;width:calc(100% - 1rem)}\n"], dependencies: [{ kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i5.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i5.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i6.XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }, { kind: "component", type: i7.XButtonComponent, selector: "x-button" }, { kind: "component", type: i1.XIconComponent, selector: "x-icon" }, { kind: "component", type: i9.XImageComponent, selector: "x-image" }, { kind: "component", type: i9.XImageGroupComponent, selector: "x-image-group" }, { kind: "component", type: i10.XProgressComponent, selector: "x-progress" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
550
553
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: XUploadComponent, decorators: [{
551
554
  type: Component,
552
555
  args: [{ selector: `${XUploadPrefix}`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [XValueAccessor(XUploadComponent)], template: "<div #upload class=\"x-upload x-upload-{{ type }}\" [class.x-disabled]=\"disabled\">\r\n <input type=\"file\" #file (change)=\"change($event)\" [attr.accept]=\"accept\" [multiple]=\"multiple\" style=\"display: none\" />\r\n\r\n <ng-container [ngSwitch]=\"type\">\r\n <ng-container *ngSwitchCase=\"'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 <li *ngFor=\"let file of files; index as i; trackBy: trackByItem\" [class.x-upload-disabled]=\"!download\">\r\n <ng-container *ngIf=\"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 </ng-container>\r\n <ng-container *ngIf=\"!download\">\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 </ng-container>\r\n\r\n <ng-container [ngSwitch]=\"file.state\">\r\n <x-icon class=\"x-upload-state\" *ngSwitchCase=\"'ready'\" type=\"fto-clock\"></x-icon>\r\n <span class=\"x-upload-percent\" *ngSwitchCase=\"'uploading'\">{{ file.percent }}%</span>\r\n <x-icon class=\"x-upload-state success\" *ngSwitchCase=\"'success'\" type=\"fto-check\"></x-icon>\r\n <x-icon class=\"x-upload-state error\" *ngSwitchCase=\"'error'\" type=\"fto-info\"></x-icon>\r\n </ng-container>\r\n <x-button *ngIf=\"file.state !== 'uploading'\" icon=\"fto-x\" (click)=\"remove(file, i)\" onlyIcon closable size=\"mini\"></x-button>\r\n </li>\r\n </ul>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'img'\">\r\n <x-image-group>\r\n <ng-container *ngFor=\"let file of files; index as i; trackBy: trackByItem\">\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 <div class=\"x-upload-uploading\" *ngIf=\"file.state == 'uploading'\">\r\n <x-progress [percent]=\"file.percent!\" info=\"false\"></x-progress>\r\n </div>\r\n <div class=\"x-image-overlay\">\r\n <ng-container [ngSwitch]=\"file.state\">\r\n <x-icon class=\"x-upload-state\" *ngSwitchCase=\"'ready'\" type=\"fto-clock\"></x-icon>\r\n <x-icon type=\"fto-eye\" *ngSwitchCase=\"'success'\" (click)=\"image.onPreview()\"></x-icon>\r\n </ng-container>\r\n <x-icon *ngIf=\"imgCut && file.state === 'success'\" type=\"fto-crop\" (click)=\"onImgCut(file, i)\"></x-icon>\r\n <x-icon *ngIf=\"file.state !== 'uploading'\" type=\"fto-trash-2\" (click)=\"remove(file, i)\"></x-icon>\r\n </div>\r\n </ng-template>\r\n </ng-container>\r\n <ng-container *ngTemplateOutlet=\"uploadBtnTpl\"></ng-container>\r\n </x-image-group>\r\n </ng-container>\r\n </ng-container>\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\" [disabled]=\"disabled\" type=\"primary\">{{ getText }}</x-button>\r\n </ng-container>\r\n </div>\r\n</ng-template>\r\n", styles: [".x-upload{margin:0;padding:0;color:var(--x-text);font-size:var(--x-font-size)}.x-upload-buttons{display:inline-flex}.x-upload-buttons>.x-button:not(:first-child){margin-left:.4rem}.x-upload-buttons-template{cursor:pointer}.x-upload-files{margin-top:.4rem}.x-upload-files>li{padding:0 .2rem;height:calc(var(--x-font-size) + .6rem);line-height:calc(var(--x-font-size) + .6rem);display:flex;align-items:center;overflow:hidden;cursor:pointer;border-radius:var(--x-border-radius)}.x-upload-files>li .x-icon{color:var(--x-text-400);font-size:1rem}.x-upload-files>li .x-icon.x-upload-state.success{color:var(--x-success)}.x-upload-files>li .x-icon.x-upload-state.error{color:var(--x-danger)}.x-upload-files>li a{flex:1;display:flex;align-items:center;height:calc(var(--x-font-size) + .6rem);line-height:calc(var(--x-font-size) + .6rem);color:inherit;text-decoration:none;overflow:hidden}.x-upload-files>li span.x-upload-filename{margin-left:.2rem;flex:1;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.x-upload-files>li span.x-upload-percent{color:var(--x-text-400)}.x-upload-files>li>.x-button{display:none;padding:0}.x-upload-files>li:not(:first-child){margin-top:.2rem}.x-upload-files>li.x-upload-disabled{cursor:default}.x-upload-files>li.x-upload-disabled>a{cursor:default}.x-upload-files>li:hover:not(.x-upload-disabled){color:var(--x-primary);background-color:var(--x-background)}.x-upload-files>li:hover>.x-button{display:inline-block}.x-upload-files>li:hover>.x-upload-state{display:none}.x-upload-img{display:flex;flex-wrap:wrap}.x-upload-img .x-upload-buttons-template{display:inline-flex;align-items:center;justify-content:center;flex-direction:column;width:6.25rem;height:6.25rem;margin-right:.5rem;margin-bottom:.5rem;border:var(--x-border-width) dashed var(--x-border);background:var(--x-background);border-radius:var(--x-border-radius);transition:border-color var(--x-animation-duration-base)}.x-upload-img .x-upload-buttons-template:hover{border-color:var(--x-primary)}.x-upload-img .x-image{height:6.25rem;width:6.25rem;padding:.325rem;border:var(--x-border-width) var(--x-border-style) var(--x-border);border-radius:var(--x-border-radius);transition:border-color var(--x-animation-duration-base);margin-right:.5rem;margin-bottom:.5rem;position:relative;display:flex;align-items:center;justify-content:center}.x-upload-img .x-image-overlay x-icon{font-size:1rem;color:#fffc;padding:.25rem;transition:color var(--x-animation-duration-base)}.x-upload-img .x-image-overlay x-icon:hover{color:#fff}.x-upload-img x-image.error .x-image{border-color:var(--x-danger)}.x-upload-img x-image.error .x-image-error-icon{color:var(--x-danger)}.x-upload-uploading{position:absolute;margin-top:3rem;width:calc(100% - 1rem)}\n"] }]
553
- }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i1$1.HttpClient }, { type: i0.ChangeDetectorRef }, { type: i2.XPortalService }, { type: i0.ViewContainerRef }, { type: i3.XI18nService }, { type: i4.XConfigService }]; }, propDecorators: { file: [{
556
+ }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i1$1.HttpClient, decorators: [{
557
+ type: Optional
558
+ }] }, { type: i0.ChangeDetectorRef }, { type: i2.XPortalService }, { type: i0.ViewContainerRef }, { type: i3.XI18nService }, { type: i4.XConfigService }]; }, propDecorators: { file: [{
554
559
  type: ViewChild,
555
560
  args: ['file', { static: true }]
556
561
  }] } });
@@ -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 { XInputBoolean, XBoolean, XTemplate, XPosition, XCorner, XWithConfig, XNumber, XInputNumber } from '@ng-nest/ui/core';\r\nimport { Input, Output, EventEmitter, Component } from '@angular/core';\r\nimport { XControlValueAccessor } 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_CONFIG_NAME = 'upload';\r\n\r\n/**\r\n * Upload Property\r\n */\r\n@Component({ template: '' })\r\nexport class XUploadProperty extends XControlValueAccessor<XUploadNode[]> {\r\n /**\r\n * @zh_CN 显示文字\r\n * @en_US Display text\r\n */\r\n @Input() text?: XTemplate;\r\n /**\r\n * @zh_CN 请求地址\r\n * @en_US Request address\r\n */\r\n @Input() action?: 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 @Input() accept?: string;\r\n /**\r\n * @zh_CN 文件显示类型\r\n * @en_US File display type\r\n */\r\n @Input() type: XUploadType = 'list';\r\n /**\r\n * @zh_CN 图片类型下面加载失败显示\r\n * @en_US Photo type below loading failed display\r\n */\r\n @Input() imgFallback?: string;\r\n /**\r\n * @zh_CN 图片剪裁\r\n * @en_US Picture cropping\r\n */\r\n @Input() @XInputBoolean() imgCut?: XBoolean;\r\n /**\r\n * @zh_CN 多文件上传\r\n * @en_US Multiple file upload\r\n */\r\n @Input() @XInputBoolean() multiple?: XBoolean;\r\n /**\r\n * @zh_CN 点击下载\r\n * @en_US click download\r\n */\r\n @Input() @XWithConfig<XBoolean>(X_CONFIG_NAME, true) @XInputBoolean() download!: XBoolean;\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 @Input() @XWithConfig<XUploadMultipleModel>(X_CONFIG_NAME, 'cover') multipleModel!: XUploadMultipleModel;\r\n /**\r\n * @zh_CN 文件列表自定义显示模板\r\n * @en_US File list custom display template\r\n */\r\n @Input() filesTpl?: 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 @Input() @XInputNumber() maxLimit?: XNumber;\r\n /**\r\n * @zh_CN 设置上传的请求头部\r\n * @en_US Set the upload request header\r\n */\r\n @Input() headers?: { [key: string]: any };\r\n /**\r\n * @zh_CN 删除按钮的事件\r\n * @en_US Delete button event\r\n */\r\n @Output() removeClick = new EventEmitter<{ file: XUploadNode; index: number }>();\r\n /**\r\n * @zh_CN 开始上传事件\r\n * @en_US Start upload event\r\n */\r\n @Output() uploadReady = new EventEmitter<XUploadNode>();\r\n /**\r\n * @zh_CN 正在上传事件\r\n * @en_US Start upload event\r\n */\r\n @Output() uploading = new EventEmitter<XUploadNode>();\r\n /**\r\n * @zh_CN 上传成功事件\r\n * @en_US Start upload event\r\n */\r\n @Output() uploadSuccess = new EventEmitter<XUploadNode>();\r\n /**\r\n * @zh_CN 上传失败事件\r\n * @en_US Start upload event\r\n */\r\n @Output() uploadError = new EventEmitter<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 * 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 ViewChild,\r\n ElementRef,\r\n Renderer2,\r\n ChangeDetectorRef,\r\n Inject\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\n\r\n@Component({\r\n selector: `${XUploadPortalPrefix}`,\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 {\r\n file?: XUploadNode;\r\n @ViewChild('imgRef') imgRef!: ElementRef;\r\n @ViewChild('imgClipRef') imgClipRef!: ElementRef;\r\n @ViewChild('boundaryRef') boundaryRef!: ElementRef;\r\n @ViewChild('cutRef') cutRef!: ElementRef;\r\n ready = false;\r\n cutType: XUploadCutType = '';\r\n proportion = 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: Document;\r\n\r\n closePortal!: () => void;\r\n destroyPortal!: () => void;\r\n surePortal!: (blob: Blob) => void;\r\n private _unSubject = new Subject<void>();\r\n\r\n constructor(private renderer: Renderer2, private cdr: ChangeDetectorRef, @Inject(DOCUMENT) document: any) {\r\n this.doc = document;\r\n }\r\n\r\n ngOnInit() {}\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 = true;\r\n this.cdr.detectChanges();\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 = className.replace(spt, '') as XUploadCutType;\r\n this.cdr.detectChanges();\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 = '';\r\n this.cdr.detectChanges();\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.file?.url!;\r\n img.onload = () => {\r\n this.originalSize = { width: img.width, height: img.height };\r\n this.proportion = 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(this.cutRef.nativeElement, 'transform', `translate3d(${this.cutBox.x}px, ${this.cutBox.y}px, 0)`);\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.file?.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(blob as Blob);\r\n this.closePortal();\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>{{ file?.name }}</span>\r\n </div>\r\n <x-icon class=\"x-upload-portal-close\" type=\"fto-x\" (click)=\"closePortal()\"></x-icon>\r\n </div>\r\n <div class=\"x-upload-portal-img\">\r\n <img #imgRef class=\"x-upload-portal-full-img\" [src]=\"file?.url\" />\r\n <div #boundaryRef class=\"x-upload-portal-boundary\">\r\n <img #imgClipRef class=\"x-upload-portal-clip-img\" [src]=\"file?.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 Renderer2,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n ViewChild,\r\n ViewContainerRef,\r\n OnInit,\r\n OnDestroy\r\n} from '@angular/core';\r\nimport { XUploadPrefix, XUploadNode, XUploadProperty, XUploadPortalPrefix } from './upload.property';\r\nimport { XConfigService, XIsArray, XIsTemplateRef } from '@ng-nest/ui/core';\r\nimport { map, takeUntil } from 'rxjs/operators';\r\nimport { Subject } from 'rxjs';\r\nimport { XI18nService, XI18nUpload } 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\n\r\n@Component({\r\n selector: `${XUploadPrefix}`,\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 implements OnInit, OnDestroy {\r\n @ViewChild('file', { static: true }) file!: ElementRef;\r\n files: XUploadNode[] = [];\r\n showUpload = false;\r\n uploadNodes: XUploadNode[] = [];\r\n locale: XI18nUpload = {};\r\n portal!: XPortalOverlayRef<XUploadPortalComponent>;\r\n\r\n get getText() {\r\n return this.text || this.locale.uploadText;\r\n }\r\n\r\n get isTemplateText() {\r\n return XIsTemplateRef(this.getText);\r\n }\r\n\r\n private _unSubject = new Subject<void>();\r\n\r\n override writeValue(value: XUploadNode[]) {\r\n this.value = value;\r\n this.setFiles();\r\n this.cdr.detectChanges();\r\n }\r\n\r\n constructor(\r\n public renderer: Renderer2,\r\n public elementRef: ElementRef,\r\n public http: HttpClient,\r\n public override cdr: ChangeDetectorRef,\r\n public portalService: XPortalService,\r\n public viewContainerRef: ViewContainerRef,\r\n public i18n: XI18nService,\r\n public configService: XConfigService\r\n ) {\r\n super();\r\n }\r\n\r\n ngOnInit() {\r\n this.i18n.localeChange\r\n .pipe(\r\n map((x) => x.upload as XI18nUpload),\r\n takeUntil(this._unSubject)\r\n )\r\n .subscribe((x) => {\r\n this.locale = x;\r\n this.cdr.markForCheck();\r\n });\r\n if (this.type === 'img') this.accept = 'image/*';\r\n }\r\n\r\n ngOnDestroy() {\r\n this._unSubject.next();\r\n this._unSubject.unsubscribe();\r\n }\r\n\r\n setFiles() {\r\n if (!Array.isArray(this.value)) return;\r\n // if (this.type !== 'img') return;\r\n this.files = this.value.map((x) => {\r\n if (!x.state) x.state = 'success';\r\n return x;\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 ? Number(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 = true;\r\n if (this.multipleModel === 'cover') {\r\n this.files = files;\r\n } else if (this.multipleModel === 'add') {\r\n this.files = [...this.files, ...files];\r\n }\r\n this.value = this.files;\r\n this.onChange && this.onChange(this.value);\r\n this.onUploading();\r\n input.value = '';\r\n this.cdr.detectChanges();\r\n }\r\n\r\n remove(file: XUploadNode, index: number) {\r\n this.files.splice(index, 1);\r\n if (this.files.length === 0) this.file.nativeElement.value = '';\r\n this.showUpload = 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.splice(vindex, 1);\r\n this.onChange && this.onChange(this.value);\r\n }\r\n this.removeClick.emit({ file: file, index: index });\r\n this.cdr.detectChanges();\r\n }\r\n\r\n uploadClick() {\r\n if (this.disabled) 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];\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[index] = file;\r\n }\r\n this.uploadSuccess.emit(file);\r\n this.cdr.detectChanges();\r\n };\r\n })\r\n )\r\n )\r\n .subscribe(\r\n () => {\r\n this.showUpload = this.files.find((y) => y.state === 'ready') != null;\r\n this.cdr.detectChanges();\r\n },\r\n () => {\r\n file.state = 'error';\r\n this.uploadError.emit(file);\r\n this.cdr.detectChanges();\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 `开始上传文件`;\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 `上传中`;\r\n case HttpEventType.Response:\r\n file.state = 'success';\r\n successFunc(event.body);\r\n return `文件上传完毕`;\r\n }\r\n return;\r\n }\r\n\r\n trackByItem(_index: number, item: XUploadNode) {\r\n return `${item.name}-${item.lastModified}`;\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 Object.assign(componentRef.instance, {\r\n file: file,\r\n closePortal: () => this.closePortal(),\r\n destroyPortal: () => this.destroyPortal(),\r\n surePortal: (blob: 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 componentRef.changeDetectorRef.detectChanges();\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 this.cdr.detectChanges();\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n destroyPortal() {\r\n this.portal?.overlayRef?.dispose();\r\n }\r\n\r\n imgError(_event: ErrorEvent, file: XUploadNode) {\r\n file.state = 'error';\r\n this.cdr.detectChanges();\r\n }\r\n\r\n imgLoad(file: XUploadNode) {\r\n file.state = 'success';\r\n this.cdr.detectChanges();\r\n }\r\n}\r\n","<div #upload class=\"x-upload x-upload-{{ type }}\" [class.x-disabled]=\"disabled\">\r\n <input type=\"file\" #file (change)=\"change($event)\" [attr.accept]=\"accept\" [multiple]=\"multiple\" style=\"display: none\" />\r\n\r\n <ng-container [ngSwitch]=\"type\">\r\n <ng-container *ngSwitchCase=\"'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 <li *ngFor=\"let file of files; index as i; trackBy: trackByItem\" [class.x-upload-disabled]=\"!download\">\r\n <ng-container *ngIf=\"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 </ng-container>\r\n <ng-container *ngIf=\"!download\">\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 </ng-container>\r\n\r\n <ng-container [ngSwitch]=\"file.state\">\r\n <x-icon class=\"x-upload-state\" *ngSwitchCase=\"'ready'\" type=\"fto-clock\"></x-icon>\r\n <span class=\"x-upload-percent\" *ngSwitchCase=\"'uploading'\">{{ file.percent }}%</span>\r\n <x-icon class=\"x-upload-state success\" *ngSwitchCase=\"'success'\" type=\"fto-check\"></x-icon>\r\n <x-icon class=\"x-upload-state error\" *ngSwitchCase=\"'error'\" type=\"fto-info\"></x-icon>\r\n </ng-container>\r\n <x-button *ngIf=\"file.state !== 'uploading'\" icon=\"fto-x\" (click)=\"remove(file, i)\" onlyIcon closable size=\"mini\"></x-button>\r\n </li>\r\n </ul>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'img'\">\r\n <x-image-group>\r\n <ng-container *ngFor=\"let file of files; index as i; trackBy: trackByItem\">\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 <div class=\"x-upload-uploading\" *ngIf=\"file.state == 'uploading'\">\r\n <x-progress [percent]=\"file.percent!\" info=\"false\"></x-progress>\r\n </div>\r\n <div class=\"x-image-overlay\">\r\n <ng-container [ngSwitch]=\"file.state\">\r\n <x-icon class=\"x-upload-state\" *ngSwitchCase=\"'ready'\" type=\"fto-clock\"></x-icon>\r\n <x-icon type=\"fto-eye\" *ngSwitchCase=\"'success'\" (click)=\"image.onPreview()\"></x-icon>\r\n </ng-container>\r\n <x-icon *ngIf=\"imgCut && file.state === 'success'\" type=\"fto-crop\" (click)=\"onImgCut(file, i)\"></x-icon>\r\n <x-icon *ngIf=\"file.state !== 'uploading'\" type=\"fto-trash-2\" (click)=\"remove(file, i)\"></x-icon>\r\n </div>\r\n </ng-template>\r\n </ng-container>\r\n <ng-container *ngTemplateOutlet=\"uploadBtnTpl\"></ng-container>\r\n </x-image-group>\r\n </ng-container>\r\n </ng-container>\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\" [disabled]=\"disabled\" type=\"primary\">{{ getText }}</x-button>\r\n </ng-container>\r\n </div>\r\n</ng-template>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { XUploadComponent } from './upload.component';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { XButtonModule } from '@ng-nest/ui/button';\r\nimport { XIconModule } from '@ng-nest/ui/icon';\r\nimport { XUploadProperty } from './upload.property';\r\nimport { XI18nModule } from '@ng-nest/ui/i18n';\r\nimport { XOutletModule } from '@ng-nest/ui/outlet';\r\nimport { XPortalModule } from '@ng-nest/ui/portal';\r\nimport { XUploadPortalComponent } from './upload-portal.component';\r\nimport { DragDropModule } from '@angular/cdk/drag-drop';\r\nimport { XBaseFormModule } from '@ng-nest/ui/base-form';\r\nimport { XImageModule } from '@ng-nest/ui/image';\r\nimport { XProgressModule } from '@ng-nest/ui/progress';\r\n\r\n@NgModule({\r\n declarations: [XUploadComponent, XUploadPortalComponent, XUploadProperty],\r\n exports: [XUploadComponent],\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n DragDropModule,\r\n XPortalModule,\r\n XOutletModule,\r\n XButtonModule,\r\n XIconModule,\r\n XI18nModule,\r\n XBaseFormModule,\r\n XImageModule,\r\n XProgressModule\r\n ]\r\n})\r\nexport class XUploadModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1","i8"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA;;;;AAIG;AACI,MAAM,aAAa,GAAG,WAAW;AACxC,MAAM,aAAa,GAAG,QAAQ,CAAC;AAE/B;;AAEG;AAEG,MAAO,eAAgB,SAAQ,qBAAoC,CAAA;AADzE,IAAA,WAAA,GAAA;;AAiBE;;;AAGG;QACM,IAAI,CAAA,IAAA,GAAgB,MAAM,CAAC;AAyCpC;;;AAGG;AACO,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,YAAY,EAAwC,CAAC;AACjF;;;AAGG;AACO,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,YAAY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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 { XInputBoolean, XBoolean, XTemplate, XPosition, XCorner, XWithConfig, XNumber, XInputNumber } from '@ng-nest/ui/core';\r\nimport { Input, Output, EventEmitter, Component } from '@angular/core';\r\nimport { XControlValueAccessor } 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_CONFIG_NAME = 'upload';\r\n\r\n/**\r\n * Upload Property\r\n */\r\n@Component({ template: '' })\r\nexport class XUploadProperty extends XControlValueAccessor<XUploadNode[]> {\r\n /**\r\n * @zh_CN 显示文字\r\n * @en_US Display text\r\n */\r\n @Input() text?: XTemplate;\r\n /**\r\n * @zh_CN 请求地址\r\n * @en_US Request address\r\n */\r\n @Input() action?: 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 @Input() accept?: string;\r\n /**\r\n * @zh_CN 文件显示类型\r\n * @en_US File display type\r\n */\r\n @Input() type: XUploadType = 'list';\r\n /**\r\n * @zh_CN 图片类型下面加载失败显示\r\n * @en_US Photo type below loading failed display\r\n */\r\n @Input() imgFallback?: string;\r\n /**\r\n * @zh_CN 图片剪裁\r\n * @en_US Picture cropping\r\n */\r\n @Input() @XInputBoolean() imgCut?: XBoolean;\r\n /**\r\n * @zh_CN 多文件上传\r\n * @en_US Multiple file upload\r\n */\r\n @Input() @XInputBoolean() multiple?: XBoolean;\r\n /**\r\n * @zh_CN 点击下载\r\n * @en_US click download\r\n */\r\n @Input() @XWithConfig<XBoolean>(X_CONFIG_NAME, true) @XInputBoolean() download!: XBoolean;\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 @Input() @XWithConfig<XUploadMultipleModel>(X_CONFIG_NAME, 'cover') multipleModel!: XUploadMultipleModel;\r\n /**\r\n * @zh_CN 文件列表自定义显示模板\r\n * @en_US File list custom display template\r\n */\r\n @Input() filesTpl?: 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 @Input() @XInputNumber() maxLimit?: XNumber;\r\n /**\r\n * @zh_CN 设置上传的请求头部\r\n * @en_US Set the upload request header\r\n */\r\n @Input() headers?: { [key: string]: any };\r\n /**\r\n * @zh_CN 删除按钮的事件\r\n * @en_US Delete button event\r\n */\r\n @Output() removeClick = new EventEmitter<{ file: XUploadNode; index: number }>();\r\n /**\r\n * @zh_CN 开始上传事件\r\n * @en_US Start upload event\r\n */\r\n @Output() uploadReady = new EventEmitter<XUploadNode>();\r\n /**\r\n * @zh_CN 正在上传事件\r\n * @en_US Start upload event\r\n */\r\n @Output() uploading = new EventEmitter<XUploadNode>();\r\n /**\r\n * @zh_CN 上传成功事件\r\n * @en_US Start upload event\r\n */\r\n @Output() uploadSuccess = new EventEmitter<XUploadNode>();\r\n /**\r\n * @zh_CN 上传失败事件\r\n * @en_US Start upload event\r\n */\r\n @Output() uploadError = new EventEmitter<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 * 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 ViewChild,\r\n ElementRef,\r\n Renderer2,\r\n ChangeDetectorRef,\r\n Inject\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\n\r\n@Component({\r\n selector: `${XUploadPortalPrefix}`,\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 {\r\n file?: XUploadNode;\r\n @ViewChild('imgRef') imgRef!: ElementRef;\r\n @ViewChild('imgClipRef') imgClipRef!: ElementRef;\r\n @ViewChild('boundaryRef') boundaryRef!: ElementRef;\r\n @ViewChild('cutRef') cutRef!: ElementRef;\r\n ready = false;\r\n cutType: XUploadCutType = '';\r\n proportion = 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: Document;\r\n\r\n closePortal!: () => void;\r\n destroyPortal!: () => void;\r\n surePortal!: (blob: Blob) => void;\r\n private _unSubject = new Subject<void>();\r\n\r\n constructor(private renderer: Renderer2, private cdr: ChangeDetectorRef, @Inject(DOCUMENT) document: any) {\r\n this.doc = document;\r\n }\r\n\r\n ngOnInit() {}\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 = true;\r\n this.cdr.detectChanges();\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 = className.replace(spt, '') as XUploadCutType;\r\n this.cdr.detectChanges();\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 = '';\r\n this.cdr.detectChanges();\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.file?.url!;\r\n img.onload = () => {\r\n this.originalSize = { width: img.width, height: img.height };\r\n this.proportion = 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(this.cutRef.nativeElement, 'transform', `translate3d(${this.cutBox.x}px, ${this.cutBox.y}px, 0)`);\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.file?.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(blob as Blob);\r\n this.closePortal();\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>{{ file?.name }}</span>\r\n </div>\r\n <x-icon class=\"x-upload-portal-close\" type=\"fto-x\" (click)=\"closePortal()\"></x-icon>\r\n </div>\r\n <div class=\"x-upload-portal-img\">\r\n <img #imgRef class=\"x-upload-portal-full-img\" [src]=\"file?.url\" />\r\n <div #boundaryRef class=\"x-upload-portal-boundary\">\r\n <img #imgClipRef class=\"x-upload-portal-clip-img\" [src]=\"file?.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 Renderer2,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n ViewChild,\r\n ViewContainerRef,\r\n OnInit,\r\n OnDestroy,\r\n Optional\r\n} from '@angular/core';\r\nimport { XUploadPrefix, XUploadNode, XUploadProperty, XUploadPortalPrefix } from './upload.property';\r\nimport { XConfigService, XIsArray, XIsTemplateRef } from '@ng-nest/ui/core';\r\nimport { map, takeUntil } from 'rxjs/operators';\r\nimport { Subject } from 'rxjs';\r\nimport { XI18nService, XI18nUpload } 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\n\r\n@Component({\r\n selector: `${XUploadPrefix}`,\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 implements OnInit, OnDestroy {\r\n @ViewChild('file', { static: true }) file!: ElementRef;\r\n files: XUploadNode[] = [];\r\n showUpload = false;\r\n uploadNodes: XUploadNode[] = [];\r\n locale: XI18nUpload = {};\r\n portal!: XPortalOverlayRef<XUploadPortalComponent>;\r\n\r\n get getText() {\r\n return this.text || this.locale.uploadText;\r\n }\r\n\r\n get isTemplateText() {\r\n return XIsTemplateRef(this.getText);\r\n }\r\n\r\n private _unSubject = new Subject<void>();\r\n\r\n override writeValue(value: XUploadNode[]) {\r\n this.value = value;\r\n this.setFiles();\r\n this.cdr.detectChanges();\r\n }\r\n\r\n constructor(\r\n public renderer: Renderer2,\r\n public elementRef: ElementRef,\r\n @Optional() public http: HttpClient,\r\n public override cdr: ChangeDetectorRef,\r\n public portalService: XPortalService,\r\n public viewContainerRef: ViewContainerRef,\r\n public i18n: XI18nService,\r\n public configService: XConfigService\r\n ) {\r\n super();\r\n if (!http) {\r\n throw new Error(`${XUploadPrefix}: Not found 'HttpClient', You can import 'HttpClientModule' in your root module.`);\r\n }\r\n }\r\n\r\n ngOnInit() {\r\n this.i18n.localeChange\r\n .pipe(\r\n map((x) => x.upload as XI18nUpload),\r\n takeUntil(this._unSubject)\r\n )\r\n .subscribe((x) => {\r\n this.locale = x;\r\n this.cdr.markForCheck();\r\n });\r\n if (this.type === 'img') this.accept = 'image/*';\r\n }\r\n\r\n ngOnDestroy() {\r\n this._unSubject.next();\r\n this._unSubject.unsubscribe();\r\n }\r\n\r\n setFiles() {\r\n if (!Array.isArray(this.value)) return;\r\n // if (this.type !== 'img') return;\r\n this.files = this.value.map((x) => {\r\n if (!x.state) x.state = 'success';\r\n return x;\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 ? Number(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 = true;\r\n if (this.multipleModel === 'cover') {\r\n this.files = files;\r\n } else if (this.multipleModel === 'add') {\r\n this.files = [...this.files, ...files];\r\n }\r\n this.value = this.files;\r\n this.onChange && this.onChange(this.value);\r\n this.onUploading();\r\n input.value = '';\r\n this.cdr.detectChanges();\r\n }\r\n\r\n remove(file: XUploadNode, index: number) {\r\n this.files.splice(index, 1);\r\n if (this.files.length === 0) this.file.nativeElement.value = '';\r\n this.showUpload = 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.splice(vindex, 1);\r\n this.onChange && this.onChange(this.value);\r\n }\r\n this.removeClick.emit({ file: file, index: index });\r\n this.cdr.detectChanges();\r\n }\r\n\r\n uploadClick() {\r\n if (this.disabled) 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];\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[index] = file;\r\n }\r\n this.uploadSuccess.emit(file);\r\n this.cdr.detectChanges();\r\n };\r\n })\r\n )\r\n )\r\n .subscribe(\r\n () => {\r\n this.showUpload = this.files.find((y) => y.state === 'ready') != null;\r\n this.cdr.detectChanges();\r\n },\r\n () => {\r\n file.state = 'error';\r\n this.uploadError.emit(file);\r\n this.cdr.detectChanges();\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 `开始上传文件`;\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 `上传中`;\r\n case HttpEventType.Response:\r\n file.state = 'success';\r\n successFunc(event.body);\r\n return `文件上传完毕`;\r\n }\r\n return;\r\n }\r\n\r\n trackByItem(_index: number, item: XUploadNode) {\r\n return `${item.name}-${item.lastModified}`;\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 Object.assign(componentRef.instance, {\r\n file: file,\r\n closePortal: () => this.closePortal(),\r\n destroyPortal: () => this.destroyPortal(),\r\n surePortal: (blob: 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 componentRef.changeDetectorRef.detectChanges();\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 this.cdr.detectChanges();\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n destroyPortal() {\r\n this.portal?.overlayRef?.dispose();\r\n }\r\n\r\n imgError(_event: ErrorEvent, file: XUploadNode) {\r\n file.state = 'error';\r\n this.cdr.detectChanges();\r\n }\r\n\r\n imgLoad(file: XUploadNode) {\r\n file.state = 'success';\r\n this.cdr.detectChanges();\r\n }\r\n}\r\n","<div #upload class=\"x-upload x-upload-{{ type }}\" [class.x-disabled]=\"disabled\">\r\n <input type=\"file\" #file (change)=\"change($event)\" [attr.accept]=\"accept\" [multiple]=\"multiple\" style=\"display: none\" />\r\n\r\n <ng-container [ngSwitch]=\"type\">\r\n <ng-container *ngSwitchCase=\"'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 <li *ngFor=\"let file of files; index as i; trackBy: trackByItem\" [class.x-upload-disabled]=\"!download\">\r\n <ng-container *ngIf=\"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 </ng-container>\r\n <ng-container *ngIf=\"!download\">\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 </ng-container>\r\n\r\n <ng-container [ngSwitch]=\"file.state\">\r\n <x-icon class=\"x-upload-state\" *ngSwitchCase=\"'ready'\" type=\"fto-clock\"></x-icon>\r\n <span class=\"x-upload-percent\" *ngSwitchCase=\"'uploading'\">{{ file.percent }}%</span>\r\n <x-icon class=\"x-upload-state success\" *ngSwitchCase=\"'success'\" type=\"fto-check\"></x-icon>\r\n <x-icon class=\"x-upload-state error\" *ngSwitchCase=\"'error'\" type=\"fto-info\"></x-icon>\r\n </ng-container>\r\n <x-button *ngIf=\"file.state !== 'uploading'\" icon=\"fto-x\" (click)=\"remove(file, i)\" onlyIcon closable size=\"mini\"></x-button>\r\n </li>\r\n </ul>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'img'\">\r\n <x-image-group>\r\n <ng-container *ngFor=\"let file of files; index as i; trackBy: trackByItem\">\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 <div class=\"x-upload-uploading\" *ngIf=\"file.state == 'uploading'\">\r\n <x-progress [percent]=\"file.percent!\" info=\"false\"></x-progress>\r\n </div>\r\n <div class=\"x-image-overlay\">\r\n <ng-container [ngSwitch]=\"file.state\">\r\n <x-icon class=\"x-upload-state\" *ngSwitchCase=\"'ready'\" type=\"fto-clock\"></x-icon>\r\n <x-icon type=\"fto-eye\" *ngSwitchCase=\"'success'\" (click)=\"image.onPreview()\"></x-icon>\r\n </ng-container>\r\n <x-icon *ngIf=\"imgCut && file.state === 'success'\" type=\"fto-crop\" (click)=\"onImgCut(file, i)\"></x-icon>\r\n <x-icon *ngIf=\"file.state !== 'uploading'\" type=\"fto-trash-2\" (click)=\"remove(file, i)\"></x-icon>\r\n </div>\r\n </ng-template>\r\n </ng-container>\r\n <ng-container *ngTemplateOutlet=\"uploadBtnTpl\"></ng-container>\r\n </x-image-group>\r\n </ng-container>\r\n </ng-container>\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\" [disabled]=\"disabled\" type=\"primary\">{{ getText }}</x-button>\r\n </ng-container>\r\n </div>\r\n</ng-template>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { XUploadComponent } from './upload.component';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { XButtonModule } from '@ng-nest/ui/button';\r\nimport { XIconModule } from '@ng-nest/ui/icon';\r\nimport { XUploadProperty } from './upload.property';\r\nimport { XI18nModule } from '@ng-nest/ui/i18n';\r\nimport { XOutletModule } from '@ng-nest/ui/outlet';\r\nimport { XPortalModule } from '@ng-nest/ui/portal';\r\nimport { XUploadPortalComponent } from './upload-portal.component';\r\nimport { DragDropModule } from '@angular/cdk/drag-drop';\r\nimport { XBaseFormModule } from '@ng-nest/ui/base-form';\r\nimport { XImageModule } from '@ng-nest/ui/image';\r\nimport { XProgressModule } from '@ng-nest/ui/progress';\r\n\r\n@NgModule({\r\n declarations: [XUploadComponent, XUploadPortalComponent, XUploadProperty],\r\n exports: [XUploadComponent],\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n DragDropModule,\r\n XPortalModule,\r\n XOutletModule,\r\n XButtonModule,\r\n XIconModule,\r\n XI18nModule,\r\n XBaseFormModule,\r\n XImageModule,\r\n XProgressMod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AAA,aAAa,YAdtB,YAAY;QACZ,WAAW;QACX,mBAAmB;QACnB,cAAc;QACd,aAAa;QACb,aAAa;QACb,aAAa;QACb,WAAW;QACX,WAAW;QACX,eAAe;QACf,YAAY;QACZ,eAAe,CAAA,EAAA,CAAA,CAAA;4FAGN,aAAa,EAAA,UAAA,EAAA,CAAA;kBAlBzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,gBAAgB,EAAE,sBAAsB,EAAE,eAAe,CAAC;oBACzE,OAAO,EAAE,CAAC,gBAAgB,CAAC;AAC3B,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,WAAW;wBACX,mBAAmB;wBACnB,cAAc;wBACd,aAAa;wBACb,aAAa;wBACb,aAAa;wBACb,WAAW;wBACX,WAAW;wBACX,eAAe;wBACf,YAAY;wBACZ,eAAe;AAChB,qBAAA;AACF,iBAAA,CAAA;;;ACjCD;;AAEG;;;;"}
@@ -2,9 +2,8 @@ import * as i0 from "@angular/core";
2
2
  import * as i1 from "./icon.component";
3
3
  import * as i2 from "./icon.property";
4
4
  import * as i3 from "@angular/common";
5
- import * as i4 from "@angular/common/http";
6
5
  export declare class XIconModule {
7
6
  static ɵfac: i0.ɵɵFactoryDeclaration<XIconModule, never>;
8
- static ɵmod: i0.ɵɵNgModuleDeclaration<XIconModule, [typeof i1.XIconComponent, typeof i2.XIconProperty], [typeof i3.CommonModule, typeof i4.HttpClientModule], [typeof i1.XIconComponent]>;
7
+ static ɵmod: i0.ɵɵNgModuleDeclaration<XIconModule, [typeof i1.XIconComponent, typeof i2.XIconProperty], [typeof i3.CommonModule], [typeof i1.XIconComponent]>;
9
8
  static ɵinj: i0.ɵɵInjectorDeclaration<XIconModule>;
10
9
  }
@@ -24,7 +24,7 @@ export declare class XIconService {
24
24
  private runTask;
25
25
  getSvgs(...icons: string[]): Observable<string[]>;
26
26
  getSvgElement(icon: string): Observable<string>;
27
- static ɵfac: i0.ɵɵFactoryDeclaration<XIconService, never>;
27
+ static ɵfac: i0.ɵɵFactoryDeclaration<XIconService, [null, { optional: true; }]>;
28
28
  static ɵprov: i0.ɵɵInjectableDeclaration<XIconService>;
29
29
  }
30
30
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ng-nest/ui",
3
- "version": "14.0.13",
3
+ "version": "14.0.14",
4
4
  "homepage": "https://www.ngnest.com",
5
5
  "author": "ng-nest",
6
6
  "ng-update": {
@@ -25,6 +25,6 @@ export declare class XTreeFileComponent extends XTreeFileProperty {
25
25
  imgOnload(): void;
26
26
  setCurmbData(node: XTreeFileNode): XCrumbNode[];
27
27
  menuToggle(): void;
28
- static ɵfac: i0.ɵɵFactoryDeclaration<XTreeFileComponent, never>;
28
+ static ɵfac: i0.ɵɵFactoryDeclaration<XTreeFileComponent, [null, null, null, { optional: true; }, null]>;
29
29
  static ɵcmp: i0.ɵɵComponentDeclaration<XTreeFileComponent, "x-tree-file", never, {}, {}, never, never, false>;
30
30
  }
@@ -2,15 +2,14 @@ import * as i0 from "@angular/core";
2
2
  import * as i1 from "./tree-file.component";
3
3
  import * as i2 from "./tree-file.property";
4
4
  import * as i3 from "@angular/common";
5
- import * as i4 from "@angular/common/http";
6
- import * as i5 from "@ng-nest/ui/tree";
7
- import * as i6 from "@ng-nest/ui/link";
8
- import * as i7 from "@ng-nest/ui/crumb";
9
- import * as i8 from "@ng-nest/ui/icon";
10
- import * as i9 from "@ng-nest/ui/loading";
11
- import * as i10 from "@ng-nest/ui/highlight";
5
+ import * as i4 from "@ng-nest/ui/tree";
6
+ import * as i5 from "@ng-nest/ui/link";
7
+ import * as i6 from "@ng-nest/ui/crumb";
8
+ import * as i7 from "@ng-nest/ui/icon";
9
+ import * as i8 from "@ng-nest/ui/loading";
10
+ import * as i9 from "@ng-nest/ui/highlight";
12
11
  export declare class XTreeFileModule {
13
12
  static ɵfac: i0.ɵɵFactoryDeclaration<XTreeFileModule, never>;
14
- static ɵmod: i0.ɵɵNgModuleDeclaration<XTreeFileModule, [typeof i1.XTreeFileComponent, typeof i2.XTreeFileProperty], [typeof i3.CommonModule, typeof i4.HttpClientModule, typeof i5.XTreeModule, typeof i6.XLinkModule, typeof i7.XCrumbModule, typeof i8.XIconModule, typeof i9.XLoadingModule, typeof i10.XHighlightModule], [typeof i1.XTreeFileComponent]>;
13
+ static ɵmod: i0.ɵɵNgModuleDeclaration<XTreeFileModule, [typeof i1.XTreeFileComponent, typeof i2.XTreeFileProperty], [typeof i3.CommonModule, typeof i4.XTreeModule, typeof i5.XLinkModule, typeof i6.XCrumbModule, typeof i7.XIconModule, typeof i8.XLoadingModule, typeof i9.XHighlightModule], [typeof i1.XTreeFileComponent]>;
15
14
  static ɵinj: i0.ɵɵInjectorDeclaration<XTreeFileModule>;
16
15
  }
@@ -43,6 +43,6 @@ export declare class XUploadComponent extends XUploadProperty implements OnInit,
43
43
  destroyPortal(): void;
44
44
  imgError(_event: ErrorEvent, file: XUploadNode): void;
45
45
  imgLoad(file: XUploadNode): void;
46
- static ɵfac: i0.ɵɵFactoryDeclaration<XUploadComponent, never>;
46
+ static ɵfac: i0.ɵɵFactoryDeclaration<XUploadComponent, [null, null, { optional: true; }, null, null, null, null, null]>;
47
47
  static ɵcmp: i0.ɵɵComponentDeclaration<XUploadComponent, "x-upload", never, {}, {}, never, never, false>;
48
48
  }