ngx-formly-zorro-antd 17.1.2 → 17.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (195) hide show
  1. package/README.md +1 -1
  2. package/autocomplete/package.json +3 -0
  3. package/button/package.json +3 -0
  4. package/button-group/package.json +3 -0
  5. package/card/package.json +3 -0
  6. package/card-wrapper/package.json +3 -0
  7. package/cascader/package.json +3 -0
  8. package/checkbox/package.json +3 -0
  9. package/common/package.json +3 -0
  10. package/datepicker/package.json +3 -0
  11. package/esm2022/autocomplete/autocomplete.props.mjs +1 -1
  12. package/esm2022/autocomplete/public_api.mjs +1 -1
  13. package/esm2022/button/button.module.mjs +1 -1
  14. package/esm2022/button/button.type.mjs +123 -123
  15. package/esm2022/button/public_api.mjs +1 -1
  16. package/esm2022/button-group/button-group.module.mjs +1 -1
  17. package/esm2022/button-group/button-group.type.mjs +67 -67
  18. package/esm2022/button-group/public_api.mjs +1 -1
  19. package/esm2022/card/card.module.mjs +1 -1
  20. package/esm2022/card/card.type.mjs +51 -51
  21. package/esm2022/card/public_api.mjs +1 -1
  22. package/esm2022/card-wrapper/card-wrapper.module.mjs +1 -1
  23. package/esm2022/card-wrapper/card-wrapper.props.mjs +1 -1
  24. package/esm2022/card-wrapper/card.wrapper.mjs +37 -37
  25. package/esm2022/card-wrapper/public_api.mjs +1 -1
  26. package/esm2022/cascader/cascader.module.mjs +1 -1
  27. package/esm2022/cascader/cascader.type.mjs +65 -65
  28. package/esm2022/cascader/public_api.mjs +1 -1
  29. package/esm2022/checkbox/checkbox.module.mjs +1 -1
  30. package/esm2022/checkbox/checkbox.type.mjs +48 -43
  31. package/esm2022/checkbox/public_api.mjs +1 -1
  32. package/esm2022/common/common.module.mjs +1 -1
  33. package/esm2022/common/formly-box-templates.directive.mjs +1 -1
  34. package/esm2022/common/formly-utils.mjs +1 -1
  35. package/esm2022/common/interface.mjs +1 -1
  36. package/esm2022/common/public_api.mjs +1 -1
  37. package/esm2022/datepicker/datepicker.module.mjs +1 -1
  38. package/esm2022/datepicker/datepicker.props.mjs +1 -1
  39. package/esm2022/datepicker/datepicker.type.mjs +149 -149
  40. package/esm2022/datepicker/public_api.mjs +1 -1
  41. package/esm2022/extension/public_api.mjs +1 -1
  42. package/esm2022/extension/value-changes-extension.mjs +1 -1
  43. package/esm2022/flex/flex.module.mjs +1 -1
  44. package/esm2022/flex/flex.type.mjs +35 -35
  45. package/esm2022/flex/public_api.mjs +1 -1
  46. package/esm2022/form-field/form-field.module.mjs +1 -1
  47. package/esm2022/form-field/form-field.props.mjs +1 -1
  48. package/esm2022/form-field/form-field.wrapper.mjs +147 -147
  49. package/esm2022/form-field/public_api.mjs +1 -1
  50. package/esm2022/grid/grid.module.mjs +1 -1
  51. package/esm2022/grid/grid.props.mjs +1 -1
  52. package/esm2022/grid/grid.type.mjs +59 -59
  53. package/esm2022/grid/public_api.mjs +1 -1
  54. package/esm2022/index.mjs +1 -1
  55. package/esm2022/input/input.module.mjs +1 -1
  56. package/esm2022/input/input.props.mjs +1 -1
  57. package/esm2022/input/input.type.mjs +275 -275
  58. package/esm2022/input/public_api.mjs +1 -1
  59. package/esm2022/input-group/input-group.module.mjs +1 -1
  60. package/esm2022/input-group/input-group.props.mjs +1 -1
  61. package/esm2022/input-group/input-group.type.mjs +47 -42
  62. package/esm2022/input-group/public_api.mjs +1 -1
  63. package/esm2022/input-number/input-number.module.mjs +1 -1
  64. package/esm2022/input-number/input-number.props.mjs +1 -1
  65. package/esm2022/input-number/input-number.type.mjs +89 -89
  66. package/esm2022/input-number/public_api.mjs +1 -1
  67. package/esm2022/lib/ui-ng-zorro-antd.mjs +1 -1
  68. package/esm2022/lib/ui-ng-zorro-antd.module.mjs +1 -1
  69. package/esm2022/radio/public_api.mjs +1 -1
  70. package/esm2022/radio/radio.module.mjs +1 -1
  71. package/esm2022/radio/radio.type.mjs +81 -81
  72. package/esm2022/rate/public_api.mjs +1 -1
  73. package/esm2022/rate/rate.module.mjs +1 -1
  74. package/esm2022/rate/rate.type.mjs +33 -33
  75. package/esm2022/ref-template/public_api.mjs +1 -1
  76. package/esm2022/ref-template/ref-template.module.mjs +1 -1
  77. package/esm2022/ref-template/ref-template.type.mjs +9 -9
  78. package/esm2022/select/public_api.mjs +1 -1
  79. package/esm2022/select/select.module.mjs +1 -1
  80. package/esm2022/select/select.props.mjs +1 -1
  81. package/esm2022/select/select.type.mjs +123 -123
  82. package/esm2022/slider/public_api.mjs +1 -1
  83. package/esm2022/slider/slider.module.mjs +1 -1
  84. package/esm2022/slider/slider.type.mjs +33 -33
  85. package/esm2022/space/public_api.mjs +1 -1
  86. package/esm2022/space/space.module.mjs +1 -1
  87. package/esm2022/space/space.type.mjs +27 -27
  88. package/esm2022/switch/public_api.mjs +1 -1
  89. package/esm2022/switch/switch.module.mjs +1 -1
  90. package/esm2022/switch/switch.type.mjs +25 -25
  91. package/esm2022/tabs/public_api.mjs +1 -1
  92. package/esm2022/tabs/tabs.module.mjs +1 -1
  93. package/esm2022/tabs/tabs.props.mjs +1 -1
  94. package/esm2022/tabs/tabs.wrapper.mjs +79 -79
  95. package/esm2022/text-value/public_api.mjs +1 -1
  96. package/esm2022/text-value/text-value.module.mjs +1 -1
  97. package/esm2022/text-value/text-value.type.mjs +19 -19
  98. package/esm2022/textarea/public_api.mjs +1 -1
  99. package/esm2022/textarea/textarea.module.mjs +1 -1
  100. package/esm2022/textarea/textarea.type.mjs +113 -113
  101. package/esm2022/timepicker/public_api.mjs +1 -1
  102. package/esm2022/timepicker/timepicker.module.mjs +1 -1
  103. package/esm2022/timepicker/timepicker.type.mjs +61 -61
  104. package/esm2022/transfer/public_api.mjs +1 -1
  105. package/esm2022/transfer/transfer.component.mjs +49 -49
  106. package/esm2022/transfer/transfer.module.mjs +1 -1
  107. package/esm2022/transfer/transfer.type.mjs +47 -47
  108. package/esm2022/tree-select/public_api.mjs +1 -1
  109. package/esm2022/tree-select/tree-select.module.mjs +1 -1
  110. package/esm2022/tree-select/tree-select.type.mjs +69 -69
  111. package/esm2022/upload/public_api.mjs +1 -1
  112. package/esm2022/upload/upload.component.mjs +143 -143
  113. package/esm2022/upload/upload.module.mjs +1 -1
  114. package/esm2022/upload/upload.props.mjs +1 -1
  115. package/esm2022/upload/upload.type.mjs +83 -83
  116. package/extension/package.json +3 -0
  117. package/fesm2022/ngx-formly-zorro-antd-button-group.mjs +66 -66
  118. package/fesm2022/ngx-formly-zorro-antd-button-group.mjs.map +1 -1
  119. package/fesm2022/ngx-formly-zorro-antd-button.mjs +122 -122
  120. package/fesm2022/ngx-formly-zorro-antd-button.mjs.map +1 -1
  121. package/fesm2022/ngx-formly-zorro-antd-card-wrapper.mjs +36 -36
  122. package/fesm2022/ngx-formly-zorro-antd-card-wrapper.mjs.map +1 -1
  123. package/fesm2022/ngx-formly-zorro-antd-card.mjs +50 -50
  124. package/fesm2022/ngx-formly-zorro-antd-card.mjs.map +1 -1
  125. package/fesm2022/ngx-formly-zorro-antd-cascader.mjs +64 -64
  126. package/fesm2022/ngx-formly-zorro-antd-cascader.mjs.map +1 -1
  127. package/fesm2022/ngx-formly-zorro-antd-checkbox.mjs +48 -43
  128. package/fesm2022/ngx-formly-zorro-antd-checkbox.mjs.map +1 -1
  129. package/fesm2022/ngx-formly-zorro-antd-common.mjs.map +1 -1
  130. package/fesm2022/ngx-formly-zorro-antd-datepicker.mjs +148 -148
  131. package/fesm2022/ngx-formly-zorro-antd-datepicker.mjs.map +1 -1
  132. package/fesm2022/ngx-formly-zorro-antd-extension.mjs.map +1 -1
  133. package/fesm2022/ngx-formly-zorro-antd-flex.mjs +34 -34
  134. package/fesm2022/ngx-formly-zorro-antd-flex.mjs.map +1 -1
  135. package/fesm2022/ngx-formly-zorro-antd-form-field.mjs +146 -146
  136. package/fesm2022/ngx-formly-zorro-antd-form-field.mjs.map +1 -1
  137. package/fesm2022/ngx-formly-zorro-antd-grid.mjs +58 -58
  138. package/fesm2022/ngx-formly-zorro-antd-grid.mjs.map +1 -1
  139. package/fesm2022/ngx-formly-zorro-antd-input-group.mjs +47 -42
  140. package/fesm2022/ngx-formly-zorro-antd-input-group.mjs.map +1 -1
  141. package/fesm2022/ngx-formly-zorro-antd-input-number.mjs +88 -88
  142. package/fesm2022/ngx-formly-zorro-antd-input-number.mjs.map +1 -1
  143. package/fesm2022/ngx-formly-zorro-antd-input.mjs +274 -274
  144. package/fesm2022/ngx-formly-zorro-antd-input.mjs.map +1 -1
  145. package/fesm2022/ngx-formly-zorro-antd-radio.mjs +80 -80
  146. package/fesm2022/ngx-formly-zorro-antd-radio.mjs.map +1 -1
  147. package/fesm2022/ngx-formly-zorro-antd-rate.mjs +32 -32
  148. package/fesm2022/ngx-formly-zorro-antd-rate.mjs.map +1 -1
  149. package/fesm2022/ngx-formly-zorro-antd-ref-template.mjs +8 -8
  150. package/fesm2022/ngx-formly-zorro-antd-ref-template.mjs.map +1 -1
  151. package/fesm2022/ngx-formly-zorro-antd-select.mjs +122 -122
  152. package/fesm2022/ngx-formly-zorro-antd-select.mjs.map +1 -1
  153. package/fesm2022/ngx-formly-zorro-antd-slider.mjs +32 -32
  154. package/fesm2022/ngx-formly-zorro-antd-slider.mjs.map +1 -1
  155. package/fesm2022/ngx-formly-zorro-antd-space.mjs +26 -26
  156. package/fesm2022/ngx-formly-zorro-antd-space.mjs.map +1 -1
  157. package/fesm2022/ngx-formly-zorro-antd-switch.mjs +24 -24
  158. package/fesm2022/ngx-formly-zorro-antd-switch.mjs.map +1 -1
  159. package/fesm2022/ngx-formly-zorro-antd-tabs.mjs +78 -78
  160. package/fesm2022/ngx-formly-zorro-antd-tabs.mjs.map +1 -1
  161. package/fesm2022/ngx-formly-zorro-antd-text-value.mjs +18 -18
  162. package/fesm2022/ngx-formly-zorro-antd-text-value.mjs.map +1 -1
  163. package/fesm2022/ngx-formly-zorro-antd-textarea.mjs +112 -112
  164. package/fesm2022/ngx-formly-zorro-antd-textarea.mjs.map +1 -1
  165. package/fesm2022/ngx-formly-zorro-antd-timepicker.mjs +60 -60
  166. package/fesm2022/ngx-formly-zorro-antd-timepicker.mjs.map +1 -1
  167. package/fesm2022/ngx-formly-zorro-antd-transfer.mjs +94 -94
  168. package/fesm2022/ngx-formly-zorro-antd-transfer.mjs.map +1 -1
  169. package/fesm2022/ngx-formly-zorro-antd-tree-select.mjs +68 -68
  170. package/fesm2022/ngx-formly-zorro-antd-tree-select.mjs.map +1 -1
  171. package/fesm2022/ngx-formly-zorro-antd-upload.mjs +224 -224
  172. package/fesm2022/ngx-formly-zorro-antd-upload.mjs.map +1 -1
  173. package/fesm2022/ngx-formly-zorro-antd.mjs.map +1 -1
  174. package/flex/package.json +3 -0
  175. package/form-field/form-field.props.d.ts +5 -1
  176. package/form-field/package.json +3 -0
  177. package/grid/package.json +3 -0
  178. package/input/package.json +3 -0
  179. package/input-group/package.json +3 -0
  180. package/input-number/package.json +3 -0
  181. package/package.json +1 -1
  182. package/radio/package.json +3 -0
  183. package/rate/package.json +3 -0
  184. package/ref-template/package.json +3 -0
  185. package/select/package.json +3 -0
  186. package/slider/package.json +3 -0
  187. package/space/package.json +3 -0
  188. package/switch/package.json +3 -0
  189. package/tabs/package.json +3 -0
  190. package/text-value/package.json +3 -0
  191. package/textarea/package.json +3 -0
  192. package/timepicker/package.json +3 -0
  193. package/transfer/package.json +3 -0
  194. package/tree-select/package.json +3 -0
  195. package/upload/package.json +3 -0
@@ -24,92 +24,92 @@ class FormlyFieldRadio extends FieldType {
24
24
  };
25
25
  }
26
26
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: FormlyFieldRadio, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
27
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.0.9", type: FormlyFieldRadio, selector: "formly-field-radio", usesInheritance: true, ngImport: i0, template: `
28
- <nz-radio-group
29
- [formControl]="formControl"
30
- [formlyAttributes]="field"
31
- [nzName]="field.name ?? null"
32
- [nzSize]="props['size']!"
33
- [nzButtonStyle]="props['buttonStyle']!"
34
- >
35
- @if (props.type !== 'button') {
36
- @for (
37
- option of props.options | formlySelectOptions: field | async;
38
- track option;
39
- let i = $index
40
- ) {
41
- <label
42
- [id]="id + '_' + i"
43
- [nzDisabled]="option.disabled === true"
44
- [nzValue]="option.value"
45
- nz-radio
46
- >
47
- {{ option.label }}
48
- </label>
49
- }
50
- } @else {
51
- @for (
52
- option of props.options | formlySelectOptions: field | async;
53
- track option;
54
- let i = $index
55
- ) {
56
- <label
57
- [id]="id + '_' + i"
58
- [nzDisabled]="option.disabled === true"
59
- [nzValue]="option.value"
60
- nz-radio-button
61
- >
62
- {{ option.label }}
63
- </label>
64
- }
65
- }
66
- </nz-radio-group>
27
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.0.9", type: FormlyFieldRadio, selector: "formly-field-radio", usesInheritance: true, ngImport: i0, template: `
28
+ <nz-radio-group
29
+ [formControl]="formControl"
30
+ [formlyAttributes]="field"
31
+ [nzName]="field.name ?? null"
32
+ [nzSize]="props['size']!"
33
+ [nzButtonStyle]="props['buttonStyle']!"
34
+ >
35
+ @if (props.type !== 'button') {
36
+ @for (
37
+ option of props.options | formlySelectOptions: field | async;
38
+ track option;
39
+ let i = $index
40
+ ) {
41
+ <label
42
+ [id]="id + '_' + i"
43
+ [nzDisabled]="option.disabled === true"
44
+ [nzValue]="option.value"
45
+ nz-radio
46
+ >
47
+ {{ option.label }}
48
+ </label>
49
+ }
50
+ } @else {
51
+ @for (
52
+ option of props.options | formlySelectOptions: field | async;
53
+ track option;
54
+ let i = $index
55
+ ) {
56
+ <label
57
+ [id]="id + '_' + i"
58
+ [nzDisabled]="option.disabled === true"
59
+ [nzValue]="option.value"
60
+ nz-radio-button
61
+ >
62
+ {{ option.label }}
63
+ </label>
64
+ }
65
+ }
66
+ </nz-radio-group>
67
67
  `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i2.NzRadioComponent, selector: "[nz-radio],[nz-radio-button]", inputs: ["nzValue", "nzDisabled", "nzAutoFocus"], exportAs: ["nzRadio"] }, { kind: "directive", type: i2.NzRadioButtonDirective, selector: "[nz-radio-button]" }, { kind: "component", type: i2.NzRadioGroupComponent, selector: "nz-radio-group", inputs: ["nzDisabled", "nzButtonStyle", "nzSize", "nzName"], exportAs: ["nzRadioGroup"] }, { kind: "directive", type: i3.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.FormlySelectOptionsPipe, name: "formlySelectOptions" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
68
68
  }
69
69
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: FormlyFieldRadio, decorators: [{
70
70
  type: Component,
71
71
  args: [{
72
72
  selector: 'formly-field-radio',
73
- template: `
74
- <nz-radio-group
75
- [formControl]="formControl"
76
- [formlyAttributes]="field"
77
- [nzName]="field.name ?? null"
78
- [nzSize]="props['size']!"
79
- [nzButtonStyle]="props['buttonStyle']!"
80
- >
81
- @if (props.type !== 'button') {
82
- @for (
83
- option of props.options | formlySelectOptions: field | async;
84
- track option;
85
- let i = $index
86
- ) {
87
- <label
88
- [id]="id + '_' + i"
89
- [nzDisabled]="option.disabled === true"
90
- [nzValue]="option.value"
91
- nz-radio
92
- >
93
- {{ option.label }}
94
- </label>
95
- }
96
- } @else {
97
- @for (
98
- option of props.options | formlySelectOptions: field | async;
99
- track option;
100
- let i = $index
101
- ) {
102
- <label
103
- [id]="id + '_' + i"
104
- [nzDisabled]="option.disabled === true"
105
- [nzValue]="option.value"
106
- nz-radio-button
107
- >
108
- {{ option.label }}
109
- </label>
110
- }
111
- }
112
- </nz-radio-group>
73
+ template: `
74
+ <nz-radio-group
75
+ [formControl]="formControl"
76
+ [formlyAttributes]="field"
77
+ [nzName]="field.name ?? null"
78
+ [nzSize]="props['size']!"
79
+ [nzButtonStyle]="props['buttonStyle']!"
80
+ >
81
+ @if (props.type !== 'button') {
82
+ @for (
83
+ option of props.options | formlySelectOptions: field | async;
84
+ track option;
85
+ let i = $index
86
+ ) {
87
+ <label
88
+ [id]="id + '_' + i"
89
+ [nzDisabled]="option.disabled === true"
90
+ [nzValue]="option.value"
91
+ nz-radio
92
+ >
93
+ {{ option.label }}
94
+ </label>
95
+ }
96
+ } @else {
97
+ @for (
98
+ option of props.options | formlySelectOptions: field | async;
99
+ track option;
100
+ let i = $index
101
+ ) {
102
+ <label
103
+ [id]="id + '_' + i"
104
+ [nzDisabled]="option.disabled === true"
105
+ [nzValue]="option.value"
106
+ nz-radio-button
107
+ >
108
+ {{ option.label }}
109
+ </label>
110
+ }
111
+ }
112
+ </nz-radio-group>
113
113
  `,
114
114
  changeDetection: ChangeDetectionStrategy.OnPush
115
115
  }]
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-formly-zorro-antd-radio.mjs","sources":["../../../../packages/formlyantd/radio/src/radio.type.ts","../../../../packages/formlyantd/radio/src/radio.module.ts","../../../../packages/formlyantd/radio/src/ngx-formly-zorro-antd-radio.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, Type } from '@angular/core';\r\nimport { FieldType, FieldTypeConfig } from '@ngx-formly/core';\r\nimport type { NzFormlyFieldConfig } from 'ngx-formly-zorro-antd/common';\r\nimport type { FormlyFieldProps } from 'ngx-formly-zorro-antd/form-field';\r\n\r\nimport type { FormlyFieldSelectProps } from '@ngx-formly/core/select';\r\nimport type { NzSizeLDSType } from 'ng-zorro-antd/core/types';\r\nimport type { NzRadioButtonStyle } from 'ng-zorro-antd/radio';\r\n\r\ninterface RadioProps extends FormlyFieldProps, FormlyFieldSelectProps {\r\n type?: 'button';\r\n\r\n /**\r\n * nz-radio-group 下所有 input[type=\"radio\"] 的 name 属性\r\n */\r\n name?: string | null;\r\n /**\r\n * 大小,只对按钮样式生效\r\n * @default default\r\n */\r\n size?: NzSizeLDSType;\r\n /**\r\n * RadioButton 的风格样式,目前有描边和填色两种风格\r\n * @default outline\r\n */\r\n buttonStyle?: NzRadioButtonStyle;\r\n}\r\n\r\nexport interface FormlyRadioFieldConfig extends NzFormlyFieldConfig<RadioProps> {\r\n type: 'radio' | Type<FormlyFieldRadio>;\r\n}\r\n\r\n@Component({\r\n selector: 'formly-field-radio',\r\n template: `\r\n <nz-radio-group\r\n [formControl]=\"formControl\"\r\n [formlyAttributes]=\"field\"\r\n [nzName]=\"field.name ?? null\"\r\n [nzSize]=\"props['size']!\"\r\n [nzButtonStyle]=\"props['buttonStyle']!\"\r\n >\r\n @if (props.type !== 'button') {\r\n @for (\r\n option of props.options | formlySelectOptions: field | async;\r\n track option;\r\n let i = $index\r\n ) {\r\n <label\r\n [id]=\"id + '_' + i\"\r\n [nzDisabled]=\"option.disabled === true\"\r\n [nzValue]=\"option.value\"\r\n nz-radio\r\n >\r\n {{ option.label }}\r\n </label>\r\n }\r\n } @else {\r\n @for (\r\n option of props.options | formlySelectOptions: field | async;\r\n track option;\r\n let i = $index\r\n ) {\r\n <label\r\n [id]=\"id + '_' + i\"\r\n [nzDisabled]=\"option.disabled === true\"\r\n [nzValue]=\"option.value\"\r\n nz-radio-button\r\n >\r\n {{ option.label }}\r\n </label>\r\n }\r\n }\r\n </nz-radio-group>\r\n `,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class FormlyFieldRadio extends FieldType<FieldTypeConfig<RadioProps>> {\r\n override defaultOptions = {\r\n props: {\r\n size: 'default' as const,\r\n buttonStyle: 'outline' as const\r\n }\r\n };\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\nimport { FormlyModule } from '@ngx-formly/core';\r\nimport { FormlySelectModule } from '@ngx-formly/core/select';\r\n\r\nimport { FormlyNzFormFieldModule } from 'ngx-formly-zorro-antd/form-field';\r\nimport { FormlyFieldRadio } from './radio.type';\r\n\r\nimport { NzFormModule } from 'ng-zorro-antd/form';\r\nimport { NzRadioModule } from 'ng-zorro-antd/radio';\r\n\r\n@NgModule({\r\n declarations: [FormlyFieldRadio],\r\n imports: [\r\n CommonModule,\r\n ReactiveFormsModule,\r\n FormlyNzFormFieldModule,\r\n FormlySelectModule,\r\n NzFormModule,\r\n\r\n NzRadioModule,\r\n FormlyModule.forChild({\r\n types: [\r\n {\r\n name: 'radio',\r\n component: FormlyFieldRadio,\r\n wrappers: ['form-field']\r\n }\r\n ]\r\n })\r\n ]\r\n})\r\nexport class FormlyNzRadioModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;AA6EM,MAAO,gBAAiB,SAAQ,SAAsC,CAAA;AA7C5E,IAAA,WAAA,GAAA;;AA8CW,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,IAAI,EAAE,SAAkB;AACxB,gBAAA,WAAW,EAAE,SAAkB;AAChC,aAAA;SACF,CAAC;AACH,KAAA;8GAPY,gBAAgB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAhB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,gBAAgB,EA3CjB,QAAA,EAAA,oBAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,E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,EAAE,CAAC,gBAAgB,CAAC;AAChC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,uBAAuB;wBACvB,kBAAkB;wBAClB,YAAY;wBAEZ,aAAa;wBACb,YAAY,CAAC,QAAQ,CAAC;AACpB,4BAAA,KAAK,EAAE;AACL,gCAAA;AACE,oCAAA,IAAI,EAAE,OAAO;AACb,oCAAA,SAAS,EAAE,gBAAgB;oCAC3B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;AChCD;;AAEG;;;;"}
1
+ {"version":3,"file":"ngx-formly-zorro-antd-radio.mjs","sources":["../../../../packages/formlyantd/radio/src/radio.type.ts","../../../../packages/formlyantd/radio/src/radio.module.ts","../../../../packages/formlyantd/radio/src/ngx-formly-zorro-antd-radio.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, Type } from '@angular/core';\nimport { FieldType, FieldTypeConfig } from '@ngx-formly/core';\nimport type { NzFormlyFieldConfig } from 'ngx-formly-zorro-antd/common';\nimport type { FormlyFieldProps } from 'ngx-formly-zorro-antd/form-field';\n\nimport type { FormlyFieldSelectProps } from '@ngx-formly/core/select';\nimport type { NzSizeLDSType } from 'ng-zorro-antd/core/types';\nimport type { NzRadioButtonStyle } from 'ng-zorro-antd/radio';\n\ninterface RadioProps extends FormlyFieldProps, FormlyFieldSelectProps {\n type?: 'button';\n\n /**\n * nz-radio-group 下所有 input[type=\"radio\"] 的 name 属性\n */\n name?: string | null;\n /**\n * 大小,只对按钮样式生效\n * @default default\n */\n size?: NzSizeLDSType;\n /**\n * RadioButton 的风格样式,目前有描边和填色两种风格\n * @default outline\n */\n buttonStyle?: NzRadioButtonStyle;\n}\n\nexport interface FormlyRadioFieldConfig extends NzFormlyFieldConfig<RadioProps> {\n type: 'radio' | Type<FormlyFieldRadio>;\n}\n\n@Component({\n selector: 'formly-field-radio',\n template: `\n <nz-radio-group\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [nzName]=\"field.name ?? null\"\n [nzSize]=\"props['size']!\"\n [nzButtonStyle]=\"props['buttonStyle']!\"\n >\n @if (props.type !== 'button') {\n @for (\n option of props.options | formlySelectOptions: field | async;\n track option;\n let i = $index\n ) {\n <label\n [id]=\"id + '_' + i\"\n [nzDisabled]=\"option.disabled === true\"\n [nzValue]=\"option.value\"\n nz-radio\n >\n {{ option.label }}\n </label>\n }\n } @else {\n @for (\n option of props.options | formlySelectOptions: field | async;\n track option;\n let i = $index\n ) {\n <label\n [id]=\"id + '_' + i\"\n [nzDisabled]=\"option.disabled === true\"\n [nzValue]=\"option.value\"\n nz-radio-button\n >\n {{ option.label }}\n </label>\n }\n }\n </nz-radio-group>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class FormlyFieldRadio extends FieldType<FieldTypeConfig<RadioProps>> {\n override defaultOptions = {\n props: {\n size: 'default' as const,\n buttonStyle: 'outline' as const\n }\n };\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { FormlySelectModule } from '@ngx-formly/core/select';\n\nimport { FormlyNzFormFieldModule } from 'ngx-formly-zorro-antd/form-field';\nimport { FormlyFieldRadio } from './radio.type';\n\nimport { NzFormModule } from 'ng-zorro-antd/form';\nimport { NzRadioModule } from 'ng-zorro-antd/radio';\n\n@NgModule({\n declarations: [FormlyFieldRadio],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n FormlyNzFormFieldModule,\n FormlySelectModule,\n NzFormModule,\n\n NzRadioModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'radio',\n component: FormlyFieldRadio,\n wrappers: ['form-field']\n }\n ]\n })\n ]\n})\nexport class FormlyNzRadioModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;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,uBAAuB;YACvB,kBAAkB;YAClB,YAAY;YAEZ,aAAa,EAAAA,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA,CAAA,EAAA;AAYJ,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,YAlB5B,YAAY;YACZ,mBAAmB;YACnB,uBAAuB;YACvB,kBAAkB;YAClB,YAAY;YAEZ,aAAa;YACb,YAAY,CAAC,QAAQ,CAAC;AACpB,gBAAA,KAAK,EAAE;AACL,oBAAA;AACE,wBAAA,IAAI,EAAE,OAAO;AACb,wBAAA,SAAS,EAAE,gBAAgB;wBAC3B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,qBAAA;AACF,iBAAA;aACF,CAAC,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGO,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBArB/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,gBAAgB,CAAC;AAChC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,uBAAuB;wBACvB,kBAAkB;wBAClB,YAAY;wBAEZ,aAAa;wBACb,YAAY,CAAC,QAAQ,CAAC;AACpB,4BAAA,KAAK,EAAE;AACL,gCAAA;AACE,oCAAA,IAAI,EAAE,OAAO;AACb,oCAAA,SAAS,EAAE,gBAAgB;oCAC3B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;AChCD;;AAEG;;;;"}
@@ -23,44 +23,44 @@ class FormlyFieldRate extends FieldType {
23
23
  };
24
24
  }
25
25
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: FormlyFieldRate, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
26
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.9", type: FormlyFieldRate, selector: "formly-field-rate", usesInheritance: true, ngImport: i0, template: `
27
- <nz-rate
28
- [formControl]="formControl"
29
- [formlyAttributes]="field"
30
- [nzAllowClear]="props['allowClear']!!"
31
- [nzAllowHalf]="props['allowHalf']!!"
32
- [nzAutoFocus]="props['autoFocus']!!"
33
- [nzCharacter]="props['character']!"
34
- [nzCount]="props['count']"
35
- [nzTooltips]="props['tooltips']!"
36
- (ngModelChange)="props.change && props.change(field, $event)"
37
- (nzOnBlur)="props.blur && props.blur(field, $event)"
38
- (nzOnFocus)="props.focus && props.focus(field, $event)"
39
- (nzOnHoverChange)="props['hoverChange'] && props['hoverChange'](field, $event)"
40
- (nzOnKeyDown)="props.keydown && props.keydown(field, $event)"
41
- ></nz-rate>
26
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.9", type: FormlyFieldRate, selector: "formly-field-rate", usesInheritance: true, ngImport: i0, template: `
27
+ <nz-rate
28
+ [formControl]="formControl"
29
+ [formlyAttributes]="field"
30
+ [nzAllowClear]="props['allowClear']!!"
31
+ [nzAllowHalf]="props['allowHalf']!!"
32
+ [nzAutoFocus]="props['autoFocus']!!"
33
+ [nzCharacter]="props['character']!"
34
+ [nzCount]="props['count']"
35
+ [nzTooltips]="props['tooltips']!"
36
+ (ngModelChange)="props.change && props.change(field, $event)"
37
+ (nzOnBlur)="props.blur && props.blur(field, $event)"
38
+ (nzOnFocus)="props.focus && props.focus(field, $event)"
39
+ (nzOnHoverChange)="props['hoverChange'] && props['hoverChange'](field, $event)"
40
+ (nzOnKeyDown)="props.keydown && props.keydown(field, $event)"
41
+ ></nz-rate>
42
42
  `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i2.NzRateComponent, selector: "nz-rate", inputs: ["nzAllowClear", "nzAllowHalf", "nzDisabled", "nzAutoFocus", "nzCharacter", "nzCount", "nzTooltips"], outputs: ["nzOnBlur", "nzOnFocus", "nzOnHoverChange", "nzOnKeyDown"], exportAs: ["nzRate"] }, { kind: "directive", type: i3.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
43
43
  }
44
44
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: FormlyFieldRate, decorators: [{
45
45
  type: Component,
46
46
  args: [{
47
47
  selector: 'formly-field-rate',
48
- template: `
49
- <nz-rate
50
- [formControl]="formControl"
51
- [formlyAttributes]="field"
52
- [nzAllowClear]="props['allowClear']!!"
53
- [nzAllowHalf]="props['allowHalf']!!"
54
- [nzAutoFocus]="props['autoFocus']!!"
55
- [nzCharacter]="props['character']!"
56
- [nzCount]="props['count']"
57
- [nzTooltips]="props['tooltips']!"
58
- (ngModelChange)="props.change && props.change(field, $event)"
59
- (nzOnBlur)="props.blur && props.blur(field, $event)"
60
- (nzOnFocus)="props.focus && props.focus(field, $event)"
61
- (nzOnHoverChange)="props['hoverChange'] && props['hoverChange'](field, $event)"
62
- (nzOnKeyDown)="props.keydown && props.keydown(field, $event)"
63
- ></nz-rate>
48
+ template: `
49
+ <nz-rate
50
+ [formControl]="formControl"
51
+ [formlyAttributes]="field"
52
+ [nzAllowClear]="props['allowClear']!!"
53
+ [nzAllowHalf]="props['allowHalf']!!"
54
+ [nzAutoFocus]="props['autoFocus']!!"
55
+ [nzCharacter]="props['character']!"
56
+ [nzCount]="props['count']"
57
+ [nzTooltips]="props['tooltips']!"
58
+ (ngModelChange)="props.change && props.change(field, $event)"
59
+ (nzOnBlur)="props.blur && props.blur(field, $event)"
60
+ (nzOnFocus)="props.focus && props.focus(field, $event)"
61
+ (nzOnHoverChange)="props['hoverChange'] && props['hoverChange'](field, $event)"
62
+ (nzOnKeyDown)="props.keydown && props.keydown(field, $event)"
63
+ ></nz-rate>
64
64
  `,
65
65
  changeDetection: ChangeDetectionStrategy.OnPush
66
66
  }]
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-formly-zorro-antd-rate.mjs","sources":["../../../../packages/formlyantd/rate/src/rate.type.ts","../../../../packages/formlyantd/rate/src/rate.module.ts","../../../../packages/formlyantd/rate/src/ngx-formly-zorro-antd-rate.ts"],"sourcesContent":["import { Component, TemplateRef, Type, ChangeDetectionStrategy } from '@angular/core';\r\nimport { FieldType, FieldTypeConfig } from '@ngx-formly/core';\r\nimport type { NzFormlyFieldConfig, FormlyAttributeEvent } from 'ngx-formly-zorro-antd/common';\r\nimport type { FormlyFieldProps } from 'ngx-formly-zorro-antd/form-field';\r\n\r\ninterface RateProps extends FormlyFieldProps {\r\n /**\r\n * 是否允许再次点击后清除\r\n * @default true\r\n */\r\n allowClear?: boolean;\r\n\r\n /**\r\n * 是否允许半选\r\n * @default false\r\n */\r\n allowHalf?: boolean;\r\n\r\n /**\r\n * 自动获取焦点\r\n * @default false\r\n */\r\n autoFocus?: boolean;\r\n\r\n /**\r\n * 自定义字符\r\n * @default <span nz-icon nzType=\"star\"></span>\r\n */\r\n character?: TemplateRef<{\r\n $implicit: number;\r\n }>;\r\n\r\n /**\r\n * star 总数\r\n * @default 5\r\n */\r\n count?: number;\r\n\r\n /**\r\n * 自定义每项的提示信息\r\n * @default []\r\n */\r\n tooltips?: string[];\r\n\r\n /**\r\n * 鼠标经过时数值变化的回调\r\n */\r\n hoverChange?: FormlyAttributeEvent<number | undefined>;\r\n}\r\n\r\nexport interface FormlyRateFieldConfig extends NzFormlyFieldConfig<RateProps> {\r\n type: 'rate' | Type<FormlyFieldRate>;\r\n}\r\n\r\n@Component({\r\n selector: 'formly-field-rate',\r\n template: `\r\n <nz-rate\r\n [formControl]=\"formControl\"\r\n [formlyAttributes]=\"field\"\r\n [nzAllowClear]=\"props['allowClear']!!\"\r\n [nzAllowHalf]=\"props['allowHalf']!!\"\r\n [nzAutoFocus]=\"props['autoFocus']!!\"\r\n [nzCharacter]=\"props['character']!\"\r\n [nzCount]=\"props['count']\"\r\n [nzTooltips]=\"props['tooltips']!\"\r\n (ngModelChange)=\"props.change && props.change(field, $event)\"\r\n (nzOnBlur)=\"props.blur && props.blur(field, $event)\"\r\n (nzOnFocus)=\"props.focus && props.focus(field, $event)\"\r\n (nzOnHoverChange)=\"props['hoverChange'] && props['hoverChange'](field, $event)\"\r\n (nzOnKeyDown)=\"props.keydown && props.keydown(field, $event)\"\r\n ></nz-rate>\r\n `,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class FormlyFieldRate extends FieldType<FieldTypeConfig<RateProps>> {\r\n override defaultOptions = {\r\n props: {\r\n allowClear: true,\r\n allowHalf: false,\r\n autoFocus: false,\r\n count: 5,\r\n tooltips: []\r\n }\r\n };\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\nimport { FormlyModule } from '@ngx-formly/core';\r\nimport { FormlyNzFormFieldModule } from 'ngx-formly-zorro-antd/form-field';\r\n\r\nimport { NzRateModule } from 'ng-zorro-antd/rate';\r\n\r\nimport { FormlyFieldRate } from './rate.type';\r\n\r\n@NgModule({\r\n declarations: [FormlyFieldRate],\r\n imports: [\r\n CommonModule,\r\n ReactiveFormsModule,\r\n FormlyNzFormFieldModule,\r\n NzRateModule,\r\n\r\n FormlyModule.forChild({\r\n types: [\r\n {\r\n name: 'rate',\r\n component: FormlyFieldRate,\r\n wrappers: ['form-field']\r\n }\r\n ]\r\n })\r\n ]\r\n})\r\nexport class FormlyNzRateModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;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;AACL,oBAAA;AACE,wBAAA,IAAI,EAAE,MAAM;AACZ,wBAAA,SAAS,EAAE,eAAe;wBAC1B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,qBAAA;AACF,iBAAA;aACF,CAAC,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGO,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAnB9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,eAAe,CAAC;AAC/B,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,uBAAuB;wBACvB,YAAY;wBAEZ,YAAY,CAAC,QAAQ,CAAC;AACpB,4BAAA,KAAK,EAAE;AACL,gCAAA;AACE,oCAAA,IAAI,EAAE,MAAM;AACZ,oCAAA,SAAS,EAAE,eAAe;oCAC1B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;AC5BD;;AAEG;;;;"}
1
+ {"version":3,"file":"ngx-formly-zorro-antd-rate.mjs","sources":["../../../../packages/formlyantd/rate/src/rate.type.ts","../../../../packages/formlyantd/rate/src/rate.module.ts","../../../../packages/formlyantd/rate/src/ngx-formly-zorro-antd-rate.ts"],"sourcesContent":["import { Component, TemplateRef, Type, ChangeDetectionStrategy } from '@angular/core';\nimport { FieldType, FieldTypeConfig } from '@ngx-formly/core';\nimport type { NzFormlyFieldConfig, FormlyAttributeEvent } from 'ngx-formly-zorro-antd/common';\nimport type { FormlyFieldProps } from 'ngx-formly-zorro-antd/form-field';\n\ninterface RateProps extends FormlyFieldProps {\n /**\n * 是否允许再次点击后清除\n * @default true\n */\n allowClear?: boolean;\n\n /**\n * 是否允许半选\n * @default false\n */\n allowHalf?: boolean;\n\n /**\n * 自动获取焦点\n * @default false\n */\n autoFocus?: boolean;\n\n /**\n * 自定义字符\n * @default <span nz-icon nzType=\"star\"></span>\n */\n character?: TemplateRef<{\n $implicit: number;\n }>;\n\n /**\n * star 总数\n * @default 5\n */\n count?: number;\n\n /**\n * 自定义每项的提示信息\n * @default []\n */\n tooltips?: string[];\n\n /**\n * 鼠标经过时数值变化的回调\n */\n hoverChange?: FormlyAttributeEvent<number | undefined>;\n}\n\nexport interface FormlyRateFieldConfig extends NzFormlyFieldConfig<RateProps> {\n type: 'rate' | Type<FormlyFieldRate>;\n}\n\n@Component({\n selector: 'formly-field-rate',\n template: `\n <nz-rate\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [nzAllowClear]=\"props['allowClear']!!\"\n [nzAllowHalf]=\"props['allowHalf']!!\"\n [nzAutoFocus]=\"props['autoFocus']!!\"\n [nzCharacter]=\"props['character']!\"\n [nzCount]=\"props['count']\"\n [nzTooltips]=\"props['tooltips']!\"\n (ngModelChange)=\"props.change && props.change(field, $event)\"\n (nzOnBlur)=\"props.blur && props.blur(field, $event)\"\n (nzOnFocus)=\"props.focus && props.focus(field, $event)\"\n (nzOnHoverChange)=\"props['hoverChange'] && props['hoverChange'](field, $event)\"\n (nzOnKeyDown)=\"props.keydown && props.keydown(field, $event)\"\n ></nz-rate>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class FormlyFieldRate extends FieldType<FieldTypeConfig<RateProps>> {\n override defaultOptions = {\n props: {\n allowClear: true,\n allowHalf: false,\n autoFocus: false,\n count: 5,\n tooltips: []\n }\n };\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { FormlyNzFormFieldModule } from 'ngx-formly-zorro-antd/form-field';\n\nimport { NzRateModule } from 'ng-zorro-antd/rate';\n\nimport { FormlyFieldRate } from './rate.type';\n\n@NgModule({\n declarations: [FormlyFieldRate],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n FormlyNzFormFieldModule,\n NzRateModule,\n\n FormlyModule.forChild({\n types: [\n {\n name: 'rate',\n component: FormlyFieldRate,\n wrappers: ['form-field']\n }\n ]\n })\n ]\n})\nexport class FormlyNzRateModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;AA2EM,MAAO,eAAgB,SAAQ,SAAqC,CAAA;AArB1E,IAAA,WAAA,GAAA;;AAsBW,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,UAAU,EAAE,IAAI;AAChB,gBAAA,SAAS,EAAE,KAAK;AAChB,gBAAA,SAAS,EAAE,KAAK;AAChB,gBAAA,KAAK,EAAE,CAAC;AACR,gBAAA,QAAQ,EAAE,EAAE;AACb,aAAA;SACF,CAAC;AACH,KAAA;8GAVY,eAAe,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAf,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,eAAe,EAnBhB,QAAA,EAAA,mBAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;;;;;;;;;;;;;;AAgBT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,eAAA,EAAA,QAAA,EAAA,2CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,oBAAA,EAAA,QAAA,EAAA,eAAA,EAAA,MAAA,EAAA,CAAA,aAAA,EAAA,UAAA,EAAA,SAAA,CAAA,EAAA,OAAA,EAAA,CAAA,eAAA,CAAA,EAAA,QAAA,EAAA,CAAA,QAAA,CAAA,EAAA,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,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,YAhB3B,YAAY;YACZ,mBAAmB;YACnB,uBAAuB;YACvB,YAAY;YAEZ,YAAY,CAAC,QAAQ,CAAC;AACpB,gBAAA,KAAK,EAAE;AACL,oBAAA;AACE,wBAAA,IAAI,EAAE,MAAM;AACZ,wBAAA,SAAS,EAAE,eAAe;wBAC1B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,qBAAA;AACF,iBAAA;aACF,CAAC,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGO,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAnB9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,eAAe,CAAC;AAC/B,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,uBAAuB;wBACvB,YAAY;wBAEZ,YAAY,CAAC,QAAQ,CAAC;AACpB,4BAAA,KAAK,EAAE;AACL,gCAAA;AACE,oCAAA,IAAI,EAAE,MAAM;AACZ,oCAAA,SAAS,EAAE,eAAe;oCAC1B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;AC5BD;;AAEG;;;;"}
@@ -71,20 +71,20 @@ class FormlyFieldRefTemplate extends FieldType {
71
71
  return resolveTplName(this.props, this.fieldTemplates, 'ref');
72
72
  }
73
73
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: FormlyFieldRefTemplate, deps: [{ token: i1.FormlyBoxTemplates, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
74
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.9", type: FormlyFieldRefTemplate, selector: "formly-ref-template", usesInheritance: true, ngImport: i0, template: `
75
- <ng-container *nzStringTemplateOutlet="ref; context: { $implicit: field, props: props }">
76
- <div [innerHTML]="$any(ref) | trustedHtml"></div>
77
- </ng-container>
74
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.9", type: FormlyFieldRefTemplate, selector: "formly-ref-template", usesInheritance: true, ngImport: i0, template: `
75
+ <ng-container *nzStringTemplateOutlet="ref; context: { $implicit: field, props: props }">
76
+ <div [innerHTML]="$any(ref) | trustedHtml"></div>
77
+ </ng-container>
78
78
  `, isInline: true, dependencies: [{ kind: "directive", type: i2.NzStringTemplateOutletDirective, selector: "[nzStringTemplateOutlet]", inputs: ["nzStringTemplateOutletContext", "nzStringTemplateOutlet"], exportAs: ["nzStringTemplateOutlet"] }, { kind: "pipe", type: i3.TrustedHtmlPipe, name: "trustedHtml" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
79
79
  }
80
80
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: FormlyFieldRefTemplate, decorators: [{
81
81
  type: Component,
82
82
  args: [{
83
83
  selector: 'formly-ref-template',
84
- template: `
85
- <ng-container *nzStringTemplateOutlet="ref; context: { $implicit: field, props: props }">
86
- <div [innerHTML]="$any(ref) | trustedHtml"></div>
87
- </ng-container>
84
+ template: `
85
+ <ng-container *nzStringTemplateOutlet="ref; context: { $implicit: field, props: props }">
86
+ <div [innerHTML]="$any(ref) | trustedHtml"></div>
87
+ </ng-container>
88
88
  `,
89
89
  changeDetection: ChangeDetectionStrategy.OnPush
90
90
  }]
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-formly-zorro-antd-ref-template.mjs","sources":["../../../../packages/formlyantd/ref-template/src/ref-template.type.ts","../../../../packages/formlyantd/ref-template/src/ref-template.module.ts","../../../../packages/formlyantd/ref-template/src/ngx-formly-zorro-antd-ref-template.ts"],"sourcesContent":["import { Component, TemplateRef, Optional, Type, ChangeDetectionStrategy } from '@angular/core';\r\nimport { FieldType, FieldTypeConfig } from '@ngx-formly/core';\r\nimport type { FormlyFieldProps } from 'ngx-formly-zorro-antd/form-field';\r\nimport type { NzFormlyFieldConfig } from 'ngx-formly-zorro-antd/common';\r\nimport { FormlyBoxTemplates, resolveTplName } from 'ngx-formly-zorro-antd/common';\r\n\r\ninterface RefTemplateProps extends FormlyFieldProps {\r\n ref?: string | TemplateRef<{ $implicit: FormlyRefTemplateFieldConfig; props: RefTemplateProps }>;\r\n refName?: string;\r\n}\r\n\r\n/**\r\n * RefTemplate 配置\r\n */\r\nexport interface FormlyRefTemplateFieldConfig extends NzFormlyFieldConfig<RefTemplateProps> {\r\n type: 'ref-template' | Type<FormlyFieldRefTemplate>;\r\n}\r\n\r\n/**\r\n * 引用模板,支持HTML,TemplateRef对象,或者NamedTemplate\r\n * @example\r\n *\r\n * 用法1: 使用NamedTemplate(推荐)\r\n *\r\n * html\r\n * ```html\r\n * <formly-form formly-box>\r\n * <ng-template named=\"test\"></ng-template>\r\n * </formly-form>\r\n * ```\r\n *\r\n * 配置\r\n * ```js\r\n * {\r\n * type: 'ref-template',\r\n * props: {\r\n * refName: 'test'\r\n * }\r\n * }\r\n * ```\r\n *\r\n * 用法2:TemplateRef对象\r\n * ```html\r\n * <ng-template #test2></ng-template>\r\n * ```\r\n *\r\n * 配置\r\n * @viewChild('test2') test2: TemplateRef<{}>;\r\n *\r\n * ```js\r\n * {\r\n * type: 'ref-template',\r\n * props: {\r\n * ref: this.test2\r\n * }\r\n * }\r\n * ```\r\n *\r\n * 用法3: 使用html\r\n *\r\n * 配置\r\n * ```js\r\n * {\r\n * type: 'ref-template',\r\n * props: {\r\n * ref: '<div>test text</div>'\r\n * }\r\n * }\r\n * ```\r\n */\r\n@Component({\r\n selector: 'formly-ref-template',\r\n template: `\r\n <ng-container *nzStringTemplateOutlet=\"ref; context: { $implicit: field, props: props }\">\r\n <div [innerHTML]=\"$any(ref) | trustedHtml\"></div>\r\n </ng-container>\r\n `,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class FormlyFieldRefTemplate extends FieldType<FieldTypeConfig<RefTemplateProps>> {\r\n constructor(@Optional() public fieldTemplates: FormlyBoxTemplates) {\r\n super();\r\n }\r\n\r\n get ref() {\r\n return resolveTplName(this.props, this.fieldTemplates, 'ref');\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormlyModule } from '@ngx-formly/core';\r\nimport { NzOutletModule } from 'ng-zorro-antd/core/outlet';\r\n\r\nimport { TrustedHtmlPipe } from '@pkt/ng.core';\r\nimport { FormlyFieldRefTemplate } from './ref-template.type';\r\n\r\n@NgModule({\r\n declarations: [FormlyFieldRefTemplate],\r\n imports: [\r\n CommonModule,\r\n NzOutletModule,\r\n TrustedHtmlPipe,\r\n FormlyModule.forChild({\r\n types: [\r\n {\r\n name: 'ref-template',\r\n component: FormlyFieldRefTemplate\r\n }\r\n ]\r\n })\r\n ]\r\n})\r\nexport class FormlyRefTemplateModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;AAkBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmDG;AAUG,MAAO,sBAAuB,SAAQ,SAA4C,CAAA;AACtF,IAAA,WAAA,CAA+B,cAAkC,EAAA;AAC/D,QAAA,KAAK,EAAE,CAAC;QADqB,IAAc,CAAA,cAAA,GAAd,cAAc,CAAoB;KAEhE;AAED,IAAA,IAAI,GAAG,GAAA;AACL,QAAA,OAAO,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;KAC/D;8GAPU,sBAAsB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,kBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAtB,IAAA,SAAA,IAA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AAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,uBAAuB,YAbhC,YAAY;YACZ,cAAc;YAEd,YAAY,CAAC,QAAQ,CAAC;AACpB,gBAAA,KAAK,EAAE;AACL,oBAAA;AACE,wBAAA,IAAI,EAAE,cAAc;AACpB,wBAAA,SAAS,EAAE,sBAAsB;AAClC,qBAAA;AACF,iBAAA;aACF,CAAC,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGO,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAhBnC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,sBAAsB,CAAC;AACtC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,cAAc;wBACd,eAAe;wBACf,YAAY,CAAC,QAAQ,CAAC;AACpB,4BAAA,KAAK,EAAE;AACL,gCAAA;AACE,oCAAA,IAAI,EAAE,cAAc;AACpB,oCAAA,SAAS,EAAE,sBAAsB;AAClC,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;ACvBD;;AAEG;;;;"}
1
+ {"version":3,"file":"ngx-formly-zorro-antd-ref-template.mjs","sources":["../../../../packages/formlyantd/ref-template/src/ref-template.type.ts","../../../../packages/formlyantd/ref-template/src/ref-template.module.ts","../../../../packages/formlyantd/ref-template/src/ngx-formly-zorro-antd-ref-template.ts"],"sourcesContent":["import { Component, TemplateRef, Optional, Type, ChangeDetectionStrategy } from '@angular/core';\nimport { FieldType, FieldTypeConfig } from '@ngx-formly/core';\nimport type { FormlyFieldProps } from 'ngx-formly-zorro-antd/form-field';\nimport type { NzFormlyFieldConfig } from 'ngx-formly-zorro-antd/common';\nimport { FormlyBoxTemplates, resolveTplName } from 'ngx-formly-zorro-antd/common';\n\ninterface RefTemplateProps extends FormlyFieldProps {\n ref?: string | TemplateRef<{ $implicit: FormlyRefTemplateFieldConfig; props: RefTemplateProps }>;\n refName?: string;\n}\n\n/**\n * RefTemplate 配置\n */\nexport interface FormlyRefTemplateFieldConfig extends NzFormlyFieldConfig<RefTemplateProps> {\n type: 'ref-template' | Type<FormlyFieldRefTemplate>;\n}\n\n/**\n * 引用模板,支持HTML,TemplateRef对象,或者NamedTemplate\n * @example\n *\n * 用法1: 使用NamedTemplate(推荐)\n *\n * html\n * ```html\n * <formly-form formly-box>\n * <ng-template named=\"test\"></ng-template>\n * </formly-form>\n * ```\n *\n * 配置\n * ```js\n * {\n * type: 'ref-template',\n * props: {\n * refName: 'test'\n * }\n * }\n * ```\n *\n * 用法2:TemplateRef对象\n * ```html\n * <ng-template #test2></ng-template>\n * ```\n *\n * 配置\n * @viewChild('test2') test2: TemplateRef<{}>;\n *\n * ```js\n * {\n * type: 'ref-template',\n * props: {\n * ref: this.test2\n * }\n * }\n * ```\n *\n * 用法3: 使用html\n *\n * 配置\n * ```js\n * {\n * type: 'ref-template',\n * props: {\n * ref: '<div>test text</div>'\n * }\n * }\n * ```\n */\n@Component({\n selector: 'formly-ref-template',\n template: `\n <ng-container *nzStringTemplateOutlet=\"ref; context: { $implicit: field, props: props }\">\n <div [innerHTML]=\"$any(ref) | trustedHtml\"></div>\n </ng-container>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class FormlyFieldRefTemplate extends FieldType<FieldTypeConfig<RefTemplateProps>> {\n constructor(@Optional() public fieldTemplates: FormlyBoxTemplates) {\n super();\n }\n\n get ref() {\n return resolveTplName(this.props, this.fieldTemplates, 'ref');\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { NzOutletModule } from 'ng-zorro-antd/core/outlet';\n\nimport { TrustedHtmlPipe } from '@pkt/ng.core';\nimport { FormlyFieldRefTemplate } from './ref-template.type';\n\n@NgModule({\n declarations: [FormlyFieldRefTemplate],\n imports: [\n CommonModule,\n NzOutletModule,\n TrustedHtmlPipe,\n FormlyModule.forChild({\n types: [\n {\n name: 'ref-template',\n component: FormlyFieldRefTemplate\n }\n ]\n })\n ]\n})\nexport class FormlyRefTemplateModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;AAkBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmDG;AAUG,MAAO,sBAAuB,SAAQ,SAA4C,CAAA;AACtF,IAAA,WAAA,CAA+B,cAAkC,EAAA;AAC/D,QAAA,KAAK,EAAE,CAAC;QADqB,IAAc,CAAA,cAAA,GAAd,cAAc,CAAoB;KAEhE;AAED,IAAA,IAAI,GAAG,GAAA;AACL,QAAA,OAAO,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;KAC/D;8GAPU,sBAAsB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,kBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAtB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,sBAAsB,EAPvB,QAAA,EAAA,qBAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;;AAIT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,+BAAA,EAAA,QAAA,EAAA,0BAAA,EAAA,MAAA,EAAA,CAAA,+BAAA,EAAA,wBAAA,CAAA,EAAA,QAAA,EAAA,C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