ngx-formly-zorro-antd 17.0.6 → 17.0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { forwardRef, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, Optional, ViewChild, NgModule } from '@angular/core';
2
+ import { booleanAttribute, forwardRef, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, Optional, ViewChild, NgModule } from '@angular/core';
3
3
  import * as i1 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
5
  import * as i3$1 from '@ngx-formly/core';
@@ -26,8 +26,6 @@ class UploadNzComponent extends NzUploadComponent {
26
26
  this.nzeUploadButtonIcon = {
27
27
  type: 'cloud-upload'
28
28
  };
29
- /** 样式名 */
30
- this.className = '';
31
29
  this.onChange = () => { };
32
30
  this.onTouched = () => { };
33
31
  }
@@ -56,7 +54,7 @@ class UploadNzComponent extends NzUploadComponent {
56
54
  }
57
55
  }
58
56
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: UploadNzComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
59
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.0.6", type: UploadNzComponent, selector: "formly-nz-upload", inputs: { nzeText: "nzeText", nzeHint: "nzeHint", nzeShowUploadButton: "nzeShowUploadButton", nzeUploadButton: "nzeUploadButton", nzeUploadButtonIcon: "nzeUploadButtonIcon", className: "className", resultMap: "resultMap" }, providers: [
57
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.0.6", type: UploadNzComponent, selector: "formly-nz-upload", inputs: { nzeText: "nzeText", nzeHint: "nzeHint", nzeShowUploadButton: ["nzeShowUploadButton", "nzeShowUploadButton", booleanAttribute], nzeUploadButton: "nzeUploadButton", nzeUploadButtonIcon: "nzeUploadButtonIcon", className: "className", resultMap: "resultMap" }, providers: [
60
58
  {
61
59
  provide: NG_VALUE_ACCESSOR,
62
60
  useExisting: forwardRef(() => UploadNzComponent),
@@ -226,7 +224,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.6", ngImpor
226
224
  }], nzeHint: [{
227
225
  type: Input
228
226
  }], nzeShowUploadButton: [{
229
- type: Input
227
+ type: Input,
228
+ args: [{ transform: booleanAttribute }]
230
229
  }], nzeUploadButton: [{
231
230
  type: Input
232
231
  }], nzeUploadButtonIcon: [{
@@ -308,7 +307,7 @@ class FormlyFieldUpload extends FieldType {
308
307
  [nzeText]="props['text']"
309
308
  [nzeUploadButtonIcon]="props['uploadButtonIcon']"
310
309
  [nzeShowUploadButton]="props['showUploadButton']"
311
- [className]="props['className'] || ''"
310
+ [className]="props['className']"
312
311
  (nzFileListChange)="props['fileListChange'] && props['fileListChange'](field, $event)"
313
312
  >
314
313
  </formly-nz-upload>`, isInline: true, dependencies: [{ kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$1.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "component", type: UploadNzComponent, selector: "formly-nz-upload", inputs: ["nzeText", "nzeHint", "nzeShowUploadButton", "nzeUploadButton", "nzeUploadButtonIcon", "className", "resultMap"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
@@ -355,7 +354,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.6", ngImpor
355
354
  [nzeText]="props['text']"
356
355
  [nzeUploadButtonIcon]="props['uploadButtonIcon']"
357
356
  [nzeShowUploadButton]="props['showUploadButton']"
358
- [className]="props['className'] || ''"
357
+ [className]="props['className']"
359
358
  (nzFileListChange)="props['fileListChange'] && props['fileListChange'](field, $event)"
360
359
  >
361
360
  </formly-nz-upload>`,
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-formly-zorro-antd-upload.mjs","sources":["../../../../packages/formlyantd/upload/src/upload.component.ts","../../../../packages/formlyantd/upload/src/upload.type.ts","../../../../packages/formlyantd/upload/src/upload.module.ts","../../../../packages/formlyantd/upload/src/ngx-formly-zorro-antd-upload.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-empty-function */\nimport {\n ChangeDetectionStrategy,\n Component,\n TemplateRef,\n forwardRef,\n Input,\n ViewEncapsulation\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport type { OnChangeType, OnTouchedType, NzSafeAny } from 'ng-zorro-antd/core/types';\nimport { NzUploadChangeParam, NzUploadComponent, NzUploadFile } from 'ng-zorro-antd/upload';\nimport type { AntdIcon } from './upload.props';\n\n@Component({\n selector: 'formly-nz-upload',\n template: `\n <nz-upload\n [nzType]=\"nzType\"\n [nzAccept]=\"nzAccept\"\n [nzAction]=\"nzAction\"\n [nzDirectory]=\"nzDirectory\"\n [nzBeforeUpload]=\"nzBeforeUpload\"\n [nzCustomRequest]=\"nzCustomRequest\"\n [nzData]=\"nzData\"\n [nzDisabled]=\"nzDisabled\"\n [(nzFileList)]=\"nzFileList\"\n [nzLimit]=\"nzLimit\"\n [nzSize]=\"nzSize\"\n [nzFileType]=\"nzFileType\"\n [nzFilter]=\"nzFilter\"\n [nzHeaders]=\"nzHeaders\"\n [nzListType]=\"nzListType\"\n [nzMultiple]=\"nzMultiple\"\n [nzName]=\"nzName\"\n [nzShowUploadList]=\"nzShowUploadList\"\n [nzShowButton]=\"nzShowButton\"\n [nzWithCredentials]=\"nzWithCredentials\"\n [nzOpenFileDialogOnClick]=\"nzOpenFileDialogOnClick\"\n [nzPreview]=\"nzPreview\"\n [nzPreviewFile]=\"nzPreviewFile\"\n [nzPreviewIsImage]=\"nzPreviewIsImage\"\n [nzRemove]=\"nzRemove\"\n [nzDownload]=\"nzDownload\"\n [nzTransformFile]=\"nzTransformFile\"\n [nzIconRender]=\"nzIconRender\"\n [nzFileListRender]=\"nzFileListRender\"\n [ngClass]=\"className\"\n (nzChange)=\"change($event)\"\n (nzFileListChange)=\"fileListChange($event)\"\n >\n @switch (nzType) {\n @case ('drag') {\n <p class=\"ant-upload-drag-icon\">\n <ng-container *ngTemplateOutlet=\"uploadButtonIconTpl\"></ng-container>\n </p>\n <p class=\"ant-upload-text\">{{ nzeText }}</p>\n <p class=\"ant-upload-hint\">{{ nzeHint }}</p>\n }\n @default {\n @if (nzeShowUploadButton !== false) {\n <button type=\"button\" nz-button [disabled]=\"nzDisabled!!\">\n <ng-container *ngTemplateOutlet=\"uploadButtonIconTpl\"></ng-container>\n {{ nzeText }}\n </button>\n } @else if (nzeShowUploadButton === false) {\n <div>\n <ng-container *ngTemplateOutlet=\"uploadButtonIconTpl\"></ng-container>\n {{ nzeText }}\n <div class=\"ant-upload-hint\" style=\"margin-top: 8px\">{{ nzeHint }}</div>\n </div>\n }\n }\n }\n\n <ng-template #uploadButtonIconTpl>\n @if (nzeUploadButtonIcon) {\n <span\n nz-icon\n [nzType]=\"nzeUploadButtonIcon.type\"\n [nzTheme]=\"nzeUploadButtonIcon.theme || 'outline'\"\n [nzSpin]=\"nzeUploadButtonIcon.spin!!\"\n [nzTwotoneColor]=\"nzeUploadButtonIcon.twoToneColor || ''\"\n ></span>\n }\n </ng-template>\n </nz-upload>\n `,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => UploadNzComponent),\n multi: true\n }\n ]\n})\nexport class UploadNzComponent extends NzUploadComponent implements ControlValueAccessor {\n // @ViewChild('upload', { static: true }) transfer!: NzUploadComponent;\n\n /** 上传显示文本信息 */\n @Input() nzeText?: string;\n /** 上传的提示信息 */\n @Input() nzeHint?: string;\n /** 是否显示上传按钮, 如果是nzType=\"drag\" 隐藏按钮 */\n @Input() nzeShowUploadButton?: boolean;\n /**\n * 自定义按钮或显示内容\n */\n @Input() nzeUploadButton?: string | TemplateRef<NzSafeAny>;\n /** 上传按钮的图标 */\n @Input() nzeUploadButtonIcon?: AntdIcon | null = {\n type: 'cloud-upload'\n };\n\n /** 样式名 */\n @Input() className = '';\n @Input() resultMap?: (items: NzUploadFile[]) => NzSafeAny[];\n\n onChange: OnChangeType = () => {};\n onTouched: OnTouchedType = () => {};\n writeValue(): void {}\n registerOnChange(fn: NzSafeAny): void {\n this.onChange = fn;\n }\n registerOnTouched(fn: NzSafeAny): void {\n this.onTouched = fn;\n }\n setDisabledState?(isDisabled: boolean): void {\n this.nzDisabled = isDisabled;\n }\n\n fileListChange(list: NzUploadFile[]) {\n this.nzFileListChange.emit(list);\n }\n\n change(value: NzUploadChangeParam) {\n this.nzChange.emit(value);\n if (['removed', 'success'].includes(value.type ?? '')) {\n if (this.resultMap instanceof Function) {\n this.onChange(this.resultMap(value.fileList.filter(x => x.status === 'done')));\n } else {\n this.onChange(value.fileList.filter(x => x.status === 'done'));\n }\n }\n }\n}\n","import {\n Component,\n ChangeDetectionStrategy,\n Type,\n ViewChild,\n OnInit,\n Optional\n} from '@angular/core';\nimport { FieldType, FieldTypeConfig } from '@ngx-formly/core';\nimport type { NzFormlyFieldConfig } from 'ngx-formly-zorro-antd/common';\nimport { UploadNzComponent } from './upload.component';\nimport type { UploadProps } from './upload.props';\nimport { FormlyBoxTemplates, resolveTplName } from 'ngx-formly-zorro-antd/common';\n\nexport interface FormlyUploadFieldConfig extends NzFormlyFieldConfig<UploadProps> {\n type: 'upload' | Type<FormlyFieldUpload>;\n}\n\n@Component({\n selector: 'formly-field-upload',\n template: `<formly-nz-upload\n #upload\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [nzAccept]=\"props['accept']\"\n [nzAction]=\"props['action']\"\n [nzDirectory]=\"props['directory']!!\"\n [nzBeforeUpload]=\"props['beforeUpload']\"\n [nzCustomRequest]=\"props['customRequest']\"\n [nzData]=\"props['data']\"\n [nzDisabled]=\"props['disabled']!!\"\n [(nzFileList)]=\"props['fileList']\"\n [nzLimit]=\"props['limit']\"\n [nzSize]=\"props['size']\"\n [nzFileType]=\"props['fileType']\"\n [nzFilter]=\"props['filter']!\"\n [nzHeaders]=\"props['headers']\"\n [nzListType]=\"props['listType']!\"\n [nzMultiple]=\"props['multiple']!!\"\n [nzName]=\"props['name'] || ''\"\n [nzShowUploadList]=\"props['showUploadList']\"\n [nzShowButton]=\"props['showButton']!!\"\n [nzWithCredentials]=\"props['withCredentials']!!\"\n [nzOpenFileDialogOnClick]=\"props['openFileDialogOnClick']!!\"\n [nzPreview]=\"props['preview']\"\n [nzPreviewFile]=\"props['previewFile']\"\n [nzPreviewIsImage]=\"props['previewIsImage']\"\n [nzRemove]=\"props['remove']\"\n (nzChange)=\"props.change && props.change(field, $event)\"\n [nzDownload]=\"props['download']\"\n [nzTransformFile]=\"props['transformFile']\"\n [nzIconRender]=\"nzIconRender ?? null\"\n [nzFileListRender]=\"nzFileListRender ?? null\"\n [resultMap]=\"props['resultMap']\"\n [nzeHint]=\"props['hint']\"\n [nzeText]=\"props['text']\"\n [nzeUploadButtonIcon]=\"props['uploadButtonIcon']\"\n [nzeShowUploadButton]=\"props['showUploadButton']\"\n [className]=\"props['className'] || ''\"\n (nzFileListChange)=\"props['fileListChange'] && props['fileListChange'](field, $event)\"\n >\n </formly-nz-upload>`,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class FormlyFieldUpload extends FieldType<FieldTypeConfig<UploadProps>> implements OnInit {\n override defaultOptions = {\n props: {\n listType: 'text' as const,\n name: 'file',\n showUploadList: true,\n showButton: true,\n openFileDialogOnClick: true,\n showUploadButton: true,\n limit: 0,\n size: 0,\n fileList: [],\n filter: [],\n text: ''\n }\n };\n\n @ViewChild('upload', { static: true }) upload!: UploadNzComponent;\n\n constructor(@Optional() public fieldTemplates: FormlyBoxTemplates) {\n super();\n }\n\n ngOnInit(): void {\n const type = this.props.type;\n if (type) {\n this.upload.nzType = type;\n }\n }\n\n get nzIconRender() {\n return resolveTplName(this.props, this.fieldTemplates, 'iconRender');\n }\n\n get nzFileListRender() {\n return resolveTplName(this.props, this.fieldTemplates, 'fileListRender');\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FormlyNzFormFieldModule } from 'ngx-formly-zorro-antd/form-field';\nimport { NzUploadModule } from 'ng-zorro-antd/upload';\nimport { NzButtonModule } from 'ng-zorro-antd/button';\nimport { NzIconModule } from 'ng-zorro-antd/icon';\nimport { FormlyFieldUpload } from './upload.type';\nimport { UploadNzComponent } from './upload.component';\n\n@NgModule({\n declarations: [FormlyFieldUpload, UploadNzComponent],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n FormlyNzFormFieldModule,\n NzUploadModule,\n NzButtonModule,\n NzIconModule,\n\n FormlyModule.forChild({\n types: [\n {\n name: 'upload',\n component: FormlyFieldUpload,\n wrappers: ['form-field']\n }\n ]\n })\n ]\n})\nexport class FormlyNzUploadModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1","i2","i3","i4.UploadNzComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAkGM,MAAO,iBAAkB,SAAQ,iBAAiB,CAAA;AApFxD,IAAA,WAAA,GAAA;;;AAkGW,QAAA,IAAA,CAAA,mBAAmB,GAAqB;AAC/C,YAAA,IAAI,EAAE,cAAc;SACrB,CAAC;;QAGO,IAAS,CAAA,SAAA,GAAG,EAAE,CAAC;AAGxB,QAAA,IAAA,CAAA,QAAQ,GAAiB,MAAK,GAAG,CAAC;AAClC,QAAA,IAAA,CAAA,SAAS,GAAkB,MAAK,GAAG,CAAC;AA0BrC,KAAA;AAzBC,IAAA,UAAU,MAAW;AACrB,IAAA,gBAAgB,CAAC,EAAa,EAAA;AAC5B,QAAA,IAAI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Q,CAAC;AACpB,4BAAA,KAAK,EAAE;AACL,gCAAA;AACE,oCAAA,IAAI,EAAE,QAAQ;AACd,oCAAA,SAAS,EAAE,iBAAiB;oCAC5B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;AC/BD;;AAEG;;;;"}
1
+ {"version":3,"file":"ngx-formly-zorro-antd-upload.mjs","sources":["../../../../packages/formlyantd/upload/src/upload.component.ts","../../../../packages/formlyantd/upload/src/upload.type.ts","../../../../packages/formlyantd/upload/src/upload.module.ts","../../../../packages/formlyantd/upload/src/ngx-formly-zorro-antd-upload.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-empty-function */\nimport {\n ChangeDetectionStrategy,\n Component,\n TemplateRef,\n forwardRef,\n booleanAttribute,\n Input,\n ViewEncapsulation\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport type { OnChangeType, OnTouchedType, NzSafeAny } from 'ng-zorro-antd/core/types';\nimport { NzUploadChangeParam, NzUploadComponent, NzUploadFile } from 'ng-zorro-antd/upload';\nimport type { AntdIcon } from './upload.props';\n\n@Component({\n selector: 'formly-nz-upload',\n template: `\n <nz-upload\n [nzType]=\"nzType\"\n [nzAccept]=\"nzAccept\"\n [nzAction]=\"nzAction\"\n [nzDirectory]=\"nzDirectory\"\n [nzBeforeUpload]=\"nzBeforeUpload\"\n [nzCustomRequest]=\"nzCustomRequest\"\n [nzData]=\"nzData\"\n [nzDisabled]=\"nzDisabled\"\n [(nzFileList)]=\"nzFileList\"\n [nzLimit]=\"nzLimit\"\n [nzSize]=\"nzSize\"\n [nzFileType]=\"nzFileType\"\n [nzFilter]=\"nzFilter\"\n [nzHeaders]=\"nzHeaders\"\n [nzListType]=\"nzListType\"\n [nzMultiple]=\"nzMultiple\"\n [nzName]=\"nzName\"\n [nzShowUploadList]=\"nzShowUploadList\"\n [nzShowButton]=\"nzShowButton\"\n [nzWithCredentials]=\"nzWithCredentials\"\n [nzOpenFileDialogOnClick]=\"nzOpenFileDialogOnClick\"\n [nzPreview]=\"nzPreview\"\n [nzPreviewFile]=\"nzPreviewFile\"\n [nzPreviewIsImage]=\"nzPreviewIsImage\"\n [nzRemove]=\"nzRemove\"\n [nzDownload]=\"nzDownload\"\n [nzTransformFile]=\"nzTransformFile\"\n [nzIconRender]=\"nzIconRender\"\n [nzFileListRender]=\"nzFileListRender\"\n [ngClass]=\"className\"\n (nzChange)=\"change($event)\"\n (nzFileListChange)=\"fileListChange($event)\"\n >\n @switch (nzType) {\n @case ('drag') {\n <p class=\"ant-upload-drag-icon\">\n <ng-container *ngTemplateOutlet=\"uploadButtonIconTpl\"></ng-container>\n </p>\n <p class=\"ant-upload-text\">{{ nzeText }}</p>\n <p class=\"ant-upload-hint\">{{ nzeHint }}</p>\n }\n @default {\n @if (nzeShowUploadButton !== false) {\n <button type=\"button\" nz-button [disabled]=\"nzDisabled!!\">\n <ng-container *ngTemplateOutlet=\"uploadButtonIconTpl\"></ng-container>\n {{ nzeText }}\n </button>\n } @else if (nzeShowUploadButton === false) {\n <div>\n <ng-container *ngTemplateOutlet=\"uploadButtonIconTpl\"></ng-container>\n {{ nzeText }}\n <div class=\"ant-upload-hint\" style=\"margin-top: 8px\">{{ nzeHint }}</div>\n </div>\n }\n }\n }\n\n <ng-template #uploadButtonIconTpl>\n @if (nzeUploadButtonIcon) {\n <span\n nz-icon\n [nzType]=\"nzeUploadButtonIcon.type\"\n [nzTheme]=\"nzeUploadButtonIcon.theme || 'outline'\"\n [nzSpin]=\"nzeUploadButtonIcon.spin!!\"\n [nzTwotoneColor]=\"nzeUploadButtonIcon.twoToneColor || ''\"\n ></span>\n }\n </ng-template>\n </nz-upload>\n `,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => UploadNzComponent),\n multi: true\n }\n ]\n})\nexport class UploadNzComponent extends NzUploadComponent implements ControlValueAccessor {\n // @ViewChild('upload', { static: true }) transfer!: NzUploadComponent;\n\n /** 上传显示文本信息 */\n @Input() nzeText?: string;\n /** 上传的提示信息 */\n @Input() nzeHint?: string;\n /** 是否显示上传按钮, 如果是nzType=\"drag\" 隐藏按钮 */\n @Input({ transform: booleanAttribute }) nzeShowUploadButton?: boolean;\n /**\n * 自定义按钮或显示内容\n */\n @Input() nzeUploadButton?: string | TemplateRef<NzSafeAny>;\n /** 上传按钮的图标 */\n @Input() nzeUploadButtonIcon?: AntdIcon | null = {\n type: 'cloud-upload'\n };\n\n /** 样式名 */\n @Input() className?:\n | string\n | string[]\n | Set<string>\n | {\n [klass: string]: NzSafeAny;\n }\n | null;\n\n @Input() resultMap?: (items: NzUploadFile[]) => NzSafeAny[];\n\n onChange: OnChangeType = () => {};\n onTouched: OnTouchedType = () => {};\n writeValue(): void {}\n registerOnChange(fn: NzSafeAny): void {\n this.onChange = fn;\n }\n registerOnTouched(fn: NzSafeAny): void {\n this.onTouched = fn;\n }\n setDisabledState?(isDisabled: boolean): void {\n this.nzDisabled = isDisabled;\n }\n\n fileListChange(list: NzUploadFile[]) {\n this.nzFileListChange.emit(list);\n }\n\n change(value: NzUploadChangeParam) {\n this.nzChange.emit(value);\n if (['removed', 'success'].includes(value.type ?? '')) {\n if (this.resultMap instanceof Function) {\n this.onChange(this.resultMap(value.fileList.filter(x => x.status === 'done')));\n } else {\n this.onChange(value.fileList.filter(x => x.status === 'done'));\n }\n }\n }\n}\n","import {\n Component,\n ChangeDetectionStrategy,\n Type,\n ViewChild,\n OnInit,\n Optional\n} from '@angular/core';\nimport { FieldType, FieldTypeConfig } from '@ngx-formly/core';\nimport type { NzFormlyFieldConfig } from 'ngx-formly-zorro-antd/common';\nimport { UploadNzComponent } from './upload.component';\nimport type { UploadProps } from './upload.props';\nimport { FormlyBoxTemplates, resolveTplName } from 'ngx-formly-zorro-antd/common';\n\nexport interface FormlyUploadFieldConfig extends NzFormlyFieldConfig<UploadProps> {\n type: 'upload' | Type<FormlyFieldUpload>;\n}\n\n@Component({\n selector: 'formly-field-upload',\n template: `<formly-nz-upload\n #upload\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [nzAccept]=\"props['accept']\"\n [nzAction]=\"props['action']\"\n [nzDirectory]=\"props['directory']!!\"\n [nzBeforeUpload]=\"props['beforeUpload']\"\n [nzCustomRequest]=\"props['customRequest']\"\n [nzData]=\"props['data']\"\n [nzDisabled]=\"props['disabled']!!\"\n [(nzFileList)]=\"props['fileList']\"\n [nzLimit]=\"props['limit']\"\n [nzSize]=\"props['size']\"\n [nzFileType]=\"props['fileType']\"\n [nzFilter]=\"props['filter']!\"\n [nzHeaders]=\"props['headers']\"\n [nzListType]=\"props['listType']!\"\n [nzMultiple]=\"props['multiple']!!\"\n [nzName]=\"props['name'] || ''\"\n [nzShowUploadList]=\"props['showUploadList']\"\n [nzShowButton]=\"props['showButton']!!\"\n [nzWithCredentials]=\"props['withCredentials']!!\"\n [nzOpenFileDialogOnClick]=\"props['openFileDialogOnClick']!!\"\n [nzPreview]=\"props['preview']\"\n [nzPreviewFile]=\"props['previewFile']\"\n [nzPreviewIsImage]=\"props['previewIsImage']\"\n [nzRemove]=\"props['remove']\"\n (nzChange)=\"props.change && props.change(field, $event)\"\n [nzDownload]=\"props['download']\"\n [nzTransformFile]=\"props['transformFile']\"\n [nzIconRender]=\"nzIconRender ?? null\"\n [nzFileListRender]=\"nzFileListRender ?? null\"\n [resultMap]=\"props['resultMap']\"\n [nzeHint]=\"props['hint']\"\n [nzeText]=\"props['text']\"\n [nzeUploadButtonIcon]=\"props['uploadButtonIcon']\"\n [nzeShowUploadButton]=\"props['showUploadButton']\"\n [className]=\"props['className']\"\n (nzFileListChange)=\"props['fileListChange'] && props['fileListChange'](field, $event)\"\n >\n </formly-nz-upload>`,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class FormlyFieldUpload extends FieldType<FieldTypeConfig<UploadProps>> implements OnInit {\n override defaultOptions = {\n props: {\n listType: 'text' as const,\n name: 'file',\n showUploadList: true,\n showButton: true,\n openFileDialogOnClick: true,\n showUploadButton: true,\n limit: 0,\n size: 0,\n fileList: [],\n filter: [],\n text: ''\n }\n };\n\n @ViewChild('upload', { static: true }) upload!: UploadNzComponent;\n\n constructor(@Optional() public fieldTemplates: FormlyBoxTemplates) {\n super();\n }\n\n ngOnInit(): void {\n const type = this.props.type;\n if (type) {\n this.upload.nzType = type;\n }\n }\n\n get nzIconRender() {\n return resolveTplName(this.props, this.fieldTemplates, 'iconRender');\n }\n\n get nzFileListRender() {\n return resolveTplName(this.props, this.fieldTemplates, 'fileListRender');\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FormlyNzFormFieldModule } from 'ngx-formly-zorro-antd/form-field';\nimport { NzUploadModule } from 'ng-zorro-antd/upload';\nimport { NzButtonModule } from 'ng-zorro-antd/button';\nimport { NzIconModule } from 'ng-zorro-antd/icon';\nimport { FormlyFieldUpload } from './upload.type';\nimport { UploadNzComponent } from './upload.component';\n\n@NgModule({\n declarations: [FormlyFieldUpload, UploadNzComponent],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n FormlyNzFormFieldModule,\n NzUploadModule,\n NzButtonModule,\n NzIconModule,\n\n FormlyModule.forChild({\n types: [\n {\n name: 'upload',\n component: FormlyFieldUpload,\n wrappers: ['form-field']\n }\n ]\n })\n ]\n})\nexport class FormlyNzUploadModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1","i2","i3","i4.UploadNzComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAmGM,MAAO,iBAAkB,SAAQ,iBAAiB,CAAA;AApFxD,IAAA,WAAA,GAAA;;;AAkGW,QAAA,IAAA,CAAA,mBAAmB,GAAq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AAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;AACpD,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,uBAAuB;wBACvB,cAAc;wBACd,cAAc;wBACd,YAAY;wBAEZ,YAAY,CAAC,QAAQ,CAAC;AACpB,4BAAA,KAAK,EAAE;AACL,gCAAA;AACE,oCAAA,IAAI,EAAE,QAAQ;AACd,oCAAA,SAAS,EAAE,iBAAiB;oCAC5B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;AC/BD;;AAEG;;;;"}
@@ -1,6 +1,6 @@
1
1
  import type { EmbeddedProperty } from 'ng-zorro-antd/grid';
2
2
  import type { NzFormTooltipIcon, NzLabelAlignType } from 'ng-zorro-antd/form';
3
- import type { NzTSType } from 'ng-zorro-antd/core/types';
3
+ import type { NzTSType, NzSafeAny } from 'ng-zorro-antd/core/types';
4
4
  import type { ControlOptions } from 'ngx-formly-zorro-antd/common';
5
5
  type strNumNull = string | number | null;
6
6
  /** nz表单配置项 */
@@ -16,7 +16,15 @@ export interface NzFormWrapperProps extends ControlOptions {
16
16
  /**
17
17
  * className
18
18
  */
19
- className?: string;
19
+ className?: string | string[] | Set<string> | {
20
+ [klass: string]: NzSafeAny;
21
+ } | null;
22
+ /**
23
+ * 样式
24
+ */
25
+ style?: {
26
+ [klass: string]: NzSafeAny;
27
+ } | null;
20
28
  /**
21
29
  * itemClass
22
30
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ngx-formly-zorro-antd",
3
- "version": "17.0.6",
3
+ "version": "17.0.8",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org",
6
6
  "access": "public"
@@ -49,30 +49,30 @@
49
49
  "esm": "./esm2022/card/ngx-formly-zorro-antd-card.mjs",
50
50
  "default": "./fesm2022/ngx-formly-zorro-antd-card.mjs"
51
51
  },
52
- "./button-group": {
53
- "types": "./button-group/index.d.ts",
54
- "esm2022": "./esm2022/button-group/ngx-formly-zorro-antd-button-group.mjs",
55
- "esm": "./esm2022/button-group/ngx-formly-zorro-antd-button-group.mjs",
56
- "default": "./fesm2022/ngx-formly-zorro-antd-button-group.mjs"
57
- },
58
- "./card-wrapper": {
59
- "types": "./card-wrapper/index.d.ts",
60
- "esm2022": "./esm2022/card-wrapper/ngx-formly-zorro-antd-card-wrapper.mjs",
61
- "esm": "./esm2022/card-wrapper/ngx-formly-zorro-antd-card-wrapper.mjs",
62
- "default": "./fesm2022/ngx-formly-zorro-antd-card-wrapper.mjs"
63
- },
64
52
  "./cascader": {
65
53
  "types": "./cascader/index.d.ts",
66
54
  "esm2022": "./esm2022/cascader/ngx-formly-zorro-antd-cascader.mjs",
67
55
  "esm": "./esm2022/cascader/ngx-formly-zorro-antd-cascader.mjs",
68
56
  "default": "./fesm2022/ngx-formly-zorro-antd-cascader.mjs"
69
57
  },
58
+ "./button-group": {
59
+ "types": "./button-group/index.d.ts",
60
+ "esm2022": "./esm2022/button-group/ngx-formly-zorro-antd-button-group.mjs",
61
+ "esm": "./esm2022/button-group/ngx-formly-zorro-antd-button-group.mjs",
62
+ "default": "./fesm2022/ngx-formly-zorro-antd-button-group.mjs"
63
+ },
70
64
  "./checkbox": {
71
65
  "types": "./checkbox/index.d.ts",
72
66
  "esm2022": "./esm2022/checkbox/ngx-formly-zorro-antd-checkbox.mjs",
73
67
  "esm": "./esm2022/checkbox/ngx-formly-zorro-antd-checkbox.mjs",
74
68
  "default": "./fesm2022/ngx-formly-zorro-antd-checkbox.mjs"
75
69
  },
70
+ "./card-wrapper": {
71
+ "types": "./card-wrapper/index.d.ts",
72
+ "esm2022": "./esm2022/card-wrapper/ngx-formly-zorro-antd-card-wrapper.mjs",
73
+ "esm": "./esm2022/card-wrapper/ngx-formly-zorro-antd-card-wrapper.mjs",
74
+ "default": "./fesm2022/ngx-formly-zorro-antd-card-wrapper.mjs"
75
+ },
76
76
  "./common": {
77
77
  "types": "./common/index.d.ts",
78
78
  "esm2022": "./esm2022/common/ngx-formly-zorro-antd-common.mjs",
@@ -18,7 +18,9 @@ export declare class UploadNzComponent extends NzUploadComponent implements Cont
18
18
  /** 上传按钮的图标 */
19
19
  nzeUploadButtonIcon?: AntdIcon | null;
20
20
  /** 样式名 */
21
- className: string;
21
+ className?: string | string[] | Set<string> | {
22
+ [klass: string]: NzSafeAny;
23
+ } | null;
22
24
  resultMap?: (items: NzUploadFile[]) => NzSafeAny[];
23
25
  onChange: OnChangeType;
24
26
  onTouched: OnTouchedType;
@@ -30,4 +32,5 @@ export declare class UploadNzComponent extends NzUploadComponent implements Cont
30
32
  change(value: NzUploadChangeParam): void;
31
33
  static ɵfac: i0.ɵɵFactoryDeclaration<UploadNzComponent, never>;
32
34
  static ɵcmp: i0.ɵɵComponentDeclaration<UploadNzComponent, "formly-nz-upload", never, { "nzeText": { "alias": "nzeText"; "required": false; }; "nzeHint": { "alias": "nzeHint"; "required": false; }; "nzeShowUploadButton": { "alias": "nzeShowUploadButton"; "required": false; }; "nzeUploadButton": { "alias": "nzeUploadButton"; "required": false; }; "nzeUploadButtonIcon": { "alias": "nzeUploadButtonIcon"; "required": false; }; "className": { "alias": "className"; "required": false; }; "resultMap": { "alias": "resultMap"; "required": false; }; }, {}, never, never, false, never>;
35
+ static ngAcceptInputType_nzeShowUploadButton: unknown;
33
36
  }