element-pe 1.0.5 → 1.0.6

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 (259) hide show
  1. package/attributes.json +1 -1
  2. package/dist/index.css +1 -1
  3. package/dist/index.full.js +632 -1287
  4. package/dist/index.full.min.js +9 -10
  5. package/dist/index.full.min.js.map +1 -1
  6. package/dist/index.full.min.mjs +7 -8
  7. package/dist/index.full.min.mjs.map +1 -1
  8. package/dist/index.full.mjs +630 -1289
  9. package/es/component.d.ts +24 -2
  10. package/es/components/affix/index.js +1 -1
  11. package/es/components/autocomplete/index.d.ts +4 -4
  12. package/es/components/autocomplete/src/index.vue.d.ts +2 -2
  13. package/es/components/carousel/index.d.ts +2 -2
  14. package/es/components/carousel/src/main.vue.d.ts +2 -2
  15. package/es/components/cascader/index.d.ts +2 -2
  16. package/es/components/cascader/src/index.vue.d.ts +1 -1
  17. package/es/components/checkbox/index.d.ts +6 -6
  18. package/es/components/checkbox/src/checkbox-button.vue.d.ts +1 -1
  19. package/es/components/checkbox/src/checkbox-group.vue.d.ts +1 -1
  20. package/es/components/checkbox/src/checkbox.vue.d.ts +2 -2
  21. package/es/components/color-picker/index.d.ts +2 -2
  22. package/es/components/color-picker/src/components/alpha-slider.vue.d.ts +1 -1
  23. package/es/components/color-picker/src/components/hue-slider.vue.d.ts +1 -1
  24. package/es/components/color-picker/src/index.vue.d.ts +1 -1
  25. package/es/components/descriptions/index.d.ts +8 -8
  26. package/es/components/descriptions/src/description-item.d.ts +2 -2
  27. package/es/components/descriptions/src/descriptions-cell.d.ts +1 -1
  28. package/es/components/descriptions/src/index.vue.d.ts +4 -4
  29. package/es/components/drawer/index.d.ts +6 -6
  30. package/es/components/drawer/src/index.vue.d.ts +3 -3
  31. package/es/components/dropdown/index.d.ts +2 -2
  32. package/es/components/dropdown/src/dropdown.vue.d.ts +2 -2
  33. package/es/components/form/index.js +2 -2
  34. package/es/components/icon/index.d.ts +1 -1
  35. package/es/components/icon/src/icon.vue.d.ts +1 -1
  36. package/es/components/image/index.d.ts +3 -3
  37. package/es/components/image/index.js +2 -3
  38. package/es/components/image/src/image.d.ts +1 -1
  39. package/es/components/image/src/image.vue.d.ts +3 -3
  40. package/es/components/image-viewer/index.d.ts +28 -104
  41. package/es/components/image-viewer/index.js +60 -61
  42. package/es/components/image-viewer/src/image-viewer.d.ts +14 -0
  43. package/es/components/image-viewer/src/image-viewer.vue.d.ts +55 -0
  44. package/es/components/input/index.d.ts +116 -360
  45. package/es/components/input/index.js +216 -209
  46. package/es/components/input/src/calc-textarea-height.d.ts +6 -0
  47. package/es/components/input/src/input.d.ts +46 -0
  48. package/es/components/input/src/input.vue.d.ts +162 -0
  49. package/es/components/input-number/index.d.ts +2 -2
  50. package/es/components/input-number/src/index.vue.d.ts +1 -1
  51. package/es/components/menu/index.d.ts +7 -3
  52. package/es/components/menu/index.js +8 -3
  53. package/es/components/menu/src/menu.d.ts +8 -3
  54. package/es/components/pagination/index.d.ts +2 -2
  55. package/es/components/pagination/src/pagination.d.ts +2 -2
  56. package/es/components/progress/index.js +0 -1
  57. package/es/components/radio/index.d.ts +2 -2
  58. package/es/components/radio/src/radio.vue.d.ts +2 -2
  59. package/es/components/rate/index.js +1 -1
  60. package/es/components/row/index.d.ts +4 -4
  61. package/es/components/row/src/row.d.ts +2 -2
  62. package/es/components/scrollbar/index.d.ts +4 -4
  63. package/es/components/scrollbar/src/index.vue.d.ts +2 -2
  64. package/es/components/select/index.d.ts +3 -3
  65. package/es/components/select/src/select.vue.d.ts +3 -3
  66. package/es/components/select-v2/index.d.ts +6 -6
  67. package/es/components/select-v2/index.js +2 -0
  68. package/es/components/select-v2/src/select.vue.d.ts +3 -3
  69. package/es/components/slider/index.d.ts +4 -4
  70. package/es/components/slider/src/button.vue.d.ts +2 -2
  71. package/es/components/slider/src/index.vue.d.ts +2 -2
  72. package/es/components/space/index.d.ts +2 -2
  73. package/es/components/space/src/space.d.ts +2 -2
  74. package/es/components/steps/index.d.ts +2 -2
  75. package/es/components/steps/src/index.vue.d.ts +2 -2
  76. package/es/components/table/index.d.ts +4 -4
  77. package/es/components/table/index.js +17 -9
  78. package/es/components/table/src/table.vue.d.ts +4 -4
  79. package/es/components/tag/index.d.ts +1 -1
  80. package/es/components/tag/src/tag.vue.d.ts +1 -1
  81. package/es/components/timeline/index.d.ts +4 -4
  82. package/es/components/timeline/src/item.vue.d.ts +2 -2
  83. package/es/components/tree/index.js +1 -1
  84. package/es/components/tree-v2/index.d.ts +1 -1
  85. package/es/components/tree-v2/index.js +2 -24
  86. package/es/components/tree-v2/src/tree.vue.d.ts +1 -1
  87. package/es/components/upload/index.d.ts +4 -4
  88. package/es/components/upload/src/index.vue.d.ts +2 -2
  89. package/es/components/upload/src/upload.vue.d.ts +2 -2
  90. package/es/components/virtual-list/src/builders/build-grid.d.ts +3 -3
  91. package/es/components/virtual-list/src/builders/build-list.d.ts +4 -4
  92. package/es/components/virtual-list/src/components/dynamic-size-grid.d.ts +3 -3
  93. package/es/components/virtual-list/src/components/dynamic-size-list.d.ts +4 -4
  94. package/es/components/virtual-list/src/components/fixed-size-grid.d.ts +3 -3
  95. package/es/components/virtual-list/src/components/fixed-size-list.d.ts +4 -4
  96. package/es/components/virtual-list/src/components/scrollbar.d.ts +1 -1
  97. package/es/utils/dom.d.ts +5 -5
  98. package/es/utils/dom.js +29 -36
  99. package/es/utils/props.d.ts +2 -2
  100. package/es/utils/props.js +15 -7
  101. package/es/utils/util.d.ts +2 -2
  102. package/es/utils/util.js +3 -3
  103. package/es/version.d.ts +1 -1
  104. package/es/version.js +1 -1
  105. package/lib/component.d.ts +24 -2
  106. package/lib/components/affix/index.js +1 -1
  107. package/lib/components/autocomplete/index.d.ts +4 -4
  108. package/lib/components/autocomplete/src/index.vue.d.ts +2 -2
  109. package/lib/components/carousel/index.d.ts +2 -2
  110. package/lib/components/carousel/src/main.vue.d.ts +2 -2
  111. package/lib/components/cascader/index.d.ts +2 -2
  112. package/lib/components/cascader/src/index.vue.d.ts +1 -1
  113. package/lib/components/checkbox/index.d.ts +6 -6
  114. package/lib/components/checkbox/src/checkbox-button.vue.d.ts +1 -1
  115. package/lib/components/checkbox/src/checkbox-group.vue.d.ts +1 -1
  116. package/lib/components/checkbox/src/checkbox.vue.d.ts +2 -2
  117. package/lib/components/color-picker/index.d.ts +2 -2
  118. package/lib/components/color-picker/src/components/alpha-slider.vue.d.ts +1 -1
  119. package/lib/components/color-picker/src/components/hue-slider.vue.d.ts +1 -1
  120. package/lib/components/color-picker/src/index.vue.d.ts +1 -1
  121. package/lib/components/descriptions/index.d.ts +8 -8
  122. package/lib/components/descriptions/src/description-item.d.ts +2 -2
  123. package/lib/components/descriptions/src/descriptions-cell.d.ts +1 -1
  124. package/lib/components/descriptions/src/index.vue.d.ts +4 -4
  125. package/lib/components/drawer/index.d.ts +6 -6
  126. package/lib/components/drawer/src/index.vue.d.ts +3 -3
  127. package/lib/components/dropdown/index.d.ts +2 -2
  128. package/lib/components/dropdown/src/dropdown.vue.d.ts +2 -2
  129. package/lib/components/form/index.js +2 -2
  130. package/lib/components/icon/index.d.ts +1 -1
  131. package/lib/components/icon/src/icon.vue.d.ts +1 -1
  132. package/lib/components/image/index.d.ts +3 -3
  133. package/lib/components/image/index.js +2 -3
  134. package/lib/components/image/src/image.d.ts +1 -1
  135. package/lib/components/image/src/image.vue.d.ts +3 -3
  136. package/lib/components/image-viewer/index.d.ts +28 -104
  137. package/lib/components/image-viewer/index.js +61 -60
  138. package/lib/components/image-viewer/src/image-viewer.d.ts +14 -0
  139. package/lib/components/image-viewer/src/image-viewer.vue.d.ts +55 -0
  140. package/lib/components/input/index.d.ts +116 -360
  141. package/lib/components/input/index.js +215 -206
  142. package/lib/components/input/src/calc-textarea-height.d.ts +6 -0
  143. package/lib/components/input/src/input.d.ts +46 -0
  144. package/lib/components/input/src/input.vue.d.ts +162 -0
  145. package/lib/components/input-number/index.d.ts +2 -2
  146. package/lib/components/input-number/src/index.vue.d.ts +1 -1
  147. package/lib/components/menu/index.d.ts +7 -3
  148. package/lib/components/menu/index.js +8 -3
  149. package/lib/components/menu/src/menu.d.ts +8 -3
  150. package/lib/components/pagination/index.d.ts +2 -2
  151. package/lib/components/pagination/src/pagination.d.ts +2 -2
  152. package/lib/components/progress/index.js +0 -1
  153. package/lib/components/radio/index.d.ts +2 -2
  154. package/lib/components/radio/src/radio.vue.d.ts +2 -2
  155. package/lib/components/rate/index.js +1 -1
  156. package/lib/components/row/index.d.ts +4 -4
  157. package/lib/components/row/src/row.d.ts +2 -2
  158. package/lib/components/scrollbar/index.d.ts +4 -4
  159. package/lib/components/scrollbar/src/index.vue.d.ts +2 -2
  160. package/lib/components/select/index.d.ts +3 -3
  161. package/lib/components/select/src/select.vue.d.ts +3 -3
  162. package/lib/components/select-v2/index.d.ts +6 -6
  163. package/lib/components/select-v2/index.js +2 -0
  164. package/lib/components/select-v2/src/select.vue.d.ts +3 -3
  165. package/lib/components/slider/index.d.ts +4 -4
  166. package/lib/components/slider/src/button.vue.d.ts +2 -2
  167. package/lib/components/slider/src/index.vue.d.ts +2 -2
  168. package/lib/components/space/index.d.ts +2 -2
  169. package/lib/components/space/src/space.d.ts +2 -2
  170. package/lib/components/steps/index.d.ts +2 -2
  171. package/lib/components/steps/src/index.vue.d.ts +2 -2
  172. package/lib/components/table/index.d.ts +4 -4
  173. package/lib/components/table/index.js +17 -9
  174. package/lib/components/table/src/table.vue.d.ts +4 -4
  175. package/lib/components/tag/index.d.ts +1 -1
  176. package/lib/components/tag/src/tag.vue.d.ts +1 -1
  177. package/lib/components/timeline/index.d.ts +4 -4
  178. package/lib/components/timeline/src/item.vue.d.ts +2 -2
  179. package/lib/components/tree/index.js +1 -1
  180. package/lib/components/tree-v2/index.d.ts +1 -1
  181. package/lib/components/tree-v2/index.js +2 -24
  182. package/lib/components/tree-v2/src/tree.vue.d.ts +1 -1
  183. package/lib/components/upload/index.d.ts +4 -4
  184. package/lib/components/upload/src/index.vue.d.ts +2 -2
  185. package/lib/components/upload/src/upload.vue.d.ts +2 -2
  186. package/lib/components/virtual-list/src/builders/build-grid.d.ts +3 -3
  187. package/lib/components/virtual-list/src/builders/build-list.d.ts +4 -4
  188. package/lib/components/virtual-list/src/components/dynamic-size-grid.d.ts +3 -3
  189. package/lib/components/virtual-list/src/components/dynamic-size-list.d.ts +4 -4
  190. package/lib/components/virtual-list/src/components/fixed-size-grid.d.ts +3 -3
  191. package/lib/components/virtual-list/src/components/fixed-size-list.d.ts +4 -4
  192. package/lib/components/virtual-list/src/components/scrollbar.d.ts +1 -1
  193. package/lib/utils/dom.d.ts +5 -5
  194. package/lib/utils/dom.js +29 -36
  195. package/lib/utils/props.d.ts +2 -2
  196. package/lib/utils/props.js +15 -7
  197. package/lib/utils/util.d.ts +2 -2
  198. package/lib/utils/util.js +2 -2
  199. package/lib/version.d.ts +1 -1
  200. package/lib/version.js +1 -1
  201. package/package.json +3 -2
  202. package/packages/components/affix/src/affix.vue +1 -1
  203. package/packages/components/color-picker/src/index.vue +1 -1
  204. package/packages/components/form/__tests__/form.spec.ts +1 -1
  205. package/packages/components/form/src/form-item.vue +2 -2
  206. package/packages/components/image/src/image.ts +3 -3
  207. package/packages/components/image/src/image.vue +1 -1
  208. package/packages/components/image-viewer/__tests__/image-viewer.spec.ts +1 -1
  209. package/packages/components/image-viewer/index.ts +5 -10
  210. package/packages/components/image-viewer/src/image-viewer.ts +32 -0
  211. package/packages/components/image-viewer/src/{index.vue → image-viewer.vue} +73 -82
  212. package/packages/components/input/__tests__/input.spec.ts +7 -7
  213. package/packages/components/input/index.ts +5 -10
  214. package/packages/components/input/src/{calcTextareaHeight.ts → calc-textarea-height.ts} +9 -7
  215. package/packages/components/input/src/input.ts +100 -0
  216. package/packages/components/input/src/{index.vue → input.vue} +135 -239
  217. package/packages/components/menu/src/menu.ts +10 -3
  218. package/packages/components/progress/src/index.vue +0 -1
  219. package/packages/components/rate/src/index.vue +1 -1
  220. package/packages/components/select-v2/src/useSelect.ts +2 -0
  221. package/packages/components/space/__tests__/space.spec.ts +1 -1
  222. package/packages/components/switch/__tests__/switch.spec.ts +1 -1
  223. package/packages/components/table/src/store/tree.ts +18 -3
  224. package/packages/components/table/src/table-body/render-helper.ts +1 -1
  225. package/packages/components/table/src/table-column/index.ts +4 -1
  226. package/packages/components/table/src/table-layout.ts +2 -2
  227. package/packages/components/table/src/util.ts +1 -1
  228. package/packages/components/tree/src/model/node.ts +1 -1
  229. package/packages/element-plus/package.json +3 -2
  230. package/packages/element-plus/version.ts +1 -1
  231. package/packages/theme-chalk/package.json +1 -2
  232. package/packages/theme-chalk/src/message-box.scss +1 -0
  233. package/packages/utils/dist/es/dom.d.ts +5 -5
  234. package/packages/utils/dist/es/dom.js +29 -36
  235. package/packages/utils/dist/es/props.d.ts +2 -2
  236. package/packages/utils/dist/es/props.js +15 -7
  237. package/packages/utils/dist/es/util.d.ts +2 -2
  238. package/packages/utils/dist/es/util.js +3 -3
  239. package/packages/utils/dist/lib/dom.d.ts +5 -5
  240. package/packages/utils/dist/lib/dom.js +29 -36
  241. package/packages/utils/dist/lib/props.d.ts +2 -2
  242. package/packages/utils/dist/lib/props.js +15 -7
  243. package/packages/utils/dist/lib/util.d.ts +2 -2
  244. package/packages/utils/dist/lib/util.js +2 -2
  245. package/packages/utils/dom.ts +34 -41
  246. package/packages/utils/props.ts +27 -11
  247. package/packages/utils/tests/dom.spec.ts +183 -0
  248. package/packages/utils/util.ts +8 -9
  249. package/tags.json +1 -1
  250. package/theme-chalk/el-message-box.css +1 -1
  251. package/theme-chalk/index.css +1 -1
  252. package/theme-chalk/src/message-box.scss +1 -0
  253. package/web-types.json +1 -1
  254. package/es/components/image-viewer/src/index.vue.d.ts +0 -67
  255. package/es/components/input/src/calcTextareaHeight.d.ts +0 -6
  256. package/es/components/input/src/index.vue.d.ts +0 -197
  257. package/lib/components/image-viewer/src/index.vue.d.ts +0 -67
  258. package/lib/components/input/src/calcTextareaHeight.d.ts +0 -6
  259. package/lib/components/input/src/index.vue.d.ts +0 -197
@@ -223,9 +223,9 @@ declare const _Upload: SFCWithInstall<import("vue").DefineComponent<{
223
223
  name: string;
224
224
  onChange: import("./src/upload.type").FileHandler<void>;
225
225
  disabled: boolean;
226
- data: Record<string, any>;
227
226
  drag: boolean;
228
227
  multiple: boolean;
228
+ data: Record<string, any>;
229
229
  onError: import("./src/upload.type").FileResultHandler<Error>;
230
230
  onProgress: import("./src/upload.type").FileResultHandler<ProgressEvent<EventTarget>>;
231
231
  action: string;
@@ -250,9 +250,9 @@ declare const _Upload: SFCWithInstall<import("vue").DefineComponent<{
250
250
  name: string;
251
251
  onChange: import("./src/upload.type").FileHandler<void>;
252
252
  disabled: boolean;
253
- data: Record<string, any>;
254
253
  drag: boolean;
255
254
  multiple: boolean;
255
+ data: Record<string, any>;
256
256
  onError: import("./src/upload.type").FileResultHandler<Error>;
257
257
  onProgress: import("./src/upload.type").FileResultHandler<ProgressEvent<EventTarget>>;
258
258
  headers: Headers;
@@ -497,9 +497,9 @@ export declare const ElUpload: SFCWithInstall<import("vue").DefineComponent<{
497
497
  name: string;
498
498
  onChange: import("./src/upload.type").FileHandler<void>;
499
499
  disabled: boolean;
500
- data: Record<string, any>;
501
500
  drag: boolean;
502
501
  multiple: boolean;
502
+ data: Record<string, any>;
503
503
  onError: import("./src/upload.type").FileResultHandler<Error>;
504
504
  onProgress: import("./src/upload.type").FileResultHandler<ProgressEvent<EventTarget>>;
505
505
  action: string;
@@ -524,9 +524,9 @@ export declare const ElUpload: SFCWithInstall<import("vue").DefineComponent<{
524
524
  name: string;
525
525
  onChange: import("./src/upload.type").FileHandler<void>;
526
526
  disabled: boolean;
527
- data: Record<string, any>;
528
527
  drag: boolean;
529
528
  multiple: boolean;
529
+ data: Record<string, any>;
530
530
  onError: import("./src/upload.type").FileResultHandler<Error>;
531
531
  onProgress: import("./src/upload.type").FileResultHandler<ProgressEvent<EventTarget>>;
532
532
  headers: Headers;
@@ -172,9 +172,9 @@ declare const _default: import("vue").DefineComponent<{
172
172
  name: string;
173
173
  onChange: FileHandler<void>;
174
174
  disabled: boolean;
175
- data: Record<string, any>;
176
175
  drag: boolean;
177
176
  multiple: boolean;
177
+ data: Record<string, any>;
178
178
  onError: FileResultHandler<Error>;
179
179
  onProgress: FileResultHandler<ProgressEvent<EventTarget>>;
180
180
  action: string;
@@ -199,9 +199,9 @@ declare const _default: import("vue").DefineComponent<{
199
199
  name: string;
200
200
  onChange: FileHandler<void>;
201
201
  disabled: boolean;
202
- data: Record<string, any>;
203
202
  drag: boolean;
204
203
  multiple: boolean;
204
+ data: Record<string, any>;
205
205
  onError: FileResultHandler<Error>;
206
206
  onProgress: FileResultHandler<ProgressEvent<EventTarget>>;
207
207
  headers: Headers;
@@ -206,9 +206,9 @@ declare const _default: import("vue").DefineComponent<{
206
206
  type: string;
207
207
  name: string;
208
208
  disabled: boolean;
209
- data: Record<string, any>;
210
209
  drag: boolean;
211
210
  multiple: Nullable<boolean>;
211
+ data: Record<string, any>;
212
212
  onError: AjaxEventListener;
213
213
  onProgress: AjaxEventListener;
214
214
  action: string;
@@ -231,9 +231,9 @@ declare const _default: import("vue").DefineComponent<{
231
231
  type: string;
232
232
  name: string;
233
233
  disabled: boolean;
234
- data: Record<string, any>;
235
234
  drag: boolean;
236
235
  multiple: Nullable<boolean>;
236
+ data: Record<string, any>;
237
237
  onError: AjaxEventListener;
238
238
  onProgress: AjaxEventListener;
239
239
  headers: Nullable<Partial<Headers>>;
@@ -49,10 +49,10 @@ declare const createGrid: ({ name, clearCache, getColumnPosition, getColumnStart
49
49
  } & {
50
50
  height: import("../../../../utils/props").BuildPropType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
51
51
  width: import("../../../../utils/props").BuildPropType<readonly [NumberConstructor, StringConstructor], unknown, unknown>;
52
- data: any[];
52
+ columnWidth: import("../../../../utils/props").BuildPropType<import("../../../../utils/props").PropWrapper<number | import("../types").ItemSize>, never, never>;
53
53
  direction: import("../../../../utils/props").BuildPropType<StringConstructor, "ltr" | "rtl", never>;
54
+ data: any[];
54
55
  className: string;
55
- columnWidth: import("../../../../utils/props").BuildPropType<import("../../../../utils/props").PropWrapper<number | import("../types").ItemSize>, never, never>;
56
56
  perfMode: import("../../../../utils/props").BuildPropType<BooleanConstructor, unknown, unknown>;
57
57
  containerElement: import("../../../../utils/props").BuildPropType<import("../../../../utils/props").PropWrapper<string | Element>, unknown, unknown>;
58
58
  innerElement: import("../../../../utils/props").BuildPropType<readonly [StringConstructor, ObjectConstructor], unknown, unknown>;
@@ -73,8 +73,8 @@ declare const createGrid: ({ name, clearCache, getColumnPosition, getColumnStart
73
73
  "onItem-rendered"?: ((...args: any[]) => any) | undefined;
74
74
  }, {
75
75
  style: StyleValue;
76
- data: any[];
77
76
  direction: import("../../../../utils/props").BuildPropType<StringConstructor, "ltr" | "rtl", never>;
77
+ data: any[];
78
78
  className: string;
79
79
  perfMode: import("../../../../utils/props").BuildPropType<BooleanConstructor, unknown, unknown>;
80
80
  containerElement: import("../../../../utils/props").BuildPropType<import("../../../../utils/props").PropWrapper<string | Element>, unknown, unknown>;
@@ -70,9 +70,9 @@ declare const createList: ({ name, getOffset, getItemSize, getItemOffset, getEst
70
70
  } & {
71
71
  height: import("../../../../utils/props").BuildPropType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
72
72
  width: import("../../../../utils/props").BuildPropType<readonly [NumberConstructor, StringConstructor], unknown, unknown>;
73
- data: any[];
74
- layout: import("../../../../utils/props").BuildPropType<StringConstructor, "horizontal" | "vertical", never>;
75
73
  direction: import("../../../../utils/props").BuildPropType<StringConstructor, "ltr" | "rtl", never>;
74
+ layout: import("../../../../utils/props").BuildPropType<StringConstructor, "horizontal" | "vertical", never>;
75
+ data: any[];
76
76
  className: string;
77
77
  total: number;
78
78
  perfMode: import("../../../../utils/props").BuildPropType<BooleanConstructor, unknown, unknown>;
@@ -90,9 +90,9 @@ declare const createList: ({ name, getOffset, getItemSize, getItemOffset, getEst
90
90
  "onItem-rendered"?: ((...args: any[]) => any) | undefined;
91
91
  }, {
92
92
  style: import("../../../../utils/types").StyleValue;
93
- data: any[];
94
- layout: import("../../../../utils/props").BuildPropType<StringConstructor, "horizontal" | "vertical", never>;
95
93
  direction: import("../../../../utils/props").BuildPropType<StringConstructor, "ltr" | "rtl", never>;
94
+ layout: import("../../../../utils/props").BuildPropType<StringConstructor, "horizontal" | "vertical", never>;
95
+ data: any[];
96
96
  className: string;
97
97
  perfMode: import("../../../../utils/props").BuildPropType<BooleanConstructor, unknown, unknown>;
98
98
  containerElement: import("../../../../utils/props").BuildPropType<import("../../../../utils/props").PropWrapper<string | Element>, unknown, unknown>;
@@ -46,10 +46,10 @@ declare const FixedSizeGrid: import("vue").DefineComponent<{
46
46
  } & {
47
47
  height: import("../../../../utils/props").BuildPropType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
48
48
  width: import("../../../../utils/props").BuildPropType<readonly [NumberConstructor, StringConstructor], unknown, unknown>;
49
- data: any[];
49
+ columnWidth: import("../../../../utils/props").BuildPropType<import("../../../../utils/props").PropWrapper<number | ItemSize>, never, never>;
50
50
  direction: import("../../../../utils/props").BuildPropType<StringConstructor, "ltr" | "rtl", never>;
51
+ data: any[];
51
52
  className: string;
52
- columnWidth: import("../../../../utils/props").BuildPropType<import("../../../../utils/props").PropWrapper<number | ItemSize>, never, never>;
53
53
  perfMode: import("../../../../utils/props").BuildPropType<BooleanConstructor, unknown, unknown>;
54
54
  containerElement: import("../../../../utils/props").BuildPropType<import("../../../../utils/props").PropWrapper<string | Element>, unknown, unknown>;
55
55
  innerElement: import("../../../../utils/props").BuildPropType<readonly [StringConstructor, ObjectConstructor], unknown, unknown>;
@@ -70,8 +70,8 @@ declare const FixedSizeGrid: import("vue").DefineComponent<{
70
70
  "onItem-rendered"?: ((...args: any[]) => any) | undefined;
71
71
  }, {
72
72
  style: import("../../../../utils/types").StyleValue;
73
- data: any[];
74
73
  direction: import("../../../../utils/props").BuildPropType<StringConstructor, "ltr" | "rtl", never>;
74
+ data: any[];
75
75
  className: string;
76
76
  perfMode: import("../../../../utils/props").BuildPropType<BooleanConstructor, unknown, unknown>;
77
77
  containerElement: import("../../../../utils/props").BuildPropType<import("../../../../utils/props").PropWrapper<string | Element>, unknown, unknown>;
@@ -68,9 +68,9 @@ declare const DynamicSizeList: import("vue").DefineComponent<{
68
68
  } & {
69
69
  height: import("../../../../utils/props").BuildPropType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
70
70
  width: import("../../../../utils/props").BuildPropType<readonly [NumberConstructor, StringConstructor], unknown, unknown>;
71
- data: any[];
72
- layout: import("../../../../utils/props").BuildPropType<StringConstructor, "horizontal" | "vertical", never>;
73
71
  direction: import("../../../../utils/props").BuildPropType<StringConstructor, "ltr" | "rtl", never>;
72
+ layout: import("../../../../utils/props").BuildPropType<StringConstructor, "horizontal" | "vertical", never>;
73
+ data: any[];
74
74
  className: string;
75
75
  total: number;
76
76
  perfMode: import("../../../../utils/props").BuildPropType<BooleanConstructor, unknown, unknown>;
@@ -88,9 +88,9 @@ declare const DynamicSizeList: import("vue").DefineComponent<{
88
88
  "onItem-rendered"?: ((...args: any[]) => any) | undefined;
89
89
  }, {
90
90
  style: import("../../../../utils/types").StyleValue;
91
- data: any[];
92
- layout: import("../../../../utils/props").BuildPropType<StringConstructor, "horizontal" | "vertical", never>;
93
91
  direction: import("../../../../utils/props").BuildPropType<StringConstructor, "ltr" | "rtl", never>;
92
+ layout: import("../../../../utils/props").BuildPropType<StringConstructor, "horizontal" | "vertical", never>;
93
+ data: any[];
94
94
  className: string;
95
95
  perfMode: import("../../../../utils/props").BuildPropType<BooleanConstructor, unknown, unknown>;
96
96
  containerElement: import("../../../../utils/props").BuildPropType<import("../../../../utils/props").PropWrapper<string | Element>, unknown, unknown>;
@@ -45,10 +45,10 @@ declare const FixedSizeGrid: import("vue").DefineComponent<{
45
45
  } & {
46
46
  height: import("../../../../utils/props").BuildPropType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
47
47
  width: import("../../../../utils/props").BuildPropType<readonly [NumberConstructor, StringConstructor], unknown, unknown>;
48
- data: any[];
48
+ columnWidth: import("../../../../utils/props").BuildPropType<import("../../../../utils/props").PropWrapper<number | import("../types").ItemSize>, never, never>;
49
49
  direction: import("../../../../utils/props").BuildPropType<StringConstructor, "ltr" | "rtl", never>;
50
+ data: any[];
50
51
  className: string;
51
- columnWidth: import("../../../../utils/props").BuildPropType<import("../../../../utils/props").PropWrapper<number | import("../types").ItemSize>, never, never>;
52
52
  perfMode: import("../../../../utils/props").BuildPropType<BooleanConstructor, unknown, unknown>;
53
53
  containerElement: import("../../../../utils/props").BuildPropType<import("../../../../utils/props").PropWrapper<string | Element>, unknown, unknown>;
54
54
  innerElement: import("../../../../utils/props").BuildPropType<readonly [StringConstructor, ObjectConstructor], unknown, unknown>;
@@ -69,8 +69,8 @@ declare const FixedSizeGrid: import("vue").DefineComponent<{
69
69
  "onItem-rendered"?: ((...args: any[]) => any) | undefined;
70
70
  }, {
71
71
  style: import("../../../../utils/types").StyleValue;
72
- data: any[];
73
72
  direction: import("../../../../utils/props").BuildPropType<StringConstructor, "ltr" | "rtl", never>;
73
+ data: any[];
74
74
  className: string;
75
75
  perfMode: import("../../../../utils/props").BuildPropType<BooleanConstructor, unknown, unknown>;
76
76
  containerElement: import("../../../../utils/props").BuildPropType<import("../../../../utils/props").PropWrapper<string | Element>, unknown, unknown>;
@@ -67,9 +67,9 @@ declare const FixedSizeList: import("vue").DefineComponent<{
67
67
  } & {
68
68
  height: import("../../../../utils/props").BuildPropType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
69
69
  width: import("../../../../utils/props").BuildPropType<readonly [NumberConstructor, StringConstructor], unknown, unknown>;
70
- data: any[];
71
- layout: import("../../../../utils/props").BuildPropType<StringConstructor, "horizontal" | "vertical", never>;
72
70
  direction: import("../../../../utils/props").BuildPropType<StringConstructor, "ltr" | "rtl", never>;
71
+ layout: import("../../../../utils/props").BuildPropType<StringConstructor, "horizontal" | "vertical", never>;
72
+ data: any[];
73
73
  className: string;
74
74
  total: number;
75
75
  perfMode: import("../../../../utils/props").BuildPropType<BooleanConstructor, unknown, unknown>;
@@ -87,9 +87,9 @@ declare const FixedSizeList: import("vue").DefineComponent<{
87
87
  "onItem-rendered"?: ((...args: any[]) => any) | undefined;
88
88
  }, {
89
89
  style: import("../../../../utils/types").StyleValue;
90
- data: any[];
91
- layout: import("../../../../utils/props").BuildPropType<StringConstructor, "horizontal" | "vertical", never>;
92
90
  direction: import("../../../../utils/props").BuildPropType<StringConstructor, "ltr" | "rtl", never>;
91
+ layout: import("../../../../utils/props").BuildPropType<StringConstructor, "horizontal" | "vertical", never>;
92
+ data: any[];
93
93
  className: string;
94
94
  perfMode: import("../../../../utils/props").BuildPropType<BooleanConstructor, unknown, unknown>;
95
95
  containerElement: import("../../../../utils/props").BuildPropType<import("../../../../utils/props").PropWrapper<string | Element>, unknown, unknown>;
@@ -16,8 +16,8 @@ declare const ScrollBar: import("vue").DefineComponent<{
16
16
  readonly visible?: unknown;
17
17
  } & {
18
18
  visible: boolean;
19
- ratio: number;
20
19
  layout: import("../../../../utils/props").BuildPropType<StringConstructor, "horizontal" | "vertical", never>;
20
+ ratio: number;
21
21
  total: number;
22
22
  clientSize: number;
23
23
  scrollFrom: number;
package/es/utils/dom.d.ts CHANGED
@@ -3,14 +3,14 @@ import type { Nullable } from './types';
3
3
  export declare const on: (element: HTMLElement | Document | Window, event: string, handler: EventListenerOrEventListenerObject, useCapture?: boolean) => void;
4
4
  export declare const off: (element: HTMLElement | Document | Window, event: string, handler: EventListenerOrEventListenerObject, useCapture?: boolean) => void;
5
5
  export declare const once: (el: HTMLElement, event: string, fn: EventListener) => void;
6
- export declare function hasClass(el: HTMLElement, cls: string): boolean;
7
- export declare function addClass(el: HTMLElement, cls: string): void;
8
- export declare function removeClass(el: HTMLElement, cls: string): void;
6
+ export declare function hasClass(el: HTMLElement | Element, cls: string): boolean;
7
+ export declare function addClass(el: HTMLElement | Element, cls: string): void;
8
+ export declare function removeClass(el: HTMLElement | Element, cls: string): void;
9
9
  export declare const getStyle: (element: HTMLElement, styleName: string) => string;
10
10
  export declare function setStyle(element: HTMLElement, styleName: CSSProperties | string, value?: string): void;
11
11
  export declare function removeStyle(element: HTMLElement, style: CSSProperties | string): void;
12
- export declare const isScroll: (el: HTMLElement, isVertical?: Nullable<boolean>) => RegExpMatchArray;
13
- export declare const getScrollContainer: (el: HTMLElement, isVertical?: Nullable<boolean>) => Window | HTMLElement;
12
+ export declare const isScroll: (el: HTMLElement, isVertical?: Nullable<boolean>) => RegExpMatchArray | null;
13
+ export declare const getScrollContainer: (el: HTMLElement, isVertical?: Nullable<boolean>) => Window | HTMLElement | undefined;
14
14
  export declare const isInContainer: (el: Element | undefined, container: Element | Window | undefined) => boolean;
15
15
  export declare const getOffsetTop: (el: HTMLElement) => number;
16
16
  export declare const getOffsetTopDistance: (el: HTMLElement, containerEl: HTMLElement) => number;
package/es/utils/dom.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import isServer from './isServer';
2
2
  import { camelize, isObject } from './util';
3
- const trim = function (s) {
4
- return (s || '').replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g, '');
3
+ const trimArr = function (s) {
4
+ return (s || '').split(' ').filter((item) => !!item.trim());
5
5
  };
6
6
  export const on = function (element, event, handler, useCapture = false) {
7
7
  if (element && event && handler) {
@@ -31,54 +31,47 @@ export function hasClass(el, cls) {
31
31
  return el.classList.contains(cls);
32
32
  }
33
33
  else {
34
- return ` ${el.className} `.indexOf(` ${cls} `) > -1;
34
+ const className = el.getAttribute('class') || '';
35
+ return className.split(' ').includes(cls);
35
36
  }
36
37
  }
37
38
  export function addClass(el, cls) {
38
39
  if (!el)
39
40
  return;
40
- let curClass = el.className;
41
- const classes = (cls || '').split(' ');
42
- for (let i = 0, j = classes.length; i < j; i++) {
43
- const clsName = classes[i];
44
- if (!clsName)
45
- continue;
46
- if (el.classList) {
47
- el.classList.add(clsName);
48
- }
49
- else if (!hasClass(el, clsName)) {
50
- curClass += ` ${clsName}`;
51
- }
41
+ let className = el.getAttribute('class') || '';
42
+ const curClass = trimArr(className);
43
+ const classes = (cls || '')
44
+ .split(' ')
45
+ .filter((item) => !curClass.includes(item) && !!item.trim());
46
+ if (el.classList) {
47
+ el.classList.add(...classes);
52
48
  }
53
- if (!el.classList) {
54
- el.className = curClass;
49
+ else {
50
+ className += ` ${classes.join(' ')}`;
51
+ el.setAttribute('class', className);
55
52
  }
56
53
  }
57
54
  export function removeClass(el, cls) {
58
55
  if (!el || !cls)
59
56
  return;
60
- const classes = cls.split(' ');
61
- let curClass = ` ${el.className} `;
62
- for (let i = 0, j = classes.length; i < j; i++) {
63
- const clsName = classes[i];
64
- if (!clsName)
65
- continue;
66
- if (el.classList) {
67
- el.classList.remove(clsName);
68
- }
69
- else if (hasClass(el, clsName)) {
70
- curClass = curClass.replace(` ${clsName} `, ' ');
71
- }
72
- }
73
- if (!el.classList) {
74
- el.className = trim(curClass);
57
+ const classes = trimArr(cls);
58
+ let curClass = el.getAttribute('class') || '';
59
+ if (el.classList) {
60
+ el.classList.remove(...classes);
61
+ return;
75
62
  }
63
+ classes.forEach((item) => {
64
+ curClass = curClass.replace(` ${item} `, ' ');
65
+ });
66
+ const className = trimArr(curClass).join(' ');
67
+ el.setAttribute('class', className);
76
68
  }
77
69
  export const getStyle = function (element, styleName) {
70
+ var _a;
78
71
  if (isServer)
79
- return;
72
+ return '';
80
73
  if (!element || !styleName)
81
- return null;
74
+ return '';
82
75
  styleName = camelize(styleName);
83
76
  if (styleName === 'float') {
84
77
  styleName = 'cssFloat';
@@ -87,7 +80,7 @@ export const getStyle = function (element, styleName) {
87
80
  const style = element.style[styleName];
88
81
  if (style)
89
82
  return style;
90
- const computed = document.defaultView.getComputedStyle(element, '');
83
+ const computed = (_a = document.defaultView) === null || _a === void 0 ? void 0 : _a.getComputedStyle(element, '');
91
84
  return computed ? computed[styleName] : '';
92
85
  }
93
86
  catch (e) {
@@ -121,7 +114,7 @@ export function removeStyle(element, style) {
121
114
  }
122
115
  export const isScroll = (el, isVertical) => {
123
116
  if (isServer)
124
- return;
117
+ return null;
125
118
  const determinedDirection = isVertical === null || isVertical === undefined;
126
119
  const overflow = determinedDirection
127
120
  ? getStyle(el, 'overflow')
@@ -39,13 +39,13 @@ export declare type BuildPropReturn<T, D, R, V, C> = {
39
39
  readonly validator: ((val: unknown) => boolean) | undefined;
40
40
  [propKey]: true;
41
41
  } & BuildPropDefault<BuildPropType<T, V, C>, IfUnknown<D, never>, IfUnknown<R, false>>;
42
- export declare function buildProp<T = never, D extends BuildPropType<T, V, C> = never, R extends boolean = false, V = never, C = never>(option: BuildPropOption<T, D, R, V, C>): BuildPropReturn<T, D, R, V, C>;
42
+ export declare function buildProp<T = never, D extends BuildPropType<T, V, C> = never, R extends boolean = false, V = never, C = never>(option: BuildPropOption<T, D, R, V, C>, key?: string): BuildPropReturn<T, D, R, V, C>;
43
43
  declare type NativePropType = [
44
44
  ((...args: any) => any) | {
45
45
  new (...args: any): any;
46
46
  } | undefined | null
47
47
  ];
48
- export declare const buildProps: <O extends { [K in keyof O]: O[K] extends BuildPropReturn<any, any, any, any, any> ? O[K] : [O[K]] extends NativePropType ? O[K] : O[K] extends BuildPropOption<infer T, infer D, infer R, infer V, infer C> ? D extends BuildPropType<T, V, C> ? BuildPropOption<T, D, R, V, C> : never : never; }>(options: O) => { [K_1 in keyof O]: O[K_1] extends {
48
+ export declare const buildProps: <O extends { [K in keyof O]: O[K] extends BuildPropReturn<any, any, any, any, any> ? O[K] : [O[K]] extends NativePropType ? O[K] : O[K] extends BuildPropOption<infer T, infer D, infer R, infer V, infer C> ? D extends BuildPropType<T, V, C> ? BuildPropOption<T, D, R, V, C> : never : never; }>(props: O) => { [K_1 in keyof O]: O[K_1] extends {
49
49
  [propKey]: boolean;
50
50
  } ? O[K_1] : [O[K_1]] extends NativePropType ? O[K_1] : O[K_1] extends BuildPropOption<infer T_1, infer _D, infer R_1, infer V_1, infer C_1> ? BuildPropReturn<T_1, O[K_1]["default"], R_1, V_1, C_1> : never; };
51
51
  export declare const definePropType: <T>(val: any) => PropWrapper<T>;
package/es/utils/props.js CHANGED
@@ -1,10 +1,9 @@
1
+ import { warn } from 'vue';
1
2
  import { isObject } from '@vue/shared';
2
- import mapValues from 'lodash/mapValues';
3
- import { debugWarn } from './error';
3
+ import fromPairs from 'lodash/fromPairs';
4
4
  const wrapperKey = Symbol();
5
5
  export const propKey = Symbol();
6
- export function buildProp(option) {
7
- var _a;
6
+ export function buildProp(option, key) {
8
7
  if (!isObject(option) || !!option[propKey])
9
8
  return option;
10
9
  const { values, required, default: defaultValue, type, validator } = option;
@@ -19,20 +18,29 @@ export function buildProp(option) {
19
18
  if (validator)
20
19
  valid || (valid = validator(val));
21
20
  if (!valid && allowedValues.length > 0) {
22
- debugWarn(`Vue warn`, `Invalid prop: Expected one of (${allowedValues.join(', ')}), got value ${val}`);
21
+ const allowValuesText = [...new Set(allowedValues)]
22
+ .map((value) => JSON.stringify(value))
23
+ .join(', ');
24
+ warn(`Invalid prop: validation failed${key ? ` for prop "${key}"` : ''}. Expected one of [${allowValuesText}], got value ${JSON.stringify(val)}.`);
23
25
  }
24
26
  return valid;
25
27
  }
26
28
  : undefined;
27
29
  return {
28
- type: ((_a = type) === null || _a === void 0 ? void 0 : _a[wrapperKey]) || type,
30
+ type: typeof type === 'object' &&
31
+ Object.getOwnPropertySymbols(type).includes(wrapperKey)
32
+ ? type[wrapperKey]
33
+ : type,
29
34
  required: !!required,
30
35
  default: defaultValue,
31
36
  validator: _validator,
32
37
  [propKey]: true,
33
38
  };
34
39
  }
35
- export const buildProps = (options) => mapValues(options, (option) => buildProp(option));
40
+ export const buildProps = (props) => fromPairs(Object.entries(props).map(([key, option]) => [
41
+ key,
42
+ buildProp(option, key),
43
+ ]));
36
44
  export const definePropType = (val) => ({ [wrapperKey]: val });
37
45
  export const keyOf = (arr) => Object.keys(arr);
38
46
  export const mutable = (val) => val;
@@ -1,6 +1,6 @@
1
1
  import { camelize, capitalize, extend, hasOwn, isArray, isObject, isString, looseEqual } from '@vue/shared';
2
2
  import type { ComponentPublicInstance, CSSProperties, Ref } from 'vue';
3
- import type { AnyFunction, TimeoutHandle, Nullable } from './types';
3
+ import type { TimeoutHandle, Nullable } from './types';
4
4
  export declare const SCOPE = "Util";
5
5
  export declare function toObject<T>(arr: Array<T>): Record<string, T>;
6
6
  export declare const getValueByPath: (obj: any, paths?: string) => unknown;
@@ -20,7 +20,7 @@ export { hasOwn, isObject, isArray, isString, capitalize, camelize, looseEqual,
20
20
  export declare const isBool: (val: unknown) => val is boolean;
21
21
  export declare const isNumber: (val: unknown) => val is number;
22
22
  export declare const isHTMLElement: (val: unknown) => boolean;
23
- export declare function rafThrottle<T extends AnyFunction<any>>(fn: T): AnyFunction<void>;
23
+ export declare function rafThrottle<T extends (...args: any) => any>(fn: T): T;
24
24
  export declare const clearTimer: (timer: Ref<TimeoutHandle>) => void;
25
25
  export declare function getRandomInt(max: number): number;
26
26
  export declare function isUndefined(val: any): val is undefined;
package/es/utils/util.js CHANGED
@@ -2,7 +2,7 @@ import { getCurrentInstance } from 'vue';
2
2
  import { camelize, capitalize, extend, hasOwn, hyphenate, isArray, isObject, isString, isFunction, looseEqual, toRawType, } from '@vue/shared';
3
3
  import isEqualWith from 'lodash/isEqualWith';
4
4
  import isServer from './isServer';
5
- import { debugWarn } from './error';
5
+ import { debugWarn, throwError } from './error';
6
6
  export const SCOPE = 'Util';
7
7
  export function toObject(arr) {
8
8
  const res = {};
@@ -41,7 +41,7 @@ export function getPropByPath(obj, path, strict) {
41
41
  }
42
42
  else {
43
43
  if (strict) {
44
- throw new Error('please transfer a valid prop path to form item!');
44
+ throwError(SCOPE, 'Please transfer a valid prop path to form item!');
45
45
  }
46
46
  break;
47
47
  }
@@ -92,7 +92,7 @@ export function rafThrottle(fn) {
92
92
  return;
93
93
  locked = true;
94
94
  window.requestAnimationFrame(() => {
95
- fn.apply(this, args);
95
+ Reflect.apply(fn, this, args);
96
96
  locked = false;
97
97
  });
98
98
  };
package/es/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "1.0.3";
1
+ export declare const version = "1.0.5";
package/es/version.js CHANGED
@@ -1,3 +1,3 @@
1
- const version = "1.0.3";
1
+ const version = "1.0.5";
2
2
 
3
3
  export { version };