v-nuxt-ui 0.1.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 (398) hide show
  1. package/README.md +153 -0
  2. package/dist/module.d.mts +13 -0
  3. package/dist/module.json +15 -0
  4. package/dist/module.mjs +45 -0
  5. package/dist/runtime/assets/css/main.css +1 -0
  6. package/dist/runtime/assets/css/transition.css +1 -0
  7. package/dist/runtime/components/CircleProgress.d.vue.ts +17 -0
  8. package/dist/runtime/components/CircleProgress.vue +75 -0
  9. package/dist/runtime/components/CircleProgress.vue.d.ts +17 -0
  10. package/dist/runtime/components/DeleteModal.d.vue.ts +14 -0
  11. package/dist/runtime/components/DeleteModal.vue +57 -0
  12. package/dist/runtime/components/DeleteModal.vue.d.ts +14 -0
  13. package/dist/runtime/components/Dnd.client.d.vue.ts +25 -0
  14. package/dist/runtime/components/Dnd.client.vue +47 -0
  15. package/dist/runtime/components/Dnd.client.vue.d.ts +25 -0
  16. package/dist/runtime/components/EChart.client.d.vue.ts +19 -0
  17. package/dist/runtime/components/EChart.client.vue +72 -0
  18. package/dist/runtime/components/EChart.client.vue.d.ts +19 -0
  19. package/dist/runtime/components/Empty.d.vue.ts +12 -0
  20. package/dist/runtime/components/Empty.vue +26 -0
  21. package/dist/runtime/components/Empty.vue.d.ts +12 -0
  22. package/dist/runtime/components/PermissionWrapper.d.vue.ts +23 -0
  23. package/dist/runtime/components/PermissionWrapper.vue +51 -0
  24. package/dist/runtime/components/PermissionWrapper.vue.d.ts +23 -0
  25. package/dist/runtime/components/ScrollArea.d.vue.ts +26 -0
  26. package/dist/runtime/components/ScrollArea.vue +201 -0
  27. package/dist/runtime/components/ScrollArea.vue.d.ts +26 -0
  28. package/dist/runtime/components/Spin.d.vue.ts +16 -0
  29. package/dist/runtime/components/Spin.vue +22 -0
  30. package/dist/runtime/components/Spin.vue.d.ts +16 -0
  31. package/dist/runtime/components/SqlEditor.d.vue.ts +23 -0
  32. package/dist/runtime/components/SqlEditor.vue +255 -0
  33. package/dist/runtime/components/SqlEditor.vue.d.ts +23 -0
  34. package/dist/runtime/components/Watermark.d.vue.ts +44 -0
  35. package/dist/runtime/components/Watermark.vue +162 -0
  36. package/dist/runtime/components/Watermark.vue.d.ts +44 -0
  37. package/dist/runtime/components/badge/CodeModal.client.d.vue.ts +11 -0
  38. package/dist/runtime/components/badge/CodeModal.client.vue +77 -0
  39. package/dist/runtime/components/badge/CodeModal.client.vue.d.ts +11 -0
  40. package/dist/runtime/components/badge/CodeTooltip.client.d.vue.ts +9 -0
  41. package/dist/runtime/components/badge/CodeTooltip.client.vue +57 -0
  42. package/dist/runtime/components/badge/CodeTooltip.client.vue.d.ts +9 -0
  43. package/dist/runtime/components/button/Dropdown.d.vue.ts +31 -0
  44. package/dist/runtime/components/button/Dropdown.vue +123 -0
  45. package/dist/runtime/components/button/Dropdown.vue.d.ts +31 -0
  46. package/dist/runtime/components/button/Theme.d.vue.ts +19 -0
  47. package/dist/runtime/components/button/Theme.vue +45 -0
  48. package/dist/runtime/components/button/Theme.vue.d.ts +19 -0
  49. package/dist/runtime/components/date-picker/Input.d.vue.ts +18 -0
  50. package/dist/runtime/components/date-picker/Input.vue +39 -0
  51. package/dist/runtime/components/date-picker/Input.vue.d.ts +18 -0
  52. package/dist/runtime/components/date-picker/index.d.vue.ts +26 -0
  53. package/dist/runtime/components/date-picker/index.vue +223 -0
  54. package/dist/runtime/components/date-picker/index.vue.d.ts +26 -0
  55. package/dist/runtime/components/flow/FlowEdge.client.d.vue.ts +5 -0
  56. package/dist/runtime/components/flow/FlowEdge.client.vue +110 -0
  57. package/dist/runtime/components/flow/FlowEdge.client.vue.d.ts +5 -0
  58. package/dist/runtime/components/flow/FlowNode.client.d.vue.ts +8 -0
  59. package/dist/runtime/components/flow/FlowNode.client.vue +79 -0
  60. package/dist/runtime/components/flow/FlowNode.client.vue.d.ts +8 -0
  61. package/dist/runtime/components/flow/FlowStats.d.vue.ts +7 -0
  62. package/dist/runtime/components/flow/FlowStats.vue +17 -0
  63. package/dist/runtime/components/flow/FlowStats.vue.d.ts +7 -0
  64. package/dist/runtime/components/flow/FlowToolbar.d.vue.ts +14 -0
  65. package/dist/runtime/components/flow/FlowToolbar.vue +113 -0
  66. package/dist/runtime/components/flow/FlowToolbar.vue.d.ts +14 -0
  67. package/dist/runtime/components/form/create-modal-template/WithApi.d.vue.ts +19 -0
  68. package/dist/runtime/components/form/create-modal-template/WithApi.vue +36 -0
  69. package/dist/runtime/components/form/create-modal-template/WithApi.vue.d.ts +19 -0
  70. package/dist/runtime/components/form/create-modal-template/index.d.vue.ts +19 -0
  71. package/dist/runtime/components/form/create-modal-template/index.vue +75 -0
  72. package/dist/runtime/components/form/create-modal-template/index.vue.d.ts +19 -0
  73. package/dist/runtime/components/form/field/AsyncObjectSelect.d.vue.ts +23 -0
  74. package/dist/runtime/components/form/field/AsyncObjectSelect.vue +46 -0
  75. package/dist/runtime/components/form/field/AsyncObjectSelect.vue.d.ts +23 -0
  76. package/dist/runtime/components/form/field/AsyncSelect.d.vue.ts +26 -0
  77. package/dist/runtime/components/form/field/AsyncSelect.vue +140 -0
  78. package/dist/runtime/components/form/field/AsyncSelect.vue.d.ts +26 -0
  79. package/dist/runtime/components/form/field/AsyncTreeSelect.d.vue.ts +27 -0
  80. package/dist/runtime/components/form/field/AsyncTreeSelect.vue +130 -0
  81. package/dist/runtime/components/form/field/AsyncTreeSelect.vue.d.ts +27 -0
  82. package/dist/runtime/components/form/field/ButtonSwitch.d.vue.ts +19 -0
  83. package/dist/runtime/components/form/field/ButtonSwitch.vue +29 -0
  84. package/dist/runtime/components/form/field/ButtonSwitch.vue.d.ts +19 -0
  85. package/dist/runtime/components/form/field/DatePicker.d.vue.ts +26 -0
  86. package/dist/runtime/components/form/field/DatePicker.vue +89 -0
  87. package/dist/runtime/components/form/field/DatePicker.vue.d.ts +26 -0
  88. package/dist/runtime/components/form/field/DynamicInput.d.vue.ts +14 -0
  89. package/dist/runtime/components/form/field/DynamicInput.vue +52 -0
  90. package/dist/runtime/components/form/field/DynamicInput.vue.d.ts +14 -0
  91. package/dist/runtime/components/form/field/DynamicObjectInput.d.vue.ts +20 -0
  92. package/dist/runtime/components/form/field/DynamicObjectInput.vue +82 -0
  93. package/dist/runtime/components/form/field/DynamicObjectInput.vue.d.ts +20 -0
  94. package/dist/runtime/components/form/field/Input.d.vue.ts +17 -0
  95. package/dist/runtime/components/form/field/Input.vue +41 -0
  96. package/dist/runtime/components/form/field/Input.vue.d.ts +17 -0
  97. package/dist/runtime/components/form/field/InputPassword.d.vue.ts +17 -0
  98. package/dist/runtime/components/form/field/InputPassword.vue +40 -0
  99. package/dist/runtime/components/form/field/InputPassword.vue.d.ts +17 -0
  100. package/dist/runtime/components/form/field/InputStringNumber.d.vue.ts +16 -0
  101. package/dist/runtime/components/form/field/InputStringNumber.vue +56 -0
  102. package/dist/runtime/components/form/field/InputStringNumber.vue.d.ts +16 -0
  103. package/dist/runtime/components/form/field/Select.d.vue.ts +16 -0
  104. package/dist/runtime/components/form/field/Select.vue +29 -0
  105. package/dist/runtime/components/form/field/Select.vue.d.ts +16 -0
  106. package/dist/runtime/components/form/field/SqlEditor.d.vue.ts +10 -0
  107. package/dist/runtime/components/form/field/SqlEditor.vue +28 -0
  108. package/dist/runtime/components/form/field/SqlEditor.vue.d.ts +10 -0
  109. package/dist/runtime/components/form/field/TreeSelectTransfer.d.vue.ts +4 -0
  110. package/dist/runtime/components/form/field/TreeSelectTransfer.vue +89 -0
  111. package/dist/runtime/components/form/field/TreeSelectTransfer.vue.d.ts +4 -0
  112. package/dist/runtime/components/form/field/index.d.vue.ts +26 -0
  113. package/dist/runtime/components/form/field/index.vue +212 -0
  114. package/dist/runtime/components/form/field/index.vue.d.ts +26 -0
  115. package/dist/runtime/components/form/index.d.vue.ts +21 -0
  116. package/dist/runtime/components/form/index.vue +77 -0
  117. package/dist/runtime/components/form/index.vue.d.ts +21 -0
  118. package/dist/runtime/components/layout/ModuleMenu.d.vue.ts +6 -0
  119. package/dist/runtime/components/layout/ModuleMenu.vue +48 -0
  120. package/dist/runtime/components/layout/ModuleMenu.vue.d.ts +6 -0
  121. package/dist/runtime/components/layout/ThemePicker.d.vue.ts +3 -0
  122. package/dist/runtime/components/layout/ThemePicker.vue +100 -0
  123. package/dist/runtime/components/layout/ThemePicker.vue.d.ts +3 -0
  124. package/dist/runtime/components/layout/UserMenu.d.vue.ts +7 -0
  125. package/dist/runtime/components/layout/UserMenu.vue +77 -0
  126. package/dist/runtime/components/layout/UserMenu.vue.d.ts +7 -0
  127. package/dist/runtime/components/layout/default.d.vue.ts +13 -0
  128. package/dist/runtime/components/layout/default.vue +82 -0
  129. package/dist/runtime/components/layout/default.vue.d.ts +13 -0
  130. package/dist/runtime/components/placeholder/Svg.d.vue.ts +3 -0
  131. package/dist/runtime/components/placeholder/Svg.vue +22 -0
  132. package/dist/runtime/components/placeholder/Svg.vue.d.ts +3 -0
  133. package/dist/runtime/components/simple-table/index.d.vue.ts +21 -0
  134. package/dist/runtime/components/simple-table/index.vue +159 -0
  135. package/dist/runtime/components/simple-table/index.vue.d.ts +21 -0
  136. package/dist/runtime/components/table/ExcelExportModal.d.vue.ts +28 -0
  137. package/dist/runtime/components/table/ExcelExportModal.vue +82 -0
  138. package/dist/runtime/components/table/ExcelExportModal.vue.d.ts +28 -0
  139. package/dist/runtime/components/table/Page.d.vue.ts +26 -0
  140. package/dist/runtime/components/table/Page.vue +130 -0
  141. package/dist/runtime/components/table/Page.vue.d.ts +26 -0
  142. package/dist/runtime/components/table/Pagination.d.vue.ts +19 -0
  143. package/dist/runtime/components/table/Pagination.vue +51 -0
  144. package/dist/runtime/components/table/Pagination.vue.d.ts +19 -0
  145. package/dist/runtime/components/table/TooltipCell.d.vue.ts +7 -0
  146. package/dist/runtime/components/table/TooltipCell.vue +23 -0
  147. package/dist/runtime/components/table/TooltipCell.vue.d.ts +7 -0
  148. package/dist/runtime/components/table/column/ActionHeader.d.vue.ts +21 -0
  149. package/dist/runtime/components/table/column/ActionHeader.vue +155 -0
  150. package/dist/runtime/components/table/column/ActionHeader.vue.d.ts +21 -0
  151. package/dist/runtime/components/table/expansion/Field.d.vue.ts +18 -0
  152. package/dist/runtime/components/table/expansion/Field.vue +33 -0
  153. package/dist/runtime/components/table/expansion/Field.vue.d.ts +18 -0
  154. package/dist/runtime/components/table/expansion/Layout.d.vue.ts +13 -0
  155. package/dist/runtime/components/table/expansion/Layout.vue +8 -0
  156. package/dist/runtime/components/table/expansion/Layout.vue.d.ts +13 -0
  157. package/dist/runtime/components/table/header/index.d.vue.ts +19 -0
  158. package/dist/runtime/components/table/header/index.vue +221 -0
  159. package/dist/runtime/components/table/header/index.vue.d.ts +19 -0
  160. package/dist/runtime/components/table/header/settings/columns/DndList.d.vue.ts +32 -0
  161. package/dist/runtime/components/table/header/settings/columns/DndList.vue +46 -0
  162. package/dist/runtime/components/table/header/settings/columns/DndList.vue.d.ts +32 -0
  163. package/dist/runtime/components/table/header/settings/columns/Item.d.vue.ts +18 -0
  164. package/dist/runtime/components/table/header/settings/columns/Item.vue +59 -0
  165. package/dist/runtime/components/table/header/settings/columns/Item.vue.d.ts +18 -0
  166. package/dist/runtime/components/table/header/settings/columns/index.d.vue.ts +24 -0
  167. package/dist/runtime/components/table/header/settings/columns/index.vue +143 -0
  168. package/dist/runtime/components/table/header/settings/columns/index.vue.d.ts +24 -0
  169. package/dist/runtime/components/table/header/settings/index.d.vue.ts +25 -0
  170. package/dist/runtime/components/table/header/settings/index.vue +35 -0
  171. package/dist/runtime/components/table/header/settings/index.vue.d.ts +25 -0
  172. package/dist/runtime/components/table/index.d.vue.ts +26 -0
  173. package/dist/runtime/components/table/index.vue +121 -0
  174. package/dist/runtime/components/table/index.vue.d.ts +26 -0
  175. package/dist/runtime/components/table/query/order/Item.d.vue.ts +28 -0
  176. package/dist/runtime/components/table/query/order/Item.vue +85 -0
  177. package/dist/runtime/components/table/query/order/Item.vue.d.ts +28 -0
  178. package/dist/runtime/components/table/query/order/Newer.d.vue.ts +25 -0
  179. package/dist/runtime/components/table/query/order/Newer.vue +50 -0
  180. package/dist/runtime/components/table/query/order/Newer.vue.d.ts +25 -0
  181. package/dist/runtime/components/table/query/order/index.d.vue.ts +19 -0
  182. package/dist/runtime/components/table/query/order/index.vue +108 -0
  183. package/dist/runtime/components/table/query/order/index.vue.d.ts +19 -0
  184. package/dist/runtime/components/table/query/where/Newer.d.vue.ts +14 -0
  185. package/dist/runtime/components/table/query/where/Newer.vue +44 -0
  186. package/dist/runtime/components/table/query/where/Newer.vue.d.ts +14 -0
  187. package/dist/runtime/components/table/query/where/index.d.vue.ts +21 -0
  188. package/dist/runtime/components/table/query/where/index.vue +108 -0
  189. package/dist/runtime/components/table/query/where/index.vue.d.ts +21 -0
  190. package/dist/runtime/components/table/query/where/simple/index.d.vue.ts +7 -0
  191. package/dist/runtime/components/table/query/where/simple/index.vue +47 -0
  192. package/dist/runtime/components/table/query/where/simple/index.vue.d.ts +7 -0
  193. package/dist/runtime/components/table/query/where/simple/item/ColumnPicker.d.vue.ts +27 -0
  194. package/dist/runtime/components/table/query/where/simple/item/ColumnPicker.vue +65 -0
  195. package/dist/runtime/components/table/query/where/simple/item/ColumnPicker.vue.d.ts +27 -0
  196. package/dist/runtime/components/table/query/where/simple/item/OprPicker.d.vue.ts +27 -0
  197. package/dist/runtime/components/table/query/where/simple/item/OprPicker.vue +68 -0
  198. package/dist/runtime/components/table/query/where/simple/item/OprPicker.vue.d.ts +27 -0
  199. package/dist/runtime/components/table/query/where/simple/item/index.d.vue.ts +20 -0
  200. package/dist/runtime/components/table/query/where/simple/item/index.vue +56 -0
  201. package/dist/runtime/components/table/query/where/simple/item/index.vue.d.ts +20 -0
  202. package/dist/runtime/components/table/query/where/simple/item/opr/AsyncSelect.d.vue.ts +29 -0
  203. package/dist/runtime/components/table/query/where/simple/item/opr/AsyncSelect.vue +152 -0
  204. package/dist/runtime/components/table/query/where/simple/item/opr/AsyncSelect.vue.d.ts +29 -0
  205. package/dist/runtime/components/table/query/where/simple/item/opr/DatePicker.d.vue.ts +27 -0
  206. package/dist/runtime/components/table/query/where/simple/item/opr/DatePicker.vue +232 -0
  207. package/dist/runtime/components/table/query/where/simple/item/opr/DatePicker.vue.d.ts +27 -0
  208. package/dist/runtime/components/table/query/where/simple/item/opr/Input.d.vue.ts +29 -0
  209. package/dist/runtime/components/table/query/where/simple/item/opr/Input.vue +57 -0
  210. package/dist/runtime/components/table/query/where/simple/item/opr/Input.vue.d.ts +29 -0
  211. package/dist/runtime/components/table/query/where/simple/item/opr/InputNumber.d.vue.ts +29 -0
  212. package/dist/runtime/components/table/query/where/simple/item/opr/InputNumber.vue +45 -0
  213. package/dist/runtime/components/table/query/where/simple/item/opr/InputNumber.vue.d.ts +29 -0
  214. package/dist/runtime/components/table/query/where/simple/item/opr/Select.d.vue.ts +28 -0
  215. package/dist/runtime/components/table/query/where/simple/item/opr/Select.vue +62 -0
  216. package/dist/runtime/components/table/query/where/simple/item/opr/Select.vue.d.ts +28 -0
  217. package/dist/runtime/components/table/query/where/simple/item/opr/index.d.vue.ts +19 -0
  218. package/dist/runtime/components/table/query/where/simple/item/opr/index.vue +72 -0
  219. package/dist/runtime/components/table/query/where/simple/item/opr/index.vue.d.ts +19 -0
  220. package/dist/runtime/composables/api/flow/index.d.ts +3 -0
  221. package/dist/runtime/composables/api/flow/index.js +3 -0
  222. package/dist/runtime/composables/api/flow/useFlowApi.d.ts +1 -0
  223. package/dist/runtime/composables/api/flow/useFlowApi.js +1 -0
  224. package/dist/runtime/composables/api/flow/useFlowNodeApi.d.ts +1 -0
  225. package/dist/runtime/composables/api/flow/useFlowNodeApi.js +1 -0
  226. package/dist/runtime/composables/api/flow/useFlowNodeLinkApi.d.ts +1 -0
  227. package/dist/runtime/composables/api/flow/useFlowNodeLinkApi.js +1 -0
  228. package/dist/runtime/composables/api/index.d.ts +4 -0
  229. package/dist/runtime/composables/api/index.js +4 -0
  230. package/dist/runtime/composables/api/sys/index.d.ts +9 -0
  231. package/dist/runtime/composables/api/sys/index.js +9 -0
  232. package/dist/runtime/composables/api/sys/useAuthApi.d.ts +0 -0
  233. package/dist/runtime/composables/api/sys/useAuthApi.js +13 -0
  234. package/dist/runtime/composables/api/sys/useCompanyApi.d.ts +1 -0
  235. package/dist/runtime/composables/api/sys/useCompanyApi.js +3 -0
  236. package/dist/runtime/composables/api/sys/useDepartmentApi.d.ts +0 -0
  237. package/dist/runtime/composables/api/sys/useDepartmentApi.js +30 -0
  238. package/dist/runtime/composables/api/sys/useJobTitleApi.d.ts +1 -0
  239. package/dist/runtime/composables/api/sys/useJobTitleApi.js +3 -0
  240. package/dist/runtime/composables/api/sys/useLoginApi.d.ts +0 -0
  241. package/dist/runtime/composables/api/sys/useLoginApi.js +13 -0
  242. package/dist/runtime/composables/api/sys/useMenuApi.d.ts +0 -0
  243. package/dist/runtime/composables/api/sys/useMenuApi.js +32 -0
  244. package/dist/runtime/composables/api/sys/useRoleApi.d.ts +0 -0
  245. package/dist/runtime/composables/api/sys/useRoleApi.js +20 -0
  246. package/dist/runtime/composables/api/sys/useRowRecord.d.ts +0 -0
  247. package/dist/runtime/composables/api/sys/useRowRecord.js +8 -0
  248. package/dist/runtime/composables/api/sys/useUserApi.d.ts +0 -0
  249. package/dist/runtime/composables/api/sys/useUserApi.js +39 -0
  250. package/dist/runtime/composables/api/useApi.d.ts +0 -0
  251. package/dist/runtime/composables/api/useApi.js +103 -0
  252. package/dist/runtime/composables/api/useModel.d.ts +3 -0
  253. package/dist/runtime/composables/api/useModel.js +4 -0
  254. package/dist/runtime/composables/flow/index.d.ts +3 -0
  255. package/dist/runtime/composables/flow/index.js +3 -0
  256. package/dist/runtime/composables/flow/useFlow.d.ts +0 -0
  257. package/dist/runtime/composables/flow/useFlow.js +162 -0
  258. package/dist/runtime/composables/flow/useFlowResize.d.ts +56 -0
  259. package/dist/runtime/composables/flow/useFlowResize.js +148 -0
  260. package/dist/runtime/composables/flow/useFlowStyles.d.ts +14 -0
  261. package/dist/runtime/composables/flow/useFlowStyles.js +32 -0
  262. package/dist/runtime/composables/index.d.ts +13 -0
  263. package/dist/runtime/composables/index.js +13 -0
  264. package/dist/runtime/composables/table/index.d.ts +9 -0
  265. package/dist/runtime/composables/table/index.js +9 -0
  266. package/dist/runtime/composables/table/useTable.d.ts +0 -0
  267. package/dist/runtime/composables/table/useTable.js +340 -0
  268. package/dist/runtime/composables/table/useTableColumns.d.ts +30 -0
  269. package/dist/runtime/composables/table/useTableColumns.js +214 -0
  270. package/dist/runtime/composables/table/useTableData.d.ts +29 -0
  271. package/dist/runtime/composables/table/useTableData.js +92 -0
  272. package/dist/runtime/composables/table/useTableOpr.d.ts +8 -0
  273. package/dist/runtime/composables/table/useTableOpr.js +91 -0
  274. package/dist/runtime/composables/table/useTablePagination.d.ts +7 -0
  275. package/dist/runtime/composables/table/useTablePagination.js +29 -0
  276. package/dist/runtime/composables/table/useTableQuery.d.ts +23 -0
  277. package/dist/runtime/composables/table/useTableQuery.js +131 -0
  278. package/dist/runtime/composables/table/useTableRowActions.d.ts +18 -0
  279. package/dist/runtime/composables/table/useTableRowActions.js +154 -0
  280. package/dist/runtime/composables/table/useTableRowSelection.d.ts +6 -0
  281. package/dist/runtime/composables/table/useTableRowSelection.js +26 -0
  282. package/dist/runtime/composables/table/useTableView.d.ts +0 -0
  283. package/dist/runtime/composables/table/useTableView.js +150 -0
  284. package/dist/runtime/composables/useApp.d.ts +22 -0
  285. package/dist/runtime/composables/useApp.js +83 -0
  286. package/dist/runtime/composables/useAuth.d.ts +14 -0
  287. package/dist/runtime/composables/useAuth.js +92 -0
  288. package/dist/runtime/composables/useBoolean.d.ts +58 -0
  289. package/dist/runtime/composables/useBoolean.js +71 -0
  290. package/dist/runtime/composables/useDate.d.ts +25 -0
  291. package/dist/runtime/composables/useDate.js +157 -0
  292. package/dist/runtime/composables/useEChart.d.ts +103 -0
  293. package/dist/runtime/composables/useEChart.js +120 -0
  294. package/dist/runtime/composables/useForm.d.ts +0 -0
  295. package/dist/runtime/composables/useForm.js +60 -0
  296. package/dist/runtime/composables/usePermission.d.ts +10 -0
  297. package/dist/runtime/composables/usePermission.js +53 -0
  298. package/dist/runtime/composables/useRouterPush.d.ts +8 -0
  299. package/dist/runtime/composables/useRouterPush.js +37 -0
  300. package/dist/runtime/composables/useSidebarMenu.d.ts +36 -0
  301. package/dist/runtime/composables/useSidebarMenu.js +131 -0
  302. package/dist/runtime/composables/useTheme.d.ts +20 -0
  303. package/dist/runtime/composables/useTheme.js +94 -0
  304. package/dist/runtime/constants/columns.d.ts +3 -0
  305. package/dist/runtime/constants/columns.js +52 -0
  306. package/dist/runtime/constants/flow.d.ts +12 -0
  307. package/dist/runtime/constants/flow.js +24 -0
  308. package/dist/runtime/constants/index.d.ts +6 -0
  309. package/dist/runtime/constants/index.js +6 -0
  310. package/dist/runtime/constants/menu.d.ts +9 -0
  311. package/dist/runtime/constants/menu.js +11 -0
  312. package/dist/runtime/constants/options.d.ts +8 -0
  313. package/dist/runtime/constants/options.js +15 -0
  314. package/dist/runtime/constants/time.d.ts +7 -0
  315. package/dist/runtime/constants/time.js +12 -0
  316. package/dist/runtime/constants/user.d.ts +7 -0
  317. package/dist/runtime/constants/user.js +7 -0
  318. package/dist/runtime/index.css +1 -0
  319. package/dist/runtime/plugins/01.nuxtUIEnhancement.d.ts +18 -0
  320. package/dist/runtime/plugins/01.nuxtUIEnhancement.js +52 -0
  321. package/dist/runtime/plugins/02.dayjs.d.ts +13 -0
  322. package/dist/runtime/plugins/02.dayjs.js +9 -0
  323. package/dist/runtime/plugins/03.theme.d.ts +2 -0
  324. package/dist/runtime/plugins/03.theme.js +33 -0
  325. package/dist/runtime/plugins/04.head.d.ts +2 -0
  326. package/dist/runtime/plugins/04.head.js +29 -0
  327. package/dist/runtime/types/app.d.ts +42 -0
  328. package/dist/runtime/types/app.js +0 -0
  329. package/dist/runtime/types/cmds/login.d.ts +23 -0
  330. package/dist/runtime/types/cmds/sys.d.ts +10 -0
  331. package/dist/runtime/types/cmds/user.d.ts +8 -0
  332. package/dist/runtime/types/components/date.d.ts +5 -0
  333. package/dist/runtime/types/components/date.js +0 -0
  334. package/dist/runtime/types/components/dnd.d.ts +14 -0
  335. package/dist/runtime/types/components/dnd.js +0 -0
  336. package/dist/runtime/types/components/form/field.d.ts +102 -0
  337. package/dist/runtime/types/components/form/field.js +0 -0
  338. package/dist/runtime/types/components/form/index.d.ts +27 -0
  339. package/dist/runtime/types/components/form/index.js +1 -0
  340. package/dist/runtime/types/components/index.d.ts +4 -0
  341. package/dist/runtime/types/components/index.js +4 -0
  342. package/dist/runtime/types/components/table/column.d.ts +35 -0
  343. package/dist/runtime/types/components/table/column.js +0 -0
  344. package/dist/runtime/types/components/table/header.d.ts +33 -0
  345. package/dist/runtime/types/components/table/header.js +0 -0
  346. package/dist/runtime/types/components/table/index.d.ts +103 -0
  347. package/dist/runtime/types/components/table/index.js +4 -0
  348. package/dist/runtime/types/components/table/pagination.d.ts +14 -0
  349. package/dist/runtime/types/components/table/pagination.js +0 -0
  350. package/dist/runtime/types/components/table/query/index.d.ts +2 -0
  351. package/dist/runtime/types/components/table/query/index.js +2 -0
  352. package/dist/runtime/types/components/table/query/order.d.ts +16 -0
  353. package/dist/runtime/types/components/table/query/order.js +0 -0
  354. package/dist/runtime/types/components/table/query/where.d.ts +26 -0
  355. package/dist/runtime/types/components/table/query/where.js +0 -0
  356. package/dist/runtime/types/constants/time.d.ts +5 -0
  357. package/dist/runtime/types/index.d.ts +14 -0
  358. package/dist/runtime/types/index.js +6 -0
  359. package/dist/runtime/types/localStorage.d.ts +15 -0
  360. package/dist/runtime/types/locale.d.ts +81 -0
  361. package/dist/runtime/types/locale.js +0 -0
  362. package/dist/runtime/types/models/base.d.ts +16 -0
  363. package/dist/runtime/types/models/flow.d.ts +31 -0
  364. package/dist/runtime/types/models/sys.d.ts +107 -0
  365. package/dist/runtime/types/query.d.ts +45 -0
  366. package/dist/runtime/types/query.js +1 -0
  367. package/dist/runtime/types/request.d.ts +55 -0
  368. package/dist/runtime/types/request.js +22 -0
  369. package/dist/runtime/types/storage.d.ts +10 -0
  370. package/dist/runtime/types/storage.js +11 -0
  371. package/dist/runtime/utils/array.d.ts +1 -0
  372. package/dist/runtime/utils/array.js +3 -0
  373. package/dist/runtime/utils/diff.d.ts +2 -0
  374. package/dist/runtime/utils/diff.js +81 -0
  375. package/dist/runtime/utils/download/index.d.ts +1 -0
  376. package/dist/runtime/utils/download/index.js +1 -0
  377. package/dist/runtime/utils/download/tagA.d.ts +2 -0
  378. package/dist/runtime/utils/download/tagA.js +14 -0
  379. package/dist/runtime/utils/emoji.d.ts +1 -0
  380. package/dist/runtime/utils/emoji.js +57 -0
  381. package/dist/runtime/utils/excel.d.ts +3 -0
  382. package/dist/runtime/utils/excel.js +63 -0
  383. package/dist/runtime/utils/form.d.ts +2 -0
  384. package/dist/runtime/utils/form.js +142 -0
  385. package/dist/runtime/utils/index.d.ts +11 -0
  386. package/dist/runtime/utils/index.js +11 -0
  387. package/dist/runtime/utils/request.d.ts +3 -0
  388. package/dist/runtime/utils/request.js +3 -0
  389. package/dist/runtime/utils/string.d.ts +6 -0
  390. package/dist/runtime/utils/string.js +18 -0
  391. package/dist/runtime/utils/tree.d.ts +8 -0
  392. package/dist/runtime/utils/tree.js +54 -0
  393. package/dist/runtime/utils/type.d.ts +1 -0
  394. package/dist/runtime/utils/type.js +3 -0
  395. package/dist/runtime/utils/vueuse.d.ts +1 -0
  396. package/dist/runtime/utils/vueuse.js +20 -0
  397. package/dist/types.d.mts +3 -0
  398. package/package.json +108 -0
@@ -0,0 +1,81 @@
1
+ import { noDupPrimitiveArray } from "./array.js";
2
+ import { isObject } from "./type.js";
3
+ function comparePrimitiveArrays(arr1, arr2) {
4
+ if (!arr1 || !arr2)
5
+ return arr1 === arr2;
6
+ if (!Array.isArray(arr1) || !Array.isArray(arr2))
7
+ return false;
8
+ if (arr1.length !== arr2.length)
9
+ return false;
10
+ return arr1.every((item, index) => item === arr2[index]);
11
+ }
12
+ function getChangedFields(prev, cur) {
13
+ const fields = noDupPrimitiveArray([...Object.keys(prev), ...Object.keys(cur)]);
14
+ const changedFields = [];
15
+ for (const field of fields) {
16
+ if ((prev[field] === null || prev[field] === void 0) && (cur[field] === null || cur[field] === void 0)) {
17
+ continue;
18
+ }
19
+ if (Array.isArray(prev[field]) || Array.isArray(cur[field])) {
20
+ continue;
21
+ }
22
+ if (Object(prev[field]) !== prev[field] && prev[field] !== cur[field]) {
23
+ changedFields.push(field);
24
+ }
25
+ }
26
+ return changedFields;
27
+ }
28
+ export function compareObjArrays(arr1, arr2) {
29
+ if (!arr1 || !arr2)
30
+ return arr1 === arr2;
31
+ if (!Array.isArray(arr1) || !Array.isArray(arr2)) {
32
+ return false;
33
+ }
34
+ if (arr1.length !== arr2.length) {
35
+ return false;
36
+ }
37
+ return arr1.every((item1, index) => {
38
+ const item2 = arr2[index];
39
+ const keys = Object.keys(item1);
40
+ return keys.every((key) => {
41
+ if (Array.isArray(item1[key]) && Array.isArray(item2[key])) {
42
+ return compareObjArrays(item1[key], item2[key]);
43
+ } else if (isObject(item1[key]) && isObject(item2[key])) {
44
+ return getChangedFields(item1[key], item2[key]).length === 0;
45
+ }
46
+ if ((item1[key] === null || item1[key] === void 0) && (item2[key] === null || item2[key] === void 0)) {
47
+ return true;
48
+ }
49
+ return item1[key] === item2[key];
50
+ });
51
+ });
52
+ }
53
+ export function getObjWithModifiedFields(initData, oldData, newData, arrayKeys = []) {
54
+ const changedFields = getChangedFields(oldData, newData);
55
+ const arrayChangedList = arrayKeys.map((key) => {
56
+ const oldArr = oldData[key];
57
+ const newArr = newData[key];
58
+ if (!Array.isArray(oldArr) && !Array.isArray(newArr)) {
59
+ return false;
60
+ }
61
+ const hasItems = Array.isArray(oldArr) && oldArr.length > 0 || Array.isArray(newArr) && newArr.length > 0;
62
+ const firstItem = Array.isArray(oldArr) && oldArr.length > 0 ? oldArr[0] : Array.isArray(newArr) && newArr.length > 0 ? newArr[0] : null;
63
+ const isPrimitiveArray = !hasItems || firstItem !== null && firstItem !== void 0 && Object(firstItem) !== firstItem;
64
+ if (isPrimitiveArray) {
65
+ return !comparePrimitiveArrays(oldArr, newArr);
66
+ } else {
67
+ return !compareObjArrays(oldArr, newArr);
68
+ }
69
+ });
70
+ if (changedFields.length === 0 && !arrayChangedList.some((changed) => changed)) {
71
+ return [initData, false];
72
+ }
73
+ for (const field of changedFields) {
74
+ initData[field] = newData[field];
75
+ }
76
+ arrayKeys.forEach((key, index) => {
77
+ if (arrayChangedList[index])
78
+ initData[key] = newData[key];
79
+ });
80
+ return [initData, true];
81
+ }
@@ -0,0 +1 @@
1
+ export * from './tagA.js';
@@ -0,0 +1 @@
1
+ export * from "./tagA.js";
@@ -0,0 +1,2 @@
1
+ export declare function triggerFileDownload(data: Blob, filename: string): void;
2
+ export declare function triggerFileDownloadFromUrl(url?: string, filename?: string): void;
@@ -0,0 +1,14 @@
1
+ export function triggerFileDownload(data, filename) {
2
+ const link = document.createElement("a");
3
+ link.href = URL.createObjectURL(new Blob([data]));
4
+ link.download = filename;
5
+ document.body.appendChild(link);
6
+ link.click();
7
+ URL.revokeObjectURL(link.href);
8
+ document.body.removeChild(link);
9
+ }
10
+ export function triggerFileDownloadFromUrl(url, filename) {
11
+ fetch(url ?? "").then((response) => response.blob()).then((blob) => {
12
+ triggerFileDownload(blob, filename ?? "unknown");
13
+ });
14
+ }
@@ -0,0 +1 @@
1
+ export declare function getEmojiFlag(locale: string): string;
@@ -0,0 +1,57 @@
1
+ export function getEmojiFlag(locale) {
2
+ const languageToCountry = {
3
+ ar: "sa",
4
+ // Arabic -> Saudi Arabia
5
+ bn: "bd",
6
+ // Bengali -> Bangladesh
7
+ ca: "es",
8
+ // Catalan -> Spain
9
+ ckb: "iq",
10
+ // Central Kurdish -> Iraq
11
+ cs: "cz",
12
+ // Czech -> Czech Republic (note: modern country code is actually 'cz')
13
+ da: "dk",
14
+ // Danish -> Denmark
15
+ el: "gr",
16
+ // Greek -> Greece
17
+ en: "gb",
18
+ // English -> Great Britain
19
+ et: "ee",
20
+ // Estonian -> Estonia
21
+ he: "il",
22
+ // Hebrew -> Israel
23
+ hi: "in",
24
+ // Hindi -> India
25
+ hy: "am",
26
+ // Armenian -> Armenia
27
+ ja: "jp",
28
+ // Japanese -> Japan
29
+ kk: "kz",
30
+ // Kazakh -> Kazakhstan
31
+ km: "kh",
32
+ // Khmer -> Cambodia
33
+ ko: "kr",
34
+ // Korean -> South Korea
35
+ ky: "kg",
36
+ // Kyrgyz -> Kyrgyzstan
37
+ lb: "lu",
38
+ // Luxembourgish -> Luxembourg
39
+ ms: "my",
40
+ // Malay -> Malaysia
41
+ nb: "no",
42
+ // Norwegian Bokmål -> Norway
43
+ sl: "si",
44
+ // Slovenian -> Slovenia
45
+ sv: "se",
46
+ // Swedish -> Sweden
47
+ uk: "ua",
48
+ // Ukrainian -> Ukraine
49
+ ur: "pk",
50
+ // Urdu -> Pakistan
51
+ vi: "vn"
52
+ // Vietnamese -> Vietnam
53
+ };
54
+ const baseLanguage = locale.split("-")[0]?.toLowerCase() || locale;
55
+ const countryCode = languageToCountry[baseLanguage] || locale.replace(/^.*-/, "").slice(0, 2);
56
+ return countryCode.toUpperCase().split("").map((char) => String.fromCodePoint(127397 + char.charCodeAt(0))).join("");
57
+ }
@@ -0,0 +1,3 @@
1
+ import type { VColumn } from '#v/types';
2
+ export declare function genTableExcel(columns: VColumn<any>[], data: any[], filenamePrefix: string): Promise<void>;
3
+ export declare function getVisualWidth(cellValue: string | string[] | undefined): number;
@@ -0,0 +1,63 @@
1
+ import { triggerFileDownload } from "./download/tagA.js";
2
+ export async function genTableExcel(columns, data, filenamePrefix) {
3
+ const ExcelJs = (await import("exceljs")).default;
4
+ const wb = new ExcelJs.Workbook();
5
+ const ws = wb.addWorksheet("Sheet1");
6
+ const titleRow = columns.map((col) => col.header);
7
+ const rows = [titleRow];
8
+ data.forEach((item) => {
9
+ const row = [];
10
+ columns.forEach((col) => {
11
+ if (!col["accessorKey"] && !col.cell && !col.exportCell) {
12
+ throw new Error("Column must have accessorKey or cell or exportCell for excel export");
13
+ }
14
+ if (col.exportCell) {
15
+ row.push(col.exportCell(item));
16
+ } else if (typeof col.cell === "function") {
17
+ try {
18
+ const ctx = {
19
+ row: { original: item },
20
+ getValue: () => col["accessorKey"] ? item[col["accessorKey"]] : void 0,
21
+ column: col
22
+ // 其他字段按需补充
23
+ };
24
+ const v = col.cell(ctx);
25
+ row.push(v == null ? "" : String(v));
26
+ return;
27
+ } catch (e) {
28
+ console.warn("col.cell \u8C03\u7528\u5931\u8D25\uFF0C\u56DE\u9000\u5230 accessorKey", e);
29
+ }
30
+ } else {
31
+ row.push(item[col["accessorKey"]]);
32
+ }
33
+ });
34
+ rows.push(row);
35
+ });
36
+ ws.addRows(rows);
37
+ for (let colIdx = 1; colIdx <= titleRow.length; colIdx++) {
38
+ let cellWidth = 10;
39
+ rows.forEach((_, rowIdx) => {
40
+ cellWidth = Math.max(cellWidth, getVisualWidth(String(ws.getCell(rowIdx + 1, colIdx).value)));
41
+ });
42
+ ws.getColumn(colIdx).width = cellWidth;
43
+ ws.getColumn(colIdx).font = { name: "\u5FAE\u8F6F\u96C5\u9ED1" };
44
+ }
45
+ const buffer = await wb.xlsx.writeBuffer();
46
+ const fileType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
47
+ const blob = new Blob([buffer], { type: fileType });
48
+ triggerFileDownload(blob, `${filenamePrefix}.xlsx`);
49
+ }
50
+ export function getVisualWidth(cellValue) {
51
+ if (!cellValue || Array.isArray(cellValue))
52
+ return 0;
53
+ let width = 0;
54
+ for (let i = 0; i < cellValue.length; i += 1) {
55
+ const charCode = cellValue.charCodeAt(i);
56
+ if (charCode >= 0 && charCode <= 128) {
57
+ width += 1.5;
58
+ } else {
59
+ width += 2.6;
60
+ }
61
+ }
62
+ return Math.round(width);
63
+ }
@@ -0,0 +1,2 @@
1
+ export declare const getColSpanClass: (colSpan?: number) => string;
2
+ export declare const getColSpanClassFromResponsive: (colSpan?: string) => string;
@@ -0,0 +1,142 @@
1
+ const colSpanClassMap = {
2
+ // 基础类名
3
+ "1": "col-span-1",
4
+ "2": "col-span-2",
5
+ "3": "col-span-3",
6
+ "4": "col-span-4",
7
+ "5": "col-span-5",
8
+ "6": "col-span-6",
9
+ "7": "col-span-7",
10
+ "8": "col-span-8",
11
+ "9": "col-span-9",
12
+ "10": "col-span-10",
13
+ "11": "col-span-11",
14
+ "12": "col-span-12",
15
+ "13": "col-span-13",
16
+ "14": "col-span-14",
17
+ "15": "col-span-15",
18
+ "16": "col-span-16",
19
+ "17": "col-span-17",
20
+ "18": "col-span-18",
21
+ "19": "col-span-19",
22
+ "20": "col-span-20",
23
+ "21": "col-span-21",
24
+ "22": "col-span-22",
25
+ "23": "col-span-23",
26
+ "24": "col-span-24",
27
+ // sm 响应式
28
+ "sm:1": "sm:col-span-1",
29
+ "sm:2": "sm:col-span-2",
30
+ "sm:3": "sm:col-span-3",
31
+ "sm:4": "sm:col-span-4",
32
+ "sm:5": "sm:col-span-5",
33
+ "sm:6": "sm:col-span-6",
34
+ "sm:7": "sm:col-span-7",
35
+ "sm:8": "sm:col-span-8",
36
+ "sm:9": "sm:col-span-9",
37
+ "sm:10": "sm:col-span-10",
38
+ "sm:11": "sm:col-span-11",
39
+ "sm:12": "sm:col-span-12",
40
+ "sm:13": "sm:col-span-13",
41
+ "sm:14": "sm:col-span-14",
42
+ "sm:15": "sm:col-span-15",
43
+ "sm:16": "sm:col-span-16",
44
+ "sm:17": "sm:col-span-17",
45
+ "sm:18": "sm:col-span-18",
46
+ "sm:19": "sm:col-span-19",
47
+ "sm:20": "sm:col-span-20",
48
+ "sm:21": "sm:col-span-21",
49
+ "sm:22": "sm:col-span-22",
50
+ "sm:23": "sm:col-span-23",
51
+ "sm:24": "sm:col-span-24",
52
+ // md 响应式
53
+ "md:1": "md:col-span-1",
54
+ "md:2": "md:col-span-2",
55
+ "md:3": "md:col-span-3",
56
+ "md:4": "md:col-span-4",
57
+ "md:5": "md:col-span-5",
58
+ "md:6": "md:col-span-6",
59
+ "md:7": "md:col-span-7",
60
+ "md:8": "md:col-span-8",
61
+ "md:9": "md:col-span-9",
62
+ "md:10": "md:col-span-10",
63
+ "md:11": "md:col-span-11",
64
+ "md:12": "md:col-span-12",
65
+ "md:13": "md:col-span-13",
66
+ "md:14": "md:col-span-14",
67
+ "md:15": "md:col-span-15",
68
+ "md:16": "md:col-span-16",
69
+ "md:17": "md:col-span-17",
70
+ "md:18": "md:col-span-18",
71
+ "md:19": "md:col-span-19",
72
+ "md:20": "md:col-span-20",
73
+ "md:21": "md:col-span-21",
74
+ "md:22": "md:col-span-22",
75
+ "md:23": "md:col-span-23",
76
+ "md:24": "md:col-span-24",
77
+ // lg 响应式
78
+ "lg:1": "lg:col-span-1",
79
+ "lg:2": "lg:col-span-2",
80
+ "lg:3": "lg:col-span-3",
81
+ "lg:4": "lg:col-span-4",
82
+ "lg:5": "lg:col-span-5",
83
+ "lg:6": "lg:col-span-6",
84
+ "lg:7": "lg:col-span-7",
85
+ "lg:8": "lg:col-span-8",
86
+ "lg:9": "lg:col-span-9",
87
+ "lg:10": "lg:col-span-10",
88
+ "lg:11": "lg:col-span-11",
89
+ "lg:12": "lg:col-span-12",
90
+ "lg:13": "lg:col-span-13",
91
+ "lg:14": "lg:col-span-14",
92
+ "lg:15": "lg:col-span-15",
93
+ "lg:16": "lg:col-span-16",
94
+ "lg:17": "lg:col-span-17",
95
+ "lg:18": "lg:col-span-18",
96
+ "lg:19": "lg:col-span-19",
97
+ "lg:20": "lg:col-span-20",
98
+ "lg:21": "lg:col-span-21",
99
+ "lg:22": "lg:col-span-22",
100
+ "lg:23": "lg:col-span-23",
101
+ "lg:24": "lg:col-span-24",
102
+ // xl 响应式
103
+ "xl:1": "xl:col-span-1",
104
+ "xl:2": "xl:col-span-2",
105
+ "xl:3": "xl:col-span-3",
106
+ "xl:4": "xl:col-span-4",
107
+ "xl:5": "xl:col-span-5",
108
+ "xl:6": "xl:col-span-6",
109
+ "xl:7": "xl:col-span-7",
110
+ "xl:8": "xl:col-span-8",
111
+ "xl:9": "xl:col-span-9",
112
+ "xl:10": "xl:col-span-10",
113
+ "xl:11": "xl:col-span-11",
114
+ "xl:12": "xl:col-span-12",
115
+ "xl:13": "xl:col-span-13",
116
+ "xl:14": "xl:col-span-14",
117
+ "xl:15": "xl:col-span-15",
118
+ "xl:16": "xl:col-span-16",
119
+ "xl:17": "xl:col-span-17",
120
+ "xl:18": "xl:col-span-18",
121
+ "xl:19": "xl:col-span-19",
122
+ "xl:20": "xl:col-span-20",
123
+ "xl:21": "xl:col-span-21",
124
+ "xl:22": "xl:col-span-22",
125
+ "xl:23": "xl:col-span-23",
126
+ "xl:24": "xl:col-span-24"
127
+ };
128
+ export const getColSpanClass = (colSpan) => {
129
+ return colSpanClassMap[String(colSpan)] ?? "col-span-6";
130
+ };
131
+ export const getColSpanClassFromResponsive = (colSpan) => {
132
+ if (!colSpan) return "";
133
+ const colSpanClasses = colSpan.split(" ").map((span) => {
134
+ const className = colSpanClassMap[span];
135
+ if (!className) {
136
+ console.warn(`Invalid colSpan format: ${span}`);
137
+ return "";
138
+ }
139
+ return className;
140
+ }).filter(Boolean);
141
+ return colSpanClasses.join(" ");
142
+ };
@@ -0,0 +1,11 @@
1
+ export * from './download/index.js';
2
+ export * from './array.js';
3
+ export * from './diff.js';
4
+ export * from './emoji.js';
5
+ export * from './excel.js';
6
+ export * from './form.js';
7
+ export * from './request.js';
8
+ export * from './string.js';
9
+ export * from './tree.js';
10
+ export * from './type.js';
11
+ export * from './vueuse.js';
@@ -0,0 +1,11 @@
1
+ export * from "./download/index.js";
2
+ export * from "./array.js";
3
+ export * from "./diff.js";
4
+ export * from "./emoji.js";
5
+ export * from "./excel.js";
6
+ export * from "./form.js";
7
+ export * from "./request.js";
8
+ export * from "./string.js";
9
+ export * from "./tree.js";
10
+ export * from "./type.js";
11
+ export * from "./vueuse.js";
@@ -0,0 +1,3 @@
1
+ import type { UseFetchOptions } from '#app';
2
+ import type { ShowType } from '#v/types';
3
+ export declare function showTypeHeader(showType: ShowType): UseFetchOptions<any>;
@@ -0,0 +1,3 @@
1
+ export function showTypeHeader(showType) {
2
+ return { headers: { "Show-Type": showType.toString() } };
3
+ }
@@ -0,0 +1,6 @@
1
+ export declare function cloneJson<T>(obj: T): T;
2
+ export declare function isEmptyString(str: string | null | undefined): boolean;
3
+ export declare function onlyAllowNumberAndDot(value: string): boolean;
4
+ export declare function filterNumberAndDot(value: string | null): string;
5
+ export declare function uuid(): `${string}-${string}-${string}-${string}-${string}`;
6
+ export declare function stringsJoin(arr: (string | undefined | null)[], separator?: string): string;
@@ -0,0 +1,18 @@
1
+ export function cloneJson(obj) {
2
+ return JSON.parse(JSON.stringify(obj));
3
+ }
4
+ export function isEmptyString(str) {
5
+ return str === null || str === void 0 || str.trim() === "";
6
+ }
7
+ export function onlyAllowNumberAndDot(value) {
8
+ return !value || /^[0-9]+(\.[0-9]+)?\.?$/.test(value);
9
+ }
10
+ export function filterNumberAndDot(value) {
11
+ return value.replace(/[^\d.]/g, "");
12
+ }
13
+ export function uuid() {
14
+ return crypto.randomUUID();
15
+ }
16
+ export function stringsJoin(arr, separator = ", ") {
17
+ return arr.filter((item) => !isEmptyString(item)).join(separator);
18
+ }
@@ -0,0 +1,8 @@
1
+ import type { TreeItem } from '@nuxt/ui';
2
+ export declare function treeifyModels<T>(data: T[], rowKey: keyof T, treeifyColName: keyof T, treeifyColValue?: number): (T & {
3
+ children: T[];
4
+ })[];
5
+ export declare function flattenTree<T extends {
6
+ children?: T[];
7
+ }>(tree: T[]): T[];
8
+ export declare function treeifyOptions<T extends Record<string, any>>(data: T[], onSelect: (newVal: number) => void, labelField: string, valueField: string, parentValueField: string, excludedValue?: number, disabledIds?: number[], defaultExpanded?: boolean, visited?: Set<number>): TreeItem[];
@@ -0,0 +1,54 @@
1
+ export function treeifyModels(data, rowKey, treeifyColName, treeifyColValue = 0) {
2
+ return data.filter((row) => row[treeifyColName] === treeifyColValue).map((row) => ({
3
+ ...row,
4
+ children: treeifyModels(data, rowKey, treeifyColName, row[rowKey])
5
+ }));
6
+ }
7
+ export function flattenTree(tree) {
8
+ return tree.reduce((acc, item) => {
9
+ acc.push(item);
10
+ if (item.children) {
11
+ acc.push(...flattenTree(item.children));
12
+ }
13
+ return acc;
14
+ }, []);
15
+ }
16
+ export function treeifyOptions(data, onSelect, labelField, valueField, parentValueField, excludedValue = 0, disabledIds = [], defaultExpanded = true, visited = /* @__PURE__ */ new Set()) {
17
+ const allIds = new Set(data.map((item) => item[valueField]));
18
+ const rootItems = data.filter(
19
+ (item) => (!allIds.has(item[parentValueField]) || item[parentValueField] === excludedValue) && item[valueField] !== excludedValue
20
+ );
21
+ function buildNode(node, visited2) {
22
+ const nodeId = node[valueField];
23
+ if (visited2.has(nodeId)) {
24
+ return {
25
+ defaultExpanded,
26
+ label: node[labelField],
27
+ value: nodeId,
28
+ onSelect: (e) => {
29
+ e.preventDefault();
30
+ onSelect(nodeId);
31
+ },
32
+ disabled: disabledIds.includes(nodeId)
33
+ };
34
+ }
35
+ const newVisited = new Set(visited2);
36
+ newVisited.add(nodeId);
37
+ const children = data.filter((item) => item[parentValueField] === nodeId && item[valueField] !== excludedValue).map((child) => buildNode(child, newVisited));
38
+ const treeItem = {
39
+ defaultExpanded,
40
+ label: node[labelField],
41
+ value: nodeId,
42
+ onSelect: (e) => {
43
+ e.preventDefault();
44
+ onSelect(nodeId);
45
+ },
46
+ disabled: disabledIds.includes(nodeId)
47
+ };
48
+ if (children.length) {
49
+ treeItem.children = children;
50
+ }
51
+ return treeItem;
52
+ }
53
+ return rootItems.map((root) => buildNode(root, visited));
54
+ }
@@ -0,0 +1 @@
1
+ export declare function isObject(value: unknown): value is object;
@@ -0,0 +1,3 @@
1
+ export function isObject(value) {
2
+ return typeof value === "object" && value !== null;
3
+ }
@@ -0,0 +1 @@
1
+ export declare const useCnTimeAgo: (time: string | Date) => import("vue").ComputedRef<string>;
@@ -0,0 +1,20 @@
1
+ import { useTimeAgo } from "@vueuse/core";
2
+ export const useCnTimeAgo = (time) => {
3
+ return useTimeAgo(time, {
4
+ messages: {
5
+ justNow: "\u521A\u521A",
6
+ past: (n) => `${n}\u524D`,
7
+ future: (n) => `${n}\u540E`,
8
+ month: (n) => `${n}\u4E2A\u6708`,
9
+ year: (n) => `${n}\u5E74`,
10
+ day: (n) => `${n}\u5929`,
11
+ week: (n) => `${n}\u5468`,
12
+ hour: (n) => `${n}\u5C0F\u65F6`,
13
+ minute: (n) => `${n}\u5206\u949F`,
14
+ second: (n) => `${n}\u79D2`,
15
+ invalid: "\u65E0\u6548\u65F6\u95F4"
16
+ },
17
+ updateInterval: 1e3
18
+ // 每秒更新一次
19
+ });
20
+ };
@@ -0,0 +1,3 @@
1
+ export { default } from './module.mjs'
2
+
3
+ export { type ModuleOptions } from './module.mjs'
package/package.json ADDED
@@ -0,0 +1,108 @@
1
+ {
2
+ "name": "v-nuxt-ui",
3
+ "version": "0.1.0",
4
+ "description": "Veken UI Component Library - Reusable Nuxt UI components, composables, and utilities for enterprise applications",
5
+ "type": "module",
6
+ "style": "./dist/runtime/index.css",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/types.d.mts",
10
+ "style": "./dist/runtime/index.css",
11
+ "import": "./dist/module.mjs"
12
+ }
13
+ },
14
+ "main": "./dist/module.mjs",
15
+ "files": [
16
+ "dist"
17
+ ],
18
+ "scripts": {
19
+ "prepack": "nuxt-module-build build",
20
+ "dev": "nuxi dev playground",
21
+ "dev:build": "nuxi build playground",
22
+ "dev:prepare": "nuxt-module-build build --stub && nuxi prepare playground",
23
+ "build": "nuxt-module-build build",
24
+ "lint": "eslint .",
25
+ "lint:fix": "eslint . --fix",
26
+ "typecheck": "nuxi typecheck playground"
27
+ },
28
+ "dependencies": {
29
+ "@nuxt/content": "^3.12.0",
30
+ "@nuxt/kit": "^4.3.1",
31
+ "@nuxtjs/mdc": "^0.20.2",
32
+ "@tanstack/table-core": "^8.21.3",
33
+ "@vueuse/core": "^14.2.1",
34
+ "better-sqlite3": "^12.8.0",
35
+ "dayjs": "^1.11.19",
36
+ "defu": "^6.1.4",
37
+ "fflate": "^0.8.2",
38
+ "json5": "^2.2.3",
39
+ "maska": "^3.2.0",
40
+ "monaco-editor": "^0.55.1",
41
+ "ohash": "^2.0.11",
42
+ "reka-ui": "^2.9.2",
43
+ "scule": "^1.3.0",
44
+ "sql-formatter": "^15.7.2",
45
+ "vue-router": "^5.0.4"
46
+ },
47
+ "peerDependencies": {
48
+ "@nuxt/ui": "^4.5.0",
49
+ "@nuxtjs/i18n": "^10.2.3",
50
+ "@vueuse/nuxt": "^14.2.1",
51
+ "nuxt": "^4.3.1",
52
+ "zod": "^4.3.6"
53
+ },
54
+ "peerDependenciesMeta": {
55
+ "zod": {
56
+ "optional": true
57
+ }
58
+ },
59
+ "optionalDependencies": {
60
+ "@vue-flow/core": "^1.42.2",
61
+ "cronstrue": "^3.12.0",
62
+ "echarts": "^6.0.0",
63
+ "exceljs": "^4.4.0",
64
+ "vue-draggable-plus": "^0.6.1",
65
+ "vue-echarts": "^8.0.1"
66
+ },
67
+ "devDependencies": {
68
+ "@iconify-json/lucide": "^1.2.94",
69
+ "@internationalized/date": "^3.12.0",
70
+ "@nuxt/eslint": "^1.15.2",
71
+ "@nuxt/eslint-config": "^1.15.2",
72
+ "@nuxt/fonts": "^0.12.1",
73
+ "@nuxt/module-builder": "^1.0.2",
74
+ "@nuxt/ui": "^4.6.0",
75
+ "@nuxtjs/i18n": "^10.2.4",
76
+ "@types/sortablejs": "^1.15.9",
77
+ "@vueuse/nuxt": "^14.2.1",
78
+ "cronstrue": "^3.12.0",
79
+ "echarts": "^6.0.0",
80
+ "eslint": "^9.39.3",
81
+ "exceljs": "^4.4.0",
82
+ "nuxt": "^4.3.1",
83
+ "shiki": "^3.23.0",
84
+ "sortablejs": "^1.15.7",
85
+ "tailwindcss": "^4.2.2",
86
+ "typescript": "^5.9.3",
87
+ "vue": "^3.5.0",
88
+ "vue-draggable-plus": "^0.6.1",
89
+ "vue-echarts": "^8.0.1",
90
+ "vue-tsc": "^3.2.5",
91
+ "zod": "^4.3.6"
92
+ },
93
+ "packageManager": "pnpm@10.29.2",
94
+ "pnpm": {
95
+ "onlyBuiltDependencies": [
96
+ "@parcel/watcher",
97
+ "esbuild",
98
+ "unrs-resolver",
99
+ "vue-demi"
100
+ ],
101
+ "ignoredBuiltDependencies": [
102
+ "@parcel/watcher",
103
+ "esbuild",
104
+ "unrs-resolver",
105
+ "vue-demi"
106
+ ]
107
+ }
108
+ }