@silver-formily/element-plus 2.1.0 → 2.3.0

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 (177) hide show
  1. package/LICENSE +21 -21
  2. package/README.en-US.md +32 -32
  3. package/README.md +32 -32
  4. package/esm/__builtins__/configs/index.mjs.map +1 -1
  5. package/esm/__builtins__/index.mjs +19 -23
  6. package/esm/__builtins__/index.mjs.map +1 -1
  7. package/esm/__builtins__/shared/index.d.ts +0 -1
  8. package/esm/__builtins__/shared/index.mjs +17 -21
  9. package/esm/__builtins__/shared/index.mjs.map +1 -1
  10. package/esm/__builtins__/shared/loading.mjs +5 -5
  11. package/esm/__builtins__/shared/loading.mjs.map +1 -1
  12. package/esm/__builtins__/shared/simple-version-compare.mjs.map +1 -1
  13. package/esm/__builtins__/shared/transform-component.mjs.map +1 -1
  14. package/esm/__builtins__/shared/use-enter-submit.d.ts +9 -0
  15. package/esm/__builtins__/shared/use-enter-submit.mjs +25 -0
  16. package/esm/__builtins__/shared/use-enter-submit.mjs.map +1 -0
  17. package/esm/__builtins__/shared/utils.mjs.map +1 -1
  18. package/esm/array-base/index.mjs +18 -21
  19. package/esm/array-base/index.mjs.map +1 -1
  20. package/esm/array-base/symbols.mjs.map +1 -1
  21. package/esm/array-base/utils.mjs +29 -33
  22. package/esm/array-base/utils.mjs.map +1 -1
  23. package/esm/array-cards/index.mjs +29 -31
  24. package/esm/array-cards/index.mjs.map +1 -1
  25. package/esm/array-collapse/index.mjs +35 -36
  26. package/esm/array-collapse/index.mjs.map +1 -1
  27. package/esm/array-collapse/utils.mjs +2 -8
  28. package/esm/array-collapse/utils.mjs.map +1 -1
  29. package/esm/array-items/index.mjs +30 -33
  30. package/esm/array-items/index.mjs.map +1 -1
  31. package/esm/array-list-tabs/index.mjs +27 -28
  32. package/esm/array-list-tabs/index.mjs.map +1 -1
  33. package/esm/array-list-tabs/utils.mjs +5 -11
  34. package/esm/array-list-tabs/utils.mjs.map +1 -1
  35. package/esm/array-table/index.mjs +52 -53
  36. package/esm/array-table/index.mjs.map +1 -1
  37. package/esm/array-table/utils.mjs +12 -18
  38. package/esm/array-table/utils.mjs.map +1 -1
  39. package/esm/array-tabs/index.mjs +17 -19
  40. package/esm/array-tabs/index.mjs.map +1 -1
  41. package/esm/autocomplete/autocomplete.d.ts +1222 -0
  42. package/esm/autocomplete/index.d.ts +639 -0
  43. package/esm/autocomplete/index.mjs +110 -0
  44. package/esm/autocomplete/index.mjs.map +1 -0
  45. package/esm/cascader/index.mjs +17 -20
  46. package/esm/cascader/index.mjs.map +1 -1
  47. package/esm/checkbox/index.d.ts +42 -42
  48. package/esm/checkbox/index.mjs +16 -19
  49. package/esm/checkbox/index.mjs.map +1 -1
  50. package/esm/color-picker/index.d.ts +210 -0
  51. package/esm/color-picker/index.mjs +14 -0
  52. package/esm/color-picker/index.mjs.map +1 -0
  53. package/esm/color-picker-panel/index.d.ts +129 -0
  54. package/esm/color-picker-panel/index.mjs +22 -0
  55. package/esm/color-picker-panel/index.mjs.map +1 -0
  56. package/esm/date-picker/index.mjs +11 -35
  57. package/esm/date-picker/index.mjs.map +1 -1
  58. package/esm/date-picker/utils.d.ts +4 -0
  59. package/esm/date-picker/utils.mjs +27 -0
  60. package/esm/date-picker/utils.mjs.map +1 -0
  61. package/esm/date-picker-panel/index.d.ts +143 -0
  62. package/esm/date-picker-panel/index.mjs +27 -0
  63. package/esm/date-picker-panel/index.mjs.map +1 -0
  64. package/esm/editable/index.mjs +48 -50
  65. package/esm/editable/index.mjs.map +1 -1
  66. package/esm/env.d.mjs +2 -0
  67. package/esm/env.d.mjs.map +1 -0
  68. package/esm/form/form.mjs +6 -6
  69. package/esm/form/form.mjs.map +1 -1
  70. package/esm/form-button-group/form-button-group.d.ts +1 -1
  71. package/esm/form-button-group/index.d.ts +3 -3
  72. package/esm/form-button-group/index.mjs +23 -26
  73. package/esm/form-button-group/index.mjs.map +1 -1
  74. package/esm/form-button-group/utils.mjs +2 -8
  75. package/esm/form-button-group/utils.mjs.map +1 -1
  76. package/esm/form-collapse/index.mjs +18 -20
  77. package/esm/form-collapse/index.mjs.map +1 -1
  78. package/esm/form-collapse/utils.mjs.map +1 -1
  79. package/esm/form-dialog/dialog-content.d.ts +789 -3
  80. package/esm/form-dialog/index.mjs +98 -87
  81. package/esm/form-dialog/index.mjs.map +1 -1
  82. package/esm/form-dialog/types.d.ts +1 -0
  83. package/esm/form-drawer/drawer-content.d.ts +919 -3
  84. package/esm/form-drawer/index.mjs +92 -82
  85. package/esm/form-drawer/index.mjs.map +1 -1
  86. package/esm/form-drawer/types.d.ts +1 -0
  87. package/esm/form-grid/hooks.mjs.map +1 -1
  88. package/esm/form-grid/index.mjs +20 -23
  89. package/esm/form-grid/index.mjs.map +1 -1
  90. package/esm/form-item/index.mjs +59 -57
  91. package/esm/form-item/index.mjs.map +1 -1
  92. package/esm/form-item/utils.mjs.map +1 -1
  93. package/esm/form-layout/form-layout.mjs +14 -18
  94. package/esm/form-layout/form-layout.mjs.map +1 -1
  95. package/esm/form-layout/utils.mjs +19 -24
  96. package/esm/form-layout/utils.mjs.map +1 -1
  97. package/esm/form-step/index.mjs +24 -26
  98. package/esm/form-step/index.mjs.map +1 -1
  99. package/esm/form-step/utils.mjs.map +1 -1
  100. package/esm/form-tab/hooks.mjs.map +1 -1
  101. package/esm/form-tab/index.mjs +19 -20
  102. package/esm/form-tab/index.mjs.map +1 -1
  103. package/esm/form-tab/utils.mjs.map +1 -1
  104. package/esm/index.d.ts +9 -0
  105. package/esm/index.mjs +90 -72
  106. package/esm/index.mjs.map +1 -1
  107. package/esm/input/index.mjs +20 -23
  108. package/esm/input/index.mjs.map +1 -1
  109. package/esm/input-number/index.d.ts +21 -21
  110. package/esm/input-number/index.mjs +7 -9
  111. package/esm/input-number/index.mjs.map +1 -1
  112. package/esm/input-tag/index.d.ts +32 -0
  113. package/esm/input-tag/index.mjs +46 -0
  114. package/esm/input-tag/index.mjs.map +1 -0
  115. package/esm/input-tag/input-tag.d.ts +32 -0
  116. package/esm/mention/index.d.ts +50 -0
  117. package/esm/mention/index.mjs +93 -0
  118. package/esm/mention/index.mjs.map +1 -0
  119. package/esm/mention/mention.d.ts +51 -0
  120. package/esm/pagination/components/jumper.mjs.map +1 -1
  121. package/esm/pagination/components/next.mjs.map +1 -1
  122. package/esm/pagination/components/pager.mjs.map +1 -1
  123. package/esm/pagination/components/prev.mjs.map +1 -1
  124. package/esm/pagination/components/total.mjs.map +1 -1
  125. package/esm/pagination/pagination.mjs.map +1 -1
  126. package/esm/password/index.mjs.map +1 -1
  127. package/esm/preview-text/color-picker.d.ts +5 -0
  128. package/esm/preview-text/index.d.ts +10 -0
  129. package/esm/preview-text/index.mjs +175 -119
  130. package/esm/preview-text/index.mjs.map +1 -1
  131. package/esm/preview-text/rate.d.ts +5 -0
  132. package/esm/preview-text/utils.d.ts +5 -5
  133. package/esm/preview-text/utils.mjs.map +1 -1
  134. package/esm/radio/index.d.ts +36 -36
  135. package/esm/radio/index.mjs +25 -28
  136. package/esm/radio/index.mjs.map +1 -1
  137. package/esm/rate/index.d.ts +187 -0
  138. package/esm/rate/index.mjs +14 -0
  139. package/esm/rate/index.mjs.map +1 -0
  140. package/esm/reset/index.mjs.map +1 -1
  141. package/esm/segmented/index.d.ts +26 -0
  142. package/esm/segmented/index.mjs +37 -0
  143. package/esm/segmented/index.mjs.map +1 -0
  144. package/esm/segmented/segmented.d.ts +25 -0
  145. package/esm/select/index.mjs +16 -19
  146. package/esm/select/index.mjs.map +1 -1
  147. package/esm/select-table/index.mjs +12 -15
  148. package/esm/select-table/index.mjs.map +1 -1
  149. package/esm/shared/overlay-elements.d.ts +6 -0
  150. package/esm/shared/overlay-elements.mjs +16 -0
  151. package/esm/shared/overlay-elements.mjs.map +1 -0
  152. package/esm/slider/index.d.ts +177 -0
  153. package/esm/slider/index.mjs +14 -0
  154. package/esm/slider/index.mjs.map +1 -0
  155. package/esm/styles/preview-text/index.css +1 -1
  156. package/esm/submit/index.mjs.map +1 -1
  157. package/esm/switch/index.d.ts +12 -12
  158. package/esm/switch/index.mjs.map +1 -1
  159. package/esm/time-picker/index.mjs +6 -8
  160. package/esm/time-picker/index.mjs.map +1 -1
  161. package/esm/time-select/index.mjs +6 -8
  162. package/esm/time-select/index.mjs.map +1 -1
  163. package/esm/transfer/index.mjs.map +1 -1
  164. package/esm/tree/index.mjs +28 -31
  165. package/esm/tree/index.mjs.map +1 -1
  166. package/esm/tree/utils.mjs.map +1 -1
  167. package/esm/tree-select/index.mjs +17 -20
  168. package/esm/tree-select/index.mjs.map +1 -1
  169. package/esm/upload/index.d.ts +1 -1
  170. package/esm/upload/index.mjs +7 -9
  171. package/esm/upload/index.mjs.map +1 -1
  172. package/esm/upload/upload.d.ts +2 -2
  173. package/esm/vendor/sizes.mjs.map +1 -1
  174. package/package.json +115 -113
  175. package/esm/__builtins__/shared/hooks.d.ts +0 -7
  176. package/esm/__builtins__/shared/hooks.mjs +0 -59
  177. package/esm/__builtins__/shared/hooks.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"utils.mjs","sources":["../../src/preview-text/utils.ts"],"sourcesContent":["import type { SpaceProps, TagProps, TextProps } from 'element-plus'\nimport { computed, inject } from 'vue'\n\nexport interface PreviewTextProps {\n placeholder?: string\n tagProps?: Partial<TagProps>\n spaceProps?: Partial<SpaceProps>\n textProps?: Partial<TextProps>\n}\n\nexport const previewTextConfigKey = Symbol('previewTextConfig')\n\nexport function usePreviewConfig() {\n const previewConfig = inject(previewTextConfigKey, {}) as PreviewTextProps\n const placeholder = computed(() => previewConfig?.placeholder || 'N/A')\n const tagProps = computed<Partial<TagProps>>(() => previewConfig?.tagProps ?? { type: 'info' })\n const spaceProps = computed(() => previewConfig?.spaceProps || {})\n const textProps = computed(() => previewConfig?.textProps || {})\n return {\n placeholder,\n tagProps,\n spaceProps,\n textProps,\n }\n}\n"],"names":["previewTextConfigKey","usePreviewConfig","previewConfig","inject","placeholder","computed","tagProps","spaceProps","textProps"],"mappings":";AAUO,MAAMA,IAAuB,OAAO,mBAAmB;AAEvD,SAASC,IAAmB;AACjC,QAAMC,IAAgBC,EAAOH,GAAsB,EAAE,GAC/CI,IAAcC,EAAS,MAAMH,GAAe,eAAe,KAAK,GAChEI,IAAWD,EAA4B,MAAMH,GAAe,YAAY,EAAE,MAAM,QAAQ,GACxFK,IAAaF,EAAS,MAAMH,GAAe,cAAc,CAAA,CAAE,GAC3DM,IAAYH,EAAS,MAAMH,GAAe,aAAa,CAAA,CAAE;AAC/D,SAAO;AAAA,IACL,aAAAE;AAAA,IACA,UAAAE;AAAA,IACA,YAAAC;AAAA,IACA,WAAAC;AAAA,EAAA;AAEJ;"}
1
+ {"version":3,"file":"utils.mjs","sources":["../../src/preview-text/utils.ts"],"sourcesContent":["import type { SpaceProps, TagProps, TextProps } from 'element-plus'\r\nimport { computed, inject } from 'vue'\r\n\r\nexport interface PreviewTextProps {\r\n placeholder?: string\r\n tagProps?: Partial<TagProps> | Record<string, any>\r\n spaceProps?: Partial<SpaceProps> | Record<string, any>\r\n textProps?: Partial<TextProps> | Record<string, any>\r\n}\r\n\r\nexport const previewTextConfigKey = Symbol('previewTextConfig')\r\n\r\nexport function usePreviewConfig() {\r\n const previewConfig = inject(previewTextConfigKey, {}) as PreviewTextProps\r\n const placeholder = computed(() => previewConfig?.placeholder || 'N/A')\r\n const tagProps = computed<Partial<TagProps>>(() => previewConfig?.tagProps ?? { type: 'info' })\r\n const spaceProps = computed(() => previewConfig?.spaceProps || {})\r\n const textProps = computed(() => previewConfig?.textProps || {})\r\n return {\r\n placeholder,\r\n tagProps,\r\n spaceProps,\r\n textProps,\r\n }\r\n}\r\n"],"names":["previewTextConfigKey","usePreviewConfig","previewConfig","inject","placeholder","computed","tagProps","spaceProps","textProps"],"mappings":";AAUO,MAAMA,IAAuB,OAAO,mBAAmB;AAEvD,SAASC,IAAmB;AACjC,QAAMC,IAAgBC,EAAOH,GAAsB,EAAE,GAC/CI,IAAcC,EAAS,MAAMH,GAAe,eAAe,KAAK,GAChEI,IAAWD,EAA4B,MAAMH,GAAe,YAAY,EAAE,MAAM,QAAQ,GACxFK,IAAaF,EAAS,MAAMH,GAAe,cAAc,CAAA,CAAE,GAC3DM,IAAYH,EAAS,MAAMH,GAAe,aAAa,CAAA,CAAE;AAC/D,SAAO;AAAA,IACL,aAAAE;AAAA,IACA,UAAAE;AAAA,IACA,YAAAC;AAAA,IACA,WAAAC;AAAA,EAAA;AAEJ;"}
@@ -1,9 +1,5 @@
1
1
  export declare const Radio: {
2
2
  new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
3
- value: {
4
- type: import('vue').PropType<string | number | boolean>;
5
- default: undefined;
6
- };
7
3
  size: {
8
4
  type: import('vue').PropType<"" | "small" | "default" | "large">;
9
5
  };
@@ -11,10 +7,18 @@ export declare const Radio: {
11
7
  type: import('vue').PropType<string | number | boolean>;
12
8
  default: undefined;
13
9
  };
10
+ border: {
11
+ type: import('vue').PropType<boolean>;
12
+ default: false;
13
+ };
14
14
  name: {
15
15
  type: import('vue').PropType<string>;
16
16
  default: undefined;
17
17
  };
18
+ value: {
19
+ type: import('vue').PropType<string | number | boolean>;
20
+ default: undefined;
21
+ };
18
22
  disabled: {
19
23
  type: import('vue').PropType<boolean>;
20
24
  default: undefined;
@@ -23,10 +27,6 @@ export declare const Radio: {
23
27
  type: import('vue').PropType<string | number | boolean>;
24
28
  default: undefined;
25
29
  };
26
- border: {
27
- type: import('vue').PropType<boolean>;
28
- default: false;
29
- };
30
30
  }>> & {
31
31
  "onUpdate:modelValue"?: ((val: string | number | boolean | undefined) => any) | undefined;
32
32
  onChange?: ((val: string | number | boolean | undefined) => any) | undefined;
@@ -48,10 +48,6 @@ export declare const Radio: {
48
48
  M: {};
49
49
  Defaults: {};
50
50
  }, Readonly<import('vue').ExtractPropTypes<{
51
- value: {
52
- type: import('vue').PropType<string | number | boolean>;
53
- default: undefined;
54
- };
55
51
  size: {
56
52
  type: import('vue').PropType<"" | "small" | "default" | "large">;
57
53
  };
@@ -59,10 +55,18 @@ export declare const Radio: {
59
55
  type: import('vue').PropType<string | number | boolean>;
60
56
  default: undefined;
61
57
  };
58
+ border: {
59
+ type: import('vue').PropType<boolean>;
60
+ default: false;
61
+ };
62
62
  name: {
63
63
  type: import('vue').PropType<string>;
64
64
  default: undefined;
65
65
  };
66
+ value: {
67
+ type: import('vue').PropType<string | number | boolean>;
68
+ default: undefined;
69
+ };
66
70
  disabled: {
67
71
  type: import('vue').PropType<boolean>;
68
72
  default: undefined;
@@ -71,10 +75,6 @@ export declare const Radio: {
71
75
  type: import('vue').PropType<string | number | boolean>;
72
76
  default: undefined;
73
77
  };
74
- border: {
75
- type: import('vue').PropType<boolean>;
76
- default: false;
77
- };
78
78
  }>> & {
79
79
  "onUpdate:modelValue"?: ((val: string | number | boolean | undefined) => any) | undefined;
80
80
  onChange?: ((val: string | number | boolean | undefined) => any) | undefined;
@@ -90,10 +90,6 @@ export declare const Radio: {
90
90
  __isTeleport?: never;
91
91
  __isSuspense?: never;
92
92
  } & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
93
- value: {
94
- type: import('vue').PropType<string | number | boolean>;
95
- default: undefined;
96
- };
97
93
  size: {
98
94
  type: import('vue').PropType<"" | "small" | "default" | "large">;
99
95
  };
@@ -101,10 +97,18 @@ export declare const Radio: {
101
97
  type: import('vue').PropType<string | number | boolean>;
102
98
  default: undefined;
103
99
  };
100
+ border: {
101
+ type: import('vue').PropType<boolean>;
102
+ default: false;
103
+ };
104
104
  name: {
105
105
  type: import('vue').PropType<string>;
106
106
  default: undefined;
107
107
  };
108
+ value: {
109
+ type: import('vue').PropType<string | number | boolean>;
110
+ default: undefined;
111
+ };
108
112
  disabled: {
109
113
  type: import('vue').PropType<boolean>;
110
114
  default: undefined;
@@ -113,10 +117,6 @@ export declare const Radio: {
113
117
  type: import('vue').PropType<string | number | boolean>;
114
118
  default: undefined;
115
119
  };
116
- border: {
117
- type: import('vue').PropType<boolean>;
118
- default: false;
119
- };
120
120
  }>> & {
121
121
  "onUpdate:modelValue"?: ((val: string | number | boolean | undefined) => any) | undefined;
122
122
  onChange?: ((val: string | number | boolean | undefined) => any) | undefined;
@@ -137,10 +137,6 @@ export declare const Radio: {
137
137
  }) & import('vue').ObjectPlugin & {
138
138
  RadioButton: {
139
139
  new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
140
- value: {
141
- type: import('vue').PropType<string | number | boolean>;
142
- default: undefined;
143
- };
144
140
  size: {
145
141
  type: import('vue').PropType<"" | "small" | "default" | "large">;
146
142
  };
@@ -152,6 +148,10 @@ export declare const Radio: {
152
148
  type: import('vue').PropType<string>;
153
149
  default: undefined;
154
150
  };
151
+ value: {
152
+ type: import('vue').PropType<string | number | boolean>;
153
+ default: undefined;
154
+ };
155
155
  disabled: {
156
156
  type: import('vue').PropType<boolean>;
157
157
  default: undefined;
@@ -174,10 +174,6 @@ export declare const Radio: {
174
174
  M: {};
175
175
  Defaults: {};
176
176
  }, Readonly<import('vue').ExtractPropTypes<{
177
- value: {
178
- type: import('vue').PropType<string | number | boolean>;
179
- default: undefined;
180
- };
181
177
  size: {
182
178
  type: import('vue').PropType<"" | "small" | "default" | "large">;
183
179
  };
@@ -189,6 +185,10 @@ export declare const Radio: {
189
185
  type: import('vue').PropType<string>;
190
186
  default: undefined;
191
187
  };
188
+ value: {
189
+ type: import('vue').PropType<string | number | boolean>;
190
+ default: undefined;
191
+ };
192
192
  disabled: {
193
193
  type: import('vue').PropType<boolean>;
194
194
  default: undefined;
@@ -208,10 +208,6 @@ export declare const Radio: {
208
208
  __isTeleport?: never;
209
209
  __isSuspense?: never;
210
210
  } & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
211
- value: {
212
- type: import('vue').PropType<string | number | boolean>;
213
- default: undefined;
214
- };
215
211
  size: {
216
212
  type: import('vue').PropType<"" | "small" | "default" | "large">;
217
213
  };
@@ -223,6 +219,10 @@ export declare const Radio: {
223
219
  type: import('vue').PropType<string>;
224
220
  default: undefined;
225
221
  };
222
+ value: {
223
+ type: import('vue').PropType<string | number | boolean>;
224
+ default: undefined;
225
+ };
226
226
  disabled: {
227
227
  type: import('vue').PropType<boolean>;
228
228
  default: undefined;
@@ -1,15 +1,12 @@
1
1
  import { connect as E, mapProps as T } from "@silver-formily/vue";
2
2
  import { ElRadioButton as B, ElRadio as v, ElRadioGroup as C, version as G } from "element-plus";
3
- import { defineComponent as O, computed as c, useSlots as x, createBlock as p, openBlock as t, unref as u, normalizeProps as A, guardReactiveProps as L, withCtx as i, createElementBlock as f, Fragment as d, renderList as _, resolveDynamicComponent as y, mergeProps as b, createTextVNode as h, toDisplayString as j, renderSlot as w } from "vue";
4
- import "@formily/reactive";
5
- import { mapReadPretty as D } from "../__builtins__/shared/transform-component.mjs";
6
- import { useCleanAttrs as F, composeExport as N } from "../__builtins__/shared/utils.mjs";
7
- import { PreviewText as z } from "../preview-text/index.mjs";
8
- import { isPlainObj as H } from "@formily/shared";
9
- import { lt as I } from "../__builtins__/shared/simple-version-compare.mjs";
10
- import "@formily/core";
11
- import "@silver-formily/reactive-vue";
12
- import '../styles/radio/index.css';const V = /* @__PURE__ */ O({
3
+ import { PreviewText as O } from "../preview-text/index.mjs";
4
+ import { defineComponent as x, computed as c, useSlots as A, createBlock as p, openBlock as t, unref as u, normalizeProps as L, guardReactiveProps as h, withCtx as s, createElementBlock as f, Fragment as d, renderList as _, resolveDynamicComponent as y, mergeProps as b, createTextVNode as j, toDisplayString as w, renderSlot as D } from "vue";
5
+ import { isPlainObj as F } from "@formily/shared";
6
+ import { useCleanAttrs as N, composeExport as z } from "../__builtins__/shared/utils.mjs";
7
+ import { lt as H } from "../__builtins__/shared/simple-version-compare.mjs";
8
+ import { mapReadPretty as I } from "../__builtins__/shared/transform-component.mjs";
9
+ import '../styles/radio/index.css';const V = /* @__PURE__ */ x({
13
10
  name: "FRadioGroup",
14
11
  __name: "radio-group",
15
12
  props: {
@@ -23,15 +20,15 @@ import '../styles/radio/index.css';const V = /* @__PURE__ */ O({
23
20
  }
24
21
  },
25
22
  setup(P) {
26
- const o = P, { props: R } = F(), s = c(() => o.optionType === "button" ? B : v), S = I(G, "2.6.0");
27
- function l(e) {
28
- return H(e);
23
+ const o = P, { props: R } = N(), l = c(() => o.optionType === "button" ? B : v), S = H(G, "2.6.0");
24
+ function i(e) {
25
+ return F(e);
29
26
  }
30
27
  function g(e, n) {
31
- return l(o.options[n]) ? o.options[n].label : e.label;
28
+ return i(o.options[n]) ? o.options[n].label : e.label;
32
29
  }
33
30
  const m = c(() => o.options.map((e) => {
34
- if (!l(e))
31
+ if (!i(e))
35
32
  return {
36
33
  label: e,
37
34
  value: e
@@ -41,17 +38,17 @@ import '../styles/radio/index.css';const V = /* @__PURE__ */ O({
41
38
  ...e,
42
39
  label: e.value
43
40
  } : e;
44
- })), k = x();
45
- return (e, n) => (t(), p(u(C), A(L(u(R))), {
46
- default: i(() => [
47
- u(k).option ? (t(!0), f(d, { key: 1 }, _(m.value, (r, a) => (t(), p(y(s.value), b({ key: a }, { ref_for: !0 }, r), {
48
- default: i(() => [
49
- w(e.$slots, "option", { option: r })
41
+ })), k = A();
42
+ return (e, n) => (t(), p(u(C), L(h(u(R))), {
43
+ default: s(() => [
44
+ u(k).option ? (t(!0), f(d, { key: 1 }, _(m.value, (r, a) => (t(), p(y(l.value), b({ key: a }, { ref_for: !0 }, r), {
45
+ default: s(() => [
46
+ D(e.$slots, "option", { option: r })
50
47
  ]),
51
48
  _: 2
52
- }, 1040))), 128)) : (t(!0), f(d, { key: 0 }, _(m.value, (r, a) => (t(), p(y(s.value), b({ key: a }, { ref_for: !0 }, r), {
53
- default: i(() => [
54
- h(j(g(r, a)), 1)
49
+ }, 1040))), 128)) : (t(!0), f(d, { key: 0 }, _(m.value, (r, a) => (t(), p(y(l.value), b({ key: a }, { ref_for: !0 }, r), {
50
+ default: s(() => [
51
+ j(w(g(r, a)), 1)
55
52
  ]),
56
53
  _: 2
57
54
  }, 1040))), 128))
@@ -62,12 +59,12 @@ import '../styles/radio/index.css';const V = /* @__PURE__ */ O({
62
59
  }), $ = E(
63
60
  V,
64
61
  T({ dataSource: "options", disabled: !0 }),
65
- D(z.Select)
66
- ), re = N(v, {
62
+ I(O.Select)
63
+ ), Y = z(v, {
67
64
  Group: $
68
65
  });
69
66
  export {
70
- re as Radio,
71
- re as default
67
+ Y as Radio,
68
+ Y as default
72
69
  };
73
70
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../src/radio/radio-group.vue","../../src/radio/index.ts"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { RadioProps } from 'element-plus'\nimport type { PropType } from 'vue'\nimport { isPlainObj } from '@formily/shared'\nimport { ElRadio, ElRadioButton, ElRadioGroup, version } from 'element-plus'\nimport { computed, useSlots } from 'vue'\nimport { lt, useCleanAttrs } from '../__builtins__'\n\ndefineOptions({\n name: 'FRadioGroup',\n})\n\nconst props = defineProps({\n options: {\n type: Array as PropType<Array<RadioProps | string | number>>,\n default: () => [],\n },\n optionType: {\n type: String as PropType<'default' | 'button'>,\n default: 'default',\n },\n})\n\nconst { props: radioProps } = useCleanAttrs()\n\nconst OptionType = computed(() => {\n return props.optionType === 'button' ? ElRadioButton : ElRadio\n})\nconst IS_LESS_THAN_2_6_0 = lt(version, '2.6.0')\n\nfunction isRadioPropsObject(option: any): option is RadioProps {\n return isPlainObj(option)\n}\n\nfunction getOptionLabel(option: any, index: number) {\n if (isRadioPropsObject(props.options[index])) {\n return props.options[index].label\n }\n return option.label\n}\n\nconst compatiableProps = computed(() => {\n return props.options.map((option) => {\n if (!isRadioPropsObject(option)) {\n return {\n label: option,\n value: option,\n }\n }\n /* istanbul ignore if -- @preserve */\n if (IS_LESS_THAN_2_6_0) {\n return {\n ...option,\n label: option.value,\n }\n }\n return option\n })\n})\n\nconst slots = useSlots()\n</script>\n\n<template>\n <ElRadioGroup v-bind=\"radioProps\">\n <template v-if=\"!slots.option\">\n <component :is=\"OptionType\" v-for=\"(option, index) of compatiableProps\" :key=\"index\" v-bind=\"option\">\n {{ getOptionLabel(option, index) }}\n </component>\n </template>\n <template v-else>\n <component :is=\"OptionType\" v-for=\"(option, index) of compatiableProps\" :key=\"index\" v-bind=\"option\">\n <slot name=\"option\" :option=\"option\" />\n </component>\n </template>\n </ElRadioGroup>\n</template>\n","import { connect, mapProps } from '@silver-formily/vue'\nimport { ElRadio } from 'element-plus'\nimport { composeExport, mapReadPretty } from '../__builtins__'\nimport { PreviewText } from '../preview-text'\nimport FRadioGroup from './radio-group.vue'\nimport './style.scss'\n\nconst RadioGroup = connect<typeof FRadioGroup>(\n FRadioGroup,\n mapProps({ dataSource: 'options', disabled: true }),\n mapReadPretty(PreviewText.Select),\n)\nexport const Radio = composeExport(ElRadio, {\n Group: RadioGroup,\n})\n\nexport default Radio\n"],"names":["props","__props","radioProps","useCleanAttrs","OptionType","computed","ElRadioButton","ElRadio","IS_LESS_THAN_2_6_0","lt","version","isRadioPropsObject","option","isPlainObj","getOptionLabel","index","compatiableProps","slots","useSlots","_openBlock","_createBlock","_unref","_createElementBlock","_Fragment","_renderList","_resolveDynamicComponent","_mergeProps","_renderSlot","_ctx","RadioGroup","connect","FRadioGroup","mapProps","mapReadPretty","PreviewText","Radio","composeExport"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAYA,UAAMA,IAAQC,GAWR,EAAE,OAAOC,EAAA,IAAeC,EAAA,GAExBC,IAAaC,EAAS,MACnBL,EAAM,eAAe,WAAWM,IAAgBC,CACxD,GACKC,IAAqBC,EAAGC,GAAS,OAAO;AAE9C,aAASC,EAAmBC,GAAmC;AAC7D,aAAOC,EAAWD,CAAM;AAAA,IAC1B;AAEA,aAASE,EAAeF,GAAaG,GAAe;AAClD,aAAIJ,EAAmBX,EAAM,QAAQe,CAAK,CAAC,IAClCf,EAAM,QAAQe,CAAK,EAAE,QAEvBH,EAAO;AAAA,IAChB;AAEA,UAAMI,IAAmBX,EAAS,MACzBL,EAAM,QAAQ,IAAI,CAACY,MAAW;AACnC,UAAI,CAACD,EAAmBC,CAAM;AAC5B,eAAO;AAAA,UACL,OAAOA;AAAA,UACP,OAAOA;AAAA,QAAA;AAAA,MAEX;AAEA,aAAIJ,IACK;AAAA,QACL,GAAGI;AAAA,QACH,OAAOA,EAAO;AAAA,MAAA,IAGXA;AAAA,IACT,CAAC,CACF,GAEKK,IAAQC,EAAA;sBAIZC,EAAA,GAAAC,EAWeC,UAXOA,EAAAnB,CAAA,CAAU,CAAA,GAAA;AAAA,iBAC9B,MAIW;AAAA,QAJMmB,EAAAJ,CAAA,EAAM,UAMrBE,EAAA,EAAA,GAAAG,EAEYC,GAAA,EAAA,KAAA,KAAAC,EAF0CR,EAAA,OAAgB,CAAlCJ,GAAQG,YAA5CK,EAEYK,EAFIrB,OAAU,GAA1BsB,EAEY,EAF6D,KAAKX,KAAK,EAAA,SAAA,GAAA,GAAUH,CAAM,GAAA;AAAA,qBACjG,MAAuC;AAAA,YAAvCe,EAAuCC,EAAA,QAAA,UAAA,EAAlB,QAAAhB,GAAc;AAAA,UAAA;;6BANrCO,EAAA,EAAA,GAAAG,EAEYC,GAAA,EAAA,KAAA,KAAAC,EAF0CR,EAAA,OAAgB,CAAlCJ,GAAQG,YAA5CK,EAEYK,EAFIrB,OAAU,GAA1BsB,EAEY,EAF6D,KAAKX,KAAK,EAAA,SAAA,GAAA,GAAUH,CAAM,GAAA;AAAA,qBACjG,MAAmC;AAAA,gBAAhCE,EAAeF,GAAQG,CAAK,CAAA,GAAA,CAAA;AAAA,UAAA;;;;;;;IC5DjCc,IAAaC;AAAA,EACjBC;AAAAA,EACAC,EAAS,EAAE,YAAY,WAAW,UAAU,IAAM;AAAA,EAClDC,EAAcC,EAAY,MAAM;AAClC,GACaC,KAAQC,EAAc7B,GAAS;AAAA,EAC1C,OAAOsB;AACT,CAAC;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../src/radio/radio-group.vue","../../src/radio/index.ts"],"sourcesContent":["<script setup lang=\"ts\">\r\nimport type { RadioProps } from 'element-plus'\r\nimport type { PropType } from 'vue'\r\nimport { isPlainObj } from '@formily/shared'\r\nimport { ElRadio, ElRadioButton, ElRadioGroup, version } from 'element-plus'\r\nimport { computed, useSlots } from 'vue'\r\nimport { lt, useCleanAttrs } from '../__builtins__'\r\n\r\ndefineOptions({\r\n name: 'FRadioGroup',\r\n})\r\n\r\nconst props = defineProps({\r\n options: {\r\n type: Array as PropType<Array<RadioProps | string | number>>,\r\n default: () => [],\r\n },\r\n optionType: {\r\n type: String as PropType<'default' | 'button'>,\r\n default: 'default',\r\n },\r\n})\r\n\r\nconst { props: radioProps } = useCleanAttrs()\r\n\r\nconst OptionType = computed(() => {\r\n return props.optionType === 'button' ? ElRadioButton : ElRadio\r\n})\r\nconst IS_LESS_THAN_2_6_0 = lt(version, '2.6.0')\r\n\r\nfunction isRadioPropsObject(option: any): option is RadioProps {\r\n return isPlainObj(option)\r\n}\r\n\r\nfunction getOptionLabel(option: any, index: number) {\r\n if (isRadioPropsObject(props.options[index])) {\r\n return props.options[index].label\r\n }\r\n return option.label\r\n}\r\n\r\nconst compatiableProps = computed(() => {\r\n return props.options.map((option) => {\r\n if (!isRadioPropsObject(option)) {\r\n return {\r\n label: option,\r\n value: option,\r\n }\r\n }\r\n /* istanbul ignore if -- @preserve */\r\n if (IS_LESS_THAN_2_6_0) {\r\n return {\r\n ...option,\r\n label: option.value,\r\n }\r\n }\r\n return option\r\n })\r\n})\r\n\r\nconst slots = useSlots()\r\n</script>\r\n\r\n<template>\r\n <ElRadioGroup v-bind=\"radioProps\">\r\n <template v-if=\"!slots.option\">\r\n <component :is=\"OptionType\" v-for=\"(option, index) of compatiableProps\" :key=\"index\" v-bind=\"option\">\r\n {{ getOptionLabel(option, index) }}\r\n </component>\r\n </template>\r\n <template v-else>\r\n <component :is=\"OptionType\" v-for=\"(option, index) of compatiableProps\" :key=\"index\" v-bind=\"option\">\r\n <slot name=\"option\" :option=\"option\" />\r\n </component>\r\n </template>\r\n </ElRadioGroup>\r\n</template>\r\n","import { connect, mapProps } from '@silver-formily/vue'\r\nimport { ElRadio } from 'element-plus'\r\nimport { composeExport, mapReadPretty } from '../__builtins__'\r\nimport { PreviewText } from '../preview-text'\r\nimport FRadioGroup from './radio-group.vue'\r\nimport './style.scss'\r\n\r\nconst RadioGroup = connect<typeof FRadioGroup>(\r\n FRadioGroup,\r\n mapProps({ dataSource: 'options', disabled: true }),\r\n mapReadPretty(PreviewText.Select),\r\n)\r\nexport const Radio = composeExport(ElRadio, {\r\n Group: RadioGroup,\r\n})\r\n\r\nexport default Radio\r\n"],"names":["props","__props","radioProps","useCleanAttrs","OptionType","computed","ElRadioButton","ElRadio","IS_LESS_THAN_2_6_0","lt","version","isRadioPropsObject","option","isPlainObj","getOptionLabel","index","compatiableProps","slots","useSlots","_openBlock","_createBlock","_unref","_createElementBlock","_Fragment","_renderList","_resolveDynamicComponent","_mergeProps","_renderSlot","_ctx","RadioGroup","connect","FRadioGroup","mapProps","mapReadPretty","PreviewText","Radio","composeExport"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAYA,UAAMA,IAAQC,GAWR,EAAE,OAAOC,EAAA,IAAeC,EAAA,GAExBC,IAAaC,EAAS,MACnBL,EAAM,eAAe,WAAWM,IAAgBC,CACxD,GACKC,IAAqBC,EAAGC,GAAS,OAAO;AAE9C,aAASC,EAAmBC,GAAmC;AAC7D,aAAOC,EAAWD,CAAM;AAAA,IAC1B;AAEA,aAASE,EAAeF,GAAaG,GAAe;AAClD,aAAIJ,EAAmBX,EAAM,QAAQe,CAAK,CAAC,IAClCf,EAAM,QAAQe,CAAK,EAAE,QAEvBH,EAAO;AAAA,IAChB;AAEA,UAAMI,IAAmBX,EAAS,MACzBL,EAAM,QAAQ,IAAI,CAACY,MAAW;AACnC,UAAI,CAACD,EAAmBC,CAAM;AAC5B,eAAO;AAAA,UACL,OAAOA;AAAA,UACP,OAAOA;AAAA,QAAA;AAAA,MAEX;AAEA,aAAIJ,IACK;AAAA,QACL,GAAGI;AAAA,QACH,OAAOA,EAAO;AAAA,MAAA,IAGXA;AAAA,IACT,CAAC,CACF,GAEKK,IAAQC,EAAA;sBAIZC,EAAA,GAAAC,EAWeC,UAXOA,EAAAnB,CAAA,CAAU,CAAA,GAAA;AAAA,iBAC9B,MAIW;AAAA,QAJMmB,EAAAJ,CAAA,EAAM,UAMrBE,EAAA,EAAA,GAAAG,EAEYC,GAAA,EAAA,KAAA,KAAAC,EAF0CR,EAAA,OAAgB,CAAlCJ,GAAQG,YAA5CK,EAEYK,EAFIrB,OAAU,GAA1BsB,EAEY,EAF6D,KAAKX,KAAK,EAAA,SAAA,GAAA,GAAUH,CAAM,GAAA;AAAA,qBACjG,MAAuC;AAAA,YAAvCe,EAAuCC,EAAA,QAAA,UAAA,EAAlB,QAAAhB,GAAc;AAAA,UAAA;;6BANrCO,EAAA,EAAA,GAAAG,EAEYC,GAAA,EAAA,KAAA,KAAAC,EAF0CR,EAAA,OAAgB,CAAlCJ,GAAQG,YAA5CK,EAEYK,EAFIrB,OAAU,GAA1BsB,EAEY,EAF6D,KAAKX,KAAK,EAAA,SAAA,GAAA,GAAUH,CAAM,GAAA;AAAA,qBACjG,MAAmC;AAAA,gBAAhCE,EAAeF,GAAQG,CAAK,CAAA,GAAA,CAAA;AAAA,UAAA;;;;;;;IC5DjCc,IAAaC;AAAA,EACjBC;AAAAA,EACAC,EAAS,EAAE,YAAY,WAAW,UAAU,IAAM;AAAA,EAClDC,EAAcC,EAAY,MAAM;AAClC,GACaC,IAAQC,EAAc7B,GAAS;AAAA,EAC1C,OAAOsB;AACT,CAAC;"}
@@ -0,0 +1,187 @@
1
+ import { ElRate } from 'element-plus';
2
+ export type RateProps = typeof ElRate;
3
+ export declare const Rate: import('element-plus/es/utils/index.mjs').SFCWithInstall<import('vue').DefineComponent<{
4
+ size: {
5
+ type: import('vue').PropType<"" | "small" | "default" | "large">;
6
+ };
7
+ max: {
8
+ type: import('vue').PropType<number>;
9
+ default: number;
10
+ };
11
+ disabled: {
12
+ type: import('vue').PropType<boolean>;
13
+ default: undefined;
14
+ };
15
+ id: {
16
+ type: import('vue').PropType<string>;
17
+ default: undefined;
18
+ };
19
+ modelValue: {
20
+ type: import('vue').PropType<number>;
21
+ default: number;
22
+ };
23
+ ariaLabel: {
24
+ type: import('vue').PropType<string>;
25
+ };
26
+ clearable: {
27
+ type: import('vue').PropType<boolean>;
28
+ };
29
+ lowThreshold: {
30
+ type: import('vue').PropType<number>;
31
+ default: number;
32
+ };
33
+ highThreshold: {
34
+ type: import('vue').PropType<number>;
35
+ default: number;
36
+ };
37
+ colors: {
38
+ type: import('vue').PropType<string[] | Record<number, string>>;
39
+ default: () => string[];
40
+ };
41
+ voidColor: {
42
+ type: import('vue').PropType<string>;
43
+ default: string;
44
+ };
45
+ disabledVoidColor: {
46
+ type: import('vue').PropType<string>;
47
+ default: string;
48
+ };
49
+ icons: {
50
+ type: import('vue').PropType<(string | import('vue').Component)[] | Record<number, string | import('vue').Component>>;
51
+ default: () => any[];
52
+ };
53
+ voidIcon: {
54
+ type: import('vue').PropType<string | import('vue').Component>;
55
+ default: () => any;
56
+ };
57
+ disabledVoidIcon: {
58
+ type: import('vue').PropType<string | import('vue').Component>;
59
+ default: () => any;
60
+ };
61
+ allowHalf: {
62
+ type: import('vue').PropType<boolean>;
63
+ };
64
+ showText: {
65
+ type: import('vue').PropType<boolean>;
66
+ };
67
+ showScore: {
68
+ type: import('vue').PropType<boolean>;
69
+ };
70
+ textColor: {
71
+ type: import('vue').PropType<string>;
72
+ default: string;
73
+ };
74
+ texts: {
75
+ type: import('vue').PropType<string[]>;
76
+ default: () => string[];
77
+ };
78
+ scoreTemplate: {
79
+ type: import('vue').PropType<string>;
80
+ default: string;
81
+ };
82
+ }, {
83
+ setCurrentValue: (value: number, event?: MouseEvent) => void;
84
+ resetCurrentValue: () => void;
85
+ }, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
86
+ "update:modelValue": (value: number) => void;
87
+ change: (value: number) => void;
88
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
89
+ size: {
90
+ type: import('vue').PropType<"" | "small" | "default" | "large">;
91
+ };
92
+ max: {
93
+ type: import('vue').PropType<number>;
94
+ default: number;
95
+ };
96
+ disabled: {
97
+ type: import('vue').PropType<boolean>;
98
+ default: undefined;
99
+ };
100
+ id: {
101
+ type: import('vue').PropType<string>;
102
+ default: undefined;
103
+ };
104
+ modelValue: {
105
+ type: import('vue').PropType<number>;
106
+ default: number;
107
+ };
108
+ ariaLabel: {
109
+ type: import('vue').PropType<string>;
110
+ };
111
+ clearable: {
112
+ type: import('vue').PropType<boolean>;
113
+ };
114
+ lowThreshold: {
115
+ type: import('vue').PropType<number>;
116
+ default: number;
117
+ };
118
+ highThreshold: {
119
+ type: import('vue').PropType<number>;
120
+ default: number;
121
+ };
122
+ colors: {
123
+ type: import('vue').PropType<string[] | Record<number, string>>;
124
+ default: () => string[];
125
+ };
126
+ voidColor: {
127
+ type: import('vue').PropType<string>;
128
+ default: string;
129
+ };
130
+ disabledVoidColor: {
131
+ type: import('vue').PropType<string>;
132
+ default: string;
133
+ };
134
+ icons: {
135
+ type: import('vue').PropType<(string | import('vue').Component)[] | Record<number, string | import('vue').Component>>;
136
+ default: () => any[];
137
+ };
138
+ voidIcon: {
139
+ type: import('vue').PropType<string | import('vue').Component>;
140
+ default: () => any;
141
+ };
142
+ disabledVoidIcon: {
143
+ type: import('vue').PropType<string | import('vue').Component>;
144
+ default: () => any;
145
+ };
146
+ allowHalf: {
147
+ type: import('vue').PropType<boolean>;
148
+ };
149
+ showText: {
150
+ type: import('vue').PropType<boolean>;
151
+ };
152
+ showScore: {
153
+ type: import('vue').PropType<boolean>;
154
+ };
155
+ textColor: {
156
+ type: import('vue').PropType<string>;
157
+ default: string;
158
+ };
159
+ texts: {
160
+ type: import('vue').PropType<string[]>;
161
+ default: () => string[];
162
+ };
163
+ scoreTemplate: {
164
+ type: import('vue').PropType<string>;
165
+ default: string;
166
+ };
167
+ }>> & {
168
+ "onUpdate:modelValue"?: ((value: number) => any) | undefined;
169
+ onChange?: ((value: number) => any) | undefined;
170
+ }, {
171
+ disabled: boolean;
172
+ id: string;
173
+ modelValue: number;
174
+ max: number;
175
+ textColor: string;
176
+ colors: string[] | Record<number, string>;
177
+ lowThreshold: number;
178
+ highThreshold: number;
179
+ voidColor: string;
180
+ disabledVoidColor: string;
181
+ icons: Array<string | import('vue').Component> | Record<number, string | import('vue').Component>;
182
+ voidIcon: string | import('vue').Component;
183
+ disabledVoidIcon: string | import('vue').Component;
184
+ texts: string[];
185
+ scoreTemplate: string;
186
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>>;
187
+ export default Rate;
@@ -0,0 +1,14 @@
1
+ import { connect as e, mapProps as r } from "@silver-formily/vue";
2
+ import { ElRate as t } from "element-plus";
3
+ import { PreviewText as o } from "../preview-text/index.mjs";
4
+ import { mapReadPretty as a } from "../__builtins__/shared/transform-component.mjs";
5
+ const f = e(
6
+ t,
7
+ r({ readOnly: "readonly", disabled: !0 }),
8
+ a(o.Rate)
9
+ );
10
+ export {
11
+ f as Rate,
12
+ f as default
13
+ };
14
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":["../../src/rate/index.ts"],"sourcesContent":["import { connect, mapProps } from '@silver-formily/vue'\r\nimport { ElRate } from 'element-plus'\r\nimport { mapReadPretty } from '../__builtins__'\r\nimport { PreviewText } from '../preview-text'\r\n\r\nexport type RateProps = typeof ElRate\r\n\r\nexport const Rate = connect<typeof ElRate>(\r\n ElRate,\r\n mapProps({ readOnly: 'readonly', disabled: true }),\r\n mapReadPretty(PreviewText.Rate),\r\n)\r\n\r\nexport default Rate\r\n"],"names":["Rate","connect","ElRate","mapProps","mapReadPretty","PreviewText"],"mappings":";;;;AAOO,MAAMA,IAAOC;AAAA,EAClBC;AAAA,EACAC,EAAS,EAAE,UAAU,YAAY,UAAU,IAAM;AAAA,EACjDC,EAAcC,EAAY,IAAI;AAChC;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../src/reset/reset.vue","../../src/reset/index.ts"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { PropType } from 'vue'\nimport { useParentForm } from '@silver-formily/vue'\nimport { ElButton } from 'element-plus'\n\ndefineOptions({\n name: 'FReset',\n inheritAttrs: false,\n})\n\nconst props = defineProps({\n onClick: Function as PropType<(e: MouseEvent) => void | boolean>,\n forceClear: {\n type: Boolean,\n default: false,\n },\n validate: {\n type: Boolean,\n default: false,\n },\n onResetValidateSuccess: Function as PropType<(payload: any) => void>,\n onResetValidateFailed: Function as PropType<(error: any) => void>,\n})\n\nconst formRef = useParentForm()\n\nfunction handleClick(e: MouseEvent) {\n if (props.onClick && (props.onClick)?.(e) === false)\n return\n\n const form = formRef?.value\n form?.reset('*', {\n forceClear: props.forceClear,\n })\n props.validate && form?.validate()\n .then(props.onResetValidateSuccess)\n .catch(error => props.onResetValidateFailed?.(error))\n}\n</script>\n\n<template>\n <ElButton v-bind=\"$attrs\" @click=\"handleClick\">\n <slot />\n </ElButton>\n</template>\n","import { observer } from '@silver-formily/reactive-vue'\nimport FReset from './reset.vue'\n\nexport const Reset = observer(FReset)\n\nexport default Reset\n"],"names":["props","__props","formRef","useParentForm","handleClick","e","form","error","_openBlock","_createBlock","_unref","_mergeProps","_ctx","_renderSlot","Reset","observer","FReset"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAUA,UAAMA,IAAQC,GAcRC,IAAUC,EAAA;AAEhB,aAASC,EAAYC,GAAe;AAClC,UAAIL,EAAM,WAAYA,EAAM,UAAWK,CAAC,MAAM;AAC5C;AAEF,YAAMC,IAAOJ,GAAS;AACtB,MAAAI,GAAM,MAAM,KAAK;AAAA,QACf,YAAYN,EAAM;AAAA,MAAA,CACnB,GACDA,EAAM,YAAYM,GAAM,SAAA,EACrB,KAAKN,EAAM,sBAAsB,EACjC,MAAM,CAAAO,MAASP,EAAM,wBAAwBO,CAAK,CAAC;AAAA,IACxD;sBAIEC,EAAA,GAAAC,EAEWC,MAFXC,EAEWC,UAFa,EAAG,SAAOR,EAAA,CAAW,GAAA;AAAA,iBAC3C,MAAQ;AAAA,QAARS,EAAQD,EAAA,QAAA,SAAA;AAAA,MAAA;;;;ICvCCE,IAAQC,EAASC,CAAM;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../src/reset/reset.vue","../../src/reset/index.ts"],"sourcesContent":["<script lang=\"ts\" setup>\r\nimport type { PropType } from 'vue'\r\nimport { useParentForm } from '@silver-formily/vue'\r\nimport { ElButton } from 'element-plus'\r\n\r\ndefineOptions({\r\n name: 'FReset',\r\n inheritAttrs: false,\r\n})\r\n\r\nconst props = defineProps({\r\n onClick: Function as PropType<(e: MouseEvent) => void | boolean>,\r\n forceClear: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n validate: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n onResetValidateSuccess: Function as PropType<(payload: any) => void>,\r\n onResetValidateFailed: Function as PropType<(error: any) => void>,\r\n})\r\n\r\nconst formRef = useParentForm()\r\n\r\nfunction handleClick(e: MouseEvent) {\r\n if (props.onClick && (props.onClick)?.(e) === false)\r\n return\r\n\r\n const form = formRef?.value\r\n form?.reset('*', {\r\n forceClear: props.forceClear,\r\n })\r\n props.validate && form?.validate()\r\n .then(props.onResetValidateSuccess)\r\n .catch(error => props.onResetValidateFailed?.(error))\r\n}\r\n</script>\r\n\r\n<template>\r\n <ElButton v-bind=\"$attrs\" @click=\"handleClick\">\r\n <slot />\r\n </ElButton>\r\n</template>\r\n","import { observer } from '@silver-formily/reactive-vue'\r\nimport FReset from './reset.vue'\r\n\r\nexport const Reset = observer(FReset)\r\n\r\nexport default Reset\r\n"],"names":["props","__props","formRef","useParentForm","handleClick","e","form","error","_openBlock","_createBlock","_unref","_mergeProps","_ctx","_renderSlot","Reset","observer","FReset"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAUA,UAAMA,IAAQC,GAcRC,IAAUC,EAAA;AAEhB,aAASC,EAAYC,GAAe;AAClC,UAAIL,EAAM,WAAYA,EAAM,UAAWK,CAAC,MAAM;AAC5C;AAEF,YAAMC,IAAOJ,GAAS;AACtB,MAAAI,GAAM,MAAM,KAAK;AAAA,QACf,YAAYN,EAAM;AAAA,MAAA,CACnB,GACDA,EAAM,YAAYM,GAAM,SAAA,EACrB,KAAKN,EAAM,sBAAsB,EACjC,MAAM,CAAAO,MAASP,EAAM,wBAAwBO,CAAK,CAAC;AAAA,IACxD;sBAIEC,EAAA,GAAAC,EAEWC,MAFXC,EAEWC,UAFa,EAAG,SAAOR,EAAA,CAAW,GAAA;AAAA,iBAC3C,MAAQ;AAAA,QAARS,EAAQD,EAAA,QAAA,SAAA;AAAA,MAAA;;;;ICvCCE,IAAQC,EAASC,CAAM;"}
@@ -0,0 +1,26 @@
1
+ export declare const Segmented: {
2
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
3
+ options?: import('element-plus/es/components/segmented/src/types.mjs').Option[];
4
+ }> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
5
+ P: {};
6
+ B: {};
7
+ D: {};
8
+ C: {};
9
+ M: {};
10
+ Defaults: {};
11
+ }, Readonly<{
12
+ options?: import('element-plus/es/components/segmented/src/types.mjs').Option[];
13
+ }> & Readonly<{}>, {}, {}, {}, {}, {}>;
14
+ __isFragment?: never;
15
+ __isTeleport?: never;
16
+ __isSuspense?: never;
17
+ } & import('vue').ComponentOptionsBase<Readonly<{
18
+ options?: import('element-plus/es/components/segmented/src/types.mjs').Option[];
19
+ }> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
20
+ $slots: {
21
+ default?(_: {
22
+ item: any;
23
+ }): any;
24
+ };
25
+ });
26
+ export default Segmented;
@@ -0,0 +1,37 @@
1
+ import { connect as m, mapProps as a } from "@silver-formily/vue";
2
+ import { PreviewText as i } from "../preview-text/index.mjs";
3
+ import { defineComponent as c, useSlots as d, createBlock as l, openBlock as f, unref as e, mergeProps as u, createSlots as S, withCtx as g, renderSlot as P, normalizeProps as _, guardReactiveProps as h } from "vue";
4
+ import { ElSegmented as k } from "element-plus";
5
+ import { useCleanAttrs as v } from "../__builtins__/shared/utils.mjs";
6
+ import { mapReadPretty as x } from "../__builtins__/shared/transform-component.mjs";
7
+ const C = /* @__PURE__ */ c({
8
+ name: "FSegmented",
9
+ inheritAttrs: !1,
10
+ __name: "segmented",
11
+ props: {
12
+ options: {}
13
+ },
14
+ setup(t) {
15
+ const o = t, r = d(), { props: s } = v();
16
+ return (n, w) => (f(), l(e(k), u(e(s), {
17
+ options: o.options
18
+ }), S({ _: 2 }, [
19
+ e(r).default ? {
20
+ name: "default",
21
+ fn: g((p) => [
22
+ P(n.$slots, "default", _(h(p)))
23
+ ]),
24
+ key: "0"
25
+ } : void 0
26
+ ]), 1040, ["options"]));
27
+ }
28
+ }), E = m(
29
+ C,
30
+ a({ dataSource: "options", disabled: !0 }),
31
+ x(i.Select)
32
+ );
33
+ export {
34
+ E as Segmented,
35
+ E as default
36
+ };
37
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":["../../src/segmented/segmented.vue","../../src/segmented/index.ts"],"sourcesContent":["<script setup lang=\"ts\">\r\nimport { ElSegmented } from 'element-plus'\r\nimport { useSlots } from 'vue'\r\nimport { useCleanAttrs } from '../__builtins__'\r\n\r\ndefineOptions({\r\n name: 'FSegmented',\r\n inheritAttrs: false,\r\n})\r\n\r\nconst props = defineProps<{\r\n options?: SegmentedOptions\r\n}>()\r\n\r\ntype SegmentedOption = NonNullable<InstanceType<typeof ElSegmented>['$props']['options']>[number]\r\n\r\ntype SegmentedOptions = SegmentedOption[]\r\n\r\nconst slots = useSlots()\r\nconst { props: segmentedProps } = useCleanAttrs()\r\n</script>\r\n\r\n<template>\r\n <ElSegmented v-bind=\"segmentedProps\" :options=\"props.options\">\r\n <template v-if=\"slots.default\" #default=\"slotData\">\r\n <slot v-bind=\"slotData\" />\r\n </template>\r\n </ElSegmented>\r\n</template>\r\n","import { connect, mapProps } from '@silver-formily/vue'\r\nimport { mapReadPretty } from '../__builtins__'\r\nimport { PreviewText } from '../preview-text'\r\nimport FSegmented from './segmented.vue'\r\n\r\nexport const Segmented = connect<typeof FSegmented>(\r\n FSegmented,\r\n mapProps({ dataSource: 'options', disabled: true }),\r\n mapReadPretty(PreviewText.Select),\r\n)\r\n\r\nexport default Segmented\r\n"],"names":["props","__props","slots","useSlots","segmentedProps","useCleanAttrs","_createBlock","_unref","ElSegmented","_mergeProps","_withCtx","slotData","_renderSlot","_ctx","Segmented","connect","FSegmented","mapProps","mapReadPretty","PreviewText"],"mappings":";;;;;;;;;;;;;;AAUA,UAAMA,IAAQC,GAQRC,IAAQC,EAAA,GACR,EAAE,OAAOC,EAAA,IAAmBC,EAAA;2BAIhCC,EAIcC,EAAAC,CAAA,GAJdC,EAIcF,EAAAH,CAAA,GAJqB;AAAA,MAAG,SAASJ,EAAM;AAAA,IAAA;MACnCO,EAAAL,CAAA,EAAM;cAAU;AAAA,QAC9B,IAAAQ,EAAA,CADuCC,MAAQ;AAAA,UAC/CC,EAA0BC,yBAAZF,CAAQ,CAAA,CAAA;AAAA,QAAA;;;;;ICpBfG,IAAYC;AAAA,EACvBC;AAAAA,EACAC,EAAS,EAAE,YAAY,WAAW,UAAU,IAAM;AAAA,EAClDC,EAAcC,EAAY,MAAM;AAClC;"}
@@ -0,0 +1,25 @@
1
+ import { ElSegmented } from 'element-plus';
2
+ type __VLS_Props = {
3
+ options?: SegmentedOptions;
4
+ };
5
+ type SegmentedOption = NonNullable<InstanceType<typeof ElSegmented>['$props']['options']>[number];
6
+ type SegmentedOptions = SegmentedOption[];
7
+ declare function __VLS_template(): {
8
+ attrs: Partial<{}>;
9
+ slots: {
10
+ default?(_: {
11
+ item: any;
12
+ }): any;
13
+ };
14
+ refs: {};
15
+ rootEl: any;
16
+ };
17
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
18
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
19
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
20
+ export default _default;
21
+ type __VLS_WithTemplateSlots<T, S> = T & {
22
+ new (): {
23
+ $slots: S;
24
+ };
25
+ };