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.
Files changed (185) hide show
  1. package/README.md +1 -1
  2. package/esm2022/autocomplete/autocomplete.props.mjs +1 -1
  3. package/esm2022/autocomplete/public_api.mjs +1 -1
  4. package/esm2022/button/button.module.mjs +1 -1
  5. package/esm2022/button/button.type.mjs +123 -123
  6. package/esm2022/button/public_api.mjs +1 -1
  7. package/esm2022/button-group/button-group.module.mjs +1 -1
  8. package/esm2022/button-group/button-group.type.mjs +67 -67
  9. package/esm2022/button-group/public_api.mjs +1 -1
  10. package/esm2022/card/card.module.mjs +1 -1
  11. package/esm2022/card/card.type.mjs +51 -51
  12. package/esm2022/card/public_api.mjs +1 -1
  13. package/esm2022/card-wrapper/card-wrapper.module.mjs +1 -1
  14. package/esm2022/card-wrapper/card-wrapper.props.mjs +1 -1
  15. package/esm2022/card-wrapper/card.wrapper.mjs +37 -37
  16. package/esm2022/card-wrapper/public_api.mjs +1 -1
  17. package/esm2022/cascader/cascader.module.mjs +1 -1
  18. package/esm2022/cascader/cascader.type.mjs +65 -65
  19. package/esm2022/cascader/public_api.mjs +1 -1
  20. package/esm2022/checkbox/checkbox.module.mjs +1 -1
  21. package/esm2022/checkbox/checkbox.type.mjs +39 -39
  22. package/esm2022/checkbox/public_api.mjs +1 -1
  23. package/esm2022/common/common.module.mjs +1 -1
  24. package/esm2022/common/formly-box-templates.directive.mjs +1 -1
  25. package/esm2022/common/formly-utils.mjs +1 -1
  26. package/esm2022/common/interface.mjs +1 -1
  27. package/esm2022/common/public_api.mjs +1 -1
  28. package/esm2022/datepicker/datepicker.module.mjs +1 -1
  29. package/esm2022/datepicker/datepicker.props.mjs +1 -1
  30. package/esm2022/datepicker/datepicker.type.mjs +149 -149
  31. package/esm2022/datepicker/public_api.mjs +1 -1
  32. package/esm2022/extension/public_api.mjs +1 -1
  33. package/esm2022/extension/value-changes-extension.mjs +1 -1
  34. package/esm2022/form-field/form-field.module.mjs +1 -1
  35. package/esm2022/form-field/form-field.props.mjs +1 -1
  36. package/esm2022/form-field/form-field.wrapper.mjs +125 -125
  37. package/esm2022/form-field/public_api.mjs +1 -1
  38. package/esm2022/grid/grid.module.mjs +1 -1
  39. package/esm2022/grid/grid.props.mjs +1 -1
  40. package/esm2022/grid/grid.type.mjs +59 -59
  41. package/esm2022/grid/public_api.mjs +1 -1
  42. package/esm2022/index.mjs +1 -1
  43. package/esm2022/input/input.module.mjs +1 -1
  44. package/esm2022/input/input.props.mjs +1 -1
  45. package/esm2022/input/input.type.mjs +297 -286
  46. package/esm2022/input/public_api.mjs +1 -1
  47. package/esm2022/input-group/input-group.module.mjs +1 -1
  48. package/esm2022/input-group/input-group.props.mjs +1 -1
  49. package/esm2022/input-group/input-group.type.mjs +39 -39
  50. package/esm2022/input-group/public_api.mjs +1 -1
  51. package/esm2022/input-number/input-number.module.mjs +1 -1
  52. package/esm2022/input-number/input-number.props.mjs +1 -1
  53. package/esm2022/input-number/input-number.type.mjs +89 -89
  54. package/esm2022/input-number/public_api.mjs +1 -1
  55. package/esm2022/lib/ui-ng-zorro-antd.mjs +1 -1
  56. package/esm2022/lib/ui-ng-zorro-antd.module.mjs +1 -1
  57. package/esm2022/radio/public_api.mjs +1 -1
  58. package/esm2022/radio/radio.module.mjs +1 -1
  59. package/esm2022/radio/radio.type.mjs +81 -81
  60. package/esm2022/rate/public_api.mjs +1 -1
  61. package/esm2022/rate/rate.module.mjs +1 -1
  62. package/esm2022/rate/rate.type.mjs +33 -33
  63. package/esm2022/ref-template/public_api.mjs +1 -1
  64. package/esm2022/ref-template/ref-template.module.mjs +1 -1
  65. package/esm2022/ref-template/ref-template.type.mjs +9 -9
  66. package/esm2022/select/public_api.mjs +1 -1
  67. package/esm2022/select/select.module.mjs +1 -1
  68. package/esm2022/select/select.props.mjs +1 -1
  69. package/esm2022/select/select.type.mjs +124 -123
  70. package/esm2022/slider/public_api.mjs +1 -1
  71. package/esm2022/slider/slider.module.mjs +1 -1
  72. package/esm2022/slider/slider.type.mjs +33 -33
  73. package/esm2022/space/public_api.mjs +1 -1
  74. package/esm2022/space/space.module.mjs +1 -1
  75. package/esm2022/space/space.type.mjs +27 -27
  76. package/esm2022/switch/public_api.mjs +1 -1
  77. package/esm2022/switch/switch.module.mjs +1 -1
  78. package/esm2022/switch/switch.type.mjs +25 -25
  79. package/esm2022/tabs/public_api.mjs +1 -1
  80. package/esm2022/tabs/tabs.module.mjs +1 -1
  81. package/esm2022/tabs/tabs.props.mjs +1 -1
  82. package/esm2022/tabs/tabs.wrapper.mjs +79 -79
  83. package/esm2022/textarea/public_api.mjs +1 -1
  84. package/esm2022/textarea/textarea.module.mjs +1 -1
  85. package/esm2022/textarea/textarea.type.mjs +113 -111
  86. package/esm2022/timepicker/public_api.mjs +1 -1
  87. package/esm2022/timepicker/timepicker.module.mjs +1 -1
  88. package/esm2022/timepicker/timepicker.type.mjs +61 -61
  89. package/esm2022/transfer/public_api.mjs +1 -1
  90. package/esm2022/transfer/transfer.component.mjs +49 -49
  91. package/esm2022/transfer/transfer.module.mjs +1 -1
  92. package/esm2022/transfer/transfer.type.mjs +47 -47
  93. package/esm2022/tree-select/public_api.mjs +1 -1
  94. package/esm2022/tree-select/tree-select.module.mjs +1 -1
  95. package/esm2022/tree-select/tree-select.type.mjs +69 -69
  96. package/esm2022/upload/public_api.mjs +1 -1
  97. package/esm2022/upload/upload.component.mjs +143 -143
  98. package/esm2022/upload/upload.module.mjs +1 -1
  99. package/esm2022/upload/upload.props.mjs +1 -1
  100. package/esm2022/upload/upload.type.mjs +83 -83
  101. package/fesm2022/ngx-formly-zorro-antd-button-group.mjs +66 -66
  102. package/fesm2022/ngx-formly-zorro-antd-button-group.mjs.map +1 -1
  103. package/fesm2022/ngx-formly-zorro-antd-button.mjs +122 -122
  104. package/fesm2022/ngx-formly-zorro-antd-button.mjs.map +1 -1
  105. package/fesm2022/ngx-formly-zorro-antd-card-wrapper.mjs +36 -36
  106. package/fesm2022/ngx-formly-zorro-antd-card-wrapper.mjs.map +1 -1
  107. package/fesm2022/ngx-formly-zorro-antd-card.mjs +50 -50
  108. package/fesm2022/ngx-formly-zorro-antd-card.mjs.map +1 -1
  109. package/fesm2022/ngx-formly-zorro-antd-cascader.mjs +64 -64
  110. package/fesm2022/ngx-formly-zorro-antd-cascader.mjs.map +1 -1
  111. package/fesm2022/ngx-formly-zorro-antd-checkbox.mjs +38 -38
  112. package/fesm2022/ngx-formly-zorro-antd-checkbox.mjs.map +1 -1
  113. package/fesm2022/ngx-formly-zorro-antd-common.mjs.map +1 -1
  114. package/fesm2022/ngx-formly-zorro-antd-datepicker.mjs +148 -148
  115. package/fesm2022/ngx-formly-zorro-antd-datepicker.mjs.map +1 -1
  116. package/fesm2022/ngx-formly-zorro-antd-extension.mjs.map +1 -1
  117. package/fesm2022/ngx-formly-zorro-antd-form-field.mjs +124 -124
  118. package/fesm2022/ngx-formly-zorro-antd-form-field.mjs.map +1 -1
  119. package/fesm2022/ngx-formly-zorro-antd-grid.mjs +58 -58
  120. package/fesm2022/ngx-formly-zorro-antd-grid.mjs.map +1 -1
  121. package/fesm2022/ngx-formly-zorro-antd-input-group.mjs +38 -38
  122. package/fesm2022/ngx-formly-zorro-antd-input-group.mjs.map +1 -1
  123. package/fesm2022/ngx-formly-zorro-antd-input-number.mjs +88 -88
  124. package/fesm2022/ngx-formly-zorro-antd-input-number.mjs.map +1 -1
  125. package/fesm2022/ngx-formly-zorro-antd-input.mjs +297 -286
  126. package/fesm2022/ngx-formly-zorro-antd-input.mjs.map +1 -1
  127. package/fesm2022/ngx-formly-zorro-antd-radio.mjs +80 -80
  128. package/fesm2022/ngx-formly-zorro-antd-radio.mjs.map +1 -1
  129. package/fesm2022/ngx-formly-zorro-antd-rate.mjs +32 -32
  130. package/fesm2022/ngx-formly-zorro-antd-rate.mjs.map +1 -1
  131. package/fesm2022/ngx-formly-zorro-antd-ref-template.mjs +8 -8
  132. package/fesm2022/ngx-formly-zorro-antd-ref-template.mjs.map +1 -1
  133. package/fesm2022/ngx-formly-zorro-antd-select.mjs +123 -122
  134. package/fesm2022/ngx-formly-zorro-antd-select.mjs.map +1 -1
  135. package/fesm2022/ngx-formly-zorro-antd-slider.mjs +32 -32
  136. package/fesm2022/ngx-formly-zorro-antd-slider.mjs.map +1 -1
  137. package/fesm2022/ngx-formly-zorro-antd-space.mjs +26 -26
  138. package/fesm2022/ngx-formly-zorro-antd-space.mjs.map +1 -1
  139. package/fesm2022/ngx-formly-zorro-antd-switch.mjs +24 -24
  140. package/fesm2022/ngx-formly-zorro-antd-switch.mjs.map +1 -1
  141. package/fesm2022/ngx-formly-zorro-antd-tabs.mjs +78 -78
  142. package/fesm2022/ngx-formly-zorro-antd-tabs.mjs.map +1 -1
  143. package/fesm2022/ngx-formly-zorro-antd-textarea.mjs +112 -110
  144. package/fesm2022/ngx-formly-zorro-antd-textarea.mjs.map +1 -1
  145. package/fesm2022/ngx-formly-zorro-antd-timepicker.mjs +60 -60
  146. package/fesm2022/ngx-formly-zorro-antd-timepicker.mjs.map +1 -1
  147. package/fesm2022/ngx-formly-zorro-antd-transfer.mjs +94 -94
  148. package/fesm2022/ngx-formly-zorro-antd-transfer.mjs.map +1 -1
  149. package/fesm2022/ngx-formly-zorro-antd-tree-select.mjs +68 -68
  150. package/fesm2022/ngx-formly-zorro-antd-tree-select.mjs.map +1 -1
  151. package/fesm2022/ngx-formly-zorro-antd-upload.mjs +224 -224
  152. package/fesm2022/ngx-formly-zorro-antd-upload.mjs.map +1 -1
  153. package/fesm2022/ngx-formly-zorro-antd.mjs.map +1 -1
  154. package/input/input.type.d.ts +6 -1
  155. package/input-group/input-group.props.d.ts +4 -0
  156. package/package.json +7 -7
  157. package/select/select.type.d.ts +1 -0
  158. package/autocomplete/package.json +0 -3
  159. package/button/package.json +0 -3
  160. package/button-group/package.json +0 -3
  161. package/card/package.json +0 -3
  162. package/card-wrapper/package.json +0 -3
  163. package/cascader/package.json +0 -3
  164. package/checkbox/package.json +0 -3
  165. package/common/package.json +0 -3
  166. package/datepicker/package.json +0 -3
  167. package/extension/package.json +0 -3
  168. package/form-field/package.json +0 -3
  169. package/grid/package.json +0 -3
  170. package/input/package.json +0 -3
  171. package/input-group/package.json +0 -3
  172. package/input-number/package.json +0 -3
  173. package/radio/package.json +0 -3
  174. package/rate/package.json +0 -3
  175. package/ref-template/package.json +0 -3
  176. package/select/package.json +0 -3
  177. package/slider/package.json +0 -3
  178. package/space/package.json +0 -3
  179. package/switch/package.json +0 -3
  180. package/tabs/package.json +0 -3
  181. package/textarea/package.json +0 -3
  182. package/timepicker/package.json +0 -3
  183. package/transfer/package.json +0 -3
  184. package/tree-select/package.json +0 -3
  185. 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 i1 from '@angular/common';
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 i6 from '@ngx-formly/core';
5
+ import * as i7 from '@ngx-formly/core';
6
6
  import { FieldType, FormlyModule } from '@ngx-formly/core';
7
- import * as i2 from '@angular/forms';
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 i3 from 'ng-zorro-antd/input';
10
+ import * as i4 from 'ng-zorro-antd/input';
11
11
  import { NzInputModule } from 'ng-zorro-antd/input';
12
- import * as i4 from 'ng-zorro-antd/auto-complete';
12
+ import * as i5 from 'ng-zorro-antd/auto-complete';
13
13
  import { NzAutocompleteModule } from 'ng-zorro-antd/auto-complete';
14
- import * as i5 from 'ng-zorro-antd/icon';
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(...arguments);
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
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: FormlyFieldInput, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
36
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.0.6", type: FormlyFieldInput, selector: "formly-field-input", usesInheritance: true, ngImport: i0, template: `
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
- <ng-template #passwordEyeTpl>
144
- <span
145
- nz-icon
146
- class="cursor-pointer"
147
- [nzType]="passwordVisible ? 'eye-invisible' : 'eye'"
148
- (click)="passwordVisible = !passwordVisible"
149
- ></span>
150
-
151
- @if (formControl.value && props['allowClear']!!) {
152
- <span
153
- nz-icon
154
- class="ant-input-clear-icon"
155
- nzTheme="fill"
156
- nzType="close-circle"
157
- (click)="formControl.reset()"
158
- ></span>
159
- }
160
- </ng-template>
161
- <!-- 清除数据 -->
162
- <ng-template #inputClearTpl>
163
- @if (formControl.value && !props['disabled'] && !props['readonly']) {
164
- <span
165
- nz-icon
166
- class="ant-input-clear-icon"
167
- nzTheme="fill"
168
- nzType="close-circle"
169
- (click)="formControl.reset()"
170
- ></span>
171
- }
172
- </ng-template>
173
- `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzSize", "nzStepperless", "nzStatus", "disabled"], exportAs: ["nzInput"] }, { kind: "component", type: i3.NzInputGroupComponent, selector: "nz-input-group", inputs: ["nzAddOnBeforeIcon", "nzAddOnAfterIcon", "nzPrefixIcon", "nzSuffixIcon", "nzAddOnBefore", "nzAddOnAfter", "nzPrefix", "nzStatus", "nzSuffix", "nzSize", "nzSearch", "nzCompact"], exportAs: ["nzInputGroup"] }, { kind: "directive", type: i3.NzInputGroupWhitSuffixOrPrefixDirective, selector: "nz-input-group[nzSuffix], nz-input-group[nzPrefix]" }, { kind: "component", type: i4.NzAutocompleteComponent, selector: "nz-autocomplete", inputs: ["nzWidth", "nzOverlayClassName", "nzOverlayStyle", "nzDefaultActiveFirstOption", "nzBackfill", "compareWith", "nzDataSource"], outputs: ["selectionChange"], exportAs: ["nzAutocomplete"] }, { kind: "component", type: i4.NzAutocompleteOptionComponent, selector: "nz-auto-option", inputs: ["nzValue", "nzLabel", "nzDisabled"], outputs: ["selectionChange", "mouseEntered"], exportAs: ["nzAutoOption"] }, { kind: "directive", type: i4.NzAutocompleteTriggerDirective, selector: "input[nzAutocomplete], textarea[nzAutocomplete]", inputs: ["nzAutocomplete"], exportAs: ["nzAutocompleteTrigger"] }, { kind: "directive", type: i5.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "directive", type: i6.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
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]="props['addOnBefore']"
188
- [nzAddOnAfter]="props['addOnAfter']"
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]="props['addOnBefore']"
214
- [nzAddOnAfter]="props['addOnAfter']"
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]="props['addOnBefore']"
249
- [nzAddOnAfter]="props['addOnAfter']"
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, i6.FormlyModule] }); }
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,