ngx-formly-zorro-antd 14.0.1 → 14.2.0
Sign up to get free protection for your applications and to get access to all the features.
- package/datepicker/datepicker.props.d.ts +5 -0
- package/datepicker/datepicker.type.d.ts +1 -0
- package/esm2020/datepicker/datepicker.props.mjs +1 -1
- package/esm2020/datepicker/datepicker.type.mjs +7 -2
- package/esm2020/select/select.props.mjs +1 -1
- package/esm2020/select/select.type.mjs +6 -2
- package/esm2020/timepicker/timepicker.type.mjs +8 -4
- package/esm2020/upload/upload.component.mjs +121 -42
- package/esm2020/upload/upload.module.mjs +4 -4
- package/esm2020/upload/upload.props.mjs +2 -0
- package/esm2020/upload/upload.type.mjs +26 -16
- package/fesm2015/ngx-formly-zorro-antd-datepicker.mjs +6 -1
- package/fesm2015/ngx-formly-zorro-antd-datepicker.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-select.mjs +5 -1
- package/fesm2015/ngx-formly-zorro-antd-select.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-timepicker.mjs +7 -3
- package/fesm2015/ngx-formly-zorro-antd-timepicker.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-upload.mjs +146 -57
- package/fesm2015/ngx-formly-zorro-antd-upload.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-datepicker.mjs +6 -1
- package/fesm2020/ngx-formly-zorro-antd-datepicker.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-select.mjs +5 -1
- package/fesm2020/ngx-formly-zorro-antd-select.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-timepicker.mjs +7 -3
- package/fesm2020/ngx-formly-zorro-antd-timepicker.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-upload.mjs +146 -57
- package/fesm2020/ngx-formly-zorro-antd-upload.mjs.map +1 -1
- package/package.json +2 -2
- package/select/select.props.d.ts +6 -2
- package/timepicker/timepicker.type.d.ts +7 -0
- package/upload/upload.component.d.ts +16 -10
- package/upload/upload.module.d.ts +1 -1
- package/upload/upload.props.d.ts +173 -0
- package/upload/upload.type.d.ts +7 -151
@@ -54,6 +54,7 @@ FormlyFieldSelect.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
|
|
54
54
|
[nzBackdrop]="props['backdrop']!!"
|
55
55
|
[nzBorderless]="props['borderless']"
|
56
56
|
[nzOpen]="props['open']!!"
|
57
|
+
[nzDropdownClassName]="props['dropdownClassName']"
|
57
58
|
[nzDropdownMatchSelectWidth]="props['dropdownMatchSelectWidth']!!"
|
58
59
|
[nzDropdownStyle]="props['dropdownStyle'] ?? null"
|
59
60
|
[nzCustomTemplate]="props['customTemplate'] ?? null"
|
@@ -64,6 +65,7 @@ FormlyFieldSelect.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
|
|
64
65
|
[nzSize]="props['size']!"
|
65
66
|
[nzStatus]="props['status']!"
|
66
67
|
[nzLoading]="props['loading']!!"
|
68
|
+
[nzPlacement]="props['placement']"
|
67
69
|
[nzShowArrow]="props['showArrow']!!"
|
68
70
|
[nzMaxTagCount]="props['maxTagCount']"
|
69
71
|
[nzMaxTagPlaceholder]="props['maxTagPlaceholder'] ?? null"
|
@@ -98,7 +100,7 @@ FormlyFieldSelect.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
|
|
98
100
|
</ng-template>
|
99
101
|
</ng-container>
|
100
102
|
</nz-select>
|
101
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i3.NzOptionComponent, selector: "nz-option", inputs: ["nzLabel", "nzValue", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { kind: "component", type: i3.NzSelectComponent, selector: "nz-select", inputs: ["nzId", "nzSize", "nzStatus", "nzOptionHeightPx", "nzOptionOverflowSize", "nzDropdownClassName", "nzDropdownMatchSelectWidth", "nzDropdownStyle", "nzNotFoundContent", "nzPlaceHolder", "nzMaxTagCount", "nzDropdownRender", "nzCustomTemplate", "nzSuffixIcon", "nzClearIcon", "nzRemoveIcon", "nzMenuItemSelectedIcon", "nzTokenSeparators", "nzMaxTagPlaceholder", "nzMaxMultipleCount", "nzMode", "nzFilterOption", "compareWith", "nzAllowClear", "nzBorderless", "nzShowSearch", "nzLoading", "nzAutoFocus", "nzAutoClearSearchValue", "nzServerSearch", "nzDisabled", "nzOpen", "nzBackdrop", "nzOptions", "nzShowArrow"], outputs: ["nzOnSearch", "nzScrollToBottom", "nzOpenChange", "nzBlur", "nzFocus"], exportAs: ["nzSelect"] }, { kind: "component", type: i3.NzOptionGroupComponent, selector: "nz-option-group", inputs: ["nzLabel"], exportAs: ["nzOptionGroup"] }, { kind: "directive", type: i4.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.FormlySelectOptionsPipe, name: "formlySelectOptions" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
103
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i3.NzOptionComponent, selector: "nz-option", inputs: ["nzLabel", "nzValue", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { kind: "component", type: i3.NzSelectComponent, selector: "nz-select", inputs: ["nzId", "nzSize", "nzStatus", "nzOptionHeightPx", "nzOptionOverflowSize", "nzDropdownClassName", "nzDropdownMatchSelectWidth", "nzDropdownStyle", "nzNotFoundContent", "nzPlaceHolder", "nzPlacement", "nzMaxTagCount", "nzDropdownRender", "nzCustomTemplate", "nzSuffixIcon", "nzClearIcon", "nzRemoveIcon", "nzMenuItemSelectedIcon", "nzTokenSeparators", "nzMaxTagPlaceholder", "nzMaxMultipleCount", "nzMode", "nzFilterOption", "compareWith", "nzAllowClear", "nzBorderless", "nzShowSearch", "nzLoading", "nzAutoFocus", "nzAutoClearSearchValue", "nzServerSearch", "nzDisabled", "nzOpen", "nzBackdrop", "nzOptions", "nzShowArrow"], outputs: ["nzOnSearch", "nzScrollToBottom", "nzOpenChange", "nzBlur", "nzFocus"], exportAs: ["nzSelect"] }, { kind: "component", type: i3.NzOptionGroupComponent, selector: "nz-option-group", inputs: ["nzLabel"], exportAs: ["nzOptionGroup"] }, { kind: "directive", type: i4.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.FormlySelectOptionsPipe, name: "formlySelectOptions" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
102
104
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyFieldSelect, decorators: [{
|
103
105
|
type: Component,
|
104
106
|
args: [{
|
@@ -114,6 +116,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
114
116
|
[nzBackdrop]="props['backdrop']!!"
|
115
117
|
[nzBorderless]="props['borderless']"
|
116
118
|
[nzOpen]="props['open']!!"
|
119
|
+
[nzDropdownClassName]="props['dropdownClassName']"
|
117
120
|
[nzDropdownMatchSelectWidth]="props['dropdownMatchSelectWidth']!!"
|
118
121
|
[nzDropdownStyle]="props['dropdownStyle'] ?? null"
|
119
122
|
[nzCustomTemplate]="props['customTemplate'] ?? null"
|
@@ -124,6 +127,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
124
127
|
[nzSize]="props['size']!"
|
125
128
|
[nzStatus]="props['status']!"
|
126
129
|
[nzLoading]="props['loading']!!"
|
130
|
+
[nzPlacement]="props['placement']"
|
127
131
|
[nzShowArrow]="props['showArrow']!!"
|
128
132
|
[nzMaxTagCount]="props['maxTagCount']"
|
129
133
|
[nzMaxTagPlaceholder]="props['maxTagPlaceholder'] ?? null"
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ngx-formly-zorro-antd-select.mjs","sources":["../../../../packages/formlyantd/select/src/select.type.ts","../../../../packages/formlyantd/select/src/select.module.ts","../../../../packages/formlyantd/select/src/ngx-formly-zorro-antd-select.ts"],"sourcesContent":["import { Component, Type, ChangeDetectionStrategy, ViewChild, OnInit } from '@angular/core';\nimport { FieldType, FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core';\n\nimport { NzSelectComponent } from 'ng-zorro-antd/select';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\nimport type { SelectProps } from './select.props';\n\nexport interface FormlySelectFieldConfig extends FormlyFieldConfig<SelectProps> {\n type: 'select' | 'enum' | Type<FormlyFieldSelect>;\n}\n\n@Component({\n selector: 'formly-field-select',\n template: `\n <nz-select\n #select\n [class.ng-dirty]=\"showError\"\n [nzPlaceHolder]=\"props.placeholder ?? ''\"\n [compareWith]=\"props['compareWith']!\"\n [nzAllowClear]=\"props['allowClear']!!\"\n [nzAutoClearSearchValue]=\"props['autoClearSearchValue']\"\n [nzBackdrop]=\"props['backdrop']!!\"\n [nzBorderless]=\"props['borderless']\"\n [nzOpen]=\"props['open']!!\"\n [nzDropdownMatchSelectWidth]=\"props['dropdownMatchSelectWidth']!!\"\n [nzDropdownStyle]=\"props['dropdownStyle'] ?? null\"\n [nzCustomTemplate]=\"props['customTemplate'] ?? null\"\n [nzServerSearch]=\"props['serverSearch']!!\"\n [nzMaxMultipleCount]=\"props['maxMultipleCount']!\"\n [nzMode]=\"props['mode']!\"\n [nzShowSearch]=\"props['showSearch']!!\"\n [nzSize]=\"props['size']!\"\n [nzStatus]=\"props['status']!\"\n [nzLoading]=\"props['loading']!!\"\n [nzShowArrow]=\"props['showArrow']!!\"\n [nzMaxTagCount]=\"props['maxTagCount']\"\n [nzMaxTagPlaceholder]=\"props['maxTagPlaceholder'] ?? null\"\n [nzOptionHeightPx]=\"props['optionHeightPx']!\"\n [nzOptionOverflowSize]=\"props['optionOverflowSize']!\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n (ngModelChange)=\"props.change && props.change(field, $event)\"\n (nzBlur)=\"props.blur && props.blur(field, $event)\"\n (nzFocus)=\"props.focus && props.focus(field, $event)\"\n (nzOpenChange)=\"props['openChange'] && props['openChange'](field, $event)\"\n (nzScrollToBottom)=\"props['scrollToBottom'] && props['scrollToBottom'](field, $event)\"\n (nzOnSearch)=\"props['onSearch'] && props['onSearch'](field, $event)\"\n >\n <ng-container *ngFor=\"let item of to.options | formlySelectOptions: field | async\">\n <nz-option-group [nzLabel]=\"item.label\" *ngIf=\"item.group; else selectoption\">\n <nz-option\n *ngFor=\"let child of item.group\"\n [nzValue]=\"child.value\"\n [nzDisabled]=\"child.disabled\"\n [nzLabel]=\"child.label\"\n >\n </nz-option>\n </nz-option-group>\n\n <ng-template #selectoption>\n <nz-option\n [nzValue]=\"item.value\"\n [nzDisabled]=\"item.disabled\"\n [nzLabel]=\"item.label\"\n ></nz-option>\n </ng-template>\n </ng-container>\n </nz-select>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class FormlyFieldSelect extends FieldType<FieldTypeConfig> implements OnInit {\n override defaultOptions = {\n props: {\n compareWith: (o1: NzSafeAny, o2: NzSafeAny) => o1 === o2,\n autoClearSearchValue: true,\n allowClear: false,\n backdrop: false,\n open: false,\n dropdownMatchSelectWidth: true,\n serverSearch: false,\n maxMultipleCount: Infinity,\n mode: 'default' as const,\n showSearch: false,\n size: 'default' as const,\n status: '' as const,\n tokenSeparators: [],\n loading: false,\n optionHeightPx: 32,\n optionOverflowSize: 8\n }\n };\n @ViewChild('select', { static: true }) select!: NzSelectComponent;\n ngOnInit(): void {\n if (this.props['filterOption'] instanceof Function) {\n this.select.nzFilterOption = this.props['filterOption'] as any;\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { FormlySelectModule } from '@ngx-formly/core/select';\nimport { FormlyNzFormFieldModule } from 'ngx-formly-zorro-antd/form-field';\n\nimport { NzSelectModule } from 'ng-zorro-antd/select';\n\nimport { FormlyFieldSelect } from './select.type';\n\n@NgModule({\n declarations: [FormlyFieldSelect],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n NzSelectModule,\n\n FormlyNzFormFieldModule,\n FormlySelectModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'select',\n component: FormlyFieldSelect,\n wrappers: ['form-field']\n },\n { name: 'enum', extends: 'select' }\n ]\n })\n ]\n})\nexport class FormlyNzSelectModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;
|
1
|
+
{"version":3,"file":"ngx-formly-zorro-antd-select.mjs","sources":["../../../../packages/formlyantd/select/src/select.type.ts","../../../../packages/formlyantd/select/src/select.module.ts","../../../../packages/formlyantd/select/src/ngx-formly-zorro-antd-select.ts"],"sourcesContent":["import { Component, Type, ChangeDetectionStrategy, ViewChild, OnInit } from '@angular/core';\nimport { FieldType, FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core';\n\nimport { NzSelectComponent } from 'ng-zorro-antd/select';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\nimport type { SelectProps } from './select.props';\n\nexport interface FormlySelectFieldConfig extends FormlyFieldConfig<SelectProps> {\n type: 'select' | 'enum' | Type<FormlyFieldSelect>;\n}\n\n@Component({\n selector: 'formly-field-select',\n template: `\n <nz-select\n #select\n [class.ng-dirty]=\"showError\"\n [nzPlaceHolder]=\"props.placeholder ?? ''\"\n [compareWith]=\"props['compareWith']!\"\n [nzAllowClear]=\"props['allowClear']!!\"\n [nzAutoClearSearchValue]=\"props['autoClearSearchValue']\"\n [nzBackdrop]=\"props['backdrop']!!\"\n [nzBorderless]=\"props['borderless']\"\n [nzOpen]=\"props['open']!!\"\n [nzDropdownClassName]=\"props['dropdownClassName']\"\n [nzDropdownMatchSelectWidth]=\"props['dropdownMatchSelectWidth']!!\"\n [nzDropdownStyle]=\"props['dropdownStyle'] ?? null\"\n [nzCustomTemplate]=\"props['customTemplate'] ?? null\"\n [nzServerSearch]=\"props['serverSearch']!!\"\n [nzMaxMultipleCount]=\"props['maxMultipleCount']!\"\n [nzMode]=\"props['mode']!\"\n [nzShowSearch]=\"props['showSearch']!!\"\n [nzSize]=\"props['size']!\"\n [nzStatus]=\"props['status']!\"\n [nzLoading]=\"props['loading']!!\"\n [nzPlacement]=\"props['placement']\"\n [nzShowArrow]=\"props['showArrow']!!\"\n [nzMaxTagCount]=\"props['maxTagCount']\"\n [nzMaxTagPlaceholder]=\"props['maxTagPlaceholder'] ?? null\"\n [nzOptionHeightPx]=\"props['optionHeightPx']!\"\n [nzOptionOverflowSize]=\"props['optionOverflowSize']!\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n (ngModelChange)=\"props.change && props.change(field, $event)\"\n (nzBlur)=\"props.blur && props.blur(field, $event)\"\n (nzFocus)=\"props.focus && props.focus(field, $event)\"\n (nzOpenChange)=\"props['openChange'] && props['openChange'](field, $event)\"\n (nzScrollToBottom)=\"props['scrollToBottom'] && props['scrollToBottom'](field, $event)\"\n (nzOnSearch)=\"props['onSearch'] && props['onSearch'](field, $event)\"\n >\n <ng-container *ngFor=\"let item of to.options | formlySelectOptions: field | async\">\n <nz-option-group [nzLabel]=\"item.label\" *ngIf=\"item.group; else selectoption\">\n <nz-option\n *ngFor=\"let child of item.group\"\n [nzValue]=\"child.value\"\n [nzDisabled]=\"child.disabled\"\n [nzLabel]=\"child.label\"\n >\n </nz-option>\n </nz-option-group>\n\n <ng-template #selectoption>\n <nz-option\n [nzValue]=\"item.value\"\n [nzDisabled]=\"item.disabled\"\n [nzLabel]=\"item.label\"\n ></nz-option>\n </ng-template>\n </ng-container>\n </nz-select>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class FormlyFieldSelect extends FieldType<FieldTypeConfig> implements OnInit {\n override defaultOptions = {\n props: {\n compareWith: (o1: NzSafeAny, o2: NzSafeAny) => o1 === o2,\n autoClearSearchValue: true,\n allowClear: false,\n backdrop: false,\n open: false,\n dropdownMatchSelectWidth: true,\n serverSearch: false,\n maxMultipleCount: Infinity,\n mode: 'default' as const,\n showSearch: false,\n size: 'default' as const,\n status: '' as const,\n tokenSeparators: [],\n loading: false,\n optionHeightPx: 32,\n optionOverflowSize: 8\n }\n };\n @ViewChild('select', { static: true }) select!: NzSelectComponent;\n ngOnInit(): void {\n if (this.props['filterOption'] instanceof Function) {\n this.select.nzFilterOption = this.props['filterOption'] as any;\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { FormlySelectModule } from '@ngx-formly/core/select';\nimport { FormlyNzFormFieldModule } from 'ngx-formly-zorro-antd/form-field';\n\nimport { NzSelectModule } from 'ng-zorro-antd/select';\n\nimport { FormlyFieldSelect } from './select.type';\n\n@NgModule({\n declarations: [FormlyFieldSelect],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n NzSelectModule,\n\n FormlyNzFormFieldModule,\n FormlySelectModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'select',\n component: FormlyFieldSelect,\n wrappers: ['form-field']\n },\n { name: 'enum', extends: 'select' }\n ]\n })\n ]\n})\nexport class FormlyNzSelectModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;AAyEM,MAAO,iBAAkB,SAAQ,SAA0B,CAAA;AA9DjE,IAAA,WAAA,GAAA;;AA+DW,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;gBACL,WAAW,EAAE,CAAC,EAAa,EAAE,EAAa,KAAK,EAAE,KAAK,EAAE;AACxD,gBAAA,oBAAoB,EAAE,IAAI;AAC1B,gBAAA,UAAU,EAAE,KAAK;AACjB,gBAAA,QAAQ,EAAE,KAAK;AACf,gBAAA,IAAI,EAAE,KAAK;AACX,gBAAA,wBAAwB,EAAE,IAAI;AAC9B,gBAAA,YAAY,EAAE,KAAK;AACnB,gBAAA,gBAAgB,EAAE,QAAQ;AAC1B,gBAAA,IAAI,EAAE,SAAkB;AACxB,gBAAA,UAAU,EAAE,KAAK;AACjB,gBAAA,IAAI,EAAE,SAAkB;AACxB,gBAAA,MAAM,EAAE,EAAW;AACnB,gBAAA,eAAe,EAAE,EAAE;AACnB,gBAAA,OAAO,EAAE,KAAK;AACd,gBAAA,cAAc,EAAE,EAAE;AAClB,gBAAA,kBAAkB,EAAE,CAAC;AACtB,aAAA;SACF,CAAC;AAOH,KAAA;IALC,QAAQ,GAAA;QACN,IAAI,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,YAAY,QAAQ,EAAE;YAClD,IAAI,CAAC,MAAM,CAAC,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAQ,CAAC;AAChE,SAAA;KACF;;8GA1BU,iBAAiB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,C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AC;AACpB,YAAA,KAAK,EAAE;AACL,gBAAA;AACE,oBAAA,IAAI,EAAE,QAAQ;AACd,oBAAA,SAAS,EAAE,iBAAiB;oBAC5B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,iBAAA;AACD,gBAAA,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE;AACpC,aAAA;SACF,CAAC,CAAA,EAAA,CAAA,CAAA;2FAGO,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBArBhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,iBAAiB,CAAC;AACjC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,cAAc;wBAEd,uBAAuB;wBACvB,kBAAkB;wBAClB,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;AACD,gCAAA,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE;AACpC,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;AC/BD;;AAEG;;;;"}
|
@@ -18,6 +18,8 @@ class FormlyFieldTimepicker extends FieldType {
|
|
18
18
|
allowEmpty: true,
|
19
19
|
autoFocus: false,
|
20
20
|
backdrop: false,
|
21
|
+
borderless: false,
|
22
|
+
inputReadOnly: false,
|
21
23
|
open: false,
|
22
24
|
clearText: 'clear',
|
23
25
|
defaultOpenValue: new Date(),
|
@@ -47,7 +49,8 @@ FormlyFieldTimepicker.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0",
|
|
47
49
|
[nzFormat]="props['format']"
|
48
50
|
[nzHideDisabledOptions]="props['hideDisabledOptions']!!"
|
49
51
|
[nzHourStep]="props['hourStep']"
|
50
|
-
[nzBorderless]="
|
52
|
+
[nzBorderless]="props['borderless']!!"
|
53
|
+
[nzInputReadOnly]="props['inputReadOnly']!!"
|
51
54
|
[nzMinuteStep]="props['minuteStep']"
|
52
55
|
[nzSecondStep]="props['secondStep']"
|
53
56
|
[nzOpen]="props['open']!!"
|
@@ -56,7 +59,7 @@ FormlyFieldTimepicker.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0",
|
|
56
59
|
[nzSuffixIcon]="props['suffixIcon']"
|
57
60
|
(ngModelChange)="props.change && props.change(field, $event)"
|
58
61
|
(nzOpenChange)="props['openChange'] && props['openChange'](field, $event)"
|
59
|
-
></nz-time-picker>`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i3.NzTimePickerComponent, selector: "nz-time-picker", inputs: ["nzId", "nzSize", "nzStatus", "nzHourStep", "nzMinuteStep", "nzSecondStep", "nzClearText", "nzNowText", "nzOkText", "nzPopupClassName", "nzPlaceHolder", "nzAddOn", "nzDefaultOpenValue", "nzDisabledHours", "nzDisabledMinutes", "nzDisabledSeconds", "nzFormat", "nzOpen", "nzUse12Hours", "nzSuffixIcon", "nzHideDisabledOptions", "nzAllowEmpty", "nzDisabled", "nzAutoFocus", "nzBackdrop", "nzBorderless"], outputs: ["nzOpenChange"], exportAs: ["nzTimePicker"] }, { kind: "directive", type: i4.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
62
|
+
></nz-time-picker>`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i3.NzTimePickerComponent, selector: "nz-time-picker", inputs: ["nzId", "nzSize", "nzStatus", "nzHourStep", "nzMinuteStep", "nzSecondStep", "nzClearText", "nzNowText", "nzOkText", "nzPopupClassName", "nzPlaceHolder", "nzAddOn", "nzDefaultOpenValue", "nzDisabledHours", "nzDisabledMinutes", "nzDisabledSeconds", "nzFormat", "nzOpen", "nzUse12Hours", "nzSuffixIcon", "nzHideDisabledOptions", "nzAllowEmpty", "nzDisabled", "nzAutoFocus", "nzBackdrop", "nzBorderless", "nzInputReadOnly"], outputs: ["nzOpenChange"], exportAs: ["nzTimePicker"] }, { kind: "directive", type: i4.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
60
63
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyFieldTimepicker, decorators: [{
|
61
64
|
type: Component,
|
62
65
|
args: [{
|
@@ -81,7 +84,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
81
84
|
[nzFormat]="props['format']"
|
82
85
|
[nzHideDisabledOptions]="props['hideDisabledOptions']!!"
|
83
86
|
[nzHourStep]="props['hourStep']"
|
84
|
-
[nzBorderless]="
|
87
|
+
[nzBorderless]="props['borderless']!!"
|
88
|
+
[nzInputReadOnly]="props['inputReadOnly']!!"
|
85
89
|
[nzMinuteStep]="props['minuteStep']"
|
86
90
|
[nzSecondStep]="props['secondStep']"
|
87
91
|
[nzOpen]="props['open']!!"
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ngx-formly-zorro-antd-timepicker.mjs","sources":["../../../../packages/formlyantd/timepicker/src/timepicker.type.ts","../../../../packages/formlyantd/timepicker/src/timepicker.module.ts","../../../../packages/formlyantd/timepicker/src/ngx-formly-zorro-antd-timepicker.ts"],"sourcesContent":["import { Component, TemplateRef, Type, ChangeDetectionStrategy } from '@angular/core';\nimport { DatePipe } from '@angular/common';\nimport { FieldType, FormlyFieldConfig, FieldTypeConfig } from '@ngx-formly/core';\nimport type { FormlyFieldProps } from 'ngx-formly-zorro-antd/form-field';\n\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\ninterface TimepickerProps extends FormlyFieldProps {\n /**\n * 选择框底部显示自定义的内容\n */\n addOn?: TemplateRef<void>;\n\n /**\n * 是否展示清除按钮\n * @default true\n */\n allowEmpty?: boolean;\n\n /**\n * 自动获取焦点\n * @default false\n */\n autoFocus?: boolean;\n\n /**\n * 浮层是否应带有背景板\n * @default false\n */\n backdrop?: boolean;\n\n /**\n * 清除按钮的提示文案\n * @default clear\n */\n clearText?: string;\n\n /**\n * 此刻按钮文本\n * @default 此刻\n */\n nowText?: string;\n\n /**\n * 确认按钮文本\n * @default 确定\n */\n okText?: string;\n\n /**\n * 当 [ngModel] 不存在时,可以设置面板打开时默认选中的值\n * @default new Date()\n */\n defaultOpenValue?: Date;\n\n /**\n * \t禁止选择部分小时选项\n */\n disabledHours?: () => number[];\n\n /**\n * 禁止选择部分分钟选项\n */\n disabledMinutes?: (hour: number) => number[];\n\n /**\n * 禁止选择部分秒选项\n */\n disabledSeconds?: (hour: number, minute: number) => number[];\n\n /**\n * 展示的时间格式\n * @default \"HH:mm:ss\"\n */\n format?: DatePipe;\n\n /**\n * 隐藏禁止选择的选项\n * @default false\n */\n hideDisabledOptions?: boolean;\n\n /**\n * 小时选项间隔\n * @default 1\n */\n hourStep?: number;\n\n /**\n * 分钟选项间隔\n * @default 1\n */\n minuteStep?: number;\n\n /**\n * 秒选项间隔\n * @default 1\n */\n secondStep?: number;\n\n /**\n * 面板是否打开,可双向绑定\n * @default false\n */\n open?: boolean;\n\n /**\n * 弹出层类名\n * @default '''\n */\n popupClassName?: string;\n\n /**\n * 使用12小时制,为true时format默认为h:mm:ss a\n * @default false\n */\n use12Hours?: boolean;\n /**\n * 无边框\n * @default false\n */\n borderless?: boolean;\n\n /**\n * 自定义的后缀图标\n *\n */\n suffixIcon?: string | TemplateRef<void>;\n\n /**\n * 面板打开/关闭时的回调\n */\n openChange?: (field: FormlyFieldConfig, value: boolean) => void;\n}\n\nexport interface FormlyTimepickerFieldConfig extends FormlyFieldConfig<TimepickerProps> {\n type: 'timepicker' | Type<FormlyFieldTimepicker>;\n}\n\n@Component({\n selector: 'formly-field-timepicker',\n template: `<nz-time-picker\n #time\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [nzPlaceHolder]=\"props.placeholder ?? ''\"\n [ngClass]=\"props['className']\"\n [nzAddOn]=\"props['addOn']\"\n [nzAllowEmpty]=\"props['allowEmpty']!!\"\n [nzAutoFocus]=\"props['autoFocus']!!\"\n [nzBackdrop]=\"props['backdrop']!!\"\n [nzClearText]=\"props['clearText']\"\n [nzNowText]=\"props['nowText']\"\n [nzOkText]=\"props['okText']\"\n [nzDefaultOpenValue]=\"props['defaultOpenValue']\"\n [nzDisabledHours]=\"props['disabledHours']\"\n [nzDisabledMinutes]=\"props['disabledMinutes']\"\n [nzDisabledSeconds]=\"props['disabledSeconds']\"\n [nzFormat]=\"props['format']\"\n [nzHideDisabledOptions]=\"props['hideDisabledOptions']!!\"\n [nzHourStep]=\"props['hourStep']\"\n [nzBorderless]=\"
|
1
|
+
{"version":3,"file":"ngx-formly-zorro-antd-timepicker.mjs","sources":["../../../../packages/formlyantd/timepicker/src/timepicker.type.ts","../../../../packages/formlyantd/timepicker/src/timepicker.module.ts","../../../../packages/formlyantd/timepicker/src/ngx-formly-zorro-antd-timepicker.ts"],"sourcesContent":["import { Component, TemplateRef, Type, ChangeDetectionStrategy } from '@angular/core';\nimport { DatePipe } from '@angular/common';\nimport { FieldType, FormlyFieldConfig, FieldTypeConfig } from '@ngx-formly/core';\nimport type { FormlyFieldProps } from 'ngx-formly-zorro-antd/form-field';\n\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\ninterface TimepickerProps extends FormlyFieldProps {\n /**\n * 选择框底部显示自定义的内容\n */\n addOn?: TemplateRef<void>;\n\n /**\n * 是否展示清除按钮\n * @default true\n */\n allowEmpty?: boolean;\n\n /**\n * 自动获取焦点\n * @default false\n */\n autoFocus?: boolean;\n\n /**\n * 浮层是否应带有背景板\n * @default false\n */\n backdrop?: boolean;\n\n /**\n * 清除按钮的提示文案\n * @default clear\n */\n clearText?: string;\n\n /**\n * 此刻按钮文本\n * @default 此刻\n */\n nowText?: string;\n\n /**\n * 确认按钮文本\n * @default 确定\n */\n okText?: string;\n\n /**\n * 当 [ngModel] 不存在时,可以设置面板打开时默认选中的值\n * @default new Date()\n */\n defaultOpenValue?: Date;\n\n /**\n * \t禁止选择部分小时选项\n */\n disabledHours?: () => number[];\n\n /**\n * 禁止选择部分分钟选项\n */\n disabledMinutes?: (hour: number) => number[];\n\n /**\n * 禁止选择部分秒选项\n */\n disabledSeconds?: (hour: number, minute: number) => number[];\n\n /**\n * 展示的时间格式\n * @default \"HH:mm:ss\"\n */\n format?: DatePipe;\n\n /**\n * 隐藏禁止选择的选项\n * @default false\n */\n hideDisabledOptions?: boolean;\n\n /**\n * 小时选项间隔\n * @default 1\n */\n hourStep?: number;\n\n /**\n * 分钟选项间隔\n * @default 1\n */\n minuteStep?: number;\n\n /**\n * 秒选项间隔\n * @default 1\n */\n secondStep?: number;\n\n /**\n * 面板是否打开,可双向绑定\n * @default false\n */\n open?: boolean;\n\n /**\n * 弹出层类名\n * @default '''\n */\n popupClassName?: string;\n\n /**\n * 使用12小时制,为true时format默认为h:mm:ss a\n * @default false\n */\n use12Hours?: boolean;\n /**\n * 无边框\n * @default false\n */\n borderless?: boolean;\n\n /**\n * 为 input 标签设置只读属性(避免在移动设备上触发小键盘)\n * @default false\n */\n inputReadOnly?: boolean;\n\n /**\n * 自定义的后缀图标\n *\n */\n suffixIcon?: string | TemplateRef<void>;\n\n /**\n * 面板打开/关闭时的回调\n */\n openChange?: (field: FormlyFieldConfig, value: boolean) => void;\n}\n\nexport interface FormlyTimepickerFieldConfig extends FormlyFieldConfig<TimepickerProps> {\n type: 'timepicker' | Type<FormlyFieldTimepicker>;\n}\n\n@Component({\n selector: 'formly-field-timepicker',\n template: `<nz-time-picker\n #time\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [nzPlaceHolder]=\"props.placeholder ?? ''\"\n [ngClass]=\"props['className']\"\n [nzAddOn]=\"props['addOn']\"\n [nzAllowEmpty]=\"props['allowEmpty']!!\"\n [nzAutoFocus]=\"props['autoFocus']!!\"\n [nzBackdrop]=\"props['backdrop']!!\"\n [nzClearText]=\"props['clearText']\"\n [nzNowText]=\"props['nowText']\"\n [nzOkText]=\"props['okText']\"\n [nzDefaultOpenValue]=\"props['defaultOpenValue']\"\n [nzDisabledHours]=\"props['disabledHours']\"\n [nzDisabledMinutes]=\"props['disabledMinutes']\"\n [nzDisabledSeconds]=\"props['disabledSeconds']\"\n [nzFormat]=\"props['format']\"\n [nzHideDisabledOptions]=\"props['hideDisabledOptions']!!\"\n [nzHourStep]=\"props['hourStep']\"\n [nzBorderless]=\"props['borderless']!!\"\n [nzInputReadOnly]=\"props['inputReadOnly']!!\"\n [nzMinuteStep]=\"props['minuteStep']\"\n [nzSecondStep]=\"props['secondStep']\"\n [nzOpen]=\"props['open']!!\"\n [nzPopupClassName]=\"props['popupClassName']\"\n [nzUse12Hours]=\"props['use12Hours']!!\"\n [nzSuffixIcon]=\"props['suffixIcon']\"\n (ngModelChange)=\"props.change && props.change(field, $event)\"\n (nzOpenChange)=\"props['openChange'] && props['openChange'](field, $event)\"\n ></nz-time-picker>`,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class FormlyFieldTimepicker extends FieldType<FieldTypeConfig> {\n override defaultOptions = {\n props: {\n allowEmpty: true,\n autoFocus: false,\n backdrop: false,\n borderless: false,\n inputReadOnly: false,\n open: false,\n clearText: 'clear',\n defaultOpenValue: new Date(),\n format: 'HH:mm:ss' as NzSafeAny\n }\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';\n\nimport { NzTimePickerModule } from 'ng-zorro-antd/time-picker';\nimport { FormlyFieldTimepicker } from './timepicker.type';\n\n@NgModule({\n declarations: [FormlyFieldTimepicker],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n FormlyNzFormFieldModule,\n\n NzTimePickerModule,\n\n FormlyModule.forChild({\n types: [\n {\n name: 'timepicker',\n component: FormlyFieldTimepicker,\n wrappers: ['form-field']\n }\n ]\n })\n ]\n})\nexport class FormlyNzTimepickerModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;AAoLM,MAAO,qBAAsB,SAAQ,SAA0B,CAAA;AAnCrE,IAAA,WAAA,GAAA;;AAoCW,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,UAAU,EAAE,IAAI;AAChB,gBAAA,SAAS,EAAE,KAAK;AAChB,gBAAA,QAAQ,EAAE,KAAK;AACf,gBAAA,UAAU,EAAE,KAAK;AACjB,gBAAA,aAAa,EAAE,KAAK;AACpB,gBAAA,IAAI,EAAE,KAAK;AACX,gBAAA,SAAS,EAAE,OAAO;gBAClB,gBAAgB,EAAE,IAAI,IAAI,EAAE;AAC5B,gBAAA,MAAM,EAAE,UAAuB;AAChC,aAAA;SACF,CAAC;AACH,KAAA;;kHAdY,qBAAqB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAArB,qBAAA,CAAA,IAAA,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EAAE,CAAC,YAAY,CAAC;AACzB,iBAAA;AACF,aAAA;SACF,CAAC,CAAA,EAAA,CAAA,CAAA;2FAGO,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBApBpC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,qBAAqB,CAAC;AACrC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,uBAAuB;wBAEvB,kBAAkB;wBAElB,YAAY,CAAC,QAAQ,CAAC;AACpB,4BAAA,KAAK,EAAE;AACL,gCAAA;AACE,oCAAA,IAAI,EAAE,YAAY;AAClB,oCAAA,SAAS,EAAE,qBAAqB;oCAChC,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;AC5BD;;AAEG;;;;"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
|
-
import { Component, ViewEncapsulation, ChangeDetectionStrategy,
|
2
|
+
import { forwardRef, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, ViewChild, NgModule } from '@angular/core';
|
3
3
|
import * as i1 from '@angular/common';
|
4
4
|
import { CommonModule } from '@angular/common';
|
5
5
|
import * as i2$1 from '@ngx-formly/core';
|
@@ -17,12 +17,14 @@ import * as i4 from 'ng-zorro-antd/core/transition-patch';
|
|
17
17
|
import * as i5 from 'ng-zorro-antd/core/wave';
|
18
18
|
|
19
19
|
/* eslint-disable @typescript-eslint/no-empty-function */
|
20
|
-
class
|
20
|
+
class UploadNzComponent extends NzUploadComponent {
|
21
21
|
constructor() {
|
22
22
|
super(...arguments);
|
23
|
-
/**
|
24
|
-
|
25
|
-
|
23
|
+
/** 上传按钮的图标 */
|
24
|
+
this.nzeUploadButtonIcon = {
|
25
|
+
type: 'cloud-upload'
|
26
|
+
};
|
27
|
+
/** 样式名 */
|
26
28
|
this.className = '';
|
27
29
|
this.onChange = () => { };
|
28
30
|
this.onTouched = () => { };
|
@@ -52,21 +54,23 @@ class UploadComponent extends NzUploadComponent {
|
|
52
54
|
}
|
53
55
|
}
|
54
56
|
}
|
55
|
-
|
56
|
-
|
57
|
+
UploadNzComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: UploadNzComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
58
|
+
UploadNzComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: UploadNzComponent, selector: "formly-nz-upload", inputs: { nzeText: "nzeText", nzeHint: "nzeHint", nzeShowUploadButton: "nzeShowUploadButton", nzeUploadButton: "nzeUploadButton", nzeUploadButtonIcon: "nzeUploadButtonIcon", className: "className", resultMap: "resultMap" }, providers: [
|
57
59
|
{
|
58
60
|
provide: NG_VALUE_ACCESSOR,
|
59
|
-
useExisting:
|
61
|
+
useExisting: forwardRef(() => UploadNzComponent),
|
60
62
|
multi: true
|
61
63
|
}
|
62
|
-
],
|
64
|
+
], usesInheritance: true, ngImport: i0, template: `
|
63
65
|
<nz-upload
|
66
|
+
[nzType]="nzType"
|
64
67
|
[nzAccept]="nzAccept"
|
65
68
|
[nzAction]="nzAction"
|
66
69
|
[nzDirectory]="nzDirectory"
|
67
70
|
[nzBeforeUpload]="nzBeforeUpload"
|
68
71
|
[nzCustomRequest]="nzCustomRequest"
|
69
72
|
[nzData]="nzData"
|
73
|
+
[nzDisabled]="nzDisabled"
|
70
74
|
[(nzFileList)]="nzFileList"
|
71
75
|
[nzLimit]="nzLimit"
|
72
76
|
[nzSize]="nzSize"
|
@@ -90,35 +94,71 @@ UploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", versio
|
|
90
94
|
[nzFileListRender]="nzFileListRender"
|
91
95
|
[ngClass]="className"
|
92
96
|
(nzChange)="change($event)"
|
93
|
-
[nzType]="nzType"
|
94
97
|
(nzFileListChange)="fileListChange($event)"
|
95
98
|
>
|
96
|
-
<ng-container
|
97
|
-
<
|
98
|
-
<
|
99
|
-
|
100
|
-
|
101
|
-
|
99
|
+
<ng-container [ngSwitch]="nzType">
|
100
|
+
<ng-container *ngSwitchCase="'drag'">
|
101
|
+
<p class="ant-upload-drag-icon">
|
102
|
+
<span
|
103
|
+
*ngIf="nzeUploadButtonIcon"
|
104
|
+
nz-icon
|
105
|
+
[nzType]="nzeUploadButtonIcon.type"
|
106
|
+
[nzTheme]="nzeUploadButtonIcon.theme || 'outline'"
|
107
|
+
[nzSpin]="nzeUploadButtonIcon.spin!!"
|
108
|
+
[nzTwotoneColor]="nzeUploadButtonIcon.twoToneColor || ''"
|
109
|
+
></span>
|
110
|
+
</p>
|
111
|
+
<p class="ant-upload-text">{{ nzeText }}</p>
|
112
|
+
<p class="ant-upload-hint">{{ nzeHint }}</p>
|
113
|
+
</ng-container>
|
114
|
+
<ng-container *ngSwitchDefault>
|
115
|
+
<button
|
116
|
+
type="button"
|
117
|
+
nz-button
|
118
|
+
[disabled]="nzDisabled!!"
|
119
|
+
*ngIf="nzeShowUploadButton !== false"
|
120
|
+
>
|
121
|
+
<span
|
122
|
+
*ngIf="nzeUploadButtonIcon"
|
123
|
+
nz-icon
|
124
|
+
[nzType]="nzeUploadButtonIcon.type"
|
125
|
+
[nzTheme]="nzeUploadButtonIcon.theme || 'outline'"
|
126
|
+
[nzSpin]="nzeUploadButtonIcon.spin!!"
|
127
|
+
[nzTwotoneColor]="nzeUploadButtonIcon.twoToneColor || ''"
|
128
|
+
></span>
|
129
|
+
{{ nzeText }}
|
130
|
+
</button>
|
102
131
|
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
132
|
+
<div *ngIf="nzeShowUploadButton === false">
|
133
|
+
<span
|
134
|
+
*ngIf="nzeUploadButtonIcon"
|
135
|
+
nz-icon
|
136
|
+
[nzType]="nzeUploadButtonIcon.type"
|
137
|
+
[nzTheme]="nzeUploadButtonIcon.theme || 'outline'"
|
138
|
+
[nzSpin]="nzeUploadButtonIcon.spin!!"
|
139
|
+
[nzTwotoneColor]="nzeUploadButtonIcon.twoToneColor || ''"
|
140
|
+
></span>
|
141
|
+
{{ nzeText }}
|
142
|
+
<div class="ant-upload-hint" style="margin-top: 8px">{{ nzeHint }}</div>
|
143
|
+
</div>
|
144
|
+
</ng-container>
|
145
|
+
</ng-container>
|
108
146
|
</nz-upload>
|
109
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.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: "component", type: i3.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i4.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i5.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "directive", type: i6.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
110
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type:
|
147
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "component", type: i2.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: "component", type: i3.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i4.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i5.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "directive", type: i6.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
148
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: UploadNzComponent, decorators: [{
|
111
149
|
type: Component,
|
112
150
|
args: [{
|
113
|
-
selector: 'formly-upload',
|
151
|
+
selector: 'formly-nz-upload',
|
114
152
|
template: `
|
115
153
|
<nz-upload
|
154
|
+
[nzType]="nzType"
|
116
155
|
[nzAccept]="nzAccept"
|
117
156
|
[nzAction]="nzAction"
|
118
157
|
[nzDirectory]="nzDirectory"
|
119
158
|
[nzBeforeUpload]="nzBeforeUpload"
|
120
159
|
[nzCustomRequest]="nzCustomRequest"
|
121
160
|
[nzData]="nzData"
|
161
|
+
[nzDisabled]="nzDisabled"
|
122
162
|
[(nzFileList)]="nzFileList"
|
123
163
|
[nzLimit]="nzLimit"
|
124
164
|
[nzSize]="nzSize"
|
@@ -142,21 +182,55 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
142
182
|
[nzFileListRender]="nzFileListRender"
|
143
183
|
[ngClass]="className"
|
144
184
|
(nzChange)="change($event)"
|
145
|
-
[nzType]="nzType"
|
146
185
|
(nzFileListChange)="fileListChange($event)"
|
147
186
|
>
|
148
|
-
<ng-container
|
149
|
-
<
|
150
|
-
<
|
151
|
-
|
152
|
-
|
153
|
-
|
187
|
+
<ng-container [ngSwitch]="nzType">
|
188
|
+
<ng-container *ngSwitchCase="'drag'">
|
189
|
+
<p class="ant-upload-drag-icon">
|
190
|
+
<span
|
191
|
+
*ngIf="nzeUploadButtonIcon"
|
192
|
+
nz-icon
|
193
|
+
[nzType]="nzeUploadButtonIcon.type"
|
194
|
+
[nzTheme]="nzeUploadButtonIcon.theme || 'outline'"
|
195
|
+
[nzSpin]="nzeUploadButtonIcon.spin!!"
|
196
|
+
[nzTwotoneColor]="nzeUploadButtonIcon.twoToneColor || ''"
|
197
|
+
></span>
|
198
|
+
</p>
|
199
|
+
<p class="ant-upload-text">{{ nzeText }}</p>
|
200
|
+
<p class="ant-upload-hint">{{ nzeHint }}</p>
|
201
|
+
</ng-container>
|
202
|
+
<ng-container *ngSwitchDefault>
|
203
|
+
<button
|
204
|
+
type="button"
|
205
|
+
nz-button
|
206
|
+
[disabled]="nzDisabled!!"
|
207
|
+
*ngIf="nzeShowUploadButton !== false"
|
208
|
+
>
|
209
|
+
<span
|
210
|
+
*ngIf="nzeUploadButtonIcon"
|
211
|
+
nz-icon
|
212
|
+
[nzType]="nzeUploadButtonIcon.type"
|
213
|
+
[nzTheme]="nzeUploadButtonIcon.theme || 'outline'"
|
214
|
+
[nzSpin]="nzeUploadButtonIcon.spin!!"
|
215
|
+
[nzTwotoneColor]="nzeUploadButtonIcon.twoToneColor || ''"
|
216
|
+
></span>
|
217
|
+
{{ nzeText }}
|
218
|
+
</button>
|
154
219
|
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
220
|
+
<div *ngIf="nzeShowUploadButton === false">
|
221
|
+
<span
|
222
|
+
*ngIf="nzeUploadButtonIcon"
|
223
|
+
nz-icon
|
224
|
+
[nzType]="nzeUploadButtonIcon.type"
|
225
|
+
[nzTheme]="nzeUploadButtonIcon.theme || 'outline'"
|
226
|
+
[nzSpin]="nzeUploadButtonIcon.spin!!"
|
227
|
+
[nzTwotoneColor]="nzeUploadButtonIcon.twoToneColor || ''"
|
228
|
+
></span>
|
229
|
+
{{ nzeText }}
|
230
|
+
<div class="ant-upload-hint" style="margin-top: 8px">{{ nzeHint }}</div>
|
231
|
+
</div>
|
232
|
+
</ng-container>
|
233
|
+
</ng-container>
|
160
234
|
</nz-upload>
|
161
235
|
`,
|
162
236
|
encapsulation: ViewEncapsulation.None,
|
@@ -164,15 +238,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
164
238
|
providers: [
|
165
239
|
{
|
166
240
|
provide: NG_VALUE_ACCESSOR,
|
167
|
-
useExisting:
|
241
|
+
useExisting: forwardRef(() => UploadNzComponent),
|
168
242
|
multi: true
|
169
243
|
}
|
170
244
|
]
|
171
245
|
}]
|
172
|
-
}], propDecorators: {
|
173
|
-
type:
|
174
|
-
|
175
|
-
|
246
|
+
}], propDecorators: { nzeText: [{
|
247
|
+
type: Input
|
248
|
+
}], nzeHint: [{
|
249
|
+
type: Input
|
250
|
+
}], nzeShowUploadButton: [{
|
251
|
+
type: Input
|
252
|
+
}], nzeUploadButton: [{
|
253
|
+
type: Input
|
254
|
+
}], nzeUploadButtonIcon: [{
|
176
255
|
type: Input
|
177
256
|
}], className: [{
|
178
257
|
type: Input
|
@@ -190,8 +269,10 @@ class FormlyFieldUpload extends FieldType {
|
|
190
269
|
showUploadList: true,
|
191
270
|
showButton: true,
|
192
271
|
openFileDialogOnClick: true,
|
272
|
+
showUploadButton: true,
|
193
273
|
limit: 0,
|
194
274
|
size: 0,
|
275
|
+
fileList: [],
|
195
276
|
filter: [],
|
196
277
|
text: ''
|
197
278
|
}
|
@@ -205,7 +286,7 @@ class FormlyFieldUpload extends FieldType {
|
|
205
286
|
}
|
206
287
|
}
|
207
288
|
FormlyFieldUpload.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyFieldUpload, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
208
|
-
FormlyFieldUpload.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: FormlyFieldUpload, selector: "formly-field-upload", viewQueries: [{ propertyName: "upload", first: true, predicate: ["upload"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `<formly-upload
|
289
|
+
FormlyFieldUpload.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: FormlyFieldUpload, selector: "formly-field-upload", viewQueries: [{ propertyName: "upload", first: true, predicate: ["upload"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `<formly-nz-upload
|
209
290
|
#upload
|
210
291
|
[formControl]="formControl"
|
211
292
|
[formlyAttributes]="field"
|
@@ -215,6 +296,7 @@ FormlyFieldUpload.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
|
|
215
296
|
[nzBeforeUpload]="props['beforeUpload']"
|
216
297
|
[nzCustomRequest]="props['customRequest']"
|
217
298
|
[nzData]="props['data']"
|
299
|
+
[nzDisabled]="props['disabled']!!"
|
218
300
|
[(nzFileList)]="props['fileList']"
|
219
301
|
[nzLimit]="props['limit']"
|
220
302
|
[nzSize]="props['size']"
|
@@ -223,7 +305,7 @@ FormlyFieldUpload.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
|
|
223
305
|
[nzHeaders]="props['headers']"
|
224
306
|
[nzListType]="props['listType']!"
|
225
307
|
[nzMultiple]="props['multiple']!!"
|
226
|
-
[nzName]="props['name']
|
308
|
+
[nzName]="props['name'] || ''"
|
227
309
|
[nzShowUploadList]="props['showUploadList']"
|
228
310
|
[nzShowButton]="props['showButton']!!"
|
229
311
|
[nzWithCredentials]="props['withCredentials']!!"
|
@@ -232,22 +314,25 @@ FormlyFieldUpload.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
|
|
232
314
|
[nzPreviewFile]="props['previewFile']"
|
233
315
|
[nzPreviewIsImage]="props['previewIsImage']"
|
234
316
|
[nzRemove]="props['remove']"
|
235
|
-
(nzChange)="props
|
317
|
+
(nzChange)="props.change && props.change(field, $event)"
|
236
318
|
[nzDownload]="props['download']"
|
237
319
|
[nzTransformFile]="props['transformFile']"
|
238
320
|
[nzIconRender]="props['iconRender'] ?? null"
|
239
321
|
[nzFileListRender]="props['fileListRender'] ?? null"
|
240
|
-
[text]="props['text']"
|
241
|
-
[className]="props['className']"
|
242
|
-
(nzFileListChange)="props['fileListChange'] && props['fileListChange']($event)"
|
243
322
|
[resultMap]="props['resultMap']"
|
323
|
+
[nzeHint]="props['hint']"
|
324
|
+
[nzeText]="props['text']"
|
325
|
+
[nzeUploadButtonIcon]="props['uploadButtonIcon']"
|
326
|
+
[nzeShowUploadButton]="props['showUploadButton']"
|
327
|
+
[className]="props['className'] || ''"
|
328
|
+
(nzFileListChange)="props['fileListChange'] && props['fileListChange'](field, $event)"
|
244
329
|
>
|
245
|
-
</formly-upload>`, isInline: true, dependencies: [{ kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "component", type:
|
330
|
+
</formly-nz-upload>`, isInline: true, dependencies: [{ kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$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 });
|
246
331
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyFieldUpload, decorators: [{
|
247
332
|
type: Component,
|
248
333
|
args: [{
|
249
334
|
selector: 'formly-field-upload',
|
250
|
-
template: `<formly-upload
|
335
|
+
template: `<formly-nz-upload
|
251
336
|
#upload
|
252
337
|
[formControl]="formControl"
|
253
338
|
[formlyAttributes]="field"
|
@@ -257,6 +342,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
257
342
|
[nzBeforeUpload]="props['beforeUpload']"
|
258
343
|
[nzCustomRequest]="props['customRequest']"
|
259
344
|
[nzData]="props['data']"
|
345
|
+
[nzDisabled]="props['disabled']!!"
|
260
346
|
[(nzFileList)]="props['fileList']"
|
261
347
|
[nzLimit]="props['limit']"
|
262
348
|
[nzSize]="props['size']"
|
@@ -265,7 +351,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
265
351
|
[nzHeaders]="props['headers']"
|
266
352
|
[nzListType]="props['listType']!"
|
267
353
|
[nzMultiple]="props['multiple']!!"
|
268
|
-
[nzName]="props['name']
|
354
|
+
[nzName]="props['name'] || ''"
|
269
355
|
[nzShowUploadList]="props['showUploadList']"
|
270
356
|
[nzShowButton]="props['showButton']!!"
|
271
357
|
[nzWithCredentials]="props['withCredentials']!!"
|
@@ -274,17 +360,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
274
360
|
[nzPreviewFile]="props['previewFile']"
|
275
361
|
[nzPreviewIsImage]="props['previewIsImage']"
|
276
362
|
[nzRemove]="props['remove']"
|
277
|
-
(nzChange)="props
|
363
|
+
(nzChange)="props.change && props.change(field, $event)"
|
278
364
|
[nzDownload]="props['download']"
|
279
365
|
[nzTransformFile]="props['transformFile']"
|
280
366
|
[nzIconRender]="props['iconRender'] ?? null"
|
281
367
|
[nzFileListRender]="props['fileListRender'] ?? null"
|
282
|
-
[text]="props['text']"
|
283
|
-
[className]="props['className']"
|
284
|
-
(nzFileListChange)="props['fileListChange'] && props['fileListChange']($event)"
|
285
368
|
[resultMap]="props['resultMap']"
|
369
|
+
[nzeHint]="props['hint']"
|
370
|
+
[nzeText]="props['text']"
|
371
|
+
[nzeUploadButtonIcon]="props['uploadButtonIcon']"
|
372
|
+
[nzeShowUploadButton]="props['showUploadButton']"
|
373
|
+
[className]="props['className'] || ''"
|
374
|
+
(nzFileListChange)="props['fileListChange'] && props['fileListChange'](field, $event)"
|
286
375
|
>
|
287
|
-
</formly-upload>`,
|
376
|
+
</formly-nz-upload>`,
|
288
377
|
changeDetection: ChangeDetectionStrategy.OnPush
|
289
378
|
}]
|
290
379
|
}], propDecorators: { upload: [{
|
@@ -295,7 +384,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
295
384
|
class FormlyNzUploadModule {
|
296
385
|
}
|
297
386
|
FormlyNzUploadModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyNzUploadModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
298
|
-
FormlyNzUploadModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: FormlyNzUploadModule, declarations: [FormlyFieldUpload,
|
387
|
+
FormlyNzUploadModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: FormlyNzUploadModule, declarations: [FormlyFieldUpload, UploadNzComponent], imports: [CommonModule,
|
299
388
|
ReactiveFormsModule,
|
300
389
|
FormlyNzFormFieldModule,
|
301
390
|
NzUploadModule,
|
@@ -319,7 +408,7 @@ FormlyNzUploadModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", ve
|
|
319
408
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyNzUploadModule, decorators: [{
|
320
409
|
type: NgModule,
|
321
410
|
args: [{
|
322
|
-
declarations: [FormlyFieldUpload,
|
411
|
+
declarations: [FormlyFieldUpload, UploadNzComponent],
|
323
412
|
imports: [
|
324
413
|
CommonModule,
|
325
414
|
ReactiveFormsModule,
|