ngx-formly-zorro-antd 14.0.0 → 14.0.1
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -1
- package/autocomplete/autocomplete.props.d.ts +38 -38
- package/autocomplete/index.d.ts +5 -5
- package/autocomplete/public_api.d.ts +1 -1
- package/button/button.module.d.ts +11 -11
- package/button/button.type.d.ts +66 -66
- package/button/index.d.ts +5 -5
- package/button/public_api.d.ts +2 -2
- package/card/card.module.d.ts +10 -10
- package/card/card.wrapper.d.ts +58 -58
- package/card/index.d.ts +5 -5
- package/card/public_api.d.ts +2 -2
- package/cascader/cascader.module.d.ts +12 -12
- package/cascader/cascader.type.d.ts +152 -152
- package/cascader/index.d.ts +5 -5
- package/cascader/public_api.d.ts +2 -2
- package/checkbox/checkbox.module.d.ts +12 -12
- package/checkbox/checkbox.type.d.ts +35 -35
- package/checkbox/index.d.ts +5 -5
- package/checkbox/public_api.d.ts +2 -2
- package/datepicker/datepicker.module.d.ts +12 -12
- package/datepicker/datepicker.props.d.ts +144 -146
- package/datepicker/datepicker.type.d.ts +31 -31
- package/datepicker/index.d.ts +5 -5
- package/datepicker/public_api.d.ts +2 -2
- package/esm2020/autocomplete/autocomplete.props.mjs +2 -2
- package/esm2020/autocomplete/ngx-formly-zorro-antd-autocomplete.mjs +4 -4
- package/esm2020/autocomplete/public_api.mjs +2 -2
- package/esm2020/button/button.module.mjs +61 -61
- package/esm2020/button/button.type.mjs +110 -110
- package/esm2020/button/ngx-formly-zorro-antd-button.mjs +4 -4
- package/esm2020/button/public_api.mjs +3 -3
- package/esm2020/card/card.module.mjs +43 -43
- package/esm2020/card/card.wrapper.mjs +47 -47
- package/esm2020/card/ngx-formly-zorro-antd-card.mjs +4 -4
- package/esm2020/card/public_api.mjs +3 -3
- package/esm2020/cascader/cascader.module.mjs +51 -51
- package/esm2020/cascader/cascader.type.mjs +112 -112
- package/esm2020/cascader/ngx-formly-zorro-antd-cascader.mjs +4 -4
- package/esm2020/cascader/public_api.mjs +3 -3
- package/esm2020/checkbox/checkbox.module.mjs +59 -59
- package/esm2020/checkbox/checkbox.type.mjs +69 -69
- package/esm2020/checkbox/ngx-formly-zorro-antd-checkbox.mjs +4 -4
- package/esm2020/checkbox/public_api.mjs +3 -3
- package/esm2020/datepicker/datepicker.module.mjs +51 -51
- package/esm2020/datepicker/datepicker.props.mjs +2 -2
- package/esm2020/datepicker/datepicker.type.mjs +191 -189
- package/esm2020/datepicker/ngx-formly-zorro-antd-datepicker.mjs +4 -4
- package/esm2020/datepicker/public_api.mjs +3 -3
- package/esm2020/form-field/form-field.module.mjs +45 -45
- package/esm2020/form-field/form-field.props.mjs +2 -2
- package/esm2020/form-field/form-field.wrapper.mjs +127 -127
- package/esm2020/form-field/ngx-formly-zorro-antd-form-field.mjs +4 -4
- package/esm2020/form-field/public_api.mjs +2 -2
- package/esm2020/grid/grid.module.mjs +41 -41
- package/esm2020/grid/grid.props.mjs +2 -2
- package/esm2020/grid/grid.type.mjs +71 -71
- package/esm2020/grid/ngx-formly-zorro-antd-grid.mjs +4 -4
- package/esm2020/grid/public_api.mjs +3 -3
- package/esm2020/index.mjs +2 -2
- package/esm2020/input/input.module.mjs +89 -89
- package/esm2020/input/input.props.mjs +2 -2
- package/esm2020/input/input.type.mjs +309 -309
- package/esm2020/input/ngx-formly-zorro-antd-input.mjs +4 -4
- package/esm2020/input/public_api.mjs +3 -3
- package/esm2020/input-group/input-group.module.mjs +47 -47
- package/esm2020/input-group/input-group.props.mjs +2 -2
- package/esm2020/input-group/input-group.type.mjs +71 -71
- package/esm2020/input-group/ngx-formly-zorro-antd-input-group.mjs +4 -4
- package/esm2020/input-group/public_api.mjs +3 -3
- package/esm2020/input-number/input-number.module.mjs +59 -59
- package/esm2020/input-number/input-number.props.mjs +2 -2
- package/esm2020/input-number/input-number.type.mjs +128 -128
- package/esm2020/input-number/ngx-formly-zorro-antd-input-number.mjs +4 -4
- package/esm2020/input-number/public_api.mjs +3 -3
- package/esm2020/lib/ui-ng-zorro-antd.mjs +2 -2
- package/esm2020/lib/ui-ng-zorro-antd.module.mjs +97 -97
- package/esm2020/ngx-formly-zorro-antd.mjs +4 -4
- package/esm2020/radio/ngx-formly-zorro-antd-radio.mjs +4 -4
- package/esm2020/radio/public_api.mjs +3 -3
- package/esm2020/radio/radio.module.mjs +59 -59
- package/esm2020/radio/radio.type.mjs +96 -96
- package/esm2020/rate/ngx-formly-zorro-antd-rate.mjs +4 -4
- package/esm2020/rate/public_api.mjs +3 -3
- package/esm2020/rate/rate.module.mjs +51 -51
- package/esm2020/rate/rate.type.mjs +63 -63
- package/esm2020/select/ngx-formly-zorro-antd-select.mjs +4 -4
- package/esm2020/select/public_api.mjs +3 -3
- package/esm2020/select/select.module.mjs +57 -57
- package/esm2020/select/select.props.mjs +2 -2
- package/esm2020/select/select.type.mjs +163 -163
- package/esm2020/slider/ngx-formly-zorro-antd-slider.mjs +4 -4
- package/esm2020/slider/public_api.mjs +3 -3
- package/esm2020/slider/slider.module.mjs +51 -51
- package/esm2020/slider/slider.type.mjs +67 -67
- package/esm2020/switch/ngx-formly-zorro-antd-switch.mjs +4 -4
- package/esm2020/switch/public_api.mjs +3 -3
- package/esm2020/switch/switch.module.mjs +51 -51
- package/esm2020/switch/switch.type.mjs +53 -53
- package/esm2020/tabs/ngx-formly-zorro-antd-tabs.mjs +4 -4
- package/esm2020/tabs/public_api.mjs +3 -3
- package/esm2020/tabs/tabs.module.mjs +41 -41
- package/esm2020/tabs/tabs.props.mjs +2 -2
- package/esm2020/tabs/tabs.wrapper.mjs +111 -111
- package/esm2020/textarea/ngx-formly-zorro-antd-textarea.mjs +4 -4
- package/esm2020/textarea/public_api.mjs +3 -3
- package/esm2020/textarea/textarea.module.mjs +51 -51
- package/esm2020/textarea/textarea.type.mjs +88 -88
- package/esm2020/timepicker/ngx-formly-zorro-antd-timepicker.mjs +4 -4
- package/esm2020/timepicker/public_api.mjs +3 -3
- package/esm2020/timepicker/timepicker.module.mjs +51 -51
- package/esm2020/timepicker/timepicker.type.mjs +92 -92
- package/esm2020/transfer/ngx-formly-zorro-antd-transfer.mjs +4 -4
- package/esm2020/transfer/public_api.mjs +3 -3
- package/esm2020/transfer/transfer.component.mjs +128 -128
- package/esm2020/transfer/transfer.module.mjs +52 -52
- package/esm2020/transfer/transfer.type.mjs +87 -87
- package/esm2020/tree-select/ngx-formly-zorro-antd-tree-select.mjs +4 -4
- package/esm2020/tree-select/public_api.mjs +3 -3
- package/esm2020/tree-select/tree-select.module.mjs +51 -51
- package/esm2020/tree-select/tree-select.type.mjs +98 -98
- package/esm2020/upload/ngx-formly-zorro-antd-upload.mjs +4 -4
- package/esm2020/upload/public_api.mjs +3 -3
- package/esm2020/upload/upload.component.mjs +174 -174
- package/esm2020/upload/upload.module.mjs +60 -60
- package/esm2020/upload/upload.type.mjs +119 -119
- package/fesm2015/ngx-formly-zorro-antd-autocomplete.mjs +2 -2
- package/fesm2015/ngx-formly-zorro-antd-button.mjs +152 -152
- package/fesm2015/ngx-formly-zorro-antd-button.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-card.mjs +77 -77
- package/fesm2015/ngx-formly-zorro-antd-card.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-cascader.mjs +145 -145
- package/fesm2015/ngx-formly-zorro-antd-cascader.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-checkbox.mjs +110 -110
- package/fesm2015/ngx-formly-zorro-antd-checkbox.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-datepicker.mjs +224 -222
- package/fesm2015/ngx-formly-zorro-antd-datepicker.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-form-field.mjs +155 -155
- package/fesm2015/ngx-formly-zorro-antd-form-field.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-grid.mjs +97 -97
- package/fesm2015/ngx-formly-zorro-antd-grid.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-input-group.mjs +102 -102
- package/fesm2015/ngx-formly-zorro-antd-input-group.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-input-number.mjs +169 -169
- package/fesm2015/ngx-formly-zorro-antd-input-number.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-input.mjs +376 -376
- package/fesm2015/ngx-formly-zorro-antd-input.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-radio.mjs +134 -134
- package/fesm2015/ngx-formly-zorro-antd-radio.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-rate.mjs +97 -97
- package/fesm2015/ngx-formly-zorro-antd-rate.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-select.mjs +199 -199
- package/fesm2015/ngx-formly-zorro-antd-select.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-slider.mjs +101 -101
- package/fesm2015/ngx-formly-zorro-antd-slider.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-switch.mjs +87 -87
- package/fesm2015/ngx-formly-zorro-antd-switch.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-tabs.mjs +137 -137
- package/fesm2015/ngx-formly-zorro-antd-tabs.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-textarea.mjs +121 -121
- package/fesm2015/ngx-formly-zorro-antd-textarea.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-timepicker.mjs +125 -125
- package/fesm2015/ngx-formly-zorro-antd-timepicker.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-transfer.mjs +241 -241
- package/fesm2015/ngx-formly-zorro-antd-transfer.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-tree-select.mjs +131 -131
- package/fesm2015/ngx-formly-zorro-antd-tree-select.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-upload.mjs +321 -321
- package/fesm2015/ngx-formly-zorro-antd-upload.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd.mjs +74 -74
- package/fesm2015/ngx-formly-zorro-antd.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-autocomplete.mjs +2 -2
- package/fesm2020/ngx-formly-zorro-antd-button.mjs +152 -152
- package/fesm2020/ngx-formly-zorro-antd-button.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-card.mjs +77 -77
- package/fesm2020/ngx-formly-zorro-antd-card.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-cascader.mjs +145 -145
- package/fesm2020/ngx-formly-zorro-antd-cascader.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-checkbox.mjs +110 -110
- package/fesm2020/ngx-formly-zorro-antd-checkbox.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-datepicker.mjs +224 -222
- package/fesm2020/ngx-formly-zorro-antd-datepicker.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-form-field.mjs +155 -155
- package/fesm2020/ngx-formly-zorro-antd-form-field.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-grid.mjs +97 -97
- package/fesm2020/ngx-formly-zorro-antd-grid.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-input-group.mjs +102 -102
- package/fesm2020/ngx-formly-zorro-antd-input-group.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-input-number.mjs +169 -169
- package/fesm2020/ngx-formly-zorro-antd-input-number.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-input.mjs +376 -376
- package/fesm2020/ngx-formly-zorro-antd-input.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-radio.mjs +134 -134
- package/fesm2020/ngx-formly-zorro-antd-radio.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-rate.mjs +97 -97
- package/fesm2020/ngx-formly-zorro-antd-rate.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-select.mjs +199 -199
- package/fesm2020/ngx-formly-zorro-antd-select.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-slider.mjs +101 -101
- package/fesm2020/ngx-formly-zorro-antd-slider.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-switch.mjs +87 -87
- package/fesm2020/ngx-formly-zorro-antd-switch.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-tabs.mjs +137 -137
- package/fesm2020/ngx-formly-zorro-antd-tabs.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-textarea.mjs +121 -121
- package/fesm2020/ngx-formly-zorro-antd-textarea.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-timepicker.mjs +125 -125
- package/fesm2020/ngx-formly-zorro-antd-timepicker.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-transfer.mjs +241 -241
- package/fesm2020/ngx-formly-zorro-antd-transfer.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-tree-select.mjs +131 -131
- package/fesm2020/ngx-formly-zorro-antd-tree-select.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-upload.mjs +320 -320
- package/fesm2020/ngx-formly-zorro-antd-upload.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd.mjs +74 -74
- package/fesm2020/ngx-formly-zorro-antd.mjs.map +1 -1
- package/form-field/form-field.module.d.ts +11 -11
- package/form-field/form-field.props.d.ts +105 -105
- package/form-field/form-field.wrapper.d.ts +9 -9
- package/form-field/index.d.ts +5 -5
- package/form-field/public_api.d.ts +3 -3
- package/grid/grid.module.d.ts +10 -10
- package/grid/grid.props.d.ts +44 -44
- package/grid/grid.type.d.ts +11 -11
- package/grid/index.d.ts +5 -5
- package/grid/public_api.d.ts +3 -3
- package/index.d.ts +1 -1
- package/input/index.d.ts +5 -5
- package/input/input.module.d.ts +14 -14
- package/input/input.props.d.ts +36 -33
- package/input/input.type.d.ts +26 -26
- package/input/public_api.d.ts +2 -2
- package/input-group/index.d.ts +5 -5
- package/input-group/input-group.module.d.ts +11 -11
- package/input-group/input-group.props.d.ts +56 -56
- package/input-group/input-group.type.d.ts +22 -22
- package/input-group/public_api.d.ts +3 -3
- package/input-number/index.d.ts +5 -5
- package/input-number/input-number.module.d.ts +12 -12
- package/input-number/input-number.props.d.ts +81 -78
- package/input-number/input-number.type.d.ts +24 -24
- package/input-number/public_api.d.ts +2 -2
- package/lib/ui-ng-zorro-antd.d.ts +1 -1
- package/lib/ui-ng-zorro-antd.module.d.ts +27 -27
- package/package.json +5 -1
- package/radio/index.d.ts +5 -5
- package/radio/public_api.d.ts +2 -2
- package/radio/radio.module.d.ts +14 -14
- package/radio/radio.type.d.ts +38 -38
- package/rate/index.d.ts +5 -5
- package/rate/public_api.d.ts +2 -2
- package/rate/rate.module.d.ts +12 -12
- package/rate/rate.type.d.ts +57 -57
- package/select/index.d.ts +5 -5
- package/select/public_api.d.ts +2 -2
- package/select/select.module.d.ts +13 -13
- package/select/select.props.d.ts +162 -162
- package/select/select.type.d.ts +35 -35
- package/slider/index.d.ts +5 -5
- package/slider/public_api.d.ts +2 -2
- package/slider/slider.module.d.ts +12 -12
- package/slider/slider.type.d.ts +76 -76
- package/switch/index.d.ts +5 -5
- package/switch/public_api.d.ts +2 -2
- package/switch/switch.module.d.ts +12 -12
- package/switch/switch.type.d.ts +44 -44
- package/tabs/index.d.ts +5 -5
- package/tabs/public_api.d.ts +2 -2
- package/tabs/tabs.module.d.ts +10 -10
- package/tabs/tabs.props.d.ts +126 -126
- package/tabs/tabs.wrapper.d.ts +28 -28
- package/textarea/index.d.ts +5 -5
- package/textarea/public_api.d.ts +2 -2
- package/textarea/textarea.module.d.ts +12 -12
- package/textarea/textarea.type.d.ts +38 -38
- package/timepicker/index.d.ts +5 -5
- package/timepicker/public_api.d.ts +2 -2
- package/timepicker/timepicker.module.d.ts +12 -12
- package/timepicker/timepicker.type.d.ts +131 -131
- package/transfer/index.d.ts +5 -5
- package/transfer/public_api.d.ts +2 -2
- package/transfer/transfer.component.d.ts +26 -26
- package/transfer/transfer.module.d.ts +13 -13
- package/transfer/transfer.type.d.ts +118 -118
- package/tree-select/index.d.ts +5 -5
- package/tree-select/public_api.d.ts +2 -2
- package/tree-select/tree-select.module.d.ts +12 -12
- package/tree-select/tree-select.type.d.ts +158 -158
- package/upload/index.d.ts +5 -5
- package/upload/public_api.d.ts +2 -2
- package/upload/upload.component.d.ts +27 -27
- package/upload/upload.module.d.ts +15 -15
- package/upload/upload.type.d.ts +173 -173
@@ -16,333 +16,333 @@ import { NzIconModule } from 'ng-zorro-antd/icon';
|
|
16
16
|
import * as i4 from 'ng-zorro-antd/core/transition-patch';
|
17
17
|
import * as i5 from 'ng-zorro-antd/core/wave';
|
18
18
|
|
19
|
-
/* eslint-disable @typescript-eslint/no-empty-function */
|
20
|
-
class UploadComponent extends NzUploadComponent {
|
21
|
-
constructor() {
|
22
|
-
super(...arguments);
|
23
|
-
/**
|
24
|
-
* 样式名
|
25
|
-
*/
|
26
|
-
this.className = '';
|
27
|
-
this.onChange = () => { };
|
28
|
-
this.onTouched = () => { };
|
29
|
-
}
|
30
|
-
writeValue() { }
|
31
|
-
registerOnChange(fn) {
|
32
|
-
this.onChange = fn;
|
33
|
-
}
|
34
|
-
registerOnTouched(fn) {
|
35
|
-
this.onTouched = fn;
|
36
|
-
}
|
37
|
-
setDisabledState(isDisabled) {
|
38
|
-
this.nzDisabled = isDisabled;
|
39
|
-
}
|
40
|
-
fileListChange(list) {
|
41
|
-
this.nzFileListChange.emit(list);
|
42
|
-
}
|
43
|
-
change(value) {
|
44
|
-
var _a;
|
45
|
-
this.nzChange.emit(value);
|
46
|
-
if (['removed', 'success'].includes((_a = value.type) !== null && _a !== void 0 ? _a : '')) {
|
47
|
-
if (this.resultMap instanceof Function) {
|
48
|
-
this.onChange(this.resultMap(value.fileList.filter(x => x.status === 'done')));
|
49
|
-
}
|
50
|
-
else {
|
51
|
-
this.onChange(value.fileList.filter(x => x.status === 'done'));
|
52
|
-
}
|
53
|
-
}
|
54
|
-
}
|
55
|
-
}
|
56
|
-
UploadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: UploadComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
57
|
-
UploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: UploadComponent, selector: "formly-upload", inputs: { text: "text", className: "className", resultMap: "resultMap" }, providers: [
|
58
|
-
{
|
59
|
-
provide: NG_VALUE_ACCESSOR,
|
60
|
-
useExisting: UploadComponent,
|
61
|
-
multi: true
|
62
|
-
}
|
63
|
-
], viewQueries: [{ propertyName: "transfer", first: true, predicate: ["upload"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
|
64
|
-
<nz-upload
|
65
|
-
[nzAccept]="nzAccept"
|
66
|
-
[nzAction]="nzAction"
|
67
|
-
[nzDirectory]="nzDirectory"
|
68
|
-
[nzBeforeUpload]="nzBeforeUpload"
|
69
|
-
[nzCustomRequest]="nzCustomRequest"
|
70
|
-
[nzData]="nzData"
|
71
|
-
[(nzFileList)]="nzFileList"
|
72
|
-
[nzLimit]="nzLimit"
|
73
|
-
[nzSize]="nzSize"
|
74
|
-
[nzFileType]="nzFileType"
|
75
|
-
[nzFilter]="nzFilter"
|
76
|
-
[nzHeaders]="nzHeaders"
|
77
|
-
[nzListType]="nzListType"
|
78
|
-
[nzMultiple]="nzMultiple"
|
79
|
-
[nzName]="nzName"
|
80
|
-
[nzShowUploadList]="nzShowUploadList"
|
81
|
-
[nzShowButton]="nzShowButton"
|
82
|
-
[nzWithCredentials]="nzWithCredentials"
|
83
|
-
[nzOpenFileDialogOnClick]="nzOpenFileDialogOnClick"
|
84
|
-
[nzPreview]="nzPreview"
|
85
|
-
[nzPreviewFile]="nzPreviewFile"
|
86
|
-
[nzPreviewIsImage]="nzPreviewIsImage"
|
87
|
-
[nzRemove]="nzRemove"
|
88
|
-
[nzDownload]="nzDownload"
|
89
|
-
[nzTransformFile]="nzTransformFile"
|
90
|
-
[nzIconRender]="nzIconRender"
|
91
|
-
[nzFileListRender]="nzFileListRender"
|
92
|
-
[ngClass]="className"
|
93
|
-
(nzChange)="change($event)"
|
94
|
-
[nzType]="nzType"
|
95
|
-
(nzFileListChange)="fileListChange($event)"
|
96
|
-
>
|
97
|
-
<ng-container *ngIf="text; else buttontext">
|
98
|
-
<button nz-button type="button">
|
99
|
-
<i nz-icon nzType="upload"></i>
|
100
|
-
{{ text }}
|
101
|
-
</button>
|
102
|
-
</ng-container>
|
103
|
-
|
104
|
-
<ng-template #buttontext>
|
105
|
-
<button nz-button type="button">
|
106
|
-
<i nz-icon nzType="upload"></i>
|
107
|
-
</button>
|
108
|
-
</ng-template>
|
109
|
-
</nz-upload>
|
110
|
-
`, 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 });
|
111
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: UploadComponent, decorators: [{
|
112
|
-
type: Component,
|
113
|
-
args: [{
|
114
|
-
selector: 'formly-upload',
|
115
|
-
template: `
|
116
|
-
<nz-upload
|
117
|
-
[nzAccept]="nzAccept"
|
118
|
-
[nzAction]="nzAction"
|
119
|
-
[nzDirectory]="nzDirectory"
|
120
|
-
[nzBeforeUpload]="nzBeforeUpload"
|
121
|
-
[nzCustomRequest]="nzCustomRequest"
|
122
|
-
[nzData]="nzData"
|
123
|
-
[(nzFileList)]="nzFileList"
|
124
|
-
[nzLimit]="nzLimit"
|
125
|
-
[nzSize]="nzSize"
|
126
|
-
[nzFileType]="nzFileType"
|
127
|
-
[nzFilter]="nzFilter"
|
128
|
-
[nzHeaders]="nzHeaders"
|
129
|
-
[nzListType]="nzListType"
|
130
|
-
[nzMultiple]="nzMultiple"
|
131
|
-
[nzName]="nzName"
|
132
|
-
[nzShowUploadList]="nzShowUploadList"
|
133
|
-
[nzShowButton]="nzShowButton"
|
134
|
-
[nzWithCredentials]="nzWithCredentials"
|
135
|
-
[nzOpenFileDialogOnClick]="nzOpenFileDialogOnClick"
|
136
|
-
[nzPreview]="nzPreview"
|
137
|
-
[nzPreviewFile]="nzPreviewFile"
|
138
|
-
[nzPreviewIsImage]="nzPreviewIsImage"
|
139
|
-
[nzRemove]="nzRemove"
|
140
|
-
[nzDownload]="nzDownload"
|
141
|
-
[nzTransformFile]="nzTransformFile"
|
142
|
-
[nzIconRender]="nzIconRender"
|
143
|
-
[nzFileListRender]="nzFileListRender"
|
144
|
-
[ngClass]="className"
|
145
|
-
(nzChange)="change($event)"
|
146
|
-
[nzType]="nzType"
|
147
|
-
(nzFileListChange)="fileListChange($event)"
|
148
|
-
>
|
149
|
-
<ng-container *ngIf="text; else buttontext">
|
150
|
-
<button nz-button type="button">
|
151
|
-
<i nz-icon nzType="upload"></i>
|
152
|
-
{{ text }}
|
153
|
-
</button>
|
154
|
-
</ng-container>
|
155
|
-
|
156
|
-
<ng-template #buttontext>
|
157
|
-
<button nz-button type="button">
|
158
|
-
<i nz-icon nzType="upload"></i>
|
159
|
-
</button>
|
160
|
-
</ng-template>
|
161
|
-
</nz-upload>
|
162
|
-
`,
|
163
|
-
encapsulation: ViewEncapsulation.None,
|
164
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
165
|
-
providers: [
|
166
|
-
{
|
167
|
-
provide: NG_VALUE_ACCESSOR,
|
168
|
-
useExisting: UploadComponent,
|
169
|
-
multi: true
|
170
|
-
}
|
171
|
-
]
|
172
|
-
}]
|
173
|
-
}], propDecorators: { transfer: [{
|
174
|
-
type: ViewChild,
|
175
|
-
args: ['upload', { static: true }]
|
176
|
-
}], text: [{
|
177
|
-
type: Input
|
178
|
-
}], className: [{
|
179
|
-
type: Input
|
180
|
-
}], resultMap: [{
|
181
|
-
type: Input
|
19
|
+
/* eslint-disable @typescript-eslint/no-empty-function */
|
20
|
+
class UploadComponent extends NzUploadComponent {
|
21
|
+
constructor() {
|
22
|
+
super(...arguments);
|
23
|
+
/**
|
24
|
+
* 样式名
|
25
|
+
*/
|
26
|
+
this.className = '';
|
27
|
+
this.onChange = () => { };
|
28
|
+
this.onTouched = () => { };
|
29
|
+
}
|
30
|
+
writeValue() { }
|
31
|
+
registerOnChange(fn) {
|
32
|
+
this.onChange = fn;
|
33
|
+
}
|
34
|
+
registerOnTouched(fn) {
|
35
|
+
this.onTouched = fn;
|
36
|
+
}
|
37
|
+
setDisabledState(isDisabled) {
|
38
|
+
this.nzDisabled = isDisabled;
|
39
|
+
}
|
40
|
+
fileListChange(list) {
|
41
|
+
this.nzFileListChange.emit(list);
|
42
|
+
}
|
43
|
+
change(value) {
|
44
|
+
var _a;
|
45
|
+
this.nzChange.emit(value);
|
46
|
+
if (['removed', 'success'].includes((_a = value.type) !== null && _a !== void 0 ? _a : '')) {
|
47
|
+
if (this.resultMap instanceof Function) {
|
48
|
+
this.onChange(this.resultMap(value.fileList.filter(x => x.status === 'done')));
|
49
|
+
}
|
50
|
+
else {
|
51
|
+
this.onChange(value.fileList.filter(x => x.status === 'done'));
|
52
|
+
}
|
53
|
+
}
|
54
|
+
}
|
55
|
+
}
|
56
|
+
UploadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: UploadComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
57
|
+
UploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: UploadComponent, selector: "formly-upload", inputs: { text: "text", className: "className", resultMap: "resultMap" }, providers: [
|
58
|
+
{
|
59
|
+
provide: NG_VALUE_ACCESSOR,
|
60
|
+
useExisting: UploadComponent,
|
61
|
+
multi: true
|
62
|
+
}
|
63
|
+
], viewQueries: [{ propertyName: "transfer", first: true, predicate: ["upload"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
|
64
|
+
<nz-upload
|
65
|
+
[nzAccept]="nzAccept"
|
66
|
+
[nzAction]="nzAction"
|
67
|
+
[nzDirectory]="nzDirectory"
|
68
|
+
[nzBeforeUpload]="nzBeforeUpload"
|
69
|
+
[nzCustomRequest]="nzCustomRequest"
|
70
|
+
[nzData]="nzData"
|
71
|
+
[(nzFileList)]="nzFileList"
|
72
|
+
[nzLimit]="nzLimit"
|
73
|
+
[nzSize]="nzSize"
|
74
|
+
[nzFileType]="nzFileType"
|
75
|
+
[nzFilter]="nzFilter"
|
76
|
+
[nzHeaders]="nzHeaders"
|
77
|
+
[nzListType]="nzListType"
|
78
|
+
[nzMultiple]="nzMultiple"
|
79
|
+
[nzName]="nzName"
|
80
|
+
[nzShowUploadList]="nzShowUploadList"
|
81
|
+
[nzShowButton]="nzShowButton"
|
82
|
+
[nzWithCredentials]="nzWithCredentials"
|
83
|
+
[nzOpenFileDialogOnClick]="nzOpenFileDialogOnClick"
|
84
|
+
[nzPreview]="nzPreview"
|
85
|
+
[nzPreviewFile]="nzPreviewFile"
|
86
|
+
[nzPreviewIsImage]="nzPreviewIsImage"
|
87
|
+
[nzRemove]="nzRemove"
|
88
|
+
[nzDownload]="nzDownload"
|
89
|
+
[nzTransformFile]="nzTransformFile"
|
90
|
+
[nzIconRender]="nzIconRender"
|
91
|
+
[nzFileListRender]="nzFileListRender"
|
92
|
+
[ngClass]="className"
|
93
|
+
(nzChange)="change($event)"
|
94
|
+
[nzType]="nzType"
|
95
|
+
(nzFileListChange)="fileListChange($event)"
|
96
|
+
>
|
97
|
+
<ng-container *ngIf="text; else buttontext">
|
98
|
+
<button nz-button type="button">
|
99
|
+
<i nz-icon nzType="upload"></i>
|
100
|
+
{{ text }}
|
101
|
+
</button>
|
102
|
+
</ng-container>
|
103
|
+
|
104
|
+
<ng-template #buttontext>
|
105
|
+
<button nz-button type="button">
|
106
|
+
<i nz-icon nzType="upload"></i>
|
107
|
+
</button>
|
108
|
+
</ng-template>
|
109
|
+
</nz-upload>
|
110
|
+
`, 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 });
|
111
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: UploadComponent, decorators: [{
|
112
|
+
type: Component,
|
113
|
+
args: [{
|
114
|
+
selector: 'formly-upload',
|
115
|
+
template: `
|
116
|
+
<nz-upload
|
117
|
+
[nzAccept]="nzAccept"
|
118
|
+
[nzAction]="nzAction"
|
119
|
+
[nzDirectory]="nzDirectory"
|
120
|
+
[nzBeforeUpload]="nzBeforeUpload"
|
121
|
+
[nzCustomRequest]="nzCustomRequest"
|
122
|
+
[nzData]="nzData"
|
123
|
+
[(nzFileList)]="nzFileList"
|
124
|
+
[nzLimit]="nzLimit"
|
125
|
+
[nzSize]="nzSize"
|
126
|
+
[nzFileType]="nzFileType"
|
127
|
+
[nzFilter]="nzFilter"
|
128
|
+
[nzHeaders]="nzHeaders"
|
129
|
+
[nzListType]="nzListType"
|
130
|
+
[nzMultiple]="nzMultiple"
|
131
|
+
[nzName]="nzName"
|
132
|
+
[nzShowUploadList]="nzShowUploadList"
|
133
|
+
[nzShowButton]="nzShowButton"
|
134
|
+
[nzWithCredentials]="nzWithCredentials"
|
135
|
+
[nzOpenFileDialogOnClick]="nzOpenFileDialogOnClick"
|
136
|
+
[nzPreview]="nzPreview"
|
137
|
+
[nzPreviewFile]="nzPreviewFile"
|
138
|
+
[nzPreviewIsImage]="nzPreviewIsImage"
|
139
|
+
[nzRemove]="nzRemove"
|
140
|
+
[nzDownload]="nzDownload"
|
141
|
+
[nzTransformFile]="nzTransformFile"
|
142
|
+
[nzIconRender]="nzIconRender"
|
143
|
+
[nzFileListRender]="nzFileListRender"
|
144
|
+
[ngClass]="className"
|
145
|
+
(nzChange)="change($event)"
|
146
|
+
[nzType]="nzType"
|
147
|
+
(nzFileListChange)="fileListChange($event)"
|
148
|
+
>
|
149
|
+
<ng-container *ngIf="text; else buttontext">
|
150
|
+
<button nz-button type="button">
|
151
|
+
<i nz-icon nzType="upload"></i>
|
152
|
+
{{ text }}
|
153
|
+
</button>
|
154
|
+
</ng-container>
|
155
|
+
|
156
|
+
<ng-template #buttontext>
|
157
|
+
<button nz-button type="button">
|
158
|
+
<i nz-icon nzType="upload"></i>
|
159
|
+
</button>
|
160
|
+
</ng-template>
|
161
|
+
</nz-upload>
|
162
|
+
`,
|
163
|
+
encapsulation: ViewEncapsulation.None,
|
164
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
165
|
+
providers: [
|
166
|
+
{
|
167
|
+
provide: NG_VALUE_ACCESSOR,
|
168
|
+
useExisting: UploadComponent,
|
169
|
+
multi: true
|
170
|
+
}
|
171
|
+
]
|
172
|
+
}]
|
173
|
+
}], propDecorators: { transfer: [{
|
174
|
+
type: ViewChild,
|
175
|
+
args: ['upload', { static: true }]
|
176
|
+
}], text: [{
|
177
|
+
type: Input
|
178
|
+
}], className: [{
|
179
|
+
type: Input
|
180
|
+
}], resultMap: [{
|
181
|
+
type: Input
|
182
182
|
}] } });
|
183
183
|
|
184
|
-
class FormlyFieldUpload extends FieldType {
|
185
|
-
constructor() {
|
186
|
-
super(...arguments);
|
187
|
-
this.defaultOptions = {
|
188
|
-
props: {
|
189
|
-
listType: 'text',
|
190
|
-
name: 'file',
|
191
|
-
showUploadList: true,
|
192
|
-
showButton: true,
|
193
|
-
openFileDialogOnClick: true,
|
194
|
-
limit: 0,
|
195
|
-
size: 0,
|
196
|
-
filter: [],
|
197
|
-
text: ''
|
198
|
-
}
|
199
|
-
};
|
200
|
-
}
|
201
|
-
ngOnInit() {
|
202
|
-
const type = this.props.type;
|
203
|
-
if (type) {
|
204
|
-
this.upload.nzType = type;
|
205
|
-
}
|
206
|
-
}
|
207
|
-
}
|
208
|
-
FormlyFieldUpload.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyFieldUpload, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
209
|
-
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
|
210
|
-
#upload
|
211
|
-
[formControl]="formControl"
|
212
|
-
[formlyAttributes]="field"
|
213
|
-
[nzAccept]="props['accept']"
|
214
|
-
[nzAction]="props['action']"
|
215
|
-
[nzDirectory]="props['directory']!!"
|
216
|
-
[nzBeforeUpload]="props['beforeUpload']"
|
217
|
-
[nzCustomRequest]="props['customRequest']"
|
218
|
-
[nzData]="props['data']"
|
219
|
-
[(nzFileList)]="props['fileList']"
|
220
|
-
[nzLimit]="props['limit']"
|
221
|
-
[nzSize]="props['size']"
|
222
|
-
[nzFileType]="props['fileType']"
|
223
|
-
[nzFilter]="props['filter']!"
|
224
|
-
[nzHeaders]="props['headers']"
|
225
|
-
[nzListType]="props['listType']!"
|
226
|
-
[nzMultiple]="props['multiple']!!"
|
227
|
-
[nzName]="props['name']!"
|
228
|
-
[nzShowUploadList]="props['showUploadList']"
|
229
|
-
[nzShowButton]="props['showButton']!!"
|
230
|
-
[nzWithCredentials]="props['withCredentials']!!"
|
231
|
-
[nzOpenFileDialogOnClick]="props['openFileDialogOnClick']!!"
|
232
|
-
[nzPreview]="props['preview']"
|
233
|
-
[nzPreviewFile]="props['previewFile']"
|
234
|
-
[nzPreviewIsImage]="props['previewIsImage']"
|
235
|
-
[nzRemove]="props['remove']"
|
236
|
-
(nzChange)="props['change'] && props['change']($event)"
|
237
|
-
[nzDownload]="props['download']"
|
238
|
-
[nzTransformFile]="props['transformFile']"
|
239
|
-
[nzIconRender]="props['iconRender'] ?? null"
|
240
|
-
[nzFileListRender]="props['fileListRender'] ?? null"
|
241
|
-
[text]="props['text']"
|
242
|
-
[className]="props['className']"
|
243
|
-
(nzFileListChange)="props['fileListChange'] && props['fileListChange']($event)"
|
244
|
-
[resultMap]="props['resultMap']"
|
245
|
-
>
|
246
|
-
</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: UploadComponent, selector: "formly-upload", inputs: ["text", "className", "resultMap"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
247
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyFieldUpload, decorators: [{
|
248
|
-
type: Component,
|
249
|
-
args: [{
|
250
|
-
selector: 'formly-field-upload',
|
251
|
-
template: `<formly-upload
|
252
|
-
#upload
|
253
|
-
[formControl]="formControl"
|
254
|
-
[formlyAttributes]="field"
|
255
|
-
[nzAccept]="props['accept']"
|
256
|
-
[nzAction]="props['action']"
|
257
|
-
[nzDirectory]="props['directory']!!"
|
258
|
-
[nzBeforeUpload]="props['beforeUpload']"
|
259
|
-
[nzCustomRequest]="props['customRequest']"
|
260
|
-
[nzData]="props['data']"
|
261
|
-
[(nzFileList)]="props['fileList']"
|
262
|
-
[nzLimit]="props['limit']"
|
263
|
-
[nzSize]="props['size']"
|
264
|
-
[nzFileType]="props['fileType']"
|
265
|
-
[nzFilter]="props['filter']!"
|
266
|
-
[nzHeaders]="props['headers']"
|
267
|
-
[nzListType]="props['listType']!"
|
268
|
-
[nzMultiple]="props['multiple']!!"
|
269
|
-
[nzName]="props['name']!"
|
270
|
-
[nzShowUploadList]="props['showUploadList']"
|
271
|
-
[nzShowButton]="props['showButton']!!"
|
272
|
-
[nzWithCredentials]="props['withCredentials']!!"
|
273
|
-
[nzOpenFileDialogOnClick]="props['openFileDialogOnClick']!!"
|
274
|
-
[nzPreview]="props['preview']"
|
275
|
-
[nzPreviewFile]="props['previewFile']"
|
276
|
-
[nzPreviewIsImage]="props['previewIsImage']"
|
277
|
-
[nzRemove]="props['remove']"
|
278
|
-
(nzChange)="props['change'] && props['change']($event)"
|
279
|
-
[nzDownload]="props['download']"
|
280
|
-
[nzTransformFile]="props['transformFile']"
|
281
|
-
[nzIconRender]="props['iconRender'] ?? null"
|
282
|
-
[nzFileListRender]="props['fileListRender'] ?? null"
|
283
|
-
[text]="props['text']"
|
284
|
-
[className]="props['className']"
|
285
|
-
(nzFileListChange)="props['fileListChange'] && props['fileListChange']($event)"
|
286
|
-
[resultMap]="props['resultMap']"
|
287
|
-
>
|
288
|
-
</formly-upload>`,
|
289
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
290
|
-
}]
|
291
|
-
}], propDecorators: { upload: [{
|
292
|
-
type: ViewChild,
|
293
|
-
args: ['upload', { static: true }]
|
184
|
+
class FormlyFieldUpload extends FieldType {
|
185
|
+
constructor() {
|
186
|
+
super(...arguments);
|
187
|
+
this.defaultOptions = {
|
188
|
+
props: {
|
189
|
+
listType: 'text',
|
190
|
+
name: 'file',
|
191
|
+
showUploadList: true,
|
192
|
+
showButton: true,
|
193
|
+
openFileDialogOnClick: true,
|
194
|
+
limit: 0,
|
195
|
+
size: 0,
|
196
|
+
filter: [],
|
197
|
+
text: ''
|
198
|
+
}
|
199
|
+
};
|
200
|
+
}
|
201
|
+
ngOnInit() {
|
202
|
+
const type = this.props.type;
|
203
|
+
if (type) {
|
204
|
+
this.upload.nzType = type;
|
205
|
+
}
|
206
|
+
}
|
207
|
+
}
|
208
|
+
FormlyFieldUpload.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyFieldUpload, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
209
|
+
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
|
210
|
+
#upload
|
211
|
+
[formControl]="formControl"
|
212
|
+
[formlyAttributes]="field"
|
213
|
+
[nzAccept]="props['accept']"
|
214
|
+
[nzAction]="props['action']"
|
215
|
+
[nzDirectory]="props['directory']!!"
|
216
|
+
[nzBeforeUpload]="props['beforeUpload']"
|
217
|
+
[nzCustomRequest]="props['customRequest']"
|
218
|
+
[nzData]="props['data']"
|
219
|
+
[(nzFileList)]="props['fileList']"
|
220
|
+
[nzLimit]="props['limit']"
|
221
|
+
[nzSize]="props['size']"
|
222
|
+
[nzFileType]="props['fileType']"
|
223
|
+
[nzFilter]="props['filter']!"
|
224
|
+
[nzHeaders]="props['headers']"
|
225
|
+
[nzListType]="props['listType']!"
|
226
|
+
[nzMultiple]="props['multiple']!!"
|
227
|
+
[nzName]="props['name']!"
|
228
|
+
[nzShowUploadList]="props['showUploadList']"
|
229
|
+
[nzShowButton]="props['showButton']!!"
|
230
|
+
[nzWithCredentials]="props['withCredentials']!!"
|
231
|
+
[nzOpenFileDialogOnClick]="props['openFileDialogOnClick']!!"
|
232
|
+
[nzPreview]="props['preview']"
|
233
|
+
[nzPreviewFile]="props['previewFile']"
|
234
|
+
[nzPreviewIsImage]="props['previewIsImage']"
|
235
|
+
[nzRemove]="props['remove']"
|
236
|
+
(nzChange)="props['change'] && props['change']($event)"
|
237
|
+
[nzDownload]="props['download']"
|
238
|
+
[nzTransformFile]="props['transformFile']"
|
239
|
+
[nzIconRender]="props['iconRender'] ?? null"
|
240
|
+
[nzFileListRender]="props['fileListRender'] ?? null"
|
241
|
+
[text]="props['text']"
|
242
|
+
[className]="props['className']"
|
243
|
+
(nzFileListChange)="props['fileListChange'] && props['fileListChange']($event)"
|
244
|
+
[resultMap]="props['resultMap']"
|
245
|
+
>
|
246
|
+
</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: UploadComponent, selector: "formly-upload", inputs: ["text", "className", "resultMap"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
247
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyFieldUpload, decorators: [{
|
248
|
+
type: Component,
|
249
|
+
args: [{
|
250
|
+
selector: 'formly-field-upload',
|
251
|
+
template: `<formly-upload
|
252
|
+
#upload
|
253
|
+
[formControl]="formControl"
|
254
|
+
[formlyAttributes]="field"
|
255
|
+
[nzAccept]="props['accept']"
|
256
|
+
[nzAction]="props['action']"
|
257
|
+
[nzDirectory]="props['directory']!!"
|
258
|
+
[nzBeforeUpload]="props['beforeUpload']"
|
259
|
+
[nzCustomRequest]="props['customRequest']"
|
260
|
+
[nzData]="props['data']"
|
261
|
+
[(nzFileList)]="props['fileList']"
|
262
|
+
[nzLimit]="props['limit']"
|
263
|
+
[nzSize]="props['size']"
|
264
|
+
[nzFileType]="props['fileType']"
|
265
|
+
[nzFilter]="props['filter']!"
|
266
|
+
[nzHeaders]="props['headers']"
|
267
|
+
[nzListType]="props['listType']!"
|
268
|
+
[nzMultiple]="props['multiple']!!"
|
269
|
+
[nzName]="props['name']!"
|
270
|
+
[nzShowUploadList]="props['showUploadList']"
|
271
|
+
[nzShowButton]="props['showButton']!!"
|
272
|
+
[nzWithCredentials]="props['withCredentials']!!"
|
273
|
+
[nzOpenFileDialogOnClick]="props['openFileDialogOnClick']!!"
|
274
|
+
[nzPreview]="props['preview']"
|
275
|
+
[nzPreviewFile]="props['previewFile']"
|
276
|
+
[nzPreviewIsImage]="props['previewIsImage']"
|
277
|
+
[nzRemove]="props['remove']"
|
278
|
+
(nzChange)="props['change'] && props['change']($event)"
|
279
|
+
[nzDownload]="props['download']"
|
280
|
+
[nzTransformFile]="props['transformFile']"
|
281
|
+
[nzIconRender]="props['iconRender'] ?? null"
|
282
|
+
[nzFileListRender]="props['fileListRender'] ?? null"
|
283
|
+
[text]="props['text']"
|
284
|
+
[className]="props['className']"
|
285
|
+
(nzFileListChange)="props['fileListChange'] && props['fileListChange']($event)"
|
286
|
+
[resultMap]="props['resultMap']"
|
287
|
+
>
|
288
|
+
</formly-upload>`,
|
289
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
290
|
+
}]
|
291
|
+
}], propDecorators: { upload: [{
|
292
|
+
type: ViewChild,
|
293
|
+
args: ['upload', { static: true }]
|
294
294
|
}] } });
|
295
295
|
|
296
|
-
class FormlyNzUploadModule {
|
297
|
-
}
|
298
|
-
FormlyNzUploadModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyNzUploadModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
299
|
-
FormlyNzUploadModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: FormlyNzUploadModule, declarations: [FormlyFieldUpload, UploadComponent], imports: [CommonModule,
|
300
|
-
ReactiveFormsModule,
|
301
|
-
FormlyNzFormFieldModule,
|
302
|
-
NzUploadModule,
|
303
|
-
NzButtonModule,
|
304
|
-
NzIconModule, i2$1.FormlyModule] });
|
305
|
-
FormlyNzUploadModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyNzUploadModule, imports: [CommonModule,
|
306
|
-
ReactiveFormsModule,
|
307
|
-
FormlyNzFormFieldModule,
|
308
|
-
NzUploadModule,
|
309
|
-
NzButtonModule,
|
310
|
-
NzIconModule,
|
311
|
-
FormlyModule.forChild({
|
312
|
-
types: [
|
313
|
-
{
|
314
|
-
name: 'upload',
|
315
|
-
component: FormlyFieldUpload,
|
316
|
-
wrappers: ['form-field']
|
317
|
-
}
|
318
|
-
]
|
319
|
-
})] });
|
320
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyNzUploadModule, decorators: [{
|
321
|
-
type: NgModule,
|
322
|
-
args: [{
|
323
|
-
declarations: [FormlyFieldUpload, UploadComponent],
|
324
|
-
imports: [
|
325
|
-
CommonModule,
|
326
|
-
ReactiveFormsModule,
|
327
|
-
FormlyNzFormFieldModule,
|
328
|
-
NzUploadModule,
|
329
|
-
NzButtonModule,
|
330
|
-
NzIconModule,
|
331
|
-
FormlyModule.forChild({
|
332
|
-
types: [
|
333
|
-
{
|
334
|
-
name: 'upload',
|
335
|
-
component: FormlyFieldUpload,
|
336
|
-
wrappers: ['form-field']
|
337
|
-
}
|
338
|
-
]
|
339
|
-
})
|
340
|
-
]
|
341
|
-
}]
|
296
|
+
class FormlyNzUploadModule {
|
297
|
+
}
|
298
|
+
FormlyNzUploadModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyNzUploadModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
299
|
+
FormlyNzUploadModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: FormlyNzUploadModule, declarations: [FormlyFieldUpload, UploadComponent], imports: [CommonModule,
|
300
|
+
ReactiveFormsModule,
|
301
|
+
FormlyNzFormFieldModule,
|
302
|
+
NzUploadModule,
|
303
|
+
NzButtonModule,
|
304
|
+
NzIconModule, i2$1.FormlyModule] });
|
305
|
+
FormlyNzUploadModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyNzUploadModule, imports: [CommonModule,
|
306
|
+
ReactiveFormsModule,
|
307
|
+
FormlyNzFormFieldModule,
|
308
|
+
NzUploadModule,
|
309
|
+
NzButtonModule,
|
310
|
+
NzIconModule,
|
311
|
+
FormlyModule.forChild({
|
312
|
+
types: [
|
313
|
+
{
|
314
|
+
name: 'upload',
|
315
|
+
component: FormlyFieldUpload,
|
316
|
+
wrappers: ['form-field']
|
317
|
+
}
|
318
|
+
]
|
319
|
+
})] });
|
320
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: FormlyNzUploadModule, decorators: [{
|
321
|
+
type: NgModule,
|
322
|
+
args: [{
|
323
|
+
declarations: [FormlyFieldUpload, UploadComponent],
|
324
|
+
imports: [
|
325
|
+
CommonModule,
|
326
|
+
ReactiveFormsModule,
|
327
|
+
FormlyNzFormFieldModule,
|
328
|
+
NzUploadModule,
|
329
|
+
NzButtonModule,
|
330
|
+
NzIconModule,
|
331
|
+
FormlyModule.forChild({
|
332
|
+
types: [
|
333
|
+
{
|
334
|
+
name: 'upload',
|
335
|
+
component: FormlyFieldUpload,
|
336
|
+
wrappers: ['form-field']
|
337
|
+
}
|
338
|
+
]
|
339
|
+
})
|
340
|
+
]
|
341
|
+
}]
|
342
342
|
}] });
|
343
343
|
|
344
|
-
/**
|
345
|
-
* Generated bundle index. Do not edit.
|
344
|
+
/**
|
345
|
+
* Generated bundle index. Do not edit.
|
346
346
|
*/
|
347
347
|
|
348
348
|
export { FormlyFieldUpload, FormlyNzUploadModule };
|