@ebuilding/form 2.4.0 → 2.4.2

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.
@@ -0,0 +1,217 @@
1
+ import * as i0 from '@angular/core';
2
+ import { ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
3
+ import * as i3 from '@angular/common';
4
+ import { CommonModule } from '@angular/common';
5
+ import * as i1$1 from '@ebuilding-form/core';
6
+ import { FieldType, FormlyModule } from '@ebuilding-form/core';
7
+ import { DeonNzFormFieldModule } from '@ebuilding/form/form-field';
8
+ import { ReactiveFormsModule } from '@angular/forms';
9
+ import * as i4 from 'ng-zorro-antd/upload';
10
+ import { NzUploadModule } from 'ng-zorro-antd/upload';
11
+ import * as i5 from 'ng-zorro-antd/icon';
12
+ import { NzIconModule } from 'ng-zorro-antd/icon';
13
+ import { NzModalModule } from 'ng-zorro-antd/modal';
14
+ import * as i6 from '@ebuilding/abc/empty';
15
+ import { GramDeonEmptyModule } from '@ebuilding/abc/empty';
16
+ import { ModuleAPI } from '@ebuilding/base/shared.var/shared.constant';
17
+ import * as i1 from '@delon/theme';
18
+ import * as i2 from 'ng-zorro-antd/message';
19
+
20
+ class DeonNzFieldAttachment extends FieldType {
21
+ http;
22
+ msg;
23
+ fileList = [];
24
+ previewImage;
25
+ previewVisible = false;
26
+ constructor(http, msg) {
27
+ super();
28
+ this.http = http;
29
+ this.msg = msg;
30
+ }
31
+ /** 是否多图 */
32
+ get isMultiple() {
33
+ return this.to?.selectType === 'multiple';
34
+ }
35
+ /** 最大数量 */
36
+ get maxCount() {
37
+ if (!this.isMultiple)
38
+ return 1;
39
+ return this.to?.max || 8;
40
+ }
41
+ ngOnInit() {
42
+ this.initValue();
43
+ /** 解决页面渲染后赋值 */
44
+ this.formControl.valueChanges.subscribe(() => {
45
+ if (this.fileList.length === 0) {
46
+ this.initValue();
47
+ }
48
+ });
49
+ }
50
+ /**
51
+ * 初始化回显
52
+ */
53
+ initValue() {
54
+ const value = this.formControl.value;
55
+ if (!value)
56
+ return;
57
+ const arr = Array.isArray(value) ? value : [value];
58
+ this.fileList = arr.map((item, index) => ({
59
+ uid: item.id || String(index),
60
+ name: item.fileName,
61
+ status: 'done',
62
+ url: item.fileUrl,
63
+ thumbUrl: item.fileUrl
64
+ }));
65
+ }
66
+ /**
67
+ * 上传前
68
+ */
69
+ beforeUpload = (file) => {
70
+ const realFile = file;
71
+ if (!realFile)
72
+ return false;
73
+ /** 限制 50MB */
74
+ const isLt5M = realFile.size / 1024 / 1024 < 50;
75
+ if (!isLt5M) {
76
+ this.msg.warning('附件不能超过50MB');
77
+ return false;
78
+ }
79
+ const reader = new FileReader();
80
+ reader.onload = () => {
81
+ const target = this.fileList.find(f => f.uid === file.uid);
82
+ if (target) {
83
+ target.thumbUrl = reader.result;
84
+ this.fileList = [...this.fileList];
85
+ }
86
+ };
87
+ reader.readAsDataURL(realFile);
88
+ return true;
89
+ };
90
+ /**
91
+ * 上传
92
+ */
93
+ uploadRequest = (item) => {
94
+ const file = item.file;
95
+ const realFile = file.originFileObj ||
96
+ item.file;
97
+ const formData = new FormData();
98
+ formData.append('type', 'OTHER');
99
+ formData.append('multipartFile', realFile);
100
+ return this.http
101
+ .post(`${ModuleAPI.system}/user/comm/uploadFile`, formData)
102
+ .subscribe({
103
+ next: (res) => {
104
+ if (res && res?.result) {
105
+ const data = res.result;
106
+ file.status = 'done';
107
+ file.url = data.fileUrl;
108
+ file.thumbUrl = data.fileUrl;
109
+ /** 保存 id */
110
+ file.id = data.id;
111
+ if (!this.isMultiple) {
112
+ this.fileList = [file];
113
+ }
114
+ else {
115
+ this.fileList = [...this.fileList];
116
+ }
117
+ this.updateModel();
118
+ item.onSuccess?.(res, file, null);
119
+ }
120
+ else {
121
+ file.status = 'error';
122
+ item.onError?.(res, file);
123
+ }
124
+ },
125
+ error: err => {
126
+ file.status = 'error';
127
+ item.onError?.(err, file);
128
+ }
129
+ });
130
+ };
131
+ /**
132
+ * 删除
133
+ */
134
+ remove = (file) => {
135
+ const index = this.fileList.indexOf(file);
136
+ if (index > -1) {
137
+ this.fileList.splice(index, 1);
138
+ }
139
+ this.updateModel();
140
+ return true;
141
+ };
142
+ fileChange(e) { }
143
+ /**
144
+ * 写回 model
145
+ */
146
+ updateModel() {
147
+ let arr = [];
148
+ if (this.fileList && this.fileList.length > 0) {
149
+ this.fileList.forEach((item) => {
150
+ if (item && item["status"] === 'done' && item["url"]) {
151
+ arr.push({
152
+ id: item.id,
153
+ fileName: item.name,
154
+ fileUrl: item.url
155
+ });
156
+ }
157
+ });
158
+ }
159
+ if (this.isMultiple) {
160
+ this.formControl.setValue(arr);
161
+ }
162
+ else {
163
+ this.formControl.setValue(arr[0] || null);
164
+ }
165
+ }
166
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzFieldAttachment, deps: [{ token: i1._HttpClient }, { token: i2.NzMessageService }], target: i0.ɵɵFactoryTarget.Component });
167
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: DeonNzFieldAttachment, isStandalone: true, selector: "deon-nz-field-attachment", usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"editor == false; else tmpField\">\r\n <nz-upload [nzShowButton]=\"false\" [nzDisabled]=\"true\" [(nzFileList)]=\"fileList\" [(nzFileList)]=\"fileList\"\r\n class=\"upload-view\" *ngIf=\"fileList && fileList.length>0;else tmpEmpty\">\r\n </nz-upload>\r\n\r\n <ng-template #tmpEmpty>\r\n\r\n <div class=\"upload-empty\">\r\n <gram-empty></gram-empty>\r\n </div>\r\n </ng-template>\r\n\r\n</ng-container>\r\n<ng-template #tmpField>\r\n <nz-upload nzType=\"drag\" [nzLimit]=\"1\" [nzShowButton]=\"fileList.length < maxCount\" [nzMultiple]=\"isMultiple\"\r\n [nzDisabled]=\"fileList && fileList.length>=maxCount\" [(nzFileList)]=\"fileList\" [nzBeforeUpload]=\"beforeUpload\"\r\n [nzRemove]=\"remove\" [nzCustomRequest]=\"uploadRequest\" [(nzFileList)]=\"fileList\">\r\n <p class=\"ant-upload-drag-icon\">\r\n <i nz-icon nzType=\"inbox\"></i>\r\n </p>\r\n <p class=\"ant-upload-text\">\u5355\u51FB\u6216\u62D6\u52A8\u6587\u4EF6\u5230\u6B64\u533A\u57DF\u4EE5\u4E0A\u4F20</p>\r\n <p class=\"ant-upload-hint\">\u5355\u4E2A\u6587\u4EF6\u5927\u5C0F\u4E0D\u80FD\u8D85\u8FC750MB\uFF08\u6700\u591A\u53EF\u4EE5\u4E0A\u4F20{{maxCount}}\u4E2A\u6587\u4EF6\uFF09</p>\r\n </nz-upload>\r\n</ng-template>", styles: [":host ::ng-deep .upload-empty-box{font-size:12px}:host ::ng-deep .ant-upload-list{display:inline-block}:host ::ng-deep .ant-upload-list-picture-card-container{width:80px;height:80px;margin:0 8px 8px 0}:host ::ng-deep .ant-upload.ant-upload-select-picture-card{width:80px;height:80px}:host ::ng-deep .ant-upload-list-picture-card .ant-upload-list-item{width:80px;height:80px;padding:0}:host ::ng-deep .ant-upload-list-picture-card .ant-upload-list-item-thumbnail{width:100%;height:100%}:host ::ng-deep .ant-upload-list-picture-card .ant-upload-list-item-thumbnail img{width:100%;height:100%;object-fit:cover}:host ::ng-deep .ant-upload-list-item-name{font-size:12px}:host ::ng-deep .ant-upload-list-item-uploading{font-size:12px}:host ::ng-deep .ant-upload-list-item-progress{font-size:12px}:host ::ng-deep .upload-view .ant-upload-list-item-card-actions button:nth-last-child(1){display:none!important}:host ::ng-deep .upload-empty{padding:15px;text-align:center;background:#f5f5f5}:host ::ng-deep .upload-empty .image{width:100px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: FormlyModule }, { kind: "ngmodule", type: NzUploadModule }, { kind: "component", type: i4.NzUploadComponent, selector: "nz-upload", inputs: ["nzType", "nzLimit", "nzSize", "nzFileType", "nzAccept", "nzAction", "nzDirectory", "nzOpenFileDialogOnClick", "nzBeforeUpload", "nzCustomRequest", "nzData", "nzFilter", "nzFileList", "nzDisabled", "nzHeaders", "nzListType", "nzMultiple", "nzName", "nzShowUploadList", "nzShowButton", "nzWithCredentials", "nzRemove", "nzPreview", "nzPreviewFile", "nzPreviewIsImage", "nzTransformFile", "nzDownload", "nzIconRender", "nzFileListRender"], outputs: ["nzChange", "nzFileListChange"], exportAs: ["nzUpload"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i5.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: NzModalModule }, { kind: "ngmodule", type: GramDeonEmptyModule }, { kind: "component", type: i6.GramDeonEmptyComponent, selector: "gram-empty", inputs: ["desc", "state"], outputs: ["emptyClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
168
+ }
169
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzFieldAttachment, decorators: [{
170
+ type: Component,
171
+ args: [{ selector: 'deon-nz-field-attachment', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
172
+ CommonModule,
173
+ ReactiveFormsModule,
174
+ FormlyModule,
175
+ NzUploadModule,
176
+ NzIconModule,
177
+ NzModalModule, GramDeonEmptyModule
178
+ ], template: "<ng-container *ngIf=\"editor == false; else tmpField\">\r\n <nz-upload [nzShowButton]=\"false\" [nzDisabled]=\"true\" [(nzFileList)]=\"fileList\" [(nzFileList)]=\"fileList\"\r\n class=\"upload-view\" *ngIf=\"fileList && fileList.length>0;else tmpEmpty\">\r\n </nz-upload>\r\n\r\n <ng-template #tmpEmpty>\r\n\r\n <div class=\"upload-empty\">\r\n <gram-empty></gram-empty>\r\n </div>\r\n </ng-template>\r\n\r\n</ng-container>\r\n<ng-template #tmpField>\r\n <nz-upload nzType=\"drag\" [nzLimit]=\"1\" [nzShowButton]=\"fileList.length < maxCount\" [nzMultiple]=\"isMultiple\"\r\n [nzDisabled]=\"fileList && fileList.length>=maxCount\" [(nzFileList)]=\"fileList\" [nzBeforeUpload]=\"beforeUpload\"\r\n [nzRemove]=\"remove\" [nzCustomRequest]=\"uploadRequest\" [(nzFileList)]=\"fileList\">\r\n <p class=\"ant-upload-drag-icon\">\r\n <i nz-icon nzType=\"inbox\"></i>\r\n </p>\r\n <p class=\"ant-upload-text\">\u5355\u51FB\u6216\u62D6\u52A8\u6587\u4EF6\u5230\u6B64\u533A\u57DF\u4EE5\u4E0A\u4F20</p>\r\n <p class=\"ant-upload-hint\">\u5355\u4E2A\u6587\u4EF6\u5927\u5C0F\u4E0D\u80FD\u8D85\u8FC750MB\uFF08\u6700\u591A\u53EF\u4EE5\u4E0A\u4F20{{maxCount}}\u4E2A\u6587\u4EF6\uFF09</p>\r\n </nz-upload>\r\n</ng-template>", styles: [":host ::ng-deep .upload-empty-box{font-size:12px}:host ::ng-deep .ant-upload-list{display:inline-block}:host ::ng-deep .ant-upload-list-picture-card-container{width:80px;height:80px;margin:0 8px 8px 0}:host ::ng-deep .ant-upload.ant-upload-select-picture-card{width:80px;height:80px}:host ::ng-deep .ant-upload-list-picture-card .ant-upload-list-item{width:80px;height:80px;padding:0}:host ::ng-deep .ant-upload-list-picture-card .ant-upload-list-item-thumbnail{width:100%;height:100%}:host ::ng-deep .ant-upload-list-picture-card .ant-upload-list-item-thumbnail img{width:100%;height:100%;object-fit:cover}:host ::ng-deep .ant-upload-list-item-name{font-size:12px}:host ::ng-deep .ant-upload-list-item-uploading{font-size:12px}:host ::ng-deep .ant-upload-list-item-progress{font-size:12px}:host ::ng-deep .upload-view .ant-upload-list-item-card-actions button:nth-last-child(1){display:none!important}:host ::ng-deep .upload-empty{padding:15px;text-align:center;background:#f5f5f5}:host ::ng-deep .upload-empty .image{width:100px}\n"] }]
179
+ }], ctorParameters: () => [{ type: i1._HttpClient }, { type: i2.NzMessageService }] });
180
+
181
+ function withFormlyFieldAttachment() {
182
+ return {
183
+ types: [
184
+ {
185
+ name: 'attachment',
186
+ component: DeonNzFieldAttachment,
187
+ wrappers: ['formly-form-field'],
188
+ }
189
+ ],
190
+ };
191
+ }
192
+
193
+ class DeonNzAttachmentModule {
194
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzAttachmentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
195
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: DeonNzAttachmentModule, imports: [CommonModule,
196
+ DeonNzFormFieldModule, i1$1.FormlyModule] });
197
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzAttachmentModule, imports: [CommonModule,
198
+ DeonNzFormFieldModule,
199
+ FormlyModule.forChild(withFormlyFieldAttachment())] });
200
+ }
201
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzAttachmentModule, decorators: [{
202
+ type: NgModule,
203
+ args: [{
204
+ imports: [
205
+ CommonModule,
206
+ DeonNzFormFieldModule,
207
+ FormlyModule.forChild(withFormlyFieldAttachment()),
208
+ ],
209
+ }]
210
+ }] });
211
+
212
+ /**
213
+ * Generated bundle index. Do not edit.
214
+ */
215
+
216
+ export { DeonNzAttachmentModule, DeonNzFieldAttachment, withFormlyFieldAttachment };
217
+ //# sourceMappingURL=type.attachment.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type.attachment.mjs","sources":["../../../../packages/form/attachment/src/default/index.ts","../../../../packages/form/attachment/src/default/index.html","../../../../packages/form/attachment/src/attachment.config.ts","../../../../packages/form/attachment/src/attachment.module.ts","../../../../packages/form/attachment/type.attachment.ts"],"sourcesContent":["import {\r\n Component,\r\n ChangeDetectionStrategy\r\n} from '@angular/core';\r\n\r\nimport { CommonModule } from '@angular/common';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\nimport { _HttpClient } from '@delon/theme';\r\n\r\nimport {\r\n FormlyModule,\r\n FieldType,\r\n FieldTypeConfig\r\n} from '@ebuilding-form/core';\r\n\r\nimport {\r\n NzUploadFile,\r\n NzUploadModule,\r\n NzUploadXHRArgs\r\n} from 'ng-zorro-antd/upload';\r\n\r\nimport { NzIconModule } from 'ng-zorro-antd/icon';\r\nimport { NzModalModule } from 'ng-zorro-antd/modal';\r\nimport { NzMessageService } from 'ng-zorro-antd/message';\r\nimport { Subscription } from 'rxjs';\r\n\r\nimport { GramDeonEmptyModule } from '@ebuilding/abc/empty';\r\nimport { ModuleAPI } from '@ebuilding/base/shared.var/shared.constant';\r\n\r\n@Component({\r\n selector: 'deon-nz-field-attachment',\r\n templateUrl: './index.html',\r\n styleUrls: ['./index.less'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n standalone: true,\r\n imports: [\r\n CommonModule,\r\n ReactiveFormsModule,\r\n FormlyModule,\r\n NzUploadModule,\r\n NzIconModule,\r\n NzModalModule, GramDeonEmptyModule\r\n ]\r\n})\r\nexport class DeonNzFieldAttachment extends FieldType<FieldTypeConfig> {\r\n\r\n fileList: NzUploadFile[] = [];\r\n\r\n previewImage?: string;\r\n previewVisible = false;\r\n\r\n constructor(private http: _HttpClient, private msg: NzMessageService) {\r\n super();\r\n }\r\n\r\n /** 是否多图 */\r\n get isMultiple(): boolean {\r\n return this.to?.selectType === 'multiple';\r\n }\r\n\r\n /** 最大数量 */\r\n get maxCount(): number {\r\n if (!this.isMultiple) return 1;\r\n return this.to?.max || 8;\r\n }\r\n\r\n ngOnInit(): void {\r\n this.initValue();\r\n /** 解决页面渲染后赋值 */\r\n this.formControl.valueChanges.subscribe(() => {\r\n if (this.fileList.length === 0) {\r\n this.initValue();\r\n }\r\n\r\n });\r\n\r\n }\r\n\r\n /**\r\n * 初始化回显\r\n */\r\n initValue() {\r\n const value = this.formControl.value;\r\n if (!value) return;\r\n const arr = Array.isArray(value) ? value : [value];\r\n this.fileList = arr.map((item: any, index: number) => ({\r\n uid: item.id || String(index),\r\n name: item.fileName,\r\n status: 'done',\r\n url: item.fileUrl,\r\n thumbUrl: item.fileUrl\r\n }));\r\n }\r\n\r\n /**\r\n * 上传前\r\n */\r\n beforeUpload = (file: NzUploadFile): boolean => {\r\n const realFile = file as unknown as File\r\n if (!realFile) return false;\r\n /** 限制 50MB */\r\n const isLt5M = realFile.size / 1024 / 1024 < 50;\r\n if (!isLt5M) {\r\n this.msg.warning('附件不能超过50MB');\r\n return false;\r\n }\r\n const reader = new FileReader();\r\n reader.onload = () => {\r\n const target = this.fileList.find(f => f.uid === file.uid);\r\n if (target) {\r\n target.thumbUrl = reader.result as string;\r\n this.fileList = [...this.fileList];\r\n }\r\n };\r\n\r\n reader.readAsDataURL(realFile);\r\n\r\n return true;\r\n\r\n };\r\n\r\n /**\r\n * 上传\r\n */\r\n uploadRequest = (item: NzUploadXHRArgs): Subscription => {\r\n\r\n const file = item.file as NzUploadFile;\r\n\r\n const realFile =\r\n file.originFileObj ||\r\n (item.file as unknown as File);\r\n\r\n const formData = new FormData();\r\n\r\n formData.append('type', 'OTHER');\r\n formData.append('multipartFile', realFile);\r\n\r\n return this.http\r\n .post(`${ModuleAPI.system}/user/comm/uploadFile`, formData)\r\n .subscribe({\r\n\r\n next: (res: any) => {\r\n if (res && res?.result) {\r\n const data: any = res.result;\r\n\r\n file.status = 'done';\r\n file.url = data.fileUrl;\r\n file.thumbUrl = data.fileUrl;\r\n\r\n /** 保存 id */\r\n (file as any).id = data.id;\r\n\r\n if (!this.isMultiple) {\r\n this.fileList = [file];\r\n } else {\r\n this.fileList = [...this.fileList];\r\n }\r\n this.updateModel();\r\n item.onSuccess?.(res, file, null);\r\n } else {\r\n file.status = 'error';\r\n item.onError?.(res, file);\r\n }\r\n },\r\n error: err => {\r\n file.status = 'error';\r\n item.onError?.(err, file);\r\n }\r\n });\r\n };\r\n\r\n /**\r\n * 删除\r\n */\r\n remove = (file: NzUploadFile): boolean => {\r\n const index = this.fileList.indexOf(file);\r\n if (index > -1) {\r\n this.fileList.splice(index, 1);\r\n }\r\n this.updateModel();\r\n return true;\r\n\r\n };\r\n\r\n\r\n fileChange(e: any) { }\r\n\r\n\r\n /**\r\n * 写回 model\r\n */\r\n updateModel() {\r\n let arr: any[] = [];\r\n if (this.fileList && this.fileList.length > 0) {\r\n this.fileList.forEach((item: any) => {\r\n if (item && item[\"status\"] === 'done' && item[\"url\"]) {\r\n arr.push({\r\n id: item.id,\r\n fileName: item.name,\r\n fileUrl: item.url\r\n });\r\n }\r\n })\r\n }\r\n\r\n if (this.isMultiple) {\r\n this.formControl.setValue(arr);\r\n } else {\r\n this.formControl.setValue(arr[0] || null);\r\n }\r\n }\r\n\r\n}","<ng-container *ngIf=\"editor == false; else tmpField\">\r\n <nz-upload [nzShowButton]=\"false\" [nzDisabled]=\"true\" [(nzFileList)]=\"fileList\" [(nzFileList)]=\"fileList\"\r\n class=\"upload-view\" *ngIf=\"fileList && fileList.length>0;else tmpEmpty\">\r\n </nz-upload>\r\n\r\n <ng-template #tmpEmpty>\r\n\r\n <div class=\"upload-empty\">\r\n <gram-empty></gram-empty>\r\n </div>\r\n </ng-template>\r\n\r\n</ng-container>\r\n<ng-template #tmpField>\r\n <nz-upload nzType=\"drag\" [nzLimit]=\"1\" [nzShowButton]=\"fileList.length < maxCount\" [nzMultiple]=\"isMultiple\"\r\n [nzDisabled]=\"fileList && fileList.length>=maxCount\" [(nzFileList)]=\"fileList\" [nzBeforeUpload]=\"beforeUpload\"\r\n [nzRemove]=\"remove\" [nzCustomRequest]=\"uploadRequest\" [(nzFileList)]=\"fileList\">\r\n <p class=\"ant-upload-drag-icon\">\r\n <i nz-icon nzType=\"inbox\"></i>\r\n </p>\r\n <p class=\"ant-upload-text\">单击或拖动文件到此区域以上传</p>\r\n <p class=\"ant-upload-hint\">单个文件大小不能超过50MB(最多可以上传{{maxCount}}个文件)</p>\r\n </nz-upload>\r\n</ng-template>","import { ConfigOption } from '@ebuilding-form/core';\nimport { DeonNzFieldAttachment } from './default/index';\n\nexport function withFormlyFieldAttachment(): ConfigOption {\n return {\n types: [\n {\n name: 'attachment',\n component: DeonNzFieldAttachment,\n wrappers: ['formly-form-field'],\n }\n ],\n };\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ebuilding-form/core';\nimport { DeonNzFormFieldModule } from '@ebuilding/form/form-field';\nimport { withFormlyFieldAttachment } from './attachment.config';\n\n@NgModule({\n imports: [\n CommonModule,\n DeonNzFormFieldModule,\n FormlyModule.forChild(withFormlyFieldAttachment()),\n ],\n})\nexport class DeonNzAttachmentModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;;;;AA4CM,MAAO,qBAAsB,SAAQ,SAA0B,CAAA;AAO/C,IAAA,IAAA;AAA2B,IAAA,GAAA;IAL/C,QAAQ,GAAmB,EAAE;AAE7B,IAAA,YAAY;IACZ,cAAc,GAAG,KAAK;IAEtB,WAAoB,CAAA,IAAiB,EAAU,GAAqB,EAAA;AAClE,QAAA,KAAK,EAAE;QADW,IAAI,CAAA,IAAA,GAAJ,IAAI;QAAuB,IAAG,CAAA,GAAA,GAAH,GAAG;;;AAKlD,IAAA,IAAI,UAAU,GAAA;AACZ,QAAA,OAAO,IAAI,CAAC,EAAE,EAAE,UAAU,KAAK,UAAU;;;AAI3C,IAAA,IAAI,QAAQ,GAAA;QACV,IAAI,CAAC,IAAI,CAAC,UAAU;AAAE,YAAA,OAAO,CAAC;AAC9B,QAAA,OAAO,IAAI,CAAC,EAAE,EAAE,GAAG,IAAI,CAAC;;IAG1B,QAAQ,GAAA;QACN,IAAI,CAAC,SAAS,EAAE;;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