@ctzy-web-client/plugin-component-vue 1.0.7 → 1.0.9

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 (378) hide show
  1. package/package.json +3 -3
  2. package/src/advance-select/advance-operation.vue +2 -1
  3. package/src/advance-select/advance-option.vue +2 -1
  4. package/src/advance-select/advance-select.vue +2 -1
  5. package/src/advance-select/events-helpers.js +2 -1
  6. package/src/advance-select/index.js +1 -0
  7. package/src/advance-select/use-advance-option.js +2 -1
  8. package/src/advance-select/use-advance-select.js +1 -0
  9. package/src/application-slot/application-slot.js +2 -1
  10. package/src/application-slot/breadcrumb-item.vue +1 -0
  11. package/src/application-slot/header-tools-item.vue +1 -0
  12. package/src/application-slot/index.js +1 -0
  13. package/src/breadcrumb-select/breadcrumb-select.vue +2 -1
  14. package/src/breadcrumb-select/index.js +1 -0
  15. package/src/components.js +1 -0
  16. package/src/contextmenu/contextmenu-item.vue +2 -1
  17. package/src/contextmenu/contextmenu.vue +2 -1
  18. package/src/contextmenu/index.js +1 -0
  19. package/src/contextmenu/use-contextmenu.js +2 -1
  20. package/src/data-form/data-form-item.vue +2 -1
  21. package/src/data-form/data-form.vue +2 -1
  22. package/src/data-form/dynamic-component.js +1 -0
  23. package/src/data-form/form-components/Blots/AtBlot.js +1 -0
  24. package/src/data-form/form-components/bwa-date-picker.vue +1 -0
  25. package/src/data-form/form-components/bwa-date-time-picker.vue +1 -0
  26. package/src/data-form/form-components/bwa-input-float.vue +1 -0
  27. package/src/data-form/form-components/bwa-input-integer.vue +1 -0
  28. package/src/data-form/form-components/bwa-input.vue +1 -0
  29. package/src/data-form/form-components/bwa-multi-select.vue +1 -0
  30. package/src/data-form/form-components/bwa-rich-text-tinymce.vue +3 -2
  31. package/src/data-form/form-components/bwa-rich-text.vue +2 -1
  32. package/src/data-form/form-components/bwa-select.vue +1 -0
  33. package/src/data-form/form-components/bwa-textarea.vue +1 -0
  34. package/src/data-form/form-components/bwa-upload.vue +2 -1
  35. package/src/data-form/form-components/bwa-user-multi-select.vue +1 -0
  36. package/src/data-form/form-components/bwa-user-select.vue +2 -1
  37. package/src/data-form/index.js +1 -0
  38. package/src/data-table/data-column-view.vue +2 -1
  39. package/src/data-table/data-table-card.vue +2 -1
  40. package/src/data-table/data-table-column.vue +2 -1
  41. package/src/data-table/data-table.vue +2 -1
  42. package/src/data-table/dynamic-component.js +1 -0
  43. package/src/data-table/index.js +1 -0
  44. package/src/data-table/use-datatable-drag.js +1 -0
  45. package/src/datatable-settings/datatable-settings.vue +2 -1
  46. package/src/datatable-settings/index.js +1 -0
  47. package/src/date-range/date-picker.vue +2 -1
  48. package/src/date-range/date-range.vue +4 -3
  49. package/src/date-range/index.js +1 -0
  50. package/src/drag-list/constants.js +1 -0
  51. package/src/drag-list/drag-item.vue +2 -1
  52. package/src/drag-list/drag-list.vue +2 -1
  53. package/src/drag-list/index.js +1 -0
  54. package/src/drag-list/use-drag-list.js +1 -0
  55. package/src/dragable/constants.js +1 -0
  56. package/src/dragable/dragable-item.vue +2 -1
  57. package/src/dragable/dragable-operation.vue +2 -1
  58. package/src/dragable/dragable.vue +2 -1
  59. package/src/dragable/index.js +1 -0
  60. package/src/dragable/use-dragable.js +1 -0
  61. package/src/filter-panel/conditions/condition.js +1 -0
  62. package/src/filter-panel/conditions/date-range-condition.vue +1 -0
  63. package/src/filter-panel/conditions/department-condition/department-condition.vue +2 -1
  64. package/src/filter-panel/conditions/department-condition/department-node.vue +2 -1
  65. package/src/filter-panel/conditions/index.js +1 -0
  66. package/src/filter-panel/conditions/input-condition.vue +2 -1
  67. package/src/filter-panel/conditions/multi-user-condition.vue +2 -1
  68. package/src/filter-panel/conditions/multiple-menu-condition.vue +1 -0
  69. package/src/filter-panel/conditions/single-menu-condition.vue +2 -1
  70. package/src/filter-panel/conditions/single-user-condition.vue +2 -1
  71. package/src/filter-panel/filter-panel-item.vue +2 -1
  72. package/src/filter-panel/filter-panel.vue +2 -1
  73. package/src/filter-panel/index.js +1 -0
  74. package/src/filter-panel/use-filter-panel-item.js +2 -1
  75. package/src/filter-panel/use-filter-panel.js +2 -1
  76. package/src/hooks/use-data/index.js +3 -2
  77. package/src/index.js +1 -0
  78. package/src/layout/index.js +1 -0
  79. package/src/layout/layout.vue +2 -1
  80. package/src/make-installer.js +2 -1
  81. package/src/math/Rectangle.js +1 -0
  82. package/src/menu/index.js +1 -0
  83. package/src/menu/menu-item.vue +2 -1
  84. package/src/menu/menu.vue +2 -1
  85. package/src/panel/index.js +1 -0
  86. package/src/panel/panel.vue +2 -1
  87. package/src/panel-tabs/index.js +1 -0
  88. package/src/panel-tabs/panel-tabs.js +2 -1
  89. package/src/pct-filter-panel/index.js +1 -0
  90. package/src/pct-filter-panel/pct-compents/index.js +1 -0
  91. package/src/pct-filter-panel/pct-compents/pct-Input-condition.vue +2 -1
  92. package/src/pct-filter-panel/pct-compents/pct-date-range-condition.vue +2 -1
  93. package/src/pct-filter-panel/pct-compents/pct-multiple-menu-condition.vue +3 -2
  94. package/src/pct-filter-panel/pct-compents/pct-multiple-menu-condition2.vue +3 -2
  95. package/src/pct-filter-panel/pct-filter-panel-item.vue +2 -1
  96. package/src/pct-filter-panel/pct-filter-panel.vue +2 -1
  97. package/src/pct-filter-panel/use-filter-panel-item.js +2 -1
  98. package/src/pct-filter-panel/use-filter-panel.js +3 -2
  99. package/src/plugins.js +1 -0
  100. package/src/progress/index.js +1 -0
  101. package/src/progress/progress-item.vue +2 -1
  102. package/src/progress/progress.vue +2 -1
  103. package/src/progress/use-progress.js +1 -0
  104. package/src/utils/db.js +1 -0
  105. package/src/utils.js +1 -0
  106. package/src/where-filter-panel/use-where-filter-panel.js +2 -1
  107. package/src/where-filter-panel/where-filter-panel.vue +1 -0
  108. package/es/_virtual/_plugin-vue_export-helper.mjs +0 -9
  109. package/es/advance-select/advance-operation.mjs +0 -43
  110. package/es/advance-select/advance-option.mjs +0 -125
  111. package/es/advance-select/advance-select.mjs +0 -359
  112. package/es/advance-select/events-helpers.mjs +0 -29
  113. package/es/advance-select/index.mjs +0 -13
  114. package/es/advance-select/use-advance-option.mjs +0 -43
  115. package/es/advance-select/use-advance-select.mjs +0 -117
  116. package/es/application-slot/application-slot.mjs +0 -51
  117. package/es/application-slot/breadcrumb-item.mjs +0 -23
  118. package/es/application-slot/header-tools-item.mjs +0 -23
  119. package/es/application-slot/index.mjs +0 -16
  120. package/es/breadcrumb-select/breadcrumb-select.mjs +0 -155
  121. package/es/breadcrumb-select/index.mjs +0 -6
  122. package/es/components.mjs +0 -22
  123. package/es/contextmenu/contextmenu-item.mjs +0 -21
  124. package/es/contextmenu/contextmenu.mjs +0 -64
  125. package/es/contextmenu/index.mjs +0 -10
  126. package/es/contextmenu/use-contextmenu.mjs +0 -85
  127. package/es/data-form/data-form-item.mjs +0 -53
  128. package/es/data-form/data-form.mjs +0 -175
  129. package/es/data-form/dynamic-component.mjs +0 -23
  130. package/es/data-form/form-components/Blots/AtBlot.mjs +0 -25
  131. package/es/data-form/form-components/bwa-date-picker.mjs +0 -45
  132. package/es/data-form/form-components/bwa-date-time-picker.mjs +0 -50
  133. package/es/data-form/form-components/bwa-input-float.mjs +0 -43
  134. package/es/data-form/form-components/bwa-input-integer.mjs +0 -56
  135. package/es/data-form/form-components/bwa-input.mjs +0 -38
  136. package/es/data-form/form-components/bwa-multi-select.mjs +0 -35
  137. package/es/data-form/form-components/bwa-rich-text-tinymce.mjs +0 -234
  138. package/es/data-form/form-components/bwa-rich-text.mjs +0 -325
  139. package/es/data-form/form-components/bwa-select.mjs +0 -76
  140. package/es/data-form/form-components/bwa-textarea.mjs +0 -33
  141. package/es/data-form/form-components/bwa-upload.mjs +0 -159
  142. package/es/data-form/form-components/bwa-user-multi-select.mjs +0 -30
  143. package/es/data-form/form-components/bwa-user-select.mjs +0 -69
  144. package/es/data-form/index.mjs +0 -34
  145. package/es/data-table/data-column-view.mjs +0 -131
  146. package/es/data-table/data-table-card.mjs +0 -118
  147. package/es/data-table/data-table-column.mjs +0 -56
  148. package/es/data-table/data-table.mjs +0 -369
  149. package/es/data-table/dynamic-component.mjs +0 -48
  150. package/es/data-table/index.mjs +0 -13
  151. package/es/data-table/use-datatable-drag.mjs +0 -110
  152. package/es/datatable-settings/datatable-settings.mjs +0 -309
  153. package/es/datatable-settings/index.mjs +0 -6
  154. package/es/date-range/date-picker.mjs +0 -128
  155. package/es/date-range/date-range.mjs +0 -176
  156. package/es/date-range/index.mjs +0 -6
  157. package/es/drag-list/constants.mjs +0 -3
  158. package/es/drag-list/drag-item.mjs +0 -49
  159. package/es/drag-list/drag-list.mjs +0 -56
  160. package/es/drag-list/index.mjs +0 -6
  161. package/es/drag-list/use-drag-list.mjs +0 -154
  162. package/es/dragable/constants.mjs +0 -4
  163. package/es/dragable/dragable-item.mjs +0 -25
  164. package/es/dragable/dragable-operation.mjs +0 -32
  165. package/es/dragable/dragable.mjs +0 -31
  166. package/es/dragable/index.mjs +0 -15
  167. package/es/dragable/use-dragable.mjs +0 -134
  168. package/es/filter-panel/conditions/condition.mjs +0 -30
  169. package/es/filter-panel/conditions/date-range-condition.mjs +0 -46
  170. package/es/filter-panel/conditions/department-condition/department-condition.mjs +0 -81
  171. package/es/filter-panel/conditions/department-condition/department-node.mjs +0 -74
  172. package/es/filter-panel/conditions/index.mjs +0 -21
  173. package/es/filter-panel/conditions/input-condition.mjs +0 -83
  174. package/es/filter-panel/conditions/multi-user-condition.mjs +0 -64
  175. package/es/filter-panel/conditions/multiple-menu-condition.mjs +0 -41
  176. package/es/filter-panel/conditions/single-menu-condition.mjs +0 -68
  177. package/es/filter-panel/conditions/single-user-condition.mjs +0 -64
  178. package/es/filter-panel/filter-panel-item.mjs +0 -47
  179. package/es/filter-panel/filter-panel.mjs +0 -180
  180. package/es/filter-panel/index.mjs +0 -15
  181. package/es/filter-panel/use-filter-panel-item.mjs +0 -52
  182. package/es/filter-panel/use-filter-panel.mjs +0 -135
  183. package/es/hooks/use-data/index.mjs +0 -152
  184. package/es/index.mjs +0 -27
  185. package/es/layout/index.mjs +0 -6
  186. package/es/layout/layout.mjs +0 -86
  187. package/es/make-installer.mjs +0 -34
  188. package/es/math/Rectangle.mjs +0 -25
  189. package/es/menu/index.mjs +0 -6
  190. package/es/menu/menu-item.mjs +0 -75
  191. package/es/menu/menu.mjs +0 -60
  192. package/es/node_modules/.pnpm/@vueuse_core@9.6.0_vue@3.2.41/node_modules/@vueuse/core/index.mjs +0 -6372
  193. package/es/node_modules/.pnpm/@vueuse_shared@9.6.0_vue@3.2.41/node_modules/@vueuse/shared/index.mjs +0 -1517
  194. package/es/panel/index.mjs +0 -6
  195. package/es/panel/panel.mjs +0 -55
  196. package/es/panel-tabs/index.mjs +0 -6
  197. package/es/panel-tabs/panel-tabs.mjs +0 -66
  198. package/es/pct-filter-panel/index.mjs +0 -10
  199. package/es/pct-filter-panel/pct-compents/index.mjs +0 -10
  200. package/es/pct-filter-panel/pct-compents/pct-Input-condition.mjs +0 -71
  201. package/es/pct-filter-panel/pct-compents/pct-date-range-condition.mjs +0 -74
  202. package/es/pct-filter-panel/pct-compents/pct-multiple-menu-condition.mjs +0 -186
  203. package/es/pct-filter-panel/pct-compents/pct-multiple-menu-condition2.mjs +0 -147
  204. package/es/pct-filter-panel/pct-filter-panel-item.mjs +0 -48
  205. package/es/pct-filter-panel/pct-filter-panel.mjs +0 -251
  206. package/es/pct-filter-panel/use-filter-panel-item.mjs +0 -56
  207. package/es/pct-filter-panel/use-filter-panel.mjs +0 -127
  208. package/es/plugins.mjs +0 -5
  209. package/es/progress/index.mjs +0 -10
  210. package/es/progress/progress-item.mjs +0 -68
  211. package/es/progress/progress.mjs +0 -74
  212. package/es/progress/use-progress.mjs +0 -46
  213. package/es/utils/db.mjs +0 -9
  214. package/es/utils.mjs +0 -99
  215. package/es/where-filter-panel/index.mjs +0 -1
  216. package/es/where-filter-panel/use-where-filter-panel.mjs +0 -18
  217. package/es/where-filter-panel/where-filter-panel.mjs +0 -17
  218. package/lib/_virtual/_plugin-vue_export-helper.js +0 -13
  219. package/lib/advance-select/advance-operation.js +0 -47
  220. package/lib/advance-select/advance-option.js +0 -129
  221. package/lib/advance-select/advance-select.js +0 -363
  222. package/lib/advance-select/events-helpers.js +0 -33
  223. package/lib/advance-select/index.js +0 -20
  224. package/lib/advance-select/use-advance-option.js +0 -47
  225. package/lib/advance-select/use-advance-select.js +0 -122
  226. package/lib/application-slot/application-slot.js +0 -55
  227. package/lib/application-slot/breadcrumb-item.js +0 -27
  228. package/lib/application-slot/header-tools-item.js +0 -27
  229. package/lib/application-slot/index.js +0 -23
  230. package/lib/breadcrumb-select/breadcrumb-select.js +0 -159
  231. package/lib/breadcrumb-select/index.js +0 -11
  232. package/lib/components.js +0 -26
  233. package/lib/contextmenu/contextmenu-item.js +0 -25
  234. package/lib/contextmenu/contextmenu.js +0 -68
  235. package/lib/contextmenu/index.js +0 -16
  236. package/lib/contextmenu/use-contextmenu.js +0 -89
  237. package/lib/data-form/data-form-item.js +0 -57
  238. package/lib/data-form/data-form.js +0 -179
  239. package/lib/data-form/dynamic-component.js +0 -27
  240. package/lib/data-form/form-components/Blots/AtBlot.js +0 -31
  241. package/lib/data-form/form-components/bwa-date-picker.js +0 -49
  242. package/lib/data-form/form-components/bwa-date-time-picker.js +0 -54
  243. package/lib/data-form/form-components/bwa-input-float.js +0 -47
  244. package/lib/data-form/form-components/bwa-input-integer.js +0 -60
  245. package/lib/data-form/form-components/bwa-input.js +0 -42
  246. package/lib/data-form/form-components/bwa-multi-select.js +0 -39
  247. package/lib/data-form/form-components/bwa-rich-text-tinymce.js +0 -242
  248. package/lib/data-form/form-components/bwa-rich-text.js +0 -333
  249. package/lib/data-form/form-components/bwa-select.js +0 -80
  250. package/lib/data-form/form-components/bwa-textarea.js +0 -37
  251. package/lib/data-form/form-components/bwa-upload.js +0 -163
  252. package/lib/data-form/form-components/bwa-user-multi-select.js +0 -34
  253. package/lib/data-form/form-components/bwa-user-select.js +0 -73
  254. package/lib/data-form/index.js +0 -40
  255. package/lib/data-table/data-column-view.js +0 -135
  256. package/lib/data-table/data-table-card.js +0 -122
  257. package/lib/data-table/data-table-column.js +0 -60
  258. package/lib/data-table/data-table.js +0 -373
  259. package/lib/data-table/dynamic-component.js +0 -56
  260. package/lib/data-table/index.js +0 -20
  261. package/lib/data-table/use-datatable-drag.js +0 -114
  262. package/lib/datatable-settings/datatable-settings.js +0 -313
  263. package/lib/datatable-settings/index.js +0 -11
  264. package/lib/date-range/date-picker.js +0 -136
  265. package/lib/date-range/date-range.js +0 -180
  266. package/lib/date-range/index.js +0 -11
  267. package/lib/drag-list/constants.js +0 -7
  268. package/lib/drag-list/drag-item.js +0 -53
  269. package/lib/drag-list/drag-list.js +0 -60
  270. package/lib/drag-list/index.js +0 -11
  271. package/lib/drag-list/use-drag-list.js +0 -158
  272. package/lib/dragable/constants.js +0 -9
  273. package/lib/dragable/dragable-item.js +0 -29
  274. package/lib/dragable/dragable-operation.js +0 -36
  275. package/lib/dragable/dragable.js +0 -35
  276. package/lib/dragable/index.js +0 -22
  277. package/lib/dragable/use-dragable.js +0 -138
  278. package/lib/filter-panel/conditions/condition.js +0 -34
  279. package/lib/filter-panel/conditions/date-range-condition.js +0 -50
  280. package/lib/filter-panel/conditions/department-condition/department-condition.js +0 -85
  281. package/lib/filter-panel/conditions/department-condition/department-node.js +0 -78
  282. package/lib/filter-panel/conditions/index.js +0 -26
  283. package/lib/filter-panel/conditions/input-condition.js +0 -87
  284. package/lib/filter-panel/conditions/multi-user-condition.js +0 -68
  285. package/lib/filter-panel/conditions/multiple-menu-condition.js +0 -45
  286. package/lib/filter-panel/conditions/single-menu-condition.js +0 -72
  287. package/lib/filter-panel/conditions/single-user-condition.js +0 -68
  288. package/lib/filter-panel/filter-panel-item.js +0 -51
  289. package/lib/filter-panel/filter-panel.js +0 -184
  290. package/lib/filter-panel/index.js +0 -20
  291. package/lib/filter-panel/use-filter-panel-item.js +0 -56
  292. package/lib/filter-panel/use-filter-panel.js +0 -139
  293. package/lib/hooks/use-data/index.js +0 -157
  294. package/lib/index.js +0 -60
  295. package/lib/layout/index.js +0 -11
  296. package/lib/layout/layout.js +0 -90
  297. package/lib/make-installer.js +0 -62
  298. package/lib/math/Rectangle.js +0 -29
  299. package/lib/menu/index.js +0 -11
  300. package/lib/menu/menu-item.js +0 -79
  301. package/lib/menu/menu.js +0 -64
  302. package/lib/node_modules/.pnpm/@vueuse_core@9.6.0_vue@3.2.41/node_modules/@vueuse/core/index.js +0 -6635
  303. package/lib/node_modules/.pnpm/@vueuse_shared@9.6.0_vue@3.2.41/node_modules/@vueuse/shared/index.js +0 -1628
  304. package/lib/panel/index.js +0 -11
  305. package/lib/panel/panel.js +0 -59
  306. package/lib/panel-tabs/index.js +0 -11
  307. package/lib/panel-tabs/panel-tabs.js +0 -70
  308. package/lib/pct-filter-panel/index.js +0 -14
  309. package/lib/pct-filter-panel/pct-compents/index.js +0 -16
  310. package/lib/pct-filter-panel/pct-compents/pct-Input-condition.js +0 -75
  311. package/lib/pct-filter-panel/pct-compents/pct-date-range-condition.js +0 -78
  312. package/lib/pct-filter-panel/pct-compents/pct-multiple-menu-condition.js +0 -190
  313. package/lib/pct-filter-panel/pct-compents/pct-multiple-menu-condition2.js +0 -151
  314. package/lib/pct-filter-panel/pct-filter-panel-item.js +0 -52
  315. package/lib/pct-filter-panel/pct-filter-panel.js +0 -255
  316. package/lib/pct-filter-panel/use-filter-panel-item.js +0 -60
  317. package/lib/pct-filter-panel/use-filter-panel.js +0 -131
  318. package/lib/plugins.js +0 -9
  319. package/lib/progress/index.js +0 -16
  320. package/lib/progress/progress-item.js +0 -72
  321. package/lib/progress/progress.js +0 -78
  322. package/lib/progress/use-progress.js +0 -51
  323. package/lib/utils/db.js +0 -17
  324. package/lib/utils.js +0 -110
  325. package/lib/where-filter-panel/index.js +0 -2
  326. package/lib/where-filter-panel/use-where-filter-panel.js +0 -22
  327. package/lib/where-filter-panel/where-filter-panel.js +0 -21
  328. package/style/advance-select.css +0 -1
  329. package/style/breadcrumb-select.css +0 -1
  330. package/style/common.css +0 -1
  331. package/style/contextmenu.css +0 -1
  332. package/style/data-form.css +0 -1
  333. package/style/data-table.css +0 -1
  334. package/style/datatable-settings.css +0 -1
  335. package/style/date-range.css +0 -1
  336. package/style/department-condition.css +0 -1
  337. package/style/drag-list.css +0 -1
  338. package/style/dragable.css +0 -1
  339. package/style/filter-panel.css +0 -1
  340. package/style/index.css +0 -1
  341. package/style/input-condition.css +0 -1
  342. package/style/layout.css +0 -1
  343. package/style/menu.css +0 -1
  344. package/style/panel-tabs.css +0 -1
  345. package/style/panel.css +0 -1
  346. package/style/pct-filter-panel.css +0 -1
  347. package/style/progress.css +0 -1
  348. package/style/rich-text.css +0 -1
  349. package/style/var.css +0 -1
  350. /package/style/{src/advance-select.scss → advance-select.scss} +0 -0
  351. /package/style/{src/breadcrumb-select.scss → breadcrumb-select.scss} +0 -0
  352. /package/style/{src/common → common}/var.scss +0 -0
  353. /package/style/{src/common.scss → common.scss} +0 -0
  354. /package/style/{src/contextmenu.scss → contextmenu.scss} +0 -0
  355. /package/style/{src/data-form.scss → data-form.scss} +0 -0
  356. /package/style/{src/data-table.scss → data-table.scss} +0 -0
  357. /package/style/{src/datatable-settings.scss → datatable-settings.scss} +0 -0
  358. /package/style/{src/date-range.scss → date-range.scss} +0 -0
  359. /package/style/{src/department-condition.scss → department-condition.scss} +0 -0
  360. /package/style/{src/drag-list.scss → drag-list.scss} +0 -0
  361. /package/style/{src/dragable.scss → dragable.scss} +0 -0
  362. /package/style/{src/filter-panel.scss → filter-panel.scss} +0 -0
  363. /package/style/{src/index.scss → index.scss} +0 -0
  364. /package/style/{src/input-condition.scss → input-condition.scss} +0 -0
  365. /package/style/{src/layout.scss → layout.scss} +0 -0
  366. /package/style/{src/menu.scss → menu.scss} +0 -0
  367. /package/style/{src/mixins → mixins}/_var.scss +0 -0
  368. /package/style/{src/mixins → mixins}/config.scss +0 -0
  369. /package/style/{src/mixins → mixins}/function.scss +0 -0
  370. /package/style/{src/mixins → mixins}/mixins.scss +0 -0
  371. /package/style/{src/panel-tabs.scss → panel-tabs.scss} +0 -0
  372. /package/style/{src/panel.scss → panel.scss} +0 -0
  373. /package/style/{src/pct-filter-panel.scss → pct-filter-panel.scss} +0 -0
  374. /package/style/{src/progress.scss → progress.scss} +0 -0
  375. /package/style/{src/rich-text.scss → rich-text.scss} +0 -0
  376. /package/style/{src/theme → theme}/theme.scss +0 -0
  377. /package/style/{src/theme → theme}/var.scss +0 -0
  378. /package/style/{src/var.scss → var.scss} +0 -0
@@ -1,1517 +0,0 @@
1
- import { shallowRef, watchEffect, readonly, unref, ref, isVue3, watch, customRef, effectScope, provide, inject, getCurrentScope, onScopeDispose, isRef, computed, reactive, toRefs as toRefs$1, toRef, isVue2, set as set$1, getCurrentInstance, onBeforeMount, nextTick, onBeforeUnmount, onMounted, onUnmounted, isReactive } from 'vue-demi';
2
-
3
- var __defProp$9 = Object.defineProperty;
4
- var __defProps$6 = Object.defineProperties;
5
- var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
6
- var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
7
- var __hasOwnProp$b = Object.prototype.hasOwnProperty;
8
- var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
9
- var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10
- var __spreadValues$9 = (a, b) => {
11
- for (var prop in b || (b = {}))
12
- if (__hasOwnProp$b.call(b, prop))
13
- __defNormalProp$9(a, prop, b[prop]);
14
- if (__getOwnPropSymbols$b)
15
- for (var prop of __getOwnPropSymbols$b(b)) {
16
- if (__propIsEnum$b.call(b, prop))
17
- __defNormalProp$9(a, prop, b[prop]);
18
- }
19
- return a;
20
- };
21
- var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
22
- function computedEager(fn, options) {
23
- var _a;
24
- const result = shallowRef();
25
- watchEffect(() => {
26
- result.value = fn();
27
- }, __spreadProps$6(__spreadValues$9({}, options), {
28
- flush: (_a = options == null ? void 0 : options.flush) != null ? _a : "sync"
29
- }));
30
- return readonly(result);
31
- }
32
-
33
- var _a;
34
- const isClient = typeof window !== "undefined";
35
- const isDef = (val) => typeof val !== "undefined";
36
- const assert = (condition, ...infos) => {
37
- if (!condition)
38
- console.warn(...infos);
39
- };
40
- const toString = Object.prototype.toString;
41
- const isBoolean = (val) => typeof val === "boolean";
42
- const isFunction = (val) => typeof val === "function";
43
- const isNumber = (val) => typeof val === "number";
44
- const isString = (val) => typeof val === "string";
45
- const isObject = (val) => toString.call(val) === "[object Object]";
46
- const isWindow = (val) => typeof window !== "undefined" && toString.call(val) === "[object Window]";
47
- const now = () => Date.now();
48
- const timestamp = () => +Date.now();
49
- const clamp = (n, min, max) => Math.min(max, Math.max(min, n));
50
- const noop = () => {
51
- };
52
- const rand = (min, max) => {
53
- min = Math.ceil(min);
54
- max = Math.floor(max);
55
- return Math.floor(Math.random() * (max - min + 1)) + min;
56
- };
57
- const isIOS = isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
58
- const hasOwn = (val, key) => Object.prototype.hasOwnProperty.call(val, key);
59
-
60
- function resolveUnref(r) {
61
- return typeof r === "function" ? r() : unref(r);
62
- }
63
-
64
- function createFilterWrapper(filter, fn) {
65
- function wrapper(...args) {
66
- filter(() => fn.apply(this, args), { fn, thisArg: this, args });
67
- }
68
- return wrapper;
69
- }
70
- const bypassFilter = (invoke) => {
71
- return invoke();
72
- };
73
- function debounceFilter(ms, options = {}) {
74
- let timer;
75
- let maxTimer;
76
- const filter = (invoke) => {
77
- const duration = resolveUnref(ms);
78
- const maxDuration = resolveUnref(options.maxWait);
79
- if (timer)
80
- clearTimeout(timer);
81
- if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {
82
- if (maxTimer) {
83
- clearTimeout(maxTimer);
84
- maxTimer = null;
85
- }
86
- return invoke();
87
- }
88
- if (maxDuration && !maxTimer) {
89
- maxTimer = setTimeout(() => {
90
- if (timer)
91
- clearTimeout(timer);
92
- maxTimer = null;
93
- invoke();
94
- }, maxDuration);
95
- }
96
- timer = setTimeout(() => {
97
- if (maxTimer)
98
- clearTimeout(maxTimer);
99
- maxTimer = null;
100
- invoke();
101
- }, duration);
102
- };
103
- return filter;
104
- }
105
- function throttleFilter(ms, trailing = true, leading = true) {
106
- let lastExec = 0;
107
- let timer;
108
- let isLeading = true;
109
- const clear = () => {
110
- if (timer) {
111
- clearTimeout(timer);
112
- timer = void 0;
113
- }
114
- };
115
- const filter = (invoke) => {
116
- const duration = resolveUnref(ms);
117
- const elapsed = Date.now() - lastExec;
118
- clear();
119
- if (duration <= 0) {
120
- lastExec = Date.now();
121
- return invoke();
122
- }
123
- if (elapsed > duration && (leading || !isLeading)) {
124
- lastExec = Date.now();
125
- invoke();
126
- } else if (trailing) {
127
- timer = setTimeout(() => {
128
- lastExec = Date.now();
129
- isLeading = true;
130
- clear();
131
- invoke();
132
- }, duration - elapsed);
133
- }
134
- if (!leading && !timer)
135
- timer = setTimeout(() => isLeading = true, duration);
136
- isLeading = false;
137
- };
138
- return filter;
139
- }
140
- function pausableFilter(extendFilter = bypassFilter) {
141
- const isActive = ref(true);
142
- function pause() {
143
- isActive.value = false;
144
- }
145
- function resume() {
146
- isActive.value = true;
147
- }
148
- const eventFilter = (...args) => {
149
- if (isActive.value)
150
- extendFilter(...args);
151
- };
152
- return { isActive, pause, resume, eventFilter };
153
- }
154
-
155
- function __onlyVue3(name = "this function") {
156
- if (isVue3)
157
- return;
158
- throw new Error(`[VueUse] ${name} is only works on Vue 3.`);
159
- }
160
- const directiveHooks = {
161
- mounted: isVue3 ? "mounted" : "inserted",
162
- updated: isVue3 ? "updated" : "componentUpdated",
163
- unmounted: isVue3 ? "unmounted" : "unbind"
164
- };
165
-
166
- function promiseTimeout(ms, throwOnTimeout = false, reason = "Timeout") {
167
- return new Promise((resolve, reject) => {
168
- if (throwOnTimeout)
169
- setTimeout(() => reject(reason), ms);
170
- else
171
- setTimeout(resolve, ms);
172
- });
173
- }
174
- function identity(arg) {
175
- return arg;
176
- }
177
- function createSingletonPromise(fn) {
178
- let _promise;
179
- function wrapper() {
180
- if (!_promise)
181
- _promise = fn();
182
- return _promise;
183
- }
184
- wrapper.reset = async () => {
185
- const _prev = _promise;
186
- _promise = void 0;
187
- if (_prev)
188
- await _prev;
189
- };
190
- return wrapper;
191
- }
192
- function invoke(fn) {
193
- return fn();
194
- }
195
- function containsProp(obj, ...props) {
196
- return props.some((k) => k in obj);
197
- }
198
- function increaseWithUnit(target, delta) {
199
- var _a;
200
- if (typeof target === "number")
201
- return target + delta;
202
- const value = ((_a = target.match(/^-?[0-9]+\.?[0-9]*/)) == null ? void 0 : _a[0]) || "";
203
- const unit = target.slice(value.length);
204
- const result = parseFloat(value) + delta;
205
- if (Number.isNaN(result))
206
- return target;
207
- return result + unit;
208
- }
209
- function objectPick(obj, keys, omitUndefined = false) {
210
- return keys.reduce((n, k) => {
211
- if (k in obj) {
212
- if (!omitUndefined || obj[k] !== void 0)
213
- n[k] = obj[k];
214
- }
215
- return n;
216
- }, {});
217
- }
218
-
219
- function computedWithControl(source, fn) {
220
- let v = void 0;
221
- let track;
222
- let trigger;
223
- const dirty = ref(true);
224
- const update = () => {
225
- dirty.value = true;
226
- trigger();
227
- };
228
- watch(source, update, { flush: "sync" });
229
- const get = isFunction(fn) ? fn : fn.get;
230
- const set = isFunction(fn) ? void 0 : fn.set;
231
- const result = customRef((_track, _trigger) => {
232
- track = _track;
233
- trigger = _trigger;
234
- return {
235
- get() {
236
- if (dirty.value) {
237
- v = get();
238
- dirty.value = false;
239
- }
240
- track();
241
- return v;
242
- },
243
- set(v2) {
244
- set == null ? void 0 : set(v2);
245
- }
246
- };
247
- });
248
- if (Object.isExtensible(result))
249
- result.trigger = update;
250
- return result;
251
- }
252
-
253
- function createEventHook() {
254
- const fns = [];
255
- const off = (fn) => {
256
- const index = fns.indexOf(fn);
257
- if (index !== -1)
258
- fns.splice(index, 1);
259
- };
260
- const on = (fn) => {
261
- fns.push(fn);
262
- return {
263
- off: () => off(fn)
264
- };
265
- };
266
- const trigger = (param) => {
267
- fns.forEach((fn) => fn(param));
268
- };
269
- return {
270
- on,
271
- off,
272
- trigger
273
- };
274
- }
275
-
276
- function createGlobalState(stateFactory) {
277
- let initialized = false;
278
- let state;
279
- const scope = effectScope(true);
280
- return () => {
281
- if (!initialized) {
282
- state = scope.run(stateFactory);
283
- initialized = true;
284
- }
285
- return state;
286
- };
287
- }
288
-
289
- function createInjectionState(composable) {
290
- const key = Symbol("InjectionState");
291
- const useProvidingState = (...args) => {
292
- provide(key, composable(...args));
293
- };
294
- const useInjectedState = () => inject(key);
295
- return [useProvidingState, useInjectedState];
296
- }
297
-
298
- function tryOnScopeDispose(fn) {
299
- if (getCurrentScope()) {
300
- onScopeDispose(fn);
301
- return true;
302
- }
303
- return false;
304
- }
305
-
306
- function createSharedComposable(composable) {
307
- let subscribers = 0;
308
- let state;
309
- let scope;
310
- const dispose = () => {
311
- subscribers -= 1;
312
- if (scope && subscribers <= 0) {
313
- scope.stop();
314
- state = void 0;
315
- scope = void 0;
316
- }
317
- };
318
- return (...args) => {
319
- subscribers += 1;
320
- if (!state) {
321
- scope = effectScope(true);
322
- state = scope.run(() => composable(...args));
323
- }
324
- tryOnScopeDispose(dispose);
325
- return state;
326
- };
327
- }
328
-
329
- function extendRef(ref, extend, { enumerable = false, unwrap = true } = {}) {
330
- __onlyVue3();
331
- for (const [key, value] of Object.entries(extend)) {
332
- if (key === "value")
333
- continue;
334
- if (isRef(value) && unwrap) {
335
- Object.defineProperty(ref, key, {
336
- get() {
337
- return value.value;
338
- },
339
- set(v) {
340
- value.value = v;
341
- },
342
- enumerable
343
- });
344
- } else {
345
- Object.defineProperty(ref, key, { value, enumerable });
346
- }
347
- }
348
- return ref;
349
- }
350
-
351
- function get(obj, key) {
352
- if (key == null)
353
- return unref(obj);
354
- return unref(obj)[key];
355
- }
356
-
357
- function isDefined(v) {
358
- return unref(v) != null;
359
- }
360
-
361
- var __defProp$8 = Object.defineProperty;
362
- var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
363
- var __hasOwnProp$a = Object.prototype.hasOwnProperty;
364
- var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
365
- var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
366
- var __spreadValues$8 = (a, b) => {
367
- for (var prop in b || (b = {}))
368
- if (__hasOwnProp$a.call(b, prop))
369
- __defNormalProp$8(a, prop, b[prop]);
370
- if (__getOwnPropSymbols$a)
371
- for (var prop of __getOwnPropSymbols$a(b)) {
372
- if (__propIsEnum$a.call(b, prop))
373
- __defNormalProp$8(a, prop, b[prop]);
374
- }
375
- return a;
376
- };
377
- function makeDestructurable(obj, arr) {
378
- if (typeof Symbol !== "undefined") {
379
- const clone = __spreadValues$8({}, obj);
380
- Object.defineProperty(clone, Symbol.iterator, {
381
- enumerable: false,
382
- value() {
383
- let index = 0;
384
- return {
385
- next: () => ({
386
- value: arr[index++],
387
- done: index > arr.length
388
- })
389
- };
390
- }
391
- });
392
- return clone;
393
- } else {
394
- return Object.assign([...arr], obj);
395
- }
396
- }
397
-
398
- function reactify(fn, options) {
399
- const unrefFn = (options == null ? void 0 : options.computedGetter) === false ? unref : resolveUnref;
400
- return function(...args) {
401
- return computed(() => fn.apply(this, args.map((i) => unrefFn(i))));
402
- };
403
- }
404
-
405
- function reactifyObject(obj, optionsOrKeys = {}) {
406
- let keys = [];
407
- let options;
408
- if (Array.isArray(optionsOrKeys)) {
409
- keys = optionsOrKeys;
410
- } else {
411
- options = optionsOrKeys;
412
- const { includeOwnProperties = true } = optionsOrKeys;
413
- keys.push(...Object.keys(obj));
414
- if (includeOwnProperties)
415
- keys.push(...Object.getOwnPropertyNames(obj));
416
- }
417
- return Object.fromEntries(keys.map((key) => {
418
- const value = obj[key];
419
- return [
420
- key,
421
- typeof value === "function" ? reactify(value.bind(obj), options) : value
422
- ];
423
- }));
424
- }
425
-
426
- function toReactive(objectRef) {
427
- if (!isRef(objectRef))
428
- return reactive(objectRef);
429
- const proxy = new Proxy({}, {
430
- get(_, p, receiver) {
431
- return unref(Reflect.get(objectRef.value, p, receiver));
432
- },
433
- set(_, p, value) {
434
- if (isRef(objectRef.value[p]) && !isRef(value))
435
- objectRef.value[p].value = value;
436
- else
437
- objectRef.value[p] = value;
438
- return true;
439
- },
440
- deleteProperty(_, p) {
441
- return Reflect.deleteProperty(objectRef.value, p);
442
- },
443
- has(_, p) {
444
- return Reflect.has(objectRef.value, p);
445
- },
446
- ownKeys() {
447
- return Object.keys(objectRef.value);
448
- },
449
- getOwnPropertyDescriptor() {
450
- return {
451
- enumerable: true,
452
- configurable: true
453
- };
454
- }
455
- });
456
- return reactive(proxy);
457
- }
458
-
459
- function reactiveComputed(fn) {
460
- return toReactive(computed(fn));
461
- }
462
-
463
- function reactiveOmit(obj, ...keys) {
464
- const flatKeys = keys.flat();
465
- return reactiveComputed(() => Object.fromEntries(Object.entries(toRefs$1(obj)).filter((e) => !flatKeys.includes(e[0]))));
466
- }
467
-
468
- function reactivePick(obj, ...keys) {
469
- const flatKeys = keys.flat();
470
- return reactive(Object.fromEntries(flatKeys.map((k) => [k, toRef(obj, k)])));
471
- }
472
-
473
- function refAutoReset(defaultValue, afterMs = 1e4) {
474
- return customRef((track, trigger) => {
475
- let value = defaultValue;
476
- let timer;
477
- const resetAfter = () => setTimeout(() => {
478
- value = defaultValue;
479
- trigger();
480
- }, resolveUnref(afterMs));
481
- tryOnScopeDispose(() => {
482
- clearTimeout(timer);
483
- });
484
- return {
485
- get() {
486
- track();
487
- return value;
488
- },
489
- set(newValue) {
490
- value = newValue;
491
- trigger();
492
- clearTimeout(timer);
493
- timer = resetAfter();
494
- }
495
- };
496
- });
497
- }
498
-
499
- function useDebounceFn(fn, ms = 200, options = {}) {
500
- return createFilterWrapper(debounceFilter(ms, options), fn);
501
- }
502
-
503
- function refDebounced(value, ms = 200, options = {}) {
504
- const debounced = ref(value.value);
505
- const updater = useDebounceFn(() => {
506
- debounced.value = value.value;
507
- }, ms, options);
508
- watch(value, () => updater());
509
- return debounced;
510
- }
511
-
512
- function refDefault(source, defaultValue) {
513
- return computed({
514
- get() {
515
- var _a;
516
- return (_a = source.value) != null ? _a : defaultValue;
517
- },
518
- set(value) {
519
- source.value = value;
520
- }
521
- });
522
- }
523
-
524
- function useThrottleFn(fn, ms = 200, trailing = false, leading = true) {
525
- return createFilterWrapper(throttleFilter(ms, trailing, leading), fn);
526
- }
527
-
528
- function refThrottled(value, delay = 200, trailing = true, leading = true) {
529
- if (delay <= 0)
530
- return value;
531
- const throttled = ref(value.value);
532
- const updater = useThrottleFn(() => {
533
- throttled.value = value.value;
534
- }, delay, trailing, leading);
535
- watch(value, () => updater());
536
- return throttled;
537
- }
538
-
539
- function refWithControl(initial, options = {}) {
540
- let source = initial;
541
- let track;
542
- let trigger;
543
- const ref = customRef((_track, _trigger) => {
544
- track = _track;
545
- trigger = _trigger;
546
- return {
547
- get() {
548
- return get();
549
- },
550
- set(v) {
551
- set(v);
552
- }
553
- };
554
- });
555
- function get(tracking = true) {
556
- if (tracking)
557
- track();
558
- return source;
559
- }
560
- function set(value, triggering = true) {
561
- var _a, _b;
562
- if (value === source)
563
- return;
564
- const old = source;
565
- if (((_a = options.onBeforeChange) == null ? void 0 : _a.call(options, value, old)) === false)
566
- return;
567
- source = value;
568
- (_b = options.onChanged) == null ? void 0 : _b.call(options, value, old);
569
- if (triggering)
570
- trigger();
571
- }
572
- const untrackedGet = () => get(false);
573
- const silentSet = (v) => set(v, false);
574
- const peek = () => get(false);
575
- const lay = (v) => set(v, false);
576
- return extendRef(ref, {
577
- get,
578
- set,
579
- untrackedGet,
580
- silentSet,
581
- peek,
582
- lay
583
- }, { enumerable: true });
584
- }
585
- const controlledRef = refWithControl;
586
-
587
- function resolveRef(r) {
588
- return typeof r === "function" ? computed(r) : ref(r);
589
- }
590
-
591
- function set(...args) {
592
- if (args.length === 2) {
593
- const [ref, value] = args;
594
- ref.value = value;
595
- }
596
- if (args.length === 3) {
597
- if (isVue2) {
598
- set$1(...args);
599
- } else {
600
- const [target, key, value] = args;
601
- target[key] = value;
602
- }
603
- }
604
- }
605
-
606
- function syncRef(left, right, options = {}) {
607
- var _a, _b;
608
- const {
609
- flush = "sync",
610
- deep = false,
611
- immediate = true,
612
- direction = "both",
613
- transform = {}
614
- } = options;
615
- let watchLeft;
616
- let watchRight;
617
- const transformLTR = (_a = transform.ltr) != null ? _a : (v) => v;
618
- const transformRTL = (_b = transform.rtl) != null ? _b : (v) => v;
619
- if (direction === "both" || direction === "ltr") {
620
- watchLeft = watch(left, (newValue) => right.value = transformLTR(newValue), { flush, deep, immediate });
621
- }
622
- if (direction === "both" || direction === "rtl") {
623
- watchRight = watch(right, (newValue) => left.value = transformRTL(newValue), { flush, deep, immediate });
624
- }
625
- return () => {
626
- watchLeft == null ? void 0 : watchLeft();
627
- watchRight == null ? void 0 : watchRight();
628
- };
629
- }
630
-
631
- function syncRefs(source, targets, options = {}) {
632
- const {
633
- flush = "sync",
634
- deep = false,
635
- immediate = true
636
- } = options;
637
- if (!Array.isArray(targets))
638
- targets = [targets];
639
- return watch(source, (newValue) => targets.forEach((target) => target.value = newValue), { flush, deep, immediate });
640
- }
641
-
642
- var __defProp$7 = Object.defineProperty;
643
- var __defProps$5 = Object.defineProperties;
644
- var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
645
- var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
646
- var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
647
- var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
648
- var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
649
- var __spreadValues$7 = (a, b) => {
650
- for (var prop in b || (b = {}))
651
- if (__hasOwnProp$9.call(b, prop))
652
- __defNormalProp$7(a, prop, b[prop]);
653
- if (__getOwnPropSymbols$9)
654
- for (var prop of __getOwnPropSymbols$9(b)) {
655
- if (__propIsEnum$9.call(b, prop))
656
- __defNormalProp$7(a, prop, b[prop]);
657
- }
658
- return a;
659
- };
660
- var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
661
- function toRefs(objectRef) {
662
- if (!isRef(objectRef))
663
- return toRefs$1(objectRef);
664
- const result = Array.isArray(objectRef.value) ? new Array(objectRef.value.length) : {};
665
- for (const key in objectRef.value) {
666
- result[key] = customRef(() => ({
667
- get() {
668
- return objectRef.value[key];
669
- },
670
- set(v) {
671
- if (Array.isArray(objectRef.value)) {
672
- const copy = [...objectRef.value];
673
- copy[key] = v;
674
- objectRef.value = copy;
675
- } else {
676
- const newObject = __spreadProps$5(__spreadValues$7({}, objectRef.value), { [key]: v });
677
- Object.setPrototypeOf(newObject, objectRef.value);
678
- objectRef.value = newObject;
679
- }
680
- }
681
- }));
682
- }
683
- return result;
684
- }
685
-
686
- function tryOnBeforeMount(fn, sync = true) {
687
- if (getCurrentInstance())
688
- onBeforeMount(fn);
689
- else if (sync)
690
- fn();
691
- else
692
- nextTick(fn);
693
- }
694
-
695
- function tryOnBeforeUnmount(fn) {
696
- if (getCurrentInstance())
697
- onBeforeUnmount(fn);
698
- }
699
-
700
- function tryOnMounted(fn, sync = true) {
701
- if (getCurrentInstance())
702
- onMounted(fn);
703
- else if (sync)
704
- fn();
705
- else
706
- nextTick(fn);
707
- }
708
-
709
- function tryOnUnmounted(fn) {
710
- if (getCurrentInstance())
711
- onUnmounted(fn);
712
- }
713
-
714
- function createUntil(r, isNot = false) {
715
- function toMatch(condition, { flush = "sync", deep = false, timeout, throwOnTimeout } = {}) {
716
- let stop = null;
717
- const watcher = new Promise((resolve) => {
718
- stop = watch(r, (v) => {
719
- if (condition(v) !== isNot) {
720
- stop == null ? void 0 : stop();
721
- resolve(v);
722
- }
723
- }, {
724
- flush,
725
- deep,
726
- immediate: true
727
- });
728
- });
729
- const promises = [watcher];
730
- if (timeout != null) {
731
- promises.push(promiseTimeout(timeout, throwOnTimeout).then(() => resolveUnref(r)).finally(() => stop == null ? void 0 : stop()));
732
- }
733
- return Promise.race(promises);
734
- }
735
- function toBe(value, options) {
736
- if (!isRef(value))
737
- return toMatch((v) => v === value, options);
738
- const { flush = "sync", deep = false, timeout, throwOnTimeout } = options != null ? options : {};
739
- let stop = null;
740
- const watcher = new Promise((resolve) => {
741
- stop = watch([r, value], ([v1, v2]) => {
742
- if (isNot !== (v1 === v2)) {
743
- stop == null ? void 0 : stop();
744
- resolve(v1);
745
- }
746
- }, {
747
- flush,
748
- deep,
749
- immediate: true
750
- });
751
- });
752
- const promises = [watcher];
753
- if (timeout != null) {
754
- promises.push(promiseTimeout(timeout, throwOnTimeout).then(() => resolveUnref(r)).finally(() => {
755
- stop == null ? void 0 : stop();
756
- return resolveUnref(r);
757
- }));
758
- }
759
- return Promise.race(promises);
760
- }
761
- function toBeTruthy(options) {
762
- return toMatch((v) => Boolean(v), options);
763
- }
764
- function toBeNull(options) {
765
- return toBe(null, options);
766
- }
767
- function toBeUndefined(options) {
768
- return toBe(void 0, options);
769
- }
770
- function toBeNaN(options) {
771
- return toMatch(Number.isNaN, options);
772
- }
773
- function toContains(value, options) {
774
- return toMatch((v) => {
775
- const array = Array.from(v);
776
- return array.includes(value) || array.includes(resolveUnref(value));
777
- }, options);
778
- }
779
- function changed(options) {
780
- return changedTimes(1, options);
781
- }
782
- function changedTimes(n = 1, options) {
783
- let count = -1;
784
- return toMatch(() => {
785
- count += 1;
786
- return count >= n;
787
- }, options);
788
- }
789
- if (Array.isArray(resolveUnref(r))) {
790
- const instance = {
791
- toMatch,
792
- toContains,
793
- changed,
794
- changedTimes,
795
- get not() {
796
- return createUntil(r, !isNot);
797
- }
798
- };
799
- return instance;
800
- } else {
801
- const instance = {
802
- toMatch,
803
- toBe,
804
- toBeTruthy,
805
- toBeNull,
806
- toBeNaN,
807
- toBeUndefined,
808
- changed,
809
- changedTimes,
810
- get not() {
811
- return createUntil(r, !isNot);
812
- }
813
- };
814
- return instance;
815
- }
816
- }
817
- function until(r) {
818
- return createUntil(r);
819
- }
820
-
821
- function useArrayEvery(list, fn) {
822
- return computed(() => resolveUnref(list).every((element, index, array) => fn(resolveUnref(element), index, array)));
823
- }
824
-
825
- function useArrayFilter(list, fn) {
826
- return computed(() => resolveUnref(list).map((i) => resolveUnref(i)).filter(fn));
827
- }
828
-
829
- function useArrayFind(list, fn) {
830
- return computed(() => resolveUnref(resolveUnref(list).find((element, index, array) => fn(resolveUnref(element), index, array))));
831
- }
832
-
833
- function useArrayFindIndex(list, fn) {
834
- return computed(() => resolveUnref(list).findIndex((element, index, array) => fn(resolveUnref(element), index, array)));
835
- }
836
-
837
- function useArrayJoin(list, separator) {
838
- return computed(() => resolveUnref(list).map((i) => resolveUnref(i)).join(resolveUnref(separator)));
839
- }
840
-
841
- function useArrayMap(list, fn) {
842
- return computed(() => resolveUnref(list).map((i) => resolveUnref(i)).map(fn));
843
- }
844
-
845
- function useArrayReduce(list, reducer, ...args) {
846
- const reduceCallback = (sum, value, index) => reducer(resolveUnref(sum), resolveUnref(value), index);
847
- return computed(() => {
848
- const resolved = resolveUnref(list);
849
- return args.length ? resolved.reduce(reduceCallback, resolveUnref(args[0])) : resolved.reduce(reduceCallback);
850
- });
851
- }
852
-
853
- function useArraySome(list, fn) {
854
- return computed(() => resolveUnref(list).some((element, index, array) => fn(resolveUnref(element), index, array)));
855
- }
856
-
857
- function useCounter(initialValue = 0, options = {}) {
858
- const count = ref(initialValue);
859
- const {
860
- max = Infinity,
861
- min = -Infinity
862
- } = options;
863
- const inc = (delta = 1) => count.value = Math.min(max, count.value + delta);
864
- const dec = (delta = 1) => count.value = Math.max(min, count.value - delta);
865
- const get = () => count.value;
866
- const set = (val) => count.value = Math.max(min, Math.min(max, val));
867
- const reset = (val = initialValue) => {
868
- initialValue = val;
869
- return set(val);
870
- };
871
- return { count, inc, dec, get, set, reset };
872
- }
873
-
874
- const REGEX_PARSE = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/;
875
- const REGEX_FORMAT = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|SSS/g;
876
- const defaultMeridiem = (hours, minutes, isLowercase, hasPeriod) => {
877
- let m = hours < 12 ? "AM" : "PM";
878
- if (hasPeriod)
879
- m = m.split("").reduce((acc, curr) => acc += `${curr}.`, "");
880
- return isLowercase ? m.toLowerCase() : m;
881
- };
882
- const formatDate = (date, formatStr, options = {}) => {
883
- var _a;
884
- const years = date.getFullYear();
885
- const month = date.getMonth();
886
- const days = date.getDate();
887
- const hours = date.getHours();
888
- const minutes = date.getMinutes();
889
- const seconds = date.getSeconds();
890
- const milliseconds = date.getMilliseconds();
891
- const day = date.getDay();
892
- const meridiem = (_a = options.customMeridiem) != null ? _a : defaultMeridiem;
893
- const matches = {
894
- YY: () => String(years).slice(-2),
895
- YYYY: () => years,
896
- M: () => month + 1,
897
- MM: () => `${month + 1}`.padStart(2, "0"),
898
- MMM: () => date.toLocaleDateString(options.locales, { month: "short" }),
899
- MMMM: () => date.toLocaleDateString(options.locales, { month: "long" }),
900
- D: () => String(days),
901
- DD: () => `${days}`.padStart(2, "0"),
902
- H: () => String(hours),
903
- HH: () => `${hours}`.padStart(2, "0"),
904
- h: () => `${hours % 12 || 12}`.padStart(1, "0"),
905
- hh: () => `${hours % 12 || 12}`.padStart(2, "0"),
906
- m: () => String(minutes),
907
- mm: () => `${minutes}`.padStart(2, "0"),
908
- s: () => String(seconds),
909
- ss: () => `${seconds}`.padStart(2, "0"),
910
- SSS: () => `${milliseconds}`.padStart(3, "0"),
911
- d: () => day,
912
- dd: () => date.toLocaleDateString(options.locales, { weekday: "narrow" }),
913
- ddd: () => date.toLocaleDateString(options.locales, { weekday: "short" }),
914
- dddd: () => date.toLocaleDateString(options.locales, { weekday: "long" }),
915
- A: () => meridiem(hours, minutes),
916
- AA: () => meridiem(hours, minutes, false, true),
917
- a: () => meridiem(hours, minutes, true),
918
- aa: () => meridiem(hours, minutes, true, true)
919
- };
920
- return formatStr.replace(REGEX_FORMAT, (match, $1) => $1 || matches[match]());
921
- };
922
- const normalizeDate = (date) => {
923
- if (date === null)
924
- return new Date(NaN);
925
- if (date === void 0)
926
- return new Date();
927
- if (date instanceof Date)
928
- return new Date(date);
929
- if (typeof date === "string" && !/Z$/i.test(date)) {
930
- const d = date.match(REGEX_PARSE);
931
- if (d) {
932
- const m = d[2] - 1 || 0;
933
- const ms = (d[7] || "0").substring(0, 3);
934
- return new Date(d[1], m, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, ms);
935
- }
936
- }
937
- return new Date(date);
938
- };
939
- function useDateFormat(date, formatStr = "HH:mm:ss", options = {}) {
940
- return computed(() => formatDate(normalizeDate(resolveUnref(date)), resolveUnref(formatStr), options));
941
- }
942
-
943
- function useIntervalFn(cb, interval = 1e3, options = {}) {
944
- const {
945
- immediate = true,
946
- immediateCallback = false
947
- } = options;
948
- let timer = null;
949
- const isActive = ref(false);
950
- function clean() {
951
- if (timer) {
952
- clearInterval(timer);
953
- timer = null;
954
- }
955
- }
956
- function pause() {
957
- isActive.value = false;
958
- clean();
959
- }
960
- function resume() {
961
- if (unref(interval) <= 0)
962
- return;
963
- isActive.value = true;
964
- if (immediateCallback)
965
- cb();
966
- clean();
967
- timer = setInterval(cb, resolveUnref(interval));
968
- }
969
- if (immediate && isClient)
970
- resume();
971
- if (isRef(interval)) {
972
- const stopWatch = watch(interval, () => {
973
- if (isActive.value && isClient)
974
- resume();
975
- });
976
- tryOnScopeDispose(stopWatch);
977
- }
978
- tryOnScopeDispose(pause);
979
- return {
980
- isActive,
981
- pause,
982
- resume
983
- };
984
- }
985
-
986
- var __defProp$6 = Object.defineProperty;
987
- var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
988
- var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
989
- var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
990
- var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
991
- var __spreadValues$6 = (a, b) => {
992
- for (var prop in b || (b = {}))
993
- if (__hasOwnProp$8.call(b, prop))
994
- __defNormalProp$6(a, prop, b[prop]);
995
- if (__getOwnPropSymbols$8)
996
- for (var prop of __getOwnPropSymbols$8(b)) {
997
- if (__propIsEnum$8.call(b, prop))
998
- __defNormalProp$6(a, prop, b[prop]);
999
- }
1000
- return a;
1001
- };
1002
- function useInterval(interval = 1e3, options = {}) {
1003
- const {
1004
- controls: exposeControls = false,
1005
- immediate = true,
1006
- callback
1007
- } = options;
1008
- const counter = ref(0);
1009
- const update = () => counter.value += 1;
1010
- const controls = useIntervalFn(callback ? () => {
1011
- update();
1012
- callback(counter.value);
1013
- } : update, interval, { immediate });
1014
- if (exposeControls) {
1015
- return __spreadValues$6({
1016
- counter
1017
- }, controls);
1018
- } else {
1019
- return counter;
1020
- }
1021
- }
1022
-
1023
- function useLastChanged(source, options = {}) {
1024
- var _a;
1025
- const ms = ref((_a = options.initialValue) != null ? _a : null);
1026
- watch(source, () => ms.value = timestamp(), options);
1027
- return ms;
1028
- }
1029
-
1030
- function useTimeoutFn(cb, interval, options = {}) {
1031
- const {
1032
- immediate = true
1033
- } = options;
1034
- const isPending = ref(false);
1035
- let timer = null;
1036
- function clear() {
1037
- if (timer) {
1038
- clearTimeout(timer);
1039
- timer = null;
1040
- }
1041
- }
1042
- function stop() {
1043
- isPending.value = false;
1044
- clear();
1045
- }
1046
- function start(...args) {
1047
- clear();
1048
- isPending.value = true;
1049
- timer = setTimeout(() => {
1050
- isPending.value = false;
1051
- timer = null;
1052
- cb(...args);
1053
- }, resolveUnref(interval));
1054
- }
1055
- if (immediate) {
1056
- isPending.value = true;
1057
- if (isClient)
1058
- start();
1059
- }
1060
- tryOnScopeDispose(stop);
1061
- return {
1062
- isPending,
1063
- start,
1064
- stop
1065
- };
1066
- }
1067
-
1068
- var __defProp$5 = Object.defineProperty;
1069
- var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
1070
- var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
1071
- var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
1072
- var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1073
- var __spreadValues$5 = (a, b) => {
1074
- for (var prop in b || (b = {}))
1075
- if (__hasOwnProp$7.call(b, prop))
1076
- __defNormalProp$5(a, prop, b[prop]);
1077
- if (__getOwnPropSymbols$7)
1078
- for (var prop of __getOwnPropSymbols$7(b)) {
1079
- if (__propIsEnum$7.call(b, prop))
1080
- __defNormalProp$5(a, prop, b[prop]);
1081
- }
1082
- return a;
1083
- };
1084
- function useTimeout(interval = 1e3, options = {}) {
1085
- const {
1086
- controls: exposeControls = false,
1087
- callback
1088
- } = options;
1089
- const controls = useTimeoutFn(callback != null ? callback : noop, interval, options);
1090
- const ready = computed(() => !controls.isPending.value);
1091
- if (exposeControls) {
1092
- return __spreadValues$5({
1093
- ready
1094
- }, controls);
1095
- } else {
1096
- return ready;
1097
- }
1098
- }
1099
-
1100
- function useToNumber(value, options = {}) {
1101
- const {
1102
- method = "parseFloat",
1103
- radix,
1104
- nanToZero
1105
- } = options;
1106
- return computed(() => {
1107
- let resolved = resolveUnref(value);
1108
- if (typeof resolved === "string")
1109
- resolved = Number[method](resolved, radix);
1110
- if (nanToZero && isNaN(resolved))
1111
- resolved = 0;
1112
- return resolved;
1113
- });
1114
- }
1115
-
1116
- function useToString(value) {
1117
- return computed(() => `${resolveUnref(value)}`);
1118
- }
1119
-
1120
- function useToggle(initialValue = false, options = {}) {
1121
- const {
1122
- truthyValue = true,
1123
- falsyValue = false
1124
- } = options;
1125
- const valueIsRef = isRef(initialValue);
1126
- const _value = ref(initialValue);
1127
- function toggle(value) {
1128
- if (arguments.length) {
1129
- _value.value = value;
1130
- return _value.value;
1131
- } else {
1132
- const truthy = resolveUnref(truthyValue);
1133
- _value.value = _value.value === truthy ? resolveUnref(falsyValue) : truthy;
1134
- return _value.value;
1135
- }
1136
- }
1137
- if (valueIsRef)
1138
- return toggle;
1139
- else
1140
- return [_value, toggle];
1141
- }
1142
-
1143
- function watchArray(source, cb, options) {
1144
- let oldList = (options == null ? void 0 : options.immediate) ? [] : [
1145
- ...source instanceof Function ? source() : Array.isArray(source) ? source : unref(source)
1146
- ];
1147
- return watch(source, (newList, _, onCleanup) => {
1148
- const oldListRemains = new Array(oldList.length);
1149
- const added = [];
1150
- for (const obj of newList) {
1151
- let found = false;
1152
- for (let i = 0; i < oldList.length; i++) {
1153
- if (!oldListRemains[i] && obj === oldList[i]) {
1154
- oldListRemains[i] = true;
1155
- found = true;
1156
- break;
1157
- }
1158
- }
1159
- if (!found)
1160
- added.push(obj);
1161
- }
1162
- const removed = oldList.filter((_2, i) => !oldListRemains[i]);
1163
- cb(newList, oldList, added, removed, onCleanup);
1164
- oldList = [...newList];
1165
- }, options);
1166
- }
1167
-
1168
- var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
1169
- var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
1170
- var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
1171
- var __objRest$5 = (source, exclude) => {
1172
- var target = {};
1173
- for (var prop in source)
1174
- if (__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0)
1175
- target[prop] = source[prop];
1176
- if (source != null && __getOwnPropSymbols$6)
1177
- for (var prop of __getOwnPropSymbols$6(source)) {
1178
- if (exclude.indexOf(prop) < 0 && __propIsEnum$6.call(source, prop))
1179
- target[prop] = source[prop];
1180
- }
1181
- return target;
1182
- };
1183
- function watchWithFilter(source, cb, options = {}) {
1184
- const _a = options, {
1185
- eventFilter = bypassFilter
1186
- } = _a, watchOptions = __objRest$5(_a, [
1187
- "eventFilter"
1188
- ]);
1189
- return watch(source, createFilterWrapper(eventFilter, cb), watchOptions);
1190
- }
1191
-
1192
- var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
1193
- var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
1194
- var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
1195
- var __objRest$4 = (source, exclude) => {
1196
- var target = {};
1197
- for (var prop in source)
1198
- if (__hasOwnProp$5.call(source, prop) && exclude.indexOf(prop) < 0)
1199
- target[prop] = source[prop];
1200
- if (source != null && __getOwnPropSymbols$5)
1201
- for (var prop of __getOwnPropSymbols$5(source)) {
1202
- if (exclude.indexOf(prop) < 0 && __propIsEnum$5.call(source, prop))
1203
- target[prop] = source[prop];
1204
- }
1205
- return target;
1206
- };
1207
- function watchAtMost(source, cb, options) {
1208
- const _a = options, {
1209
- count
1210
- } = _a, watchOptions = __objRest$4(_a, [
1211
- "count"
1212
- ]);
1213
- const current = ref(0);
1214
- const stop = watchWithFilter(source, (...args) => {
1215
- current.value += 1;
1216
- if (current.value >= resolveUnref(count))
1217
- nextTick(() => stop());
1218
- cb(...args);
1219
- }, watchOptions);
1220
- return { count: current, stop };
1221
- }
1222
-
1223
- var __defProp$4 = Object.defineProperty;
1224
- var __defProps$4 = Object.defineProperties;
1225
- var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
1226
- var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
1227
- var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
1228
- var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
1229
- var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1230
- var __spreadValues$4 = (a, b) => {
1231
- for (var prop in b || (b = {}))
1232
- if (__hasOwnProp$4.call(b, prop))
1233
- __defNormalProp$4(a, prop, b[prop]);
1234
- if (__getOwnPropSymbols$4)
1235
- for (var prop of __getOwnPropSymbols$4(b)) {
1236
- if (__propIsEnum$4.call(b, prop))
1237
- __defNormalProp$4(a, prop, b[prop]);
1238
- }
1239
- return a;
1240
- };
1241
- var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
1242
- var __objRest$3 = (source, exclude) => {
1243
- var target = {};
1244
- for (var prop in source)
1245
- if (__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0)
1246
- target[prop] = source[prop];
1247
- if (source != null && __getOwnPropSymbols$4)
1248
- for (var prop of __getOwnPropSymbols$4(source)) {
1249
- if (exclude.indexOf(prop) < 0 && __propIsEnum$4.call(source, prop))
1250
- target[prop] = source[prop];
1251
- }
1252
- return target;
1253
- };
1254
- function watchDebounced(source, cb, options = {}) {
1255
- const _a = options, {
1256
- debounce = 0,
1257
- maxWait = void 0
1258
- } = _a, watchOptions = __objRest$3(_a, [
1259
- "debounce",
1260
- "maxWait"
1261
- ]);
1262
- return watchWithFilter(source, cb, __spreadProps$4(__spreadValues$4({}, watchOptions), {
1263
- eventFilter: debounceFilter(debounce, { maxWait })
1264
- }));
1265
- }
1266
-
1267
- var __defProp$3 = Object.defineProperty;
1268
- var __defProps$3 = Object.defineProperties;
1269
- var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
1270
- var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
1271
- var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
1272
- var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
1273
- var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1274
- var __spreadValues$3 = (a, b) => {
1275
- for (var prop in b || (b = {}))
1276
- if (__hasOwnProp$3.call(b, prop))
1277
- __defNormalProp$3(a, prop, b[prop]);
1278
- if (__getOwnPropSymbols$3)
1279
- for (var prop of __getOwnPropSymbols$3(b)) {
1280
- if (__propIsEnum$3.call(b, prop))
1281
- __defNormalProp$3(a, prop, b[prop]);
1282
- }
1283
- return a;
1284
- };
1285
- var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
1286
- var __objRest$2 = (source, exclude) => {
1287
- var target = {};
1288
- for (var prop in source)
1289
- if (__hasOwnProp$3.call(source, prop) && exclude.indexOf(prop) < 0)
1290
- target[prop] = source[prop];
1291
- if (source != null && __getOwnPropSymbols$3)
1292
- for (var prop of __getOwnPropSymbols$3(source)) {
1293
- if (exclude.indexOf(prop) < 0 && __propIsEnum$3.call(source, prop))
1294
- target[prop] = source[prop];
1295
- }
1296
- return target;
1297
- };
1298
- function watchIgnorable(source, cb, options = {}) {
1299
- const _a = options, {
1300
- eventFilter = bypassFilter
1301
- } = _a, watchOptions = __objRest$2(_a, [
1302
- "eventFilter"
1303
- ]);
1304
- const filteredCb = createFilterWrapper(eventFilter, cb);
1305
- let ignoreUpdates;
1306
- let ignorePrevAsyncUpdates;
1307
- let stop;
1308
- if (watchOptions.flush === "sync") {
1309
- const ignore = ref(false);
1310
- ignorePrevAsyncUpdates = () => {
1311
- };
1312
- ignoreUpdates = (updater) => {
1313
- ignore.value = true;
1314
- updater();
1315
- ignore.value = false;
1316
- };
1317
- stop = watch(source, (...args) => {
1318
- if (!ignore.value)
1319
- filteredCb(...args);
1320
- }, watchOptions);
1321
- } else {
1322
- const disposables = [];
1323
- const ignoreCounter = ref(0);
1324
- const syncCounter = ref(0);
1325
- ignorePrevAsyncUpdates = () => {
1326
- ignoreCounter.value = syncCounter.value;
1327
- };
1328
- disposables.push(watch(source, () => {
1329
- syncCounter.value++;
1330
- }, __spreadProps$3(__spreadValues$3({}, watchOptions), { flush: "sync" })));
1331
- ignoreUpdates = (updater) => {
1332
- const syncCounterPrev = syncCounter.value;
1333
- updater();
1334
- ignoreCounter.value += syncCounter.value - syncCounterPrev;
1335
- };
1336
- disposables.push(watch(source, (...args) => {
1337
- const ignore = ignoreCounter.value > 0 && ignoreCounter.value === syncCounter.value;
1338
- ignoreCounter.value = 0;
1339
- syncCounter.value = 0;
1340
- if (ignore)
1341
- return;
1342
- filteredCb(...args);
1343
- }, watchOptions));
1344
- stop = () => {
1345
- disposables.forEach((fn) => fn());
1346
- };
1347
- }
1348
- return { stop, ignoreUpdates, ignorePrevAsyncUpdates };
1349
- }
1350
-
1351
- function watchOnce(source, cb, options) {
1352
- const stop = watch(source, (...args) => {
1353
- nextTick(() => stop());
1354
- return cb(...args);
1355
- }, options);
1356
- }
1357
-
1358
- var __defProp$2 = Object.defineProperty;
1359
- var __defProps$2 = Object.defineProperties;
1360
- var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
1361
- var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
1362
- var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
1363
- var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
1364
- var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1365
- var __spreadValues$2 = (a, b) => {
1366
- for (var prop in b || (b = {}))
1367
- if (__hasOwnProp$2.call(b, prop))
1368
- __defNormalProp$2(a, prop, b[prop]);
1369
- if (__getOwnPropSymbols$2)
1370
- for (var prop of __getOwnPropSymbols$2(b)) {
1371
- if (__propIsEnum$2.call(b, prop))
1372
- __defNormalProp$2(a, prop, b[prop]);
1373
- }
1374
- return a;
1375
- };
1376
- var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
1377
- var __objRest$1 = (source, exclude) => {
1378
- var target = {};
1379
- for (var prop in source)
1380
- if (__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0)
1381
- target[prop] = source[prop];
1382
- if (source != null && __getOwnPropSymbols$2)
1383
- for (var prop of __getOwnPropSymbols$2(source)) {
1384
- if (exclude.indexOf(prop) < 0 && __propIsEnum$2.call(source, prop))
1385
- target[prop] = source[prop];
1386
- }
1387
- return target;
1388
- };
1389
- function watchPausable(source, cb, options = {}) {
1390
- const _a = options, {
1391
- eventFilter: filter
1392
- } = _a, watchOptions = __objRest$1(_a, [
1393
- "eventFilter"
1394
- ]);
1395
- const { eventFilter, pause, resume, isActive } = pausableFilter(filter);
1396
- const stop = watchWithFilter(source, cb, __spreadProps$2(__spreadValues$2({}, watchOptions), {
1397
- eventFilter
1398
- }));
1399
- return { stop, pause, resume, isActive };
1400
- }
1401
-
1402
- var __defProp$1 = Object.defineProperty;
1403
- var __defProps$1 = Object.defineProperties;
1404
- var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
1405
- var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
1406
- var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
1407
- var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
1408
- var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1409
- var __spreadValues$1 = (a, b) => {
1410
- for (var prop in b || (b = {}))
1411
- if (__hasOwnProp$1.call(b, prop))
1412
- __defNormalProp$1(a, prop, b[prop]);
1413
- if (__getOwnPropSymbols$1)
1414
- for (var prop of __getOwnPropSymbols$1(b)) {
1415
- if (__propIsEnum$1.call(b, prop))
1416
- __defNormalProp$1(a, prop, b[prop]);
1417
- }
1418
- return a;
1419
- };
1420
- var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
1421
- var __objRest = (source, exclude) => {
1422
- var target = {};
1423
- for (var prop in source)
1424
- if (__hasOwnProp$1.call(source, prop) && exclude.indexOf(prop) < 0)
1425
- target[prop] = source[prop];
1426
- if (source != null && __getOwnPropSymbols$1)
1427
- for (var prop of __getOwnPropSymbols$1(source)) {
1428
- if (exclude.indexOf(prop) < 0 && __propIsEnum$1.call(source, prop))
1429
- target[prop] = source[prop];
1430
- }
1431
- return target;
1432
- };
1433
- function watchThrottled(source, cb, options = {}) {
1434
- const _a = options, {
1435
- throttle = 0,
1436
- trailing = true,
1437
- leading = true
1438
- } = _a, watchOptions = __objRest(_a, [
1439
- "throttle",
1440
- "trailing",
1441
- "leading"
1442
- ]);
1443
- return watchWithFilter(source, cb, __spreadProps$1(__spreadValues$1({}, watchOptions), {
1444
- eventFilter: throttleFilter(throttle, trailing, leading)
1445
- }));
1446
- }
1447
-
1448
- var __defProp = Object.defineProperty;
1449
- var __defProps = Object.defineProperties;
1450
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
1451
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
1452
- var __hasOwnProp = Object.prototype.hasOwnProperty;
1453
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
1454
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1455
- var __spreadValues = (a, b) => {
1456
- for (var prop in b || (b = {}))
1457
- if (__hasOwnProp.call(b, prop))
1458
- __defNormalProp(a, prop, b[prop]);
1459
- if (__getOwnPropSymbols)
1460
- for (var prop of __getOwnPropSymbols(b)) {
1461
- if (__propIsEnum.call(b, prop))
1462
- __defNormalProp(a, prop, b[prop]);
1463
- }
1464
- return a;
1465
- };
1466
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
1467
- function watchTriggerable(source, cb, options = {}) {
1468
- let cleanupFn;
1469
- function onEffect() {
1470
- if (!cleanupFn)
1471
- return;
1472
- const fn = cleanupFn;
1473
- cleanupFn = void 0;
1474
- fn();
1475
- }
1476
- function onCleanup(callback) {
1477
- cleanupFn = callback;
1478
- }
1479
- const _cb = (value, oldValue) => {
1480
- onEffect();
1481
- return cb(value, oldValue, onCleanup);
1482
- };
1483
- const res = watchIgnorable(source, _cb, options);
1484
- const { ignoreUpdates } = res;
1485
- const trigger = () => {
1486
- let res2;
1487
- ignoreUpdates(() => {
1488
- res2 = _cb(getWatchSources(source), getOldValue(source));
1489
- });
1490
- return res2;
1491
- };
1492
- return __spreadProps(__spreadValues({}, res), {
1493
- trigger
1494
- });
1495
- }
1496
- function getWatchSources(sources) {
1497
- if (isReactive(sources))
1498
- return sources;
1499
- if (Array.isArray(sources))
1500
- return sources.map((item) => getOneWatchSource(item));
1501
- return getOneWatchSource(sources);
1502
- }
1503
- function getOneWatchSource(source) {
1504
- return typeof source === "function" ? source() : unref(source);
1505
- }
1506
- function getOldValue(source) {
1507
- return Array.isArray(source) ? source.map(() => void 0) : void 0;
1508
- }
1509
-
1510
- function whenever(source, cb, options) {
1511
- return watch(source, (v, ov, onInvalidate) => {
1512
- if (v)
1513
- cb(v, ov, onInvalidate);
1514
- }, options);
1515
- }
1516
-
1517
- export { __onlyVue3, assert, refAutoReset as autoResetRef, bypassFilter, clamp, computedEager, computedWithControl, containsProp, computedWithControl as controlledComputed, controlledRef, createEventHook, createFilterWrapper, createGlobalState, createInjectionState, reactify as createReactiveFn, createSharedComposable, createSingletonPromise, debounceFilter, refDebounced as debouncedRef, watchDebounced as debouncedWatch, directiveHooks, computedEager as eagerComputed, extendRef, formatDate, get, hasOwn, identity, watchIgnorable as ignorableWatch, increaseWithUnit, invoke, isBoolean, isClient, isDef, isDefined, isFunction, isIOS, isNumber, isObject, isString, isWindow, makeDestructurable, noop, normalizeDate, now, objectPick, pausableFilter, watchPausable as pausableWatch, promiseTimeout, rand, reactify, reactifyObject, reactiveComputed, reactiveOmit, reactivePick, refAutoReset, refDebounced, refDefault, refThrottled, refWithControl, resolveRef, resolveUnref, set, syncRef, syncRefs, throttleFilter, refThrottled as throttledRef, watchThrottled as throttledWatch, timestamp, toReactive, toRefs, tryOnBeforeMount, tryOnBeforeUnmount, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useArrayEvery, useArrayFilter, useArrayFind, useArrayFindIndex, useArrayJoin, useArrayMap, useArrayReduce, useArraySome, useCounter, useDateFormat, refDebounced as useDebounce, useDebounceFn, useInterval, useIntervalFn, useLastChanged, refThrottled as useThrottle, useThrottleFn, useTimeout, useTimeoutFn, useToNumber, useToString, useToggle, watchArray, watchAtMost, watchDebounced, watchIgnorable, watchOnce, watchPausable, watchThrottled, watchTriggerable, watchWithFilter, whenever };