ngx-formly-zorro-antd 17.0.9 → 17.0.11
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -1
- package/esm2022/autocomplete/autocomplete.props.mjs +1 -1
- package/esm2022/autocomplete/public_api.mjs +1 -1
- package/esm2022/button/button.module.mjs +1 -1
- package/esm2022/button/button.type.mjs +123 -123
- package/esm2022/button/public_api.mjs +1 -1
- package/esm2022/button-group/button-group.module.mjs +1 -1
- package/esm2022/button-group/button-group.type.mjs +67 -67
- package/esm2022/button-group/public_api.mjs +1 -1
- package/esm2022/card/card.module.mjs +1 -1
- package/esm2022/card/card.type.mjs +51 -51
- package/esm2022/card/public_api.mjs +1 -1
- package/esm2022/card-wrapper/card-wrapper.module.mjs +1 -1
- package/esm2022/card-wrapper/card-wrapper.props.mjs +1 -1
- package/esm2022/card-wrapper/card.wrapper.mjs +37 -37
- package/esm2022/card-wrapper/public_api.mjs +1 -1
- package/esm2022/cascader/cascader.module.mjs +1 -1
- package/esm2022/cascader/cascader.type.mjs +65 -65
- package/esm2022/cascader/public_api.mjs +1 -1
- package/esm2022/checkbox/checkbox.module.mjs +1 -1
- package/esm2022/checkbox/checkbox.type.mjs +39 -39
- package/esm2022/checkbox/public_api.mjs +1 -1
- package/esm2022/common/common.module.mjs +1 -1
- package/esm2022/common/formly-box-templates.directive.mjs +1 -1
- package/esm2022/common/formly-utils.mjs +1 -1
- package/esm2022/common/interface.mjs +1 -1
- package/esm2022/common/public_api.mjs +1 -1
- package/esm2022/datepicker/datepicker.module.mjs +1 -1
- package/esm2022/datepicker/datepicker.props.mjs +1 -1
- package/esm2022/datepicker/datepicker.type.mjs +149 -149
- package/esm2022/datepicker/public_api.mjs +1 -1
- package/esm2022/extension/public_api.mjs +1 -1
- package/esm2022/extension/value-changes-extension.mjs +1 -1
- package/esm2022/form-field/form-field.module.mjs +1 -1
- package/esm2022/form-field/form-field.props.mjs +1 -1
- package/esm2022/form-field/form-field.wrapper.mjs +125 -125
- package/esm2022/form-field/public_api.mjs +1 -1
- package/esm2022/grid/grid.module.mjs +1 -1
- package/esm2022/grid/grid.props.mjs +1 -1
- package/esm2022/grid/grid.type.mjs +59 -59
- package/esm2022/grid/public_api.mjs +1 -1
- package/esm2022/index.mjs +1 -1
- package/esm2022/input/input.module.mjs +1 -1
- package/esm2022/input/input.props.mjs +1 -1
- package/esm2022/input/input.type.mjs +297 -286
- package/esm2022/input/public_api.mjs +1 -1
- package/esm2022/input-group/input-group.module.mjs +1 -1
- package/esm2022/input-group/input-group.props.mjs +1 -1
- package/esm2022/input-group/input-group.type.mjs +39 -39
- package/esm2022/input-group/public_api.mjs +1 -1
- package/esm2022/input-number/input-number.module.mjs +1 -1
- package/esm2022/input-number/input-number.props.mjs +1 -1
- package/esm2022/input-number/input-number.type.mjs +89 -89
- package/esm2022/input-number/public_api.mjs +1 -1
- package/esm2022/lib/ui-ng-zorro-antd.mjs +1 -1
- package/esm2022/lib/ui-ng-zorro-antd.module.mjs +1 -1
- package/esm2022/radio/public_api.mjs +1 -1
- package/esm2022/radio/radio.module.mjs +1 -1
- package/esm2022/radio/radio.type.mjs +81 -81
- package/esm2022/rate/public_api.mjs +1 -1
- package/esm2022/rate/rate.module.mjs +1 -1
- package/esm2022/rate/rate.type.mjs +33 -33
- package/esm2022/ref-template/public_api.mjs +1 -1
- package/esm2022/ref-template/ref-template.module.mjs +1 -1
- package/esm2022/ref-template/ref-template.type.mjs +9 -9
- package/esm2022/select/public_api.mjs +1 -1
- package/esm2022/select/select.module.mjs +1 -1
- package/esm2022/select/select.props.mjs +1 -1
- package/esm2022/select/select.type.mjs +124 -123
- package/esm2022/slider/public_api.mjs +1 -1
- package/esm2022/slider/slider.module.mjs +1 -1
- package/esm2022/slider/slider.type.mjs +33 -33
- package/esm2022/space/public_api.mjs +1 -1
- package/esm2022/space/space.module.mjs +1 -1
- package/esm2022/space/space.type.mjs +27 -27
- package/esm2022/switch/public_api.mjs +1 -1
- package/esm2022/switch/switch.module.mjs +1 -1
- package/esm2022/switch/switch.type.mjs +25 -25
- package/esm2022/tabs/public_api.mjs +1 -1
- package/esm2022/tabs/tabs.module.mjs +1 -1
- package/esm2022/tabs/tabs.props.mjs +1 -1
- package/esm2022/tabs/tabs.wrapper.mjs +79 -79
- package/esm2022/textarea/public_api.mjs +1 -1
- package/esm2022/textarea/textarea.module.mjs +1 -1
- package/esm2022/textarea/textarea.type.mjs +113 -111
- package/esm2022/timepicker/public_api.mjs +1 -1
- package/esm2022/timepicker/timepicker.module.mjs +1 -1
- package/esm2022/timepicker/timepicker.type.mjs +61 -61
- package/esm2022/transfer/public_api.mjs +1 -1
- package/esm2022/transfer/transfer.component.mjs +49 -49
- package/esm2022/transfer/transfer.module.mjs +1 -1
- package/esm2022/transfer/transfer.type.mjs +47 -47
- package/esm2022/tree-select/public_api.mjs +1 -1
- package/esm2022/tree-select/tree-select.module.mjs +1 -1
- package/esm2022/tree-select/tree-select.type.mjs +69 -69
- package/esm2022/upload/public_api.mjs +1 -1
- package/esm2022/upload/upload.component.mjs +143 -143
- package/esm2022/upload/upload.module.mjs +1 -1
- package/esm2022/upload/upload.props.mjs +1 -1
- package/esm2022/upload/upload.type.mjs +83 -83
- package/fesm2022/ngx-formly-zorro-antd-button-group.mjs +66 -66
- package/fesm2022/ngx-formly-zorro-antd-button-group.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-button.mjs +122 -122
- package/fesm2022/ngx-formly-zorro-antd-button.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-card-wrapper.mjs +36 -36
- package/fesm2022/ngx-formly-zorro-antd-card-wrapper.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-card.mjs +50 -50
- package/fesm2022/ngx-formly-zorro-antd-card.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-cascader.mjs +64 -64
- package/fesm2022/ngx-formly-zorro-antd-cascader.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-checkbox.mjs +38 -38
- package/fesm2022/ngx-formly-zorro-antd-checkbox.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-common.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-datepicker.mjs +148 -148
- package/fesm2022/ngx-formly-zorro-antd-datepicker.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-extension.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-form-field.mjs +124 -124
- package/fesm2022/ngx-formly-zorro-antd-form-field.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-grid.mjs +58 -58
- package/fesm2022/ngx-formly-zorro-antd-grid.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-input-group.mjs +38 -38
- package/fesm2022/ngx-formly-zorro-antd-input-group.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-input-number.mjs +88 -88
- package/fesm2022/ngx-formly-zorro-antd-input-number.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-input.mjs +297 -286
- package/fesm2022/ngx-formly-zorro-antd-input.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-radio.mjs +80 -80
- package/fesm2022/ngx-formly-zorro-antd-radio.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-rate.mjs +32 -32
- package/fesm2022/ngx-formly-zorro-antd-rate.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-ref-template.mjs +8 -8
- package/fesm2022/ngx-formly-zorro-antd-ref-template.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-select.mjs +123 -122
- package/fesm2022/ngx-formly-zorro-antd-select.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-slider.mjs +32 -32
- package/fesm2022/ngx-formly-zorro-antd-slider.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-space.mjs +26 -26
- package/fesm2022/ngx-formly-zorro-antd-space.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-switch.mjs +24 -24
- package/fesm2022/ngx-formly-zorro-antd-switch.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-tabs.mjs +78 -78
- package/fesm2022/ngx-formly-zorro-antd-tabs.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-textarea.mjs +112 -110
- package/fesm2022/ngx-formly-zorro-antd-textarea.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-timepicker.mjs +60 -60
- package/fesm2022/ngx-formly-zorro-antd-timepicker.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-transfer.mjs +94 -94
- package/fesm2022/ngx-formly-zorro-antd-transfer.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-tree-select.mjs +68 -68
- package/fesm2022/ngx-formly-zorro-antd-tree-select.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-upload.mjs +224 -224
- package/fesm2022/ngx-formly-zorro-antd-upload.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd.mjs.map +1 -1
- package/input/input.type.d.ts +6 -1
- package/input-group/input-group.props.d.ts +4 -0
- package/package.json +7 -7
- package/select/select.type.d.ts +1 -0
- package/autocomplete/package.json +0 -3
- package/button/package.json +0 -3
- package/button-group/package.json +0 -3
- package/card/package.json +0 -3
- package/card-wrapper/package.json +0 -3
- package/cascader/package.json +0 -3
- package/checkbox/package.json +0 -3
- package/common/package.json +0 -3
- package/datepicker/package.json +0 -3
- package/extension/package.json +0 -3
- package/form-field/package.json +0 -3
- package/grid/package.json +0 -3
- package/input/package.json +0 -3
- package/input-group/package.json +0 -3
- package/input-number/package.json +0 -3
- package/radio/package.json +0 -3
- package/rate/package.json +0 -3
- package/ref-template/package.json +0 -3
- package/select/package.json +0 -3
- package/slider/package.json +0 -3
- package/space/package.json +0 -3
- package/switch/package.json +0 -3
- package/tabs/package.json +0 -3
- package/textarea/package.json +0 -3
- package/timepicker/package.json +0 -3
- package/transfer/package.json +0 -3
- package/tree-select/package.json +0 -3
- package/upload/package.json +0 -3
@@ -1,22 +1,25 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
|
-
import { Component, ChangeDetectionStrategy, NgModule } from '@angular/core';
|
3
|
-
import * as
|
2
|
+
import { Component, ChangeDetectionStrategy, Optional, NgModule } from '@angular/core';
|
3
|
+
import * as i2 from '@angular/common';
|
4
4
|
import { CommonModule } from '@angular/common';
|
5
|
-
import * as
|
5
|
+
import * as i7 from '@ngx-formly/core';
|
6
6
|
import { FieldType, FormlyModule } from '@ngx-formly/core';
|
7
|
-
import * as
|
7
|
+
import * as i3 from '@angular/forms';
|
8
8
|
import { ReactiveFormsModule } from '@angular/forms';
|
9
9
|
import { FormlyNzFormFieldModule } from 'ngx-formly-zorro-antd/form-field';
|
10
|
-
import * as
|
10
|
+
import * as i4 from 'ng-zorro-antd/input';
|
11
11
|
import { NzInputModule } from 'ng-zorro-antd/input';
|
12
|
-
import * as
|
12
|
+
import * as i5 from 'ng-zorro-antd/auto-complete';
|
13
13
|
import { NzAutocompleteModule } from 'ng-zorro-antd/auto-complete';
|
14
|
-
import * as
|
14
|
+
import * as i6 from 'ng-zorro-antd/icon';
|
15
15
|
import { NzIconModule } from 'ng-zorro-antd/icon';
|
16
|
+
import * as i1 from 'ngx-formly-zorro-antd/common';
|
17
|
+
import { resolveTplName } from 'ngx-formly-zorro-antd/common';
|
16
18
|
|
17
19
|
class FormlyFieldInput extends FieldType {
|
18
|
-
constructor() {
|
19
|
-
super(
|
20
|
+
constructor(fieldTemplates) {
|
21
|
+
super();
|
22
|
+
this.fieldTemplates = fieldTemplates;
|
20
23
|
this.defaultOptions = {
|
21
24
|
props: {
|
22
25
|
borderless: false,
|
@@ -32,291 +35,299 @@ class FormlyFieldInput extends FieldType {
|
|
32
35
|
};
|
33
36
|
this.passwordVisible = false;
|
34
37
|
}
|
35
|
-
|
36
|
-
|
37
|
-
@switch (props.type) {
|
38
|
-
@case ('password') {
|
39
|
-
<nz-input-group
|
40
|
-
[nzPrefixIcon]="props['prefixIcon']"
|
41
|
-
[nzSuffixIcon]="props['suffixIcon']"
|
42
|
-
[nzAddOnAfterIcon]="props['addOnAfterIcon']"
|
43
|
-
[nzAddOnBeforeIcon]="props['addOnBeforeIcon']"
|
44
|
-
[nzAddOnBefore]="props['addOnBefore']"
|
45
|
-
[nzAddOnAfter]="props['addOnAfter']"
|
46
|
-
[nzPrefix]="props['prefix']"
|
47
|
-
[nzCompact]="props['compact']!!"
|
48
|
-
[nzSearch]="props['search']!!"
|
49
|
-
[nzSize]="props['size']!"
|
50
|
-
[nzStatus]="props['status']!"
|
51
|
-
[nzSuffix]="passwordEyeTpl"
|
52
|
-
>
|
53
|
-
<input
|
54
|
-
[type]="passwordVisible ? 'text' : 'password'"
|
55
|
-
nz-input
|
56
|
-
[formControl]="formControl"
|
57
|
-
[formlyAttributes]="field"
|
58
|
-
[nzBorderless]="props['borderless']!!"
|
59
|
-
(ngModelChange)="props['modelChange'] && props['modelChange'](field, $event)"
|
60
|
-
/>
|
61
|
-
</nz-input-group>
|
62
|
-
}
|
63
|
-
@case ('autoComplete') {
|
64
|
-
<nz-input-group
|
65
|
-
[nzSize]="props['size']"
|
66
|
-
[nzPrefixIcon]="props['prefixIcon']"
|
67
|
-
[nzSuffixIcon]="props['suffixIcon']"
|
68
|
-
[nzAddOnAfterIcon]="props['addOnAfterIcon']"
|
69
|
-
[nzAddOnBeforeIcon]="props['addOnBeforeIcon']"
|
70
|
-
[nzAddOnBefore]="props['addOnBefore']"
|
71
|
-
[nzAddOnAfter]="props['addOnAfter']"
|
72
|
-
[nzPrefix]="props['prefix']"
|
73
|
-
[nzSuffix]="props['allowClear']!! ? inputClearTpl : props['suffix']"
|
74
|
-
>
|
75
|
-
<input
|
76
|
-
nz-input
|
77
|
-
[nzBorderless]="props['borderless']"
|
78
|
-
[nzAutocomplete]="auto"
|
79
|
-
[formControl]="formControl"
|
80
|
-
[formlyAttributes]="field"
|
81
|
-
/>
|
82
|
-
<nz-autocomplete
|
83
|
-
[nzBackfill]="props['autocompleteOptions']?.backfill"
|
84
|
-
[nzDefaultActiveFirstOption]="props['autocompleteOptions']?.defaultActiveFirstOption"
|
85
|
-
[nzWidth]="props['autocompleteOptions']?.width"
|
86
|
-
[nzOverlayClassName]="props['autocompleteOptions']?.overlayClassName"
|
87
|
-
[nzOverlayStyle]="props['autocompleteOptions']?.overlayStyle"
|
88
|
-
[compareWith]="props['autocompleteOptions']?.compareWith"
|
89
|
-
#auto
|
90
|
-
>
|
91
|
-
@for (option of props['autocompleteOptions'].dataSource; track option) {
|
92
|
-
<nz-auto-option [nzLabel]="option.label" [nzValue]="option.value">
|
93
|
-
{{ option.label }}
|
94
|
-
</nz-auto-option>
|
95
|
-
}
|
96
|
-
</nz-autocomplete>
|
97
|
-
</nz-input-group>
|
98
|
-
}
|
99
|
-
@case ('group') {
|
100
|
-
<nz-input-group
|
101
|
-
[nzPrefixIcon]="props['prefixIcon']"
|
102
|
-
[nzSuffixIcon]="props['suffixIcon']"
|
103
|
-
[nzAddOnAfterIcon]="props['addOnAfterIcon']"
|
104
|
-
[nzAddOnBeforeIcon]="props['addOnBeforeIcon']"
|
105
|
-
[nzAddOnBefore]="props['addOnBefore']"
|
106
|
-
[nzAddOnAfter]="props['addOnAfter']"
|
107
|
-
[nzPrefix]="props['prefix']"
|
108
|
-
[nzSuffix]="props['allowClear']!! ? inputClearTpl : props['suffix']"
|
109
|
-
[nzCompact]="props['compact']!!"
|
110
|
-
[nzSearch]="props['search']!!"
|
111
|
-
[nzSize]="props['size']!"
|
112
|
-
[nzStatus]="props['status']!"
|
113
|
-
>
|
114
|
-
<input
|
115
|
-
nz-input
|
116
|
-
type="text"
|
117
|
-
[ngClass]="props['className']"
|
118
|
-
[ngStyle]="props['style']"
|
119
|
-
[formControl]="formControl"
|
120
|
-
[formlyAttributes]="field"
|
121
|
-
[nzBorderless]="!!props['borderless']!!"
|
122
|
-
(ngModelChange)="props['modelChange']?.(field, $event)"
|
123
|
-
/>
|
124
|
-
</nz-input-group>
|
125
|
-
}
|
126
|
-
@default {
|
127
|
-
<input
|
128
|
-
nz-input
|
129
|
-
type="text"
|
130
|
-
[ngClass]="props['className']"
|
131
|
-
[ngStyle]="props['style']"
|
132
|
-
[formControl]="formControl"
|
133
|
-
[formlyAttributes]="field"
|
134
|
-
[nzSize]="props['size']"
|
135
|
-
[nzStatus]="props['status']"
|
136
|
-
[nzBorderless]="props['borderless']!!"
|
137
|
-
(ngModelChange)="props['modelChange'] && props['modelChange'](field, $event)"
|
138
|
-
/>
|
139
|
-
}
|
38
|
+
get addOnBefore() {
|
39
|
+
return resolveTplName(this.props, this.fieldTemplates, 'addOnBefore');
|
140
40
|
}
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
}
|
172
|
-
|
173
|
-
|
41
|
+
get addOnAfter() {
|
42
|
+
return resolveTplName(this.props, this.fieldTemplates, 'addOnAfter');
|
43
|
+
}
|
44
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: FormlyFieldInput, deps: [{ token: i1.FormlyBoxTemplates, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
45
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.0.6", type: FormlyFieldInput, selector: "formly-field-input", usesInheritance: true, ngImport: i0, template: `
|
46
|
+
@switch (props.type) {
|
47
|
+
@case ('password') {
|
48
|
+
<nz-input-group
|
49
|
+
[nzPrefixIcon]="props['prefixIcon']"
|
50
|
+
[nzSuffixIcon]="props['suffixIcon']"
|
51
|
+
[nzAddOnAfterIcon]="props['addOnAfterIcon']"
|
52
|
+
[nzAddOnBeforeIcon]="props['addOnBeforeIcon']"
|
53
|
+
[nzAddOnBefore]="addOnBefore"
|
54
|
+
[nzAddOnAfter]="addOnAfter"
|
55
|
+
[nzPrefix]="props['prefix']"
|
56
|
+
[nzCompact]="props['compact']!!"
|
57
|
+
[nzSearch]="props['search']!!"
|
58
|
+
[nzSize]="props['size']!"
|
59
|
+
[nzStatus]="props['status']!"
|
60
|
+
[nzSuffix]="passwordEyeTpl"
|
61
|
+
>
|
62
|
+
<input
|
63
|
+
[type]="passwordVisible ? 'text' : 'password'"
|
64
|
+
nz-input
|
65
|
+
[formControl]="formControl"
|
66
|
+
[formlyAttributes]="field"
|
67
|
+
[nzBorderless]="props['borderless']!!"
|
68
|
+
(ngModelChange)="props['modelChange'] && props['modelChange'](field, $event)"
|
69
|
+
/>
|
70
|
+
</nz-input-group>
|
71
|
+
}
|
72
|
+
@case ('autoComplete') {
|
73
|
+
<nz-input-group
|
74
|
+
[nzSize]="props['size']"
|
75
|
+
[nzPrefixIcon]="props['prefixIcon']"
|
76
|
+
[nzSuffixIcon]="props['suffixIcon']"
|
77
|
+
[nzAddOnAfterIcon]="props['addOnAfterIcon']"
|
78
|
+
[nzAddOnBeforeIcon]="props['addOnBeforeIcon']"
|
79
|
+
[nzAddOnBefore]="addOnBefore"
|
80
|
+
[nzAddOnAfter]="addOnAfter"
|
81
|
+
[nzPrefix]="props['prefix']"
|
82
|
+
[nzSuffix]="props['allowClear']!! ? inputClearTpl : props['suffix']"
|
83
|
+
>
|
84
|
+
<input
|
85
|
+
nz-input
|
86
|
+
[nzBorderless]="props['borderless']"
|
87
|
+
[nzAutocomplete]="auto"
|
88
|
+
[formControl]="formControl"
|
89
|
+
[formlyAttributes]="field"
|
90
|
+
/>
|
91
|
+
<nz-autocomplete
|
92
|
+
[nzBackfill]="props['autocompleteOptions']?.backfill"
|
93
|
+
[nzDefaultActiveFirstOption]="props['autocompleteOptions']?.defaultActiveFirstOption"
|
94
|
+
[nzWidth]="props['autocompleteOptions']?.width"
|
95
|
+
[nzOverlayClassName]="props['autocompleteOptions']?.overlayClassName"
|
96
|
+
[nzOverlayStyle]="props['autocompleteOptions']?.overlayStyle"
|
97
|
+
[compareWith]="props['autocompleteOptions']?.compareWith"
|
98
|
+
#auto
|
99
|
+
>
|
100
|
+
@for (option of props['autocompleteOptions'].dataSource; track option) {
|
101
|
+
<nz-auto-option [nzLabel]="option.label" [nzValue]="option.value">
|
102
|
+
{{ option.label }}
|
103
|
+
</nz-auto-option>
|
104
|
+
}
|
105
|
+
</nz-autocomplete>
|
106
|
+
</nz-input-group>
|
107
|
+
}
|
108
|
+
@case ('group') {
|
109
|
+
<nz-input-group
|
110
|
+
[nzPrefixIcon]="props['prefixIcon']"
|
111
|
+
[nzSuffixIcon]="props['suffixIcon']"
|
112
|
+
[nzAddOnAfterIcon]="props['addOnAfterIcon']"
|
113
|
+
[nzAddOnBeforeIcon]="props['addOnBeforeIcon']"
|
114
|
+
[nzAddOnBefore]="addOnBefore"
|
115
|
+
[nzAddOnAfter]="addOnAfter"
|
116
|
+
[nzPrefix]="props['prefix']"
|
117
|
+
[nzSuffix]="props['allowClear']!! ? inputClearTpl : props['suffix']"
|
118
|
+
[nzCompact]="props['compact']!!"
|
119
|
+
[nzSearch]="props['search']!!"
|
120
|
+
[nzSize]="props['size']!"
|
121
|
+
[nzStatus]="props['status']!"
|
122
|
+
>
|
123
|
+
<input
|
124
|
+
nz-input
|
125
|
+
type="text"
|
126
|
+
[ngClass]="props['className']"
|
127
|
+
[ngStyle]="props['style']"
|
128
|
+
[formControl]="formControl"
|
129
|
+
[formlyAttributes]="field"
|
130
|
+
[nzBorderless]="!!props['borderless']!!"
|
131
|
+
(ngModelChange)="props['modelChange']?.(field, $event)"
|
132
|
+
/>
|
133
|
+
</nz-input-group>
|
134
|
+
}
|
135
|
+
@default {
|
136
|
+
<input
|
137
|
+
nz-input
|
138
|
+
type="text"
|
139
|
+
[ngClass]="props['className']"
|
140
|
+
[ngStyle]="props['style']"
|
141
|
+
[formControl]="formControl"
|
142
|
+
[formlyAttributes]="field"
|
143
|
+
[nzSize]="props['size']"
|
144
|
+
[nzStatus]="props['status']"
|
145
|
+
[nzBorderless]="props['borderless']!!"
|
146
|
+
(ngModelChange)="props['modelChange'] && props['modelChange'](field, $event)"
|
147
|
+
/>
|
148
|
+
}
|
149
|
+
}
|
150
|
+
|
151
|
+
<!-- 查看密码 -->
|
152
|
+
<ng-template #passwordEyeTpl>
|
153
|
+
<span
|
154
|
+
nz-icon
|
155
|
+
class="cursor-pointer"
|
156
|
+
[nzType]="passwordVisible ? 'eye-invisible' : 'eye'"
|
157
|
+
(click)="passwordVisible = !passwordVisible"
|
158
|
+
></span>
|
159
|
+
|
160
|
+
@if (formControl.value && props['allowClear']!!) {
|
161
|
+
<span
|
162
|
+
nz-icon
|
163
|
+
class="ant-input-clear-icon"
|
164
|
+
nzTheme="fill"
|
165
|
+
nzType="close-circle"
|
166
|
+
(click)="formControl.reset()"
|
167
|
+
></span>
|
168
|
+
}
|
169
|
+
</ng-template>
|
170
|
+
<!-- 清除数据 -->
|
171
|
+
<ng-template #inputClearTpl>
|
172
|
+
@if (formControl.value && !props['disabled'] && !props['readonly']) {
|
173
|
+
<span
|
174
|
+
nz-icon
|
175
|
+
class="ant-input-clear-icon"
|
176
|
+
nzTheme="fill"
|
177
|
+
nzType="close-circle"
|
178
|
+
(click)="formControl.reset()"
|
179
|
+
></span>
|
180
|
+
}
|
181
|
+
</ng-template>
|
182
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i4.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzSize", "nzStepperless", "nzStatus", "disabled"], exportAs: ["nzInput"] }, { kind: "component", type: i4.NzInputGroupComponent, selector: "nz-input-group", inputs: ["nzAddOnBeforeIcon", "nzAddOnAfterIcon", "nzPrefixIcon", "nzSuffixIcon", "nzAddOnBefore", "nzAddOnAfter", "nzPrefix", "nzStatus", "nzSuffix", "nzSize", "nzSearch", "nzCompact"], exportAs: ["nzInputGroup"] }, { kind: "directive", type: i4.NzInputGroupWhitSuffixOrPrefixDirective, selector: "nz-input-group[nzSuffix], nz-input-group[nzPrefix]" }, { kind: "component", type: i5.NzAutocompleteComponent, selector: "nz-autocomplete", inputs: ["nzWidth", "nzOverlayClassName", "nzOverlayStyle", "nzDefaultActiveFirstOption", "nzBackfill", "compareWith", "nzDataSource"], outputs: ["selectionChange"], exportAs: ["nzAutocomplete"] }, { kind: "component", type: i5.NzAutocompleteOptionComponent, selector: "nz-auto-option", inputs: ["nzValue", "nzLabel", "nzDisabled"], outputs: ["selectionChange", "mouseEntered"], exportAs: ["nzAutoOption"] }, { kind: "directive", type: i5.NzAutocompleteTriggerDirective, selector: "input[nzAutocomplete], textarea[nzAutocomplete]", inputs: ["nzAutocomplete"], exportAs: ["nzAutocompleteTrigger"] }, { kind: "directive", type: i6.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "directive", type: i7.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
174
183
|
}
|
175
184
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: FormlyFieldInput, decorators: [{
|
176
185
|
type: Component,
|
177
186
|
args: [{
|
178
187
|
selector: 'formly-field-input',
|
179
|
-
template: `
|
180
|
-
@switch (props.type) {
|
181
|
-
@case ('password') {
|
182
|
-
<nz-input-group
|
183
|
-
[nzPrefixIcon]="props['prefixIcon']"
|
184
|
-
[nzSuffixIcon]="props['suffixIcon']"
|
185
|
-
[nzAddOnAfterIcon]="props['addOnAfterIcon']"
|
186
|
-
[nzAddOnBeforeIcon]="props['addOnBeforeIcon']"
|
187
|
-
[nzAddOnBefore]="
|
188
|
-
[nzAddOnAfter]="
|
189
|
-
[nzPrefix]="props['prefix']"
|
190
|
-
[nzCompact]="props['compact']!!"
|
191
|
-
[nzSearch]="props['search']!!"
|
192
|
-
[nzSize]="props['size']!"
|
193
|
-
[nzStatus]="props['status']!"
|
194
|
-
[nzSuffix]="passwordEyeTpl"
|
195
|
-
>
|
196
|
-
<input
|
197
|
-
[type]="passwordVisible ? 'text' : 'password'"
|
198
|
-
nz-input
|
199
|
-
[formControl]="formControl"
|
200
|
-
[formlyAttributes]="field"
|
201
|
-
[nzBorderless]="props['borderless']!!"
|
202
|
-
(ngModelChange)="props['modelChange'] && props['modelChange'](field, $event)"
|
203
|
-
/>
|
204
|
-
</nz-input-group>
|
205
|
-
}
|
206
|
-
@case ('autoComplete') {
|
207
|
-
<nz-input-group
|
208
|
-
[nzSize]="props['size']"
|
209
|
-
[nzPrefixIcon]="props['prefixIcon']"
|
210
|
-
[nzSuffixIcon]="props['suffixIcon']"
|
211
|
-
[nzAddOnAfterIcon]="props['addOnAfterIcon']"
|
212
|
-
[nzAddOnBeforeIcon]="props['addOnBeforeIcon']"
|
213
|
-
[nzAddOnBefore]="
|
214
|
-
[nzAddOnAfter]="
|
215
|
-
[nzPrefix]="props['prefix']"
|
216
|
-
[nzSuffix]="props['allowClear']!! ? inputClearTpl : props['suffix']"
|
217
|
-
>
|
218
|
-
<input
|
219
|
-
nz-input
|
220
|
-
[nzBorderless]="props['borderless']"
|
221
|
-
[nzAutocomplete]="auto"
|
222
|
-
[formControl]="formControl"
|
223
|
-
[formlyAttributes]="field"
|
224
|
-
/>
|
225
|
-
<nz-autocomplete
|
226
|
-
[nzBackfill]="props['autocompleteOptions']?.backfill"
|
227
|
-
[nzDefaultActiveFirstOption]="props['autocompleteOptions']?.defaultActiveFirstOption"
|
228
|
-
[nzWidth]="props['autocompleteOptions']?.width"
|
229
|
-
[nzOverlayClassName]="props['autocompleteOptions']?.overlayClassName"
|
230
|
-
[nzOverlayStyle]="props['autocompleteOptions']?.overlayStyle"
|
231
|
-
[compareWith]="props['autocompleteOptions']?.compareWith"
|
232
|
-
#auto
|
233
|
-
>
|
234
|
-
@for (option of props['autocompleteOptions'].dataSource; track option) {
|
235
|
-
<nz-auto-option [nzLabel]="option.label" [nzValue]="option.value">
|
236
|
-
{{ option.label }}
|
237
|
-
</nz-auto-option>
|
238
|
-
}
|
239
|
-
</nz-autocomplete>
|
240
|
-
</nz-input-group>
|
241
|
-
}
|
242
|
-
@case ('group') {
|
243
|
-
<nz-input-group
|
244
|
-
[nzPrefixIcon]="props['prefixIcon']"
|
245
|
-
[nzSuffixIcon]="props['suffixIcon']"
|
246
|
-
[nzAddOnAfterIcon]="props['addOnAfterIcon']"
|
247
|
-
[nzAddOnBeforeIcon]="props['addOnBeforeIcon']"
|
248
|
-
[nzAddOnBefore]="
|
249
|
-
[nzAddOnAfter]="
|
250
|
-
[nzPrefix]="props['prefix']"
|
251
|
-
[nzSuffix]="props['allowClear']!! ? inputClearTpl : props['suffix']"
|
252
|
-
[nzCompact]="props['compact']!!"
|
253
|
-
[nzSearch]="props['search']!!"
|
254
|
-
[nzSize]="props['size']!"
|
255
|
-
[nzStatus]="props['status']!"
|
256
|
-
>
|
257
|
-
<input
|
258
|
-
nz-input
|
259
|
-
type="text"
|
260
|
-
[ngClass]="props['className']"
|
261
|
-
[ngStyle]="props['style']"
|
262
|
-
[formControl]="formControl"
|
263
|
-
[formlyAttributes]="field"
|
264
|
-
[nzBorderless]="!!props['borderless']!!"
|
265
|
-
(ngModelChange)="props['modelChange']?.(field, $event)"
|
266
|
-
/>
|
267
|
-
</nz-input-group>
|
268
|
-
}
|
269
|
-
@default {
|
270
|
-
<input
|
271
|
-
nz-input
|
272
|
-
type="text"
|
273
|
-
[ngClass]="props['className']"
|
274
|
-
[ngStyle]="props['style']"
|
275
|
-
[formControl]="formControl"
|
276
|
-
[formlyAttributes]="field"
|
277
|
-
[nzSize]="props['size']"
|
278
|
-
[nzStatus]="props['status']"
|
279
|
-
[nzBorderless]="props['borderless']!!"
|
280
|
-
(ngModelChange)="props['modelChange'] && props['modelChange'](field, $event)"
|
281
|
-
/>
|
282
|
-
}
|
283
|
-
}
|
284
|
-
|
285
|
-
<!-- 查看密码 -->
|
286
|
-
<ng-template #passwordEyeTpl>
|
287
|
-
<span
|
288
|
-
nz-icon
|
289
|
-
class="cursor-pointer"
|
290
|
-
[nzType]="passwordVisible ? 'eye-invisible' : 'eye'"
|
291
|
-
(click)="passwordVisible = !passwordVisible"
|
292
|
-
></span>
|
293
|
-
|
294
|
-
@if (formControl.value && props['allowClear']!!) {
|
295
|
-
<span
|
296
|
-
nz-icon
|
297
|
-
class="ant-input-clear-icon"
|
298
|
-
nzTheme="fill"
|
299
|
-
nzType="close-circle"
|
300
|
-
(click)="formControl.reset()"
|
301
|
-
></span>
|
302
|
-
}
|
303
|
-
</ng-template>
|
304
|
-
<!-- 清除数据 -->
|
305
|
-
<ng-template #inputClearTpl>
|
306
|
-
@if (formControl.value && !props['disabled'] && !props['readonly']) {
|
307
|
-
<span
|
308
|
-
nz-icon
|
309
|
-
class="ant-input-clear-icon"
|
310
|
-
nzTheme="fill"
|
311
|
-
nzType="close-circle"
|
312
|
-
(click)="formControl.reset()"
|
313
|
-
></span>
|
314
|
-
}
|
315
|
-
</ng-template>
|
188
|
+
template: `
|
189
|
+
@switch (props.type) {
|
190
|
+
@case ('password') {
|
191
|
+
<nz-input-group
|
192
|
+
[nzPrefixIcon]="props['prefixIcon']"
|
193
|
+
[nzSuffixIcon]="props['suffixIcon']"
|
194
|
+
[nzAddOnAfterIcon]="props['addOnAfterIcon']"
|
195
|
+
[nzAddOnBeforeIcon]="props['addOnBeforeIcon']"
|
196
|
+
[nzAddOnBefore]="addOnBefore"
|
197
|
+
[nzAddOnAfter]="addOnAfter"
|
198
|
+
[nzPrefix]="props['prefix']"
|
199
|
+
[nzCompact]="props['compact']!!"
|
200
|
+
[nzSearch]="props['search']!!"
|
201
|
+
[nzSize]="props['size']!"
|
202
|
+
[nzStatus]="props['status']!"
|
203
|
+
[nzSuffix]="passwordEyeTpl"
|
204
|
+
>
|
205
|
+
<input
|
206
|
+
[type]="passwordVisible ? 'text' : 'password'"
|
207
|
+
nz-input
|
208
|
+
[formControl]="formControl"
|
209
|
+
[formlyAttributes]="field"
|
210
|
+
[nzBorderless]="props['borderless']!!"
|
211
|
+
(ngModelChange)="props['modelChange'] && props['modelChange'](field, $event)"
|
212
|
+
/>
|
213
|
+
</nz-input-group>
|
214
|
+
}
|
215
|
+
@case ('autoComplete') {
|
216
|
+
<nz-input-group
|
217
|
+
[nzSize]="props['size']"
|
218
|
+
[nzPrefixIcon]="props['prefixIcon']"
|
219
|
+
[nzSuffixIcon]="props['suffixIcon']"
|
220
|
+
[nzAddOnAfterIcon]="props['addOnAfterIcon']"
|
221
|
+
[nzAddOnBeforeIcon]="props['addOnBeforeIcon']"
|
222
|
+
[nzAddOnBefore]="addOnBefore"
|
223
|
+
[nzAddOnAfter]="addOnAfter"
|
224
|
+
[nzPrefix]="props['prefix']"
|
225
|
+
[nzSuffix]="props['allowClear']!! ? inputClearTpl : props['suffix']"
|
226
|
+
>
|
227
|
+
<input
|
228
|
+
nz-input
|
229
|
+
[nzBorderless]="props['borderless']"
|
230
|
+
[nzAutocomplete]="auto"
|
231
|
+
[formControl]="formControl"
|
232
|
+
[formlyAttributes]="field"
|
233
|
+
/>
|
234
|
+
<nz-autocomplete
|
235
|
+
[nzBackfill]="props['autocompleteOptions']?.backfill"
|
236
|
+
[nzDefaultActiveFirstOption]="props['autocompleteOptions']?.defaultActiveFirstOption"
|
237
|
+
[nzWidth]="props['autocompleteOptions']?.width"
|
238
|
+
[nzOverlayClassName]="props['autocompleteOptions']?.overlayClassName"
|
239
|
+
[nzOverlayStyle]="props['autocompleteOptions']?.overlayStyle"
|
240
|
+
[compareWith]="props['autocompleteOptions']?.compareWith"
|
241
|
+
#auto
|
242
|
+
>
|
243
|
+
@for (option of props['autocompleteOptions'].dataSource; track option) {
|
244
|
+
<nz-auto-option [nzLabel]="option.label" [nzValue]="option.value">
|
245
|
+
{{ option.label }}
|
246
|
+
</nz-auto-option>
|
247
|
+
}
|
248
|
+
</nz-autocomplete>
|
249
|
+
</nz-input-group>
|
250
|
+
}
|
251
|
+
@case ('group') {
|
252
|
+
<nz-input-group
|
253
|
+
[nzPrefixIcon]="props['prefixIcon']"
|
254
|
+
[nzSuffixIcon]="props['suffixIcon']"
|
255
|
+
[nzAddOnAfterIcon]="props['addOnAfterIcon']"
|
256
|
+
[nzAddOnBeforeIcon]="props['addOnBeforeIcon']"
|
257
|
+
[nzAddOnBefore]="addOnBefore"
|
258
|
+
[nzAddOnAfter]="addOnAfter"
|
259
|
+
[nzPrefix]="props['prefix']"
|
260
|
+
[nzSuffix]="props['allowClear']!! ? inputClearTpl : props['suffix']"
|
261
|
+
[nzCompact]="props['compact']!!"
|
262
|
+
[nzSearch]="props['search']!!"
|
263
|
+
[nzSize]="props['size']!"
|
264
|
+
[nzStatus]="props['status']!"
|
265
|
+
>
|
266
|
+
<input
|
267
|
+
nz-input
|
268
|
+
type="text"
|
269
|
+
[ngClass]="props['className']"
|
270
|
+
[ngStyle]="props['style']"
|
271
|
+
[formControl]="formControl"
|
272
|
+
[formlyAttributes]="field"
|
273
|
+
[nzBorderless]="!!props['borderless']!!"
|
274
|
+
(ngModelChange)="props['modelChange']?.(field, $event)"
|
275
|
+
/>
|
276
|
+
</nz-input-group>
|
277
|
+
}
|
278
|
+
@default {
|
279
|
+
<input
|
280
|
+
nz-input
|
281
|
+
type="text"
|
282
|
+
[ngClass]="props['className']"
|
283
|
+
[ngStyle]="props['style']"
|
284
|
+
[formControl]="formControl"
|
285
|
+
[formlyAttributes]="field"
|
286
|
+
[nzSize]="props['size']"
|
287
|
+
[nzStatus]="props['status']"
|
288
|
+
[nzBorderless]="props['borderless']!!"
|
289
|
+
(ngModelChange)="props['modelChange'] && props['modelChange'](field, $event)"
|
290
|
+
/>
|
291
|
+
}
|
292
|
+
}
|
293
|
+
|
294
|
+
<!-- 查看密码 -->
|
295
|
+
<ng-template #passwordEyeTpl>
|
296
|
+
<span
|
297
|
+
nz-icon
|
298
|
+
class="cursor-pointer"
|
299
|
+
[nzType]="passwordVisible ? 'eye-invisible' : 'eye'"
|
300
|
+
(click)="passwordVisible = !passwordVisible"
|
301
|
+
></span>
|
302
|
+
|
303
|
+
@if (formControl.value && props['allowClear']!!) {
|
304
|
+
<span
|
305
|
+
nz-icon
|
306
|
+
class="ant-input-clear-icon"
|
307
|
+
nzTheme="fill"
|
308
|
+
nzType="close-circle"
|
309
|
+
(click)="formControl.reset()"
|
310
|
+
></span>
|
311
|
+
}
|
312
|
+
</ng-template>
|
313
|
+
<!-- 清除数据 -->
|
314
|
+
<ng-template #inputClearTpl>
|
315
|
+
@if (formControl.value && !props['disabled'] && !props['readonly']) {
|
316
|
+
<span
|
317
|
+
nz-icon
|
318
|
+
class="ant-input-clear-icon"
|
319
|
+
nzTheme="fill"
|
320
|
+
nzType="close-circle"
|
321
|
+
(click)="formControl.reset()"
|
322
|
+
></span>
|
323
|
+
}
|
324
|
+
</ng-template>
|
316
325
|
`,
|
317
326
|
changeDetection: ChangeDetectionStrategy.OnPush
|
318
327
|
}]
|
319
|
-
}]
|
328
|
+
}], ctorParameters: () => [{ type: i1.FormlyBoxTemplates, decorators: [{
|
329
|
+
type: Optional
|
330
|
+
}] }] });
|
320
331
|
|
321
332
|
class FormlyNzInputModule {
|
322
333
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: FormlyNzInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
@@ -325,7 +336,7 @@ class FormlyNzInputModule {
|
|
325
336
|
NzInputModule,
|
326
337
|
NzAutocompleteModule,
|
327
338
|
NzIconModule,
|
328
|
-
FormlyNzFormFieldModule,
|
339
|
+
FormlyNzFormFieldModule, i7.FormlyModule] }); }
|
329
340
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: FormlyNzInputModule, imports: [CommonModule,
|
330
341
|
ReactiveFormsModule,
|
331
342
|
NzInputModule,
|