@robot-admin/naive-ui-components 0.40.5 → 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 (493) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +58 -232
  3. package/README_EN.md +59 -235
  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 +3 -3
  260. package/dist/constants.d.ts +3 -3
  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 +3 -229
  265. package/dist/constants3.d.ts +3 -229
  266. package/dist/constants4.d.cts +8 -198
  267. package/dist/constants4.d.ts +8 -198
  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 +6 -6
  272. package/dist/data2.d.ts +6 -6
  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 +2 -2
  384. package/dist/mapUtils.d.ts +2 -2
  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/useCollapsePanel.d.cts +5 -5
  424. package/dist/useCollapsePanel.d.ts +5 -5
  425. package/dist/useComponentTheme.cjs +1 -1
  426. package/dist/useComponentTheme.js +1 -1
  427. package/dist/useCropperCore.d.cts +8 -8
  428. package/dist/useCropperCore.d.ts +8 -8
  429. package/dist/useDynamicFormState.d.cts +5 -4
  430. package/dist/useDynamicFormState.d.ts +5 -4
  431. package/dist/useEdgeInteraction.d.cts +1 -1
  432. package/dist/useEdgeInteraction.d.ts +1 -1
  433. package/dist/useFormArray.cjs +1 -1
  434. package/dist/useFormArray.d.cts +39 -3
  435. package/dist/useFormArray.d.ts +39 -3
  436. package/dist/useFormArray.js +1 -1
  437. package/dist/useFormRenderer.d.cts +6 -2
  438. package/dist/useFormRenderer.d.ts +6 -2
  439. package/dist/useFullscreen.d.cts +5 -97
  440. package/dist/useFullscreen.d.ts +5 -97
  441. package/dist/useGlobalSearch.d.cts +45 -3
  442. package/dist/useGlobalSearch.d.ts +45 -3
  443. package/dist/useLocalFileUrl.cjs +1 -0
  444. package/dist/useLocalFileUrl.js +1 -0
  445. package/dist/useQRCode.d.cts +5 -5
  446. package/dist/useQRCode.d.ts +5 -5
  447. package/dist/useSignatureHistory.d.cts +3 -3
  448. package/dist/useSignatureHistory.d.ts +3 -3
  449. package/dist/useSplitResize.d.cts +7 -7
  450. package/dist/useSplitResize.d.ts +7 -7
  451. package/dist/useTimeSelection.d.cts +3 -3
  452. package/dist/useTimeSelection.d.ts +3 -3
  453. package/dist/useWorkflowValidation.d.cts +6 -6
  454. package/dist/useWorkflowValidation.d.ts +6 -6
  455. package/dist/verification.d.cts +4 -4
  456. package/dist/verification.d.ts +4 -4
  457. package/dist/workflows.cjs +1 -1
  458. package/dist/workflows.d.cts +2 -2
  459. package/dist/workflows.d.ts +2 -2
  460. package/dist/workflows.js +1 -1
  461. package/docs/components.en.md +125 -135
  462. package/docs/components.md +125 -135
  463. package/docs/engineering.en.md +6 -4
  464. package/docs/engineering.md +6 -4
  465. package/docs/guides/api-migration.md +1 -1
  466. package/docs/guides/approval-viewer.md +50 -0
  467. package/docs/guides/attachments.md +39 -0
  468. package/docs/guides/batch-results.md +3 -1
  469. package/docs/guides/change-review.md +49 -0
  470. package/docs/guides/component-contracts.md +8 -0
  471. package/docs/guides/data-picker.md +75 -1
  472. package/docs/guides/data-workflows.md +27 -1
  473. package/docs/guides/dockable-workbench.md +49 -0
  474. package/docs/guides/filter-builder.md +47 -0
  475. package/docs/guides/global-search.md +49 -0
  476. package/docs/guides/image-annotator.md +27 -0
  477. package/docs/guides/import-wizard.md +40 -0
  478. package/docs/guides/notification-center.md +29 -0
  479. package/docs/guides/resource-schedule.md +58 -0
  480. package/docs/guides/scene-components.md +53 -0
  481. package/docs/guides/search-workflows.md +2 -0
  482. package/docs/guides/split-pane.md +2 -0
  483. package/docs/guides/table-density.md +47 -1
  484. package/docs/guides/task-board.md +53 -0
  485. package/docs/guides/task-panel.md +30 -0
  486. package/docs/guides/transfer.md +35 -0
  487. package/docs/guides/usage.en.md +23 -17
  488. package/docs/guides/usage.md +10 -24
  489. package/package.json +1 -1
  490. package/dist/formField.cjs +0 -1
  491. package/dist/formField.js +0 -1
  492. package/dist/html.cjs +0 -1
  493. package/dist/html.js +0 -1
package/dist/C_Code.d.cts CHANGED
@@ -1,2 +1,2 @@
1
- import { n as CodeProps, t as _default } from "./index11.vue.cjs";
1
+ import { n as CodeProps, t as _default } from "./index14.vue.cjs";
2
2
  export { _default as C_Code, type CodeProps };
package/dist/C_Code.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { n as CodeProps, t as _default } from "./index10.vue.js";
1
+ import { n as CodeProps, t as _default } from "./index13.vue.js";
2
2
  export { _default as C_Code, type CodeProps };
@@ -1,2 +1,2 @@
1
- import { i as DEFAULT_CONTEXT_MENU_PROPS, n as ContextMenuItem, r as ContextMenuProps, t as _default } from "./index12.vue.cjs";
1
+ import { i as DEFAULT_CONTEXT_MENU_PROPS, n as ContextMenuItem, r as ContextMenuProps, t as _default } from "./index15.vue.cjs";
2
2
  export { _default as C_ContextMenu, type ContextMenuItem, type ContextMenuProps, DEFAULT_CONTEXT_MENU_PROPS };
@@ -1,2 +1,2 @@
1
- import { i as DEFAULT_CONTEXT_MENU_PROPS, n as ContextMenuItem, r as ContextMenuProps, t as _default } from "./index11.vue.js";
1
+ import { i as DEFAULT_CONTEXT_MENU_PROPS, n as ContextMenuItem, r as ContextMenuProps, t as _default } from "./index14.vue.js";
2
2
  export { _default as C_ContextMenu, type ContextMenuItem, type ContextMenuProps, DEFAULT_CONTEXT_MENU_PROPS };
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./C_DataPicker2.cjs`),t=require(`./formField.cjs`);exports.C_DataPicker=e.t,exports.createDataPickerField=t.t;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./C_DataPicker2.cjs`),t=require(`./localSource.cjs`);exports.C_DataPicker=e.t,exports.createDataPickerField=t.r,exports.createDataPickerSearchField=t.n,exports.createLocalDataPickerSource=t.t;
@@ -141,67 +141,134 @@ to {
141
141
  /* layer: default */
142
142
  .filter[data-v-3a2f095a]{filter:var(--un-blur) var(--un-brightness) var(--un-contrast) var(--un-drop-shadow) var(--un-grayscale) var(--un-hue-rotate) var(--un-invert) var(--un-saturate) var(--un-sepia);}
143
143
 
144
- .c-data-picker[data-v-e5219897] {
144
+ .c-data-picker[data-v-82baab36] {
145
145
  width: 100%;
146
146
  min-width: 0;
147
147
  }
148
- .c-data-picker__inline[data-v-e5219897] {
148
+ .c-data-picker__inline[data-v-82baab36] {
149
149
  margin-top: 8px;
150
150
  min-width: 0;
151
151
  }
152
- .c-data-picker__trigger[data-v-e5219897] {
152
+ .c-data-picker__trigger[data-v-82baab36] {
153
153
  display: flex;
154
154
  align-items: center;
155
155
  gap: 8px;
156
156
  }
157
- .c-data-picker[data-v-e5219897] .c-data-picker__open {
157
+ .c-data-picker__value-tags[data-v-82baab36] {
158
+ display: flex;
159
+ align-items: center;
160
+ flex-wrap: wrap;
161
+ gap: 4px;
162
+ min-width: 0;
163
+ max-width: 60%;
164
+ }
165
+ .c-data-picker__value-tags[data-v-82baab36] .n-tag {
166
+ max-width: 100%;
167
+ }
168
+ .c-data-picker__value-tags[data-v-82baab36] .n-tag__content {
169
+ overflow: hidden;
170
+ text-overflow: ellipsis;
171
+ white-space: nowrap;
172
+ }
173
+ .c-data-picker__tag-count[data-v-82baab36] {
174
+ white-space: nowrap;
175
+ }
176
+ .c-data-picker[data-v-82baab36] .c-data-picker__open {
158
177
  flex: 1;
159
178
  min-width: 0;
160
179
  }
161
- .c-data-picker[data-v-e5219897] .c-data-picker__open .n-button__content {
180
+ .c-data-picker[data-v-82baab36] .c-data-picker__open .n-button__content {
162
181
  display: flex;
163
182
  gap: 12px;
164
183
  width: 100%;
165
184
  justify-content: space-between;
166
185
  overflow: hidden;
167
186
  }
168
- .c-data-picker[data-v-e5219897] .c-data-picker__open span:first-child {
187
+ .c-data-picker[data-v-82baab36] .c-data-picker__open span:first-child {
169
188
  overflow: hidden;
170
189
  text-overflow: ellipsis;
171
190
  white-space: nowrap;
172
191
  }
173
- .c-data-picker[data-v-e5219897] .c-data-picker__placeholder {
192
+ .c-data-picker[data-v-82baab36] .c-data-picker__placeholder {
174
193
  opacity: 0.55;
175
194
  }
176
- .c-data-picker__label-error[data-v-e5219897] {
195
+ .c-data-picker__label-error[data-v-82baab36] {
177
196
  font-size: 12px;
178
197
  color: var(--c-text-2, var(--c-theme-text-2, #525252));
179
198
  }
180
199
 
181
200
  /* layer: icons */
182
- .i-mdi\:close[data-v-e5219897]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' display='inline-block' vertical-align='middle' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;display:inline-block;vertical-align:middle;width:1em;height:1em;}
183
- .i-mdi\:magnify[data-v-e5219897]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' display='inline-block' vertical-align='middle' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5l-1.5 1.5l-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16A6.5 6.5 0 0 1 3 9.5A6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14S14 12 14 9.5S12 5 9.5 5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;display:inline-block;vertical-align:middle;width:1em;height:1em;}
184
- .i-mdi\:refresh[data-v-e5219897]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' display='inline-block' vertical-align='middle' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M17.65 6.35A7.96 7.96 0 0 0 12 4a8 8 0 0 0-8 8a8 8 0 0 0 8 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18a6 6 0 0 1-6-6a6 6 0 0 1 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;display:inline-block;vertical-align:middle;width:1em;height:1em;}
201
+ .i-mdi\:close[data-v-82baab36]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' display='inline-block' vertical-align='middle' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;display:inline-block;vertical-align:middle;width:1em;height:1em;}
202
+ .i-mdi\:magnify[data-v-82baab36]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' display='inline-block' vertical-align='middle' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5l-1.5 1.5l-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16A6.5 6.5 0 0 1 3 9.5A6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14S14 12 14 9.5S12 5 9.5 5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;display:inline-block;vertical-align:middle;width:1em;height:1em;}
203
+ .i-mdi\:refresh[data-v-82baab36]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' display='inline-block' vertical-align='middle' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M17.65 6.35A7.96 7.96 0 0 0 12 4a8 8 0 0 0-8 8a8 8 0 0 0 8 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18a6 6 0 0 1-6-6a6 6 0 0 1 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;display:inline-block;vertical-align:middle;width:1em;height:1em;}
185
204
  /* layer: default */
186
- .visible[data-v-e5219897]{visibility:visible;}
187
- .\!inline[data-v-e5219897]{display:inline !important;}
188
- .inline[data-v-e5219897]{display:inline;}
189
- .h-4[data-v-e5219897]{height:1rem;}
190
- .w-4[data-v-e5219897]{width:1rem;}
191
- .shrink-0[data-v-e5219897]{flex-shrink:0;}
192
- .table[data-v-e5219897]{display:table;}
205
+ .visible[data-v-82baab36]{visibility:visible;}
206
+ .\!inline[data-v-82baab36]{display:inline !important;}
207
+ .inline[data-v-82baab36]{display:inline;}
208
+ .h-4[data-v-82baab36]{height:1rem;}
209
+ .w-4[data-v-82baab36]{width:1rem;}
210
+ .shrink-0[data-v-82baab36]{flex-shrink:0;}
211
+ .table[data-v-82baab36]{display:table;}
193
212
 
194
- .c-data-picker__layout[data-v-9843f703] {
213
+ .c-data-picker__batch[data-v-c9d384a2] {
214
+ margin-block-end: 12px;
215
+ }
216
+ .c-data-picker__batch-body[data-v-c9d384a2] {
217
+ display: grid;
218
+ gap: 8px;
219
+ margin-block-start: 8px;
220
+ padding: 10px;
221
+ border: 1px solid var(--c-border, var(--c-theme-border, #e0e0e6));
222
+ border-radius: var(--c-radius, var(--c-theme-radius, 8px));
223
+ }
224
+ .c-data-picker__batch-actions[data-v-c9d384a2], .c-data-picker__batch-results li[data-v-c9d384a2] {
225
+ display: flex;
226
+ flex-wrap: wrap;
227
+ align-items: center;
228
+ gap: 8px;
229
+ }
230
+ .c-data-picker__batch-results[data-v-c9d384a2] {
231
+ display: grid;
232
+ gap: 6px;
233
+ max-block-size: 140px;
234
+ overflow: auto;
235
+ margin: 0;
236
+ padding: 0;
237
+ list-style: none;
238
+ font-size: 12px;
239
+ }
240
+ .c-data-picker__batch-code[data-v-c9d384a2], .c-data-picker__batch-label[data-v-c9d384a2] {
241
+ overflow-wrap: anywhere;
242
+ }
243
+ .c-data-picker__batch-code[data-v-c9d384a2] {
244
+ font-weight: 600;
245
+ }
246
+ .c-data-picker__batch-error[data-v-c9d384a2] {
247
+ margin: 0;
248
+ font-size: 12px;
249
+ color: var(--c-error, var(--c-theme-error, #d03050));
250
+ }
251
+
252
+ /* layer: default */
253
+ .visible[data-v-c9d384a2]{visibility:visible;}
254
+ .grid[data-v-c9d384a2]{display:grid;}
255
+ .inline[data-v-c9d384a2]{display:inline;}
256
+ .flex[data-v-c9d384a2]{display:flex;}
257
+ .flex-wrap[data-v-c9d384a2]{flex-wrap:wrap;}
258
+ .table[data-v-c9d384a2]{display:table;}
259
+ .border[data-v-c9d384a2]{border-width:1px;}
260
+
261
+ .c-data-picker__layout[data-v-2a67d960] {
195
262
  display: flex;
196
263
  gap: 12px;
197
264
  align-items: stretch;
198
265
  }
199
- .c-data-picker__navigation[data-v-9843f703] {
266
+ .c-data-picker__navigation[data-v-2a67d960] {
200
267
  flex: 0 0 180px;
201
268
  max-height: 420px;
202
269
  overflow: auto;
203
270
  }
204
- .c-data-picker__selected-panel[data-v-9843f703] {
271
+ .c-data-picker__selected-panel[data-v-2a67d960] {
205
272
  flex: 0 0 224px;
206
273
  min-width: 0;
207
274
  max-height: 420px;
@@ -209,40 +276,47 @@ to {
209
276
  border-inline-start: 1px solid var(--c-border, var(--c-theme-border, #e0e0e6));
210
277
  padding-inline-start: 12px;
211
278
  }
212
- .c-data-picker__navigation-title[data-v-9843f703] {
279
+ .c-data-picker__navigation-title[data-v-2a67d960] {
213
280
  margin-block: 4px 8px;
214
281
  font-weight: 600;
215
282
  }
216
- .c-data-picker__favorite[data-v-9843f703] {
283
+ .c-data-picker__favorite[data-v-2a67d960] {
217
284
  display: inline-flex;
218
285
  gap: 2px;
219
286
  }
220
- .c-data-picker__main[data-v-9843f703] {
287
+ .c-data-picker__main[data-v-2a67d960] {
221
288
  min-width: 0;
222
289
  flex: 1;
223
290
  }
224
- .c-data-picker__footer[data-v-9843f703] {
291
+ .c-data-picker__footer[data-v-2a67d960] {
225
292
  margin-top: 12px;
226
293
  }
227
- .c-data-picker__history > div[data-v-9843f703] {
294
+ .c-data-picker__history > div[data-v-2a67d960] {
228
295
  display: flex;
229
296
  flex-wrap: wrap;
230
297
  align-items: center;
231
298
  gap: 6px;
232
299
  margin-block: 8px;
233
300
  }
234
- .c-data-picker__content[data-v-9843f703]:focus {
301
+ .c-data-picker__content[data-v-2a67d960]:focus {
235
302
  outline: none;
236
303
  }
237
- .c-data-picker__search[data-v-9843f703], .c-data-picker__actions[data-v-9843f703], .c-data-picker__selection[data-v-9843f703] {
304
+ .c-data-picker[data-v-2a67d960] tr[data-picker-active] > td {
305
+ background-color: var(--c-bg-hover, var(--c-theme-bg-hover, #f5f5f5));
306
+ }
307
+ .c-data-picker[data-v-2a67d960] tr[data-picker-active]:focus {
308
+ outline: 2px solid var(--c-primary, var(--c-theme-primary, #2080f0));
309
+ outline-offset: -2px;
310
+ }
311
+ .c-data-picker__search[data-v-2a67d960], .c-data-picker__actions[data-v-2a67d960], .c-data-picker__selection[data-v-2a67d960] {
238
312
  display: flex;
239
313
  align-items: center;
240
314
  gap: 8px;
241
315
  }
242
- .c-data-picker__search[data-v-9843f703] {
316
+ .c-data-picker__search[data-v-2a67d960] {
243
317
  margin-bottom: 12px;
244
318
  }
245
- .c-data-picker__result-bar[data-v-9843f703] {
319
+ .c-data-picker__result-bar[data-v-2a67d960] {
246
320
  display: flex;
247
321
  align-items: center;
248
322
  justify-content: space-between;
@@ -250,61 +324,62 @@ to {
250
324
  gap: 6px 12px;
251
325
  margin-block-start: 10px;
252
326
  }
253
- .c-data-picker__pagination[data-v-9843f703] {
327
+ .c-data-picker__pagination[data-v-2a67d960] {
254
328
  margin-inline-start: auto;
255
329
  max-width: 100%;
256
330
  }
257
- .c-data-picker__pagination[data-v-9843f703] .n-pagination {
331
+ .c-data-picker__pagination[data-v-2a67d960] .n-pagination {
258
332
  flex-wrap: wrap;
259
333
  justify-content: flex-end;
260
334
  }
261
- .c-data-picker__selection[data-v-9843f703] {
335
+ .c-data-picker__selection[data-v-2a67d960] {
262
336
  flex-wrap: wrap;
263
337
  min-width: 0;
264
338
  max-width: 100%;
265
339
  font-size: 12px;
266
340
  }
267
- .c-data-picker__selection[data-v-9843f703] .n-tag {
341
+ .c-data-picker__selection[data-v-2a67d960] .n-tag {
268
342
  max-width: 100%;
269
343
  }
270
- .c-data-picker__selection[data-v-9843f703] .n-tag__content {
344
+ .c-data-picker__selection[data-v-2a67d960] .n-tag__content {
271
345
  overflow: hidden;
272
346
  text-overflow: ellipsis;
273
347
  white-space: nowrap;
274
348
  }
275
- .c-data-picker__actions[data-v-9843f703] {
349
+ .c-data-picker__actions[data-v-2a67d960] {
276
350
  justify-content: flex-end;
277
351
  }
278
- .c-data-picker__error[data-v-9843f703] {
352
+ .c-data-picker__error[data-v-2a67d960] {
279
353
  font-size: 12px;
280
354
  color: var(--c-text-2, var(--c-theme-text-2, #525252));
281
355
  }
282
356
  @media (max-width: 640px) {
283
- .c-data-picker__layout[data-v-9843f703] {
357
+ .c-data-picker__layout[data-v-2a67d960] {
284
358
  flex-direction: column;
285
359
  }
286
- .c-data-picker__selected-panel[data-v-9843f703] {
360
+ .c-data-picker__selected-panel[data-v-2a67d960] {
287
361
  flex-basis: auto;
288
362
  max-height: 240px;
289
363
  border-inline-start: 0;
290
364
  border-top: 1px solid var(--c-border, var(--c-theme-border, #e0e0e6));
291
365
  padding: 12px 0 0;
292
366
  }
293
- .c-data-picker__navigation[data-v-9843f703] {
367
+ .c-data-picker__navigation[data-v-2a67d960] {
294
368
  flex-basis: auto;
295
369
  max-height: 160px;
296
370
  }
297
371
  }
298
372
 
299
373
  /* layer: icons */
300
- .i-mdi\:check[data-v-9843f703]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' display='inline-block' vertical-align='middle' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M21 7L9 19l-5.5-5.5l1.41-1.41L9 16.17L19.59 5.59z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;display:inline-block;vertical-align:middle;width:1em;height:1em;}
301
- .i-mdi\:close[data-v-9843f703]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' display='inline-block' vertical-align='middle' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;display:inline-block;vertical-align:middle;width:1em;height:1em;}
302
- .i-mdi\:magnify[data-v-9843f703]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' display='inline-block' vertical-align='middle' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5l-1.5 1.5l-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16A6.5 6.5 0 0 1 3 9.5A6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14S14 12 14 9.5S12 5 9.5 5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;display:inline-block;vertical-align:middle;width:1em;height:1em;}
303
- .i-mdi\:refresh[data-v-9843f703]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' display='inline-block' vertical-align='middle' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M17.65 6.35A7.96 7.96 0 0 0 12 4a8 8 0 0 0-8 8a8 8 0 0 0 8 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18a6 6 0 0 1-6-6a6 6 0 0 1 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;display:inline-block;vertical-align:middle;width:1em;height:1em;}
374
+ .i-mdi\:check[data-v-2a67d960]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' display='inline-block' vertical-align='middle' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M21 7L9 19l-5.5-5.5l1.41-1.41L9 16.17L19.59 5.59z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;display:inline-block;vertical-align:middle;width:1em;height:1em;}
375
+ .i-mdi\:close[data-v-2a67d960]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' display='inline-block' vertical-align='middle' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;display:inline-block;vertical-align:middle;width:1em;height:1em;}
376
+ .i-mdi\:magnify[data-v-2a67d960]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' display='inline-block' vertical-align='middle' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5l-1.5 1.5l-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16A6.5 6.5 0 0 1 3 9.5A6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14S14 12 14 9.5S12 5 9.5 5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;display:inline-block;vertical-align:middle;width:1em;height:1em;}
377
+ .i-mdi\:refresh[data-v-2a67d960]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' display='inline-block' vertical-align='middle' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M17.65 6.35A7.96 7.96 0 0 0 12 4a8 8 0 0 0-8 8a8 8 0 0 0 8 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18a6 6 0 0 1-6-6a6 6 0 0 1 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;display:inline-block;vertical-align:middle;width:1em;height:1em;}
304
378
  /* layer: default */
305
- .visible[data-v-9843f703]{visibility:visible;}
306
- .inline[data-v-9843f703]{display:inline;}
307
- .hidden[data-v-9843f703]{display:none;}
308
- .h-4[data-v-9843f703]{height:1rem;}
309
- .w-4[data-v-9843f703]{width:1rem;}
310
- .table[data-v-9843f703]{display:table;}
379
+ .visible[data-v-2a67d960]{visibility:visible;}
380
+ .inline[data-v-2a67d960]{display:inline;}
381
+ .block[data-v-2a67d960]{display:block;}
382
+ .hidden[data-v-2a67d960]{display:none;}
383
+ .h-4[data-v-2a67d960]{height:1rem;}
384
+ .w-4[data-v-2a67d960]{width:1rem;}
385
+ .table[data-v-2a67d960]{display:table;}
@@ -1,3 +1,3 @@
1
- import { a as DataPickerNavigationContext, c as DataPickerRequest, d as DataPickerSource, f as DataPickerSourceInput, i as DataPickerNavigation, l as DataPickerSelectedItem, n as DataPickerExpose, o as DataPickerNavigationNode, p as DataPickerValue, r as DataPickerHistoryOptions, s as DataPickerProps, t as DataPickerEmits, u as DataPickerSelectionContext } from "./types4.cjs";
2
- import { n as _default, t as createDataPickerField } from "./formField.cjs";
3
- export { _default as C_DataPicker, type DataPickerEmits, type DataPickerExpose, type DataPickerHistoryOptions, type DataPickerNavigation, type DataPickerNavigationContext, type DataPickerNavigationNode, type DataPickerProps, type DataPickerRequest, type DataPickerSelectedItem, type DataPickerSelectionContext, type DataPickerSource, type DataPickerSourceInput, type DataPickerValue, createDataPickerField };
1
+ import { a as DataPickerNavigation, c as DataPickerProps, d as DataPickerSelectionContext, f as DataPickerSource, i as DataPickerHistoryOptions, l as DataPickerRequest, m as DataPickerValue, n as DataPickerEmits, o as DataPickerNavigationContext, p as DataPickerSourceInput, r as DataPickerExpose, s as DataPickerNavigationNode, t as DataPickerBatchPasteOptions, u as DataPickerSelectedItem } from "./types6.cjs";
2
+ import { a as createDataPickerField, i as DataPickerFieldSelection, n as createLocalDataPickerSource, o as _default, r as createDataPickerSearchField, t as LocalDataPickerSourceOptions } from "./localSource.cjs";
3
+ export { _default as C_DataPicker, type DataPickerBatchPasteOptions, type DataPickerEmits, type DataPickerExpose, type DataPickerFieldSelection, type DataPickerHistoryOptions, type DataPickerNavigation, type DataPickerNavigationContext, type DataPickerNavigationNode, type DataPickerProps, type DataPickerRequest, type DataPickerSelectedItem, type DataPickerSelectionContext, type DataPickerSource, type DataPickerSourceInput, type DataPickerValue, type LocalDataPickerSourceOptions, createDataPickerField, createDataPickerSearchField, createLocalDataPickerSource };
@@ -1,6 +1,7 @@
1
1
  import "./types.js";
2
2
  import "./component-config.js";
3
- import { a as DataPickerNavigationContext, c as DataPickerRequest, d as DataPickerSource, f as DataPickerSourceInput, i as DataPickerNavigation, l as DataPickerSelectedItem, n as DataPickerExpose, o as DataPickerNavigationNode, p as DataPickerValue, r as DataPickerHistoryOptions, s as DataPickerProps, t as DataPickerEmits, u as DataPickerSelectionContext } from "./types3.js";
4
- import { n as _default, t as createDataPickerField } from "./formField.js";
3
+ import { a as DataPickerNavigation, c as DataPickerProps, d as DataPickerSelectionContext, f as DataPickerSource, i as DataPickerHistoryOptions, l as DataPickerRequest, m as DataPickerValue, n as DataPickerEmits, o as DataPickerNavigationContext, p as DataPickerSourceInput, r as DataPickerExpose, s as DataPickerNavigationNode, t as DataPickerBatchPasteOptions, u as DataPickerSelectedItem } from "./types5.js";
4
+ import { a as createDataPickerField, i as DataPickerFieldSelection, n as createLocalDataPickerSource, o as _default, r as createDataPickerSearchField, t as LocalDataPickerSourceOptions } from "./localSource.js";
5
5
  import "./useFormRenderer.js";
6
- export { _default as C_DataPicker, type DataPickerEmits, type DataPickerExpose, type DataPickerHistoryOptions, type DataPickerNavigation, type DataPickerNavigationContext, type DataPickerNavigationNode, type DataPickerProps, type DataPickerRequest, type DataPickerSelectedItem, type DataPickerSelectionContext, type DataPickerSource, type DataPickerSourceInput, type DataPickerValue, createDataPickerField };
6
+ import "./types6.js";
7
+ export { _default as C_DataPicker, type DataPickerBatchPasteOptions, type DataPickerEmits, type DataPickerExpose, type DataPickerFieldSelection, type DataPickerHistoryOptions, type DataPickerNavigation, type DataPickerNavigationContext, type DataPickerNavigationNode, type DataPickerProps, type DataPickerRequest, type DataPickerSelectedItem, type DataPickerSelectionContext, type DataPickerSource, type DataPickerSourceInput, type DataPickerValue, type LocalDataPickerSourceOptions, createDataPickerField, createDataPickerSearchField, createLocalDataPickerSource };
@@ -1 +1 @@
1
- import{t as e}from"./C_DataPicker2.js";import{t}from"./formField.js";export{e as C_DataPicker,t as createDataPickerField};
1
+ import{t as e}from"./C_DataPicker2.js";import{n as t,r as n,t as r}from"./localSource.js";export{e as C_DataPicker,n as createDataPickerField,t as createDataPickerSearchField,r as createLocalDataPickerSource};
@@ -1 +1 @@
1
- require(`./chunk.cjs`);const e=require(`./density.cjs`),t=require(`./useDataResource.cjs`),n=require(`./data2.cjs`),r=require(`./context.cjs`),i=require(`./useComponentLocale.cjs`),a=require(`./useComponentTheme.cjs`),o=require(`./export-helper.cjs`),s=require(`./useComponentDensity.cjs`),c=require(`./useFormConfig.cjs`),l=require(`./storage.cjs`),u=require(`./helpers.cjs`);let d=require(`vue`),f=require(`naive-ui`);function p(e){return typeof e==`string`||typeof e==`number`&&Number.isFinite(e)}function m(e,t){let n=typeof e.rowKey==`function`?e.rowKey(t):t[e.rowKey];if(!p(n))throw TypeError(`[C_DataPicker] rowKey 必须为字符串或有限数值`);return n}function h(e,t){return e.value===void 0?m(e,t):e.value(t)}function g(e,t){if(e.value===void 0)return;let n=new Set;for(let r of t){let t=e.value(r);if(!p(t)||n.has(t))throw TypeError(`[C_DataPicker] 业务值必须为唯一的字符串或有限数值`);n.add(t)}}function _(e,t,n){if(!Array.isArray(t.rows)||!Number.isSafeInteger(t.total)||t.total<0)throw TypeError(`[C_DataPicker] request 必须返回 rows 数组和非负安全整数 total`);if(t.rows.length>n||t.rows.length>t.total)throw TypeError(`[C_DataPicker] rows 超过请求的分页或 total 范围`);if(u.l(t.rows,t=>m(e,t)).length)throw TypeError(`[C_DataPicker] rowKey 不得缺失或重复`);g(e,t.rows)}function v(e){let t=(0,d.shallowRef)([]),n=(0,d.shallowRef)([]),r=(0,d.computed)(()=>{let t=e.history?.maxItems;return t!==void 0&&Number.isFinite(t)?Math.max(1,Math.min(50,Math.trunc(t))):10}),i=(0,d.computed)(()=>{let t=e.history;if(!(!e.source.resolve||!t?.storageKey||!t.scope))try{return`c-data-picker:${JSON.stringify([t.storageKey,t.scope,e.fixedFilters??null,...e.scope===void 0?[]:[e.scope]])}`}catch{return}}),a=e=>{if(!Array.isArray(e))return[];let t=new Map;for(let n of e)if(n&&typeof n==`object`&&p(n.value)&&typeof n.label==`string`&&!t.has(n.value)&&t.set(n.value,{value:n.value,label:n.label.slice(0,200)}),t.size===r.value)break;return[...t.values()]};(0,d.watch)([i,r,()=>e.history?.favorites],()=>{let r=i.value?l.t(i.value):null,o=r&&typeof r==`object`?r:{};t.value=a(Reflect.get(o,`recent`)),n.value=e.history?.favorites?a(Reflect.get(o,`favorites`)):[]},{immediate:!0});let o=()=>{i.value&&l.i(i.value,{recent:t.value,favorites:n.value})};return{enabled:(0,d.computed)(()=>!!i.value),recent:t,favorites:n,remember:e=>{i.value&&(t.value=a([...e,...t.value]),o())},toggleFavorite:t=>{if(!i.value||!e.history?.favorites)return;let r=n.value.filter(e=>e.value!==t.value);n.value=r.length===n.value.length?a([t,...r]):r,o()},addFavorites:t=>{if(!i.value||!e.history?.favorites)return;let r=a([...n.value,...t]);r.length===n.value.length&&r.every((e,t)=>e.value===n.value[t].value&&e.label===n.value[t].label)||(n.value=r,o())},canAddFavorite:(0,d.computed)(()=>n.value.length<r.value)}}function y(e){let t=(0,d.shallowRef)(!1),n=(0,d.shallowRef)(null),r,i=()=>{r?.abort(),r=void 0,t.value=!1,n.value=null};return{pending:t,error:n,resolve:async a=>{i();let{source:o}=e;if(!o.resolve)return;let s=new AbortController;r=s,t.value=!0;let c=!1;try{let t=[...e.scope===void 0?await o.resolve(a,s.signal):await o.resolve(a,s.signal,{scope:e.scope})];if(s.signal.aborted||r!==s)return;c=!0,_(o,{rows:t,total:t.length},t.length);let n=new Map(t.map(e=>[h(o,e),e]));if(!a.every(t=>{let r=n.get(t);return r!==void 0&&e.rowCheckable?.(r)!==!1&&!e.disabledReason?.(r)}))throw Error(`Selection is missing or no longer eligible`);return n}catch(e){s.signal.aborted||(n.value={kind:c?`invalid`:`failed`,cause:e});return}finally{r===s&&(r=void 0,t.value=!1)}},abort:i}}function b(e){return e==null?[]:[...new Set(Array.isArray(e)?e:[e])]}function x(e,r,i,a,o=()=>!1){let s=(0,d.shallowRef)(!1),c=(0,d.shallowRef)({page:1,search:``,revision:0}),l=(0,d.computed)({get:()=>c.value.page,set:e=>{c.value={...c.value,page:e}}}),u=(0,d.shallowRef)(``),f=(0,d.computed)(()=>c.value.search),p=(0,d.computed)(()=>{let{debounce:t,minChars:n}=e.source;return{debounce:t!==void 0&&Number.isSafeInteger(t)&&t>=0?t:250,minChars:n!==void 0&&Number.isSafeInteger(n)&&n>=0?n:0}}),g=(0,d.shallowRef)(0),x=(0,d.shallowRef)(0),S=(0,d.shallowRef)(new Map),C=(0,d.shallowRef)(new Map),w=(0,d.computed)(()=>{let t=b(e.modelValue);return e.multiple?t:t.slice(0,1)}),T=(0,d.computed)(()=>Number.isFinite(e.pageSize)&&e.pageSize>0?Math.max(1,Math.trunc(e.pageSize)):20),E=(0,d.computed)(()=>e.disabled||e.readonly),D=(0,d.computed)(()=>{if(!e.multiple)return 1;let t=e.maxSelection;return t!==void 0&&Number.isFinite(t)&&t>=1?Math.trunc(t):1/0}),O=v(e),k=y(e),{pending:A,error:ee}=k,j=n.t(e.initialValues),M=n.t(e.fixedFilters),N=!1,P,F=t=>h(e.source,t),I=t=>e.rowCheckable?.(t)!==!1&&!e.disabledReason?.(t),L=t=>!e.multiple||S.value.has(t)||S.value.size<D.value,R=t=>e.fixedFilters===void 0?n.t(t):{...n.t(t),...n.t(e.fixedFilters)},z=()=>{Z(),C.value=new Map,g.value++};(0,d.watch)(()=>[e.source,e.source.request,e.source.resolve,e.source.rowKey,e.source.value],z,{flush:`sync`}),(0,d.watch)(()=>e.fixedFilters,e=>{n.a(M,e)||(M=n.t(e),z())},{deep:!0,flush:`sync`}),(0,d.watch)(()=>e.history?.scope,z,{flush:`sync`}),(0,d.watch)(()=>e.scope,z,{flush:`sync`}),(0,d.watch)(()=>e.initialValues,e=>{n.a(j,e)||(j=n.t(e),Z())},{deep:!0,flush:`sync`});let B=t.t({key:()=>s.value&&(!o()||u.value===f.value&&u.value.length>=p.value.minChars)?JSON.stringify([g.value,x.value,l.value,T.value,c.value.revision]):null,load:async({signal:t})=>{let{source:n}=e,{filters:r}=c.value,i=R(r),a={page:l.value,pageSize:T.value,search:f.value,signal:t,...e.scope===void 0?{}:{scope:e.scope},...i===void 0?{}:{filters:i}},o=await n.request(a);return _(n,o,a.pageSize),{rows:[...o.rows],total:o.total}},isEmpty:e=>e.rows.length===0}),V=t.t({key:()=>e.source.resolve&&w.value.length?JSON.stringify([g.value,w.value]):null,load:async({signal:t})=>{let{source:n}=e,r=[...w.value],i=e.scope===void 0?await n.resolve(r,t):await n.resolve(r,t,{scope:e.scope});if(!Array.isArray(i))throw TypeError(`[C_DataPicker] resolve 必须返回行数组`);let a=new Set(r),o=new Map;for(let e of i){let t=h(n,e);a.has(t)&&o.set(t,e)}return o},isEmpty:e=>e.size===0}),te=[],H=(0,d.computed)(()=>B.data.value?.rows??te),U=(0,d.shallowRef)(null);(0,d.watch)(B.data,e=>{if(!s.value||!e)return;U.value=e.total;let t=Math.max(1,Math.ceil(e.total/T.value));l.value>t&&(l.value=t)});function W(e){let t=C.value.get(e);return t?.fromPage?t.row:V.data.value?.get(e)??t?.row}let ne=(0,d.computed)(()=>w.value.map(t=>{let n=W(t);return n?e.source.label(n):String(t)}).join(`、`)),G=(0,d.computed)(()=>S.value.size),K=(0,d.computed)(()=>!E.value&&!A.value&&G.value<=D.value&&(!e.requireSelection||G.value>0)&&(!(e.rowCheckable||e.disabledReason)||[...S.value.keys()].every(e=>{let t=$(e);return t!==void 0&&I(t)}))),q=(0,d.computed)(()=>{let t=[];for(let n of S.value.keys()){let r=$(n);t.push({value:n,label:r?e.source.label(r):String(n),row:r})}return t}),J=(0,d.computed)(()=>q.value.slice(0,30)),Y=(0,d.computed)(()=>[{type:`selection`,multiple:e.multiple},...e.columns.filter(e=>e.type!==`selection`)]),X=(0,d.computed)(()=>({density:a(),locale:e.locale,toolbar:{show:!1},pagination:!1,selection:{enabled:!0,maxSelection:Number.isFinite(D.value)?D.value:void 0,rowCheckable:e=>!A.value&&I(e)&&L(F(e))},display:{maxHeight:360},virtualScroll:{enabled:H.value.length>30,maxHeight:360}}));function Z(){s.value=!1,U.value=null,S.value=new Map,P=void 0,k.abort()}(0,d.onDeactivated)(Z),(0,d.onScopeDispose)(Z);function Q(){E.value||s.value||(S.value=new Map(w.value.map(e=>[e,void 0])),c.value={page:1,search:``,filters:R(j),revision:0},u.value=``,x.value++,s.value=!0)}function $(e){return S.value.get(e)??W(e)}let re=(0,d.computed)(()=>!!(e.source.resolve&&(e.rowCheckable||e.disabledReason||e.revalidateOnConfirm||O.enabled.value||e.presentation===`popover`)));async function ie(){if(!K.value||!s.value)return!1;let e=[...S.value.keys()],t=x.value,n=re.value,r=n?await k.resolve(e):void 0;return n&&!r||!s.value||x.value!==t||!K.value?!1:(ae(e,r),!0)}function ae(t,n){let{source:i}=e,a=new Map,o=[];for(let e of t){let t=n?.get(e)??$(e);t&&(a.set(e,{row:t,fromPage:S.value.get(e)!==void 0||C.value.get(e)?.fromPage===!0}),o.push(t))}C.value=a,O.remember(o.map(e=>({value:F(e),label:i.label(e)}))),Z(),r(`update:modelValue`,e.multiple?t:t[0]??null),r(`select`,o)}function oe(){E.value||!e.clearable||(r(`update:modelValue`,e.multiple?[]:null),r(`select`,[]))}function se(){if(P?.rows===H.value&&P.table===i.value)return P.table}function ce(e,t){if(N||A.value||!s.value||!se())return;let n=le(t);S.value=n;let r=H.value.filter(e=>n.has(F(e)));(t.length!==r.length||t.some(e=>!n.has(F(e))))&&(0,d.nextTick)(fe)}function le(t){let n=new Set(H.value.map(F)),r=new Set(t.map(F)),i=new Map(e.multiple?[...S.value].filter(([e])=>!n.has(e)||r.has(e)):[]),a=new Map(H.value.map(t=>[m(e.source,t),t])),o=e.multiple?t:t.slice(-1);for(let t of o){let n=a.get(m(e.source,t));if(!n||!I(n))continue;let r=F(n);!i.has(r)&&i.size>=D.value||i.set(r,n)}return i}function ue(t){if(A.value)return;let n=new Map(S.value);if(!n.delete(t))return;S.value=n;let r=se();if(!r)return;let i=H.value.find(e=>F(e)===t);if(i){N=!0;try{r.unselectRow(m(e.source,i))}finally{N=!1}}}function de(e,t){if(!s.value||A.value||E.value||!Number.isInteger(t))return;let n=[...S.value],r=n.findIndex(([t])=>t===e),i=r+t;if(r<0||i<0||i>=n.length||r===i)return;let[a]=n.splice(r,1);n.splice(i,0,a),S.value=new Map(n)}function fe(){let t=i.value;if(!(!s.value||!t)){N=!0;try{P={table:t,rows:H.value};let n;t.clearSelection();for(let r of H.value){let i=F(r);S.value.has(i)&&(S.value.get(i)!==r&&(n??=new Map(S.value)).set(i,r),I(r)&&t.selectRow(e.source.value===void 0?i:m(e.source,r)))}n&&(S.value=n)}finally{N=!1}}}function pe(){ye(u.value,c.value.filters)}function me(t){let n={...t},{navigation:r}=e,i=c.value.filters;r&&i&&!Object.prototype.hasOwnProperty.call(t,r.field)&&Object.prototype.hasOwnProperty.call(i,r.field)&&Reflect.set(n,r.field,i[r.field]),ye(``,R(n))}function he(t){let{navigation:n}=e;if(!n)return;let r={...c.value.filters};t===void 0?Reflect.deleteProperty(r,n.field):Reflect.set(r,n.field,t),ye(u.value,R(r))}async function ge(t){if(E.value||!s.value||!e.source.resolve||A.value)return;let n=(await k.resolve([t]))?.get(t);!n||!s.value||L(t)&&(S.value=e.multiple?new Map(S.value).set(t,n):new Map([[t,n]]),fe())}function _e(){if(E.value||!K.value)return;let t=[];for(let n of S.value.keys()){let r=$(n);r&&I(r)&&t.push({value:n,label:e.source.label(r)})}O.addFavorites(t)}function ve(e){if(E.value||A.value)return;let t=O.favorites.value.find(t=>t.value===e);t&&O.toggleFavorite(t)}function ye(e,t){if(!s.value||E.value||A.value)return;let r=c.value,i=r.search===e&&n.a(r.filters,t);if(r.page===1&&i){B.reload();return}i||(U.value=null),c.value={page:1,search:e,filters:n.t(t),revision:r.revision+1}}return(0,d.watch)([H,i],()=>{(0,d.nextTick)(fe)},{flush:`post`}),(0,d.watch)(w,(e,t)=>{if(e.length===t.length&&e.every((e,n)=>Object.is(e,t[n]))||(Z(),!C.value.size))return;let n=new Set(e);C.value=new Map([...C.value].filter(([e])=>n.has(e)))},{flush:`sync`}),(0,d.watch)([()=>e.multiple,()=>e.disabled,()=>e.readonly],Z,{flush:`sync`}),{opened:s,reset:z,open:Q,close:Z,confirm:ie,clear:oe,page:l,pageSize:T,searchDraft:u,search:f,searchOptions:p,query:pe,submitFilters:me,list:B,labels:V,rows:H,total:U,display:ne,selected:J,selectedItems:q,move:de,selectedCount:G,canConfirm:K,columns:Y,tableConfig:X,selectPage:ce,remove:ue,confirming:A,selectionError:ee,history:O,chooseHistory:ge,navigate:he,favoriteSelection:_e,removeFavorite:ve,canFavorite:(0,d.computed)(()=>K.value&&O.canAddFavorite.value&&[...S.value.keys()].some(e=>$(e)!==void 0&&!O.favorites.value.some(t=>t.value===e))),filters:(0,d.computed)(()=>n.t(c.value.filters)),setTable:e=>{i.value=e}}}const S=[`id`,`role`,`aria-label`],C=[`tabindex`],w={class:`c-data-picker__layout`},T={key:0,class:`c-data-picker__navigation`},E={key:0,class:`c-data-picker__navigation-title`},D={class:`c-data-picker__main`},O={key:1,class:`c-data-picker__error`,role:`alert`},k={key:1,class:`c-data-picker__selected-panel`},A={key:0,role:`alert`,class:`c-data-picker__error`},ee={key:1,class:`c-data-picker__history`},j={key:0},M={key:1},N={class:`c-data-picker__result-bar`},P={class:`c-data-picker__selection`,"aria-live":`polite`},F={key:0},I={key:1},L=[`aria-label`],R={key:0,class:`c-data-picker__footer`},z={class:`c-data-picker__actions`},B=(0,d.defineComponent)({__name:`PickerPanel`,props:{state:{},options:{},densityValue:{},inline:{type:Boolean},popup:{type:Boolean},panelId:{}},emits:[`confirm`,`dismiss`],setup(t,{expose:n,emit:a}){let o=t,s=a,{t:c}=i.t(()=>o.options.locale),l=(0,d.inject)(r.r,{}),u=(0,d.computed)(()=>({...l.messages,...o.options.locale?.messages}));(0,d.provide)(r.r,{get locale(){return o.options.locale?.locale??l.locale},get messages(){return u.value},get t(){return o.options.locale?.t??l.t}});let p=(0,d.computed)(()=>e.t(o.densityValue)),{opened:m,page:h,pageSize:g,searchDraft:_,query:v,submitFilters:y,list:b,rows:x,total:B,selected:V,selectedItems:te,move:H,selectedCount:U,canConfirm:W,columns:ne,tableConfig:G,selectPage:K,remove:q,confirming:J,selectionError:Y,history:X,chooseHistory:Z,navigate:Q,filters:$}=o.state,re=(0,d.computed)(()=>o.options.source),ie=(0,d.computed)(()=>o.options.initialValues),ae=(0,d.shallowRef)(null),oe=(0,d.defineAsyncComponent)({loader:()=>Promise.resolve().then(()=>require(`./C_Table2.cjs`)).then(e=>e.n),loadingComponent:()=>(0,d.h)(`div`,{role:`status`},c(`table.loading`)),errorComponent:()=>(0,d.h)(`div`,{role:`alert`},c(`picker.loadFailed`))}),se=(0,d.defineAsyncComponent)(()=>Promise.resolve().then(()=>require(`./C_Tree2.cjs`)).then(e=>e.n)),ce=e=>{let t=typeof e==`object`&&!!e&&[`clearSelection`,`selectRow`,`unselectRow`].every(t=>typeof Reflect.get(e,t)==`function`);o.state.setTable(t?e:null)};function le(e){!o.inline||e.isComposing||(e.preventDefault(),e.stopPropagation(),v())}let ue=()=>o.options.navigation?.render?.({value:de.value[0],select:Q,disabled:J.value||!!o.options.disabled||!!o.options.readonly,density:o.densityValue}),de=(0,d.computed)(()=>{let e=o.options.navigation?.field,t=e&&$.value?Reflect.get($.value,e):void 0;return typeof t==`string`||typeof t==`number`?[t]:[]});return n({focus:()=>{(ae.value?.querySelector(`input:not([type="hidden"])`)??ae.value)?.focus()}}),(e,n)=>((0,d.openBlock)(),(0,d.createElementBlock)(`div`,{class:`c-data-picker__panel`,id:t.popup?t.panelId:void 0,role:t.popup?`dialog`:void 0,"aria-label":t.options.title??(0,d.unref)(c)(`picker.title`)},[(0,d.createElementVNode)(`div`,{ref_key:`panelContent`,ref:ae,class:`c-data-picker__content`,tabindex:t.inline?-1:void 0},[(0,d.createElementVNode)(`div`,w,[t.options.navigation||e.$slots.navigation?((0,d.openBlock)(),(0,d.createElementBlock)(`aside`,T,[(0,d.renderSlot)(e.$slots,`navigation`,{filters:(0,d.unref)($),submit:(0,d.unref)(y),loading:(0,d.unref)(b).loading.value},()=>[t.options.navigation?.render?((0,d.openBlock)(),(0,d.createBlock)((0,d.resolveDynamicComponent)(ue),{key:0})):((0,d.openBlock)(),(0,d.createElementBlock)(d.Fragment,{key:1},[t.options.navigation?.title?((0,d.openBlock)(),(0,d.createElementBlock)(`div`,E,(0,d.toDisplayString)(t.options.navigation.title),1)):(0,d.createCommentVNode)(`v-if`,!0),(0,d.createVNode)((0,d.unref)(f.NButton),{text:``,disabled:(0,d.unref)(J)||t.options.disabled||t.options.readonly,onClick:n[0]||=e=>(0,d.unref)(Q)(void 0)},{default:(0,d.withCtx)(()=>[(0,d.createTextVNode)((0,d.toDisplayString)((0,d.unref)(c)(`picker.allCategories`)),1)]),_:1},8,[`disabled`]),t.options.navigation?((0,d.openBlock)(),(0,d.createBlock)((0,d.unref)(se),{key:1,density:t.densityValue,data:[...t.options.navigation.options],"key-field":`key`,"label-field":`label`,"selected-keys":de.value,addable:!1,refreshable:!1,disabled:(0,d.unref)(J)||t.options.disabled||t.options.readonly,onNodeSelect:n[1]||=(e,t)=>(0,d.unref)(Q)(t[0])},null,8,[`density`,`data`,`selected-keys`,`disabled`])):(0,d.createCommentVNode)(`v-if`,!0)],64))],!0)])):(0,d.createCommentVNode)(`v-if`,!0),(0,d.createElementVNode)(`div`,D,[(0,d.unref)(m)?(0,d.renderSlot)(e.$slots,`query`,{initialValues:ie.value,submit:(0,d.unref)(y),loading:(0,d.unref)(b).loading.value},()=>[((0,d.openBlock)(),(0,d.createBlock)((0,d.resolveDynamicComponent)(t.inline?`div`:`form`),{class:`c-data-picker__search`,onSubmit:(0,d.withModifiers)((0,d.unref)(v),[`stop`,`prevent`])},{default:(0,d.withCtx)(()=>[(0,d.createVNode)((0,d.unref)(f.NInput),{value:(0,d.unref)(_),"onUpdate:value":n[2]||=e=>(0,d.isRef)(_)?_.value=e:null,size:p.value.size,placeholder:(0,d.unref)(c)(`picker.searchPlaceholder`),"input-props":{"aria-label":(0,d.unref)(c)(`picker.searchLabel`)},onKeydown:(0,d.withKeys)(le,[`enter`]),clearable:``},null,8,[`value`,`size`,`placeholder`,`input-props`]),(0,d.createVNode)((0,d.unref)(f.NButton),{"attr-type":t.inline?`button`:`submit`,size:p.value.size,loading:(0,d.unref)(b).loading.value,type:`primary`,onClick:n[3]||=e=>t.inline&&(0,d.unref)(v)()},{icon:(0,d.withCtx)(()=>[...n[7]||=[(0,d.createElementVNode)(`span`,{class:`i-mdi:magnify w-4 h-4`,"aria-hidden":`true`},null,-1)]]),default:(0,d.withCtx)(()=>[(0,d.createTextVNode)(` `+(0,d.toDisplayString)((0,d.unref)(c)(`picker.search`)),1)]),_:1},8,[`attr-type`,`size`,`loading`])]),_:1},40,[`onSubmit`]))],!0,0):(0,d.createCommentVNode)(`v-if`,!0),(0,d.unref)(b).status.value===`error`?((0,d.openBlock)(),(0,d.createElementBlock)(`div`,O,[(0,d.createTextVNode)((0,d.toDisplayString)((0,d.unref)(c)(`picker.loadFailed`))+` `,1),(0,d.createVNode)((0,d.unref)(f.NButton),{size:p.value.size,onClick:(0,d.unref)(b).reload},{icon:(0,d.withCtx)(()=>[...n[8]||=[(0,d.createElementVNode)(`span`,{class:`i-mdi:refresh w-4 h-4`,"aria-hidden":`true`},null,-1)]]),default:(0,d.withCtx)(()=>[(0,d.createTextVNode)(` `+(0,d.toDisplayString)((0,d.unref)(c)(`common.retry`)),1)]),_:1},8,[`size`,`onClick`])])):(0,d.unref)(m)?((0,d.openBlock)(),(0,d.createBlock)((0,d.unref)(oe),{key:2,ref:ce,data:(0,d.unref)(x),columns:(0,d.unref)(ne),"row-key":re.value.rowKey,loading:(0,d.unref)(b).loading.value,config:(0,d.unref)(G),onSelectionChange:(0,d.unref)(K)},null,8,[`data`,`columns`,`row-key`,`loading`,`config`,`onSelectionChange`])):(0,d.createCommentVNode)(`v-if`,!0)]),e.$slots.selected?((0,d.openBlock)(),(0,d.createElementBlock)(`aside`,k,[(0,d.renderSlot)(e.$slots,`selected`,{items:(0,d.unref)(te),remove:(0,d.unref)(q),move:(0,d.unref)(H),disabled:(0,d.unref)(J)},void 0,!0)])):(0,d.createCommentVNode)(`v-if`,!0)]),(0,d.unref)(Y)?((0,d.openBlock)(),(0,d.createElementBlock)(`div`,A,(0,d.toDisplayString)((0,d.unref)(c)((0,d.unref)(Y).kind===`invalid`?`picker.selectionInvalid`:`picker.selectionFailed`)),1)):(0,d.createCommentVNode)(`v-if`,!0),(0,d.unref)(X).enabled.value?((0,d.openBlock)(),(0,d.createElementBlock)(`div`,ee,[(0,d.unref)(X).recent.value.length?((0,d.openBlock)(),(0,d.createElementBlock)(`div`,j,[(0,d.createElementVNode)(`span`,null,(0,d.toDisplayString)((0,d.unref)(c)(`picker.recent`)),1),((0,d.openBlock)(!0),(0,d.createElementBlock)(d.Fragment,null,(0,d.renderList)((0,d.unref)(X).recent.value,e=>((0,d.openBlock)(),(0,d.createBlock)((0,d.unref)(f.NButton),{key:typeof e.value+`:`+e.value,size:`tiny`,disabled:(0,d.unref)(J),onClick:t=>(0,d.unref)(Z)(e.value)},{default:(0,d.withCtx)(()=>[(0,d.createTextVNode)((0,d.toDisplayString)(e.label),1)]),_:2},1032,[`disabled`,`onClick`]))),128))])):(0,d.createCommentVNode)(`v-if`,!0),t.options.history?.favorites&&(0,d.unref)(X).favorites.value.length?((0,d.openBlock)(),(0,d.createElementBlock)(`div`,M,[(0,d.createElementVNode)(`span`,null,(0,d.toDisplayString)((0,d.unref)(c)(`picker.favorites`)),1),((0,d.openBlock)(!0),(0,d.createElementBlock)(d.Fragment,null,(0,d.renderList)((0,d.unref)(X).favorites.value,e=>((0,d.openBlock)(),(0,d.createElementBlock)(`span`,{key:typeof e.value+`:`+e.value,class:`c-data-picker__favorite`},[(0,d.createVNode)((0,d.unref)(f.NButton),{size:`tiny`,disabled:(0,d.unref)(J),onClick:t=>(0,d.unref)(Z)(e.value)},{default:(0,d.withCtx)(()=>[(0,d.createTextVNode)((0,d.toDisplayString)(e.label),1)]),_:2},1032,[`disabled`,`onClick`]),(0,d.createVNode)((0,d.unref)(f.NButton),{size:`tiny`,disabled:(0,d.unref)(J),"aria-label":`${(0,d.unref)(c)(`picker.removeFavorite`)} ${e.label}`,onClick:n=>t.state.removeFavorite(e.value)},{default:(0,d.withCtx)(()=>[...n[9]||=[(0,d.createTextVNode)(`×`,-1)]]),_:1},8,[`disabled`,`aria-label`,`onClick`])]))),128))])):(0,d.createCommentVNode)(`v-if`,!0),t.options.history?.favorites?((0,d.openBlock)(),(0,d.createBlock)((0,d.unref)(f.NButton),{key:2,text:``,disabled:!t.state.canFavorite.value,onClick:t.state.favoriteSelection},{default:(0,d.withCtx)(()=>[(0,d.createTextVNode)((0,d.toDisplayString)((0,d.unref)(c)(`picker.favorite`)),1)]),_:1},8,[`disabled`,`onClick`])):(0,d.createCommentVNode)(`v-if`,!0)])):(0,d.createCommentVNode)(`v-if`,!0),(0,d.createElementVNode)(`div`,N,[(0,d.createElementVNode)(`div`,P,[(0,d.unref)(B)===null?(0,d.createCommentVNode)(`v-if`,!0):((0,d.openBlock)(),(0,d.createElementBlock)(`span`,F,(0,d.toDisplayString)((0,d.unref)(c)(`picker.total`,{count:(0,d.unref)(B)})),1)),(0,d.createElementVNode)(`span`,null,(0,d.toDisplayString)((0,d.unref)(c)(`picker.selected`,{count:(0,d.unref)(U)})),1),((0,d.openBlock)(!0),(0,d.createElementBlock)(d.Fragment,null,(0,d.renderList)(e.$slots.selected?[]:(0,d.unref)(V),e=>((0,d.openBlock)(),(0,d.createBlock)((0,d.unref)(f.NTag),{key:`${typeof e.value}:${e.value}`,size:`small`,closable:``,title:e.label,onClose:t=>(0,d.unref)(q)(e.value)},{default:(0,d.withCtx)(()=>[(0,d.createTextVNode)((0,d.toDisplayString)(e.label),1)]),_:2},1032,[`title`,`onClose`]))),128)),!e.$slots.selected&&(0,d.unref)(U)>30?((0,d.openBlock)(),(0,d.createElementBlock)(`span`,I,(0,d.toDisplayString)((0,d.unref)(c)(`picker.moreSelected`,{count:(0,d.unref)(U)-30})),1)):(0,d.createCommentVNode)(`v-if`,!0)]),(0,d.unref)(B)!==null&&(0,d.unref)(B)>(0,d.unref)(g)?((0,d.openBlock)(),(0,d.createElementBlock)(`nav`,{key:0,class:`c-data-picker__pagination`,"aria-label":(0,d.unref)(c)(`picker.pagination`)},[(0,d.createVNode)((0,d.unref)(f.NPagination),{page:(0,d.unref)(h),"onUpdate:page":n[4]||=e=>(0,d.isRef)(h)?h.value=e:null,"page-size":(0,d.unref)(g),"item-count":(0,d.unref)(B),"page-slot":5,size:p.value.size},null,8,[`page`,`page-size`,`item-count`,`size`])],8,L)):(0,d.createCommentVNode)(`v-if`,!0)])],8,C),t.options.showActions===!1?(0,d.createCommentVNode)(`v-if`,!0):((0,d.openBlock)(),(0,d.createElementBlock)(`div`,R,[(0,d.createElementVNode)(`div`,z,[(0,d.createVNode)((0,d.unref)(f.NButton),{size:p.value.size,onClick:n[5]||=e=>s(`dismiss`)},{icon:(0,d.withCtx)(()=>[...n[10]||=[(0,d.createElementVNode)(`span`,{class:`i-mdi:close w-4 h-4`,"aria-hidden":`true`},null,-1)]]),default:(0,d.withCtx)(()=>[(0,d.createTextVNode)(` `+(0,d.toDisplayString)((0,d.unref)(c)(`common.cancel`)),1)]),_:1},8,[`size`]),(0,d.createVNode)((0,d.unref)(f.NButton),{type:`primary`,size:p.value.size,disabled:!(0,d.unref)(W),loading:(0,d.unref)(J),onClick:n[6]||=e=>s(`confirm`)},{icon:(0,d.withCtx)(()=>[...n[11]||=[(0,d.createElementVNode)(`span`,{class:`i-mdi:check w-4 h-4`,"aria-hidden":`true`},null,-1)]]),default:(0,d.withCtx)(()=>[(0,d.createTextVNode)(` `+(0,d.toDisplayString)((0,d.unref)(c)(`common.confirm`)),1)]),_:1},8,[`size`,`disabled`,`loading`])])]))],8,S))}});var V=o.t(B,[[`__scopeId`,`data-v-9843f703`]]);const te={key:1,class:`c-data-picker__label-error`,role:`status`},H=(0,d.defineComponent)({name:`C_DataPicker`,__name:`index`,props:{source:{},columns:{},modelValue:{},multiple:{type:Boolean},disabled:{type:Boolean},readonly:{type:Boolean},clearable:{type:Boolean},title:{},placeholder:{},density:{},locale:{},pageSize:{default:20},scope:{},showActions:{type:Boolean,default:!0},showTrigger:{type:Boolean,default:!0},revalidateOnConfirm:{type:Boolean},disabledReason:{},requireSelection:{type:Boolean},presentation:{},initialValues:{},fixedFilters:{},rowCheckable:{},maxSelection:{},navigation:{},history:{}},emits:[`update:modelValue`,`select`,`cancel`],setup(t,{expose:n,emit:r}){let o=t,l=r,u=(0,d.useSlots)(),p=(0,d.shallowRef)(null),m=(0,d.shallowRef)(null),h=(0,d.shallowRef)(null),g=(0,d.useId)(),_=(0,d.computed)(()=>o.presentation===`inline`),v=(0,d.computed)(()=>o.presentation===`popover`),y=(0,d.computed)(()=>o.disabled||o.readonly),b=(0,d.shallowRef)(!1),S=(0,d.computed)(()=>v.value&&!b.value?f.NPopover:_.value?f.NCard:f.NModal),C=c.o(),w=a.n(),T=s.t(()=>o.density),E=(0,d.computed)(()=>T.value??C.density??`compact`),D=(0,d.computed)(()=>e.t(E.value)),{t:O}=i.t(()=>o.locale),k=x(o,l,p,()=>E.value,()=>v.value&&!b.value),{opened:A,close:ee,confirm:j,clear:M,searchDraft:N,query:P,labels:F,display:I}=k,L=null,R=!1,z;(0,d.watch)(A,e=>{e||(clearTimeout(z),z=void 0,b.value=!1)}),(0,d.onScopeDispose)(()=>clearTimeout(z));function B(e){A.value||y.value||(L=e?.currentTarget??(typeof document>`u`?null:document.activeElement),k.open(),_.value&&(0,d.nextTick)(()=>m.value?.focus()))}function H(){let e=A.value;clearTimeout(z),z=void 0,ee(),e&&l(`cancel`),b.value=!1;let t=L;L=null,(0,d.nextTick)(()=>{let e=t?.isConnected?t:h.value?.querySelector(`input, button`);R=!0,e?.focus(),queueMicrotask(()=>{R=!1})})}async function U(){let e=await j();return e&&H(),e}function W(e){y.value||(B(),N.value=e,clearTimeout(z),z=setTimeout(()=>{z=void 0,A.value&&e.length>=k.searchOptions.value.minChars&&P()},k.searchOptions.value.debounce))}function ne(){y.value||(clearTimeout(z),z=void 0,B(),N.value!==k.search.value&&P(),b.value=!0)}function G(){if(R){R=!1;return}B()}function K(e){e.isComposing||(e.key===`Escape`?(e.preventDefault(),e.stopPropagation(),H()):e.key===`ArrowDown`?(e.preventDefault(),B(),(0,d.nextTick)(()=>m.value?.focus())):e.key===`Enter`&&(e.preventDefault(),e.stopPropagation(),clearTimeout(z),z=void 0,B(),P()))}let q=()=>(0,d.h)(f.NInput,{value:A.value?N.value:I.value,placeholder:o.placeholder??O(`picker.quickSearch`),size:D.value.size,disabled:o.disabled,readonly:o.readonly,inputProps:{"aria-label":o.title??O(`picker.title`),"aria-expanded":A.value,"aria-controls":A.value?g:void 0},"onUpdate:value":W,onFocus:G,onClick:()=>B(),onKeydown:K}),J=()=>(0,d.h)(f.NButton,{class:`c-data-picker__open`,size:D.value.size,disabled:o.disabled,"aria-readonly":o.readonly,"aria-expanded":_.value?A.value:void 0,"aria-controls":_.value&&A.value?g:void 0,title:I.value,onClick:e=>_.value&&A.value?H():B(e)},()=>[(0,d.h)(`span`,{class:I.value?void 0:`c-data-picker__placeholder`},I.value||(o.placeholder??O(`picker.placeholder`))),(0,d.h)(`span`,{class:`i-mdi:magnify w-4 h-4 shrink-0`,"aria-hidden":`true`})]),Y=()=>{if(u.trigger)return u.trigger({open:B,disabled:!!y.value,opened:A.value,display:I.value});let e=[v.value?q():J()];return v.value&&e.push((0,d.h)(f.NButton,{class:`c-data-picker__more`,size:D.value.size,disabled:y.value,onClick:ne},()=>O(`picker.more`))),o.clearable&&o.modelValue!=null&&(!Array.isArray(o.modelValue)||o.modelValue.length)&&e.push((0,d.h)(f.NButton,{class:`c-data-picker__clear`,size:D.value.size,disabled:y.value,"aria-label":O(`picker.clear`),onClick:M},()=>(0,d.h)(`span`,{class:`i-mdi:close w-4 h-4`,"aria-hidden":`true`}))),(0,d.h)(`div`,{class:`c-data-picker__trigger`,ref:h},e)};function X(e){e.key!==`Escape`||e.defaultPrevented||(e.preventDefault(),e.stopPropagation(),H())}let Z=(0,d.computed)(()=>{let e=o.title??O(`picker.title`);return v.value&&!b.value?{show:A.value,trigger:`manual`,placement:`bottom-start`,showArrow:!1,width:640,style:{...w.value,maxWidth:`calc(100vw - 24px)`},onClickoutside:e=>{e.target instanceof Node&&h.value?.contains(e.target)||H()},onKeydown:X}:_.value?{id:g,class:`c-data-picker__inline`,role:`region`,"aria-label":e,title:o.showActions===!1&&o.showTrigger===!1?void 0:e,size:`small`,style:w.value,onKeydown:X}:{show:A.value,preset:`card`,class:`c-data-picker__modal`,title:e,"aria-label":e,style:{...w.value,width:`min(${u.selected?1160:960}px, calc(100vw - 24px))`},"onUpdate:show":e=>{e||H()}}});return n({open:B,close:H,reset:k.reset,confirm:U}),(e,t)=>((0,d.openBlock)(),(0,d.createElementBlock)(`div`,{class:`c-data-picker`,style:(0,d.normalizeStyle)((0,d.unref)(w))},[o.showTrigger!==!1&&(!v.value||b.value)?((0,d.openBlock)(),(0,d.createBlock)((0,d.resolveDynamicComponent)(Y),{key:0})):(0,d.createCommentVNode)(`v-if`,!0),(0,d.unref)(F).status.value===`error`?((0,d.openBlock)(),(0,d.createElementBlock)(`span`,te,[(0,d.createTextVNode)((0,d.toDisplayString)((0,d.unref)(O)(`picker.labelFailed`))+` `,1),(0,d.createVNode)((0,d.unref)(f.NButton),{text:``,size:`tiny`,onClick:(0,d.unref)(F).reload},{icon:(0,d.withCtx)(()=>[...t[0]||=[(0,d.createElementVNode)(`span`,{class:`i-mdi:refresh w-4 h-4`,"aria-hidden":`true`},null,-1)]]),default:(0,d.withCtx)(()=>[(0,d.createTextVNode)(` `+(0,d.toDisplayString)((0,d.unref)(O)(`common.retry`)),1)]),_:1},8,[`onClick`])])):(0,d.createCommentVNode)(`v-if`,!0),!_.value||(0,d.unref)(A)?((0,d.openBlock)(),(0,d.createBlock)((0,d.resolveDynamicComponent)(S.value),(0,d.normalizeProps)((0,d.mergeProps)({key:2},Z.value)),(0,d.createSlots)({default:(0,d.withCtx)(()=>[(0,d.unref)(A)?((0,d.openBlock)(),(0,d.createBlock)(V,{key:0,ref_key:`panelRef`,ref:m,state:(0,d.unref)(k),options:o,"density-value":E.value,inline:_.value||v.value&&!b.value,popup:v.value&&!b.value,"panel-id":(0,d.unref)(g),onConfirm:U,onDismiss:H,onKeydown:X},(0,d.createSlots)({_:2},[e.$slots.query?{name:`query`,fn:(0,d.withCtx)(t=>[(0,d.renderSlot)(e.$slots,`query`,(0,d.normalizeProps)((0,d.guardReactiveProps)(t)),void 0,!0)]),key:`0`}:void 0,e.$slots.navigation?{name:`navigation`,fn:(0,d.withCtx)(t=>[(0,d.renderSlot)(e.$slots,`navigation`,(0,d.normalizeProps)((0,d.guardReactiveProps)(t)),void 0,!0)]),key:`1`}:void 0,e.$slots.selected?{name:`selected`,fn:(0,d.withCtx)(t=>[(0,d.renderSlot)(e.$slots,`selected`,(0,d.normalizeProps)((0,d.guardReactiveProps)(t)),void 0,!0)]),key:`2`}:void 0]),1032,[`state`,`density-value`,`inline`,`popup`,`panel-id`])):(0,d.createCommentVNode)(`v-if`,!0)]),_:2},[v.value&&!b.value?{name:`trigger`,fn:(0,d.withCtx)(()=>[((0,d.openBlock)(),(0,d.createBlock)((0,d.resolveDynamicComponent)(Y)))]),key:`0`}:void 0]),1040)):(0,d.createCommentVNode)(`v-if`,!0)],4))}});var U=o.t(H,[[`__scopeId`,`data-v-e5219897`]]);Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return U}});
1
+ require(`./chunk.cjs`);const e=require(`./density.cjs`),t=require(`./useDataResource.cjs`),n=require(`./data2.cjs`),r=require(`./context.cjs`),i=require(`./useComponentLocale.cjs`),a=require(`./useComponentTheme.cjs`),o=require(`./export-helper.cjs`),s=require(`./useComponentDensity.cjs`),c=require(`./useScopedComponentLocale.cjs`),l=require(`./useFormConfig.cjs`),u=require(`./storage.cjs`),d=require(`./helpers.cjs`);let f=require(`vue`),p=require(`naive-ui`);function m(e){return typeof e==`string`||typeof e==`number`&&Number.isFinite(e)}function h(e){return m(e)||Array.isArray(e)&&e.every(m)?e:null}function g(e,t){let n=typeof e.rowKey==`function`?e.rowKey(t):t[e.rowKey];if(!m(n))throw TypeError(`[C_DataPicker] rowKey 必须为字符串或有限数值`);return n}function _(e,t){return e.value===void 0?g(e,t):e.value(t)}function v(e,t){if(e.value===void 0)return;let n=new Set;for(let r of t){let t=e.value(r);if(!m(t)||n.has(t))throw TypeError(`[C_DataPicker] 业务值必须为唯一的字符串或有限数值`);n.add(t)}}function y(e,t,n){if(!Array.isArray(t.rows)||!Number.isSafeInteger(t.total)||t.total<0)throw TypeError(`[C_DataPicker] request 必须返回 rows 数组和非负安全整数 total`);if(t.rows.length>n||t.rows.length>t.total)throw TypeError(`[C_DataPicker] rows 超过请求的分页或 total 范围`);if(d.l(t.rows,t=>g(e,t)).length)throw TypeError(`[C_DataPicker] rowKey 不得缺失或重复`);v(e,t.rows)}function b(e){let t=(0,f.shallowRef)([]),n=(0,f.shallowRef)([]),r=(0,f.computed)(()=>{let t=e.history?.maxItems;return t!==void 0&&Number.isFinite(t)?Math.max(1,Math.min(50,Math.trunc(t))):10}),i=(0,f.computed)(()=>{let t=e.history;if(!(!e.source.resolve||!t?.storageKey||!t.scope))try{return`c-data-picker:${JSON.stringify([t.storageKey,t.scope,e.fixedFilters??null,...e.scope===void 0?[]:[e.scope]])}`}catch{return}}),a=e=>{if(!Array.isArray(e))return[];let t=new Map;for(let n of e)if(n&&typeof n==`object`&&m(n.value)&&typeof n.label==`string`&&!t.has(n.value)&&t.set(n.value,{value:n.value,label:n.label.slice(0,200)}),t.size===r.value)break;return[...t.values()]};(0,f.watch)([i,r,()=>e.history?.favorites],()=>{let r=i.value?u.t(i.value):null,o=r&&typeof r==`object`?r:{};t.value=a(Reflect.get(o,`recent`)),n.value=e.history?.favorites?a(Reflect.get(o,`favorites`)):[]},{immediate:!0});let o=()=>{i.value&&u.i(i.value,{recent:t.value,favorites:n.value})};return{enabled:(0,f.computed)(()=>!!i.value),recent:t,favorites:n,remember:e=>{i.value&&(t.value=a([...e,...t.value]),o())},toggleFavorite:t=>{if(!i.value||!e.history?.favorites)return;let r=n.value.filter(e=>e.value!==t.value);n.value=r.length===n.value.length?a([t,...r]):r,o()},addFavorites:t=>{if(!i.value||!e.history?.favorites)return;let r=a([...n.value,...t]);r.length===n.value.length&&r.every((e,t)=>e.value===n.value[t].value&&e.label===n.value[t].label)||(n.value=r,o())},canAddFavorite:(0,f.computed)(()=>n.value.length<r.value)}}function x(e){let t=(0,f.shallowRef)(!1),n=(0,f.shallowRef)(null),r,i=()=>{r?.abort(),r=void 0,t.value=!1,n.value=null};return{pending:t,error:n,resolve:async a=>{i();let{source:o}=e;if(!o.resolve)return;let s=new AbortController;r=s,t.value=!0;let c=!1;try{let t=[...e.scope===void 0?await o.resolve(a,s.signal):await o.resolve(a,s.signal,{scope:e.scope})];if(s.signal.aborted||r!==s)return;c=!0,y(o,{rows:t,total:t.length},t.length);let n=new Map(t.map(e=>[_(o,e),e]));if(!a.every(t=>{let r=n.get(t);return r!==void 0&&e.rowCheckable?.(r)!==!1&&!e.disabledReason?.(r)}))throw Error(`Selection is missing or no longer eligible`);return n}catch(e){s.signal.aborted||(n.value={kind:c?`invalid`:`failed`,cause:e});return}finally{r===s&&(r=void 0,t.value=!1)}},abort:i}}async function S(e,t,n,r){let i=r===void 0?[]:[{scope:r}];if(e.resolveCodes){let r=await e.resolveCodes(t,n,...i);n.throwIfAborted();let a=[...r.values()];return y(e,{rows:a,total:a.length},t.length),r}let a=await e.resolve(t,n,...i);n.throwIfAborted();let o=[...a];return y(e,{rows:o,total:o.length},t.length),new Map(o.map(t=>[_(e,t),t]))}function C(e,t){let n=(0,f.shallowRef)(!1),r=(0,f.shallowRef)(``),i=(0,f.shallowRef)([]),a=(0,f.shallowRef)(null),o=(0,f.shallowRef)(!1),s,c=(0,f.computed)(()=>!!(e.multiple&&e.batchPaste&&(e.source.resolveCodes||e.source.resolve))),l=(0,f.computed)(()=>{let t=typeof e.batchPaste==`object`?e.batchPaste.maxItems:void 0;return t===void 0||!Number.isSafeInteger(t)||t<1?100:Math.min(t,500)}),u=(0,f.computed)(()=>c.value&&t.writable()),d=(0,f.computed)(()=>{let n=t.values(),r=t.maximum()-n.size;return i.value.map(({code:i,row:a})=>{let o=`missing`;if(a){let i=_(e.source,a);t.checkable(a)?n.has(i)?o=`selected`:r<=0?o=`limit`:(o=`match`,r--):o=`disabled`}return{code:i,row:a,status:o}})}),p=(0,f.computed)(()=>{let t=new Map;for(let{row:n,status:r}of d.value)n&&r===`match`&&t.set(_(e.source,n),n);return t});function m(){s?.abort(),s=void 0,i.value=[],a.value=null,o.value=!1}function h(){m(),r.value=``,n.value=!1}(0,f.watch)([c,l],h,{flush:`sync`});function g(){u.value&&(n.value?h():n.value=!0)}function v(e){m(),r.value=e}function y(){if(r.value.length>24e3){a.value=`text`;return}let e=[...new Set(r.value.split(/[,,、;;\r\n\t]/u).map(e=>e.trim()).filter(Boolean))];if(e.length===0||e.length>l.value){a.value=e.length===0?`empty`:`items`;return}return e}async function b(){if(!u.value||!n.value||o.value)return;m();let t=y();if(!t)return;let r=new AbortController;s=r,o.value=!0;try{let n=await S(e.source,t,r.signal,e.scope);if(s!==r||!u.value)return;i.value=t.map(e=>({code:e,row:n.get(e)}))}catch{s===r&&(a.value=`failed`)}finally{s===r&&(s=void 0,o.value=!1)}}function x(){!u.value||o.value||!p.value.size||t.append(p.value)}return{enabled:c,visible:n,input:r,error:a,maxItems:l,pending:o,results:d,count:(0,f.computed)(()=>p.value.size),toggle:g,update:v,lookup:b,apply:x,reset:h}}function w(e){return e==null?[]:[...new Set(Array.isArray(e)?e:[e])]}function T(e,r,i,a,o=()=>!1){let s=(0,f.shallowRef)(!1),c=(0,f.shallowRef)({page:1,search:``,revision:0}),l=(0,f.computed)({get:()=>c.value.page,set:e=>{c.value={...c.value,page:e}}}),u=(0,f.shallowRef)(``),d=(0,f.computed)(()=>c.value.search),p=(0,f.computed)(()=>{let{debounce:t,minChars:n}=e.source;return{debounce:t!==void 0&&Number.isSafeInteger(t)&&t>=0?t:250,minChars:n!==void 0&&Number.isSafeInteger(n)&&n>=0?n:0}}),m=(0,f.shallowRef)(0),h=(0,f.shallowRef)(0),v=(0,f.shallowRef)(new Map),S=(0,f.shallowRef)(new Map),T=(0,f.computed)(()=>{let t=w(e.modelValue);return e.multiple?t:t.slice(0,1)}),E=(0,f.computed)(()=>Number.isFinite(e.pageSize)&&e.pageSize>0?Math.max(1,Math.trunc(e.pageSize)):20),D=(0,f.computed)(()=>e.disabled||e.readonly),O=(0,f.computed)(()=>{if(!e.multiple)return 1;let t=e.maxSelection;return t!==void 0&&Number.isFinite(t)&&t>=1?Math.trunc(t):1/0}),k=b(e),A=x(e),{pending:j,error:ee}=A,M=n.t(e.initialValues),N=n.t(e.fixedFilters),P=!1,F,I=t=>_(e.source,t),L=t=>e.rowCheckable?.(t)!==!1&&!e.disabledReason?.(t),R=C(e,{writable:()=>s.value&&!D.value&&!j.value,values:()=>v.value,maximum:()=>O.value,checkable:L,append:e=>{v.value=new Map([...v.value,...e]),ye()}}),z=t=>!e.multiple||v.value.has(t)||v.value.size<O.value,B=t=>e.fixedFilters===void 0?n.t(t):{...n.t(t),...n.t(e.fixedFilters)},V=()=>{X(),S.value=new Map,m.value++};(0,f.watch)(()=>[e.source,e.source.request,e.source.resolve,e.source.resolveCodes,e.source.rowKey,e.source.value],V,{flush:`sync`}),(0,f.watch)(()=>e.fixedFilters,e=>{n.a(N,e)||(N=n.t(e),V())},{deep:!0,flush:`sync`}),(0,f.watch)(()=>e.history?.scope,V,{flush:`sync`}),(0,f.watch)(()=>e.scope,V,{flush:`sync`}),(0,f.watch)(()=>e.initialValues,e=>{n.a(M,e)||(M=n.t(e),X())},{deep:!0,flush:`sync`});let H=t.t({key:()=>s.value&&(!o()||u.value===d.value&&u.value.length>=p.value.minChars)?JSON.stringify([m.value,h.value,l.value,E.value,c.value.revision]):null,load:async({signal:t})=>{let{source:n}=e,{filters:r}=c.value,i=B(r),a={page:l.value,pageSize:E.value,search:d.value,signal:t,...e.scope===void 0?{}:{scope:e.scope},...i===void 0?{}:{filters:i}},o=await n.request(a);return y(n,o,a.pageSize),{rows:[...o.rows],total:o.total}},isEmpty:e=>e.rows.length===0}),te=t.t({key:()=>e.source.resolve&&T.value.length?JSON.stringify([m.value,T.value]):null,load:async({signal:t})=>{let{source:n}=e,r=[...T.value],i=e.scope===void 0?await n.resolve(r,t):await n.resolve(r,t,{scope:e.scope});if(!Array.isArray(i))throw TypeError(`[C_DataPicker] resolve 必须返回行数组`);let a=new Set(r),o=new Map;for(let e of i){let t=_(n,e);a.has(t)&&o.set(t,e)}return o},isEmpty:e=>e.size===0}),ne=[],U=(0,f.computed)(()=>H.data.value?.rows??ne),W=(0,f.shallowRef)(null);(0,f.watch)(H.data,e=>{if(!s.value||!e)return;W.value=e.total;let t=Math.max(1,Math.ceil(e.total/E.value));l.value>t&&(l.value=t)});function G(e){let t=S.value.get(e);return t?.fromPage?t.row:te.data.value?.get(e)??t?.row}let re=(0,f.computed)(()=>T.value.map(t=>{let n=G(t);return n?e.source.label(n):String(t)}).join(`、`)),ie=(0,f.computed)(()=>T.value.map(t=>{let n=G(t);return{value:t,label:n?e.source.label(n):String(t)}})),K=(0,f.computed)(()=>v.value.size),q=(0,f.computed)(()=>!D.value&&!j.value&&!R.pending.value&&K.value<=O.value&&(!e.requireSelection||K.value>0)&&(!(e.rowCheckable||e.disabledReason)||[...v.value.keys()].every(e=>{let t=Q(e);return t!==void 0&&L(t)}))),J=(0,f.computed)(()=>{let t=[];for(let n of v.value.keys()){let r=Q(n);t.push({value:n,label:r?e.source.label(r):String(n),row:r})}return t}),Y=(0,f.computed)(()=>J.value.slice(0,30)),ae=(0,f.computed)(()=>[{type:`selection`,multiple:e.multiple},...e.columns.filter(e=>e.type!==`selection`)]),oe=(0,f.computed)(()=>{let t=o()?e.popup?.maxHeight:void 0;return t!==void 0&&Number.isFinite(t)&&t>0?Math.max(1,Math.trunc(t)):360}),se=(0,f.computed)(()=>({density:a(),locale:e.locale,toolbar:{show:!1},pagination:!1,selection:{enabled:!0,maxSelection:Number.isFinite(O.value)?O.value:void 0,rowCheckable:e=>!j.value&&L(e)&&z(I(e))},display:{maxHeight:oe.value},virtualScroll:{enabled:U.value.length>30,itemHeight:o()?20:void 0,maxHeight:oe.value}}));function X(){s.value=!1,W.value=null,v.value=new Map,F=void 0,A.abort(),R.reset()}(0,f.onDeactivated)(X),(0,f.onScopeDispose)(X);function Z(){D.value||s.value||(v.value=new Map(T.value.map(e=>[e,void 0])),c.value={page:1,search:``,filters:B(M),revision:0},u.value=``,h.value++,s.value=!0)}function Q(e){return v.value.get(e)??G(e)}let ce=(0,f.computed)(()=>!!(e.source.resolve&&(e.rowCheckable||e.disabledReason||e.revalidateOnConfirm||k.enabled.value||e.presentation===`popover`)));async function le(){if(!q.value||!s.value)return!1;let e=[...v.value.keys()],t=h.value,n=ce.value,r=n?await A.resolve(e):void 0;return n&&!r||!s.value||h.value!==t||!q.value?!1:(ue(e,r),!0)}function ue(t,n){let{source:i}=e,a=new Map,o=[];for(let e of t){let t=n?.get(e)??Q(e);t&&(a.set(e,{row:t,fromPage:v.value.get(e)!==void 0||S.value.get(e)?.fromPage===!0}),o.push(t))}S.value=a,k.remember(o.map(e=>({value:I(e),label:i.label(e)}))),X(),r(`update:modelValue`,e.multiple?t:t[0]??null),r(`select`,o)}function de(){D.value||!e.clearable||(r(`update:modelValue`,e.multiple?[]:null),r(`select`,[]))}function fe(t){if(D.value||s.value||!e.multiple)return;let n=T.value.filter(e=>e!==t);if(n.length===T.value.length)return;let i=n.flatMap(e=>{let t=G(e);return t===void 0?[]:[t]});r(`update:modelValue`,n),r(`select`,i)}function $(){if(F?.rows===U.value&&F.table===i.value)return F.table}function pe(e,t){if(P||j.value||!s.value||!$())return!1;let n=ge(t),r=n.size!==v.value.size||[...n.keys()].some(e=>!v.value.has(e));v.value=n;let i=U.value.filter(e=>n.has(I(e)));return(t.length!==i.length||t.some(e=>!n.has(I(e))))&&(0,f.nextTick)(ye),r}let me=e=>s.value&&!D.value&&!j.value&&L(e)&&z(I(e));function he(t){let n=$();if(!n||!U.value.includes(t)||!me(t))return!1;let r=g(e.source,t);return e.multiple&&v.value.has(I(t))?n.unselectRow(r):n.selectRow(r),!0}function ge(t){let n=new Set(U.value.map(I)),r=new Set(t.map(I)),i=new Map(e.multiple?[...v.value].filter(([e])=>!n.has(e)||r.has(e)):[]),a=new Map(U.value.map(t=>[g(e.source,t),t])),o=e.multiple?t:t.slice(-1);for(let t of o){let n=a.get(g(e.source,t));if(!n||!L(n))continue;let r=I(n);!i.has(r)&&i.size>=O.value||i.set(r,n)}return i}function _e(t){if(j.value)return;let n=new Map(v.value);if(!n.delete(t))return;v.value=n;let r=$();if(!r)return;let i=U.value.find(e=>I(e)===t);if(i){P=!0;try{r.unselectRow(g(e.source,i))}finally{P=!1}}}function ve(e,t){if(!s.value||j.value||D.value||!Number.isInteger(t))return;let n=[...v.value],r=n.findIndex(([t])=>t===e),i=r+t;if(r<0||i<0||i>=n.length||r===i)return;let[a]=n.splice(r,1);n.splice(i,0,a),v.value=new Map(n)}function ye(){let t=i.value;if(!(!s.value||!t)){P=!0;try{F={table:t,rows:U.value};let n;t.clearSelection();for(let r of U.value){let i=I(r);v.value.has(i)&&(v.value.get(i)!==r&&(n??=new Map(v.value)).set(i,r),L(r)&&t.selectRow(e.source.value===void 0?i:g(e.source,r)))}n&&(v.value=n)}finally{P=!1}}}function be(){Ee(u.value,c.value.filters)}function xe(t){let n={...t},{navigation:r}=e,i=c.value.filters;r&&i&&!Object.prototype.hasOwnProperty.call(t,r.field)&&Object.prototype.hasOwnProperty.call(i,r.field)&&Reflect.set(n,r.field,i[r.field]),Ee(``,B(n))}function Se(t){let{navigation:n}=e;if(!n)return;let r={...c.value.filters};t===void 0?Reflect.deleteProperty(r,n.field):Reflect.set(r,n.field,t),Ee(u.value,B(r))}async function Ce(t){if(D.value||!s.value||!e.source.resolve||j.value)return;let n=(await A.resolve([t]))?.get(t);!n||!s.value||z(t)&&(v.value=e.multiple?new Map(v.value).set(t,n):new Map([[t,n]]),ye())}function we(){if(D.value||!q.value)return;let t=[];for(let n of v.value.keys()){let r=Q(n);r&&L(r)&&t.push({value:n,label:e.source.label(r)})}k.addFavorites(t)}function Te(e){if(D.value||j.value)return;let t=k.favorites.value.find(t=>t.value===e);t&&k.toggleFavorite(t)}function Ee(e,t){if(!s.value||D.value||j.value)return;let r=c.value,i=r.search===e&&n.a(r.filters,t);if(r.page===1&&i){H.reload();return}i||(W.value=null),c.value={page:1,search:e,filters:n.t(t),revision:r.revision+1}}return(0,f.watch)([U,i],()=>{(0,f.nextTick)(ye)},{flush:`post`}),(0,f.watch)(T,(e,t)=>{if(e.length===t.length&&e.every((e,n)=>Object.is(e,t[n]))||(X(),!S.value.size))return;let n=new Set(e);S.value=new Map([...S.value].filter(([e])=>n.has(e)))},{flush:`sync`}),(0,f.watch)([()=>e.multiple,()=>e.disabled,()=>e.readonly],X,{flush:`sync`}),{opened:s,reset:V,open:Z,close:X,confirm:le,clear:de,page:l,pageSize:E,searchDraft:u,search:d,searchOptions:p,batchPaste:R,query:be,submitFilters:xe,list:H,labels:te,rows:U,total:W,display:re,committedItems:ie,removeCommitted:fe,selected:Y,selectedItems:J,move:ve,selectedCount:K,canConfirm:q,columns:ae,tableConfig:se,selectPage:pe,canSelectRow:me,isRowSelected:e=>v.value.has(I(e)),activateRow:he,scrollToRow:t=>i.value?.scrollTo?.({key:g(e.source,t)}),remove:_e,confirming:j,selectionError:ee,history:k,chooseHistory:Ce,navigate:Se,favoriteSelection:we,removeFavorite:Te,canFavorite:(0,f.computed)(()=>q.value&&k.canAddFavorite.value&&[...v.value.keys()].some(e=>Q(e)!==void 0&&!k.favorites.value.some(t=>t.value===e))),filters:(0,f.computed)(()=>n.t(c.value.filters)),setTable:e=>{i.value=e}}}function E(e){let t=(0,f.shallowRef)(),n=new Map,r=!1,i,a,o=(t,n)=>{r||i!==t||!n.isConnected||!e.enabled()||(i=void 0,n.focus({preventScroll:!0}),n.scrollIntoView?.({block:`nearest`,inline:`nearest`}))};function s(s){if(r||!e.enabled())return!1;let c=e.rows().filter(e.selectable);if(!c.length)return a=e.loading()?s:void 0,a!==void 0;a=void 0;let l=c.findIndex(n=>e.key(n)===t.value),u=c[l<0?s>0?0:c.length-1:Math.max(0,Math.min(c.length-1,l+s))],d=e.key(u);return t.value=d,i=d,n.get(d)?.isConnected||e.reveal(u),(0,f.nextTick)(()=>{let e=n.get(d);e&&o(d,e)}),!0}(0,f.watch)([e.rows,e.enabled],()=>{if(t.value=void 0,i=void 0,n.clear(),e.enabled()||(a=void 0),a&&e.rows().length){let e=a;(0,f.nextTick)(()=>s(e))}},{flush:`pre`}),(0,f.onScopeDispose)(()=>{r=!0,i=void 0,n.clear()});function c(r){if(!e.enabled())return{};let a=e.key(r);return{tabindex:-1,"data-picker-active":t.value===a?``:void 0,"aria-selected":e.selected(r),"aria-disabled":!e.selectable(r),ref:e=>{if(!(e instanceof HTMLElement)){n.delete(a);return}n.set(a,e),i===a&&(0,f.nextTick)(()=>o(a,e))},onFocus:e=>{e.target===e.currentTarget&&(t.value=a)},onClick:t=>{!e.immediate()||t.defaultPrevented||!(t.target instanceof Element)||t.target.closest(`a,button,input,select,textarea,label,[role="button"],[role="radio"],[role="checkbox"],[contenteditable="true"]`)||e.choose(r)},onKeydown:t=>{t.target!==t.currentTarget||t.isComposing||t.defaultPrevented||(t.key===`ArrowDown`||t.key===`ArrowUp`?(t.preventDefault(),t.stopPropagation(),s(t.key===`ArrowDown`?1:-1)):(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),t.stopPropagation(),e.choose(r)))}}}return{rowProps:c,navigate:s}}const D=Object.freeze({"picker.batch.open":`批量粘贴`,"picker.batch.input":`待匹配编码`,"picker.batch.hint":`粘贴一列编码,支持换行、制表符、逗号或分号分隔`,"picker.batch.lookup":`匹配编码`,"picker.batch.results":`编码匹配结果`,"picker.batch.add":`加入 {count} 项`,"picker.batch.match":`可加入`,"picker.batch.missing":`未匹配`,"picker.batch.disabled":`不可选择`,"picker.batch.selected":`已选择`,"picker.batch.limit":`超过选择上限`,"picker.batch.empty":`请输入要匹配的编码`,"picker.batch.items":`单次最多匹配 {count} 个不同编码`,"picker.batch.text":`粘贴内容过长,请分批匹配`,"picker.batch.failed":`匹配失败,请重试`}),O=Object.freeze({"picker.batch.open":`Paste codes`,"picker.batch.input":`Codes to match`,"picker.batch.hint":`Paste codes separated by newlines, tabs, commas or semicolons`,"picker.batch.lookup":`Match codes`,"picker.batch.results":`Code match results`,"picker.batch.add":`Add {count}`,"picker.batch.match":`Available`,"picker.batch.missing":`No match`,"picker.batch.disabled":`Unavailable`,"picker.batch.selected":`Already selected`,"picker.batch.limit":`Selection limit reached`,"picker.batch.empty":`Enter codes to match`,"picker.batch.items":`Match up to {count} unique codes per batch`,"picker.batch.text":`The pasted text is too long. Use smaller batches.`,"picker.batch.failed":`Matching failed. Please retry.`}),k=()=>c.t(D,O),A={class:`c-data-picker__batch`},j=[`id`,`aria-label`,`aria-busy`],ee={class:`c-data-picker__batch-actions`},M={key:0,role:`alert`,class:`c-data-picker__batch-error`},N=[`aria-label`],P=[`data-match`],F={class:`c-data-picker__batch-code`},I={key:0,class:`c-data-picker__batch-label`},L=(0,f.defineComponent)({__name:`PickerBatchPaste`,props:{state:{},source:{},size:{},confirming:{type:Boolean},batchId:{}},setup(e){let t=e,{t:n}=k(),{visible:r,input:i,pending:a,results:o,count:s,error:c,maxItems:l,update:u,lookup:d,apply:m}=t.state,h=(0,f.shallowRef)(null);function g(){t.state.toggle(),r.value&&(0,f.nextTick)(()=>h.value?.focus())}return(t,_)=>((0,f.openBlock)(),(0,f.createElementBlock)(`div`,A,[(0,f.createVNode)((0,f.unref)(p.NButton),{size:e.size,disabled:e.confirming,"aria-expanded":(0,f.unref)(r),"aria-controls":(0,f.unref)(r)?e.batchId:void 0,onClick:g},{default:(0,f.withCtx)(()=>[(0,f.createTextVNode)((0,f.toDisplayString)((0,f.unref)(n)(`picker.batch.open`)),1)]),_:1},8,[`size`,`disabled`,`aria-expanded`,`aria-controls`]),(0,f.unref)(r)?((0,f.openBlock)(),(0,f.createElementBlock)(`section`,{key:0,id:e.batchId,class:`c-data-picker__batch-body`,"aria-label":(0,f.unref)(n)(`picker.batch.open`),"aria-busy":(0,f.unref)(a)},[(0,f.createVNode)((0,f.unref)(p.NInput),{ref_key:`batchInput`,ref:h,type:`textarea`,value:(0,f.unref)(i),size:e.size,rows:4,resizable:!1,placeholder:(0,f.unref)(n)(`picker.batch.hint`),"input-props":{"aria-label":(0,f.unref)(n)(`picker.batch.input`)},disabled:e.confirming,"onUpdate:value":(0,f.unref)(u),onKeydown:_[0]||=(0,f.withKeys)((0,f.withModifiers)(()=>{},[`stop`]),[`enter`])},null,8,[`value`,`size`,`placeholder`,`input-props`,`disabled`,`onUpdate:value`]),(0,f.createElementVNode)(`div`,ee,[(0,f.createVNode)((0,f.unref)(p.NButton),{size:e.size,disabled:e.confirming,loading:(0,f.unref)(a),onClick:(0,f.unref)(d)},{default:(0,f.withCtx)(()=>[(0,f.createTextVNode)((0,f.toDisplayString)((0,f.unref)(n)(`picker.batch.lookup`)),1)]),_:1},8,[`size`,`disabled`,`loading`,`onClick`]),(0,f.unref)(o).length?((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(p.NButton),{key:0,size:e.size,disabled:e.confirming||!(0,f.unref)(s),type:`primary`,secondary:``,onClick:(0,f.unref)(m)},{default:(0,f.withCtx)(()=>[(0,f.createTextVNode)((0,f.toDisplayString)((0,f.unref)(n)(`picker.batch.add`,{count:(0,f.unref)(s)})),1)]),_:1},8,[`size`,`disabled`,`onClick`])):(0,f.createCommentVNode)(`v-if`,!0)]),(0,f.unref)(c)?((0,f.openBlock)(),(0,f.createElementBlock)(`p`,M,(0,f.toDisplayString)((0,f.unref)(n)(`picker.batch.${(0,f.unref)(c)}`,{count:(0,f.unref)(l)})),1)):(0,f.createCommentVNode)(`v-if`,!0),(0,f.unref)(o).length?((0,f.openBlock)(),(0,f.createElementBlock)(`ul`,{key:1,class:`c-data-picker__batch-results`,"aria-label":(0,f.unref)(n)(`picker.batch.results`)},[((0,f.openBlock)(!0),(0,f.createElementBlock)(f.Fragment,null,(0,f.renderList)((0,f.unref)(o),t=>((0,f.openBlock)(),(0,f.createElementBlock)(`li`,{key:t.code,"data-match":t.status},[(0,f.createElementVNode)(`span`,F,(0,f.toDisplayString)(t.code),1),t.row?((0,f.openBlock)(),(0,f.createElementBlock)(`span`,I,(0,f.toDisplayString)(e.source.label(t.row)),1)):(0,f.createCommentVNode)(`v-if`,!0),(0,f.createVNode)((0,f.unref)(p.NTag),{type:t.status===`match`?`success`:t.status===`selected`?`default`:`warning`,size:`small`},{default:(0,f.withCtx)(()=>[(0,f.createTextVNode)((0,f.toDisplayString)((0,f.unref)(n)(`picker.batch.${t.status}`)),1)]),_:2},1032,[`type`])],8,P))),128))],8,N)):(0,f.createCommentVNode)(`v-if`,!0)],8,j)):(0,f.createCommentVNode)(`v-if`,!0)]))}});var R=o.t(L,[[`__scopeId`,`data-v-c9d384a2`]]);const z=[`id`,`role`,`aria-label`],B=[`tabindex`],V={class:`c-data-picker__layout`},H={key:0,class:`c-data-picker__navigation`},te={key:0,class:`c-data-picker__navigation-title`},ne={class:`c-data-picker__main`},U={key:2,class:`c-data-picker__error`,role:`alert`},W={key:1,class:`c-data-picker__selected-panel`},G={key:0,role:`alert`,class:`c-data-picker__error`},re={key:1,class:`c-data-picker__history`},ie={key:0},K={key:1},q={class:`c-data-picker__result-bar`},J={class:`c-data-picker__selection`,"aria-live":`polite`},Y={key:0},ae={key:1},oe=[`aria-label`],se={key:0,class:`c-data-picker__footer`},X={class:`c-data-picker__actions`},Z=(0,f.defineComponent)({__name:`PickerPanel`,props:{state:{},options:{},densityValue:{},inline:{type:Boolean},popup:{type:Boolean},hideSearch:{type:Boolean},panelId:{}},emits:[`confirm`,`dismiss`],setup(t,{expose:n,emit:a}){let o=t,s=a,{t:c}=i.t(()=>o.options.locale),l=(0,f.inject)(r.r,{}),u=(0,f.computed)(()=>({...l.messages,...o.options.locale?.messages}));(0,f.provide)(r.r,{get locale(){return o.options.locale?.locale??l.locale},get messages(){return u.value},get t(){return o.options.locale?.t??l.t}});let d=(0,f.computed)(()=>e.t(o.densityValue)),{opened:m,page:h,pageSize:_,searchDraft:v,batchPaste:y,query:b,submitFilters:x,list:S,rows:C,total:w,selected:T,selectedItems:D,move:O,selectedCount:k,canConfirm:A,columns:j,tableConfig:ee,remove:M,confirming:N,selectionError:P,history:F,chooseHistory:I,navigate:L,filters:Z}=o.state,Q=()=>o.popup&&!!o.options.commitOnSelect&&!o.options.multiple,ce=o.state.isRowSelected,le=(e,t)=>{o.state.selectPage(e,t)&&Q()&&k.value>0&&s(`confirm`)},ue=E({rows:()=>C.value,loading:()=>S.loading.value,enabled:()=>o.popup&&m.value,key:e=>g(o.options.source,e),selectable:o.state.canSelectRow,selected:ce,immediate:Q,reveal:o.state.scrollToRow,choose:e=>{o.state.canSelectRow(e)&&(Q()&&ce(e)?s(`confirm`):o.state.activateRow(e))}}),de=(0,f.computed)(()=>o.options.source),fe=(0,f.computed)(()=>o.options.initialValues),$=(0,f.shallowRef)(null),pe=(0,f.defineAsyncComponent)({loader:()=>Promise.resolve().then(()=>require(`./C_Table2.cjs`)).then(e=>e.n),loadingComponent:()=>(0,f.h)(`div`,{role:`status`},c(`table.loading`)),errorComponent:()=>(0,f.h)(`div`,{role:`alert`},c(`picker.loadFailed`))}),me=(0,f.defineAsyncComponent)(()=>Promise.resolve().then(()=>require(`./C_Tree2.cjs`)).then(e=>e.n)),he=e=>{let t=typeof e==`object`&&!!e&&[`clearSelection`,`selectRow`,`unselectRow`].every(t=>typeof Reflect.get(e,t)==`function`);o.state.setTable(t?e:null)};function ge(e){!o.inline||e.isComposing||(e.preventDefault(),e.stopPropagation(),b())}let _e=()=>o.options.navigation?.render?.({value:ve.value[0],select:L,disabled:N.value||!!o.options.disabled||!!o.options.readonly,density:o.densityValue}),ve=(0,f.computed)(()=>{let e=o.options.navigation?.field,t=e&&Z.value?Reflect.get(Z.value,e):void 0;return typeof t==`string`||typeof t==`number`?[t]:[]});return n({navigate:e=>{ue.navigate(e)||$.value?.focus()},focus:()=>{($.value?.querySelector(`input:not([type="hidden"])`)??$.value)?.focus()}}),(e,n)=>((0,f.openBlock)(),(0,f.createElementBlock)(`div`,{class:`c-data-picker__panel`,id:t.popup?t.panelId:void 0,role:t.popup?`dialog`:void 0,"aria-label":t.options.title??(0,f.unref)(c)(`picker.title`)},[(0,f.createElementVNode)(`div`,{ref_key:`panelContent`,ref:$,class:`c-data-picker__content`,tabindex:t.inline?-1:void 0},[(0,f.createElementVNode)(`div`,V,[t.options.navigation||e.$slots.navigation?((0,f.openBlock)(),(0,f.createElementBlock)(`aside`,H,[(0,f.renderSlot)(e.$slots,`navigation`,{filters:(0,f.unref)(Z),submit:(0,f.unref)(x),loading:(0,f.unref)(S).loading.value},()=>[t.options.navigation?.render?((0,f.openBlock)(),(0,f.createBlock)((0,f.resolveDynamicComponent)(_e),{key:0})):((0,f.openBlock)(),(0,f.createElementBlock)(f.Fragment,{key:1},[t.options.navigation?.title?((0,f.openBlock)(),(0,f.createElementBlock)(`div`,te,(0,f.toDisplayString)(t.options.navigation.title),1)):(0,f.createCommentVNode)(`v-if`,!0),(0,f.createVNode)((0,f.unref)(p.NButton),{text:``,disabled:(0,f.unref)(N)||t.options.disabled||t.options.readonly,onClick:n[0]||=e=>(0,f.unref)(L)(void 0)},{default:(0,f.withCtx)(()=>[(0,f.createTextVNode)((0,f.toDisplayString)((0,f.unref)(c)(`picker.allCategories`)),1)]),_:1},8,[`disabled`]),t.options.navigation?((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(me),{key:1,density:t.densityValue,data:[...t.options.navigation.options],"key-field":`key`,"label-field":`label`,"selected-keys":ve.value,addable:!1,refreshable:!1,disabled:(0,f.unref)(N)||t.options.disabled||t.options.readonly,onNodeSelect:n[1]||=(e,t)=>(0,f.unref)(L)(t[0])},null,8,[`density`,`data`,`selected-keys`,`disabled`])):(0,f.createCommentVNode)(`v-if`,!0)],64))],!0)])):(0,f.createCommentVNode)(`v-if`,!0),(0,f.createElementVNode)(`div`,ne,[(0,f.unref)(m)?(0,f.renderSlot)(e.$slots,`query`,{initialValues:fe.value,submit:(0,f.unref)(x),loading:(0,f.unref)(S).loading.value},()=>[t.hideSearch?(0,f.createCommentVNode)(`v-if`,!0):((0,f.openBlock)(),(0,f.createBlock)((0,f.resolveDynamicComponent)(t.inline?`div`:`form`),{key:0,class:`c-data-picker__search`,onSubmit:(0,f.withModifiers)((0,f.unref)(b),[`stop`,`prevent`])},{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(p.NInput),{value:(0,f.unref)(v),"onUpdate:value":n[2]||=e=>(0,f.isRef)(v)?v.value=e:null,size:d.value.size,placeholder:(0,f.unref)(c)(`picker.searchPlaceholder`),"input-props":{"aria-label":(0,f.unref)(c)(`picker.searchLabel`)},onKeydown:(0,f.withKeys)(ge,[`enter`]),clearable:``},null,8,[`value`,`size`,`placeholder`,`input-props`]),(0,f.createVNode)((0,f.unref)(p.NButton),{"attr-type":t.inline?`button`:`submit`,size:d.value.size,loading:(0,f.unref)(S).loading.value,type:`primary`,onClick:n[3]||=e=>t.inline&&(0,f.unref)(b)()},{icon:(0,f.withCtx)(()=>[...n[7]||=[(0,f.createElementVNode)(`span`,{class:`i-mdi:magnify w-4 h-4`,"aria-hidden":`true`},null,-1)]]),default:(0,f.withCtx)(()=>[(0,f.createTextVNode)(` `+(0,f.toDisplayString)((0,f.unref)(c)(`picker.search`)),1)]),_:1},8,[`attr-type`,`size`,`loading`])]),_:1},40,[`onSubmit`]))],!0,0):(0,f.createCommentVNode)(`v-if`,!0),(0,f.unref)(y).enabled.value?((0,f.openBlock)(),(0,f.createBlock)(R,{key:1,state:(0,f.unref)(y),source:de.value,size:d.value.size,confirming:(0,f.unref)(N),"batch-id":`${t.panelId}-batch`},null,8,[`state`,`source`,`size`,`confirming`,`batch-id`])):(0,f.createCommentVNode)(`v-if`,!0),(0,f.unref)(S).status.value===`error`?((0,f.openBlock)(),(0,f.createElementBlock)(`div`,U,[(0,f.createTextVNode)((0,f.toDisplayString)((0,f.unref)(c)(`picker.loadFailed`))+` `,1),(0,f.createVNode)((0,f.unref)(p.NButton),{size:d.value.size,onClick:(0,f.unref)(S).reload},{icon:(0,f.withCtx)(()=>[...n[8]||=[(0,f.createElementVNode)(`span`,{class:`i-mdi:refresh w-4 h-4`,"aria-hidden":`true`},null,-1)]]),default:(0,f.withCtx)(()=>[(0,f.createTextVNode)(` `+(0,f.toDisplayString)((0,f.unref)(c)(`common.retry`)),1)]),_:1},8,[`size`,`onClick`])])):(0,f.unref)(m)?((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(pe),{key:3,ref:he,data:(0,f.unref)(C),columns:(0,f.unref)(j),"row-key":de.value.rowKey,loading:(0,f.unref)(S).loading.value,config:(0,f.unref)(ee),"row-props":(0,f.unref)(ue).rowProps,onSelectionChange:le},null,8,[`data`,`columns`,`row-key`,`loading`,`config`,`row-props`])):(0,f.createCommentVNode)(`v-if`,!0)]),e.$slots.selected?((0,f.openBlock)(),(0,f.createElementBlock)(`aside`,W,[(0,f.renderSlot)(e.$slots,`selected`,{items:(0,f.unref)(D),remove:(0,f.unref)(M),move:(0,f.unref)(O),disabled:(0,f.unref)(N)},void 0,!0)])):(0,f.createCommentVNode)(`v-if`,!0)]),(0,f.unref)(P)?((0,f.openBlock)(),(0,f.createElementBlock)(`div`,G,(0,f.toDisplayString)((0,f.unref)(c)((0,f.unref)(P).kind===`invalid`?`picker.selectionInvalid`:`picker.selectionFailed`)),1)):(0,f.createCommentVNode)(`v-if`,!0),(0,f.unref)(F).enabled.value?((0,f.openBlock)(),(0,f.createElementBlock)(`div`,re,[(0,f.unref)(F).recent.value.length?((0,f.openBlock)(),(0,f.createElementBlock)(`div`,ie,[(0,f.createElementVNode)(`span`,null,(0,f.toDisplayString)((0,f.unref)(c)(`picker.recent`)),1),((0,f.openBlock)(!0),(0,f.createElementBlock)(f.Fragment,null,(0,f.renderList)((0,f.unref)(F).recent.value,e=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(p.NButton),{key:typeof e.value+`:`+e.value,size:`tiny`,disabled:(0,f.unref)(N),onClick:t=>(0,f.unref)(I)(e.value)},{default:(0,f.withCtx)(()=>[(0,f.createTextVNode)((0,f.toDisplayString)(e.label),1)]),_:2},1032,[`disabled`,`onClick`]))),128))])):(0,f.createCommentVNode)(`v-if`,!0),t.options.history?.favorites&&(0,f.unref)(F).favorites.value.length?((0,f.openBlock)(),(0,f.createElementBlock)(`div`,K,[(0,f.createElementVNode)(`span`,null,(0,f.toDisplayString)((0,f.unref)(c)(`picker.favorites`)),1),((0,f.openBlock)(!0),(0,f.createElementBlock)(f.Fragment,null,(0,f.renderList)((0,f.unref)(F).favorites.value,e=>((0,f.openBlock)(),(0,f.createElementBlock)(`span`,{key:typeof e.value+`:`+e.value,class:`c-data-picker__favorite`},[(0,f.createVNode)((0,f.unref)(p.NButton),{size:`tiny`,disabled:(0,f.unref)(N),onClick:t=>(0,f.unref)(I)(e.value)},{default:(0,f.withCtx)(()=>[(0,f.createTextVNode)((0,f.toDisplayString)(e.label),1)]),_:2},1032,[`disabled`,`onClick`]),(0,f.createVNode)((0,f.unref)(p.NButton),{size:`tiny`,disabled:(0,f.unref)(N),"aria-label":`${(0,f.unref)(c)(`picker.removeFavorite`)} ${e.label}`,onClick:n=>t.state.removeFavorite(e.value)},{default:(0,f.withCtx)(()=>[...n[9]||=[(0,f.createTextVNode)(`×`,-1)]]),_:1},8,[`disabled`,`aria-label`,`onClick`])]))),128))])):(0,f.createCommentVNode)(`v-if`,!0),t.options.history?.favorites?((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(p.NButton),{key:2,text:``,disabled:!t.state.canFavorite.value,onClick:t.state.favoriteSelection},{default:(0,f.withCtx)(()=>[(0,f.createTextVNode)((0,f.toDisplayString)((0,f.unref)(c)(`picker.favorite`)),1)]),_:1},8,[`disabled`,`onClick`])):(0,f.createCommentVNode)(`v-if`,!0)])):(0,f.createCommentVNode)(`v-if`,!0),(0,f.createElementVNode)(`div`,q,[(0,f.createElementVNode)(`div`,J,[(0,f.unref)(w)===null?(0,f.createCommentVNode)(`v-if`,!0):((0,f.openBlock)(),(0,f.createElementBlock)(`span`,Y,(0,f.toDisplayString)((0,f.unref)(c)(`picker.total`,{count:(0,f.unref)(w)})),1)),(0,f.createElementVNode)(`span`,null,(0,f.toDisplayString)((0,f.unref)(c)(`picker.selected`,{count:(0,f.unref)(k)})),1),((0,f.openBlock)(!0),(0,f.createElementBlock)(f.Fragment,null,(0,f.renderList)(e.$slots.selected?[]:(0,f.unref)(T),e=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(p.NTag),{key:`${typeof e.value}:${e.value}`,size:`small`,closable:``,title:e.label,onClose:t=>(0,f.unref)(M)(e.value)},{default:(0,f.withCtx)(()=>[(0,f.createTextVNode)((0,f.toDisplayString)(e.label),1)]),_:2},1032,[`title`,`onClose`]))),128)),!e.$slots.selected&&(0,f.unref)(k)>30?((0,f.openBlock)(),(0,f.createElementBlock)(`span`,ae,(0,f.toDisplayString)((0,f.unref)(c)(`picker.moreSelected`,{count:(0,f.unref)(k)-30})),1)):(0,f.createCommentVNode)(`v-if`,!0)]),(0,f.unref)(w)!==null&&(0,f.unref)(w)>(0,f.unref)(_)?((0,f.openBlock)(),(0,f.createElementBlock)(`nav`,{key:0,class:`c-data-picker__pagination`,"aria-label":(0,f.unref)(c)(`picker.pagination`)},[(0,f.createVNode)((0,f.unref)(p.NPagination),{page:(0,f.unref)(h),"onUpdate:page":n[4]||=e=>(0,f.isRef)(h)?h.value=e:null,"page-size":(0,f.unref)(_),"item-count":(0,f.unref)(w),"page-slot":5,size:d.value.size},null,8,[`page`,`page-size`,`item-count`,`size`])],8,oe)):(0,f.createCommentVNode)(`v-if`,!0)])],8,B),t.options.showActions===!1?(0,f.createCommentVNode)(`v-if`,!0):((0,f.openBlock)(),(0,f.createElementBlock)(`div`,se,[(0,f.createElementVNode)(`div`,X,[(0,f.createVNode)((0,f.unref)(p.NButton),{size:d.value.size,onClick:n[5]||=e=>s(`dismiss`)},{icon:(0,f.withCtx)(()=>[...n[10]||=[(0,f.createElementVNode)(`span`,{class:`i-mdi:close w-4 h-4`,"aria-hidden":`true`},null,-1)]]),default:(0,f.withCtx)(()=>[(0,f.createTextVNode)(` `+(0,f.toDisplayString)((0,f.unref)(c)(`common.cancel`)),1)]),_:1},8,[`size`]),(0,f.createVNode)((0,f.unref)(p.NButton),{type:`primary`,size:d.value.size,disabled:!(0,f.unref)(A),loading:(0,f.unref)(N),onClick:n[6]||=e=>s(`confirm`)},{icon:(0,f.withCtx)(()=>[...n[11]||=[(0,f.createElementVNode)(`span`,{class:`i-mdi:check w-4 h-4`,"aria-hidden":`true`},null,-1)]]),default:(0,f.withCtx)(()=>[(0,f.createTextVNode)(` `+(0,f.toDisplayString)((0,f.unref)(c)(`common.confirm`)),1)]),_:1},8,[`size`,`disabled`,`loading`])])]))],8,z))}});var Q=o.t(Z,[[`__scopeId`,`data-v-2a67d960`]]);const ce={key:1,class:`c-data-picker__label-error`,role:`status`},le=(0,f.defineComponent)({name:`C_DataPicker`,__name:`index`,props:{source:{},columns:{},modelValue:{},multiple:{type:Boolean},disabled:{type:Boolean},readonly:{type:Boolean},clearable:{type:Boolean},title:{},placeholder:{},density:{},locale:{},pageSize:{default:20},scope:{},showActions:{type:Boolean,default:!0},showTrigger:{type:Boolean,default:!0},revalidateOnConfirm:{type:Boolean},disabledReason:{},requireSelection:{type:Boolean},presentation:{},commitOnSelect:{type:Boolean},popup:{},maxTagCount:{},initialValues:{},fixedFilters:{},rowCheckable:{},maxSelection:{},batchPaste:{type:[Boolean,Object]},navigation:{},history:{}},emits:[`update:modelValue`,`select`,`cancel`],setup(t,{expose:n,emit:r}){let o=t,c=r,u=(0,f.useSlots)(),d=(0,f.shallowRef)(null),m=(0,f.shallowRef)(null),h=(0,f.shallowRef)(null),g=(0,f.useId)(),_=(0,f.computed)(()=>o.presentation===`inline`),v=(0,f.computed)(()=>o.presentation===`popover`),y=(0,f.computed)(()=>o.disabled||o.readonly),b=(0,f.shallowRef)(!1),x=(0,f.computed)(()=>v.value&&!b.value?p.NPopover:_.value?p.NCard:p.NModal),S=l.o(),C=a.n(),w=s.t(()=>o.density),E=(0,f.computed)(()=>w.value??S.density??`compact`),D=(0,f.computed)(()=>e.t(E.value)),{t:O}=i.t(()=>o.locale),k=T(o,c,d,()=>E.value,()=>v.value&&!b.value),{opened:A,close:j,confirm:ee,clear:M,searchDraft:N,query:P,labels:F,display:I}=k,L=null,R=!1,z;(0,f.watch)(A,e=>{e||(clearTimeout(z),z=void 0,b.value=!1)}),(0,f.onScopeDispose)(()=>clearTimeout(z));function B(e){A.value||y.value||(L=e?.currentTarget??(typeof document>`u`?null:document.activeElement),k.open(),_.value&&(0,f.nextTick)(()=>m.value?.focus()))}function V(){let e=A.value;clearTimeout(z),z=void 0,j(),e&&c(`cancel`),b.value=!1;let t=L;L=null,(0,f.nextTick)(()=>{let e=t?.isConnected?t:h.value?.querySelector(`input, button`);R=!0,e?.focus(),queueMicrotask(()=>{R=!1})})}async function H(){let e=await ee();return e&&V(),e}function te(e){y.value||(B(),N.value=e,clearTimeout(z),z=setTimeout(()=>{z=void 0,A.value&&e.length>=k.searchOptions.value.minChars&&P()},k.searchOptions.value.debounce))}function ne(){y.value||(clearTimeout(z),z=void 0,B(),N.value!==k.search.value&&P(),b.value=!0)}function U(){if(R){R=!1;return}B()}function W(e){if(!e.isComposing)if(e.key===`Escape`)e.preventDefault(),e.stopPropagation(),V();else if(e.key===`ArrowDown`||e.key===`ArrowUp`){e.preventDefault(),B();let t=e.key===`ArrowDown`?1:-1;(0,f.nextTick)(()=>m.value?.navigate(t))}else e.key===`Enter`&&(e.preventDefault(),e.stopPropagation(),clearTimeout(z),z=void 0,B(),P())}let G=(0,f.computed)(()=>{let e=o.maxTagCount;return o.multiple&&e!==void 0&&Number.isFinite(e)&&e>=0?Math.trunc(e):void 0}),re=(0,f.computed)(()=>!A.value&&G.value!==void 0&&k.committedItems.value.length>0),ie=()=>(0,f.h)(p.NInput,{key:`input`,value:A.value?N.value:re.value?``:I.value,placeholder:o.placeholder??O(`picker.quickSearch`),size:D.value.size,disabled:o.disabled,readonly:o.readonly,inputProps:{"aria-label":o.title??O(`picker.title`),"aria-expanded":A.value,"aria-haspopup":`dialog`,"aria-controls":A.value?g:void 0},"onUpdate:value":te,onFocus:U,onClick:()=>B(),onKeydown:W}),K=()=>(0,f.h)(p.NButton,{key:`open`,class:`c-data-picker__open`,size:D.value.size,disabled:o.disabled,"aria-readonly":o.readonly,"aria-expanded":_.value?A.value:void 0,"aria-controls":_.value&&A.value?g:void 0,title:I.value,onClick:e=>_.value&&A.value?V():B(e)},()=>[(0,f.h)(`span`,{class:I.value?void 0:`c-data-picker__placeholder`},I.value||(o.placeholder??O(`picker.placeholder`))),(0,f.h)(`span`,{class:`i-mdi:magnify w-4 h-4 shrink-0`,"aria-hidden":`true`})]),q=()=>{let e=k.committedItems.value,t=G.value??0;return(0,f.h)(`div`,{key:`tags`,class:`c-data-picker__value-tags`},[...e.slice(0,t).map(e=>(0,f.h)(p.NTag,{key:`${typeof e.value}:${e.value}`,class:`c-data-picker__value-tag`,size:`small`,closable:!y.value,title:e.label,onClose:t=>{t.preventDefault(),t.stopPropagation(),k.removeCommitted(e.value)}},()=>e.label)),...e.length>t?[(0,f.h)(`span`,{class:`c-data-picker__tag-count`,title:I.value},`+${e.length-t}`)]:[]])},J=()=>{if(u.trigger)return u.trigger({open:B,disabled:!!y.value,opened:A.value,display:I.value});let e=[v.value?ie():K()];return v.value&&re.value&&e.unshift(q()),v.value&&e.push((0,f.h)(p.NButton,{key:`more`,class:`c-data-picker__more`,size:D.value.size,disabled:y.value,onClick:ne},()=>O(`picker.more`))),o.clearable&&o.modelValue!=null&&(!Array.isArray(o.modelValue)||o.modelValue.length)&&e.push((0,f.h)(p.NButton,{key:`clear`,class:`c-data-picker__clear`,size:D.value.size,disabled:y.value,"aria-label":O(`picker.clear`),onClick:M},()=>(0,f.h)(`span`,{class:`i-mdi:close w-4 h-4`,"aria-hidden":`true`}))),(0,f.h)(`div`,{class:`c-data-picker__trigger`,ref:h},e)};function Y(e){e.key!==`Escape`||e.defaultPrevented||(e.preventDefault(),e.stopPropagation(),V())}let ae=(0,f.computed)(()=>{let e=o.popup?.width;return e===`trigger`||typeof e==`number`&&Number.isFinite(e)&&e>0?e:640}),oe=e=>{e.target instanceof Node&&h.value?.contains(e.target)||V()},se=(0,f.computed)(()=>o.showActions===!1&&o.showTrigger===!1?void 0:o.title??O(`picker.title`)),X=(0,f.computed)(()=>{let e=o.title??O(`picker.title`);return v.value&&!b.value?{show:A.value,trigger:`manual`,placement:o.popup?.placement??`bottom-start`,showArrow:!1,width:ae.value,to:o.popup?.to,style:{...C.value,maxWidth:`calc(100vw - 24px)`,maxHeight:`calc(100vh - 24px)`,overflow:`auto`},onClickoutside:oe,onKeydown:Y}:_.value?{id:g,class:`c-data-picker__inline`,role:`region`,"aria-label":e,title:se.value,size:`small`,style:C.value,onKeydown:Y}:{show:A.value,preset:`card`,class:`c-data-picker__modal`,title:e,"aria-label":e,style:{...C.value,width:`min(${u.selected?1160:960}px, calc(100vw - 24px))`},"onUpdate:show":e=>{e||V()}}});return n({open:B,close:V,reset:k.reset,confirm:H}),(e,t)=>((0,f.openBlock)(),(0,f.createElementBlock)(`div`,{class:`c-data-picker`,style:(0,f.normalizeStyle)((0,f.unref)(C))},[o.showTrigger!==!1&&(!v.value||b.value)?((0,f.openBlock)(),(0,f.createBlock)((0,f.resolveDynamicComponent)(J),{key:0})):(0,f.createCommentVNode)(`v-if`,!0),(0,f.unref)(F).status.value===`error`?((0,f.openBlock)(),(0,f.createElementBlock)(`span`,ce,[(0,f.createTextVNode)((0,f.toDisplayString)((0,f.unref)(O)(`picker.labelFailed`))+` `,1),(0,f.createVNode)((0,f.unref)(p.NButton),{text:``,size:`tiny`,onClick:(0,f.unref)(F).reload},{icon:(0,f.withCtx)(()=>[...t[0]||=[(0,f.createElementVNode)(`span`,{class:`i-mdi:refresh w-4 h-4`,"aria-hidden":`true`},null,-1)]]),default:(0,f.withCtx)(()=>[(0,f.createTextVNode)(` `+(0,f.toDisplayString)((0,f.unref)(O)(`common.retry`)),1)]),_:1},8,[`onClick`])])):(0,f.createCommentVNode)(`v-if`,!0),!_.value||(0,f.unref)(A)?((0,f.openBlock)(),(0,f.createBlock)((0,f.resolveDynamicComponent)(x.value),(0,f.normalizeProps)((0,f.mergeProps)({key:2},X.value)),(0,f.createSlots)({default:(0,f.withCtx)(()=>[(0,f.unref)(A)?((0,f.openBlock)(),(0,f.createBlock)(Q,{key:0,ref_key:`panelRef`,ref:m,state:(0,f.unref)(k),options:o,"density-value":E.value,inline:_.value||v.value&&!b.value,popup:v.value&&!b.value,"hide-search":v.value&&!b.value&&!e.$slots.trigger,"panel-id":(0,f.unref)(g),onConfirm:H,onDismiss:V,onKeydown:Y},(0,f.createSlots)({_:2},[e.$slots.query?{name:`query`,fn:(0,f.withCtx)(t=>[(0,f.renderSlot)(e.$slots,`query`,(0,f.normalizeProps)((0,f.guardReactiveProps)(t)),void 0,!0)]),key:`0`}:void 0,e.$slots.navigation?{name:`navigation`,fn:(0,f.withCtx)(t=>[(0,f.renderSlot)(e.$slots,`navigation`,(0,f.normalizeProps)((0,f.guardReactiveProps)(t)),void 0,!0)]),key:`1`}:void 0,e.$slots.selected?{name:`selected`,fn:(0,f.withCtx)(t=>[(0,f.renderSlot)(e.$slots,`selected`,(0,f.normalizeProps)((0,f.guardReactiveProps)(t)),void 0,!0)]),key:`2`}:void 0]),1032,[`state`,`density-value`,`inline`,`popup`,`hide-search`,`panel-id`])):(0,f.createCommentVNode)(`v-if`,!0)]),_:2},[v.value&&!b.value?{name:`trigger`,fn:(0,f.withCtx)(()=>[((0,f.openBlock)(),(0,f.createBlock)((0,f.resolveDynamicComponent)(J)))]),key:`0`}:void 0]),1040)):(0,f.createCommentVNode)(`v-if`,!0)],4))}});var ue=o.t(le,[[`__scopeId`,`data-v-82baab36`]]);Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return ue}});