@silver-formily/element-plus 4.0.3 → 5.0.1

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 (150) hide show
  1. package/esm/__builtins__/shared/loading.mjs.map +1 -1
  2. package/esm/__builtins__/shared/transform-component.mjs +1 -1
  3. package/esm/__builtins__/shared/transform-component.mjs.map +1 -1
  4. package/esm/__builtins__/shared/utils.mjs +7 -5
  5. package/esm/__builtins__/shared/utils.mjs.map +1 -1
  6. package/esm/array-base/array-base-inner.mjs.map +1 -1
  7. package/esm/array-base/array-base-move-down.mjs +1 -1
  8. package/esm/array-base/array-base-move-down.mjs.map +1 -1
  9. package/esm/array-base/array-base-move-up.mjs +1 -1
  10. package/esm/array-base/array-base-move-up.mjs.map +1 -1
  11. package/esm/array-base/array-base-remove.mjs +1 -1
  12. package/esm/array-base/array-base-remove.mjs.map +1 -1
  13. package/esm/array-base/types.d.ts +2 -2
  14. package/esm/array-base/utils.d.ts +1 -1
  15. package/esm/array-base/utils.mjs +1 -1
  16. package/esm/array-base/utils.mjs.map +1 -1
  17. package/esm/array-cards/array-cards.mjs +1 -1
  18. package/esm/array-cards/array-cards.mjs.map +1 -1
  19. package/esm/array-collapse/array-collapse-item.mjs +1 -1
  20. package/esm/array-collapse/array-collapse-item.mjs.map +1 -1
  21. package/esm/array-collapse/array-collapse.mjs +3 -4
  22. package/esm/array-collapse/array-collapse.mjs.map +1 -1
  23. package/esm/array-items/array-items.mjs +3 -8
  24. package/esm/array-items/array-items.mjs.map +1 -1
  25. package/esm/array-list-tabs/array-list-tabs.mjs +57 -51
  26. package/esm/array-list-tabs/array-list-tabs.mjs.map +1 -1
  27. package/esm/array-list-tabs/utils.mjs.map +1 -1
  28. package/esm/array-table/array-table.mjs +4 -18
  29. package/esm/array-table/array-table.mjs.map +1 -1
  30. package/esm/array-table/utils.mjs.map +1 -1
  31. package/esm/array-tabs/array-tabs.mjs +1 -1
  32. package/esm/array-tabs/array-tabs.mjs.map +1 -1
  33. package/esm/autocomplete/autocomplete.mjs.map +1 -1
  34. package/esm/autocomplete/index.d.ts +1 -41
  35. package/esm/cascader/index.d.ts +1 -31
  36. package/esm/checkbox/checkbox-group.mjs +1 -1
  37. package/esm/checkbox/checkbox-group.mjs.map +1 -1
  38. package/esm/checkbox/index.d.ts +1 -819
  39. package/esm/color-picker/index.d.ts +1 -210
  40. package/esm/color-picker-panel/index.d.ts +1 -130
  41. package/esm/date-picker/index.d.ts +1 -447
  42. package/esm/date-picker-panel/index.d.ts +1 -147
  43. package/esm/editable/editable-popover.mjs +1 -1
  44. package/esm/editable/editable-popover.mjs.map +1 -1
  45. package/esm/editable/editable.mjs +1 -1
  46. package/esm/editable/editable.mjs.map +1 -1
  47. package/esm/editable/index.d.ts +1 -60
  48. package/esm/form/form.mjs.map +1 -1
  49. package/esm/form/form.vue.d.ts +1 -1
  50. package/esm/form-collapse/form-collapse.mjs +1 -1
  51. package/esm/form-collapse/form-collapse.mjs.map +1 -1
  52. package/esm/form-collapse/index.d.ts +3 -3
  53. package/esm/form-collapse/utils.d.ts +2 -2
  54. package/esm/form-collapse/utils.mjs +2 -2
  55. package/esm/form-collapse/utils.mjs.map +1 -1
  56. package/esm/form-dialog/dialog-content.mjs +1 -1
  57. package/esm/form-dialog/dialog-content.mjs.map +1 -1
  58. package/esm/form-dialog/index.mjs +3 -3
  59. package/esm/form-dialog/index.mjs.map +1 -1
  60. package/esm/form-dialog/types.d.ts +2 -2
  61. package/esm/form-drawer/drawer-content.mjs +1 -1
  62. package/esm/form-drawer/drawer-content.mjs.map +1 -1
  63. package/esm/form-drawer/index.mjs +3 -3
  64. package/esm/form-drawer/index.mjs.map +1 -1
  65. package/esm/form-drawer/types.d.ts +2 -2
  66. package/esm/form-item/form-item.mjs +1 -1
  67. package/esm/form-item/form-item.mjs.map +1 -1
  68. package/esm/form-item/index.d.ts +1 -83
  69. package/esm/form-item/index.mjs +1 -1
  70. package/esm/form-item/index.mjs.map +1 -1
  71. package/esm/form-item/utils.mjs +1 -1
  72. package/esm/form-item/utils.mjs.map +1 -1
  73. package/esm/form-layout/form-layout.mjs +1 -1
  74. package/esm/form-layout/form-layout.mjs.map +1 -1
  75. package/esm/form-layout/form-layout.vue.d.ts +1 -1
  76. package/esm/form-layout/utils.mjs +1 -1
  77. package/esm/form-layout/utils.mjs.map +1 -1
  78. package/esm/form-step/form-step.mjs +1 -1
  79. package/esm/form-step/form-step.mjs.map +1 -1
  80. package/esm/form-step/types.d.ts +1 -1
  81. package/esm/form-step/utils.d.ts +1 -1
  82. package/esm/form-step/utils.mjs +1 -1
  83. package/esm/form-step/utils.mjs.map +1 -1
  84. package/esm/form-tab/hooks.mjs.map +1 -1
  85. package/esm/form-tab/utils.mjs +1 -1
  86. package/esm/form-tab/utils.mjs.map +1 -1
  87. package/esm/input/index.d.ts +1 -43
  88. package/esm/input-number/index.d.ts +1 -328
  89. package/esm/input-tag/index.d.ts +1 -26
  90. package/esm/input-tag/input-tag.mjs.map +1 -1
  91. package/esm/mention/index.d.ts +1 -36
  92. package/esm/mention/mention.mjs.map +1 -1
  93. package/esm/pagination/components/pager2.mjs.map +1 -1
  94. package/esm/pagination/components/sizes2.mjs +1 -1
  95. package/esm/pagination/components/sizes2.mjs.map +1 -1
  96. package/esm/password/index.d.ts +1 -42
  97. package/esm/picker-select/index.d.ts +1 -41
  98. package/esm/picker-select/picker-select.mjs +1 -1
  99. package/esm/picker-select/picker-select.mjs.map +1 -1
  100. package/esm/picker-select/types.d.ts +1 -1
  101. package/esm/preview-text/cascader.mjs.map +1 -1
  102. package/esm/preview-text/color-picker.mjs +1 -1
  103. package/esm/preview-text/color-picker.mjs.map +1 -1
  104. package/esm/preview-text/input.mjs +1 -1
  105. package/esm/preview-text/input.mjs.map +1 -1
  106. package/esm/preview-text/rate.mjs +1 -1
  107. package/esm/preview-text/rate.mjs.map +1 -1
  108. package/esm/preview-text/select.mjs +1 -1
  109. package/esm/preview-text/select.mjs.map +1 -1
  110. package/esm/preview-text/time-picker.mjs +1 -1
  111. package/esm/preview-text/time-picker.mjs.map +1 -1
  112. package/esm/preview-text/tree.mjs.map +1 -1
  113. package/esm/query-form/hooks.mjs +1 -1
  114. package/esm/query-form/hooks.mjs.map +1 -1
  115. package/esm/query-form/index.d.ts +5 -5
  116. package/esm/query-form/query-form-light.mjs +1 -1
  117. package/esm/query-form/query-form-light.mjs.map +1 -1
  118. package/esm/query-form/query-form.mjs +1 -1
  119. package/esm/query-form/query-form.mjs.map +1 -1
  120. package/esm/query-form/types.d.ts +2 -2
  121. package/esm/query-form-item/index.d.ts +1 -152
  122. package/esm/query-form-item/query-form-item.mjs +2 -2
  123. package/esm/query-form-item/query-form-item.mjs.map +1 -1
  124. package/esm/query-form-item/types.d.ts +2 -2
  125. package/esm/radio/index.d.ts +67 -121
  126. package/esm/radio/radio-group.mjs +1 -1
  127. package/esm/radio/radio-group.mjs.map +1 -1
  128. package/esm/rate/index.d.ts +1 -186
  129. package/esm/segmented/index.d.ts +1 -28
  130. package/esm/select/index.d.ts +1 -112
  131. package/esm/select-table/index.d.ts +1 -61
  132. package/esm/select-table/select-table.mjs +1 -1
  133. package/esm/select-table/select-table.mjs.map +1 -1
  134. package/esm/slider/index.d.ts +1 -178
  135. package/esm/submit/submit.mjs.map +1 -1
  136. package/esm/switch/index.d.ts +1 -298
  137. package/esm/time-picker/index.d.ts +1 -446
  138. package/esm/time-select/index.d.ts +1 -188
  139. package/esm/transfer/index.d.ts +1 -268
  140. package/esm/tree/index.d.ts +1 -45
  141. package/esm/tree/tree.mjs +1 -1
  142. package/esm/tree/tree.mjs.map +1 -1
  143. package/esm/tree-select/index.d.ts +1 -19
  144. package/esm/tree-select/tree-select.mjs.map +1 -1
  145. package/esm/upload/index.d.ts +1 -129
  146. package/esm/upload/upload.mjs +1 -1
  147. package/esm/upload/upload.mjs.map +1 -1
  148. package/package.json +18 -14
  149. package/esm/select-table/types.d.ts +0 -22
  150. package/esm/tree/types.d.ts +0 -18
@@ -1,275 +1,8 @@
1
- import * as _$element_plus0 from "element-plus";
2
1
  import { ElTransfer } from "element-plus";
3
- import * as _$vue from "vue";
4
- import * as _$element_plus_es_utils_index_mjs0 from "element-plus/es/utils/index.mjs";
5
- import * as _$element_plus_es_components_transfer_src_transfer_panel_mjs0 from "element-plus/es/components/transfer/src/transfer-panel.mjs";
6
2
 
7
3
  //#region src/transfer/index.d.ts
8
4
  type TransferProps = typeof ElTransfer;
9
- declare const Transfer: _$element_plus_es_utils_index_mjs0.SFCWithInstall<{
10
- new (...args: any[]): _$vue.CreateComponentPublicInstanceWithMixins<Readonly<_$vue.ExtractPropTypes<{
11
- modelValue: {
12
- type: _$vue.PropType<_$element_plus0.TransferKey[]>;
13
- default: () => never[];
14
- };
15
- props: {
16
- type: _$vue.PropType<_$element_plus0.TransferPropsAlias>;
17
- default: () => {
18
- label: string;
19
- key: string;
20
- disabled: string;
21
- };
22
- };
23
- data: {
24
- type: _$vue.PropType<_$element_plus0.TransferDataItem[]>;
25
- default: () => never[];
26
- };
27
- filterable: {
28
- type: _$vue.PropType<boolean>;
29
- };
30
- filterMethod: {
31
- type: _$vue.PropType<(query: string, item: _$element_plus0.TransferDataItem) => boolean>;
32
- };
33
- validateEvent: {
34
- type: _$vue.PropType<boolean>;
35
- default: boolean;
36
- };
37
- format: {
38
- type: _$vue.PropType<_$element_plus0.TransferFormat>;
39
- default: () => {};
40
- };
41
- titles: {
42
- type: _$vue.PropType<[string, string]>;
43
- default: () => [string, string];
44
- };
45
- buttonTexts: {
46
- type: _$vue.PropType<[string, string]>;
47
- default: () => [string, string];
48
- };
49
- filterPlaceholder: {
50
- type: _$vue.PropType<string>;
51
- };
52
- leftDefaultChecked: {
53
- type: _$vue.PropType<_$element_plus0.TransferKey[]>;
54
- default: () => never[];
55
- };
56
- rightDefaultChecked: {
57
- type: _$vue.PropType<_$element_plus0.TransferKey[]>;
58
- default: () => never[];
59
- };
60
- renderContent: {
61
- type: _$vue.PropType<_$element_plus0.renderContent>;
62
- };
63
- targetOrder: {
64
- type: _$vue.PropType<"push" | "unshift" | "original">;
65
- default: string;
66
- };
67
- }>> & {
68
- "onUpdate:modelValue"?: ((value: _$element_plus0.TransferKey[]) => any) | undefined;
69
- onChange?: ((value: _$element_plus0.TransferKey[], direction: _$element_plus0.TransferDirection, movedKeys: _$element_plus0.TransferKey[]) => any) | undefined;
70
- "onLeft-check-change"?: ((value: _$element_plus0.TransferKey[], movedKeys?: _$element_plus0.TransferKey[] | undefined) => any) | undefined;
71
- "onRight-check-change"?: ((value: _$element_plus0.TransferKey[], movedKeys?: _$element_plus0.TransferKey[] | undefined) => any) | undefined;
72
- }, {
73
- clearQuery: (which: _$element_plus0.TransferDirection) => void;
74
- leftPanel: _$vue.Ref<_$element_plus_es_components_transfer_src_transfer_panel_mjs0.TransferPanelInstance | undefined>;
75
- rightPanel: _$vue.Ref<_$element_plus_es_components_transfer_src_transfer_panel_mjs0.TransferPanelInstance | undefined>;
76
- }, unknown, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
77
- "update:modelValue": (value: _$element_plus0.TransferKey[]) => void;
78
- change: (value: _$element_plus0.TransferKey[], direction: _$element_plus0.TransferDirection, movedKeys: _$element_plus0.TransferKey[]) => void;
79
- "left-check-change": (value: _$element_plus0.TransferKey[], movedKeys?: _$element_plus0.TransferKey[] | undefined) => void;
80
- "right-check-change": (value: _$element_plus0.TransferKey[], movedKeys?: _$element_plus0.TransferKey[] | undefined) => void;
81
- }, _$vue.PublicProps, {
82
- data: _$element_plus0.TransferDataItem[];
83
- props: _$element_plus0.TransferPropsAlias;
84
- titles: [string, string];
85
- modelValue: _$element_plus0.TransferKey[];
86
- format: _$element_plus0.TransferFormat;
87
- validateEvent: boolean;
88
- buttonTexts: [string, string];
89
- leftDefaultChecked: _$element_plus0.TransferKey[];
90
- rightDefaultChecked: _$element_plus0.TransferKey[];
91
- targetOrder: "original" | "push" | "unshift";
92
- }, true, {}, {}, _$vue.GlobalComponents, _$vue.GlobalDirectives, string, {}, any, _$vue.ComponentProvideOptions, {
93
- P: {};
94
- B: {};
95
- D: {};
96
- C: {};
97
- M: {};
98
- Defaults: {};
99
- }, Readonly<_$vue.ExtractPropTypes<{
100
- modelValue: {
101
- type: _$vue.PropType<_$element_plus0.TransferKey[]>;
102
- default: () => never[];
103
- };
104
- props: {
105
- type: _$vue.PropType<_$element_plus0.TransferPropsAlias>;
106
- default: () => {
107
- label: string;
108
- key: string;
109
- disabled: string;
110
- };
111
- };
112
- data: {
113
- type: _$vue.PropType<_$element_plus0.TransferDataItem[]>;
114
- default: () => never[];
115
- };
116
- filterable: {
117
- type: _$vue.PropType<boolean>;
118
- };
119
- filterMethod: {
120
- type: _$vue.PropType<(query: string, item: _$element_plus0.TransferDataItem) => boolean>;
121
- };
122
- validateEvent: {
123
- type: _$vue.PropType<boolean>;
124
- default: boolean;
125
- };
126
- format: {
127
- type: _$vue.PropType<_$element_plus0.TransferFormat>;
128
- default: () => {};
129
- };
130
- titles: {
131
- type: _$vue.PropType<[string, string]>;
132
- default: () => [string, string];
133
- };
134
- buttonTexts: {
135
- type: _$vue.PropType<[string, string]>;
136
- default: () => [string, string];
137
- };
138
- filterPlaceholder: {
139
- type: _$vue.PropType<string>;
140
- };
141
- leftDefaultChecked: {
142
- type: _$vue.PropType<_$element_plus0.TransferKey[]>;
143
- default: () => never[];
144
- };
145
- rightDefaultChecked: {
146
- type: _$vue.PropType<_$element_plus0.TransferKey[]>;
147
- default: () => never[];
148
- };
149
- renderContent: {
150
- type: _$vue.PropType<_$element_plus0.renderContent>;
151
- };
152
- targetOrder: {
153
- type: _$vue.PropType<"push" | "unshift" | "original">;
154
- default: string;
155
- };
156
- }>> & {
157
- "onUpdate:modelValue"?: ((value: _$element_plus0.TransferKey[]) => any) | undefined;
158
- onChange?: ((value: _$element_plus0.TransferKey[], direction: _$element_plus0.TransferDirection, movedKeys: _$element_plus0.TransferKey[]) => any) | undefined;
159
- "onLeft-check-change"?: ((value: _$element_plus0.TransferKey[], movedKeys?: _$element_plus0.TransferKey[] | undefined) => any) | undefined;
160
- "onRight-check-change"?: ((value: _$element_plus0.TransferKey[], movedKeys?: _$element_plus0.TransferKey[] | undefined) => any) | undefined;
161
- }, {
162
- clearQuery: (which: _$element_plus0.TransferDirection) => void;
163
- leftPanel: _$vue.Ref<_$element_plus_es_components_transfer_src_transfer_panel_mjs0.TransferPanelInstance | undefined>;
164
- rightPanel: _$vue.Ref<_$element_plus_es_components_transfer_src_transfer_panel_mjs0.TransferPanelInstance | undefined>;
165
- }, {}, {}, {}, {
166
- data: _$element_plus0.TransferDataItem[];
167
- props: _$element_plus0.TransferPropsAlias;
168
- titles: [string, string];
169
- modelValue: _$element_plus0.TransferKey[];
170
- format: _$element_plus0.TransferFormat;
171
- validateEvent: boolean;
172
- buttonTexts: [string, string];
173
- leftDefaultChecked: _$element_plus0.TransferKey[];
174
- rightDefaultChecked: _$element_plus0.TransferKey[];
175
- targetOrder: "original" | "push" | "unshift";
176
- }>;
177
- __isFragment?: never;
178
- __isTeleport?: never;
179
- __isSuspense?: never;
180
- } & _$vue.ComponentOptionsBase<Readonly<_$vue.ExtractPropTypes<{
181
- modelValue: {
182
- type: _$vue.PropType<_$element_plus0.TransferKey[]>;
183
- default: () => never[];
184
- };
185
- props: {
186
- type: _$vue.PropType<_$element_plus0.TransferPropsAlias>;
187
- default: () => {
188
- label: string;
189
- key: string;
190
- disabled: string;
191
- };
192
- };
193
- data: {
194
- type: _$vue.PropType<_$element_plus0.TransferDataItem[]>;
195
- default: () => never[];
196
- };
197
- filterable: {
198
- type: _$vue.PropType<boolean>;
199
- };
200
- filterMethod: {
201
- type: _$vue.PropType<(query: string, item: _$element_plus0.TransferDataItem) => boolean>;
202
- };
203
- validateEvent: {
204
- type: _$vue.PropType<boolean>;
205
- default: boolean;
206
- };
207
- format: {
208
- type: _$vue.PropType<_$element_plus0.TransferFormat>;
209
- default: () => {};
210
- };
211
- titles: {
212
- type: _$vue.PropType<[string, string]>;
213
- default: () => [string, string];
214
- };
215
- buttonTexts: {
216
- type: _$vue.PropType<[string, string]>;
217
- default: () => [string, string];
218
- };
219
- filterPlaceholder: {
220
- type: _$vue.PropType<string>;
221
- };
222
- leftDefaultChecked: {
223
- type: _$vue.PropType<_$element_plus0.TransferKey[]>;
224
- default: () => never[];
225
- };
226
- rightDefaultChecked: {
227
- type: _$vue.PropType<_$element_plus0.TransferKey[]>;
228
- default: () => never[];
229
- };
230
- renderContent: {
231
- type: _$vue.PropType<_$element_plus0.renderContent>;
232
- };
233
- targetOrder: {
234
- type: _$vue.PropType<"push" | "unshift" | "original">;
235
- default: string;
236
- };
237
- }>> & {
238
- "onUpdate:modelValue"?: ((value: _$element_plus0.TransferKey[]) => any) | undefined;
239
- onChange?: ((value: _$element_plus0.TransferKey[], direction: _$element_plus0.TransferDirection, movedKeys: _$element_plus0.TransferKey[]) => any) | undefined;
240
- "onLeft-check-change"?: ((value: _$element_plus0.TransferKey[], movedKeys?: _$element_plus0.TransferKey[] | undefined) => any) | undefined;
241
- "onRight-check-change"?: ((value: _$element_plus0.TransferKey[], movedKeys?: _$element_plus0.TransferKey[] | undefined) => any) | undefined;
242
- }, {
243
- clearQuery: (which: _$element_plus0.TransferDirection) => void;
244
- leftPanel: _$vue.Ref<_$element_plus_es_components_transfer_src_transfer_panel_mjs0.TransferPanelInstance | undefined>;
245
- rightPanel: _$vue.Ref<_$element_plus_es_components_transfer_src_transfer_panel_mjs0.TransferPanelInstance | undefined>;
246
- }, unknown, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
247
- "update:modelValue": (value: _$element_plus0.TransferKey[]) => void;
248
- change: (value: _$element_plus0.TransferKey[], direction: _$element_plus0.TransferDirection, movedKeys: _$element_plus0.TransferKey[]) => void;
249
- "left-check-change": (value: _$element_plus0.TransferKey[], movedKeys?: _$element_plus0.TransferKey[] | undefined) => void;
250
- "right-check-change": (value: _$element_plus0.TransferKey[], movedKeys?: _$element_plus0.TransferKey[] | undefined) => void;
251
- }, string, {
252
- data: _$element_plus0.TransferDataItem[];
253
- props: _$element_plus0.TransferPropsAlias;
254
- titles: [string, string];
255
- modelValue: _$element_plus0.TransferKey[];
256
- format: _$element_plus0.TransferFormat;
257
- validateEvent: boolean;
258
- buttonTexts: [string, string];
259
- leftDefaultChecked: _$element_plus0.TransferKey[];
260
- rightDefaultChecked: _$element_plus0.TransferKey[];
261
- targetOrder: "original" | "push" | "unshift";
262
- }, {}, string, {}, _$vue.GlobalComponents, _$vue.GlobalDirectives, string, _$vue.ComponentProvideOptions> & _$vue.VNodeProps & _$vue.AllowedComponentProps & _$vue.ComponentCustomProps & (new () => {
263
- $slots: {
264
- 'left-empty'?: (props: {}) => any;
265
- } & {
266
- 'left-footer'?: (props: {}) => any;
267
- } & {
268
- 'right-empty'?: (props: {}) => any;
269
- } & {
270
- 'right-footer'?: (props: {}) => any;
271
- };
272
- })>;
5
+ declare const Transfer: any;
273
6
  //#endregion
274
7
  export { Transfer, TransferProps };
275
8
  //# sourceMappingURL=index.d.ts.map
@@ -1,49 +1,5 @@
1
- import { TreeValueTypeProps } from "./types.js";
2
- import * as _$vue from "vue";
3
-
4
1
  //#region src/tree/index.d.ts
5
- declare const Tree: {
6
- new (...args: any[]): _$vue.CreateComponentPublicInstanceWithMixins<Readonly<TreeValueTypeProps> & Readonly<{
7
- "onUpdate:modelValue"?: (value: any) => any;
8
- }>, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
9
- "update:modelValue": (value: any) => any;
10
- }, _$vue.PublicProps, {
11
- props: any;
12
- valueType: "all" | "parent" | "child" | "path";
13
- optionAsValue: boolean;
14
- includeHalfChecked: boolean;
15
- }, false, {}, {}, _$vue.GlobalComponents, _$vue.GlobalDirectives, string, {}, any, _$vue.ComponentProvideOptions, {
16
- P: {};
17
- B: {};
18
- D: {};
19
- C: {};
20
- M: {};
21
- Defaults: {};
22
- }, Readonly<TreeValueTypeProps> & Readonly<{
23
- "onUpdate:modelValue"?: (value: any) => any;
24
- }>, {}, {}, {}, {}, {
25
- props: any;
26
- valueType: "all" | "parent" | "child" | "path";
27
- optionAsValue: boolean;
28
- includeHalfChecked: boolean;
29
- }>;
30
- __isFragment?: never;
31
- __isTeleport?: never;
32
- __isSuspense?: never;
33
- } & _$vue.ComponentOptionsBase<Readonly<TreeValueTypeProps> & Readonly<{
34
- "onUpdate:modelValue"?: (value: any) => any;
35
- }>, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
36
- "update:modelValue": (value: any) => any;
37
- }, string, {
38
- props: any;
39
- valueType: "all" | "parent" | "child" | "path";
40
- optionAsValue: boolean;
41
- includeHalfChecked: boolean;
42
- }, {}, string, {}, _$vue.GlobalComponents, _$vue.GlobalDirectives, string, _$vue.ComponentProvideOptions> & _$vue.VNodeProps & _$vue.AllowedComponentProps & _$vue.ComponentCustomProps & (new () => {
43
- $slots: {
44
- [x: string]: (props: any) => any;
45
- };
46
- });
2
+ declare const Tree: any;
47
3
  //#endregion
48
4
  export { Tree };
49
5
  //# sourceMappingURL=index.d.ts.map
package/esm/tree/tree.mjs CHANGED
@@ -3,7 +3,7 @@ import { addDisabledToNodes, flattenTree, getInputKeys, getOutputData } from "./
3
3
  import { ElScrollbar, ElTree, vLoading } from "element-plus";
4
4
  import { computed, createBlock, createSlots, defineComponent, guardReactiveProps, mergeProps, nextTick, normalizeProps, openBlock, ref, renderList, renderSlot, unref, useSlots, watch, withCtx, withDirectives } from "vue";
5
5
  import { useField } from "@silver-formily/vue";
6
- import { isFn } from "@formily/shared";
6
+ import { isFn } from "@silver-formily/shared";
7
7
  //#region src/tree/tree.vue
8
8
  const _sfc_main = /* @__PURE__ */ defineComponent({
9
9
  name: "Tree",
@@ -1 +1 @@
1
- {"version":3,"file":"tree.mjs","names":[],"sources":["../../src/tree/tree.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { Field } from '@formily/core'\nimport type { TreeValueTypeProps } from './types'\nimport { isFn } from '@formily/shared'\nimport { useField } from '@silver-formily/vue'\nimport { ElScrollbar, ElTree, vLoading } from 'element-plus'\nimport { computed, nextTick, ref, useSlots, watch } from 'vue'\nimport { useCleanAttrs } from '../__builtins__'\nimport { addDisabledToNodes, flattenTree, getInputKeys, getOutputData } from './utils'\n\ndefineOptions({\n name: 'Tree',\n inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<TreeValueTypeProps>(), {\n valueType: 'all',\n optionAsValue: false,\n includeHalfChecked: false,\n props: {\n children: 'children',\n label: 'label',\n disabled: 'disabled',\n },\n})\n\nconst emit = defineEmits<{\n 'update:modelValue': [value: any]\n}>()\n\nconst slots = useSlots()\n\nconst { props: attrs } = useCleanAttrs()\nconst treeRef = ref<InstanceType<typeof ElTree>>()\nconst checkedKeys = ref<any[]>([])\n\nconst processedData = computed(() => {\n return addDisabledToNodes(props.data ?? [], attrs.value.disabled, props.props)\n})\n\nconst flatData = computed(() => flattenTree(processedData.value ?? [], [], props.props.children))\n\nasync function handleCheck() {\n await nextTick()\n const keys = treeRef.value.getCheckedKeys()\n const halfCheckedKeys = treeRef.value.getHalfCheckedKeys() || []\n checkedKeys.value = keys\n\n const { value, nodes } = getOutputData(keys, halfCheckedKeys, {\n flatData: flatData.value,\n nodeKey: props.nodeKey,\n propsConfig: props.props,\n data: props.data ?? [],\n valueType: props.valueType,\n includeHalfChecked: props.includeHalfChecked,\n checkStrictly: attrs.value.checkStrictly,\n })\n\n if (props.optionAsValue) {\n isFn(props.optionFormatter)\n ? emit('update:modelValue', nodes.map((element, index, array) => {\n return props.optionFormatter(element, index, array)\n }))\n : emit('update:modelValue', nodes)\n }\n else {\n emit('update:modelValue', value)\n }\n}\n\nwatch(() => props.modelValue, (newValue) => {\n if (newValue !== undefined) {\n checkedKeys.value = getInputKeys(newValue, {\n optionAsValue: props.optionAsValue,\n nodeKey: props.nodeKey,\n flatData: flatData.value,\n propsConfig: props.props,\n data: props.data ?? [],\n valueType: props.valueType,\n checkStrictly: attrs.value.checkStrictly,\n })\n nextTick(() => {\n if (treeRef.value) {\n treeRef.value.setCheckedKeys(checkedKeys.value)\n }\n })\n }\n}, { immediate: true })\n\nwatch(() => [props.valueType, props.optionAsValue, props.includeHalfChecked], () => {\n handleCheck()\n}, { immediate: false })\n\nconst fieldRef = useField<Field>()\nfieldRef.value?.inject({\n getTreeRef: () => {\n return treeRef\n },\n})\n</script>\n\n<template>\n <ElScrollbar :height=\"props.height\" :max-height=\"props.maxHeight\">\n <ElTree\n ref=\"treeRef\"\n v-loading=\"attrs.loading\"\n :data=\"processedData\"\n :props=\"props.props\"\n :node-key=\"props.nodeKey\"\n :default-checked-keys=\"checkedKeys\"\n :show-checkbox=\"true\"\n v-bind=\"attrs\"\n @check=\"handleCheck\"\n >\n <template v-for=\"(_, name) of slots\" #[name]=\"slotData\">\n <slot :name=\"name\" v-bind=\"{ field: fieldRef, ...slotData }\" />\n </template>\n </ElTree>\n </ElScrollbar>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAeA,MAAM,QAAQ;EAWd,MAAM,OAAO;EAIb,MAAM,QAAQ,UAAS;EAEvB,MAAM,EAAE,OAAO,UAAU,eAAc;EACvC,MAAM,UAAU,KAAiC;EACjD,MAAM,cAAc,IAAW,EAAE,CAAA;EAEjC,MAAM,gBAAgB,eAAe;AACnC,UAAO,mBAAmB,MAAM,QAAQ,EAAE,EAAE,MAAM,MAAM,UAAU,MAAM,MAAK;IAC9E;EAED,MAAM,WAAW,eAAe,YAAY,cAAc,SAAS,EAAE,EAAE,EAAE,EAAE,MAAM,MAAM,SAAS,CAAA;EAEhG,eAAe,cAAc;AAC3B,SAAM,UAAS;GACf,MAAM,OAAO,QAAQ,MAAM,gBAAe;GAC1C,MAAM,kBAAkB,QAAQ,MAAM,oBAAoB,IAAI,EAAC;AAC/D,eAAY,QAAQ;GAEpB,MAAM,EAAE,OAAO,UAAU,cAAc,MAAM,iBAAiB;IAC5D,UAA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CAAA,WAEW,MAAA,MAAK,GAAjB,GAAG,SAAI;;MAAa;mBAAQ,aAAQ,CACpD,WAA+D,KAAA,QAAlD,MAAI,eAAA,mBAAA;OAAA,OAAmB,MAAA,SAAQ;OAAA,GAAK;OAAQ,CAAA,CAAA,CAAA,CAAA,CAAA;;;;;;;4BAVhD,MAAA,MAAK,CAAC,QAAO,CAAA,CAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"tree.mjs","names":[],"sources":["../../src/tree/tree.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { Field } from '@silver-formily/core'\nimport type { TreeValueTypeProps } from './types'\nimport { isFn } from '@silver-formily/shared'\nimport { useField } from '@silver-formily/vue'\nimport { ElScrollbar, ElTree, vLoading } from 'element-plus'\nimport { computed, nextTick, ref, useSlots, watch } from 'vue'\nimport { useCleanAttrs } from '../__builtins__'\nimport { addDisabledToNodes, flattenTree, getInputKeys, getOutputData } from './utils'\n\ndefineOptions({\n name: 'Tree',\n inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<TreeValueTypeProps>(), {\n valueType: 'all',\n optionAsValue: false,\n includeHalfChecked: false,\n props: {\n children: 'children',\n label: 'label',\n disabled: 'disabled',\n },\n})\n\nconst emit = defineEmits<{\n 'update:modelValue': [value: any]\n}>()\n\nconst slots = useSlots()\n\nconst { props: attrs } = useCleanAttrs()\nconst treeRef = ref<InstanceType<typeof ElTree>>()\nconst checkedKeys = ref<any[]>([])\n\nconst processedData = computed(() => {\n return addDisabledToNodes(props.data ?? [], attrs.value.disabled, props.props)\n})\n\nconst flatData = computed(() => flattenTree(processedData.value ?? [], [], props.props.children))\n\nasync function handleCheck() {\n await nextTick()\n const keys = treeRef.value.getCheckedKeys()\n const halfCheckedKeys = treeRef.value.getHalfCheckedKeys() || []\n checkedKeys.value = keys\n\n const { value, nodes } = getOutputData(keys, halfCheckedKeys, {\n flatData: flatData.value,\n nodeKey: props.nodeKey,\n propsConfig: props.props,\n data: props.data ?? [],\n valueType: props.valueType,\n includeHalfChecked: props.includeHalfChecked,\n checkStrictly: attrs.value.checkStrictly,\n })\n\n if (props.optionAsValue) {\n isFn(props.optionFormatter)\n ? emit('update:modelValue', nodes.map((element, index, array) => {\n return props.optionFormatter(element, index, array)\n }))\n : emit('update:modelValue', nodes)\n }\n else {\n emit('update:modelValue', value)\n }\n}\n\nwatch(() => props.modelValue, (newValue) => {\n if (newValue !== undefined) {\n checkedKeys.value = getInputKeys(newValue, {\n optionAsValue: props.optionAsValue,\n nodeKey: props.nodeKey,\n flatData: flatData.value,\n propsConfig: props.props,\n data: props.data ?? [],\n valueType: props.valueType,\n checkStrictly: attrs.value.checkStrictly,\n })\n nextTick(() => {\n if (treeRef.value) {\n treeRef.value.setCheckedKeys(checkedKeys.value)\n }\n })\n }\n}, { immediate: true })\n\nwatch(() => [props.valueType, props.optionAsValue, props.includeHalfChecked], () => {\n handleCheck()\n}, { immediate: false })\n\nconst fieldRef = useField<Field>()\nfieldRef.value?.inject({\n getTreeRef: () => {\n return treeRef\n },\n})\n</script>\n\n<template>\n <ElScrollbar :height=\"props.height\" :max-height=\"props.maxHeight\">\n <ElTree\n ref=\"treeRef\"\n v-loading=\"attrs.loading\"\n :data=\"processedData\"\n :props=\"props.props\"\n :node-key=\"props.nodeKey\"\n :default-checked-keys=\"checkedKeys\"\n :show-checkbox=\"true\"\n v-bind=\"attrs\"\n @check=\"handleCheck\"\n >\n <template v-for=\"(_, name) of slots\" #[name]=\"slotData\">\n <slot :name=\"name\" v-bind=\"{ field: fieldRef, ...slotData }\" />\n </template>\n </ElTree>\n </ElScrollbar>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAeA,MAAM,QAAQ;EAWd,MAAM,OAAO;EAIb,MAAM,QAAQ,UAAS;EAEvB,MAAM,EAAE,OAAO,UAAU,eAAc;EACvC,MAAM,UAAU,KAAiC;EACjD,MAAM,cAAc,IAAW,EAAE,CAAA;EAEjC,MAAM,gBAAgB,eAAe;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ACjC,WAAS,OAAO,OAAO,EACrB,kBAAkB;AAChB,UAAO;KAEV,CAAA;;uBAIC,YAgBc,MAAA,YAAA,EAAA;IAhBA,QAAQ,MAAM;IAAS,cAAY,MAAM;;2BAe5C,CAAA,gBAAA,WAAA,EAdT,YAcS,MAAA,OAAA,EAdT,WAcS;cAbH;KAAJ,KAAI;KAEH,MAAM,cAAA;KACN,OAAO,MAAM;KACb,YAAU,MAAM;KAChB,wBAAsB,YAAA;KACtB,iBAAe;OACR,MAAA,MAAK,EAAA,EACZ,SAAO,aAAW,CAAA,EAAA,YAAA,EAAA,GAAA,GAAA,EAAA,CAAA,WAEW,MAAA,MAAK,GAAjB,GAAG,SAAI;;MAAa;mBAAQ,aAAQ,CACpD,WAA+D,KAAA,QAAlD,MAAI,eAAA,mBAAA;OAAA,OAAmB,MAAA,SAAQ;OAAA,GAAK;OAAQ,CAAA,CAAA,CAAA,CAAA,CAAA;;;;;;;4BAVhD,MAAA,MAAK,CAAC,QAAO,CAAA,CAAA,CAAA,CAAA"}
@@ -1,23 +1,5 @@
1
- import * as _$vue from "vue";
2
-
3
1
  //#region src/tree-select/index.d.ts
4
- declare const TreeSelect: {
5
- new (...args: any[]): _$vue.CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, _$vue.PublicProps, {}, true, {}, {}, _$vue.GlobalComponents, _$vue.GlobalDirectives, string, {}, any, _$vue.ComponentProvideOptions, {
6
- P: {};
7
- B: {};
8
- D: {};
9
- C: {};
10
- M: {};
11
- Defaults: {};
12
- }, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, {}>;
13
- __isFragment?: never;
14
- __isTeleport?: never;
15
- __isSuspense?: never;
16
- } & _$vue.ComponentOptionsBase<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, {}, {}, string, {}, _$vue.GlobalComponents, _$vue.GlobalDirectives, string, _$vue.ComponentProvideOptions> & _$vue.VNodeProps & _$vue.AllowedComponentProps & _$vue.ComponentCustomProps & (new () => {
17
- $slots: {
18
- [x: string]: (props: any) => any;
19
- };
20
- });
2
+ declare const TreeSelect: any;
21
3
  //#endregion
22
4
  export { TreeSelect };
23
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tree-select.mjs","names":[],"sources":["../../src/tree-select/tree-select.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { Field } from '@formily/core'\nimport { useField } from '@silver-formily/vue'\nimport { ElTreeSelect } from 'element-plus'\nimport { ref, useSlots } from 'vue'\nimport { useCleanAttrs } from '../__builtins__'\n\ndefineOptions({\n name: 'FSelectTree',\n inheritAttrs: false,\n})\n\nconst slots = useSlots()\n\nconst { props: attrs } = useCleanAttrs()\n\nconst treeSelectRef = ref()\n\nconst fieldRef = useField<Field>()\n\nfieldRef.value?.inject({\n getTreeSelectRef: () => {\n return treeSelectRef\n },\n})\n</script>\n\n<template>\n <ElTreeSelect\n ref=\"treeSelectRef\"\n :loading=\"fieldRef.value?.loading\"\n v-bind=\"attrs\"\n >\n <template v-for=\"(_, name) of slots\" #[name]=\"slotData\">\n <slot :name=\"name\" v-bind=\"{ field: fieldRef, ...slotData }\" />\n </template>\n </ElTreeSelect>\n</template>\n"],"mappings":";;;;;;;;;;EAYA,MAAM,QAAQ,UAAS;EAEvB,MAAM,EAAE,OAAO,UAAU,eAAc;EAEvC,MAAM,gBAAgB,KAAI;EAE1B,MAAM,WAAW,UAAgB;AAEjC,WAAS,OAAO,OAAO,EACrB,wBAAwB;AACtB,UAAO;KAEV,CAAA;;uBAIC,YAQe,MAAA,aAAA,EARf,WAQe;aAPT;IAAJ,KAAI;IACH,SAAS,MAAA,SAAQ,CAAC,OAAO;MAClB,MAAA,MAAK,CAAA,EAAA,YAAA,EAAA,GAAA,GAAA,EAAA,CAAA,WAEiB,MAAA,MAAK,GAAjB,GAAG,SAAI;;KAAa;kBAAQ,aAAQ,CACpD,WAA+D,KAAA,QAAlD,MAAI,eAAA,mBAAA;MAAA,OAAmB,MAAA,SAAQ;MAAA,GAAK;MAAQ,CAAA,CAAA,CAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"tree-select.mjs","names":[],"sources":["../../src/tree-select/tree-select.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { Field } from '@silver-formily/core'\nimport { useField } from '@silver-formily/vue'\nimport { ElTreeSelect } from 'element-plus'\nimport { ref, useSlots } from 'vue'\nimport { useCleanAttrs } from '../__builtins__'\n\ndefineOptions({\n name: 'FSelectTree',\n inheritAttrs: false,\n})\n\nconst slots = useSlots()\n\nconst { props: attrs } = useCleanAttrs()\n\nconst treeSelectRef = ref()\n\nconst fieldRef = useField<Field>()\n\nfieldRef.value?.inject({\n getTreeSelectRef: () => {\n return treeSelectRef\n },\n})\n</script>\n\n<template>\n <ElTreeSelect\n ref=\"treeSelectRef\"\n :loading=\"fieldRef.value?.loading\"\n v-bind=\"attrs\"\n >\n <template v-for=\"(_, name) of slots\" #[name]=\"slotData\">\n <slot :name=\"name\" v-bind=\"{ field: fieldRef, ...slotData }\" />\n </template>\n </ElTreeSelect>\n</template>\n"],"mappings":";;;;;;;;;;EAYA,MAAM,QAAQ,UAAS;EAEvB,MAAM,EAAE,OAAO,UAAU,eAAc;EAEvC,MAAM,gBAAgB,KAAI;EAE1B,MAAM,WAAW,UAAgB;AAEjC,WAAS,OAAO,OAAO,EACrB,wBAAwB;AACtB,UAAO;KAEV,CAAA;;uBAIC,YAQe,MAAA,aAAA,EARf,WAQe;aAPT;IAAJ,KAAI;IACH,SAAS,MAAA,SAAQ,CAAC,OAAO;MAClB,MAAA,MAAK,CAAA,EAAA,YAAA,EAAA,GAAA,GAAA,EAAA,CAAA,WAEiB,MAAA,MAAK,GAAjB,GAAG,SAAI;;KAAa;kBAAQ,aAAQ,CACpD,WAA+D,KAAA,QAAlD,MAAI,eAAA,mBAAA;MAAA,OAAmB,MAAA,SAAQ;MAAA,GAAK;MAAQ,CAAA,CAAA,CAAA,CAAA,CAAA"}
@@ -1,133 +1,5 @@
1
- import * as _$element_plus0 from "element-plus";
2
- import * as _$vue from "vue";
3
-
4
1
  //#region src/upload/index.d.ts
5
- declare const Upload: {
6
- new (...args: any[]): _$vue.CreateComponentPublicInstanceWithMixins<Readonly<_$vue.ExtractPropTypes<{
7
- textContent: {
8
- type: StringConstructor;
9
- default: string;
10
- };
11
- errorAdaptor: {
12
- type: _$vue.PropType<(error?: Error) => string>;
13
- default: (error?: Error) => string;
14
- };
15
- formatValue: {
16
- type: _$vue.PropType<(fileList?: _$element_plus0.UploadFile[]) => any>;
17
- default: (item: any) => any;
18
- };
19
- fileList: {
20
- type: _$vue.PropType<_$element_plus0.UploadFile[]>;
21
- default: () => any[];
22
- };
23
- imageViewerProps: {
24
- type: _$vue.PropType<_$element_plus0.ImageViewerProps>;
25
- default: () => {
26
- teleported: boolean;
27
- showProgress: boolean;
28
- };
29
- };
30
- }>> & Readonly<{
31
- "onUpdate:modelValue"?: (...args: any[]) => any;
32
- }>, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
33
- "update:modelValue": (...args: any[]) => void;
34
- }, _$vue.PublicProps, {
35
- textContent: string;
36
- errorAdaptor: (error?: Error) => string;
37
- formatValue: (fileList?: _$element_plus0.UploadFile[]) => any;
38
- fileList: _$element_plus0.UploadFile[];
39
- imageViewerProps: _$element_plus0.ImageViewerProps;
40
- }, true, {}, {}, _$vue.GlobalComponents, _$vue.GlobalDirectives, string, {}, any, _$vue.ComponentProvideOptions, {
41
- P: {};
42
- B: {};
43
- D: {};
44
- C: {};
45
- M: {};
46
- Defaults: {};
47
- }, Readonly<_$vue.ExtractPropTypes<{
48
- textContent: {
49
- type: StringConstructor;
50
- default: string;
51
- };
52
- errorAdaptor: {
53
- type: _$vue.PropType<(error?: Error) => string>;
54
- default: (error?: Error) => string;
55
- };
56
- formatValue: {
57
- type: _$vue.PropType<(fileList?: _$element_plus0.UploadFile[]) => any>;
58
- default: (item: any) => any;
59
- };
60
- fileList: {
61
- type: _$vue.PropType<_$element_plus0.UploadFile[]>;
62
- default: () => any[];
63
- };
64
- imageViewerProps: {
65
- type: _$vue.PropType<_$element_plus0.ImageViewerProps>;
66
- default: () => {
67
- teleported: boolean;
68
- showProgress: boolean;
69
- };
70
- };
71
- }>> & Readonly<{
72
- "onUpdate:modelValue"?: (...args: any[]) => any;
73
- }>, {}, {}, {}, {}, {
74
- textContent: string;
75
- errorAdaptor: (error?: Error) => string;
76
- formatValue: (fileList?: _$element_plus0.UploadFile[]) => any;
77
- fileList: _$element_plus0.UploadFile[];
78
- imageViewerProps: _$element_plus0.ImageViewerProps;
79
- }>;
80
- __isFragment?: never;
81
- __isTeleport?: never;
82
- __isSuspense?: never;
83
- } & _$vue.ComponentOptionsBase<Readonly<_$vue.ExtractPropTypes<{
84
- textContent: {
85
- type: StringConstructor;
86
- default: string;
87
- };
88
- errorAdaptor: {
89
- type: _$vue.PropType<(error?: Error) => string>;
90
- default: (error?: Error) => string;
91
- };
92
- formatValue: {
93
- type: _$vue.PropType<(fileList?: _$element_plus0.UploadFile[]) => any>;
94
- default: (item: any) => any;
95
- };
96
- fileList: {
97
- type: _$vue.PropType<_$element_plus0.UploadFile[]>;
98
- default: () => any[];
99
- };
100
- imageViewerProps: {
101
- type: _$vue.PropType<_$element_plus0.ImageViewerProps>;
102
- default: () => {
103
- teleported: boolean;
104
- showProgress: boolean;
105
- };
106
- };
107
- }>> & Readonly<{
108
- "onUpdate:modelValue"?: (...args: any[]) => any;
109
- }>, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
110
- "update:modelValue": (...args: any[]) => void;
111
- }, string, {
112
- textContent: string;
113
- errorAdaptor: (error?: Error) => string;
114
- formatValue: (fileList?: _$element_plus0.UploadFile[]) => any;
115
- fileList: _$element_plus0.UploadFile[];
116
- imageViewerProps: _$element_plus0.ImageViewerProps;
117
- }, {}, string, {}, _$vue.GlobalComponents, _$vue.GlobalDirectives, string, _$vue.ComponentProvideOptions> & _$vue.VNodeProps & _$vue.AllowedComponentProps & _$vue.ComponentCustomProps & (new () => {
118
- $slots: {
119
- default?: (props: {}) => any;
120
- } & {
121
- file?: (props: {
122
- file: _$element_plus0.UploadFile;
123
- index: number;
124
- }) => any;
125
- } & {
126
- tip?: (props: {}) => any;
127
- } & {
128
- trigger?: (props: {}) => any;
129
- };
130
- });
2
+ declare const Upload: any;
131
3
  //#endregion
132
4
  export { Upload };
133
5
  //# sourceMappingURL=index.d.ts.map
@@ -3,7 +3,7 @@ import { ElButton, ElIcon, ElImageViewer, ElUpload, genFileId } from "element-pl
3
3
  import { reactionWatch } from "@silver-formily/reactive-vue";
4
4
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createVNode, defineComponent, mergeProps, openBlock, ref, renderSlot, toDisplayString, unref, useAttrs as useAttrs$1, withCtx } from "vue";
5
5
  import { useField } from "@silver-formily/vue";
6
- import { isFn } from "@formily/shared";
6
+ import { isFn } from "@silver-formily/shared";
7
7
  import { omit } from "lodash-es";
8
8
  import { Plus, Upload, UploadFilled } from "@element-plus/icons-vue";
9
9
  //#region src/upload/upload.vue
@@ -1 +1 @@
1
- {"version":3,"file":"upload.mjs","names":["$props","$slots"],"sources":["../../src/upload/upload.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { Field } from '@formily/core'\nimport type { ImageViewerInstance, ImageViewerProps, UploadFile, UploadInstance, UploadProps, UploadRawFile } from 'element-plus'\nimport type { PropType } from 'vue'\nimport {\n Plus as PlusIcon,\n UploadFilled as UploadFilledIcon,\n Upload as UploadIcon,\n} from '@element-plus/icons-vue'\nimport { isFn } from '@formily/shared'\nimport { reactionWatch } from '@silver-formily/reactive-vue'\nimport { useField } from '@silver-formily/vue'\nimport { ElButton, ElIcon, ElImageViewer, ElUpload, genFileId } from 'element-plus'\nimport { omit } from 'lodash-es'\nimport { computed, ref, useAttrs } from 'vue'\nimport { hasSlotContent } from '../__builtins__'\n\ndefineOptions({\n name: 'FUpload',\n inheritAttrs: false,\n})\n\nconst props = defineProps({\n textContent: {\n type: String,\n default: '',\n },\n errorAdaptor: {\n type: Function as PropType<(error?: Error) => string>,\n default: (error?: Error) => error?.message,\n },\n formatValue: {\n type: Function as PropType<(fileList?: UploadFile[]) => any>,\n default: item => item,\n },\n fileList: {\n type: Array as PropType<UploadFile[]>,\n default: () => [],\n },\n imageViewerProps: {\n type: Object as PropType<ImageViewerProps>,\n default: () => ({ teleported: true, showProgress: true }),\n },\n})\n\nconst emit = defineEmits(['update:modelValue'])\n\nconst uploadRef = ref<UploadInstance>()\nconst attrs = useAttrs() as UploadProps\nconst innerAttrs = computed(() => {\n return omit(attrs, [\n 'onChange',\n 'onRemove',\n 'onExceed',\n 'onError',\n 'onPreview',\n 'fileList',\n 'onUpdate:fileList',\n ])\n})\nconst fieldRef = useField<Field>()\nfieldRef.value?.inject({\n getElUploadRef: () => {\n return uploadRef\n },\n})\n\nconst imgPreviewRef = ref<ImageViewerInstance>()\nconst activeImageIndex = ref(0)\nconst isShowImgViewer = ref(false)\nconst imgPreviewList = computed(() => {\n return props.fileList.map(item => item.url)\n})\n\nfunction setFeedBack(error?: Error) {\n const message = props.errorAdaptor(error)\n fieldRef.value?.setFeedback({\n type: 'error',\n code: 'UploadError',\n messages: message ? [message] : [],\n })\n}\n\nfunction handleChange(file: UploadFile, fileList: UploadFile[]) {\n fieldRef.value?.setDataSource([...fileList])\n setFeedBack()\n}\n\nfunction handleRemove(file: UploadFile, fileList: UploadFile[]) {\n if (isFn(attrs.onRemove)) {\n attrs.onRemove(file, fileList)\n }\n fieldRef.value.setDataSource([...fileList])\n setFeedBack()\n}\n\nfunction handleExceed(files: File[], uploadFIles) {\n if (isFn(attrs.onExceed)) {\n attrs.onExceed(files, uploadFIles)\n }\n if (attrs.limit !== 1)\n return\n uploadRef.value!.clearFiles()\n const file = files[0] as UploadRawFile\n file.uid = genFileId()\n uploadRef.value!.handleStart(file)\n if (attrs.autoUpload ?? true) {\n uploadRef.value!.submit()\n }\n}\n\nfunction handleError(error: Error, file: UploadFile, fileList: UploadFile[]) {\n if (isFn(attrs.onError)) {\n (attrs.onError)(error, file, fileList)\n }\n}\n\nfunction onPreviewClick(uploadFile: UploadFile) {\n if (isFn(attrs.onPreview)) {\n (attrs.onPreview)(uploadFile)\n return\n }\n if (!uploadFile.url && !attrs.accept?.includes('image'))\n return\n const clickIndex = props.fileList.findIndex((element: UploadFile) => element.uid === uploadFile.uid)\n activeImageIndex.value = clickIndex\n isShowImgViewer.value = true\n}\n\nreactionWatch(() => {\n return fieldRef.value?.dataSource ?? []\n}, () => {\n const emitValue = props.formatValue(fieldRef.value.dataSource as UploadFile[])\n emit('update:modelValue', emitValue)\n})\n</script>\n\n<template>\n <ElUpload\n ref=\"uploadRef\"\n v-bind=\"innerAttrs\"\n :file-list=\"$props.fileList\"\n @change=\"handleChange\"\n @remove=\"handleRemove\"\n @exceed=\"handleExceed\"\n @error=\"handleError\"\n @preview=\"onPreviewClick\"\n >\n <slot v-if=\"hasSlotContent($slots?.default)\" />\n <template v-else>\n <template v-if=\"attrs.drag\">\n <ElIcon style=\"font-size: 60px; margin: 40px 0 16px;\">\n <UploadFilledIcon color=\"gray\" />\n </ElIcon>\n <div class=\"el-upload__text\">\n {{ props.textContent }}\n </div>\n </template>\n <template v-else-if=\"attrs.listType === 'picture-card'\">\n <PlusIcon style=\"width: 28px; height: 28px; color: gray\" />\n </template>\n <template v-else>\n <ElButton>\n <UploadIcon width=\"16px\" height=\"16px\" />\n <span style=\"margin-left: 6px\">\n {{ props.textContent }}\n </span>\n </ElButton>\n </template>\n </template>\n <template v-if=\"$slots.file\" #file=\"{ file, index }\">\n <slot name=\"file\" :file=\"file\" :index=\"index\" />\n </template>\n <template v-if=\"$slots.tip\" #tip>\n <slot name=\"tip\" />\n </template>\n <template v-if=\"$slots.trigger\" #trigger>\n <slot name=\"trigger\" />\n </template>\n </ElUpload>\n <ElImageViewer\n v-if=\"isShowImgViewer\"\n ref=\"imgPreviewRef\"\n :url-list=\"imgPreviewList\"\n :initial-index=\"activeImageIndex\"\n v-bind=\"props.imageViewerProps\"\n @close=\"isShowImgViewer = false\"\n />\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsBA,MAAM,QAAQ;EAuBd,MAAM,OAAO;EAEb,MAAM,YAAY,KAAoB;EACtC,MAAM,QAAQ,YAAU;EACxB,MAAM,aAAa,eAAe;AAChC,UAAO,KAAK,OAAO;IACjB;IACA;IACA;IACA;IACA;IACA;IACA;IACD,CAAA;IACF;EACD,MAAM,WAAW,UAAgB;AACjC,WAAS,OAAO,OAAO,EACrB,sBAAsB;AACpB,UAAO;KAEV,CAAA;EAED,MAAM,gBAAgB,KAAyB;EAC/C,MAAM,mBAAmB,IAAI,EAAC;EAC9B,MAAM,kBAAkB,IAAI,MAAK;EACjC,MAAM,iBAAiB,eAAe;AACpC,UAAO,MAAM,SAAS,KAAI,SAAQ,KAAK,IAAG;IAC3C;EAED,SAAS,YAAY,OAAe;GAClC,MAAM,UAAU,MAAM,aAAa,MAAK;AACxC,YAAS,OAAO,YAAY;IAC1B,MAAM;IACN,MAAM;IACN,UAAU,UAAU,CAAC,QAAQ,GAAG,EAAE;IACnC,CAAA;;EAGH,SAAS,aAAa,MAAkB,UAAwB;AAC9D,YAAS,OAAO,cAAc,CAAC,GAAG,SAAS,CAAA;AAC3C,gBAAY;;EAGd,SAAS,aAAa,MAAkB,UAAwB;AAC9D,OAAI,KAAK,MAAM,SAAS,CACtB,OAAM,SAAS,MAAM,SAAQ;AAE/B,YAAS,MAAM,cAAc,CAAC,GAAG,SAAS,CAAA;AAC1C,gBAAY;;EAGd,SAAS,aAAa,OAAe,aAAa;AAChD,OAAI,KAAK,MAAM,SAAS,CACtB,OAAM,SAAS,OAAO,YAAW;AA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AA,CAAA,CAAA;;QAEhC,mBAEM,OAFN,YAEM,gBADD,MAAM,YAAW,EAAA,EAAA,CAAA,EAAA,GAAA,IAGH,MAAA,MAAK,CAAC,aAAQ,kBAAA,WAAA,EACjC,YAA2D,MAAA,KAAA,EAAA;;KAAjD,OAAA;MAAA,SAAA;MAAA,UAAA;MAAA,SAAA;MAA8C;wBAGxD,YAKW,MAAA,SAAA,EAAA,EAAA,KAAA,GAAA,EAAA;4BAJgC,CAAzC,YAAyC,MAAA,OAAA,EAAA;MAA7B,OAAM;MAAO,QAAO;SAChC,mBAEO,QAFP,YAEO,gBADF,MAAM,YAAW,EAAA,EAAA,CAAA,CAAA;;;;;IAKZA,KAAAA,OAAO,OAAA;WAAO;kBACoB,EADZ,MAAM,YAAK,CAC/C,WAAgD,KAAA,QAAA,QAAA;MAAvB;MAAc;;;;IAEzBA,KAAAA,OAAO,MAAA;WAAM;uBACR,CAAnB,WAAmB,KAAA,QAAA,MAAA,CAAA,CAAA;;;IAELA,KAAAA,OAAO,UAAA;WAAU;uBACR,CAAvB,WAAuB,KAAA,QAAA,UAAA,CAAA,CAAA;;;6BAInB,gBAAA,SAAA,WAAA,EADR,YAOE,MAAA,cAAA,EAPF,WAOE;;aALI;IAAJ,KAAI;IACH,YAAU,eAAA;IACV,iBAAe,iBAAA;MACR,MAAM,kBAAgB,EAC7B,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,gBAAA,QAAe,QAAA,CAAA,EAAA,MAAA,IAAA,CAAA,YAAA,gBAAA,CAAA,IAAA,mBAAA,QAAA,KAAA,CAAA,EAAA,GAAA"}
1
+ {"version":3,"file":"upload.mjs","names":["$props","$slots"],"sources":["../../src/upload/upload.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { Field } from '@silver-formily/core'\nimport type { ImageViewerInstance, ImageViewerProps, UploadFile, UploadInstance, UploadProps, UploadRawFile } from 'element-plus'\nimport type { PropType } from 'vue'\nimport {\n Plus as PlusIcon,\n UploadFilled as UploadFilledIcon,\n Upload as UploadIcon,\n} from '@element-plus/icons-vue'\nimport { reactionWatch } from '@silver-formily/reactive-vue'\nimport { isFn } from '@silver-formily/shared'\nimport { useField } from '@silver-formily/vue'\nimport { ElButton, ElIcon, ElImageViewer, ElUpload, genFileId } from 'element-plus'\nimport { omit } from 'lodash-es'\nimport { computed, ref, useAttrs } from 'vue'\nimport { hasSlotContent } from '../__builtins__'\n\ndefineOptions({\n name: 'FUpload',\n inheritAttrs: false,\n})\n\nconst props = defineProps({\n textContent: {\n type: String,\n default: '',\n },\n errorAdaptor: {\n type: Function as PropType<(error?: Error) => string>,\n default: (error?: Error) => error?.message,\n },\n formatValue: {\n type: Function as PropType<(fileList?: UploadFile[]) => any>,\n default: item => item,\n },\n fileList: {\n type: Array as PropType<UploadFile[]>,\n default: () => [],\n },\n imageViewerProps: {\n type: Object as PropType<ImageViewerProps>,\n default: () => ({ teleported: true, showProgress: true }),\n },\n})\n\nconst emit = defineEmits(['update:modelValue'])\n\nconst uploadRef = ref<UploadInstance>()\nconst attrs = useAttrs() as UploadProps\nconst innerAttrs = computed(() => {\n return omit(attrs, [\n 'onChange',\n 'onRemove',\n 'onExceed',\n 'onError',\n 'onPreview',\n 'fileList',\n 'onUpdate:fileList',\n ])\n})\nconst fieldRef = useField<Field>()\nfieldRef.value?.inject({\n getElUploadRef: () => {\n return uploadRef\n },\n})\n\nconst imgPreviewRef = ref<ImageViewerInstance>()\nconst activeImageIndex = ref(0)\nconst isShowImgViewer = ref(false)\nconst imgPreviewList = computed(() => {\n return props.fileList.map(item => item.url)\n})\n\nfunction setFeedBack(error?: Error) {\n const message = props.errorAdaptor(error)\n fieldRef.value?.setFeedback({\n type: 'error',\n code: 'UploadError',\n messages: message ? [message] : [],\n })\n}\n\nfunction handleChange(file: UploadFile, fileList: UploadFile[]) {\n fieldRef.value?.setDataSource([...fileList])\n setFeedBack()\n}\n\nfunction handleRemove(file: UploadFile, fileList: UploadFile[]) {\n if (isFn(attrs.onRemove)) {\n attrs.onRemove(file, fileList)\n }\n fieldRef.value.setDataSource([...fileList])\n setFeedBack()\n}\n\nfunction handleExceed(files: File[], uploadFIles) {\n if (isFn(attrs.onExceed)) {\n attrs.onExceed(files, uploadFIles)\n }\n if (attrs.limit !== 1)\n return\n uploadRef.value!.clearFiles()\n const file = files[0] as UploadRawFile\n file.uid = genFileId()\n uploadRef.value!.handleStart(file)\n if (attrs.autoUpload ?? true) {\n uploadRef.value!.submit()\n }\n}\n\nfunction handleError(error: Error, file: UploadFile, fileList: UploadFile[]) {\n if (isFn(attrs.onError)) {\n (attrs.onError)(error, file, fileList)\n }\n}\n\nfunction onPreviewClick(uploadFile: UploadFile) {\n if (isFn(attrs.onPreview)) {\n (attrs.onPreview)(uploadFile)\n return\n }\n if (!uploadFile.url && !attrs.accept?.includes('image'))\n return\n const clickIndex = props.fileList.findIndex((element: UploadFile) => element.uid === uploadFile.uid)\n activeImageIndex.value = clickIndex\n isShowImgViewer.value = true\n}\n\nreactionWatch(() => {\n return fieldRef.value?.dataSource ?? []\n}, () => {\n const emitValue = props.formatValue(fieldRef.value.dataSource as UploadFile[])\n emit('update:modelValue', emitValue)\n})\n</script>\n\n<template>\n <ElUpload\n ref=\"uploadRef\"\n v-bind=\"innerAttrs\"\n :file-list=\"$props.fileList\"\n @change=\"handleChange\"\n @remove=\"handleRemove\"\n @exceed=\"handleExceed\"\n @error=\"handleError\"\n @preview=\"onPreviewClick\"\n >\n <slot v-if=\"hasSlotContent($slots?.default)\" />\n <template v-else>\n <template v-if=\"attrs.drag\">\n <ElIcon style=\"font-size: 60px; margin: 40px 0 16px;\">\n <UploadFilledIcon color=\"gray\" />\n </ElIcon>\n <div class=\"el-upload__text\">\n {{ props.textContent }}\n </div>\n </template>\n <template v-else-if=\"attrs.listType === 'picture-card'\">\n <PlusIcon style=\"width: 28px; height: 28px; color: gray\" />\n </template>\n <template v-else>\n <ElButton>\n <UploadIcon width=\"16px\" height=\"16px\" />\n <span style=\"margin-left: 6px\">\n {{ props.textContent }}\n </span>\n </ElButton>\n </template>\n </template>\n <template v-if=\"$slots.file\" #file=\"{ file, index }\">\n <slot name=\"file\" :file=\"file\" :index=\"index\" />\n </template>\n <template v-if=\"$slots.tip\" #tip>\n <slot name=\"tip\" />\n </template>\n <template v-if=\"$slots.trigger\" #trigger>\n <slot name=\"trigger\" />\n </template>\n </ElUpload>\n <ElImageViewer\n v-if=\"isShowImgViewer\"\n ref=\"imgPreviewRef\"\n :url-list=\"imgPreviewList\"\n :initial-index=\"activeImageIndex\"\n v-bind=\"props.imageViewerProps\"\n @close=\"isShowImgViewer = false\"\n />\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsBA,MAAM,QAAQ;EAuBd,MAAM,OAAO;EAEb,MAAM,YAAY,KAAoB;EACtC,MAAM,QAAQ,YAAU;EACxB,MAAM,aAAa,eAAe;AAChC,UAAO,KAAK,OAAO;IACjB;IACA;IACA;IACA;IACA;IACA;IACA;IACD,CAAA;IACF;EACD,MAAM,WAAW,UAAgB;AACjC,WAAS,OAAO,OAAO,EACrB,sBAAsB;AACpB,UAAO;KAEV,CAAA;EAED,MAAM,gBAAgB,KAAyB;EAC/C,MAAM,mBAAmB,IAAI,EAAC;EAC9B,MAAM,kBAAkB,IAAI,MAAK;EACjC,MAAM,iBAAiB,eAAe;AACpC,UAAO,MAAM,SAAS,KAAI,SAAQ,KAAK,IAAG;IAC3C;EAED,SAAS,YAAY,OAAe;GAClC,MAAM,UAAU,MAAM,aAAa,MAAK;AACxC,YAAS,OAAO,YAAY;IAC1B,MAAM;IACN,MAAM;IACN,UAAU,UAAU,CAAC,QAAQ,GAAG,EAAE;IACnC,CAAA;;EAGH,SAAS,aAAa,MAAkB,UAAwB;AAC9D,YAAS,OAAO,cAAc,CAAC,GAAG,SAAS,CAAA;AAC3C,gBAAY;;EAGd,SAAS,aAAa,MAAkB,UAAwB;AAC9D,OAAI,KAAK,MAAM,SAAS,CACtB,OAAM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plus",
3
3
  "type": "module",
4
- "version": "4.0.3",
5
- "description": "Formily 的 Element Plus 封装",
4
+ "version": "5.0.1",
5
+ "description": "Element Plus bindings for Silver Formily",
6
6
  "author": "hezhengxu",
7
7
  "license": "MIT",
8
8
  "homepage": "https://element-plus.silver-formily.org/",
@@ -36,16 +36,16 @@
36
36
  "esm"
37
37
  ],
38
38
  "peerDependencies": {
39
- "@formily/core": "^2.0.8",
40
- "@formily/json-schema": "^2.0.8",
41
- "@formily/reactive": "^2.0.8",
42
- "@formily/shared": "^2.0.8",
43
- "@silver-formily/grid": "^1.0.1",
44
- "@silver-formily/reactive-vue": "^1.1.0",
45
- "@silver-formily/vue": "^2.3.1",
46
39
  "@vueuse/core": "*",
47
40
  "element-plus": "^2.11.0",
48
- "vue": "^3.3.0"
41
+ "vue": "^3.3.0",
42
+ "@silver-formily/core": "1.0.1",
43
+ "@silver-formily/json-schema": "1.0.1",
44
+ "@silver-formily/reactive": "1.0.0",
45
+ "@silver-formily/shared": "1.0.0",
46
+ "@silver-formily/grid": "2.0.0",
47
+ "@silver-formily/vue": "3.0.1",
48
+ "@silver-formily/reactive-vue": "2.0.0"
49
49
  },
50
50
  "dependencies": {
51
51
  "@element-plus/icons-vue": "^2.3.2",
@@ -71,10 +71,14 @@
71
71
  "vitest-browser-vue": "^2.0.2",
72
72
  "vue": "^3.5.27",
73
73
  "vue-tsc": "^3.2.6",
74
- "@silver-formily/grid": "1.0.2",
75
- "@silver-formily/reactive-vue": "1.1.1",
74
+ "@silver-formily/core": "1.0.1",
75
+ "@silver-formily/grid": "2.0.0",
76
+ "@silver-formily/json-schema": "1.0.1",
77
+ "@silver-formily/reactive-vue": "2.0.0",
78
+ "@silver-formily/reactive": "1.0.0",
76
79
  "@silver-formily/typescript-config": "0.0.0",
77
- "@silver-formily/vue": "2.3.4"
80
+ "@silver-formily/shared": "1.0.0",
81
+ "@silver-formily/vue": "3.0.1"
78
82
  },
79
83
  "scripts": {
80
84
  "build": "tsdown --tsconfig tsconfig.build.json",
@@ -83,7 +87,7 @@
83
87
  "check-types": "vue-tsc --noEmit --project tsconfig.check.json",
84
88
  "test": "vitest run --reporter=dot",
85
89
  "test:watch": "vitest",
86
- "test:run": "vitest run --browser.headless",
90
+ "test:browser": "vitest run --browser.headless",
87
91
  "test:coverage": "vitest run --coverage --browser.headless"
88
92
  }
89
93
  }