@robot-admin/naive-ui-components 0.40.4 → 0.41.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 (495) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +62 -214
  3. package/README_EN.md +62 -195
  4. package/dist/ActionOverflow.cjs +1 -0
  5. package/dist/ActionOverflow.js +1 -0
  6. package/dist/C_ActionBar.css +63 -53
  7. package/dist/C_ActionBar2.cjs +1 -1
  8. package/dist/C_ActionBar2.js +1 -1
  9. package/dist/C_ApprovalViewer.cjs +1 -0
  10. package/dist/C_ApprovalViewer.css +79 -0
  11. package/dist/C_ApprovalViewer.d.cts +2 -0
  12. package/dist/C_ApprovalViewer.d.ts +2 -0
  13. package/dist/C_ApprovalViewer.js +1 -0
  14. package/dist/C_ApprovalViewer2.cjs +1 -0
  15. package/dist/C_ApprovalViewer2.js +1 -0
  16. package/dist/C_Attachments.cjs +1 -0
  17. package/dist/C_Attachments.css +204 -0
  18. package/dist/C_Attachments.d.cts +2 -0
  19. package/dist/C_Attachments.d.ts +2 -0
  20. package/dist/C_Attachments.js +1 -0
  21. package/dist/C_Attachments2.cjs +1 -0
  22. package/dist/C_Attachments2.js +1 -0
  23. package/dist/C_AudioPlayer.d.cts +1 -1
  24. package/dist/C_AudioPlayer.d.ts +1 -1
  25. package/dist/C_AutoComplete.d.cts +2 -2
  26. package/dist/C_AutoComplete.d.ts +2 -2
  27. package/dist/C_AvatarGroup.d.cts +1 -1
  28. package/dist/C_AvatarGroup.d.ts +1 -1
  29. package/dist/C_Barcode.d.cts +1 -1
  30. package/dist/C_Barcode.d.ts +1 -1
  31. package/dist/C_BatchResult.css +10 -10
  32. package/dist/C_BatchResult.d.cts +1 -1
  33. package/dist/C_BatchResult.d.ts +1 -1
  34. package/dist/C_BatchResult2.cjs +1 -1
  35. package/dist/C_BatchResult2.js +1 -1
  36. package/dist/C_Breadcrumb.d.cts +2 -2
  37. package/dist/C_Breadcrumb.d.ts +1 -1
  38. package/dist/C_Cascade.d.cts +1 -1
  39. package/dist/C_Cascade.d.ts +1 -1
  40. package/dist/C_ChangeReview.cjs +1 -0
  41. package/dist/C_ChangeReview.css +49 -0
  42. package/dist/C_ChangeReview.d.cts +2 -0
  43. package/dist/C_ChangeReview.d.ts +2 -0
  44. package/dist/C_ChangeReview.js +1 -0
  45. package/dist/C_ChangeReview2.cjs +1 -0
  46. package/dist/C_ChangeReview2.js +1 -0
  47. package/dist/C_Chat.css +120 -67
  48. package/dist/C_Chat.d.cts +2 -2
  49. package/dist/C_Chat.d.ts +2 -2
  50. package/dist/C_Chat2.cjs +1 -1
  51. package/dist/C_Chat2.js +1 -1
  52. package/dist/C_City.d.cts +1 -1
  53. package/dist/C_City.d.ts +1 -1
  54. package/dist/C_Code.d.cts +1 -1
  55. package/dist/C_Code.d.ts +1 -1
  56. package/dist/C_ContextMenu.d.cts +1 -1
  57. package/dist/C_ContextMenu.d.ts +1 -1
  58. package/dist/C_DataPicker.cjs +1 -1
  59. package/dist/C_DataPicker.css +125 -50
  60. package/dist/C_DataPicker.d.cts +3 -3
  61. package/dist/C_DataPicker.d.ts +4 -3
  62. package/dist/C_DataPicker.js +1 -1
  63. package/dist/C_DataPicker2.cjs +1 -1
  64. package/dist/C_DataPicker2.js +1 -1
  65. package/dist/C_Date.d.cts +1 -1
  66. package/dist/C_Date.d.ts +1 -1
  67. package/dist/C_Density.d.cts +1 -1
  68. package/dist/C_Density.d.ts +1 -1
  69. package/dist/C_Descriptions.cjs +1 -0
  70. package/dist/C_Descriptions.css +86 -0
  71. package/dist/C_Descriptions.d.cts +2 -0
  72. package/dist/C_Descriptions.d.ts +2 -0
  73. package/dist/C_Descriptions.js +1 -0
  74. package/dist/C_Descriptions2.cjs +1 -0
  75. package/dist/C_Descriptions2.js +1 -0
  76. package/dist/C_Editor.d.cts +1 -1
  77. package/dist/C_Editor.d.ts +1 -1
  78. package/dist/C_Editor2.cjs +1 -1
  79. package/dist/C_Editor2.js +1 -1
  80. package/dist/C_ErrorSummary.d.cts +1 -1
  81. package/dist/C_ErrorSummary.d.ts +1 -1
  82. package/dist/C_FilePreview.cjs +1 -1
  83. package/dist/C_FilePreview.d.cts +2 -1
  84. package/dist/C_FilePreview.d.ts +2 -1
  85. package/dist/C_FilePreview.js +1 -1
  86. package/dist/C_FilePreview2.cjs +1 -1
  87. package/dist/C_FilePreview2.js +1 -1
  88. package/dist/C_FilterBuilder.cjs +1 -0
  89. package/dist/C_FilterBuilder.css +59 -0
  90. package/dist/C_FilterBuilder.d.cts +2 -0
  91. package/dist/C_FilterBuilder.d.ts +2 -0
  92. package/dist/C_FilterBuilder.js +1 -0
  93. package/dist/C_FilterBuilder2.cjs +1 -0
  94. package/dist/C_FilterBuilder2.js +1 -0
  95. package/dist/C_Form.base.css +16 -16
  96. package/dist/C_Form.css +16 -16
  97. package/dist/C_Form.d.cts +1 -1
  98. package/dist/C_Form.d.ts +3 -3
  99. package/dist/C_FormModal.css +64 -54
  100. package/dist/C_FormModal.d.cts +2 -2
  101. package/dist/C_FormModal.d.ts +4 -4
  102. package/dist/C_FormModal2.cjs +1 -1
  103. package/dist/C_FormModal2.js +1 -1
  104. package/dist/C_FormSearch.d.cts +2 -1
  105. package/dist/C_FormSearch.d.ts +3 -2
  106. package/dist/C_GlobalSearch.css +156 -137
  107. package/dist/C_GlobalSearch.d.cts +2 -2
  108. package/dist/C_GlobalSearch.d.ts +2 -2
  109. package/dist/C_GlobalSearch2.cjs +1 -1
  110. package/dist/C_GlobalSearch2.js +1 -1
  111. package/dist/C_Guide.css +49 -3
  112. package/dist/C_Guide.d.cts +1 -1
  113. package/dist/C_Guide.d.ts +1 -1
  114. package/dist/C_Guide2.cjs +1 -1
  115. package/dist/C_Guide2.js +1 -1
  116. package/dist/C_Icon.d.cts +1 -1
  117. package/dist/C_Icon.d.ts +1 -1
  118. package/dist/C_ImageAnnotator.cjs +1 -0
  119. package/dist/C_ImageAnnotator.css +143 -0
  120. package/dist/C_ImageAnnotator.d.cts +2 -0
  121. package/dist/C_ImageAnnotator.d.ts +2 -0
  122. package/dist/C_ImageAnnotator.js +1 -0
  123. package/dist/C_ImageAnnotator2.cjs +1 -0
  124. package/dist/C_ImageAnnotator2.js +1 -0
  125. package/dist/C_ImportWizard.cjs +1 -0
  126. package/dist/C_ImportWizard.css +42 -0
  127. package/dist/C_ImportWizard.d.cts +2 -0
  128. package/dist/C_ImportWizard.d.ts +2 -0
  129. package/dist/C_ImportWizard.js +1 -0
  130. package/dist/C_ImportWizard2.cjs +1 -0
  131. package/dist/C_ImportWizard2.js +1 -0
  132. package/dist/C_Language.d.cts +1 -1
  133. package/dist/C_Language.d.ts +1 -1
  134. package/dist/C_Loading.d.cts +1 -1
  135. package/dist/C_Loading.d.ts +1 -1
  136. package/dist/C_Login.d.cts +1 -1
  137. package/dist/C_Login.d.ts +1 -1
  138. package/dist/C_Markdown.d.cts +1 -1
  139. package/dist/C_Markdown.d.ts +1 -1
  140. package/dist/C_Markdown2.cjs +1 -1
  141. package/dist/C_Markdown2.js +1 -1
  142. package/dist/C_Menu.d.cts +2 -2
  143. package/dist/C_Menu.d.ts +1 -1
  144. package/dist/C_NotificationCenter.cjs +1 -1
  145. package/dist/C_NotificationCenter.css +39 -39
  146. package/dist/C_NotificationCenter.d.cts +2 -1
  147. package/dist/C_NotificationCenter.d.ts +2 -1
  148. package/dist/C_NotificationCenter.js +1 -1
  149. package/dist/C_NotificationCenter2.cjs +1 -1
  150. package/dist/C_NotificationCenter2.js +1 -1
  151. package/dist/C_NotificationInbox.cjs +1 -0
  152. package/dist/C_NotificationInbox.css +154 -0
  153. package/dist/C_NotificationInbox.d.cts +2 -0
  154. package/dist/C_NotificationInbox.d.ts +2 -0
  155. package/dist/C_NotificationInbox.js +1 -0
  156. package/dist/C_NotificationInbox2.cjs +1 -0
  157. package/dist/C_NotificationInbox2.js +1 -0
  158. package/dist/C_OrgChart.d.cts +1 -1
  159. package/dist/C_OrgChart.d.ts +1 -1
  160. package/dist/C_Progress.d.cts +1 -1
  161. package/dist/C_Progress.d.ts +1 -1
  162. package/dist/C_QRCode2.cjs +1 -1
  163. package/dist/C_QRCode2.js +1 -1
  164. package/dist/C_RecordList.cjs +1 -0
  165. package/dist/C_RecordList.css +70 -0
  166. package/dist/C_RecordList.d.cts +2 -0
  167. package/dist/C_RecordList.d.ts +2 -0
  168. package/dist/C_RecordList.js +1 -0
  169. package/dist/C_RecordList2.cjs +1 -0
  170. package/dist/C_RecordList2.js +1 -0
  171. package/dist/C_RecurrenceEditor.cjs +1 -0
  172. package/dist/C_RecurrenceEditor.css +68 -0
  173. package/dist/C_RecurrenceEditor.d.cts +2 -0
  174. package/dist/C_RecurrenceEditor.d.ts +2 -0
  175. package/dist/C_RecurrenceEditor.js +1 -0
  176. package/dist/C_RecurrenceEditor2.cjs +1 -0
  177. package/dist/C_RecurrenceEditor2.js +1 -0
  178. package/dist/C_RelationshipExplorer.cjs +1 -0
  179. package/dist/C_RelationshipExplorer.css +76 -0
  180. package/dist/C_RelationshipExplorer.d.cts +2 -0
  181. package/dist/C_RelationshipExplorer.d.ts +2 -0
  182. package/dist/C_RelationshipExplorer.js +1 -0
  183. package/dist/C_RelationshipExplorer2.cjs +1 -0
  184. package/dist/C_RelationshipExplorer2.js +1 -0
  185. package/dist/C_ResourceSchedule.cjs +1 -0
  186. package/dist/C_ResourceSchedule.css +104 -0
  187. package/dist/C_ResourceSchedule.d.cts +2 -0
  188. package/dist/C_ResourceSchedule.d.ts +2 -0
  189. package/dist/C_ResourceSchedule.js +1 -0
  190. package/dist/C_ResourceSchedule2.cjs +1 -0
  191. package/dist/C_ResourceSchedule2.js +1 -0
  192. package/dist/C_ScanInput.cjs +1 -0
  193. package/dist/C_ScanInput.css +33 -0
  194. package/dist/C_ScanInput.d.cts +2 -0
  195. package/dist/C_ScanInput.d.ts +2 -0
  196. package/dist/C_ScanInput.js +1 -0
  197. package/dist/C_ScanInput2.cjs +1 -0
  198. package/dist/C_ScanInput2.js +1 -0
  199. package/dist/C_SectionNav.d.cts +1 -1
  200. package/dist/C_SectionNav.d.ts +1 -1
  201. package/dist/C_Select.d.cts +2 -2
  202. package/dist/C_Select.d.ts +2 -2
  203. package/dist/C_Skeleton.d.cts +1 -1
  204. package/dist/C_Skeleton.d.ts +1 -1
  205. package/dist/C_Steps.d.cts +1 -1
  206. package/dist/C_Steps.d.ts +1 -1
  207. package/dist/C_Table.base.css +194 -184
  208. package/dist/C_Table.css +178 -168
  209. package/dist/C_Table.d.cts +2 -2
  210. package/dist/C_Table.d.ts +15 -14
  211. package/dist/C_Table2.cjs +3 -3
  212. package/dist/C_Table2.js +3 -3
  213. package/dist/C_TagsView.d.cts +2 -2
  214. package/dist/C_TagsView.d.ts +1 -1
  215. package/dist/C_TaskBoard.cjs +1 -0
  216. package/dist/C_TaskBoard.css +58 -0
  217. package/dist/C_TaskBoard.d.cts +2 -0
  218. package/dist/C_TaskBoard.d.ts +2 -0
  219. package/dist/C_TaskBoard.js +1 -0
  220. package/dist/C_TaskBoard2.cjs +1 -0
  221. package/dist/C_TaskBoard2.js +1 -0
  222. package/dist/C_TaskPanel.cjs +1 -0
  223. package/dist/C_TaskPanel.css +68 -0
  224. package/dist/C_TaskPanel.d.cts +2 -0
  225. package/dist/C_TaskPanel.d.ts +2 -0
  226. package/dist/C_TaskPanel.js +1 -0
  227. package/dist/C_TaskPanel2.cjs +1 -0
  228. package/dist/C_TaskPanel2.js +1 -0
  229. package/dist/C_Theme.d.cts +1 -1
  230. package/dist/C_Theme.d.ts +1 -1
  231. package/dist/C_Timeline.d.cts +1 -1
  232. package/dist/C_Timeline.d.ts +1 -1
  233. package/dist/C_Timeline2.cjs +1 -1
  234. package/dist/C_Timeline2.js +1 -1
  235. package/dist/C_Transfer.css +108 -41
  236. package/dist/C_Transfer.d.cts +2 -2
  237. package/dist/C_Transfer.d.ts +2 -2
  238. package/dist/C_Transfer2.cjs +1 -1
  239. package/dist/C_Transfer2.js +1 -1
  240. package/dist/C_Tree.d.cts +1 -1
  241. package/dist/C_Tree.d.ts +13 -12
  242. package/dist/C_Upload.cjs +1 -1
  243. package/dist/C_Upload.d.cts +2 -1
  244. package/dist/C_Upload.d.ts +2 -1
  245. package/dist/C_Upload.js +1 -1
  246. package/dist/C_Upload2.cjs +1 -1
  247. package/dist/C_Upload2.js +1 -1
  248. package/dist/C_UserPicker.d.cts +1 -1
  249. package/dist/C_UserPicker.d.ts +2 -2
  250. package/dist/C_WorkFlow.d.ts +2 -2
  251. package/dist/ExportMenu.cjs +1 -0
  252. package/dist/ExportMenu.js +1 -0
  253. package/dist/NotificationItem.cjs +1 -0
  254. package/dist/NotificationItem.js +1 -0
  255. package/dist/component-config.d.ts +33 -10
  256. package/dist/config.d.cts +1 -1
  257. package/dist/config.d.ts +1 -1
  258. package/dist/constants.cjs +1 -0
  259. package/dist/constants.d.cts +2 -2
  260. package/dist/constants.d.ts +2 -2
  261. package/dist/constants.js +1 -0
  262. package/dist/constants2.d.cts +2 -2
  263. package/dist/constants2.d.ts +2 -2
  264. package/dist/constants3.d.cts +6 -232
  265. package/dist/constants3.d.ts +6 -232
  266. package/dist/constants4.d.cts +9 -199
  267. package/dist/constants4.d.ts +9 -199
  268. package/dist/constants5.d.cts +2 -2
  269. package/dist/constants5.d.ts +2 -2
  270. package/dist/context.d.cts +33 -10
  271. package/dist/data2.d.cts +8 -8
  272. package/dist/data2.d.ts +8 -8
  273. package/dist/dateRange.d.cts +4 -263
  274. package/dist/dateRange.d.ts +4 -263
  275. package/dist/editors.d.cts +11 -11
  276. package/dist/editors.d.ts +11 -11
  277. package/dist/excel.cjs +1 -0
  278. package/dist/excel.js +1 -0
  279. package/dist/fieldRenderers.cjs +1 -1
  280. package/dist/fieldRenderers.js +1 -1
  281. package/dist/fileUrl.cjs +1 -0
  282. package/dist/fileUrl.js +1 -0
  283. package/dist/html2.cjs +1 -0
  284. package/dist/html2.js +1 -0
  285. package/dist/index.cjs +1 -1
  286. package/dist/index.d.cts +88 -69
  287. package/dist/index.d.ts +87 -68
  288. package/dist/index.js +1 -1
  289. package/dist/index.vue.d.cts +54 -75
  290. package/dist/index.vue.d.ts +54 -75
  291. package/dist/index10.vue.d.cts +25 -27
  292. package/dist/index10.vue.d.ts +54 -41
  293. package/dist/index11.vue.d.cts +54 -41
  294. package/dist/index11.vue.d.ts +133 -75
  295. package/dist/index12.vue.d.cts +133 -75
  296. package/dist/index12.vue.d.ts +24 -6
  297. package/dist/index13.vue.d.cts +24 -6
  298. package/dist/index13.vue.d.ts +39 -57
  299. package/dist/index14.vue.d.cts +39 -57
  300. package/dist/index14.vue.d.ts +80 -16
  301. package/dist/index15.vue.d.cts +80 -16
  302. package/dist/index15.vue.d.ts +16 -56
  303. package/dist/index16.vue.d.cts +16 -56
  304. package/dist/index16.vue.d.ts +40 -118
  305. package/dist/index17.vue.d.cts +40 -118
  306. package/dist/index17.vue.d.ts +58 -52
  307. package/dist/index18.vue.d.cts +58 -52
  308. package/dist/index18.vue.d.ts +16 -20
  309. package/dist/index19.vue.d.cts +16 -20
  310. package/dist/index19.vue.d.ts +67 -14
  311. package/dist/index2.vue.d.cts +55 -17
  312. package/dist/index2.vue.d.ts +55 -17
  313. package/dist/index20.vue.d.cts +67 -14
  314. package/dist/index20.vue.d.ts +127 -123
  315. package/dist/index21.vue.d.cts +127 -123
  316. package/dist/index21.vue.d.ts +51 -76
  317. package/dist/index22.vue.d.cts +51 -76
  318. package/dist/index22.vue.d.ts +31 -71
  319. package/dist/index23.vue.d.cts +31 -129
  320. package/dist/index23.vue.d.ts +62 -118
  321. package/dist/index24.vue.d.cts +75 -50
  322. package/dist/index24.vue.d.ts +20 -49
  323. package/dist/index25.vue.d.cts +18 -18
  324. package/dist/index25.vue.d.ts +14 -22
  325. package/dist/index26.vue.d.cts +16 -26
  326. package/dist/index26.vue.d.ts +129 -24
  327. package/dist/index27.vue.d.cts +113 -81
  328. package/dist/index27.vue.d.ts +78 -96
  329. package/dist/index28.vue.d.cts +76 -29
  330. package/dist/index28.vue.d.ts +73 -31
  331. package/dist/index29.vue.d.cts +65 -13
  332. package/dist/index29.vue.d.ts +65 -13
  333. package/dist/index3.vue.d.cts +67 -70
  334. package/dist/index3.vue.d.ts +67 -70
  335. package/dist/index30.vue.d.cts +130 -81
  336. package/dist/index30.vue.d.ts +130 -81
  337. package/dist/index31.vue.d.cts +41 -94
  338. package/dist/index31.vue.d.ts +41 -94
  339. package/dist/index32.vue.d.cts +44 -61
  340. package/dist/index32.vue.d.ts +44 -61
  341. package/dist/index33.vue.d.cts +58 -0
  342. package/dist/index33.vue.d.ts +58 -0
  343. package/dist/index34.vue.d.cts +62 -0
  344. package/dist/index34.vue.d.ts +62 -0
  345. package/dist/index35.vue.d.cts +42 -0
  346. package/dist/index35.vue.d.ts +42 -0
  347. package/dist/index36.vue.d.cts +28 -0
  348. package/dist/index36.vue.d.ts +28 -0
  349. package/dist/index37.vue.d.cts +30 -0
  350. package/dist/index37.vue.d.ts +30 -0
  351. package/dist/index38.vue.d.cts +103 -0
  352. package/dist/index38.vue.d.ts +103 -0
  353. package/dist/index39.vue.d.cts +38 -0
  354. package/dist/index39.vue.d.ts +38 -0
  355. package/dist/index4.vue.d.cts +27 -36
  356. package/dist/index4.vue.d.ts +27 -36
  357. package/dist/index40.vue.d.cts +19 -0
  358. package/dist/index40.vue.d.ts +19 -0
  359. package/dist/index41.vue.d.cts +89 -0
  360. package/dist/index41.vue.d.ts +89 -0
  361. package/dist/index42.vue.d.cts +110 -0
  362. package/dist/index42.vue.d.ts +110 -0
  363. package/dist/index43.vue.d.cts +89 -0
  364. package/dist/index43.vue.d.ts +89 -0
  365. package/dist/index44.vue.d.cts +71 -0
  366. package/dist/index44.vue.d.ts +71 -0
  367. package/dist/index45.vue.d.cts +50 -0
  368. package/dist/index45.vue.d.ts +50 -0
  369. package/dist/index5.vue.d.cts +78 -17
  370. package/dist/index5.vue.d.ts +78 -17
  371. package/dist/index6.vue.d.cts +34 -132
  372. package/dist/index6.vue.d.ts +31 -34
  373. package/dist/index7.vue.d.cts +20 -34
  374. package/dist/index7.vue.d.ts +20 -28
  375. package/dist/index8.vue.d.cts +130 -29
  376. package/dist/index8.vue.d.ts +33 -118
  377. package/dist/index9.vue.d.cts +33 -118
  378. package/dist/index9.vue.d.ts +25 -27
  379. package/dist/localSource.cjs +1 -0
  380. package/dist/{formField.d.cts → localSource.d.cts} +42 -2
  381. package/dist/{formField.d.ts → localSource.d.ts} +42 -2
  382. package/dist/localSource.js +1 -0
  383. package/dist/mapUtils.d.cts +5 -5
  384. package/dist/mapUtils.d.ts +5 -5
  385. package/dist/model.d.cts +88 -0
  386. package/dist/model.d.ts +88 -0
  387. package/dist/presets.d.cts +2 -2
  388. package/dist/presets.d.ts +2 -2
  389. package/dist/previewLimits.cjs +1 -0
  390. package/dist/previewLimits.js +1 -0
  391. package/dist/resolver.cjs +1 -1
  392. package/dist/resolver.d.cts +1 -1
  393. package/dist/resolver.d.ts +1 -1
  394. package/dist/resolver.js +1 -1
  395. package/dist/rule.d.cts +51 -0
  396. package/dist/rule.d.ts +51 -0
  397. package/dist/source.cjs +1 -1
  398. package/dist/source.d.cts +2 -2
  399. package/dist/source.d.ts +2 -2
  400. package/dist/source.js +1 -1
  401. package/dist/style.css +1974 -542
  402. package/dist/types.d.cts +4 -0
  403. package/dist/types.d.ts +4 -0
  404. package/dist/types10.d.cts +229 -0
  405. package/dist/types10.d.ts +285 -0
  406. package/dist/types11.d.cts +285 -0
  407. package/dist/types2.d.cts +188 -31
  408. package/dist/types2.d.ts +188 -31
  409. package/dist/types3.d.cts +84 -101
  410. package/dist/types3.d.ts +82 -105
  411. package/dist/types4.d.cts +24 -106
  412. package/dist/types4.d.ts +30 -55
  413. package/dist/types5.d.cts +106 -55
  414. package/dist/types5.d.ts +130 -41
  415. package/dist/types6.d.cts +130 -41
  416. package/dist/types6.d.ts +244 -265
  417. package/dist/types7.d.cts +244 -265
  418. package/dist/types7.d.ts +60 -0
  419. package/dist/types8.d.cts +60 -0
  420. package/dist/types8.d.ts +50 -0
  421. package/dist/types9.d.cts +50 -0
  422. package/dist/types9.d.ts +229 -0
  423. package/dist/useCalendarEvents.d.cts +2 -2
  424. package/dist/useCalendarEvents.d.ts +2 -2
  425. package/dist/useCollapsePanel.d.cts +7 -7
  426. package/dist/useCollapsePanel.d.ts +7 -7
  427. package/dist/useComponentTheme.cjs +1 -1
  428. package/dist/useComponentTheme.js +1 -1
  429. package/dist/useCropperCore.d.cts +8 -8
  430. package/dist/useCropperCore.d.ts +8 -8
  431. package/dist/useDynamicFormState.d.cts +5 -4
  432. package/dist/useDynamicFormState.d.ts +5 -4
  433. package/dist/useEdgeInteraction.d.cts +2 -2
  434. package/dist/useEdgeInteraction.d.ts +2 -2
  435. package/dist/useFormArray.cjs +1 -1
  436. package/dist/useFormArray.d.cts +39 -3
  437. package/dist/useFormArray.d.ts +39 -3
  438. package/dist/useFormArray.js +1 -1
  439. package/dist/useFormRenderer.d.cts +6 -2
  440. package/dist/useFormRenderer.d.ts +6 -2
  441. package/dist/useFullscreen.d.cts +7 -99
  442. package/dist/useFullscreen.d.ts +7 -99
  443. package/dist/useGlobalSearch.d.cts +45 -3
  444. package/dist/useGlobalSearch.d.ts +45 -3
  445. package/dist/useInfiniteScroll.d.cts +2 -2
  446. package/dist/useInfiniteScroll.d.ts +2 -2
  447. package/dist/useLocalFileUrl.cjs +1 -0
  448. package/dist/useLocalFileUrl.js +1 -0
  449. package/dist/useQRCode.d.cts +3 -3
  450. package/dist/useQRCode.d.ts +3 -3
  451. package/dist/useSignatureHistory.d.cts +6 -6
  452. package/dist/useSignatureHistory.d.ts +6 -6
  453. package/dist/useSplitResize.d.cts +10 -10
  454. package/dist/useSplitResize.d.ts +10 -10
  455. package/dist/useWorkflowValidation.d.cts +108 -108
  456. package/dist/useWorkflowValidation.d.ts +108 -108
  457. package/dist/verification.d.cts +2 -2
  458. package/dist/verification.d.ts +2 -2
  459. package/dist/workflows.cjs +1 -1
  460. package/dist/workflows.d.cts +2 -2
  461. package/dist/workflows.d.ts +2 -2
  462. package/dist/workflows.js +1 -1
  463. package/docs/components.en.md +125 -135
  464. package/docs/components.md +125 -135
  465. package/docs/engineering.en.md +12 -4
  466. package/docs/engineering.md +12 -4
  467. package/docs/guides/api-migration.md +17 -1
  468. package/docs/guides/approval-viewer.md +50 -0
  469. package/docs/guides/attachments.md +39 -0
  470. package/docs/guides/batch-results.md +3 -1
  471. package/docs/guides/change-review.md +49 -0
  472. package/docs/guides/component-contracts.md +8 -0
  473. package/docs/guides/data-picker.md +75 -1
  474. package/docs/guides/data-workflows.md +27 -1
  475. package/docs/guides/dockable-workbench.md +49 -0
  476. package/docs/guides/filter-builder.md +47 -0
  477. package/docs/guides/global-search.md +49 -0
  478. package/docs/guides/image-annotator.md +27 -0
  479. package/docs/guides/import-wizard.md +40 -0
  480. package/docs/guides/notification-center.md +29 -0
  481. package/docs/guides/resource-schedule.md +58 -0
  482. package/docs/guides/scene-components.md +53 -0
  483. package/docs/guides/search-workflows.md +2 -0
  484. package/docs/guides/split-pane.md +2 -0
  485. package/docs/guides/table-density.md +47 -1
  486. package/docs/guides/task-board.md +53 -0
  487. package/docs/guides/task-panel.md +30 -0
  488. package/docs/guides/transfer.md +35 -0
  489. package/docs/guides/usage.en.md +23 -17
  490. package/docs/guides/usage.md +10 -24
  491. package/package.json +1 -1
  492. package/dist/formField.cjs +0 -1
  493. package/dist/formField.js +0 -1
  494. package/dist/html.cjs +0 -1
  495. package/dist/html.js +0 -1
@@ -0,0 +1 @@
1
+ require(`./chunk.cjs`);const e=require(`./density.cjs`),t=require(`./export-helper.cjs`),n=require(`./useComponentDensity.cjs`),r=require(`./useScopedComponentLocale.cjs`),i=require(`./fileUrl.cjs`),a=require(`./useLocalFileUrl.cjs`);let o=require(`vue`),s=require(`naive-ui`);const c=Object.freeze({"imageAnnotator.title":`图片标注`,"imageAnnotator.add":`添加标注`,"imageAnnotator.items":`标注列表`,"imageAnnotator.item":`标注 {number}`,"imageAnnotator.empty":`暂无标注`,"imageAnnotator.editor":`编辑标注`,"imageAnnotator.x":`左边距(%)`,"imageAnnotator.y":`上边距(%)`,"imageAnnotator.width":`宽度(%)`,"imageAnnotator.height":`高度(%)`,"imageAnnotator.note":`标注说明`,"imageAnnotator.save":`保存标注`,"imageAnnotator.remove":`删除标注`,"imageAnnotator.loadFailed":`图片加载失败`,"imageAnnotator.loading":`正在加载图片…`,"imageAnnotator.unavailable":`暂无可用的图片预览`,"imageAnnotator.invalidBox":`调整坐标和尺寸,使标注完整位于图片内`,"imageAnnotator.stale":`该标注已更新,请重新打开后编辑`}),l=Object.freeze({"imageAnnotator.title":`Image annotations`,"imageAnnotator.add":`Add annotation`,"imageAnnotator.items":`Annotation list`,"imageAnnotator.item":`Annotation {number}`,"imageAnnotator.empty":`No annotations`,"imageAnnotator.editor":`Edit annotation`,"imageAnnotator.x":`Left (%)`,"imageAnnotator.y":`Top (%)`,"imageAnnotator.width":`Width (%)`,"imageAnnotator.height":`Height (%)`,"imageAnnotator.note":`Annotation note`,"imageAnnotator.save":`Save annotation`,"imageAnnotator.remove":`Delete annotation`,"imageAnnotator.loadFailed":`Could not load image`,"imageAnnotator.loading":`Loading image…`,"imageAnnotator.unavailable":`Image preview unavailable`,"imageAnnotator.invalidBox":`Adjust the coordinates and size to fit the annotation within the image`,"imageAnnotator.stale":`This annotation changed. Open it again before editing.`}),u=e=>r.t(c,l,e),d=.001;function f(e){let t=e.currentTarget.getBoundingClientRect();if(t.width<=0||t.height<=0)return;let n=e=>Math.min(1,Math.max(0,e));return{x:n((e.clientX-t.left)/t.width),y:n((e.clientY-t.top)/t.height)}}function p(e,t){return{x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),width:Math.abs(e.x-t.x),height:Math.abs(e.y-t.y)}}function m(e){let{x:t,y:n,width:r,height:i}=e,a=1+2**-52;return t>=0&&n>=0&&r>=d&&i>=d&&t+r<=a&&n+i<=a}function h(e){return{x:e.x*100,y:e.y*100,width:e.width*100,height:e.height*100}}function g(e){return{x:(e.x??NaN)/100,y:(e.y??NaN)/100,width:(e.width??NaN)/100,height:(e.height??NaN)/100}}function _(e,t){let{x:n,y:r,width:i,height:a}=e.box;return e.note===t.note&&n===t.box.x&&r===t.box.y&&i===t.box.width&&a===t.box.height}const v=[`aria-label`],y={class:`c-image-annotator__header`},b={class:`c-image-annotator__content`},x={class:`c-image-annotator__preview`},S=[`src`,`alt`],C=[`aria-label`,`onClick`],w={key:1,class:`c-image-annotator__placeholder`,role:`status`},T={key:2,class:`c-image-annotator__placeholder`,role:`status`},ee={class:`c-image-annotator__panel`},te=[`aria-label`],E=[`aria-current`,`onClick`],D={key:1,class:`c-image-annotator__placeholder`},ne=[`aria-label`],O={class:`c-image-annotator__coordinates`},k=[`for`],re=[`for`],ie={key:0,class:`c-image-annotator__error`,role:`alert`},ae={class:`c-image-annotator__actions`},oe={key:3,class:`c-image-annotator__note`},A=(0,o.defineComponent)({name:`C_ImageAnnotator`,__name:`index`,props:(0,o.mergeModels)({src:{},alt:{},readonly:{type:Boolean},title:{},locale:{},density:{}},{modelValue:{default:()=>[]},modelModifiers:{}}),emits:[`update:modelValue`],setup(t){let r=t,c=(0,o.useModel)(t,`modelValue`),{t:l}=u(()=>r.locale),d=n.t(()=>r.density),A=(0,o.computed)(()=>e.t(d.value).size),j=(0,o.computed)(()=>r.title??l(`imageAnnotator.title`)),M=(0,o.useId)(),N=[`x`,`y`,`width`,`height`],P=(0,o.ref)(!1),F=(0,o.ref)(!1),I=(0,o.ref)(!1),L=(0,o.ref)(null),R=(0,o.ref)(null),z=(0,o.ref)(``),B=(0,o.ref)(null),V=0,H=a.t(()=>typeof r.src==`string`?void 0:r.src),U=(0,o.computed)(()=>{if(P.value)return typeof r.src==`string`?i.t(r.src,window.location.href)??void 0:H.value}),W=(0,o.computed)(()=>F.value&&!I.value&&!r.readonly),G=(0,o.computed)(()=>c.value.filter(e=>m(e.box))),K=(0,o.computed)(()=>G.value.find(e=>e.id===R.value)),q=(0,o.computed)(()=>{if(B.value)return p(B.value.start,B.value.end);let e=L.value?g(L.value.coordinates):void 0;return e&&m(e)?e:void 0}),J=()=>{P.value=!0};(0,o.onMounted)(J),(0,o.onActivated)(J),(0,o.onDeactivated)(()=>{P.value=!1}),(0,o.watch)(U,()=>{F.value=!1,I.value=!1,R.value=null,L.value=null,B.value=null}),(0,o.watch)(()=>r.readonly,()=>{L.value=null,B.value=null});function Y(e,t){return e.note||l(`imageAnnotator.item`,{number:t+1})}function se(){F.value=!1,I.value=!0}function X(e){return{left:`${e.x*100}%`,top:`${e.y*100}%`,width:`${e.width*100}%`,height:`${e.height*100}%`}}function Z(e,t){if(R.value=e?.id??null,!W.value)return;let n=t??e?.box??{x:.1,y:.1,width:.25,height:.25};L.value={original:e?{...e,box:{...e.box}}:void 0,coordinates:h(n),note:e?.note??``},z.value=``}function ce(e){if(!W.value||e.button!==0||B.value)return;let t=f(e);t&&(B.value={id:e.pointerId,start:t,end:t},e.currentTarget.setPointerCapture?.(e.pointerId))}function le(e){if(B.value?.id!==e.pointerId)return;let t=f(e);t&&(B.value.end=t)}function ue(e){let t=B.value;if(t?.id!==e.pointerId)return;B.value=null;let n=p(t.start,f(e)??t.end);m(n)&&Z(void 0,n)}function Q(e){B.value?.id===e.pointerId&&(B.value=null)}function $(e){let t=c.value.findIndex(t=>t.id===e.id),n=c.value[t];return n&&_(e,n)?t:(z.value=`imageAnnotator.stale`,-1)}function de(){if(!W.value||!L.value)return;let{original:e,coordinates:t,note:n}=L.value,r=g(t);if(!m(r)){z.value=`imageAnnotator.invalidBox`;return}let i=[...c.value];if(e){let t=$(e);if(t<0)return;i[t]={id:e.id,box:r,note:n},R.value=e.id}else{let e=fe();i.push({id:e,box:r,note:n}),R.value=e}c.value=i,L.value=null}function fe(){let e;do e=`${M}-annotation-${++V}`;while(c.value.some(t=>t.id===e));return e}function pe(){let e=L.value?.original;if(!W.value||!e)return;let t=$(e);t<0||(c.value=c.value.filter((e,n)=>n!==t),L.value=null,R.value=null)}return(e,n)=>((0,o.openBlock)(),(0,o.createElementBlock)(`section`,{class:`c-image-annotator`,"aria-label":j.value},[(0,o.createElementVNode)(`header`,y,[(0,o.createElementVNode)(`strong`,null,(0,o.toDisplayString)(j.value),1),t.readonly?(0,o.createCommentVNode)(`v-if`,!0):((0,o.openBlock)(),(0,o.createBlock)((0,o.unref)(s.NButton),{key:0,"attr-type":`button`,secondary:``,type:`primary`,size:A.value,disabled:!W.value,onClick:n[0]||=e=>Z()},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)((0,o.unref)(l)(`imageAnnotator.add`)),1)]),_:1},8,[`size`,`disabled`]))]),(0,o.createElementVNode)(`div`,b,[(0,o.createElementVNode)(`div`,x,[U.value&&!I.value?((0,o.openBlock)(),(0,o.createElementBlock)(`div`,{key:0,class:(0,o.normalizeClass)([`c-image-annotator__canvas`,{"is-drawable":W.value}]),onPointerdown:ce,onPointermove:le,onPointerup:ue,onPointercancel:Q,onLostpointercapture:Q},[((0,o.openBlock)(),(0,o.createElementBlock)(`img`,{key:U.value,src:U.value,alt:t.alt,draggable:`false`,onLoad:n[1]||=e=>F.value=!0,onError:se},null,40,S)),F.value?((0,o.openBlock)(),(0,o.createElementBlock)(o.Fragment,{key:0},[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(G.value,(e,t)=>((0,o.openBlock)(),(0,o.createElementBlock)(`button`,{key:e.id,type:`button`,tabindex:`-1`,class:(0,o.normalizeClass)([`c-image-annotator__box`,{"is-active":R.value===e.id}]),style:(0,o.normalizeStyle)(X(e.box)),"aria-label":Y(e,t),onPointerdown:n[2]||=(0,o.withModifiers)(()=>{},[`stop`]),onClick:t=>Z(e)},null,46,C))),128)),q.value?((0,o.openBlock)(),(0,o.createElementBlock)(`div`,{key:0,class:`c-image-annotator__box is-preview`,style:(0,o.normalizeStyle)(X(q.value)),"aria-hidden":`true`},null,4)):(0,o.createCommentVNode)(`v-if`,!0)],64)):(0,o.createCommentVNode)(`v-if`,!0)],34)):(0,o.createCommentVNode)(`v-if`,!0),U.value&&!F.value&&!I.value?((0,o.openBlock)(),(0,o.createElementBlock)(`p`,w,(0,o.toDisplayString)((0,o.unref)(l)(`imageAnnotator.loading`)),1)):(0,o.createCommentVNode)(`v-if`,!0),P.value&&(!U.value||I.value)?((0,o.openBlock)(),(0,o.createElementBlock)(`div`,T,[(0,o.createTextVNode)((0,o.toDisplayString)((0,o.unref)(l)(I.value?`imageAnnotator.loadFailed`:`imageAnnotator.unavailable`))+` `,1),I.value?((0,o.openBlock)(),(0,o.createBlock)((0,o.unref)(s.NButton),{key:0,"attr-type":`button`,size:A.value,onClick:n[3]||=e=>I.value=!1},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)((0,o.unref)(l)(`common.retry`)),1)]),_:1},8,[`size`])):(0,o.createCommentVNode)(`v-if`,!0)])):(0,o.createCommentVNode)(`v-if`,!0)]),(0,o.createElementVNode)(`aside`,ee,[G.value.length?((0,o.openBlock)(),(0,o.createElementBlock)(`ul`,{key:0,class:`c-image-annotator__list`,"aria-label":(0,o.unref)(l)(`imageAnnotator.items`)},[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(G.value,(e,t)=>((0,o.openBlock)(),(0,o.createElementBlock)(`li`,{key:e.id},[(0,o.createElementVNode)(`button`,{type:`button`,"aria-current":R.value===e.id?`true`:void 0,onClick:t=>Z(e)},(0,o.toDisplayString)(Y(e,t)),9,E)]))),128))],8,te)):((0,o.openBlock)(),(0,o.createElementBlock)(`span`,D,(0,o.toDisplayString)((0,o.unref)(l)(`imageAnnotator.empty`)),1)),L.value&&W.value?((0,o.openBlock)(),(0,o.createElementBlock)(`div`,{key:2,class:`c-image-annotator__editor`,role:`group`,"aria-label":(0,o.unref)(l)(`imageAnnotator.editor`)},[(0,o.createElementVNode)(`div`,O,[((0,o.openBlock)(),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(N,e=>(0,o.createElementVNode)(`div`,{key:e},[(0,o.createElementVNode)(`label`,{for:`${(0,o.unref)(M)}-${e}`},(0,o.toDisplayString)((0,o.unref)(l)(`imageAnnotator.${e}`)),9,k),(0,o.createVNode)((0,o.unref)(s.NInputNumber),{value:L.value.coordinates[e],"onUpdate:value":t=>L.value.coordinates[e]=t,"input-props":{id:`${(0,o.unref)(M)}-${e}`},size:A.value,min:0,max:100,step:.1,"show-button":!1},null,8,[`value`,`onUpdate:value`,`input-props`,`size`])])),64))]),(0,o.createElementVNode)(`label`,{for:`${(0,o.unref)(M)}-note`},(0,o.toDisplayString)((0,o.unref)(l)(`imageAnnotator.note`)),9,re),(0,o.createVNode)((0,o.unref)(s.NInput),{value:L.value.note,"onUpdate:value":n[4]||=e=>L.value.note=e,type:`textarea`,rows:2,size:A.value,"input-props":{id:`${(0,o.unref)(M)}-note`}},null,8,[`value`,`size`,`input-props`]),z.value?((0,o.openBlock)(),(0,o.createElementBlock)(`p`,ie,(0,o.toDisplayString)((0,o.unref)(l)(z.value)),1)):(0,o.createCommentVNode)(`v-if`,!0),(0,o.createElementVNode)(`div`,ae,[(0,o.createVNode)((0,o.unref)(s.NButton),{"attr-type":`button`,size:A.value,onClick:n[5]||=e=>L.value=null},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)((0,o.unref)(l)(`common.cancel`)),1)]),_:1},8,[`size`]),L.value.original?((0,o.openBlock)(),(0,o.createBlock)((0,o.unref)(s.NButton),{key:0,"attr-type":`button`,size:A.value,tertiary:``,type:`error`,onClick:pe},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)((0,o.unref)(l)(`imageAnnotator.remove`)),1)]),_:1},8,[`size`])):(0,o.createCommentVNode)(`v-if`,!0),(0,o.createVNode)((0,o.unref)(s.NButton),{"attr-type":`button`,type:`primary`,size:A.value,onClick:de},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)((0,o.unref)(l)(`imageAnnotator.save`)),1)]),_:1},8,[`size`])])],8,ne)):K.value?.note?((0,o.openBlock)(),(0,o.createElementBlock)(`p`,oe,(0,o.toDisplayString)(K.value.note),1)):(0,o.createCommentVNode)(`v-if`,!0)])])],8,v))}});var j=t.t(A,[[`__scopeId`,`data-v-9d54c609`]]);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return j}});
@@ -0,0 +1 @@
1
+ import{t as e}from"./density.js";import{t}from"./export-helper.js";import{t as n}from"./useComponentDensity.js";import{t as r}from"./useScopedComponentLocale.js";import{t as i}from"./fileUrl.js";import{t as a}from"./useLocalFileUrl.js";import{Fragment as o,computed as s,createBlock as c,createCommentVNode as l,createElementBlock as u,createElementVNode as d,createTextVNode as f,createVNode as p,defineComponent as m,mergeModels as h,normalizeClass as g,normalizeStyle as _,onActivated as ee,onDeactivated as te,onMounted as ne,openBlock as v,ref as y,renderList as b,toDisplayString as x,unref as S,useId as re,useModel as ie,watch as C,withCtx as w,withModifiers as ae}from"vue";import{NButton as T,NInput as oe,NInputNumber as se}from"naive-ui";const E=Object.freeze({"imageAnnotator.title":`图片标注`,"imageAnnotator.add":`添加标注`,"imageAnnotator.items":`标注列表`,"imageAnnotator.item":`标注 {number}`,"imageAnnotator.empty":`暂无标注`,"imageAnnotator.editor":`编辑标注`,"imageAnnotator.x":`左边距(%)`,"imageAnnotator.y":`上边距(%)`,"imageAnnotator.width":`宽度(%)`,"imageAnnotator.height":`高度(%)`,"imageAnnotator.note":`标注说明`,"imageAnnotator.save":`保存标注`,"imageAnnotator.remove":`删除标注`,"imageAnnotator.loadFailed":`图片加载失败`,"imageAnnotator.loading":`正在加载图片…`,"imageAnnotator.unavailable":`暂无可用的图片预览`,"imageAnnotator.invalidBox":`调整坐标和尺寸,使标注完整位于图片内`,"imageAnnotator.stale":`该标注已更新,请重新打开后编辑`}),D=Object.freeze({"imageAnnotator.title":`Image annotations`,"imageAnnotator.add":`Add annotation`,"imageAnnotator.items":`Annotation list`,"imageAnnotator.item":`Annotation {number}`,"imageAnnotator.empty":`No annotations`,"imageAnnotator.editor":`Edit annotation`,"imageAnnotator.x":`Left (%)`,"imageAnnotator.y":`Top (%)`,"imageAnnotator.width":`Width (%)`,"imageAnnotator.height":`Height (%)`,"imageAnnotator.note":`Annotation note`,"imageAnnotator.save":`Save annotation`,"imageAnnotator.remove":`Delete annotation`,"imageAnnotator.loadFailed":`Could not load image`,"imageAnnotator.loading":`Loading image…`,"imageAnnotator.unavailable":`Image preview unavailable`,"imageAnnotator.invalidBox":`Adjust the coordinates and size to fit the annotation within the image`,"imageAnnotator.stale":`This annotation changed. Open it again before editing.`}),ce=e=>r(E,D,e),O=.001;function k(e){let t=e.currentTarget.getBoundingClientRect();if(t.width<=0||t.height<=0)return;let n=e=>Math.min(1,Math.max(0,e));return{x:n((e.clientX-t.left)/t.width),y:n((e.clientY-t.top)/t.height)}}function A(e,t){return{x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),width:Math.abs(e.x-t.x),height:Math.abs(e.y-t.y)}}function j(e){let{x:t,y:n,width:r,height:i}=e,a=1+2**-52;return t>=0&&n>=0&&r>=O&&i>=O&&t+r<=a&&n+i<=a}function le(e){return{x:e.x*100,y:e.y*100,width:e.width*100,height:e.height*100}}function M(e){return{x:(e.x??NaN)/100,y:(e.y??NaN)/100,width:(e.width??NaN)/100,height:(e.height??NaN)/100}}function ue(e,t){let{x:n,y:r,width:i,height:a}=e.box;return e.note===t.note&&n===t.box.x&&r===t.box.y&&i===t.box.width&&a===t.box.height}const de=[`aria-label`],fe={class:`c-image-annotator__header`},pe={class:`c-image-annotator__content`},me={class:`c-image-annotator__preview`},he=[`src`,`alt`],ge=[`aria-label`,`onClick`],_e={key:1,class:`c-image-annotator__placeholder`,role:`status`},ve={key:2,class:`c-image-annotator__placeholder`,role:`status`},ye={class:`c-image-annotator__panel`},be=[`aria-label`],N=[`aria-current`,`onClick`],xe={key:1,class:`c-image-annotator__placeholder`},Se=[`aria-label`],Ce={class:`c-image-annotator__coordinates`},we=[`for`],Te=[`for`],Ee={key:0,class:`c-image-annotator__error`,role:`alert`},De={class:`c-image-annotator__actions`},Oe={key:3,class:`c-image-annotator__note`};var P=t(m({name:`C_ImageAnnotator`,__name:`index`,props:h({src:{},alt:{},readonly:{type:Boolean},title:{},locale:{},density:{}},{modelValue:{default:()=>[]},modelModifiers:{}}),emits:[`update:modelValue`],setup(t){let r=t,m=ie(t,`modelValue`),{t:h}=ce(()=>r.locale),E=n(()=>r.density),D=s(()=>e(E.value).size),O=s(()=>r.title??h(`imageAnnotator.title`)),P=re(),ke=[`x`,`y`,`width`,`height`],F=y(!1),I=y(!1),L=y(!1),R=y(null),z=y(null),B=y(``),V=y(null),Ae=0,je=a(()=>typeof r.src==`string`?void 0:r.src),H=s(()=>{if(F.value)return typeof r.src==`string`?i(r.src,window.location.href)??void 0:je.value}),U=s(()=>I.value&&!L.value&&!r.readonly),W=s(()=>m.value.filter(e=>j(e.box))),G=s(()=>W.value.find(e=>e.id===z.value)),K=s(()=>{if(V.value)return A(V.value.start,V.value.end);let e=R.value?M(R.value.coordinates):void 0;return e&&j(e)?e:void 0}),q=()=>{F.value=!0};ne(q),ee(q),te(()=>{F.value=!1}),C(H,()=>{I.value=!1,L.value=!1,z.value=null,R.value=null,V.value=null}),C(()=>r.readonly,()=>{R.value=null,V.value=null});function J(e,t){return e.note||h(`imageAnnotator.item`,{number:t+1})}function Me(){I.value=!1,L.value=!0}function Y(e){return{left:`${e.x*100}%`,top:`${e.y*100}%`,width:`${e.width*100}%`,height:`${e.height*100}%`}}function X(e,t){if(z.value=e?.id??null,!U.value)return;let n=t??e?.box??{x:.1,y:.1,width:.25,height:.25};R.value={original:e?{...e,box:{...e.box}}:void 0,coordinates:le(n),note:e?.note??``},B.value=``}function Z(e){if(!U.value||e.button!==0||V.value)return;let t=k(e);t&&(V.value={id:e.pointerId,start:t,end:t},e.currentTarget.setPointerCapture?.(e.pointerId))}function Ne(e){if(V.value?.id!==e.pointerId)return;let t=k(e);t&&(V.value.end=t)}function Pe(e){let t=V.value;if(t?.id!==e.pointerId)return;V.value=null;let n=A(t.start,k(e)??t.end);j(n)&&X(void 0,n)}function Q(e){V.value?.id===e.pointerId&&(V.value=null)}function $(e){let t=m.value.findIndex(t=>t.id===e.id),n=m.value[t];return n&&ue(e,n)?t:(B.value=`imageAnnotator.stale`,-1)}function Fe(){if(!U.value||!R.value)return;let{original:e,coordinates:t,note:n}=R.value,r=M(t);if(!j(r)){B.value=`imageAnnotator.invalidBox`;return}let i=[...m.value];if(e){let t=$(e);if(t<0)return;i[t]={id:e.id,box:r,note:n},z.value=e.id}else{let e=Ie();i.push({id:e,box:r,note:n}),z.value=e}m.value=i,R.value=null}function Ie(){let e;do e=`${P}-annotation-${++Ae}`;while(m.value.some(t=>t.id===e));return e}function Le(){let e=R.value?.original;if(!U.value||!e)return;let t=$(e);t<0||(m.value=m.value.filter((e,n)=>n!==t),R.value=null,z.value=null)}return(e,n)=>(v(),u(`section`,{class:`c-image-annotator`,"aria-label":O.value},[d(`header`,fe,[d(`strong`,null,x(O.value),1),t.readonly?l(`v-if`,!0):(v(),c(S(T),{key:0,"attr-type":`button`,secondary:``,type:`primary`,size:D.value,disabled:!U.value,onClick:n[0]||=e=>X()},{default:w(()=>[f(x(S(h)(`imageAnnotator.add`)),1)]),_:1},8,[`size`,`disabled`]))]),d(`div`,pe,[d(`div`,me,[H.value&&!L.value?(v(),u(`div`,{key:0,class:g([`c-image-annotator__canvas`,{"is-drawable":U.value}]),onPointerdown:Z,onPointermove:Ne,onPointerup:Pe,onPointercancel:Q,onLostpointercapture:Q},[(v(),u(`img`,{key:H.value,src:H.value,alt:t.alt,draggable:`false`,onLoad:n[1]||=e=>I.value=!0,onError:Me},null,40,he)),I.value?(v(),u(o,{key:0},[(v(!0),u(o,null,b(W.value,(e,t)=>(v(),u(`button`,{key:e.id,type:`button`,tabindex:`-1`,class:g([`c-image-annotator__box`,{"is-active":z.value===e.id}]),style:_(Y(e.box)),"aria-label":J(e,t),onPointerdown:n[2]||=ae(()=>{},[`stop`]),onClick:t=>X(e)},null,46,ge))),128)),K.value?(v(),u(`div`,{key:0,class:`c-image-annotator__box is-preview`,style:_(Y(K.value)),"aria-hidden":`true`},null,4)):l(`v-if`,!0)],64)):l(`v-if`,!0)],34)):l(`v-if`,!0),H.value&&!I.value&&!L.value?(v(),u(`p`,_e,x(S(h)(`imageAnnotator.loading`)),1)):l(`v-if`,!0),F.value&&(!H.value||L.value)?(v(),u(`div`,ve,[f(x(S(h)(L.value?`imageAnnotator.loadFailed`:`imageAnnotator.unavailable`))+` `,1),L.value?(v(),c(S(T),{key:0,"attr-type":`button`,size:D.value,onClick:n[3]||=e=>L.value=!1},{default:w(()=>[f(x(S(h)(`common.retry`)),1)]),_:1},8,[`size`])):l(`v-if`,!0)])):l(`v-if`,!0)]),d(`aside`,ye,[W.value.length?(v(),u(`ul`,{key:0,class:`c-image-annotator__list`,"aria-label":S(h)(`imageAnnotator.items`)},[(v(!0),u(o,null,b(W.value,(e,t)=>(v(),u(`li`,{key:e.id},[d(`button`,{type:`button`,"aria-current":z.value===e.id?`true`:void 0,onClick:t=>X(e)},x(J(e,t)),9,N)]))),128))],8,be)):(v(),u(`span`,xe,x(S(h)(`imageAnnotator.empty`)),1)),R.value&&U.value?(v(),u(`div`,{key:2,class:`c-image-annotator__editor`,role:`group`,"aria-label":S(h)(`imageAnnotator.editor`)},[d(`div`,Ce,[(v(),u(o,null,b(ke,e=>d(`div`,{key:e},[d(`label`,{for:`${S(P)}-${e}`},x(S(h)(`imageAnnotator.${e}`)),9,we),p(S(se),{value:R.value.coordinates[e],"onUpdate:value":t=>R.value.coordinates[e]=t,"input-props":{id:`${S(P)}-${e}`},size:D.value,min:0,max:100,step:.1,"show-button":!1},null,8,[`value`,`onUpdate:value`,`input-props`,`size`])])),64))]),d(`label`,{for:`${S(P)}-note`},x(S(h)(`imageAnnotator.note`)),9,Te),p(S(oe),{value:R.value.note,"onUpdate:value":n[4]||=e=>R.value.note=e,type:`textarea`,rows:2,size:D.value,"input-props":{id:`${S(P)}-note`}},null,8,[`value`,`size`,`input-props`]),B.value?(v(),u(`p`,Ee,x(S(h)(B.value)),1)):l(`v-if`,!0),d(`div`,De,[p(S(T),{"attr-type":`button`,size:D.value,onClick:n[5]||=e=>R.value=null},{default:w(()=>[f(x(S(h)(`common.cancel`)),1)]),_:1},8,[`size`]),R.value.original?(v(),c(S(T),{key:0,"attr-type":`button`,size:D.value,tertiary:``,type:`error`,onClick:Le},{default:w(()=>[f(x(S(h)(`imageAnnotator.remove`)),1)]),_:1},8,[`size`])):l(`v-if`,!0),p(S(T),{"attr-type":`button`,type:`primary`,size:D.value,onClick:Fe},{default:w(()=>[f(x(S(h)(`imageAnnotator.save`)),1)]),_:1},8,[`size`])])],8,Se)):G.value?.note?(v(),u(`p`,Oe,x(G.value.note),1)):l(`v-if`,!0)])])],8,de))}}),[[`__scopeId`,`data-v-9d54c609`]]);export{P as t};
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./C_ImportWizard2.cjs`);exports.C_ImportWizard=e.t;
@@ -0,0 +1,42 @@
1
+ @import "./C_BatchResult.css";
2
+ .c-import-wizard[data-v-8d28d4bb] {
3
+ color: var(--c-import-color, var(--c-text-2, var(--c-theme-text-2)));
4
+ display: grid;
5
+ gap: var(--c-import-gap);
6
+ }
7
+ .c-import-wizard__title[data-v-8d28d4bb], .c-import-wizard__summary[data-v-8d28d4bb] {
8
+ margin: 0;
9
+ }
10
+ .c-import-wizard__actions[data-v-8d28d4bb] {
11
+ display: flex;
12
+ align-items: center;
13
+ flex-wrap: wrap;
14
+ gap: var(--c-import-gap);
15
+ }
16
+ .c-import-wizard__actions > input[data-v-8d28d4bb] {
17
+ max-inline-size: 100%;
18
+ }
19
+ .c-import-wizard__mapping[data-v-8d28d4bb] {
20
+ display: grid;
21
+ align-items: center;
22
+ grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
23
+ gap: var(--c-import-gap);
24
+ overflow-wrap: anywhere;
25
+ }
26
+ .c-import-wizard__issues[data-v-8d28d4bb] {
27
+ display: grid;
28
+ gap: var(--c-import-gap);
29
+ margin: 0;
30
+ padding: 0;
31
+ list-style: none;
32
+ }
33
+ .c-import-wizard__issues > li[data-v-8d28d4bb] {
34
+ display: flex;
35
+ flex-wrap: wrap;
36
+ align-items: center;
37
+ column-gap: var(--c-import-gap);
38
+ overflow-wrap: anywhere;
39
+ }
40
+
41
+ /* layer: default */
42
+ .px[data-v-8d28d4bb]{padding-left:1rem;padding-right:1rem;}
@@ -0,0 +1,2 @@
1
+ import { a as ImportWizardDraft, c as ImportWizardPhase, d as ImportWizardSheet, i as ImportWizardColumn, l as ImportWizardPreview, n as ImportColumnMapping, o as ImportWizardField, r as ImportWizardAdapter, s as ImportWizardIssue, t as _default, u as ImportWizardProps } from "./index24.vue.cjs";
2
+ export { _default as C_ImportWizard, type ImportColumnMapping, type ImportWizardAdapter, type ImportWizardColumn, type ImportWizardDraft, type ImportWizardField, type ImportWizardIssue, type ImportWizardPhase, type ImportWizardPreview, type ImportWizardProps, type ImportWizardSheet };
@@ -0,0 +1,2 @@
1
+ import { a as ImportWizardDraft, c as ImportWizardPhase, d as ImportWizardSheet, i as ImportWizardColumn, l as ImportWizardPreview, n as ImportColumnMapping, o as ImportWizardField, r as ImportWizardAdapter, s as ImportWizardIssue, t as _default, u as ImportWizardProps } from "./index23.vue.js";
2
+ export { _default as C_ImportWizard, type ImportColumnMapping, type ImportWizardAdapter, type ImportWizardColumn, type ImportWizardDraft, type ImportWizardField, type ImportWizardIssue, type ImportWizardPhase, type ImportWizardPreview, type ImportWizardProps, type ImportWizardSheet };
@@ -0,0 +1 @@
1
+ import{t as e}from"./C_ImportWizard2.js";export{e as C_ImportWizard};
@@ -0,0 +1 @@
1
+ require(`./chunk.cjs`);const e=require(`./density.cjs`),t=require(`./useComponentTheme.cjs`),n=require(`./export-helper.cjs`),r=require(`./useComponentDensity.cjs`),i=require(`./useScopedComponentLocale.cjs`);let a=require(`vue`),o=require(`naive-ui`);function s(e,t){let n=new Set(t.columns.map(e=>e.key)),r=new Map;for(let{key:e,label:n}of t.columns){let t=n.trim();t&&r.set(t,r.has(t)?null:e)}let i=new Set(e.filter(e=>n.has(e.key)).map(e=>e.key)),a=[];for(let t of e){if(n.has(t.key)){a.push({field:t.key,column:t.key});continue}let e=r.get(t.label.trim());!e||i.has(e)||(i.add(e),a.push({field:t.key,column:e}))}return a}function c(e){return e.length>0&&new Set(e.map(e=>e.key)).size===e.length&&e.every(e=>e.key&&e.columns.every(e=>e.key)&&new Set(e.columns.map(e=>e.key)).size===e.columns.length)}function l(e,t,n){let r=(0,a.shallowRef)(),i=(0,a.shallowRef)(),o=(0,a.shallowRef)([]),l=(0,a.shallowRef)(),u=(0,a.shallowRef)(),d=(0,a.shallowRef)(),f=(0,a.shallowRef)(),p=(0,a.computed)(()=>d.value?.phase),m=(0,a.computed)(()=>r.value?.sheets.find(e=>e.key===i.value)),h=(0,a.computed)(()=>{let t=new Map;for(let n of e.fields)n.key&&!t.has(n.key)&&t.set(n.key,n);return[...t.values()]}),g=(0,a.computed)(()=>new Map(o.value.map(e=>[e.field,e.column]))),_=(0,a.computed)(()=>!m.value||!o.value.length||e.disabled||d.value?!1:h.value.every(e=>!e.required||g.value.has(e.key))),v=(0,a.computed)(()=>{let t=l.value;return!!(!e.disabled&&!d.value&&t?.rowCount&&f.value!==`commit`&&u.value===void 0&&!t.issues?.some(e=>e.level===`error`))}),y=()=>{let e=d.value;d.value=void 0,e?.controller.abort()},b=()=>{y(),l.value=void 0,f.value=void 0},x=()=>{b(),r.value=void 0,i.value=void 0,o.value=[],u.value=void 0};(0,a.watch)(()=>e.scope,x,{flush:`sync`}),(0,a.watch)(()=>JSON.stringify(h.value.map(({key:e,required:t})=>[e,!!t])),()=>{p.value!==`commit`&&u.value===void 0&&f.value!==`commit`&&x()},{flush:`sync`}),(0,a.onBeforeUnmount)(y);let S=async(e,t,r)=>{let i={phase:e,controller:new AbortController};d.value=i,f.value=void 0;try{let e=await t(i.controller.signal);d.value===i&&r(e)}catch(t){if(d.value!==i)return;f.value=e,n(e,t)}finally{d.value===i&&(d.value=void 0)}},C=e=>{let t=r.value?.sheets.find(t=>t.key===e);t&&(i.value=t.key,o.value=s(h.value,t))};return{session:r,sheetKey:i,sheet:m,fields:h,selected:g,review:l,results:u,phase:p,failedPhase:f,canPreview:_,canCommit:v,loadFile:async t=>{if(e.disabled||p.value===`commit`)return;x();let{adapter:n}=e;await S(`read`,e=>n.read(t,e),e=>{if(!c(e))throw TypeError(`Invalid import workbook`);r.value={file:t,sheets:e,adapter:n},C(e[0].key)})},chooseMapping:(t,n)=>{if(e.disabled||d.value||l.value||!h.value.some(e=>e.key===t))return;let r=o.value.filter(e=>e.field!==t);if(n===null){o.value=r;return}m.value?.columns.find(e=>e.key===n)&&!r.some(e=>e.column===n)&&(o.value=[...r,{field:t,column:n}])},preview:async()=>{let e=r.value;if(!e||!i.value||!_.value||l.value)return;let t={file:e.file,sheetKey:i.value,mapping:o.value.map(e=>({...e}))};await S(`preview`,n=>e.adapter.preview(t,n),e=>{if(!Number.isSafeInteger(e.rowCount)||e.rowCount<0)throw TypeError(`Invalid import preview row count`);l.value=e})},commit:async()=>{let e=r.value,n=l.value;!e||!n||!v.value||await S(`commit`,t=>e.adapter.commit(n.plan,t),e=>{if(!Array.isArray(e))throw TypeError(`Invalid import result`);u.value=[...e],t(u.value)})},cancel:()=>{!e.disabled&&p.value!==`commit`&&x()},editMapping:()=>{e.disabled||p.value===`commit`||f.value===`commit`||u.value||b()},selectSheet:t=>{!e.disabled&&!d.value&&!l.value&&t!==i.value&&C(t)}}}const u={"importWizard.title":`数据导入`,"importWizard.file":`选择文件`,"importWizard.sheet":`工作表`,"importWizard.column":`选择来源列`,"importWizard.mapping":`映射字段`,"importWizard.required":`(必填)`,"importWizard.preview":`运行预检`,"importWizard.review":`预检结果`,"importWizard.rowCount":`待导入 {count} 行`,"importWizard.row":`第 {row} 行`,"importWizard.warning":`提醒`,"importWizard.error":`错误`,"importWizard.back":`返回映射`,"importWizard.confirm":`确认导入`,"importWizard.cancel":`取消导入`,"importWizard.cancelPreview":`取消预检`,"importWizard.restart":`开始新导入`,"importWizard.pending.read":`正在读取文件`,"importWizard.pending.preview":`正在预检数据`,"importWizard.pending.commit":`正在提交导入`,"importWizard.failure.read":`文件读取失败,请检查文件后重新选择`,"importWizard.failure.preview":`预检失败,请检查数据后重试`,"importWizard.failure.commit":`提交结果未确认,请核对业务数据后再试`},d={"importWizard.title":`Import data`,"importWizard.file":`Choose a file`,"importWizard.sheet":`Sheet`,"importWizard.column":`Choose source column`,"importWizard.mapping":`Map columns`,"importWizard.required":`(required)`,"importWizard.preview":`Validate data`,"importWizard.review":`Validation results`,"importWizard.rowCount":`{count} rows to import`,"importWizard.row":`Row {row}`,"importWizard.warning":`Warning`,"importWizard.error":`Error`,"importWizard.back":`Back to mapping`,"importWizard.confirm":`Confirm import`,"importWizard.cancel":`Cancel import`,"importWizard.cancelPreview":`Cancel validation`,"importWizard.restart":`Start a new import`,"importWizard.pending.read":`Reading file`,"importWizard.pending.preview":`Validating data`,"importWizard.pending.commit":`Submitting import`,"importWizard.failure.read":`Unable to read the file. Check it and choose again.`,"importWizard.failure.preview":`Validation failed. Check the data and try again.`,"importWizard.failure.commit":`Import outcome is unknown. Check the records before trying again.`},f=[`aria-label`,`aria-busy`],p={class:`c-import-wizard__title`},m={class:`c-import-wizard__actions`},h=[`for`],g=[`id`,`accept`,`disabled`],_={key:0},v={key:0,role:`status`},y={class:`c-import-wizard__title`},b={class:`c-import-wizard__summary`},x={key:0,class:`c-import-wizard__issues`},S={key:0},C={key:1},w={class:`c-import-wizard__actions`},T={class:`c-import-wizard__title`},E={class:`c-import-wizard__mapping`},D={key:0},ee={class:`c-import-wizard__actions`},O=(0,a.defineComponent)({name:`C_ImportWizard`,__name:`index`,props:{fields:{},adapter:{},scope:{},accept:{},title:{},disabled:{type:Boolean},density:{},locale:{}},emits:[`completed`,`failure`],setup(n,{emit:s}){let c=n,O=s,k=(0,a.defineAsyncComponent)(()=>Promise.resolve().then(()=>require(`./C_BatchResult2.cjs`)).then(e=>e.n)),A=(0,a.useId)(),{t:te}=i.t(u,d,()=>c.locale),j=(e,t)=>te(`importWizard.${e}`,t),ne=r.t(()=>c.density),M=(0,a.computed)(()=>e.t(ne.value)),N=(0,a.computed)(()=>M.value.size),P=t.n(),re=(0,a.computed)(()=>({...P.value,"--c-import-gap":`${M.value.gap}px`})),{session:F,sheetKey:ie,sheet:I,fields:ae,selected:L,review:R,results:z,phase:B,failedPhase:V,canPreview:H,canCommit:U,loadFile:W,chooseMapping:G,preview:K,commit:q,cancel:J,editMapping:Y,selectSheet:oe}=l(c,e=>O(`completed`,e),(e,t)=>O(`failure`,e,t)),se=(0,a.computed)(()=>F.value?.sheets.map(({key:e,label:t})=>({value:e,label:t}))??[]),X=(0,a.computed)(()=>new Map([...L.value].map(([e,t])=>[t,e]))),ce=e=>I.value?.columns.map(({key:t,label:n})=>({value:t,label:n,disabled:X.value.has(t)&&X.value.get(t)!==e}))??[],Z=(0,a.computed)(()=>R.value?.issues??[]),Q=(0,a.ref)(1),$=(0,a.computed)(()=>Z.value.slice((Q.value-1)*16,Q.value*16));(0,a.watch)(R,()=>{Q.value=1});let le=(0,a.computed)(()=>z.value?.map(e=>({...e,retryable:!1}))??[]),ue=e=>{let t=e.target;if(!(t instanceof HTMLInputElement))return;let n=t.files?.[0];t.value=``,n&&W(n)};return(e,t)=>((0,a.openBlock)(),(0,a.createElementBlock)(`section`,{class:`c-import-wizard`,style:(0,a.normalizeStyle)(re.value),"aria-label":n.title??j(`title`),"aria-busy":!!(0,a.unref)(B)},[(0,a.createElementVNode)(`h3`,p,(0,a.toDisplayString)(n.title??j(`title`)),1),(0,a.createElementVNode)(`div`,m,[(0,a.createElementVNode)(`label`,{for:(0,a.unref)(A)},(0,a.toDisplayString)(j(`file`)),9,h),(0,a.createElementVNode)(`input`,{id:(0,a.unref)(A),type:`file`,accept:n.accept??`.csv,.xls,.xlsx`,disabled:n.disabled||(0,a.unref)(B)===`commit`,onChange:ue},null,40,g),(0,a.unref)(F)?((0,a.openBlock)(),(0,a.createElementBlock)(`span`,_,(0,a.toDisplayString)((0,a.unref)(F).file.name),1)):(0,a.createCommentVNode)(`v-if`,!0)]),(0,a.unref)(B)?((0,a.openBlock)(),(0,a.createElementBlock)(`div`,v,(0,a.toDisplayString)(j(`pending.${(0,a.unref)(B)}`)),1)):(0,a.createCommentVNode)(`v-if`,!0),(0,a.unref)(V)?((0,a.openBlock)(),(0,a.createBlock)((0,a.unref)(o.NAlert),{key:1,type:`error`,role:`alert`},{default:(0,a.withCtx)(()=>[(0,a.createTextVNode)((0,a.toDisplayString)(j(`failure.${(0,a.unref)(V)}`)),1)]),_:1})):(0,a.createCommentVNode)(`v-if`,!0),(0,a.unref)(z)?(0,a.renderSlot)(e.$slots,`results`,{results:(0,a.unref)(z)},()=>[(0,a.createVNode)((0,a.unref)(k),{results:le.value,locale:n.locale,"show-retry":!1},null,8,[`results`,`locale`])],!0,2):(0,a.unref)(R)?((0,a.openBlock)(),(0,a.createElementBlock)(a.Fragment,{key:3},[(0,a.createElementVNode)(`h4`,y,(0,a.toDisplayString)(j(`review`)),1),(0,a.createElementVNode)(`p`,b,(0,a.toDisplayString)(j(`rowCount`,{count:(0,a.unref)(R).rowCount})),1),$.value.length?((0,a.openBlock)(),(0,a.createElementBlock)(`ul`,x,[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)($.value,(e,t)=>((0,a.openBlock)(),(0,a.createElementBlock)(`li`,{key:t},[(0,a.createVNode)((0,a.unref)(o.NTag),{type:e.level===`error`?`error`:`warning`,size:N.value},{default:(0,a.withCtx)(()=>[(0,a.createTextVNode)((0,a.toDisplayString)(j(e.level)),1)]),_:2},1032,[`type`,`size`]),e.row==null?(0,a.createCommentVNode)(`v-if`,!0):((0,a.openBlock)(),(0,a.createElementBlock)(`span`,S,(0,a.toDisplayString)(j(`row`,{row:e.row})),1)),e.field?((0,a.openBlock)(),(0,a.createElementBlock)(`span`,C,(0,a.toDisplayString)(e.field),1)):(0,a.createCommentVNode)(`v-if`,!0),(0,a.createElementVNode)(`span`,null,(0,a.toDisplayString)(e.message),1)]))),128))])):(0,a.createCommentVNode)(`v-if`,!0),Z.value.length>16?((0,a.openBlock)(),(0,a.createBlock)((0,a.unref)(o.NPagination),{key:1,page:Q.value,"onUpdate:page":t[0]||=e=>Q.value=e,"page-size":16,"item-count":Z.value.length,"page-slot":5,size:N.value},null,8,[`page`,`item-count`,`size`])):(0,a.createCommentVNode)(`v-if`,!0),(0,a.createElementVNode)(`div`,w,[(0,a.createVNode)((0,a.unref)(o.NButton),{"attr-type":`button`,size:N.value,disabled:n.disabled||(0,a.unref)(B)===`commit`||(0,a.unref)(V)===`commit`,onClick:(0,a.unref)(Y)},{default:(0,a.withCtx)(()=>[(0,a.createTextVNode)((0,a.toDisplayString)(j(`back`)),1)]),_:1},8,[`size`,`disabled`,`onClick`]),(0,a.createVNode)((0,a.unref)(o.NButton),{"attr-type":`button`,type:`primary`,size:N.value,loading:(0,a.unref)(B)===`commit`,disabled:!(0,a.unref)(U),onClick:(0,a.unref)(q)},{default:(0,a.withCtx)(()=>[(0,a.createTextVNode)((0,a.toDisplayString)(j(`confirm`)),1)]),_:1},8,[`size`,`loading`,`disabled`,`onClick`])])],64)):(0,a.unref)(I)?((0,a.openBlock)(),(0,a.createElementBlock)(a.Fragment,{key:4},[(0,a.createElementVNode)(`h4`,T,(0,a.toDisplayString)(j(`mapping`)),1),(0,a.createElementVNode)(`div`,E,[(0,a.createElementVNode)(`span`,null,(0,a.toDisplayString)(j(`sheet`)),1),(0,a.createVNode)((0,a.unref)(o.NSelect),{role:`group`,"aria-label":j(`sheet`),options:se.value,value:(0,a.unref)(ie),size:N.value,disabled:n.disabled||!!(0,a.unref)(B),"onUpdate:value":(0,a.unref)(oe)},null,8,[`aria-label`,`options`,`value`,`size`,`disabled`,`onUpdate:value`]),((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)((0,a.unref)(ae),e=>((0,a.openBlock)(),(0,a.createElementBlock)(a.Fragment,{key:e.key},[(0,a.createElementVNode)(`span`,null,[(0,a.createTextVNode)((0,a.toDisplayString)(e.label),1),e.required?((0,a.openBlock)(),(0,a.createElementBlock)(`span`,D,(0,a.toDisplayString)(j(`required`)),1)):(0,a.createCommentVNode)(`v-if`,!0)]),(0,a.createVNode)((0,a.unref)(o.NSelect),{role:`group`,"aria-label":e.label,options:ce(e.key),value:(0,a.unref)(L).get(e.key)??null,size:N.value,disabled:n.disabled||!!(0,a.unref)(B),placeholder:j(`column`),clearable:``,"onUpdate:value":t=>(0,a.unref)(G)(e.key,t)},null,8,[`aria-label`,`options`,`value`,`size`,`disabled`,`placeholder`,`onUpdate:value`])],64))),128))]),(0,a.createElementVNode)(`div`,ee,[(0,a.unref)(B)===`preview`?((0,a.openBlock)(),(0,a.createBlock)((0,a.unref)(o.NButton),{key:0,"attr-type":`button`,size:N.value,onClick:(0,a.unref)(Y)},{default:(0,a.withCtx)(()=>[(0,a.createTextVNode)((0,a.toDisplayString)(j(`cancelPreview`)),1)]),_:1},8,[`size`,`onClick`])):(0,a.createCommentVNode)(`v-if`,!0),(0,a.createVNode)((0,a.unref)(o.NButton),{"attr-type":`button`,type:`primary`,size:N.value,loading:(0,a.unref)(B)===`preview`,disabled:!(0,a.unref)(H),onClick:(0,a.unref)(K)},{default:(0,a.withCtx)(()=>[(0,a.createTextVNode)((0,a.toDisplayString)(j(`preview`)),1)]),_:1},8,[`size`,`loading`,`disabled`,`onClick`])])],64)):(0,a.createCommentVNode)(`v-if`,!0),(0,a.unref)(F)||(0,a.unref)(B)===`read`?((0,a.openBlock)(),(0,a.createBlock)((0,a.unref)(o.NButton),{key:5,"attr-type":`button`,text:``,size:N.value,disabled:n.disabled||(0,a.unref)(B)===`commit`,onClick:(0,a.unref)(J)},{default:(0,a.withCtx)(()=>[(0,a.createTextVNode)((0,a.toDisplayString)(j((0,a.unref)(z)||(0,a.unref)(V)===`commit`?`restart`:`cancel`)),1)]),_:1},8,[`size`,`disabled`,`onClick`])):(0,a.createCommentVNode)(`v-if`,!0)],12,f))}});var k=n.t(O,[[`__scopeId`,`data-v-8d28d4bb`]]);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return k}});
@@ -0,0 +1 @@
1
+ import{t as e}from"./density.js";import{n as t}from"./useComponentTheme.js";import{t as n}from"./export-helper.js";import{t as r}from"./useComponentDensity.js";import{t as i}from"./useScopedComponentLocale.js";import{Fragment as a,computed as o,createBlock as s,createCommentVNode as c,createElementBlock as l,createElementVNode as u,createTextVNode as d,createVNode as f,defineAsyncComponent as p,defineComponent as m,normalizeStyle as h,onBeforeUnmount as g,openBlock as _,ref as v,renderList as y,renderSlot as b,shallowRef as x,toDisplayString as S,unref as C,useId as ee,watch as w,withCtx as T}from"vue";import{NAlert as E,NButton as D,NPagination as te,NSelect as O,NTag as ne}from"naive-ui";function k(e,t){let n=new Set(t.columns.map(e=>e.key)),r=new Map;for(let{key:e,label:n}of t.columns){let t=n.trim();t&&r.set(t,r.has(t)?null:e)}let i=new Set(e.filter(e=>n.has(e.key)).map(e=>e.key)),a=[];for(let t of e){if(n.has(t.key)){a.push({field:t.key,column:t.key});continue}let e=r.get(t.label.trim());!e||i.has(e)||(i.add(e),a.push({field:t.key,column:e}))}return a}function A(e){return e.length>0&&new Set(e.map(e=>e.key)).size===e.length&&e.every(e=>e.key&&e.columns.every(e=>e.key)&&new Set(e.columns.map(e=>e.key)).size===e.columns.length)}function re(e,t,n){let r=x(),i=x(),a=x([]),s=x(),c=x(),l=x(),u=x(),d=o(()=>l.value?.phase),f=o(()=>r.value?.sheets.find(e=>e.key===i.value)),p=o(()=>{let t=new Map;for(let n of e.fields)n.key&&!t.has(n.key)&&t.set(n.key,n);return[...t.values()]}),m=o(()=>new Map(a.value.map(e=>[e.field,e.column]))),h=o(()=>!f.value||!a.value.length||e.disabled||l.value?!1:p.value.every(e=>!e.required||m.value.has(e.key))),_=o(()=>{let t=s.value;return!!(!e.disabled&&!l.value&&t?.rowCount&&u.value!==`commit`&&c.value===void 0&&!t.issues?.some(e=>e.level===`error`))}),v=()=>{let e=l.value;l.value=void 0,e?.controller.abort()},y=()=>{v(),s.value=void 0,u.value=void 0},b=()=>{y(),r.value=void 0,i.value=void 0,a.value=[],c.value=void 0};w(()=>e.scope,b,{flush:`sync`}),w(()=>JSON.stringify(p.value.map(({key:e,required:t})=>[e,!!t])),()=>{d.value!==`commit`&&c.value===void 0&&u.value!==`commit`&&b()},{flush:`sync`}),g(v);let S=async(e,t,r)=>{let i={phase:e,controller:new AbortController};l.value=i,u.value=void 0;try{let e=await t(i.controller.signal);l.value===i&&r(e)}catch(t){if(l.value!==i)return;u.value=e,n(e,t)}finally{l.value===i&&(l.value=void 0)}},C=e=>{let t=r.value?.sheets.find(t=>t.key===e);t&&(i.value=t.key,a.value=k(p.value,t))};return{session:r,sheetKey:i,sheet:f,fields:p,selected:m,review:s,results:c,phase:d,failedPhase:u,canPreview:h,canCommit:_,loadFile:async t=>{if(e.disabled||d.value===`commit`)return;b();let{adapter:n}=e;await S(`read`,e=>n.read(t,e),e=>{if(!A(e))throw TypeError(`Invalid import workbook`);r.value={file:t,sheets:e,adapter:n},C(e[0].key)})},chooseMapping:(t,n)=>{if(e.disabled||l.value||s.value||!p.value.some(e=>e.key===t))return;let r=a.value.filter(e=>e.field!==t);if(n===null){a.value=r;return}f.value?.columns.find(e=>e.key===n)&&!r.some(e=>e.column===n)&&(a.value=[...r,{field:t,column:n}])},preview:async()=>{let e=r.value;if(!e||!i.value||!h.value||s.value)return;let t={file:e.file,sheetKey:i.value,mapping:a.value.map(e=>({...e}))};await S(`preview`,n=>e.adapter.preview(t,n),e=>{if(!Number.isSafeInteger(e.rowCount)||e.rowCount<0)throw TypeError(`Invalid import preview row count`);s.value=e})},commit:async()=>{let e=r.value,n=s.value;!e||!n||!_.value||await S(`commit`,t=>e.adapter.commit(n.plan,t),e=>{if(!Array.isArray(e))throw TypeError(`Invalid import result`);c.value=[...e],t(c.value)})},cancel:()=>{!e.disabled&&d.value!==`commit`&&b()},editMapping:()=>{e.disabled||d.value===`commit`||u.value===`commit`||c.value||y()},selectSheet:t=>{!e.disabled&&!l.value&&!s.value&&t!==i.value&&C(t)}}}const ie={"importWizard.title":`数据导入`,"importWizard.file":`选择文件`,"importWizard.sheet":`工作表`,"importWizard.column":`选择来源列`,"importWizard.mapping":`映射字段`,"importWizard.required":`(必填)`,"importWizard.preview":`运行预检`,"importWizard.review":`预检结果`,"importWizard.rowCount":`待导入 {count} 行`,"importWizard.row":`第 {row} 行`,"importWizard.warning":`提醒`,"importWizard.error":`错误`,"importWizard.back":`返回映射`,"importWizard.confirm":`确认导入`,"importWizard.cancel":`取消导入`,"importWizard.cancelPreview":`取消预检`,"importWizard.restart":`开始新导入`,"importWizard.pending.read":`正在读取文件`,"importWizard.pending.preview":`正在预检数据`,"importWizard.pending.commit":`正在提交导入`,"importWizard.failure.read":`文件读取失败,请检查文件后重新选择`,"importWizard.failure.preview":`预检失败,请检查数据后重试`,"importWizard.failure.commit":`提交结果未确认,请核对业务数据后再试`},ae={"importWizard.title":`Import data`,"importWizard.file":`Choose a file`,"importWizard.sheet":`Sheet`,"importWizard.column":`Choose source column`,"importWizard.mapping":`Map columns`,"importWizard.required":`(required)`,"importWizard.preview":`Validate data`,"importWizard.review":`Validation results`,"importWizard.rowCount":`{count} rows to import`,"importWizard.row":`Row {row}`,"importWizard.warning":`Warning`,"importWizard.error":`Error`,"importWizard.back":`Back to mapping`,"importWizard.confirm":`Confirm import`,"importWizard.cancel":`Cancel import`,"importWizard.cancelPreview":`Cancel validation`,"importWizard.restart":`Start a new import`,"importWizard.pending.read":`Reading file`,"importWizard.pending.preview":`Validating data`,"importWizard.pending.commit":`Submitting import`,"importWizard.failure.read":`Unable to read the file. Check it and choose again.`,"importWizard.failure.preview":`Validation failed. Check the data and try again.`,"importWizard.failure.commit":`Import outcome is unknown. Check the records before trying again.`},oe=[`aria-label`,`aria-busy`],se={class:`c-import-wizard__title`},ce={class:`c-import-wizard__actions`},le=[`for`],ue=[`id`,`accept`,`disabled`],de={key:0},fe={key:0,role:`status`},pe={class:`c-import-wizard__title`},me={class:`c-import-wizard__summary`},he={key:0,class:`c-import-wizard__issues`},ge={key:0},j={key:1},M={class:`c-import-wizard__actions`},N={class:`c-import-wizard__title`},P={class:`c-import-wizard__mapping`},F={key:0},I={class:`c-import-wizard__actions`};var L=n(m({name:`C_ImportWizard`,__name:`index`,props:{fields:{},adapter:{},scope:{},accept:{},title:{},disabled:{type:Boolean},density:{},locale:{}},emits:[`completed`,`failure`],setup(n,{emit:m}){let g=n,x=m,k=p(()=>import(`./C_BatchResult2.js`).then(e=>e.n)),A=ee(),{t:L}=i(ie,ae,()=>g.locale),R=(e,t)=>L(`importWizard.${e}`,t),_e=r(()=>g.density),z=o(()=>e(_e.value)),B=o(()=>z.value.size),ve=t(),ye=o(()=>({...ve.value,"--c-import-gap":`${z.value.gap}px`})),{session:V,sheetKey:be,sheet:H,fields:xe,selected:U,review:W,results:G,phase:K,failedPhase:q,canPreview:Se,canCommit:Ce,loadFile:we,chooseMapping:Te,preview:J,commit:Ee,cancel:De,editMapping:Y,selectSheet:Oe}=re(g,e=>x(`completed`,e),(e,t)=>x(`failure`,e,t)),ke=o(()=>V.value?.sheets.map(({key:e,label:t})=>({value:e,label:t}))??[]),X=o(()=>new Map([...U.value].map(([e,t])=>[t,e]))),Ae=e=>H.value?.columns.map(({key:t,label:n})=>({value:t,label:n,disabled:X.value.has(t)&&X.value.get(t)!==e}))??[],Z=o(()=>W.value?.issues??[]),Q=v(1),$=o(()=>Z.value.slice((Q.value-1)*16,Q.value*16));w(W,()=>{Q.value=1});let je=o(()=>G.value?.map(e=>({...e,retryable:!1}))??[]),Me=e=>{let t=e.target;if(!(t instanceof HTMLInputElement))return;let n=t.files?.[0];t.value=``,n&&we(n)};return(e,t)=>(_(),l(`section`,{class:`c-import-wizard`,style:h(ye.value),"aria-label":n.title??R(`title`),"aria-busy":!!C(K)},[u(`h3`,se,S(n.title??R(`title`)),1),u(`div`,ce,[u(`label`,{for:C(A)},S(R(`file`)),9,le),u(`input`,{id:C(A),type:`file`,accept:n.accept??`.csv,.xls,.xlsx`,disabled:n.disabled||C(K)===`commit`,onChange:Me},null,40,ue),C(V)?(_(),l(`span`,de,S(C(V).file.name),1)):c(`v-if`,!0)]),C(K)?(_(),l(`div`,fe,S(R(`pending.${C(K)}`)),1)):c(`v-if`,!0),C(q)?(_(),s(C(E),{key:1,type:`error`,role:`alert`},{default:T(()=>[d(S(R(`failure.${C(q)}`)),1)]),_:1})):c(`v-if`,!0),C(G)?b(e.$slots,`results`,{results:C(G)},()=>[f(C(k),{results:je.value,locale:n.locale,"show-retry":!1},null,8,[`results`,`locale`])],!0,2):C(W)?(_(),l(a,{key:3},[u(`h4`,pe,S(R(`review`)),1),u(`p`,me,S(R(`rowCount`,{count:C(W).rowCount})),1),$.value.length?(_(),l(`ul`,he,[(_(!0),l(a,null,y($.value,(e,t)=>(_(),l(`li`,{key:t},[f(C(ne),{type:e.level===`error`?`error`:`warning`,size:B.value},{default:T(()=>[d(S(R(e.level)),1)]),_:2},1032,[`type`,`size`]),e.row==null?c(`v-if`,!0):(_(),l(`span`,ge,S(R(`row`,{row:e.row})),1)),e.field?(_(),l(`span`,j,S(e.field),1)):c(`v-if`,!0),u(`span`,null,S(e.message),1)]))),128))])):c(`v-if`,!0),Z.value.length>16?(_(),s(C(te),{key:1,page:Q.value,"onUpdate:page":t[0]||=e=>Q.value=e,"page-size":16,"item-count":Z.value.length,"page-slot":5,size:B.value},null,8,[`page`,`item-count`,`size`])):c(`v-if`,!0),u(`div`,M,[f(C(D),{"attr-type":`button`,size:B.value,disabled:n.disabled||C(K)===`commit`||C(q)===`commit`,onClick:C(Y)},{default:T(()=>[d(S(R(`back`)),1)]),_:1},8,[`size`,`disabled`,`onClick`]),f(C(D),{"attr-type":`button`,type:`primary`,size:B.value,loading:C(K)===`commit`,disabled:!C(Ce),onClick:C(Ee)},{default:T(()=>[d(S(R(`confirm`)),1)]),_:1},8,[`size`,`loading`,`disabled`,`onClick`])])],64)):C(H)?(_(),l(a,{key:4},[u(`h4`,N,S(R(`mapping`)),1),u(`div`,P,[u(`span`,null,S(R(`sheet`)),1),f(C(O),{role:`group`,"aria-label":R(`sheet`),options:ke.value,value:C(be),size:B.value,disabled:n.disabled||!!C(K),"onUpdate:value":C(Oe)},null,8,[`aria-label`,`options`,`value`,`size`,`disabled`,`onUpdate:value`]),(_(!0),l(a,null,y(C(xe),e=>(_(),l(a,{key:e.key},[u(`span`,null,[d(S(e.label),1),e.required?(_(),l(`span`,F,S(R(`required`)),1)):c(`v-if`,!0)]),f(C(O),{role:`group`,"aria-label":e.label,options:Ae(e.key),value:C(U).get(e.key)??null,size:B.value,disabled:n.disabled||!!C(K),placeholder:R(`column`),clearable:``,"onUpdate:value":t=>C(Te)(e.key,t)},null,8,[`aria-label`,`options`,`value`,`size`,`disabled`,`placeholder`,`onUpdate:value`])],64))),128))]),u(`div`,I,[C(K)===`preview`?(_(),s(C(D),{key:0,"attr-type":`button`,size:B.value,onClick:C(Y)},{default:T(()=>[d(S(R(`cancelPreview`)),1)]),_:1},8,[`size`,`onClick`])):c(`v-if`,!0),f(C(D),{"attr-type":`button`,type:`primary`,size:B.value,loading:C(K)===`preview`,disabled:!C(Se),onClick:C(J)},{default:T(()=>[d(S(R(`preview`)),1)]),_:1},8,[`size`,`loading`,`disabled`,`onClick`])])],64)):c(`v-if`,!0),C(V)||C(K)===`read`?(_(),s(C(D),{key:5,"attr-type":`button`,text:``,size:B.value,disabled:n.disabled||C(K)===`commit`,onClick:C(De)},{default:T(()=>[d(S(R(C(G)||C(q)===`commit`?`restart`:`cancel`)),1)]),_:1},8,[`size`,`disabled`,`onClick`])):c(`v-if`,!0)],12,oe))}}),[[`__scopeId`,`data-v-8d28d4bb`]]);export{L as t};
@@ -1,2 +1,2 @@
1
- import { n as LanguageOption, t as _default } from "./index19.vue.cjs";
1
+ import { n as LanguageOption, t as _default } from "./index25.vue.cjs";
2
2
  export { _default as C_Language, type LanguageOption };
@@ -1,2 +1,2 @@
1
- import { n as LanguageOption, t as _default } from "./index18.vue.js";
1
+ import { n as LanguageOption, t as _default } from "./index24.vue.js";
2
2
  export { _default as C_Language, type LanguageOption };
@@ -1,2 +1,2 @@
1
- import { n as LoadingProps, t as _default } from "./index20.vue.cjs";
1
+ import { n as LoadingProps, t as _default } from "./index26.vue.cjs";
2
2
  export { _default as C_Loading, type LoadingProps };
@@ -1,2 +1,2 @@
1
- import { n as LoadingProps, t as _default } from "./index19.vue.js";
1
+ import { n as LoadingProps, t as _default } from "./index25.vue.js";
2
2
  export { _default as C_Loading, type LoadingProps };
@@ -1,2 +1,2 @@
1
- import { a as LoginFeatures, c as RegisterFormData, i as DEFAULT_SOCIAL_PROVIDERS, l as SocialProvider, n as CaptchaFormData, o as LoginProps, r as DEFAULT_FEATURES, s as PasswordFormData, t as _default } from "./index21.vue.cjs";
1
+ import { a as LoginFeatures, c as RegisterFormData, i as DEFAULT_SOCIAL_PROVIDERS, l as SocialProvider, n as CaptchaFormData, o as LoginProps, r as DEFAULT_FEATURES, s as PasswordFormData, t as _default } from "./index27.vue.cjs";
2
2
  export { _default as C_Login, type CaptchaFormData, DEFAULT_FEATURES, DEFAULT_SOCIAL_PROVIDERS, type LoginFeatures, type LoginProps, type PasswordFormData, type RegisterFormData, type SocialProvider };
package/dist/C_Login.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import "./types.js";
2
2
  import "./component-config.js";
3
3
  import "./verification.js";
4
- import { a as LoginFeatures, c as RegisterFormData, i as DEFAULT_SOCIAL_PROVIDERS, l as SocialProvider, n as CaptchaFormData, o as LoginProps, r as DEFAULT_FEATURES, s as PasswordFormData, t as _default } from "./index20.vue.js";
4
+ import { a as LoginFeatures, c as RegisterFormData, i as DEFAULT_SOCIAL_PROVIDERS, l as SocialProvider, n as CaptchaFormData, o as LoginProps, r as DEFAULT_FEATURES, s as PasswordFormData, t as _default } from "./index26.vue.js";
5
5
  export { _default as C_Login, type CaptchaFormData, DEFAULT_FEATURES, DEFAULT_SOCIAL_PROVIDERS, type LoginFeatures, type LoginProps, type PasswordFormData, type RegisterFormData, type SocialProvider };
@@ -1,2 +1,2 @@
1
- import { n as MarkdownProps, t as _default } from "./index22.vue.cjs";
1
+ import { n as MarkdownProps, t as _default } from "./index28.vue.cjs";
2
2
  export { _default as C_Markdown, type MarkdownProps };
@@ -1,2 +1,2 @@
1
- import { n as MarkdownProps, t as _default } from "./index21.vue.js";
1
+ import { n as MarkdownProps, t as _default } from "./index27.vue.js";
2
2
  export { _default as C_Markdown, type MarkdownProps };
@@ -1 +1 @@
1
- require(`./chunk.cjs`);const e=require(`./useComponentTheme.cjs`),t=require(`./export-helper.cjs`),n=require(`./html.cjs`);let r=require(`vue`),i=require(`md-editor-v3`);const a=(0,r.defineComponent)({name:`C_Markdown`,__name:`index`,props:{modelValue:{default:``},editorId:{},height:{default:`400px`},disabled:{type:Boolean,default:!1},placeholder:{default:`请输入 Markdown 内容...`},mode:{default:`editable`},toolbar:{},uploadImageConfig:{},tocNavPosition:{default:`right`},defaultFullscreen:{type:Boolean,default:!1},autofocus:{type:Boolean,default:!1},includeLevel:{default:()=>[1,2,3,4,5,6]},leftToolbar:{default:`undo redo clear | h bold italic strikethrough quote | ul ol table hr | link image code | save`},rightToolbar:{default:`preview toc sync-scroll fullscreen`},maxLength:{default:5e4},showWordCount:{type:Boolean,default:!0},autoSave:{type:Boolean,default:!1},autoSaveInterval:{default:3e4},isDark:{type:Boolean,default:void 0}},emits:[`update:modelValue`,`change`,`save`,`upload-image`,`fullscreen-change`,`copy-code-success`,`word-count-change`,`auto-save`,`max-length-exceeded`],setup(t,{expose:a,emit:o}){let s=i.MdEditor,c=t,l=()=>c.isDark===void 0?void 0:c.isDark?`dark`:`light`,u=e.t(l),d=e.n(l),f=o,p=(0,r.getCurrentInstance)(),m=(0,r.ref)(),h=!1,g=(0,r.ref)(``),_=(0,r.ref)(c.modelValue),v=p?.uid??0,y=(0,r.computed)(()=>c.editorId||`c-markdown-editor-${v}`),b=(0,r.computed)(()=>c.modelValue?.length||0),x=(0,r.computed)(()=>c.disabled?`preview`:c.mode),S=(0,r.computed)(()=>{let e=c.includeLevel.filter(e=>Number.isInteger(e)&&e>=1&&e<=6);return e.length>0?Math.max(...e):6}),C=(0,r.computed)(()=>typeof p?.vnode.props?.onUploadImage==`function`),w={undo:`revoke`,redo:`next`,h:`title`,bold:`bold`,italic:`italic`,strikethrough:`strikeThrough`,quote:`quote`,ul:`unorderedList`,ol:`orderedList`,table:`table`,hr:`horizontalLine`,link:`link`,image:`image`,code:`code`,save:`save`,preview:`preview`,toc:`catalog`,fullscreen:`fullscreen`},T=(0,r.computed)(()=>{if(Array.isArray(c.toolbar))return[...c.toolbar];let e=`${c.leftToolbar} ${c.rightToolbar}`.split(/[\s|]+/).map(e=>w[e]).filter(e=>e!==void 0);return[...new Set(e)]});(0,r.watch)(()=>c.modelValue,e=>{_.value=e??``,c.showWordCount&&f(`word-count-change`,e?.length||0)},{immediate:!0});let E=e=>{if(!h){if(e.length>c.maxLength){f(`max-length-exceeded`,e.length,c.maxLength);return}_.value=e,f(`update:modelValue`,e),c.showWordCount&&f(`word-count-change`,e.length)}},D=e=>{if(h)return;let t=n.t(e);g.value=t,f(`change`,_.value,t),c.autoSave&&M(_.value)},O=async(e,t)=>{try{let r=await t;h||f(`save`,e,n.t(r))}catch(e){if(!h)throw e}},k=(e,t)=>{if(h)return;let n=e.filter(e=>N(e,c.uploadImageConfig?.accept)),r=c.uploadImageConfig?.multiple?n:n.slice(0,1);if(r.length===0)return;let i=new DataTransfer;r.forEach(e=>i.items.add(e)),f(`upload-image`,new Event(`upload-image`),e=>{h||t([{url:e.url,alt:e.desc??``,title:e.desc??``}])},i.files)},A=e=>(h||f(`copy-code-success`,e),e),j=null;(0,r.watch)(()=>c.autoSave,e=>{!e&&j&&(clearTimeout(j),j=null)});let M=e=>{h||(j&&clearTimeout(j),j=setTimeout(()=>{j=null,h||f(`auto-save`,e)},Math.max(0,c.autoSaveInterval)))};(0,r.onBeforeUnmount)(()=>{h||(h=!0,j&&clearTimeout(j),j=null,m.value?.getEditorView()?.destroy())}),(0,r.onMounted)(()=>{m.value?.on(`fullscreen`,e=>{h||f(`fullscreen-change`,e)}),c.defaultFullscreen&&m.value?.toggleFullscreen(!0)}),a({focus:()=>{m.value?.focus()},getHtml:()=>g.value,insertText:e=>{m.value?.insert(t=>({targetValue:`${t}${e}`,select:!0,deviationStart:-e.length,deviationEnd:0}))},wordCount:b});function N(e,t){return t?.trim()?t.split(`,`).map(e=>e.trim().toLowerCase()).filter(Boolean).some(t=>t.startsWith(`.`)?e.name.toLowerCase().endsWith(t):t.endsWith(`/*`)?e.type.toLowerCase().startsWith(t.slice(0,-1)):e.type.toLowerCase()===t):!0}return(e,i)=>((0,r.openBlock)(),(0,r.createElementBlock)(`div`,{class:(0,r.normalizeClass)([`c-markdown-wrapper`,{"is-dark":(0,r.unref)(u)===`dark`,"toc-left":t.tocNavPosition===`left`}]),style:(0,r.normalizeStyle)((0,r.unref)(d))},[(0,r.createVNode)((0,r.unref)(s),{id:y.value,ref_key:`editorRef`,ref:m,"model-value":t.modelValue,height:t.height,placeholder:t.placeholder,theme:(0,r.unref)(u),preview:x.value!==`edit`,"preview-only":x.value===`preview`,"read-only":t.disabled,"auto-focus":t.autofocus,"max-length":t.maxLength,toolbars:T.value,footers:t.showWordCount?[`markdownTotal`,`=`,`scrollSwitch`]:[],"catalog-layout":`flat`,"catalog-max-depth":S.value,"no-upload-img":!C.value,sanitize:(0,r.unref)(n.t),"format-copied-text":A,"onUpdate:modelValue":E,onOnHtmlChanged:D,onOnSave:O,onOnUploadImg:k},null,8,[`id`,`model-value`,`height`,`placeholder`,`theme`,`preview`,`preview-only`,`read-only`,`auto-focus`,`max-length`,`toolbars`,`footers`,`catalog-max-depth`,`no-upload-img`,`sanitize`])],6))}});var o=t.t(a,[[`__scopeId`,`data-v-4efc1f80`]]);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return o}});
1
+ require(`./chunk.cjs`);const e=require(`./useComponentTheme.cjs`),t=require(`./export-helper.cjs`),n=require(`./html2.cjs`);let r=require(`vue`),i=require(`md-editor-v3`);const a=(0,r.defineComponent)({name:`C_Markdown`,__name:`index`,props:{modelValue:{default:``},editorId:{},height:{default:`400px`},disabled:{type:Boolean,default:!1},placeholder:{default:`请输入 Markdown 内容...`},mode:{default:`editable`},toolbar:{},uploadImageConfig:{},tocNavPosition:{default:`right`},defaultFullscreen:{type:Boolean,default:!1},autofocus:{type:Boolean,default:!1},includeLevel:{default:()=>[1,2,3,4,5,6]},leftToolbar:{default:`undo redo clear | h bold italic strikethrough quote | ul ol table hr | link image code | save`},rightToolbar:{default:`preview toc sync-scroll fullscreen`},maxLength:{default:5e4},showWordCount:{type:Boolean,default:!0},autoSave:{type:Boolean,default:!1},autoSaveInterval:{default:3e4},isDark:{type:Boolean,default:void 0}},emits:[`update:modelValue`,`change`,`save`,`upload-image`,`fullscreen-change`,`copy-code-success`,`word-count-change`,`auto-save`,`max-length-exceeded`],setup(t,{expose:a,emit:o}){let s=i.MdEditor,c=t,l=()=>c.isDark===void 0?void 0:c.isDark?`dark`:`light`,u=e.t(l),d=e.n(l),f=o,p=(0,r.getCurrentInstance)(),m=(0,r.ref)(),h=!1,g=(0,r.ref)(``),_=(0,r.ref)(c.modelValue),v=p?.uid??0,y=(0,r.computed)(()=>c.editorId||`c-markdown-editor-${v}`),b=(0,r.computed)(()=>c.modelValue?.length||0),x=(0,r.computed)(()=>c.disabled?`preview`:c.mode),S=(0,r.computed)(()=>{let e=c.includeLevel.filter(e=>Number.isInteger(e)&&e>=1&&e<=6);return e.length>0?Math.max(...e):6}),C=(0,r.computed)(()=>typeof p?.vnode.props?.onUploadImage==`function`),w={undo:`revoke`,redo:`next`,h:`title`,bold:`bold`,italic:`italic`,strikethrough:`strikeThrough`,quote:`quote`,ul:`unorderedList`,ol:`orderedList`,table:`table`,hr:`horizontalLine`,link:`link`,image:`image`,code:`code`,save:`save`,preview:`preview`,toc:`catalog`,fullscreen:`fullscreen`},T=(0,r.computed)(()=>{if(Array.isArray(c.toolbar))return[...c.toolbar];let e=`${c.leftToolbar} ${c.rightToolbar}`.split(/[\s|]+/).map(e=>w[e]).filter(e=>e!==void 0);return[...new Set(e)]});(0,r.watch)(()=>c.modelValue,e=>{_.value=e??``,c.showWordCount&&f(`word-count-change`,e?.length||0)},{immediate:!0});let E=e=>{if(!h){if(e.length>c.maxLength){f(`max-length-exceeded`,e.length,c.maxLength);return}_.value=e,f(`update:modelValue`,e),c.showWordCount&&f(`word-count-change`,e.length)}},D=e=>{if(h)return;let t=n.n(e);g.value=t,f(`change`,_.value,t),c.autoSave&&M(_.value)},O=async(e,t)=>{try{let r=await t;h||f(`save`,e,n.n(r))}catch(e){if(!h)throw e}},k=(e,t)=>{if(h)return;let n=e.filter(e=>N(e,c.uploadImageConfig?.accept)),r=c.uploadImageConfig?.multiple?n:n.slice(0,1);if(r.length===0)return;let i=new DataTransfer;r.forEach(e=>i.items.add(e)),f(`upload-image`,new Event(`upload-image`),e=>{h||t([{url:e.url,alt:e.desc??``,title:e.desc??``}])},i.files)},A=e=>(h||f(`copy-code-success`,e),e),j=null;(0,r.watch)(()=>c.autoSave,e=>{!e&&j&&(clearTimeout(j),j=null)});let M=e=>{h||(j&&clearTimeout(j),j=setTimeout(()=>{j=null,h||f(`auto-save`,e)},Math.max(0,c.autoSaveInterval)))};(0,r.onBeforeUnmount)(()=>{h||(h=!0,j&&clearTimeout(j),j=null,m.value?.getEditorView()?.destroy())}),(0,r.onMounted)(()=>{m.value?.on(`fullscreen`,e=>{h||f(`fullscreen-change`,e)}),c.defaultFullscreen&&m.value?.toggleFullscreen(!0)}),a({focus:()=>{m.value?.focus()},getHtml:()=>g.value,insertText:e=>{m.value?.insert(t=>({targetValue:`${t}${e}`,select:!0,deviationStart:-e.length,deviationEnd:0}))},wordCount:b});function N(e,t){return t?.trim()?t.split(`,`).map(e=>e.trim().toLowerCase()).filter(Boolean).some(t=>t.startsWith(`.`)?e.name.toLowerCase().endsWith(t):t.endsWith(`/*`)?e.type.toLowerCase().startsWith(t.slice(0,-1)):e.type.toLowerCase()===t):!0}return(e,i)=>((0,r.openBlock)(),(0,r.createElementBlock)(`div`,{class:(0,r.normalizeClass)([`c-markdown-wrapper`,{"is-dark":(0,r.unref)(u)===`dark`,"toc-left":t.tocNavPosition===`left`}]),style:(0,r.normalizeStyle)((0,r.unref)(d))},[(0,r.createVNode)((0,r.unref)(s),{id:y.value,ref_key:`editorRef`,ref:m,"model-value":t.modelValue,height:t.height,placeholder:t.placeholder,theme:(0,r.unref)(u),preview:x.value!==`edit`,"preview-only":x.value===`preview`,"read-only":t.disabled,"auto-focus":t.autofocus,"max-length":t.maxLength,toolbars:T.value,footers:t.showWordCount?[`markdownTotal`,`=`,`scrollSwitch`]:[],"catalog-layout":`flat`,"catalog-max-depth":S.value,"no-upload-img":!C.value,sanitize:(0,r.unref)(n.n),"format-copied-text":A,"onUpdate:modelValue":E,onOnHtmlChanged:D,onOnSave:O,onOnUploadImg:k},null,8,[`id`,`model-value`,`height`,`placeholder`,`theme`,`preview`,`preview-only`,`read-only`,`auto-focus`,`max-length`,`toolbars`,`footers`,`catalog-max-depth`,`no-upload-img`,`sanitize`])],6))}});var o=t.t(a,[[`__scopeId`,`data-v-4efc1f80`]]);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return o}});
@@ -1 +1 @@
1
- import{n as e,t}from"./useComponentTheme.js";import{t as n}from"./export-helper.js";import{t as r}from"./html.js";import{computed as i,createElementBlock as a,createVNode as o,defineComponent as s,getCurrentInstance as c,normalizeClass as l,normalizeStyle as u,onBeforeUnmount as d,onMounted as f,openBlock as p,ref as m,unref as h,watch as g}from"vue";import{MdEditor as _}from"md-editor-v3";var v=n(s({name:`C_Markdown`,__name:`index`,props:{modelValue:{default:``},editorId:{},height:{default:`400px`},disabled:{type:Boolean,default:!1},placeholder:{default:`请输入 Markdown 内容...`},mode:{default:`editable`},toolbar:{},uploadImageConfig:{},tocNavPosition:{default:`right`},defaultFullscreen:{type:Boolean,default:!1},autofocus:{type:Boolean,default:!1},includeLevel:{default:()=>[1,2,3,4,5,6]},leftToolbar:{default:`undo redo clear | h bold italic strikethrough quote | ul ol table hr | link image code | save`},rightToolbar:{default:`preview toc sync-scroll fullscreen`},maxLength:{default:5e4},showWordCount:{type:Boolean,default:!0},autoSave:{type:Boolean,default:!1},autoSaveInterval:{default:3e4},isDark:{type:Boolean,default:void 0}},emits:[`update:modelValue`,`change`,`save`,`upload-image`,`fullscreen-change`,`copy-code-success`,`word-count-change`,`auto-save`,`max-length-exceeded`],setup(n,{expose:s,emit:v}){let y=_,b=n,x=()=>b.isDark===void 0?void 0:b.isDark?`dark`:`light`,S=t(x),C=e(x),w=v,T=c(),E=m(),D=!1,O=m(``),k=m(b.modelValue),A=T?.uid??0,j=i(()=>b.editorId||`c-markdown-editor-${A}`),M=i(()=>b.modelValue?.length||0),N=i(()=>b.disabled?`preview`:b.mode),P=i(()=>{let e=b.includeLevel.filter(e=>Number.isInteger(e)&&e>=1&&e<=6);return e.length>0?Math.max(...e):6}),F=i(()=>typeof T?.vnode.props?.onUploadImage==`function`),I={undo:`revoke`,redo:`next`,h:`title`,bold:`bold`,italic:`italic`,strikethrough:`strikeThrough`,quote:`quote`,ul:`unorderedList`,ol:`orderedList`,table:`table`,hr:`horizontalLine`,link:`link`,image:`image`,code:`code`,save:`save`,preview:`preview`,toc:`catalog`,fullscreen:`fullscreen`},L=i(()=>{if(Array.isArray(b.toolbar))return[...b.toolbar];let e=`${b.leftToolbar} ${b.rightToolbar}`.split(/[\s|]+/).map(e=>I[e]).filter(e=>e!==void 0);return[...new Set(e)]});g(()=>b.modelValue,e=>{k.value=e??``,b.showWordCount&&w(`word-count-change`,e?.length||0)},{immediate:!0});let R=e=>{if(!D){if(e.length>b.maxLength){w(`max-length-exceeded`,e.length,b.maxLength);return}k.value=e,w(`update:modelValue`,e),b.showWordCount&&w(`word-count-change`,e.length)}},z=e=>{if(D)return;let t=r(e);O.value=t,w(`change`,k.value,t),b.autoSave&&W(k.value)},B=async(e,t)=>{try{let n=await t;D||w(`save`,e,r(n))}catch(e){if(!D)throw e}},V=(e,t)=>{if(D)return;let n=e.filter(e=>G(e,b.uploadImageConfig?.accept)),r=b.uploadImageConfig?.multiple?n:n.slice(0,1);if(r.length===0)return;let i=new DataTransfer;r.forEach(e=>i.items.add(e)),w(`upload-image`,new Event(`upload-image`),e=>{D||t([{url:e.url,alt:e.desc??``,title:e.desc??``}])},i.files)},H=e=>(D||w(`copy-code-success`,e),e),U=null;g(()=>b.autoSave,e=>{!e&&U&&(clearTimeout(U),U=null)});let W=e=>{D||(U&&clearTimeout(U),U=setTimeout(()=>{U=null,D||w(`auto-save`,e)},Math.max(0,b.autoSaveInterval)))};d(()=>{D||(D=!0,U&&clearTimeout(U),U=null,E.value?.getEditorView()?.destroy())}),f(()=>{E.value?.on(`fullscreen`,e=>{D||w(`fullscreen-change`,e)}),b.defaultFullscreen&&E.value?.toggleFullscreen(!0)}),s({focus:()=>{E.value?.focus()},getHtml:()=>O.value,insertText:e=>{E.value?.insert(t=>({targetValue:`${t}${e}`,select:!0,deviationStart:-e.length,deviationEnd:0}))},wordCount:M});function G(e,t){return t?.trim()?t.split(`,`).map(e=>e.trim().toLowerCase()).filter(Boolean).some(t=>t.startsWith(`.`)?e.name.toLowerCase().endsWith(t):t.endsWith(`/*`)?e.type.toLowerCase().startsWith(t.slice(0,-1)):e.type.toLowerCase()===t):!0}return(e,t)=>(p(),a(`div`,{class:l([`c-markdown-wrapper`,{"is-dark":h(S)===`dark`,"toc-left":n.tocNavPosition===`left`}]),style:u(h(C))},[o(h(y),{id:j.value,ref_key:`editorRef`,ref:E,"model-value":n.modelValue,height:n.height,placeholder:n.placeholder,theme:h(S),preview:N.value!==`edit`,"preview-only":N.value===`preview`,"read-only":n.disabled,"auto-focus":n.autofocus,"max-length":n.maxLength,toolbars:L.value,footers:n.showWordCount?[`markdownTotal`,`=`,`scrollSwitch`]:[],"catalog-layout":`flat`,"catalog-max-depth":P.value,"no-upload-img":!F.value,sanitize:h(r),"format-copied-text":H,"onUpdate:modelValue":R,onOnHtmlChanged:z,onOnSave:B,onOnUploadImg:V},null,8,[`id`,`model-value`,`height`,`placeholder`,`theme`,`preview`,`preview-only`,`read-only`,`auto-focus`,`max-length`,`toolbars`,`footers`,`catalog-max-depth`,`no-upload-img`,`sanitize`])],6))}}),[[`__scopeId`,`data-v-4efc1f80`]]);export{v as t};
1
+ import{n as e,t}from"./useComponentTheme.js";import{t as n}from"./export-helper.js";import{n as r}from"./html2.js";import{computed as i,createElementBlock as a,createVNode as o,defineComponent as s,getCurrentInstance as c,normalizeClass as l,normalizeStyle as u,onBeforeUnmount as d,onMounted as f,openBlock as p,ref as m,unref as h,watch as g}from"vue";import{MdEditor as _}from"md-editor-v3";var v=n(s({name:`C_Markdown`,__name:`index`,props:{modelValue:{default:``},editorId:{},height:{default:`400px`},disabled:{type:Boolean,default:!1},placeholder:{default:`请输入 Markdown 内容...`},mode:{default:`editable`},toolbar:{},uploadImageConfig:{},tocNavPosition:{default:`right`},defaultFullscreen:{type:Boolean,default:!1},autofocus:{type:Boolean,default:!1},includeLevel:{default:()=>[1,2,3,4,5,6]},leftToolbar:{default:`undo redo clear | h bold italic strikethrough quote | ul ol table hr | link image code | save`},rightToolbar:{default:`preview toc sync-scroll fullscreen`},maxLength:{default:5e4},showWordCount:{type:Boolean,default:!0},autoSave:{type:Boolean,default:!1},autoSaveInterval:{default:3e4},isDark:{type:Boolean,default:void 0}},emits:[`update:modelValue`,`change`,`save`,`upload-image`,`fullscreen-change`,`copy-code-success`,`word-count-change`,`auto-save`,`max-length-exceeded`],setup(n,{expose:s,emit:v}){let y=_,b=n,x=()=>b.isDark===void 0?void 0:b.isDark?`dark`:`light`,S=t(x),C=e(x),w=v,T=c(),E=m(),D=!1,O=m(``),k=m(b.modelValue),A=T?.uid??0,j=i(()=>b.editorId||`c-markdown-editor-${A}`),M=i(()=>b.modelValue?.length||0),N=i(()=>b.disabled?`preview`:b.mode),P=i(()=>{let e=b.includeLevel.filter(e=>Number.isInteger(e)&&e>=1&&e<=6);return e.length>0?Math.max(...e):6}),F=i(()=>typeof T?.vnode.props?.onUploadImage==`function`),I={undo:`revoke`,redo:`next`,h:`title`,bold:`bold`,italic:`italic`,strikethrough:`strikeThrough`,quote:`quote`,ul:`unorderedList`,ol:`orderedList`,table:`table`,hr:`horizontalLine`,link:`link`,image:`image`,code:`code`,save:`save`,preview:`preview`,toc:`catalog`,fullscreen:`fullscreen`},L=i(()=>{if(Array.isArray(b.toolbar))return[...b.toolbar];let e=`${b.leftToolbar} ${b.rightToolbar}`.split(/[\s|]+/).map(e=>I[e]).filter(e=>e!==void 0);return[...new Set(e)]});g(()=>b.modelValue,e=>{k.value=e??``,b.showWordCount&&w(`word-count-change`,e?.length||0)},{immediate:!0});let R=e=>{if(!D){if(e.length>b.maxLength){w(`max-length-exceeded`,e.length,b.maxLength);return}k.value=e,w(`update:modelValue`,e),b.showWordCount&&w(`word-count-change`,e.length)}},z=e=>{if(D)return;let t=r(e);O.value=t,w(`change`,k.value,t),b.autoSave&&W(k.value)},B=async(e,t)=>{try{let n=await t;D||w(`save`,e,r(n))}catch(e){if(!D)throw e}},V=(e,t)=>{if(D)return;let n=e.filter(e=>G(e,b.uploadImageConfig?.accept)),r=b.uploadImageConfig?.multiple?n:n.slice(0,1);if(r.length===0)return;let i=new DataTransfer;r.forEach(e=>i.items.add(e)),w(`upload-image`,new Event(`upload-image`),e=>{D||t([{url:e.url,alt:e.desc??``,title:e.desc??``}])},i.files)},H=e=>(D||w(`copy-code-success`,e),e),U=null;g(()=>b.autoSave,e=>{!e&&U&&(clearTimeout(U),U=null)});let W=e=>{D||(U&&clearTimeout(U),U=setTimeout(()=>{U=null,D||w(`auto-save`,e)},Math.max(0,b.autoSaveInterval)))};d(()=>{D||(D=!0,U&&clearTimeout(U),U=null,E.value?.getEditorView()?.destroy())}),f(()=>{E.value?.on(`fullscreen`,e=>{D||w(`fullscreen-change`,e)}),b.defaultFullscreen&&E.value?.toggleFullscreen(!0)}),s({focus:()=>{E.value?.focus()},getHtml:()=>O.value,insertText:e=>{E.value?.insert(t=>({targetValue:`${t}${e}`,select:!0,deviationStart:-e.length,deviationEnd:0}))},wordCount:M});function G(e,t){return t?.trim()?t.split(`,`).map(e=>e.trim().toLowerCase()).filter(Boolean).some(t=>t.startsWith(`.`)?e.name.toLowerCase().endsWith(t):t.endsWith(`/*`)?e.type.toLowerCase().startsWith(t.slice(0,-1)):e.type.toLowerCase()===t):!0}return(e,t)=>(p(),a(`div`,{class:l([`c-markdown-wrapper`,{"is-dark":h(S)===`dark`,"toc-left":n.tocNavPosition===`left`}]),style:u(h(C))},[o(h(y),{id:j.value,ref_key:`editorRef`,ref:E,"model-value":n.modelValue,height:n.height,placeholder:n.placeholder,theme:h(S),preview:N.value!==`edit`,"preview-only":N.value===`preview`,"read-only":n.disabled,"auto-focus":n.autofocus,"max-length":n.maxLength,toolbars:L.value,footers:n.showWordCount?[`markdownTotal`,`=`,`scrollSwitch`]:[],"catalog-layout":`flat`,"catalog-max-depth":P.value,"no-upload-img":!F.value,sanitize:h(r),"format-copied-text":H,"onUpdate:modelValue":R,onOnHtmlChanged:z,onOnSave:B,onOnUploadImg:V},null,8,[`id`,`model-value`,`height`,`placeholder`,`theme`,`preview`,`preview-only`,`read-only`,`auto-focus`,`max-length`,`toolbars`,`footers`,`catalog-max-depth`,`no-upload-img`,`sanitize`])],6))}}),[[`__scopeId`,`data-v-4efc1f80`]]);export{v as t};
package/dist/C_Menu.d.cts CHANGED
@@ -1,3 +1,3 @@
1
- import { n as RouteItem, r as RouteMeta } from "./types3.cjs";
2
- import { a as MenuProps, c as createMenuOptions, i as MenuKey, l as flattenRoutes, n as MenuEmits, o as MenuValue, r as MenuExpose, s as MenuAdapterConfig, t as _default } from "./index6.vue.cjs";
1
+ import { n as RouteItem, r as RouteMeta } from "./types5.cjs";
2
+ import { a as MenuProps, c as createMenuOptions, i as MenuKey, l as flattenRoutes, n as MenuEmits, o as MenuValue, r as MenuExpose, s as MenuAdapterConfig, t as _default } from "./index8.vue.cjs";
3
3
  export { _default as C_Menu, type MenuAdapterConfig, type MenuEmits, type MenuExpose, type MenuKey, type MenuProps, type MenuValue, type RouteItem, type RouteMeta, createMenuOptions, flattenRoutes };
package/dist/C_Menu.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  import { a as RouteItem, n as createMenuOptions, o as RouteMeta, r as flattenRoutes, t as MenuAdapterConfig } from "./public.js";
2
- import { a as MenuProps, i as MenuKey, n as MenuEmits, o as MenuValue, r as MenuExpose, t as _default } from "./index22.vue.js";
2
+ import { a as MenuProps, i as MenuKey, n as MenuEmits, o as MenuValue, r as MenuExpose, t as _default } from "./index28.vue.js";
3
3
  export { _default as C_Menu, type MenuAdapterConfig, type MenuEmits, type MenuExpose, type MenuKey, type MenuProps, type MenuValue, type RouteItem, type RouteMeta, createMenuOptions, flattenRoutes };
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`./C_Icon2.cjs`);const e=require(`./C_NotificationCenter2.cjs`);exports.CATEGORY_MAP=e.a,exports.CATEGORY_TABS=e.o,exports.C_NotificationCenter=e.t,exports.DEFAULT_MAX_BADGE_COUNT=e.s,exports.DEFAULT_PAGE_SIZE=e.c,exports.DEFAULT_POLLING_INTERVAL=e.l,exports.DEFAULT_STORAGE_KEY=e.u,exports.DEFAULT_WS_HEARTBEAT_INTERVAL=e.d,exports.DEFAULT_WS_HEARTBEAT_MESSAGE=e.f,exports.DEFAULT_WS_MAX_RECONNECT=e.p,exports.DEFAULT_WS_RECONNECT_INTERVAL=e.m,exports.MOCK_MESSAGES=e.h,exports.PRIORITY_MAP=e.g,exports.useNotificationCore=e.r,exports.useNotificationFormat=e.n,exports.useNotificationWS=e.i;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`./C_Icon2.cjs`);const e=require(`./NotificationItem.cjs`),t=require(`./C_NotificationCenter2.cjs`);exports.CATEGORY_MAP=e.r,exports.CATEGORY_TABS=e.i,exports.C_NotificationCenter=t.t,exports.DEFAULT_MAX_BADGE_COUNT=e.a,exports.DEFAULT_PAGE_SIZE=e.o,exports.DEFAULT_POLLING_INTERVAL=e.s,exports.DEFAULT_STORAGE_KEY=e.c,exports.DEFAULT_WS_HEARTBEAT_INTERVAL=e.l,exports.DEFAULT_WS_HEARTBEAT_MESSAGE=e.u,exports.DEFAULT_WS_MAX_RECONNECT=e.d,exports.DEFAULT_WS_RECONNECT_INTERVAL=e.f,exports.MOCK_MESSAGES=e.p,exports.PRIORITY_MAP=e.m,exports.useNotificationCore=t.n,exports.useNotificationFormat=e.n,exports.useNotificationWS=t.r;
@@ -175,7 +175,7 @@
175
175
  .flex-wrap[data-v-32e61327]{flex-wrap:wrap;}
176
176
  .px[data-v-32e61327]{padding-left:1rem;padding-right:1rem;}
177
177
 
178
- .notification-item[data-v-5741ae13] {
178
+ .notification-item[data-v-21a53eea] {
179
179
  display: flex;
180
180
  align-items: flex-start;
181
181
  gap: 10px;
@@ -184,58 +184,58 @@
184
184
  transition: background-color var(--c-transition, 0.2s ease);
185
185
  border-bottom: 1px solid var(--c-border, var(--c-theme-border));
186
186
  }
187
- .notification-item[data-v-5741ae13]:last-child {
187
+ .notification-item[data-v-21a53eea]:last-child {
188
188
  border-bottom: none;
189
189
  }
190
- .notification-item[data-v-5741ae13]:hover {
190
+ .notification-item[data-v-21a53eea]:hover {
191
191
  background-color: var(--c-bg-card, var(--c-theme-bg-card));
192
192
  }
193
- .notification-item:hover .notification-item__actions[data-v-5741ae13] {
193
+ .notification-item:hover .notification-item__actions[data-v-21a53eea] {
194
194
  opacity: 1;
195
195
  }
196
- .notification-item--unread[data-v-5741ae13] {
196
+ .notification-item--unread[data-v-21a53eea] {
197
197
  background-color: color-mix(in srgb, var(--c-primary, var(--c-theme-primary)) 4%, transparent);
198
198
  }
199
- .notification-item--unread[data-v-5741ae13]:hover {
199
+ .notification-item--unread[data-v-21a53eea]:hover {
200
200
  background-color: color-mix(in srgb, var(--c-primary, var(--c-theme-primary)) 8%, transparent);
201
201
  }
202
- .notification-item--urgent[data-v-5741ae13] {
202
+ .notification-item--urgent[data-v-21a53eea] {
203
203
  border-left: 3px solid var(--c-error, var(--c-theme-error, #d03050));
204
204
  padding-left: 13px;
205
205
  }
206
- .notification-item[data-v-5741ae13] {
206
+ .notification-item[data-v-21a53eea] {
207
207
  /* ─── 子元素 ──────────────────────────── */
208
208
  }
209
- .notification-item__indicator[data-v-5741ae13] {
209
+ .notification-item__indicator[data-v-21a53eea] {
210
210
  flex-shrink: 0;
211
211
  width: 8px;
212
212
  display: flex;
213
213
  align-items: center;
214
214
  padding-top: 14px;
215
215
  }
216
- .notification-item__dot[data-v-5741ae13] {
216
+ .notification-item__dot[data-v-21a53eea] {
217
217
  width: 6px;
218
218
  height: 6px;
219
219
  border-radius: 50%;
220
220
  background: var(--c-primary, var(--c-theme-primary));
221
221
  }
222
- .notification-item__dot--urgent[data-v-5741ae13] {
222
+ .notification-item__dot--urgent[data-v-21a53eea] {
223
223
  background: var(--c-error, var(--c-theme-error, #d03050));
224
224
  box-shadow: 0 0 4px color-mix(in srgb, var(--c-error, var(--c-theme-error)) 50%, transparent);
225
225
  }
226
- .notification-item__dot--high[data-v-5741ae13] {
226
+ .notification-item__dot--high[data-v-21a53eea] {
227
227
  background: var(--c-warning, var(--c-theme-warning, #fa8c16));
228
228
  }
229
- .notification-item__dot--normal[data-v-5741ae13] {
229
+ .notification-item__dot--normal[data-v-21a53eea] {
230
230
  background: var(--c-primary, var(--c-theme-primary));
231
231
  }
232
- .notification-item__dot--low[data-v-5741ae13] {
232
+ .notification-item__dot--low[data-v-21a53eea] {
233
233
  background: var(--c-text-4, var(--c-theme-text-4));
234
234
  }
235
- .notification-item__avatar[data-v-5741ae13] {
235
+ .notification-item__avatar[data-v-21a53eea] {
236
236
  flex-shrink: 0;
237
237
  }
238
- .notification-item__avatar-placeholder[data-v-5741ae13] {
238
+ .notification-item__avatar-placeholder[data-v-21a53eea] {
239
239
  width: 36px;
240
240
  height: 36px;
241
241
  border-radius: 50%;
@@ -245,17 +245,17 @@
245
245
  font-size: 16px;
246
246
  color: #fff;
247
247
  }
248
- .notification-item__avatar-placeholder--system[data-v-5741ae13] {
248
+ .notification-item__avatar-placeholder--system[data-v-21a53eea] {
249
249
  background: linear-gradient(135deg, #667eea, #764ba2);
250
250
  }
251
- .notification-item__avatar-placeholder--business[data-v-5741ae13] {
251
+ .notification-item__avatar-placeholder--business[data-v-21a53eea] {
252
252
  background: linear-gradient(135deg, #43e97b, #38f9d7);
253
253
  color: #0d1425;
254
254
  }
255
- .notification-item__avatar-placeholder--alarm[data-v-5741ae13] {
255
+ .notification-item__avatar-placeholder--alarm[data-v-21a53eea] {
256
256
  background: linear-gradient(135deg, #f093fb, #f5576c);
257
257
  }
258
- .notification-item__body[data-v-5741ae13] {
258
+ .notification-item__body[data-v-21a53eea] {
259
259
  appearance: none;
260
260
  border: 0;
261
261
  padding: 0;
@@ -265,21 +265,21 @@
265
265
  text-align: left;
266
266
  cursor: pointer;
267
267
  }
268
- .notification-item__body[data-v-5741ae13]:focus-visible {
268
+ .notification-item__body[data-v-21a53eea]:focus-visible {
269
269
  outline: 2px solid var(--c-primary, var(--c-theme-primary));
270
270
  outline-offset: 3px;
271
271
  }
272
- .notification-item__body[data-v-5741ae13] {
272
+ .notification-item__body[data-v-21a53eea] {
273
273
  flex: 1;
274
274
  min-width: 0;
275
275
  }
276
- .notification-item__header[data-v-5741ae13] {
276
+ .notification-item__header[data-v-21a53eea] {
277
277
  display: flex;
278
278
  align-items: center;
279
279
  gap: 6px;
280
280
  margin-bottom: 4px;
281
281
  }
282
- .notification-item__title[data-v-5741ae13] {
282
+ .notification-item__title[data-v-21a53eea] {
283
283
  font-size: 13px;
284
284
  font-weight: 500;
285
285
  color: var(--c-text-1, var(--c-theme-text-1));
@@ -288,7 +288,7 @@
288
288
  text-overflow: ellipsis;
289
289
  white-space: nowrap;
290
290
  }
291
- .notification-item__summary[data-v-5741ae13] {
291
+ .notification-item__summary[data-v-21a53eea] {
292
292
  font-size: 12px;
293
293
  color: var(--c-text-2, var(--c-theme-text-2));
294
294
  line-height: 1.5;
@@ -298,21 +298,21 @@
298
298
  -webkit-box-orient: vertical;
299
299
  overflow: hidden;
300
300
  }
301
- .notification-item__meta[data-v-5741ae13] {
301
+ .notification-item__meta[data-v-21a53eea] {
302
302
  display: flex;
303
303
  align-items: center;
304
304
  gap: 8px;
305
305
  margin-top: 6px;
306
306
  }
307
- .notification-item__time[data-v-5741ae13], .notification-item__sender[data-v-5741ae13] {
307
+ .notification-item__time[data-v-21a53eea], .notification-item__sender[data-v-21a53eea] {
308
308
  font-size: 11px;
309
309
  color: var(--c-text-4, var(--c-theme-text-4));
310
310
  }
311
- .notification-item__sender[data-v-5741ae13]::before {
311
+ .notification-item__sender[data-v-21a53eea]::before {
312
312
  content: "·";
313
313
  margin-right: 8px;
314
314
  }
315
- .notification-item__actions[data-v-5741ae13] {
315
+ .notification-item__actions[data-v-21a53eea] {
316
316
  flex-shrink: 0;
317
317
  display: flex;
318
318
  align-items: center;
@@ -320,7 +320,7 @@
320
320
  opacity: 0;
321
321
  transition: opacity var(--c-transition, 0.2s ease);
322
322
  }
323
- .notification-item__action[data-v-5741ae13] {
323
+ .notification-item__action[data-v-21a53eea] {
324
324
  appearance: none;
325
325
  border: 0;
326
326
  background: transparent;
@@ -335,23 +335,23 @@
335
335
  color: var(--c-text-4, var(--c-theme-text-4));
336
336
  transition: all var(--c-transition, 0.2s ease);
337
337
  }
338
- .notification-item__action[data-v-5741ae13]:hover {
338
+ .notification-item__action[data-v-21a53eea]:hover {
339
339
  color: var(--c-primary, var(--c-theme-primary));
340
340
  background-color: var(--c-border, var(--c-theme-border));
341
341
  }
342
- .notification-item__action[data-v-5741ae13]:disabled {
342
+ .notification-item__action[data-v-21a53eea]:disabled {
343
343
  cursor: wait;
344
344
  opacity: 0.45;
345
345
  }
346
346
 
347
347
  /* layer: default */
348
- .hidden[data-v-5741ae13]{display:none;}
349
- .flex[data-v-5741ae13]{display:flex;}
350
- .inline-flex[data-v-5741ae13]{display:inline-flex;}
351
- .flex-shrink[data-v-5741ae13]{flex-shrink:1;}
352
- .border[data-v-5741ae13]{border-width:1px;}
353
- .outline[data-v-5741ae13]{outline-style:solid;}
354
- .transition[data-v-5741ae13]{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;}
348
+ .hidden[data-v-21a53eea]{display:none;}
349
+ .flex[data-v-21a53eea]{display:flex;}
350
+ .inline-flex[data-v-21a53eea]{display:inline-flex;}
351
+ .flex-shrink[data-v-21a53eea]{flex-shrink:1;}
352
+ .border[data-v-21a53eea]{border-width:1px;}
353
+ .outline[data-v-21a53eea]{outline-style:solid;}
354
+ .transition[data-v-21a53eea]{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;}
355
355
 
356
356
  .notification-list__tabs[data-v-940afa31] {
357
357
  display: flex;
@@ -1,2 +1,3 @@
1
- import { A as NotificationDataMode, C as NotificationCategory, D as NotificationCenterExpose, E as NotificationCenterEmits, F as NotificationStatus, I as NotificationUnreadByCategory, L as NotificationWSConfig, M as NotificationMessage, N as NotificationPriority, O as NotificationCenterProps, P as NotificationSender, R as WSConnectionStatus, S as MarkAsReadFn, T as NotificationCenterController, _ as ClearNotificationsFn, a as DEFAULT_POLLING_INTERVAL, b as FetchNotificationsResult, c as DEFAULT_WS_HEARTBEAT_MESSAGE, d as MOCK_MESSAGES, f as PRIORITY_MAP, g as _default, h as useNotificationCore, i as DEFAULT_PAGE_SIZE, j as NotificationItemSlotContext, k as NotificationCenterSlots, l as DEFAULT_WS_MAX_RECONNECT, m as useNotificationFormat, n as CATEGORY_TABS, o as DEFAULT_STORAGE_KEY, p as useNotificationWS, r as DEFAULT_MAX_BADGE_COUNT, s as DEFAULT_WS_HEARTBEAT_INTERVAL, t as CATEGORY_MAP, u as DEFAULT_WS_RECONNECT_INTERVAL, v as DeleteNotificationFn, w as NotificationCategoryOption, x as MarkAllReadFn, y as FetchNotificationsFn, z as WSNotificationPayload } from "./constants3.cjs";
1
+ import { C as WSNotificationPayload, S as WSConnectionStatus, _ as NotificationPriority, a as MarkAllReadFn, b as NotificationUnreadByCategory, c as NotificationCategoryOption, d as NotificationCenterExpose, f as NotificationCenterProps, g as NotificationMessage, h as NotificationItemSlotContext, i as FetchNotificationsResult, l as NotificationCenterController, m as NotificationDataMode, n as DeleteNotificationFn, o as MarkAsReadFn, p as NotificationCenterSlots, r as FetchNotificationsFn, s as NotificationCategory, t as ClearNotificationsFn, u as NotificationCenterEmits, v as NotificationSender, x as NotificationWSConfig, y as NotificationStatus } from "./types10.cjs";
2
+ import { a as DEFAULT_POLLING_INTERVAL, c as DEFAULT_WS_HEARTBEAT_MESSAGE, d as MOCK_MESSAGES, f as PRIORITY_MAP, g as _default, h as useNotificationCore, i as DEFAULT_PAGE_SIZE, l as DEFAULT_WS_MAX_RECONNECT, m as useNotificationFormat, n as CATEGORY_TABS, o as DEFAULT_STORAGE_KEY, p as useNotificationWS, r as DEFAULT_MAX_BADGE_COUNT, s as DEFAULT_WS_HEARTBEAT_INTERVAL, t as CATEGORY_MAP, u as DEFAULT_WS_RECONNECT_INTERVAL } from "./constants3.cjs";
2
3
  export { CATEGORY_MAP, CATEGORY_TABS, _default as C_NotificationCenter, type ClearNotificationsFn, DEFAULT_MAX_BADGE_COUNT, DEFAULT_PAGE_SIZE, DEFAULT_POLLING_INTERVAL, DEFAULT_STORAGE_KEY, DEFAULT_WS_HEARTBEAT_INTERVAL, DEFAULT_WS_HEARTBEAT_MESSAGE, DEFAULT_WS_MAX_RECONNECT, DEFAULT_WS_RECONNECT_INTERVAL, type DeleteNotificationFn, type FetchNotificationsFn, type FetchNotificationsResult, MOCK_MESSAGES, type MarkAllReadFn, type MarkAsReadFn, type NotificationCategory, type NotificationCategoryOption, type NotificationCenterController, type NotificationCenterEmits, type NotificationCenterExpose, type NotificationCenterProps, type NotificationCenterSlots, type NotificationDataMode, type NotificationItemSlotContext, type NotificationMessage, type NotificationPriority, type NotificationSender, type NotificationStatus, type NotificationUnreadByCategory, type NotificationWSConfig, PRIORITY_MAP, type WSConnectionStatus, type WSNotificationPayload, useNotificationCore, useNotificationFormat, useNotificationWS };
@@ -1,2 +1,3 @@
1
- import { A as NotificationDataMode, C as NotificationCategory, D as NotificationCenterExpose, E as NotificationCenterEmits, F as NotificationStatus, I as NotificationUnreadByCategory, L as NotificationWSConfig, M as NotificationMessage, N as NotificationPriority, O as NotificationCenterProps, P as NotificationSender, R as WSConnectionStatus, S as MarkAsReadFn, T as NotificationCenterController, _ as ClearNotificationsFn, a as DEFAULT_POLLING_INTERVAL, b as FetchNotificationsResult, c as DEFAULT_WS_HEARTBEAT_MESSAGE, d as MOCK_MESSAGES, f as PRIORITY_MAP, g as _default, h as useNotificationCore, i as DEFAULT_PAGE_SIZE, j as NotificationItemSlotContext, k as NotificationCenterSlots, l as DEFAULT_WS_MAX_RECONNECT, m as useNotificationFormat, n as CATEGORY_TABS, o as DEFAULT_STORAGE_KEY, p as useNotificationWS, r as DEFAULT_MAX_BADGE_COUNT, s as DEFAULT_WS_HEARTBEAT_INTERVAL, t as CATEGORY_MAP, u as DEFAULT_WS_RECONNECT_INTERVAL, v as DeleteNotificationFn, w as NotificationCategoryOption, x as MarkAllReadFn, y as FetchNotificationsFn, z as WSNotificationPayload } from "./constants3.js";
1
+ import { C as WSNotificationPayload, S as WSConnectionStatus, _ as NotificationPriority, a as MarkAllReadFn, b as NotificationUnreadByCategory, c as NotificationCategoryOption, d as NotificationCenterExpose, f as NotificationCenterProps, g as NotificationMessage, h as NotificationItemSlotContext, i as FetchNotificationsResult, l as NotificationCenterController, m as NotificationDataMode, n as DeleteNotificationFn, o as MarkAsReadFn, p as NotificationCenterSlots, r as FetchNotificationsFn, s as NotificationCategory, t as ClearNotificationsFn, u as NotificationCenterEmits, v as NotificationSender, x as NotificationWSConfig, y as NotificationStatus } from "./types9.js";
2
+ import { a as DEFAULT_POLLING_INTERVAL, c as DEFAULT_WS_HEARTBEAT_MESSAGE, d as MOCK_MESSAGES, f as PRIORITY_MAP, g as _default, h as useNotificationCore, i as DEFAULT_PAGE_SIZE, l as DEFAULT_WS_MAX_RECONNECT, m as useNotificationFormat, n as CATEGORY_TABS, o as DEFAULT_STORAGE_KEY, p as useNotificationWS, r as DEFAULT_MAX_BADGE_COUNT, s as DEFAULT_WS_HEARTBEAT_INTERVAL, t as CATEGORY_MAP, u as DEFAULT_WS_RECONNECT_INTERVAL } from "./constants3.js";
2
3
  export { CATEGORY_MAP, CATEGORY_TABS, _default as C_NotificationCenter, type ClearNotificationsFn, DEFAULT_MAX_BADGE_COUNT, DEFAULT_PAGE_SIZE, DEFAULT_POLLING_INTERVAL, DEFAULT_STORAGE_KEY, DEFAULT_WS_HEARTBEAT_INTERVAL, DEFAULT_WS_HEARTBEAT_MESSAGE, DEFAULT_WS_MAX_RECONNECT, DEFAULT_WS_RECONNECT_INTERVAL, type DeleteNotificationFn, type FetchNotificationsFn, type FetchNotificationsResult, MOCK_MESSAGES, type MarkAllReadFn, type MarkAsReadFn, type NotificationCategory, type NotificationCategoryOption, type NotificationCenterController, type NotificationCenterEmits, type NotificationCenterExpose, type NotificationCenterProps, type NotificationCenterSlots, type NotificationDataMode, type NotificationItemSlotContext, type NotificationMessage, type NotificationPriority, type NotificationSender, type NotificationStatus, type NotificationUnreadByCategory, type NotificationWSConfig, PRIORITY_MAP, type WSConnectionStatus, type WSNotificationPayload, useNotificationCore, useNotificationFormat, useNotificationWS };
@@ -1 +1 @@
1
- import"./C_Icon2.js";import{a as e,c as t,d as n,f as r,g as i,h as a,i as o,l as s,m as c,n as l,o as u,p as d,r as f,s as p,t as m,u as h}from"./C_NotificationCenter2.js";export{e as CATEGORY_MAP,u as CATEGORY_TABS,m as C_NotificationCenter,p as DEFAULT_MAX_BADGE_COUNT,t as DEFAULT_PAGE_SIZE,s as DEFAULT_POLLING_INTERVAL,h as DEFAULT_STORAGE_KEY,n as DEFAULT_WS_HEARTBEAT_INTERVAL,r as DEFAULT_WS_HEARTBEAT_MESSAGE,d as DEFAULT_WS_MAX_RECONNECT,c as DEFAULT_WS_RECONNECT_INTERVAL,a as MOCK_MESSAGES,i as PRIORITY_MAP,f as useNotificationCore,l as useNotificationFormat,o as useNotificationWS};
1
+ import"./C_Icon2.js";import{a as e,c as t,d as n,f as r,i,l as a,m as o,n as s,o as c,p as l,r as u,s as d,u as f}from"./NotificationItem.js";import{n as p,r as m,t as h}from"./C_NotificationCenter2.js";export{u as CATEGORY_MAP,i as CATEGORY_TABS,h as C_NotificationCenter,e as DEFAULT_MAX_BADGE_COUNT,c as DEFAULT_PAGE_SIZE,d as DEFAULT_POLLING_INTERVAL,t as DEFAULT_STORAGE_KEY,a as DEFAULT_WS_HEARTBEAT_INTERVAL,f as DEFAULT_WS_HEARTBEAT_MESSAGE,n as DEFAULT_WS_MAX_RECONNECT,r as DEFAULT_WS_RECONNECT_INTERVAL,l as MOCK_MESSAGES,o as PRIORITY_MAP,p as useNotificationCore,s as useNotificationFormat,m as useNotificationWS};