ngx-tethys 20.0.1 → 20.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (245) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/action/index.d.ts +3 -3
  3. package/affix/index.d.ts +1 -1
  4. package/alert/index.d.ts +3 -3
  5. package/anchor/index.d.ts +12 -6
  6. package/arrow-switcher/index.d.ts +6 -6
  7. package/autocomplete/index.d.ts +7 -7
  8. package/avatar/index.d.ts +9 -9
  9. package/back-top/index.d.ts +3 -3
  10. package/badge/index.d.ts +6 -6
  11. package/breadcrumb/index.d.ts +7 -7
  12. package/button/index.d.ts +19 -19
  13. package/calendar/index.d.ts +8 -8
  14. package/card/index.d.ts +6 -6
  15. package/carousel/index.d.ts +4 -4
  16. package/cascader/index.d.ts +24 -24
  17. package/collapse/index.d.ts +4 -4
  18. package/color-picker/index.d.ts +16 -16
  19. package/comment/index.d.ts +3 -3
  20. package/copy/index.d.ts +2 -2
  21. package/core/index.d.ts +22 -22
  22. package/date-picker/index.d.ts +111 -111
  23. package/date-range/index.d.ts +5 -5
  24. package/dialog/index.d.ts +18 -18
  25. package/divider/index.d.ts +3 -3
  26. package/drag-drop/index.d.ts +7 -7
  27. package/dropdown/index.d.ts +10 -10
  28. package/empty/index.d.ts +12 -12
  29. package/fesm2022/ngx-tethys-action.mjs +14 -12
  30. package/fesm2022/ngx-tethys-action.mjs.map +1 -1
  31. package/fesm2022/ngx-tethys-affix.mjs +7 -7
  32. package/fesm2022/ngx-tethys-affix.mjs.map +1 -1
  33. package/fesm2022/ngx-tethys-alert.mjs +10 -10
  34. package/fesm2022/ngx-tethys-anchor.mjs +65 -28
  35. package/fesm2022/ngx-tethys-anchor.mjs.map +1 -1
  36. package/fesm2022/ngx-tethys-arrow-switcher.mjs +7 -7
  37. package/fesm2022/ngx-tethys-arrow-switcher.mjs.map +1 -1
  38. package/fesm2022/ngx-tethys-autocomplete.mjs +19 -18
  39. package/fesm2022/ngx-tethys-autocomplete.mjs.map +1 -1
  40. package/fesm2022/ngx-tethys-avatar.mjs +23 -22
  41. package/fesm2022/ngx-tethys-avatar.mjs.map +1 -1
  42. package/fesm2022/ngx-tethys-back-top.mjs +7 -7
  43. package/fesm2022/ngx-tethys-badge.mjs +7 -7
  44. package/fesm2022/ngx-tethys-badge.mjs.map +1 -1
  45. package/fesm2022/ngx-tethys-breadcrumb.mjs +10 -10
  46. package/fesm2022/ngx-tethys-breadcrumb.mjs.map +1 -1
  47. package/fesm2022/ngx-tethys-button.mjs +16 -16
  48. package/fesm2022/ngx-tethys-button.mjs.map +1 -1
  49. package/fesm2022/ngx-tethys-calendar.mjs +16 -16
  50. package/fesm2022/ngx-tethys-calendar.mjs.map +1 -1
  51. package/fesm2022/ngx-tethys-card.mjs +13 -13
  52. package/fesm2022/ngx-tethys-card.mjs.map +1 -1
  53. package/fesm2022/ngx-tethys-carousel.mjs +15 -15
  54. package/fesm2022/ngx-tethys-carousel.mjs.map +1 -1
  55. package/fesm2022/ngx-tethys-cascader.mjs +41 -34
  56. package/fesm2022/ngx-tethys-cascader.mjs.map +1 -1
  57. package/fesm2022/ngx-tethys-checkbox.mjs +7 -7
  58. package/fesm2022/ngx-tethys-collapse.mjs +10 -10
  59. package/fesm2022/ngx-tethys-color-picker.mjs +65 -57
  60. package/fesm2022/ngx-tethys-color-picker.mjs.map +1 -1
  61. package/fesm2022/ngx-tethys-comment.mjs +13 -13
  62. package/fesm2022/ngx-tethys-copy.mjs +10 -10
  63. package/fesm2022/ngx-tethys-copy.mjs.map +1 -1
  64. package/fesm2022/ngx-tethys-core.mjs +30 -25
  65. package/fesm2022/ngx-tethys-core.mjs.map +1 -1
  66. package/fesm2022/ngx-tethys-date-picker.mjs +184 -174
  67. package/fesm2022/ngx-tethys-date-picker.mjs.map +1 -1
  68. package/fesm2022/ngx-tethys-date-range.mjs +16 -16
  69. package/fesm2022/ngx-tethys-date-range.mjs.map +1 -1
  70. package/fesm2022/ngx-tethys-dialog.mjs +24 -24
  71. package/fesm2022/ngx-tethys-dialog.mjs.map +1 -1
  72. package/fesm2022/ngx-tethys-divider.mjs +7 -7
  73. package/fesm2022/ngx-tethys-divider.mjs.map +1 -1
  74. package/fesm2022/ngx-tethys-dot.mjs +7 -7
  75. package/fesm2022/ngx-tethys-drag-drop.mjs +24 -24
  76. package/fesm2022/ngx-tethys-drag-drop.mjs.map +1 -1
  77. package/fesm2022/ngx-tethys-dropdown.mjs +48 -47
  78. package/fesm2022/ngx-tethys-dropdown.mjs.map +1 -1
  79. package/fesm2022/ngx-tethys-empty.mjs +13 -13
  80. package/fesm2022/ngx-tethys-empty.mjs.map +1 -1
  81. package/fesm2022/ngx-tethys-flexible-text.mjs +7 -7
  82. package/fesm2022/ngx-tethys-flexible-text.mjs.map +1 -1
  83. package/fesm2022/ngx-tethys-form.mjs +64 -61
  84. package/fesm2022/ngx-tethys-form.mjs.map +1 -1
  85. package/fesm2022/ngx-tethys-fullscreen.mjs +18 -15
  86. package/fesm2022/ngx-tethys-fullscreen.mjs.map +1 -1
  87. package/fesm2022/ngx-tethys-grid.mjs +34 -33
  88. package/fesm2022/ngx-tethys-grid.mjs.map +1 -1
  89. package/fesm2022/ngx-tethys-guider.mjs +25 -24
  90. package/fesm2022/ngx-tethys-guider.mjs.map +1 -1
  91. package/fesm2022/ngx-tethys-i18n.mjs +3 -3
  92. package/fesm2022/ngx-tethys-i18n.mjs.map +1 -1
  93. package/fesm2022/ngx-tethys-icon.mjs +15 -13
  94. package/fesm2022/ngx-tethys-icon.mjs.map +1 -1
  95. package/fesm2022/ngx-tethys-image.mjs +31 -29
  96. package/fesm2022/ngx-tethys-image.mjs.map +1 -1
  97. package/fesm2022/ngx-tethys-input-number.mjs +17 -10
  98. package/fesm2022/ngx-tethys-input-number.mjs.map +1 -1
  99. package/fesm2022/ngx-tethys-input.mjs +27 -26
  100. package/fesm2022/ngx-tethys-input.mjs.map +1 -1
  101. package/fesm2022/ngx-tethys-layout.mjs +63 -63
  102. package/fesm2022/ngx-tethys-layout.mjs.map +1 -1
  103. package/fesm2022/ngx-tethys-list.mjs +21 -18
  104. package/fesm2022/ngx-tethys-list.mjs.map +1 -1
  105. package/fesm2022/ngx-tethys-loading.mjs +7 -7
  106. package/fesm2022/ngx-tethys-mention.mjs +35 -31
  107. package/fesm2022/ngx-tethys-mention.mjs.map +1 -1
  108. package/fesm2022/ngx-tethys-menu.mjs +26 -26
  109. package/fesm2022/ngx-tethys-menu.mjs.map +1 -1
  110. package/fesm2022/ngx-tethys-message.mjs +24 -24
  111. package/fesm2022/ngx-tethys-message.mjs.map +1 -1
  112. package/fesm2022/ngx-tethys-native-table.mjs +1119 -0
  113. package/fesm2022/ngx-tethys-native-table.mjs.map +1 -0
  114. package/fesm2022/ngx-tethys-nav.mjs +27 -27
  115. package/fesm2022/ngx-tethys-nav.mjs.map +1 -1
  116. package/fesm2022/ngx-tethys-notify.mjs +20 -20
  117. package/fesm2022/ngx-tethys-notify.mjs.map +1 -1
  118. package/fesm2022/ngx-tethys-pagination.mjs +18 -18
  119. package/fesm2022/ngx-tethys-pagination.mjs.map +1 -1
  120. package/fesm2022/ngx-tethys-popover.mjs +22 -21
  121. package/fesm2022/ngx-tethys-popover.mjs.map +1 -1
  122. package/fesm2022/ngx-tethys-progress.mjs +17 -17
  123. package/fesm2022/ngx-tethys-progress.mjs.map +1 -1
  124. package/fesm2022/ngx-tethys-property-operation.mjs +11 -11
  125. package/fesm2022/ngx-tethys-property-operation.mjs.map +1 -1
  126. package/fesm2022/ngx-tethys-property.mjs +15 -12
  127. package/fesm2022/ngx-tethys-property.mjs.map +1 -1
  128. package/fesm2022/ngx-tethys-radio.mjs +17 -17
  129. package/fesm2022/ngx-tethys-radio.mjs.map +1 -1
  130. package/fesm2022/ngx-tethys-rate.mjs +12 -12
  131. package/fesm2022/ngx-tethys-rate.mjs.map +1 -1
  132. package/fesm2022/ngx-tethys-resizable.mjs +21 -18
  133. package/fesm2022/ngx-tethys-resizable.mjs.map +1 -1
  134. package/fesm2022/ngx-tethys-result.mjs +11 -11
  135. package/fesm2022/ngx-tethys-result.mjs.map +1 -1
  136. package/fesm2022/ngx-tethys-segment.mjs +19 -16
  137. package/fesm2022/ngx-tethys-segment.mjs.map +1 -1
  138. package/fesm2022/ngx-tethys-select.mjs +95 -46
  139. package/fesm2022/ngx-tethys-select.mjs.map +1 -1
  140. package/fesm2022/ngx-tethys-shared.mjs +85 -81
  141. package/fesm2022/ngx-tethys-shared.mjs.map +1 -1
  142. package/fesm2022/ngx-tethys-skeleton.mjs +32 -32
  143. package/fesm2022/ngx-tethys-skeleton.mjs.map +1 -1
  144. package/fesm2022/ngx-tethys-slide.mjs +37 -36
  145. package/fesm2022/ngx-tethys-slide.mjs.map +1 -1
  146. package/fesm2022/ngx-tethys-slider.mjs +11 -11
  147. package/fesm2022/ngx-tethys-slider.mjs.map +1 -1
  148. package/fesm2022/ngx-tethys-space.mjs +10 -10
  149. package/fesm2022/ngx-tethys-statistic.mjs +7 -7
  150. package/fesm2022/ngx-tethys-statistic.mjs.map +1 -1
  151. package/fesm2022/ngx-tethys-stepper.mjs +22 -22
  152. package/fesm2022/ngx-tethys-stepper.mjs.map +1 -1
  153. package/fesm2022/ngx-tethys-strength.mjs +7 -7
  154. package/fesm2022/ngx-tethys-strength.mjs.map +1 -1
  155. package/fesm2022/ngx-tethys-switch.mjs +7 -7
  156. package/fesm2022/ngx-tethys-switch.mjs.map +1 -1
  157. package/fesm2022/ngx-tethys-table.mjs +28 -28
  158. package/fesm2022/ngx-tethys-table.mjs.map +1 -1
  159. package/fesm2022/ngx-tethys-tabs.mjs +13 -13
  160. package/fesm2022/ngx-tethys-tabs.mjs.map +1 -1
  161. package/fesm2022/ngx-tethys-tag.mjs +11 -11
  162. package/fesm2022/ngx-tethys-tag.mjs.map +1 -1
  163. package/fesm2022/ngx-tethys-testing.mjs +1 -1
  164. package/fesm2022/ngx-tethys-testing.mjs.map +1 -1
  165. package/fesm2022/ngx-tethys-time-picker.mjs +22 -22
  166. package/fesm2022/ngx-tethys-time-picker.mjs.map +1 -1
  167. package/fesm2022/ngx-tethys-timeline.mjs +14 -14
  168. package/fesm2022/ngx-tethys-timeline.mjs.map +1 -1
  169. package/fesm2022/ngx-tethys-tooltip.mjs +36 -29
  170. package/fesm2022/ngx-tethys-tooltip.mjs.map +1 -1
  171. package/fesm2022/ngx-tethys-transfer.mjs +15 -15
  172. package/fesm2022/ngx-tethys-transfer.mjs.map +1 -1
  173. package/fesm2022/ngx-tethys-tree-select.mjs +17 -17
  174. package/fesm2022/ngx-tethys-tree-select.mjs.map +1 -1
  175. package/fesm2022/ngx-tethys-tree.mjs +50 -43
  176. package/fesm2022/ngx-tethys-tree.mjs.map +1 -1
  177. package/fesm2022/ngx-tethys-typography.mjs +16 -16
  178. package/fesm2022/ngx-tethys-typography.mjs.map +1 -1
  179. package/fesm2022/ngx-tethys-upload.mjs +26 -25
  180. package/fesm2022/ngx-tethys-upload.mjs.map +1 -1
  181. package/fesm2022/ngx-tethys-util.mjs +11 -5
  182. package/fesm2022/ngx-tethys-util.mjs.map +1 -1
  183. package/fesm2022/ngx-tethys-vote.mjs +7 -7
  184. package/fesm2022/ngx-tethys-watermark.mjs +18 -15
  185. package/fesm2022/ngx-tethys-watermark.mjs.map +1 -1
  186. package/fesm2022/ngx-tethys.mjs +1 -1
  187. package/fesm2022/ngx-tethys.mjs.map +1 -1
  188. package/flexible-text/index.d.ts +5 -5
  189. package/form/index.d.ts +26 -22
  190. package/fullscreen/index.d.ts +4 -4
  191. package/grid/index.d.ts +12 -12
  192. package/guider/index.d.ts +10 -10
  193. package/i18n/index.d.ts +1 -1
  194. package/icon/index.d.ts +3 -3
  195. package/image/index.d.ts +12 -12
  196. package/input/index.d.ts +23 -23
  197. package/input-number/index.d.ts +4 -4
  198. package/layout/index.d.ts +16 -16
  199. package/list/index.d.ts +16 -15
  200. package/mention/index.d.ts +4 -4
  201. package/menu/index.d.ts +7 -7
  202. package/message/index.d.ts +5 -5
  203. package/native-table/index.d.ts +305 -0
  204. package/native-table/styles/native-table.scss +174 -0
  205. package/nav/index.d.ts +12 -12
  206. package/notify/index.d.ts +1 -1
  207. package/package.json +5 -1
  208. package/pagination/index.d.ts +21 -17
  209. package/popover/index.d.ts +8 -8
  210. package/progress/index.d.ts +18 -18
  211. package/property/index.d.ts +6 -6
  212. package/property-operation/index.d.ts +3 -3
  213. package/radio/index.d.ts +6 -6
  214. package/rate/index.d.ts +5 -5
  215. package/resizable/index.d.ts +2 -2
  216. package/result/index.d.ts +8 -8
  217. package/schematics/testing/test-workspace.js +1 -0
  218. package/schematics/version.d.ts +1 -1
  219. package/schematics/version.js +1 -1
  220. package/segment/index.d.ts +9 -9
  221. package/select/index.d.ts +28 -22
  222. package/shared/index.d.ts +31 -30
  223. package/shared/option/styles/select-dropdown.scss +5 -2
  224. package/skeleton/index.d.ts +52 -52
  225. package/slide/index.d.ts +5 -5
  226. package/slider/index.d.ts +6 -6
  227. package/space/index.d.ts +1 -1
  228. package/statistic/index.d.ts +18 -18
  229. package/stepper/index.d.ts +8 -8
  230. package/styles/index.scss +1 -0
  231. package/switch/index.d.ts +2 -2
  232. package/table/index.d.ts +24 -24
  233. package/tabs/index.d.ts +6 -6
  234. package/testing/index.d.ts +1 -1
  235. package/time-picker/index.d.ts +21 -21
  236. package/timeline/index.d.ts +8 -8
  237. package/tooltip/index.d.ts +12 -12
  238. package/transfer/index.d.ts +16 -16
  239. package/tree/index.d.ts +28 -28
  240. package/tree-select/index.d.ts +13 -13
  241. package/typography/index.d.ts +3 -3
  242. package/upload/index.d.ts +4 -4
  243. package/util/index.d.ts +17 -7
  244. package/vote/index.d.ts +2 -2
  245. package/watermark/index.d.ts +2 -2
@@ -49,7 +49,7 @@ class ThyFormValidatorLoader {
49
49
  };
50
50
  }
51
51
  getDefaultValidationMessage(key) {
52
- if (this.config.globalValidationMessages && this.config.globalValidationMessages[key]) {
52
+ if (this.config?.globalValidationMessages && this.config.globalValidationMessages[key]) {
53
53
  return this.config.globalValidationMessages[key];
54
54
  }
55
55
  else {
@@ -63,13 +63,13 @@ class ThyFormValidatorLoader {
63
63
  this.config = Object.assign({}, defaultValidatorConfig, this.config || {});
64
64
  }
65
65
  get validationMessages() {
66
- return this.config.validationMessages;
66
+ return this.config?.validationMessages || {};
67
67
  }
68
68
  get validateOn() {
69
69
  if (!this.config?.validateOn) {
70
70
  this.config.validateOn = 'submit';
71
71
  }
72
- return this.config.validateOn;
72
+ return this.config?.validateOn;
73
73
  }
74
74
  isElementInInputGroup(element) {
75
75
  return !!(element?.parentElement?.tagName.toUpperCase() === 'THY-INPUT-GROUP');
@@ -113,10 +113,10 @@ class ThyFormValidatorLoader {
113
113
  removeError(element) {
114
114
  const formControlElement = this.isElementInInputGroup(element) ? element.parentElement : element;
115
115
  formControlElement.classList.remove(INVALID_CLASS);
116
- if (helpers.isFunction(this.config.removeElementError)) {
116
+ if (helpers.isFunction(this.config?.removeElementError)) {
117
117
  this.config.removeElementError(formControlElement);
118
118
  }
119
- else if (this.config.showElementError) {
119
+ else if (this.config?.showElementError) {
120
120
  this.defaultRemoveError(formControlElement);
121
121
  }
122
122
  else {
@@ -126,10 +126,10 @@ class ThyFormValidatorLoader {
126
126
  showError(element, errorMessages) {
127
127
  const formControlElement = this.isElementInInputGroup(element) ? element.parentElement : element;
128
128
  formControlElement.classList.add(INVALID_CLASS);
129
- if (helpers.isFunction(this.config.showElementError)) {
129
+ if (helpers.isFunction(this.config?.showElementError)) {
130
130
  this.config.showElementError(formControlElement, errorMessages);
131
131
  }
132
- else if (this.config.showElementError) {
132
+ else if (this.config?.showElementError) {
133
133
  this.defaultShowError(formControlElement, errorMessages);
134
134
  }
135
135
  else {
@@ -142,10 +142,10 @@ class ThyFormValidatorLoader {
142
142
  setGlobalValidationMessages(validationMessages) {
143
143
  this.config.globalValidationMessages = validationMessages;
144
144
  }
145
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyFormValidatorLoader, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
146
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyFormValidatorLoader }); }
145
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyFormValidatorLoader, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
146
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyFormValidatorLoader }); }
147
147
  }
148
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyFormValidatorLoader, decorators: [{
148
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyFormValidatorLoader, decorators: [{
149
149
  type: Injectable
150
150
  }], ctorParameters: () => [] });
151
151
 
@@ -191,8 +191,8 @@ class ThyFormValidatorService {
191
191
  this.errors = [];
192
192
  }
193
193
  _setControlValidateByChange(control) {
194
- control.valueChanges
195
- .pipe(debounceTime(100), distinctUntilChanged(), filter(item => {
194
+ control
195
+ .valueChanges.pipe(debounceTime(100), distinctUntilChanged(), filter(item => {
196
196
  return item;
197
197
  }), switchMap(item => {
198
198
  this.validateControl(control.name);
@@ -204,7 +204,9 @@ class ThyFormValidatorService {
204
204
  const element = this._getElement(control.name);
205
205
  if (element) {
206
206
  // 继承了 AbstractControlValueAccessor 的自定义 Accessor,通过 __onBlurValidation 控制触发验证函数
207
+ //@ts-ignore
207
208
  if (control.valueAccessor['__onBlurValidation']) {
209
+ //@ts-ignore
208
210
  control.valueAccessor['__onBlurValidation'] = () => {
209
211
  this.validateControl(control.name);
210
212
  };
@@ -228,7 +230,7 @@ class ThyFormValidatorService {
228
230
  if (this._getValidateOn() === 'blur') {
229
231
  this._setControlValidateByBlur(control);
230
232
  }
231
- control.valueChanges.pipe(takeUntil(this._destroy$)).subscribe(item => {
233
+ control.valueChanges?.pipe(takeUntil(this._destroy$)).subscribe(item => {
232
234
  this._clearElementError(name);
233
235
  this._clearErrors();
234
236
  });
@@ -360,13 +362,13 @@ class ThyFormValidatorService {
360
362
  validate($event) {
361
363
  this._ngForm.onSubmit($event);
362
364
  this.validateControls();
363
- return this._ngForm.valid;
365
+ return !!this._ngForm.valid;
364
366
  }
365
367
  validateWithDetail($event) {
366
368
  this._ngForm.onSubmit($event);
367
369
  const results = this.validateControls();
368
370
  return {
369
- valid: this._ngForm.valid,
371
+ valid: !!this._ngForm.valid,
370
372
  invalidControls: results.filter(res => !res.valid),
371
373
  validControls: results.filter(res => res.valid)
372
374
  };
@@ -387,10 +389,10 @@ class ThyFormValidatorService {
387
389
  ngOnDestroy() {
388
390
  this._destroy$.next();
389
391
  }
390
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyFormValidatorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
391
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyFormValidatorService }); }
392
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyFormValidatorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
393
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyFormValidatorService }); }
392
394
  }
393
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyFormValidatorService, decorators: [{
395
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyFormValidatorService, decorators: [{
394
396
  type: Injectable
395
397
  }] });
396
398
 
@@ -429,18 +431,19 @@ class ThyFormDirective {
429
431
  * @type horizontal | vertical | inline
430
432
  * @default horizontal
431
433
  */
432
- this.thyLayout = input(undefined, ...(ngDevMode ? [{ debugName: "thyLayout" }] : []));
434
+ this.thyLayout = input(...(ngDevMode ? [undefined, { debugName: "thyLayout" }] : []));
433
435
  /**
434
436
  * Enter 键提交模式。`submit`: Textarea 需要 Ctrl | Command + Enter 提交,其他元素直接 Enter 提交; `alwaysSubmit`: 不管是什么元素 Enter 都提交; `forbidSubmit`: Enter 不提交
435
437
  * @type submit | alwaysSubmit | forbidSubmit
436
438
  * @default submit
437
439
  */
438
- this.thyEnterKeyMode = input(undefined, ...(ngDevMode ? [{ debugName: "thyEnterKeyMode" }] : []));
440
+ this.thyEnterKeyMode = input(...(ngDevMode ? [undefined, { debugName: "thyEnterKeyMode" }] : []));
439
441
  /**
440
442
  * 表单验证规则配置项 (更多内容查看:thyFormValidatorConfig)
441
443
  */
442
444
  this.thyFormValidatorConfig = input(...(ngDevMode ? [undefined, { debugName: "thyFormValidatorConfig" }] : []));
443
445
  this.wasValidated = false;
446
+ this._unsubscribe = null;
444
447
  effect(() => {
445
448
  this.updateClasses();
446
449
  });
@@ -492,7 +495,7 @@ class ThyFormDirective {
492
495
  onKeydown($event) {
493
496
  const currentInput = document.activeElement;
494
497
  const key = $event.which || $event.keyCode;
495
- if (key === keycodes.ENTER && currentInput.tagName) {
498
+ if (key === keycodes.ENTER && currentInput?.tagName) {
496
499
  const thyEnterKeyMode = this.thyEnterKeyMode();
497
500
  if (!thyEnterKeyMode || thyEnterKeyMode === ThyEnterKeyMode.submit) {
498
501
  // TEXTAREA或包含[contenteditable]属性的元素 Ctrl + Enter 或者 Command + Enter 阻止默认行为并提交
@@ -523,10 +526,10 @@ class ThyFormDirective {
523
526
  this._unsubscribe = null;
524
527
  }
525
528
  }
526
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyFormDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
527
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.14", type: ThyFormDirective, isStandalone: true, selector: "[thyForm],[thy-form]", inputs: { thyLayout: { classPropertyName: "thyLayout", publicName: "thyLayout", isSignal: true, isRequired: false, transformFunction: null }, thyEnterKeyMode: { classPropertyName: "thyEnterKeyMode", publicName: "thyEnterKeyMode", isSignal: true, isRequired: false, transformFunction: null }, thyFormValidatorConfig: { classPropertyName: "thyFormValidatorConfig", publicName: "thyFormValidatorConfig", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.was-validated": "this.wasValidated" }, classAttribute: "thy-form" }, providers: [ThyFormValidatorService], queries: [{ propertyName: "controls", predicate: NgControl, descendants: true }], exportAs: ["thyForm"], ngImport: i0 }); }
529
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyFormDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
530
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.15", type: ThyFormDirective, isStandalone: true, selector: "[thyForm],[thy-form]", inputs: { thyLayout: { classPropertyName: "thyLayout", publicName: "thyLayout", isSignal: true, isRequired: false, transformFunction: null }, thyEnterKeyMode: { classPropertyName: "thyEnterKeyMode", publicName: "thyEnterKeyMode", isSignal: true, isRequired: false, transformFunction: null }, thyFormValidatorConfig: { classPropertyName: "thyFormValidatorConfig", publicName: "thyFormValidatorConfig", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.was-validated": "this.wasValidated" }, classAttribute: "thy-form" }, providers: [ThyFormValidatorService], queries: [{ propertyName: "controls", predicate: NgControl, descendants: true }], exportAs: ["thyForm"], ngImport: i0 }); }
528
531
  }
529
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyFormDirective, decorators: [{
532
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyFormDirective, decorators: [{
530
533
  type: Directive,
531
534
  args: [{ selector: '[thyForm],[thy-form]', providers: [ThyFormValidatorService], exportAs: 'thyForm', host: { class: 'thy-form' } }]
532
535
  }], ctorParameters: () => [], propDecorators: { thyLayout: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyLayout", required: false }] }], thyEnterKeyMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyEnterKeyMode", required: false }] }], thyFormValidatorConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyFormValidatorConfig", required: false }] }], wasValidated: [{
@@ -565,10 +568,10 @@ class ThyFormGroupError {
565
568
  this.isHorizontal = this.thyParentForm.isHorizontal;
566
569
  }
567
570
  }
568
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyFormGroupError, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
569
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.14", type: ThyFormGroupError, isStandalone: true, selector: "thy-form-group-error", inputs: { thyShowFirst: { classPropertyName: "thyShowFirst", publicName: "thyShowFirst", isSignal: true, isRequired: false, transformFunction: null }, thyErrors: { classPropertyName: "thyErrors", publicName: "thyErrors", isSignal: false, isRequired: false, transformFunction: null } }, host: { properties: { "class.form-group": "this._isFormGroup", "class.row": "this.isHorizontal" } }, ngImport: i0, template: "<div [ngClass]=\"{ 'col-sm-10 offset-sm-2 col-form-control': isHorizontal }\">\n @for (error of thyErrors; track $index) {\n <thy-alert thyType=\"danger\" [thyMessage]=\"error\"></thy-alert>\n }\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ThyAlert, selector: "thy-alert", inputs: ["thyType", "thyTheme", "thyMessage", "thyIcon", "thyCloseable"] }], encapsulation: i0.ViewEncapsulation.None }); }
571
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyFormGroupError, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
572
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: ThyFormGroupError, isStandalone: true, selector: "thy-form-group-error", inputs: { thyShowFirst: { classPropertyName: "thyShowFirst", publicName: "thyShowFirst", isSignal: true, isRequired: false, transformFunction: null }, thyErrors: { classPropertyName: "thyErrors", publicName: "thyErrors", isSignal: false, isRequired: false, transformFunction: null } }, host: { properties: { "class.form-group": "this._isFormGroup", "class.row": "this.isHorizontal" } }, ngImport: i0, template: "<div [ngClass]=\"{ 'col-sm-10 offset-sm-2 col-form-control': isHorizontal }\">\n @for (error of thyErrors; track $index) {\n <thy-alert thyType=\"danger\" [thyMessage]=\"error\"></thy-alert>\n }\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ThyAlert, selector: "thy-alert", inputs: ["thyType", "thyTheme", "thyMessage", "thyIcon", "thyCloseable"] }], encapsulation: i0.ViewEncapsulation.None }); }
570
573
  }
571
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyFormGroupError, decorators: [{
574
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyFormGroupError, decorators: [{
572
575
  type: Component,
573
576
  args: [{ selector: 'thy-form-group-error', encapsulation: ViewEncapsulation.None, imports: [NgClass, ThyAlert], template: "<div [ngClass]=\"{ 'col-sm-10 offset-sm-2 col-form-control': isHorizontal }\">\n @for (error of thyErrors; track $index) {\n <thy-alert thyType=\"danger\" [thyMessage]=\"error\"></thy-alert>\n }\n</div>\n" }]
574
577
  }], propDecorators: { thyShowFirst: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyShowFirst", required: false }] }], thyErrors: [{
@@ -602,10 +605,10 @@ class ThyFormGroupLabelDirective {
602
605
  set thyLabelRequired(value) {
603
606
  this.labelRequired = value;
604
607
  }
605
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyFormGroupLabelDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
606
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.3.14", type: ThyFormGroupLabelDirective, isStandalone: true, selector: "[thyFormGroupLabel]", inputs: { thyLabelText: "thyLabelText", thyLabelTranslateKey: "thyLabelTranslateKey", thyLabelRequired: ["thyLabelRequired", "thyLabelRequired", coerceBooleanProperty$1] }, host: { properties: { "class.label-required": "this.labelRequired", "class.col-form-label": "this._isFormGroupLabel" } }, ngImport: i0 }); }
608
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyFormGroupLabelDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
609
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.3.15", type: ThyFormGroupLabelDirective, isStandalone: true, selector: "[thyFormGroupLabel]", inputs: { thyLabelText: "thyLabelText", thyLabelTranslateKey: "thyLabelTranslateKey", thyLabelRequired: ["thyLabelRequired", "thyLabelRequired", coerceBooleanProperty$1] }, host: { properties: { "class.label-required": "this.labelRequired", "class.col-form-label": "this._isFormGroupLabel" } }, ngImport: i0 }); }
607
610
  }
608
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyFormGroupLabelDirective, decorators: [{
611
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyFormGroupLabelDirective, decorators: [{
609
612
  type: Directive,
610
613
  args: [{
611
614
  selector: '[thyFormGroupLabel]'
@@ -724,17 +727,17 @@ class ThyFormGroup {
724
727
  const isHorizontal = this.thyParentForm ? this.thyParentForm.isHorizontal : true;
725
728
  this.isHorizontalSignal.set(isHorizontal);
726
729
  }
727
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyFormGroup, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
728
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.14", type: ThyFormGroup, isStandalone: true, selector: "thy-form-group", inputs: { thyLabelText: { classPropertyName: "thyLabelText", publicName: "thyLabelText", isSignal: true, isRequired: false, transformFunction: null }, thyLabelTextTranslateKey: { classPropertyName: "thyLabelTextTranslateKey", publicName: "thyLabelTextTranslateKey", isSignal: true, isRequired: false, transformFunction: null }, thyLabelRequired: { classPropertyName: "thyLabelRequired", publicName: "thyLabelRequired", isSignal: true, isRequired: false, transformFunction: null }, thyLabelPaddingTopClear: { classPropertyName: "thyLabelPaddingTopClear", publicName: "thyLabelPaddingTopClear", isSignal: true, isRequired: false, transformFunction: null }, thyFeedbackIcon: { classPropertyName: "thyFeedbackIcon", publicName: "thyFeedbackIcon", isSignal: true, isRequired: false, transformFunction: null }, thyTipsMode: { classPropertyName: "thyTipsMode", publicName: "thyTipsMode", isSignal: true, isRequired: false, transformFunction: null }, thyTips: { classPropertyName: "thyTips", publicName: "thyTips", isSignal: true, isRequired: false, transformFunction: null }, thyTipsTranslateKey: { classPropertyName: "thyTipsTranslateKey", publicName: "thyTipsTranslateKey", isSignal: true, isRequired: false, transformFunction: null }, thyRowFill: { classPropertyName: "thyRowFill", publicName: "thyRowFill", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.row-fill": "thyRowFill()", "class.row": "isHorizontalSignal()", "class.has-feedback": "thyFeedbackIcon()" }, classAttribute: "form-group" }, queries: [{ propertyName: "contentTemplateRef", first: true, predicate: ["formGroup"], descendants: true }, { propertyName: "contentTemplate", first: true, predicate: ["content"], descendants: true }], ngImport: i0, template: "@let tips = tipsSignal();\n@let labelText = labelTextSignal();\n@let isHorizontal = isHorizontalSignal();\n@let feedbackIcon = thyFeedbackIcon();\n@if (contentTemplate || contentTemplateRef) {\n <ng-container [ngTemplateOutlet]=\"contentTemplate || contentTemplateRef\"></ng-container>\n @if (feedbackIcon) {\n <thy-icon class=\"form-control-feedback\" [thyIconName]=\"feedbackIcon\"></thy-icon>\n }\n} @else {\n @if (!(!isHorizontal && !labelText)) {\n <label\n class=\"form-label \"\n [ngClass]=\"{\n 'col-sm-2 col-form-label': isHorizontal,\n 'pt-0': thyLabelPaddingTopClear()\n }\"\n >\n <span\n [ngClass]=\"{\n 'label-required': thyLabelRequired()\n }\"\n >{{ labelText }}</span\n >\n @if (thyTipsMode() === 'label' && tips) {\n <thy-icon class=\"label-tips-icon\" thyIconName=\"question-circle\" [thyTooltip]=\"tips\"></thy-icon>\n }\n </label>\n }\n <div [ngClass]=\"{ 'col-sm-10 col-form-control': isHorizontal, 'position-relative': !isHorizontal }\">\n <ng-content></ng-content>\n @if (feedbackIcon) {\n <thy-icon class=\"form-control-feedback\" [thyIconName]=\"feedbackIcon\"></thy-icon>\n }\n @if (thyTipsMode() === 'default' && tips) {\n <span class=\"form-text text-desc\">{{ tips }}</span>\n }\n </div>\n }\n\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
730
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyFormGroup, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
731
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: ThyFormGroup, isStandalone: true, selector: "thy-form-group", inputs: { thyLabelText: { classPropertyName: "thyLabelText", publicName: "thyLabelText", isSignal: true, isRequired: false, transformFunction: null }, thyLabelTextTranslateKey: { classPropertyName: "thyLabelTextTranslateKey", publicName: "thyLabelTextTranslateKey", isSignal: true, isRequired: false, transformFunction: null }, thyLabelRequired: { classPropertyName: "thyLabelRequired", publicName: "thyLabelRequired", isSignal: true, isRequired: false, transformFunction: null }, thyLabelPaddingTopClear: { classPropertyName: "thyLabelPaddingTopClear", publicName: "thyLabelPaddingTopClear", isSignal: true, isRequired: false, transformFunction: null }, thyFeedbackIcon: { classPropertyName: "thyFeedbackIcon", publicName: "thyFeedbackIcon", isSignal: true, isRequired: false, transformFunction: null }, thyTipsMode: { classPropertyName: "thyTipsMode", publicName: "thyTipsMode", isSignal: true, isRequired: false, transformFunction: null }, thyTips: { classPropertyName: "thyTips", publicName: "thyTips", isSignal: true, isRequired: false, transformFunction: null }, thyTipsTranslateKey: { classPropertyName: "thyTipsTranslateKey", publicName: "thyTipsTranslateKey", isSignal: true, isRequired: false, transformFunction: null }, thyRowFill: { classPropertyName: "thyRowFill", publicName: "thyRowFill", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.row-fill": "thyRowFill()", "class.row": "isHorizontalSignal()", "class.has-feedback": "thyFeedbackIcon()" }, classAttribute: "form-group" }, queries: [{ propertyName: "contentTemplateRef", first: true, predicate: ["formGroup"], descendants: true }, { propertyName: "contentTemplate", first: true, predicate: ["content"], descendants: true }], ngImport: i0, template: "@let tips = tipsSignal();\n@let labelText = labelTextSignal();\n@let isHorizontal = isHorizontalSignal();\n@let feedbackIcon = thyFeedbackIcon();\n@if (contentTemplate || contentTemplateRef) {\n <ng-container [ngTemplateOutlet]=\"contentTemplate || contentTemplateRef\"></ng-container>\n @if (feedbackIcon) {\n <thy-icon class=\"form-control-feedback\" [thyIconName]=\"feedbackIcon\"></thy-icon>\n }\n} @else {\n @if (!(!isHorizontal && !labelText)) {\n <label\n class=\"form-label\"\n [ngClass]=\"{\n 'col-sm-2 col-form-label': isHorizontal,\n 'pt-0': thyLabelPaddingTopClear()\n }\">\n <span\n [ngClass]=\"{\n 'label-required': thyLabelRequired()\n }\"\n >{{ labelText }}</span\n >\n @if (thyTipsMode() === 'label' && tips) {\n <thy-icon class=\"label-tips-icon\" thyIconName=\"question-circle\" [thyTooltip]=\"tips\"></thy-icon>\n }\n </label>\n }\n <div [ngClass]=\"{ 'col-sm-10 col-form-control': isHorizontal, 'position-relative': !isHorizontal }\">\n <ng-content></ng-content>\n @if (feedbackIcon) {\n <thy-icon class=\"form-control-feedback\" [thyIconName]=\"feedbackIcon\"></thy-icon>\n }\n @if (thyTipsMode() === 'default' && tips) {\n <span class=\"form-text text-desc\">{{ tips }}</span>\n }\n </div>\n}\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
729
732
  }
730
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyFormGroup, decorators: [{
733
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyFormGroup, decorators: [{
731
734
  type: Component,
732
735
  args: [{ selector: 'thy-form-group', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgTemplateOutlet, ThyIcon, NgClass, ThyTooltipDirective], host: {
733
736
  class: 'form-group',
734
737
  '[class.row-fill]': 'thyRowFill()',
735
738
  '[class.row]': 'isHorizontalSignal()',
736
739
  '[class.has-feedback]': 'thyFeedbackIcon()'
737
- }, template: "@let tips = tipsSignal();\n@let labelText = labelTextSignal();\n@let isHorizontal = isHorizontalSignal();\n@let feedbackIcon = thyFeedbackIcon();\n@if (contentTemplate || contentTemplateRef) {\n <ng-container [ngTemplateOutlet]=\"contentTemplate || contentTemplateRef\"></ng-container>\n @if (feedbackIcon) {\n <thy-icon class=\"form-control-feedback\" [thyIconName]=\"feedbackIcon\"></thy-icon>\n }\n} @else {\n @if (!(!isHorizontal && !labelText)) {\n <label\n class=\"form-label \"\n [ngClass]=\"{\n 'col-sm-2 col-form-label': isHorizontal,\n 'pt-0': thyLabelPaddingTopClear()\n }\"\n >\n <span\n [ngClass]=\"{\n 'label-required': thyLabelRequired()\n }\"\n >{{ labelText }}</span\n >\n @if (thyTipsMode() === 'label' && tips) {\n <thy-icon class=\"label-tips-icon\" thyIconName=\"question-circle\" [thyTooltip]=\"tips\"></thy-icon>\n }\n </label>\n }\n <div [ngClass]=\"{ 'col-sm-10 col-form-control': isHorizontal, 'position-relative': !isHorizontal }\">\n <ng-content></ng-content>\n @if (feedbackIcon) {\n <thy-icon class=\"form-control-feedback\" [thyIconName]=\"feedbackIcon\"></thy-icon>\n }\n @if (thyTipsMode() === 'default' && tips) {\n <span class=\"form-text text-desc\">{{ tips }}</span>\n }\n </div>\n }\n\n" }]
740
+ }, template: "@let tips = tipsSignal();\n@let labelText = labelTextSignal();\n@let isHorizontal = isHorizontalSignal();\n@let feedbackIcon = thyFeedbackIcon();\n@if (contentTemplate || contentTemplateRef) {\n <ng-container [ngTemplateOutlet]=\"contentTemplate || contentTemplateRef\"></ng-container>\n @if (feedbackIcon) {\n <thy-icon class=\"form-control-feedback\" [thyIconName]=\"feedbackIcon\"></thy-icon>\n }\n} @else {\n @if (!(!isHorizontal && !labelText)) {\n <label\n class=\"form-label\"\n [ngClass]=\"{\n 'col-sm-2 col-form-label': isHorizontal,\n 'pt-0': thyLabelPaddingTopClear()\n }\">\n <span\n [ngClass]=\"{\n 'label-required': thyLabelRequired()\n }\"\n >{{ labelText }}</span\n >\n @if (thyTipsMode() === 'label' && tips) {\n <thy-icon class=\"label-tips-icon\" thyIconName=\"question-circle\" [thyTooltip]=\"tips\"></thy-icon>\n }\n </label>\n }\n <div [ngClass]=\"{ 'col-sm-10 col-form-control': isHorizontal, 'position-relative': !isHorizontal }\">\n <ng-content></ng-content>\n @if (feedbackIcon) {\n <thy-icon class=\"form-control-feedback\" [thyIconName]=\"feedbackIcon\"></thy-icon>\n }\n @if (thyTipsMode() === 'default' && tips) {\n <span class=\"form-text text-desc\">{{ tips }}</span>\n }\n </div>\n}\n" }]
738
741
  }], ctorParameters: () => [], propDecorators: { thyLabelText: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyLabelText", required: false }] }], thyLabelTextTranslateKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyLabelTextTranslateKey", required: false }] }], thyLabelRequired: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyLabelRequired", required: false }] }], thyLabelPaddingTopClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyLabelPaddingTopClear", required: false }] }], thyFeedbackIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyFeedbackIcon", required: false }] }], thyTipsMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyTipsMode", required: false }] }], thyTips: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyTips", required: false }] }], thyTipsTranslateKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyTipsTranslateKey", required: false }] }], thyRowFill: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyRowFill", required: false }] }], contentTemplateRef: [{
739
742
  type: ContentChild,
740
743
  args: ['formGroup']
@@ -764,10 +767,10 @@ class ThyFormSubmitDirective {
764
767
  onSubmit($event) {
765
768
  this.thyFormDirective.submit($event);
766
769
  }
767
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyFormSubmitDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
768
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.14", type: ThyFormSubmitDirective, isStandalone: true, selector: "[thyFormSubmit],[thy-form-submit]", outputs: { thyFormSubmit: "thyFormSubmit" }, host: { listeners: { "click": "onSubmit($event)" } }, ngImport: i0 }); }
770
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyFormSubmitDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
771
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.15", type: ThyFormSubmitDirective, isStandalone: true, selector: "[thyFormSubmit],[thy-form-submit]", outputs: { thyFormSubmit: "thyFormSubmit" }, host: { listeners: { "click": "onSubmit($event)" } }, ngImport: i0 }); }
769
772
  }
770
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyFormSubmitDirective, decorators: [{
773
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyFormSubmitDirective, decorators: [{
771
774
  type: Directive,
772
775
  args: [{
773
776
  selector: '[thyFormSubmit],[thy-form-submit]'
@@ -793,12 +796,12 @@ class ThyFormGroupFooter {
793
796
  * @type left | right | center
794
797
  * @default left
795
798
  */
796
- this.thyAlign = input(undefined, ...(ngDevMode ? [{ debugName: "thyAlign" }] : []));
799
+ this.thyAlign = input(...(ngDevMode ? [undefined, { debugName: "thyAlign" }] : []));
797
800
  this.footerClassMap = {};
798
801
  }
799
802
  get align() {
800
803
  const thyAlign = this.thyAlign();
801
- return !!thyAlign ? thyAlign : this.defaultConfig.footerAlign;
804
+ return thyAlign ? thyAlign : this.defaultConfig.footerAlign;
802
805
  }
803
806
  ngOnInit() {
804
807
  if (this.thyParentForm) {
@@ -813,10 +816,10 @@ class ThyFormGroupFooter {
813
816
  [`form-group-footer-align-${this.align}`]: true
814
817
  };
815
818
  }
816
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyFormGroupFooter, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
817
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.14", type: ThyFormGroupFooter, isStandalone: true, selector: "thy-form-group-footer", inputs: { thyAlign: { classPropertyName: "thyAlign", publicName: "thyAlign", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.form-group": "this._isFormGroup", "class.row": "this.isHorizontal" } }, queries: [{ propertyName: "description", first: true, predicate: ["description"], descendants: true }], ngImport: i0, template: "<div [ngClass]=\"footerClassMap\">\n <div class=\"btn-pair form-footer-actions\">\n <ng-content></ng-content>\n </div>\n\n @if (description) {\n <div class=\"form-footer-description\">\n <ng-container [ngTemplateOutlet]=\"description\"></ng-container>\n </div>\n }\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], encapsulation: i0.ViewEncapsulation.None }); }
819
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyFormGroupFooter, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
820
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: ThyFormGroupFooter, isStandalone: true, selector: "thy-form-group-footer", inputs: { thyAlign: { classPropertyName: "thyAlign", publicName: "thyAlign", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.form-group": "this._isFormGroup", "class.row": "this.isHorizontal" } }, queries: [{ propertyName: "description", first: true, predicate: ["description"], descendants: true }], ngImport: i0, template: "<div [ngClass]=\"footerClassMap\">\n <div class=\"btn-pair form-footer-actions\">\n <ng-content></ng-content>\n </div>\n\n @if (description) {\n <div class=\"form-footer-description\">\n <ng-container [ngTemplateOutlet]=\"description\"></ng-container>\n </div>\n }\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], encapsulation: i0.ViewEncapsulation.None }); }
818
821
  }
819
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyFormGroupFooter, decorators: [{
822
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyFormGroupFooter, decorators: [{
820
823
  type: Component,
821
824
  args: [{ selector: 'thy-form-group-footer', encapsulation: ViewEncapsulation.None, imports: [NgClass, NgTemplateOutlet], template: "<div [ngClass]=\"footerClassMap\">\n <div class=\"btn-pair form-footer-actions\">\n <ng-content></ng-content>\n </div>\n\n @if (description) {\n <div class=\"form-footer-description\">\n <ng-container [ngTemplateOutlet]=\"description\"></ng-container>\n </div>\n }\n</div>\n" }]
822
825
  }], propDecorators: { _isFormGroup: [{
@@ -839,7 +842,7 @@ class ThyUniqueCheckValidator {
839
842
  constructor() {
840
843
  this.elementRef = inject(ElementRef);
841
844
  this.thyForm = inject(ThyFormDirective, { optional: true });
842
- this.thyUniqueCheck = input(undefined, ...(ngDevMode ? [{ debugName: "thyUniqueCheck" }] : []));
845
+ this.thyUniqueCheck = input(...(ngDevMode ? [undefined, { debugName: "thyUniqueCheck" }] : []));
843
846
  }
844
847
  validate(ctrl) {
845
848
  return this.thyUniqueCheck()(ctrl.value).pipe(map((failed) => {
@@ -851,10 +854,10 @@ class ThyUniqueCheckValidator {
851
854
  return failed ? { thyUniqueCheck: failed } : null;
852
855
  }), catchError(() => of(null)));
853
856
  }
854
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyUniqueCheckValidator, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
855
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.14", type: ThyUniqueCheckValidator, isStandalone: true, selector: "[thyUniqueCheck]", inputs: { thyUniqueCheck: { classPropertyName: "thyUniqueCheck", publicName: "thyUniqueCheck", isSignal: true, isRequired: false, transformFunction: null } }, providers: [{ provide: NG_ASYNC_VALIDATORS, useExisting: ThyUniqueCheckValidator, multi: true }], ngImport: i0 }); }
857
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyUniqueCheckValidator, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
858
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.15", type: ThyUniqueCheckValidator, isStandalone: true, selector: "[thyUniqueCheck]", inputs: { thyUniqueCheck: { classPropertyName: "thyUniqueCheck", publicName: "thyUniqueCheck", isSignal: true, isRequired: false, transformFunction: null } }, providers: [{ provide: NG_ASYNC_VALIDATORS, useExisting: ThyUniqueCheckValidator, multi: true }], ngImport: i0 }); }
856
859
  }
857
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyUniqueCheckValidator, decorators: [{
860
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyUniqueCheckValidator, decorators: [{
858
861
  type: Directive,
859
862
  args: [{
860
863
  selector: '[thyUniqueCheck]',
@@ -873,8 +876,8 @@ class ThyMinDirective {
873
876
  validate(control) {
874
877
  return this._validator(control);
875
878
  }
876
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyMinDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
877
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.14", type: ThyMinDirective, isStandalone: true, selector: "[min][formControlName],[min][formControl],[min][ngModel]", inputs: { min: "min" }, providers: [
879
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyMinDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
880
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.15", type: ThyMinDirective, isStandalone: true, selector: "[min][formControlName],[min][formControl],[min][ngModel]", inputs: { min: "min" }, providers: [
878
881
  {
879
882
  provide: NG_VALIDATORS,
880
883
  useExisting: forwardRef(() => ThyMinDirective),
@@ -882,7 +885,7 @@ class ThyMinDirective {
882
885
  }
883
886
  ], ngImport: i0 }); }
884
887
  }
885
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyMinDirective, decorators: [{
888
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyMinDirective, decorators: [{
886
889
  type: Directive,
887
890
  args: [{
888
891
  // eslint-disable-next-line @angular-eslint/directive-selector
@@ -910,8 +913,8 @@ class ThyMaxDirective {
910
913
  validate(control) {
911
914
  return this._validator(control);
912
915
  }
913
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyMaxDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
914
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.14", type: ThyMaxDirective, isStandalone: true, selector: "[max][formControlName],[max][formControl],[max][ngModel]", inputs: { max: "max" }, providers: [
916
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyMaxDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
917
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.15", type: ThyMaxDirective, isStandalone: true, selector: "[max][formControlName],[max][formControl],[max][ngModel]", inputs: { max: "max" }, providers: [
915
918
  {
916
919
  provide: NG_VALIDATORS,
917
920
  useExisting: forwardRef(() => ThyMaxDirective),
@@ -919,7 +922,7 @@ class ThyMaxDirective {
919
922
  }
920
923
  ], ngImport: i0 }); }
921
924
  }
922
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyMaxDirective, decorators: [{
925
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyMaxDirective, decorators: [{
923
926
  type: Directive,
924
927
  args: [{
925
928
  // eslint-disable-next-line @angular-eslint/directive-selector
@@ -952,22 +955,22 @@ class ThyConfirmValidatorDirective {
952
955
  /**
953
956
  * 表单控件的校验值
954
957
  */
955
- this.confirm = input(undefined, ...(ngDevMode ? [{ debugName: "confirm" }] : []));
958
+ this.confirm = input.required(...(ngDevMode ? [{ debugName: "confirm" }] : []));
956
959
  }
957
960
  validate(control) {
958
961
  return confirmValidator(this.confirm())(control);
959
962
  }
960
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyConfirmValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
961
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.14", type: ThyConfirmValidatorDirective, isStandalone: true, selector: "[confirm]", inputs: { confirm: { classPropertyName: "confirm", publicName: "confirm", isSignal: true, isRequired: false, transformFunction: null } }, providers: [{ provide: NG_VALIDATORS, useExisting: ThyConfirmValidatorDirective, multi: true }], ngImport: i0 }); }
963
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyConfirmValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
964
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.15", type: ThyConfirmValidatorDirective, isStandalone: true, selector: "[confirm]", inputs: { confirm: { classPropertyName: "confirm", publicName: "confirm", isSignal: true, isRequired: true, transformFunction: null } }, providers: [{ provide: NG_VALIDATORS, useExisting: ThyConfirmValidatorDirective, multi: true }], ngImport: i0 }); }
962
965
  }
963
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyConfirmValidatorDirective, decorators: [{
966
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyConfirmValidatorDirective, decorators: [{
964
967
  type: Directive,
965
968
  args: [{
966
969
  // eslint-disable-next-line @angular-eslint/directive-selector
967
970
  selector: '[confirm]',
968
971
  providers: [{ provide: NG_VALIDATORS, useExisting: ThyConfirmValidatorDirective, multi: true }]
969
972
  }]
970
- }], propDecorators: { confirm: [{ type: i0.Input, args: [{ isSignal: true, alias: "confirm", required: false }] }] } });
973
+ }], propDecorators: { confirm: [{ type: i0.Input, args: [{ isSignal: true, alias: "confirm", required: true }] }] } });
971
974
 
972
975
  class ThyFormModule {
973
976
  static forRoot(config) {
@@ -981,8 +984,8 @@ class ThyFormModule {
981
984
  ]
982
985
  };
983
986
  }
984
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyFormModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
985
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.14", ngImport: i0, type: ThyFormModule, imports: [CommonModule,
987
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyFormModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
988
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: ThyFormModule, imports: [CommonModule,
986
989
  FormsModule,
987
990
  ReactiveFormsModule,
988
991
  ThyInputModule,
@@ -1008,7 +1011,7 @@ class ThyFormModule {
1008
1011
  ThyMinDirective,
1009
1012
  ThyMaxDirective,
1010
1013
  ThyConfirmValidatorDirective] }); }
1011
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyFormModule, providers: [ThyFormValidatorLoader, THY_FORM_CONFIG_PROVIDER], imports: [CommonModule,
1014
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyFormModule, providers: [ThyFormValidatorLoader, THY_FORM_CONFIG_PROVIDER], imports: [CommonModule,
1012
1015
  FormsModule,
1013
1016
  ReactiveFormsModule,
1014
1017
  ThyInputModule,
@@ -1018,7 +1021,7 @@ class ThyFormModule {
1018
1021
  ThyFormGroup,
1019
1022
  ThyFormGroupError] }); }
1020
1023
  }
1021
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyFormModule, decorators: [{
1024
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyFormModule, decorators: [{
1022
1025
  type: NgModule,
1023
1026
  args: [{
1024
1027
  imports: [