@vunk/form 2.18.1 → 2.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (325) hide show
  1. package/components/_plugin-vue_export-helper.cjs +1 -11
  2. package/components/api-tables-select/index.cjs +1 -467
  3. package/components/api-tables-select/index.mjs +56 -413
  4. package/components/api-tables-select/src/ctx.d.ts +152 -172
  5. package/components/api-tables-select/src/index.vue.d.ts +394 -983
  6. package/components/button/index.cjs +1 -112
  7. package/components/button/index.mjs +57 -85
  8. package/components/button/src/ctx.d.ts +28 -113
  9. package/components/button/src/index.vue.d.ts +317 -625
  10. package/components/card-input-collection/index.cjs +1 -352
  11. package/components/card-input-collection/index.mjs +177 -261
  12. package/components/card-input-collection/src/core.vue.d.ts +54 -950
  13. package/components/card-input-collection/src/ctx.d.ts +19 -49
  14. package/components/card-input-collection/src/index.vue.d.ts +46 -110
  15. package/components/cascader/index.cjs +1 -150
  16. package/components/cascader/index.mjs +88 -116
  17. package/components/cascader/src/ctx.d.ts +140 -207
  18. package/components/cascader/src/index.vue.d.ts +315 -522
  19. package/components/cascader/src/use.d.ts +1 -1
  20. package/components/checkbox/index.cjs +1 -152
  21. package/components/checkbox/index.mjs +75 -119
  22. package/components/checkbox/src/ctx.d.ts +46 -69
  23. package/components/checkbox/src/index.vue.d.ts +448 -1016
  24. package/components/cloneDeep.cjs +1 -2106
  25. package/components/color-picker/index.cjs +1 -80
  26. package/components/color-picker/index.mjs +46 -69
  27. package/components/color-picker/src/ctx.d.ts +130 -107
  28. package/components/color-picker/src/index.vue.d.ts +285 -255
  29. package/components/date-picker/index.cjs +1 -119
  30. package/components/date-picker/index.mjs +63 -97
  31. package/components/date-picker/src/ctx.d.ts +123 -206
  32. package/components/date-picker/src/index.vue.d.ts +269 -1358
  33. package/components/date-picker/src/types.d.ts +7 -7
  34. package/components/date-picker-range/index.cjs +1 -177
  35. package/components/date-picker-range/index.mjs +62 -113
  36. package/components/date-picker-range/src/ctx.d.ts +130 -206
  37. package/components/date-picker-range/src/index.vue.d.ts +861 -448
  38. package/components/debounce.cjs +1 -0
  39. package/components/dialog/index.cjs +1 -126
  40. package/components/dialog/index.mjs +65 -99
  41. package/components/dialog/src/ctx.d.ts +17 -108
  42. package/components/dialog/src/index.vue.d.ts +77 -1072
  43. package/components/dialog-input-collection/index.cjs +1 -624
  44. package/components/dialog-input-collection/index.mjs +276 -498
  45. package/components/dialog-input-collection/src/ctx.d.ts +21 -52
  46. package/components/dialog-input-collection/src/dialog-form.vue.d.ts +29 -6371
  47. package/components/dialog-input-collection/src/index.vue.d.ts +65 -7630
  48. package/components/dialog-input-collection/src/layout.vue.d.ts +13 -73
  49. package/components/download-plus/index.cjs +1 -456
  50. package/components/download-plus/index.mjs +215 -358
  51. package/components/download-plus/src/api.d.ts +1 -1
  52. package/components/download-plus/src/ctx.d.ts +21 -52
  53. package/components/download-plus/src/index.vue.d.ts +437 -1177
  54. package/components/editable-text/index.cjs +1 -295
  55. package/components/editable-text/index.mjs +113 -239
  56. package/components/editable-text/src/ctx.d.ts +24 -50
  57. package/components/editable-text/src/index.vue.d.ts +59 -3258
  58. package/components/el-slider/index.cjs +1 -0
  59. package/components/el-slider/index.d.ts +5 -0
  60. package/components/el-slider/index.mjs +475 -0
  61. package/components/el-slider/src/button.d.ts +36 -0
  62. package/components/el-slider/src/button.vue.d.ts +41 -0
  63. package/components/el-slider/src/composables/index.cjs +1 -0
  64. package/components/el-slider/src/composables/index.d.ts +6 -0
  65. package/components/el-slider/src/composables/index.mjs +9 -0
  66. package/components/el-slider/src/composables/use-lifecycle.d.ts +4 -0
  67. package/components/el-slider/src/composables/use-marks.d.ts +7 -0
  68. package/components/el-slider/src/composables/use-slide.d.ts +23 -0
  69. package/components/el-slider/src/composables/use-slider-button.d.ts +18 -0
  70. package/components/el-slider/src/composables/use-stops.d.ts +8 -0
  71. package/components/el-slider/src/composables/use-watch.d.ts +4 -0
  72. package/components/el-slider/src/constants.d.ts +14 -0
  73. package/components/el-slider/src/marker.d.ts +37 -0
  74. package/components/el-slider/src/slider-core.vue.d.ts +218 -0
  75. package/components/el-slider/src/slider.d.ts +174 -0
  76. package/components/esri-input-geojson/index.cjs +2 -1604
  77. package/components/esri-input-geojson/index.mjs +682 -1290
  78. package/components/esri-input-geojson/src/append.vue.d.ts +239 -1099
  79. package/components/esri-input-geojson/src/const.d.ts +1 -1
  80. package/components/esri-input-geojson/src/ctx.d.ts +66 -161
  81. package/components/esri-input-geojson/src/default-view.vue.d.ts +8 -132
  82. package/components/esri-input-geojson/src/index.vue.d.ts +982 -708
  83. package/components/esri-input-geojson/src/types.d.ts +1 -0
  84. package/components/esri-input-geojson/src/viewer.vue.d.ts +53 -282
  85. package/components/fieldset/index.cjs +1 -110
  86. package/components/fieldset/index.mjs +63 -76
  87. package/components/fieldset/src/ctx.d.ts +4 -4
  88. package/components/fieldset/src/index.vue.d.ts +7 -7
  89. package/components/form/index.cjs +1 -248
  90. package/components/form/index.mjs +107 -161
  91. package/components/form/src/ctx.d.ts +15 -64
  92. package/components/form/src/index.vue.d.ts +374 -2431
  93. package/components/form-item/index.cjs +1 -294
  94. package/components/form-item/index.mjs +140 -229
  95. package/components/form-item/src/core.vue.d.ts +32 -1854
  96. package/components/form-item/src/ctx.d.ts +19 -51
  97. package/components/form-item/src/index.vue.d.ts +38 -101
  98. package/components/form-item-renderer/index.cjs +1 -193
  99. package/components/form-item-renderer/index.mjs +103 -162
  100. package/components/form-item-renderer/src/core.vue.d.ts +9 -9
  101. package/components/form-item-renderer/src/ctx.d.ts +3 -3
  102. package/components/form-item-renderer/src/index.vue.d.ts +24 -74
  103. package/components/form-item-renderer-template/index.cjs +1 -47
  104. package/components/form-item-renderer-template/index.mjs +20 -33
  105. package/components/form-item-renderer-template/src/index.vue.d.ts +1 -1
  106. package/components/forms-provider/index.cjs +1 -99
  107. package/components/forms-provider/index.mjs +44 -73
  108. package/components/forms-provider/src/core.d.ts +3 -2
  109. package/components/forms-provider/src/segment.vue.d.ts +8 -8
  110. package/components/forms-provider/src/view.vue.d.ts +14 -4
  111. package/components/index.cjs +1 -399
  112. package/components/index2.cjs +1 -17
  113. package/components/information/index.cjs +1 -65
  114. package/components/information/index.mjs +28 -38
  115. package/components/information/src/ctx.d.ts +2 -2
  116. package/components/information/src/index.vue.d.ts +4 -4
  117. package/components/information-collection/index.cjs +1 -81
  118. package/components/information-collection/index.mjs +44 -48
  119. package/components/information-collection/src/ctx.d.ts +29 -65
  120. package/components/information-collection/src/index.vue.d.ts +64 -136
  121. package/components/information-renderer/index.cjs +1 -16
  122. package/components/information-renderer/index.d.ts +9 -9
  123. package/components/information-renderer/index.mjs +9 -10
  124. package/components/information-tag/index.cjs +1 -101
  125. package/components/information-tag/index.mjs +44 -54
  126. package/components/information-tag/src/ctx.d.ts +6 -21
  127. package/components/information-tag/src/index.vue.d.ts +23 -51
  128. package/components/information-templates-default/index.cjs +1 -101
  129. package/components/information-templates-default/index.mjs +63 -73
  130. package/components/information-templates-default/src/index.vue.d.ts +1 -1
  131. package/components/input/index.cjs +1 -115
  132. package/components/input/index.mjs +60 -83
  133. package/components/input/src/ctx.d.ts +51 -152
  134. package/components/input/src/index.vue.d.ts +392 -951
  135. package/components/input-array/index.cjs +1 -297
  136. package/components/input-array/index.mjs +115 -232
  137. package/components/input-array/src/ctx.d.ts +19 -49
  138. package/components/input-array/src/form-template.vue.d.ts +1 -900
  139. package/components/input-array/src/index.vue.d.ts +43 -729
  140. package/components/input-collection/index.cjs +1 -444
  141. package/components/input-collection/index.mjs +195 -347
  142. package/components/input-collection/src/core.vue.d.ts +64 -1026
  143. package/components/input-collection/src/ctx.d.ts +21 -51
  144. package/components/input-collection/src/index.vue.d.ts +50 -114
  145. package/components/input-file/index.cjs +1 -142
  146. package/components/input-file/index.mjs +68 -100
  147. package/components/input-file/src/ctx.d.ts +8 -29
  148. package/components/input-file/src/index.vue.d.ts +444 -74
  149. package/components/input-file/src/template.vue.d.ts +1 -124
  150. package/components/input-link/index.cjs +1 -167
  151. package/components/input-link/index.mjs +60 -83
  152. package/components/input-link/src/ctx.d.ts +52 -137
  153. package/components/input-link/src/index.vue.d.ts +833 -311
  154. package/components/input-number/index.cjs +1 -119
  155. package/components/input-number/index.mjs +73 -87
  156. package/components/input-number/src/ctx.d.ts +38 -131
  157. package/components/input-number/src/index.vue.d.ts +321 -683
  158. package/components/input-tag/index.cjs +1 -100
  159. package/components/input-tag/index.mjs +51 -78
  160. package/components/input-tag/src/ctx.d.ts +43 -145
  161. package/components/input-tag/src/index.vue.d.ts +324 -778
  162. package/components/isObject.cjs +1 -165
  163. package/components/monaco-editor/index.cjs +1 -83
  164. package/components/monaco-editor/index.mjs +40 -59
  165. package/components/monaco-editor/src/ctx.d.ts +19 -44
  166. package/components/monaco-editor/src/index.vue.d.ts +209 -109
  167. package/components/radio/index.cjs +1 -267
  168. package/components/radio/index.mjs +110 -209
  169. package/components/radio/src/ctx.d.ts +27 -91
  170. package/components/radio/src/index.vue.d.ts +298 -1279
  171. package/components/radio/src/option.vue.d.ts +29 -881
  172. package/components/radio/src/wraper.vue.d.ts +64 -196
  173. package/components/renderer-data/index.cjs +1 -41
  174. package/components/renderer-data/index.mjs +19 -26
  175. package/components/renderer-data/src/ctx.d.ts +1 -1
  176. package/components/renderer-data/src/index.vue.d.ts +2 -2
  177. package/components/select/index.cjs +1 -311
  178. package/components/select/index.mjs +156 -214
  179. package/components/select/src/core.vue.d.ts +638 -1080
  180. package/components/select/src/ctx.d.ts +140 -223
  181. package/components/select/src/index.vue.d.ts +334 -610
  182. package/components/select/src/options.vue.d.ts +1 -1
  183. package/components/slider/index.cjs +1 -88
  184. package/components/slider/index.mjs +41 -70
  185. package/components/slider/src/ctx.d.ts +63 -174
  186. package/components/slider/src/index.vue.d.ts +151 -420
  187. package/components/style.css +1 -0
  188. package/components/switch/index.cjs +1 -88
  189. package/components/switch/index.mjs +37 -69
  190. package/components/switch/src/ctx.d.ts +34 -113
  191. package/components/switch/src/index.vue.d.ts +88 -699
  192. package/components/switch/src/types.d.ts +2 -2
  193. package/components/tables-select/index.cjs +1 -263
  194. package/components/tables-select/index.mjs +102 -172
  195. package/components/tables-select/src/ctx.d.ts +76 -91
  196. package/components/tables-select/src/index.vue.d.ts +228 -4969
  197. package/components/template-instances-provider/index.cjs +1 -31
  198. package/components/template-instances-provider/index.mjs +18 -22
  199. package/components/template-instances-provider/src/index.vue.d.ts +2 -2
  200. package/components/templates-default/index.cjs +1 -235
  201. package/components/templates-default/index.mjs +152 -211
  202. package/components/templates-default/src/ctx.d.ts +5 -3
  203. package/components/templates-default/src/index.vue.d.ts +7298 -157
  204. package/components/templates-element-plus/index.cjs +1 -112
  205. package/components/templates-element-plus/index.mjs +49 -91
  206. package/components/templates-element-plus/src/ctx.d.ts +1 -1
  207. package/components/templates-element-plus/src/index.vue.d.ts +65 -258
  208. package/components/templates-esri/index.cjs +1 -65
  209. package/components/templates-esri/index.mjs +29 -39
  210. package/components/templates-esri/src/ctx.d.ts +1 -1
  211. package/components/templates-esri/src/index.vue.d.ts +1776 -24
  212. package/components/templates-layout/index.cjs +1 -137
  213. package/components/templates-layout/index.mjs +78 -116
  214. package/components/templates-layout/src/ctx.d.ts +1 -1
  215. package/components/templates-layout/src/index.vue.d.ts +79 -411
  216. package/components/templates-variant/index.cjs +1 -70
  217. package/components/templates-variant/index.mjs +33 -43
  218. package/components/templates-variant/src/ctx.d.ts +1 -1
  219. package/components/templates-variant/src/index.vue.d.ts +1238 -24
  220. package/components/time-picker/index.cjs +1 -104
  221. package/components/time-picker/index.mjs +57 -87
  222. package/components/time-picker/src/ctx.d.ts +121 -211
  223. package/components/time-picker/src/index.vue.d.ts +263 -1368
  224. package/components/upload/index.cjs +1 -663
  225. package/components/upload/index.mjs +343 -537
  226. package/components/upload/src/ctx.d.ts +108 -195
  227. package/components/upload/src/file.vue.d.ts +197 -776
  228. package/components/upload/src/index.vue.d.ts +689 -1931
  229. package/components/upload/src/types.d.ts +1 -1
  230. package/components/upload/src/wraper.vue.d.ts +232 -407
  231. package/components/upload-plus/index.cjs +21 -18673
  232. package/components/upload-plus/index.mjs +4598 -18372
  233. package/components/upload-plus/src/api.d.ts +2 -2
  234. package/components/upload-plus/src/ctx.d.ts +24 -51
  235. package/components/upload-plus/src/index.vue.d.ts +51 -1656
  236. package/components/use-watch.cjs +1 -0
  237. package/components/van-cascader/index.cjs +1 -125
  238. package/components/van-cascader/index.mjs +51 -96
  239. package/components/van-cascader/src/ctx.d.ts +135 -203
  240. package/components/van-cascader/src/index.vue.d.ts +312 -985
  241. package/components/var-datetime-picker/index.cjs +1 -333
  242. package/components/var-datetime-picker/index.mjs +175 -254
  243. package/components/var-datetime-picker/src/ctx.d.ts +19 -50
  244. package/components/var-datetime-picker/src/index.vue.d.ts +688 -1115
  245. package/components/vditor/index.cjs +1 -86
  246. package/components/vditor/index.mjs +40 -66
  247. package/components/vditor/src/ctx.d.ts +16 -45
  248. package/components/vditor/src/index.vue.d.ts +195 -120
  249. package/composables/element-plus/index.cjs +1 -23
  250. package/composables/element-plus/index.mjs +14 -18
  251. package/composables/index.cjs +1 -161
  252. package/composables/index.d.ts +1 -0
  253. package/composables/index.mjs +102 -135
  254. package/composables/useForm.d.ts +2 -2
  255. package/composables/useRtl.d.ts +18 -0
  256. package/composables/useSourceManager.d.ts +2 -2
  257. package/composables/useTemplateInstances.d.ts +3 -3
  258. package/index.css +1 -562
  259. package/index.d.ts +0 -3
  260. package/index.esm.js +23 -48
  261. package/locale/index.cjs +1 -110
  262. package/locale/index.mjs +37 -45
  263. package/locale/lang/en.d.ts +2 -6
  264. package/locale/lang/index.cjs +1 -2
  265. package/locale/lang/index.d.ts +1 -0
  266. package/locale/lang/zh-cn.d.ts +2 -6
  267. package/package.json +14 -85
  268. package/shared/const/index.cjs +1 -59
  269. package/shared/const/index.d.ts +1 -1
  270. package/shared/const/index.mjs +18 -20
  271. package/shared/element-plus/ctx.d.ts +40 -37
  272. package/shared/element-plus/index.cjs +1 -211
  273. package/shared/element-plus/index.mjs +93 -161
  274. package/shared/element-plus/instances.d.ts +207 -321
  275. package/shared/form/index.cjs +1 -33
  276. package/shared/form/index.mjs +23 -25
  277. package/shared/helper/index.cjs +1 -11
  278. package/shared/helper/index.mjs +7 -8
  279. package/shared/index.cjs +1 -8
  280. package/shared/index.mjs +5 -1
  281. package/shared/infer-prop/index.cjs +1 -36
  282. package/shared/infer-prop/index.mjs +22 -28
  283. package/shared/progress-it/index.cjs +1 -42
  284. package/shared/progress-it/index.mjs +15 -31
  285. package/shared/rules/index.cjs +1 -56
  286. package/shared/rules/index.mjs +19 -18
  287. package/shared/types/form/index.cjs +1 -2
  288. package/shared/types/index.cjs +1 -2
  289. package/shared/types/source/index.cjs +1 -2
  290. package/shared/types/source-manager/index.cjs +1 -2
  291. package/shared/upload/index.cjs +1 -774
  292. package/shared/upload/index.mjs +180 -764
  293. package/component.d.ts +0 -3
  294. package/components/_plugin-vue_export-helper.mjs +0 -9
  295. package/components/card-input-collection/index.css +0 -21
  296. package/components/cascader/index.css +0 -9
  297. package/components/checkbox/index.css +0 -30
  298. package/components/cloneDeep.mjs +0 -2104
  299. package/components/date-picker-range/index.css +0 -18
  300. package/components/dialog-input-collection/index.css +0 -21
  301. package/components/download-plus/index.css +0 -68
  302. package/components/editable-text/index.css +0 -9
  303. package/components/esri-input-geojson/index.css +0 -32
  304. package/components/fieldset/index.css +0 -5
  305. package/components/form-item/index.css +0 -35
  306. package/components/index.mjs +0 -378
  307. package/components/index2.mjs +0 -14
  308. package/components/information-tag/index.css +0 -6
  309. package/components/information-templates-default/index.css +0 -16
  310. package/components/input-array/index.css +0 -14
  311. package/components/input-collection/index.css +0 -20
  312. package/components/input-link/index.css +0 -4
  313. package/components/input-number/index.css +0 -13
  314. package/components/isObject.mjs +0 -158
  315. package/components/monaco-editor/index.css +0 -4
  316. package/components/radio/index.css +0 -40
  317. package/components/select/index.css +0 -15
  318. package/components/switch/index.css +0 -10
  319. package/components/tables-select/index.css +0 -3
  320. package/components/templates-layout/index.css +0 -3
  321. package/components/upload/index.css +0 -34
  322. package/components/upload-plus/index.css +0 -84
  323. package/components/van-cascader/index.css +0 -6
  324. package/components/var-datetime-picker/index.css +0 -17
  325. package/defaults.d.ts +0 -5
@@ -1,12 +1,10 @@
1
- import { defineComponent, reactive, ref, watch, openBlock, createBlock, mergeProps, toHandlers, withCtx, createVNode, renderSlot } from 'vue';
2
- import { _VkfTablesSelectCtx, VkfTablesSelect } from '@vunk/form/components/tables-select';
3
- import { pickObject } from '@vunk/shared/object';
4
- import { VkfForm } from '@vunk/form';
5
- import { useDataComputed } from '@vunk/core/composables';
6
- import { i as isObjectLike, b as baseGetTag, a as isObject, r as root } from '../isObject.mjs';
7
- import { _ as _export_sfc } from '../_plugin-vue_export-helper.mjs';
8
-
9
- const tablesSelectProps = pickObject(_VkfTablesSelectCtx.props, {
1
+ import { defineComponent as w, reactive as v, ref as k, watch as d, openBlock as z, createBlock as A, unref as o, mergeProps as P, toHandlers as V, withCtx as _, createVNode as q, renderSlot as D } from "vue";
2
+ import { _VkfTablesSelectCtx as n, VkfTablesSelect as T } from "@vunk/form/components/tables-select";
3
+ import { pickObject as j } from "@vunk/shared/object";
4
+ import { VkfForm as O } from "@vunk/form";
5
+ import { useDataComputed as R } from "@vunk/core/composables";
6
+ import { d as C } from "../debounce.cjs";
7
+ const x = j(n.props, {
10
8
  excludes: [
11
9
  "currentPage",
12
10
  "pageSize",
@@ -14,9 +12,8 @@ const tablesSelectProps = pickObject(_VkfTablesSelectCtx.props, {
14
12
  "data",
15
13
  "start"
16
14
  ]
17
- });
18
- const props = {
19
- ...tablesSelectProps,
15
+ }), B = {
16
+ ...x,
20
17
  /**
21
18
  * @description 读取数据的api
22
19
  */
@@ -43,419 +40,65 @@ const props = {
43
40
  type: Object,
44
41
  default: void 0
45
42
  }
46
- };
47
- const emits = {
48
- ..._VkfTablesSelectCtx.emits,
43
+ }, F = {
44
+ ...n.emits,
49
45
  "setData:query": null
50
- };
51
-
52
- /** `Object#toString` result references. */
53
- var symbolTag = '[object Symbol]';
54
-
55
- /**
56
- * Checks if `value` is classified as a `Symbol` primitive or object.
57
- *
58
- * @static
59
- * @memberOf _
60
- * @since 4.0.0
61
- * @category Lang
62
- * @param {*} value The value to check.
63
- * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
64
- * @example
65
- *
66
- * _.isSymbol(Symbol.iterator);
67
- * // => true
68
- *
69
- * _.isSymbol('abc');
70
- * // => false
71
- */
72
- function isSymbol(value) {
73
- return typeof value == 'symbol' ||
74
- (isObjectLike(value) && baseGetTag(value) == symbolTag);
75
- }
76
-
77
- /** Used to match a single whitespace character. */
78
- var reWhitespace = /\s/;
79
-
80
- /**
81
- * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
82
- * character of `string`.
83
- *
84
- * @private
85
- * @param {string} string The string to inspect.
86
- * @returns {number} Returns the index of the last non-whitespace character.
87
- */
88
- function trimmedEndIndex(string) {
89
- var index = string.length;
90
-
91
- while (index-- && reWhitespace.test(string.charAt(index))) {}
92
- return index;
93
- }
94
-
95
- /** Used to match leading whitespace. */
96
- var reTrimStart = /^\s+/;
97
-
98
- /**
99
- * The base implementation of `_.trim`.
100
- *
101
- * @private
102
- * @param {string} string The string to trim.
103
- * @returns {string} Returns the trimmed string.
104
- */
105
- function baseTrim(string) {
106
- return string
107
- ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
108
- : string;
109
- }
110
-
111
- /** Used as references for various `Number` constants. */
112
- var NAN = 0 / 0;
113
-
114
- /** Used to detect bad signed hexadecimal string values. */
115
- var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
116
-
117
- /** Used to detect binary string values. */
118
- var reIsBinary = /^0b[01]+$/i;
119
-
120
- /** Used to detect octal string values. */
121
- var reIsOctal = /^0o[0-7]+$/i;
122
-
123
- /** Built-in method references without a dependency on `root`. */
124
- var freeParseInt = parseInt;
125
-
126
- /**
127
- * Converts `value` to a number.
128
- *
129
- * @static
130
- * @memberOf _
131
- * @since 4.0.0
132
- * @category Lang
133
- * @param {*} value The value to process.
134
- * @returns {number} Returns the number.
135
- * @example
136
- *
137
- * _.toNumber(3.2);
138
- * // => 3.2
139
- *
140
- * _.toNumber(Number.MIN_VALUE);
141
- * // => 5e-324
142
- *
143
- * _.toNumber(Infinity);
144
- * // => Infinity
145
- *
146
- * _.toNumber('3.2');
147
- * // => 3.2
148
- */
149
- function toNumber(value) {
150
- if (typeof value == 'number') {
151
- return value;
152
- }
153
- if (isSymbol(value)) {
154
- return NAN;
155
- }
156
- if (isObject(value)) {
157
- var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
158
- value = isObject(other) ? (other + '') : other;
159
- }
160
- if (typeof value != 'string') {
161
- return value === 0 ? value : +value;
162
- }
163
- value = baseTrim(value);
164
- var isBinary = reIsBinary.test(value);
165
- return (isBinary || reIsOctal.test(value))
166
- ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
167
- : (reIsBadHex.test(value) ? NAN : +value);
168
- }
169
-
170
- /**
171
- * Gets the timestamp of the number of milliseconds that have elapsed since
172
- * the Unix epoch (1 January 1970 00:00:00 UTC).
173
- *
174
- * @static
175
- * @memberOf _
176
- * @since 2.4.0
177
- * @category Date
178
- * @returns {number} Returns the timestamp.
179
- * @example
180
- *
181
- * _.defer(function(stamp) {
182
- * console.log(_.now() - stamp);
183
- * }, _.now());
184
- * // => Logs the number of milliseconds it took for the deferred invocation.
185
- */
186
- var now = function() {
187
- return root.Date.now();
188
- };
189
-
190
- /** Error message constants. */
191
- var FUNC_ERROR_TEXT = 'Expected a function';
192
-
193
- /* Built-in method references for those with the same name as other `lodash` methods. */
194
- var nativeMax = Math.max,
195
- nativeMin = Math.min;
196
-
197
- /**
198
- * Creates a debounced function that delays invoking `func` until after `wait`
199
- * milliseconds have elapsed since the last time the debounced function was
200
- * invoked. The debounced function comes with a `cancel` method to cancel
201
- * delayed `func` invocations and a `flush` method to immediately invoke them.
202
- * Provide `options` to indicate whether `func` should be invoked on the
203
- * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
204
- * with the last arguments provided to the debounced function. Subsequent
205
- * calls to the debounced function return the result of the last `func`
206
- * invocation.
207
- *
208
- * **Note:** If `leading` and `trailing` options are `true`, `func` is
209
- * invoked on the trailing edge of the timeout only if the debounced function
210
- * is invoked more than once during the `wait` timeout.
211
- *
212
- * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
213
- * until to the next tick, similar to `setTimeout` with a timeout of `0`.
214
- *
215
- * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
216
- * for details over the differences between `_.debounce` and `_.throttle`.
217
- *
218
- * @static
219
- * @memberOf _
220
- * @since 0.1.0
221
- * @category Function
222
- * @param {Function} func The function to debounce.
223
- * @param {number} [wait=0] The number of milliseconds to delay.
224
- * @param {Object} [options={}] The options object.
225
- * @param {boolean} [options.leading=false]
226
- * Specify invoking on the leading edge of the timeout.
227
- * @param {number} [options.maxWait]
228
- * The maximum time `func` is allowed to be delayed before it's invoked.
229
- * @param {boolean} [options.trailing=true]
230
- * Specify invoking on the trailing edge of the timeout.
231
- * @returns {Function} Returns the new debounced function.
232
- * @example
233
- *
234
- * // Avoid costly calculations while the window size is in flux.
235
- * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
236
- *
237
- * // Invoke `sendMail` when clicked, debouncing subsequent calls.
238
- * jQuery(element).on('click', _.debounce(sendMail, 300, {
239
- * 'leading': true,
240
- * 'trailing': false
241
- * }));
242
- *
243
- * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
244
- * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
245
- * var source = new EventSource('/stream');
246
- * jQuery(source).on('message', debounced);
247
- *
248
- * // Cancel the trailing debounced invocation.
249
- * jQuery(window).on('popstate', debounced.cancel);
250
- */
251
- function debounce(func, wait, options) {
252
- var lastArgs,
253
- lastThis,
254
- maxWait,
255
- result,
256
- timerId,
257
- lastCallTime,
258
- lastInvokeTime = 0,
259
- leading = false,
260
- maxing = false,
261
- trailing = true;
262
-
263
- if (typeof func != 'function') {
264
- throw new TypeError(FUNC_ERROR_TEXT);
265
- }
266
- wait = toNumber(wait) || 0;
267
- if (isObject(options)) {
268
- leading = !!options.leading;
269
- maxing = 'maxWait' in options;
270
- maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
271
- trailing = 'trailing' in options ? !!options.trailing : trailing;
272
- }
273
-
274
- function invokeFunc(time) {
275
- var args = lastArgs,
276
- thisArg = lastThis;
277
-
278
- lastArgs = lastThis = undefined;
279
- lastInvokeTime = time;
280
- result = func.apply(thisArg, args);
281
- return result;
282
- }
283
-
284
- function leadingEdge(time) {
285
- // Reset any `maxWait` timer.
286
- lastInvokeTime = time;
287
- // Start the timer for the trailing edge.
288
- timerId = setTimeout(timerExpired, wait);
289
- // Invoke the leading edge.
290
- return leading ? invokeFunc(time) : result;
291
- }
292
-
293
- function remainingWait(time) {
294
- var timeSinceLastCall = time - lastCallTime,
295
- timeSinceLastInvoke = time - lastInvokeTime,
296
- timeWaiting = wait - timeSinceLastCall;
297
-
298
- return maxing
299
- ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
300
- : timeWaiting;
301
- }
302
-
303
- function shouldInvoke(time) {
304
- var timeSinceLastCall = time - lastCallTime,
305
- timeSinceLastInvoke = time - lastInvokeTime;
306
-
307
- // Either this is the first call, activity has stopped and we're at the
308
- // trailing edge, the system time has gone backwards and we're treating
309
- // it as the trailing edge, or we've hit the `maxWait` limit.
310
- return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
311
- (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
312
- }
313
-
314
- function timerExpired() {
315
- var time = now();
316
- if (shouldInvoke(time)) {
317
- return trailingEdge(time);
318
- }
319
- // Restart the timer.
320
- timerId = setTimeout(timerExpired, remainingWait(time));
321
- }
322
-
323
- function trailingEdge(time) {
324
- timerId = undefined;
325
-
326
- // Only invoke if we have `lastArgs` which means `func` has been
327
- // debounced at least once.
328
- if (trailing && lastArgs) {
329
- return invokeFunc(time);
330
- }
331
- lastArgs = lastThis = undefined;
332
- return result;
333
- }
334
-
335
- function cancel() {
336
- if (timerId !== undefined) {
337
- clearTimeout(timerId);
338
- }
339
- lastInvokeTime = 0;
340
- lastArgs = lastCallTime = lastThis = timerId = undefined;
341
- }
342
-
343
- function flush() {
344
- return timerId === undefined ? result : trailingEdge(now());
345
- }
346
-
347
- function debounced() {
348
- var time = now(),
349
- isInvoking = shouldInvoke(time);
350
-
351
- lastArgs = arguments;
352
- lastThis = this;
353
- lastCallTime = time;
354
-
355
- if (isInvoking) {
356
- if (timerId === undefined) {
357
- return leadingEdge(lastCallTime);
358
- }
359
- if (maxing) {
360
- // Handle invocations in a tight loop.
361
- clearTimeout(timerId);
362
- timerId = setTimeout(timerExpired, wait);
363
- return invokeFunc(lastCallTime);
364
- }
365
- }
366
- if (timerId === undefined) {
367
- timerId = setTimeout(timerExpired, wait);
368
- }
369
- return result;
370
- }
371
- debounced.cancel = cancel;
372
- debounced.flush = flush;
373
- return debounced;
374
- }
375
-
376
- var _sfc_main = /* @__PURE__ */ defineComponent({
377
- ...{
378
- name: "VkfApiTablesSelect"
379
- },
46
+ }, N = /* @__PURE__ */ w({
47
+ name: "VkfApiTablesSelect",
380
48
  __name: "index",
381
- props: props,
382
- emits,
383
- setup(__props, { expose: __expose, emit: __emit }) {
384
- __expose();
385
- const props = __props;
386
- const emit = __emit;
387
- const debounceRead = debounce(read, 300);
388
- const coreProps = _VkfTablesSelectCtx.createBindProps(props, ["getRows"]);
389
- const coreEmits = _VkfTablesSelectCtx.createOnEmits(emit);
390
- const [queryData, setQueryData] = useDataComputed({
49
+ props: B,
50
+ emits: F,
51
+ setup(c, { emit: m }) {
52
+ const r = c, p = m, u = C(S, 300), f = n.createBindProps(r, ["getRows"]), g = n.createOnEmits(p), [i, y] = R({
391
53
  default: {},
392
54
  key: "query"
393
- }, props, emit);
394
- const tableState = reactive({
55
+ }, r, p), s = v({
395
56
  data: [],
396
57
  total: 0
397
- });
398
- const pagination = ref({
58
+ }), e = k({
399
59
  pageSize: 10,
400
60
  start: 0
401
61
  });
402
- watch(pagination, debounceRead, { deep: true, immediate: true });
403
- watch(queryData, debounceRead, { deep: true });
404
- async function read() {
405
- const res = await props.readApi(queryData.value, {
406
- ...pagination.value,
407
- currentPage: pagination.value.start / pagination.value.pageSize + 1
62
+ d(e, u, { deep: !0, immediate: !0 }), d(i, u, { deep: !0 });
63
+ async function S() {
64
+ const t = await r.readApi(i.value, {
65
+ ...e.value,
66
+ currentPage: e.value.start / e.value.pageSize + 1
408
67
  });
409
- tableState.data = res.rows;
410
- tableState.total = res.total;
68
+ s.data = t.rows, s.total = t.total;
411
69
  }
412
- const defaultGetRows = async (ids) => {
413
- const { rows } = await props.readApi({
414
- ids: ids.join(",")
70
+ const b = async (t) => {
71
+ const { rows: a } = await r.readApi({
72
+ ids: t.join(",")
415
73
  });
416
- return rows;
74
+ return a;
417
75
  };
418
- const __returned__ = { props, emit, debounceRead, coreProps, coreEmits, queryData, setQueryData, tableState, pagination, read, defaultGetRows, get VkfTablesSelect() {
419
- return VkfTablesSelect;
420
- }, get VkfForm() {
421
- return VkfForm;
422
- } };
423
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
424
- return __returned__;
425
- }
426
- });
427
-
428
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
429
- return openBlock(), createBlock($setup["VkfTablesSelect"], mergeProps({
430
- start: $setup.pagination.start,
431
- "onUpdate:start": _cache[0] || (_cache[0] = ($event) => $setup.pagination.start = $event),
432
- "page-size": $setup.pagination.pageSize,
433
- "onUpdate:pageSize": _cache[1] || (_cache[1] = ($event) => $setup.pagination.pageSize = $event),
434
- data: $setup.tableState.data,
435
- total: $setup.tableState.total,
436
- "get-rows": _ctx.getRows || $setup.defaultGetRows
437
- }, $setup.coreProps, toHandlers($setup.coreEmits)), {
438
- dialog: withCtx(() => [
439
- createVNode($setup["VkfForm"], {
440
- "form-items": _ctx.queryItems,
441
- inline: true,
442
- data: $setup.queryData,
443
- onSetData: $setup.setQueryData
444
- }, null, 8, ["form-items", "data", "onSetData"]),
445
- renderSlot(_ctx.$slots, "dialog")
446
- ]),
447
- _: 3
448
- /* FORWARDED */
449
- }, 16, ["start", "page-size", "data", "total", "get-rows"]);
450
- }
451
- var VkfApiTablesSelect = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "D:\\labCode\\vunk-form2\\packages\\components\\api-tables-select\\src\\index.vue"]]);
452
-
453
- var types = /*#__PURE__*/Object.freeze({
76
+ return (t, a) => (z(), A(o(T), P({
77
+ start: e.value.start,
78
+ "onUpdate:start": a[0] || (a[0] = (l) => e.value.start = l),
79
+ "page-size": e.value.pageSize,
80
+ "onUpdate:pageSize": a[1] || (a[1] = (l) => e.value.pageSize = l),
81
+ data: s.data,
82
+ total: s.total,
83
+ "get-rows": t.getRows || b
84
+ }, o(f), V(o(g))), {
85
+ dialog: _(() => [
86
+ q(o(O), {
87
+ "form-items": t.queryItems,
88
+ inline: !0,
89
+ data: o(i),
90
+ onSetData: o(y)
91
+ }, null, 8, ["form-items", "data", "onSetData"]),
92
+ D(t.$slots, "dialog")
93
+ ]),
94
+ _: 3
95
+ }, 16, ["start", "page-size", "data", "total", "get-rows"]));
96
+ }
97
+ }), Q = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
454
98
  __proto__: null
455
- });
456
-
457
- VkfApiTablesSelect.install = (app) => {
458
- app.component(VkfApiTablesSelect.name || "VkfApiTablesSelect", VkfApiTablesSelect);
99
+ }, Symbol.toStringTag, { value: "Module" }));
100
+ export {
101
+ N as VkfApiTablesSelect,
102
+ Q as __VkfApiTablesSelect,
103
+ N as default
459
104
  };
460
-
461
- export { VkfApiTablesSelect, types as __VkfApiTablesSelect, VkfApiTablesSelect as default };