@asam-ui/pro 0.0.0-stage → 2.0.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 (344) hide show
  1. package/EDITOR_THIRD_PARTY_NOTICES.md +225 -0
  2. package/LICENSE +68 -0
  3. package/README.md +250 -2
  4. package/THIRD_PARTY_NOTICES.md +9 -0
  5. package/dist/AsamAdminLayout-DMsByuNN.js +205 -0
  6. package/dist/Controller-DF6lMt-H.js +3817 -0
  7. package/dist/Index-DpcRToBH.js +1263 -0
  8. package/dist/Navigation-D9wz-rqJ.js +202 -0
  9. package/dist/Resolve-Cq2BDFwo.js +7 -0
  10. package/dist/_plugin-vue_export-helper-C05QHVBA.js +8 -0
  11. package/dist/application/composables/environment/index.d.ts +2 -0
  12. package/dist/application/composables/environment/index.js +2 -0
  13. package/dist/application/composables/index.d.ts +14 -0
  14. package/dist/application/composables/index.js +40 -0
  15. package/dist/application/composables/on-mounted-or-activated/index.d.ts +2 -0
  16. package/dist/application/composables/on-mounted-or-activated/index.js +2 -0
  17. package/dist/application/composables/raf/index.d.ts +2 -0
  18. package/dist/application/composables/raf/index.js +2 -0
  19. package/dist/application/composables/use-click-away/index.d.ts +3 -0
  20. package/dist/application/composables/use-click-away/index.js +2 -0
  21. package/dist/application/composables/use-count-down/index.d.ts +3 -0
  22. package/dist/application/composables/use-count-down/index.js +2 -0
  23. package/dist/application/composables/use-custom-field-value/AsamCustomField.vue.d.ts +118 -0
  24. package/dist/application/composables/use-custom-field-value/Types.d.ts +27 -0
  25. package/dist/application/composables/use-custom-field-value/index.d.ts +6 -0
  26. package/dist/application/composables/use-custom-field-value/index.js +2 -0
  27. package/dist/application/composables/use-event-listener/index.d.ts +5 -0
  28. package/dist/application/composables/use-event-listener/index.js +7 -0
  29. package/dist/application/composables/use-page-visibility/index.d.ts +2 -0
  30. package/dist/application/composables/use-page-visibility/index.js +2 -0
  31. package/dist/application/composables/use-raf/index.d.ts +2 -0
  32. package/dist/application/composables/use-raf/index.js +2 -0
  33. package/dist/application/composables/use-rect/index.d.ts +2 -0
  34. package/dist/application/composables/use-rect/index.js +2 -0
  35. package/dist/application/composables/use-relation/index.d.ts +10 -0
  36. package/dist/application/composables/use-relation/index.js +17 -0
  37. package/dist/application/composables/use-scroll-parent/index.d.ts +2 -0
  38. package/dist/application/composables/use-scroll-parent/index.js +2 -0
  39. package/dist/application/composables/use-toggle/index.d.ts +2 -0
  40. package/dist/application/composables/use-toggle/index.js +2 -0
  41. package/dist/application/composables/use-window-size/index.d.ts +2 -0
  42. package/dist/application/composables/use-window-size/index.js +2 -0
  43. package/dist/application/index.d.ts +5 -0
  44. package/dist/application/index.js +16 -0
  45. package/dist/application/navigation/EmbedPage.vue.d.ts +18 -0
  46. package/dist/application/navigation/Navigation.d.ts +48 -0
  47. package/dist/application/navigation/NavigationMenuItems.vue.d.ts +8 -0
  48. package/dist/application/navigation/NavigationPage.vue.d.ts +10 -0
  49. package/dist/application/navigation/NavigationShell.vue.d.ts +22 -0
  50. package/dist/application/navigation/NavigationToolbar.vue.d.ts +11 -0
  51. package/dist/application/navigation/NavigationView.vue.d.ts +8 -0
  52. package/dist/application/navigation/Types.d.ts +53 -0
  53. package/dist/application/navigation/index.d.ts +6 -0
  54. package/dist/application/navigation/index.js +3 -0
  55. package/dist/application/preferences/Cache.d.ts +25 -0
  56. package/dist/application/preferences/I18n.d.ts +25 -0
  57. package/dist/application/preferences/LocaleLoader.d.ts +22 -0
  58. package/dist/application/preferences/Preferences.d.ts +16 -0
  59. package/dist/application/preferences/Storage.d.ts +9 -0
  60. package/dist/application/preferences/Types.d.ts +38 -0
  61. package/dist/application/preferences/index.d.ts +9 -0
  62. package/dist/application/preferences/index.js +2 -0
  63. package/dist/application/security/Navigation.d.ts +107 -0
  64. package/dist/application/security/Security.d.ts +74 -0
  65. package/dist/application/security/Types.d.ts +49 -0
  66. package/dist/application/security/index.d.ts +4 -0
  67. package/dist/application/security/index.js +2 -0
  68. package/dist/application/transport/Client.d.ts +17 -0
  69. package/dist/application/transport/Latest.d.ts +7 -0
  70. package/dist/application/transport/Provider.d.ts +4 -0
  71. package/dist/application/transport/Types.d.ts +60 -0
  72. package/dist/application/transport/index.d.ts +4 -0
  73. package/dist/application/transport/index.js +2 -0
  74. package/dist/chunk-DmhlhrBa.js +11 -0
  75. package/dist/components/index.d.ts +50 -0
  76. package/dist/components/index.js +4 -0
  77. package/dist/components-ST0i0Wqf.js +17084 -0
  78. package/dist/configuration/AsamApplicationProvider.vue.d.ts +13 -0
  79. package/dist/configuration/AsamPermission.vue.d.ts +13 -0
  80. package/dist/configuration/Context.d.ts +7 -0
  81. package/dist/configuration/Index.d.ts +5 -0
  82. package/dist/configuration/Permission.d.ts +5 -0
  83. package/dist/configuration/Types.d.ts +65 -0
  84. package/dist/detail/AsamDetailDialog.vue.d.ts +26 -0
  85. package/dist/detail/AsamDetailDrawer.vue.d.ts +26 -0
  86. package/dist/detail/AsamDetailPanel.vue.d.ts +36 -0
  87. package/dist/detail/Controller.d.ts +2 -0
  88. package/dist/detail/OverlayTypes.d.ts +61 -0
  89. package/dist/detail/Types.d.ts +50 -0
  90. package/dist/display/cards/Animation.d.ts +6 -0
  91. package/dist/display/cards/AsamCardGroup.vue.d.ts +14 -0
  92. package/dist/display/cards/AsamCountTo.vue.d.ts +13 -0
  93. package/dist/display/cards/AsamDisplayCard.vue.d.ts +15 -0
  94. package/dist/display/cards/AsamNumberDisplay.vue.d.ts +6 -0
  95. package/dist/display/cards/AsamProAvatarGroup.vue.d.ts +15 -0
  96. package/dist/display/cards/AsamStatisticCard.vue.d.ts +13 -0
  97. package/dist/display/cards/AsamTrend.vue.d.ts +6 -0
  98. package/dist/display/cards/Format.d.ts +5 -0
  99. package/dist/display/cards/Index.d.ts +9 -0
  100. package/dist/display/cards/Types.d.ts +106 -0
  101. package/dist/display/guidance/AsamGuidedTour.vue.d.ts +29 -0
  102. package/dist/display/guidance/AsamHelpPanel.vue.d.ts +27 -0
  103. package/dist/display/guidance/AsamNotificationMenu.vue.d.ts +19 -0
  104. package/dist/display/guidance/AsamNotificationPanel.vue.d.ts +34 -0
  105. package/dist/display/guidance/Async.d.ts +9 -0
  106. package/dist/display/guidance/Focus.d.ts +2 -0
  107. package/dist/display/guidance/Index.d.ts +5 -0
  108. package/dist/display/guidance/Model.d.ts +7 -0
  109. package/dist/display/guidance/Types.d.ts +107 -0
  110. package/dist/display/shared/OverlayStyle.d.ts +6 -0
  111. package/dist/display/states/AsamErrorBoundary.vue.d.ts +22 -0
  112. package/dist/display/states/AsamException.vue.d.ts +21 -0
  113. package/dist/display/states/AsamFieldAnnotation.vue.d.ts +19 -0
  114. package/dist/display/states/AsamPageSkeleton.vue.d.ts +20 -0
  115. package/dist/display/states/AsamPageWatermark.vue.d.ts +16 -0
  116. package/dist/display/states/AsamStatePanel.vue.d.ts +25 -0
  117. package/dist/display/states/Index.d.ts +8 -0
  118. package/dist/display/states/Tools.d.ts +29 -0
  119. package/dist/display/states/Types.d.ts +114 -0
  120. package/dist/display/text-time/AsamProCalendar.vue.d.ts +17 -0
  121. package/dist/display/text-time/AsamProCountdown.vue.d.ts +17 -0
  122. package/dist/display/text-time/AsamRelativeTime.vue.d.ts +11 -0
  123. package/dist/display/text-time/AsamTextEllipsis.vue.d.ts +10 -0
  124. package/dist/display/text-time/AsamWordCount.vue.d.ts +11 -0
  125. package/dist/display/text-time/Clock.d.ts +6 -0
  126. package/dist/display/text-time/Core.d.ts +10 -0
  127. package/dist/display/text-time/Index.d.ts +7 -0
  128. package/dist/display/text-time/Types.d.ts +99 -0
  129. package/dist/editor/AsamEditorActions.vue.d.ts +17 -0
  130. package/dist/editor/AsamEditorFields.vue.d.ts +38 -0
  131. package/dist/editor/AsamEditorForm.vue.d.ts +32 -0
  132. package/dist/editor/AsamFormDialog.vue.d.ts +28 -0
  133. package/dist/editor/Controller.d.ts +2 -0
  134. package/dist/editor/Coordinator.d.ts +3 -0
  135. package/dist/editor/EditorFormTypes.d.ts +65 -0
  136. package/dist/editor/Layout.d.ts +10 -0
  137. package/dist/editor/Snapshot.d.ts +4 -0
  138. package/dist/editor/Types.d.ts +92 -0
  139. package/dist/en-CcfyIwWv.js +1023 -0
  140. package/dist/fields/AsamField.d.ts +36 -0
  141. package/dist/fields/I18n.d.ts +70 -0
  142. package/dist/fields/Model.d.ts +13 -0
  143. package/dist/fields/Options.d.ts +37 -0
  144. package/dist/fields/Schema.d.ts +8 -0
  145. package/dist/fields/Types.d.ts +106 -0
  146. package/dist/fields/choice/AsamChoiceCard.vue.d.ts +74 -0
  147. package/dist/fields/choice/AsamChoiceGroup.vue.d.ts +25 -0
  148. package/dist/fields/choice/Color.d.ts +2 -0
  149. package/dist/fields/choice/Fields.d.ts +8 -0
  150. package/dist/fields/choice/Index.d.ts +6 -0
  151. package/dist/fields/choice/Selection.d.ts +5 -0
  152. package/dist/fields/choice/Types.d.ts +97 -0
  153. package/dist/fields/editors/AsamContentEditor.vue.d.ts +25 -0
  154. package/dist/fields/editors/AsamEditorResourceStatus.vue.d.ts +19 -0
  155. package/dist/fields/editors/Fields.d.ts +13 -0
  156. package/dist/fields/editors/Index.d.ts +5 -0
  157. package/dist/fields/editors/Markdown.d.ts +3 -0
  158. package/dist/fields/editors/Model.d.ts +5 -0
  159. package/dist/fields/editors/Types.d.ts +52 -0
  160. package/dist/fields/modes/AsamFieldView.d.ts +37 -0
  161. package/dist/fields/modes/Binding.d.ts +2 -0
  162. package/dist/fields/modes/Index.d.ts +5 -0
  163. package/dist/fields/modes/Read.d.ts +3 -0
  164. package/dist/fields/modes/Resource.d.ts +4 -0
  165. package/dist/fields/modes/Transform.d.ts +21 -0
  166. package/dist/fields/modes/Types.d.ts +72 -0
  167. package/dist/fields/numeric/Fields.d.ts +6 -0
  168. package/dist/fields/numeric/Index.d.ts +3 -0
  169. package/dist/fields/numeric/MoneyInput.d.ts +3 -0
  170. package/dist/fields/numeric/Types.d.ts +61 -0
  171. package/dist/fields/numeric/Validation.d.ts +12 -0
  172. package/dist/fields/options/Fields.d.ts +15 -0
  173. package/dist/fields/options/Hierarchy.d.ts +13 -0
  174. package/dist/fields/options/Index.d.ts +5 -0
  175. package/dist/fields/options/Paged.d.ts +23 -0
  176. package/dist/fields/options/Region.d.ts +9 -0
  177. package/dist/fields/options/Types.d.ts +48 -0
  178. package/dist/fields/resources/AsamResourceField.vue.d.ts +32 -0
  179. package/dist/fields/resources/Controller.d.ts +46 -0
  180. package/dist/fields/resources/Fields.d.ts +5 -0
  181. package/dist/fields/resources/Index.d.ts +5 -0
  182. package/dist/fields/resources/Model.d.ts +8 -0
  183. package/dist/fields/resources/Types.d.ts +86 -0
  184. package/dist/fields/temporal/Core.d.ts +10 -0
  185. package/dist/fields/temporal/Fields.d.ts +4 -0
  186. package/dist/fields/temporal/Index.d.ts +3 -0
  187. package/dist/fields/temporal/Types.d.ts +48 -0
  188. package/dist/fields/text/Captcha.d.ts +3 -0
  189. package/dist/fields/text/Fields.d.ts +6 -0
  190. package/dist/fields/text/Index.d.ts +3 -0
  191. package/dist/fields/text/Types.d.ts +80 -0
  192. package/dist/form/flows/AsamFilterPopover.vue.d.ts +51 -0
  193. package/dist/form/flows/AsamFormDrawer.vue.d.ts +34 -0
  194. package/dist/form/flows/AsamLoginForm.vue.d.ts +42 -0
  195. package/dist/form/flows/AsamLoginPage.vue.d.ts +51 -0
  196. package/dist/form/flows/AsamStepsForm.vue.d.ts +52 -0
  197. package/dist/form/flows/FlowFields.vue.d.ts +33 -0
  198. package/dist/form/flows/Focus.d.ts +2 -0
  199. package/dist/form/flows/Index.d.ts +6 -0
  200. package/dist/form/flows/LoginTemplateMessages.d.ts +45 -0
  201. package/dist/form/flows/OverlayStyle.d.ts +1 -0
  202. package/dist/form/flows/Session.d.ts +33 -0
  203. package/dist/form/flows/Types.d.ts +63 -0
  204. package/dist/form/schema/AsamSchemaForm.vue.d.ts +42 -0
  205. package/dist/form/schema/Controller.d.ts +47 -0
  206. package/dist/form/schema/Index.d.ts +6 -0
  207. package/dist/form/schema/Path.d.ts +10 -0
  208. package/dist/form/schema/Schema.d.ts +31 -0
  209. package/dist/form/schema/SchemaNodes.d.ts +34 -0
  210. package/dist/form/schema/Types.d.ts +114 -0
  211. package/dist/form/shared/ValidationSummary.vue.d.ts +17 -0
  212. package/dist/i18n/Parameters.d.ts +78 -0
  213. package/dist/i18n/Types.d.ts +10 -0
  214. package/dist/i18n/application/Parameters.d.ts +55 -0
  215. package/dist/i18n/application/Resolve.d.ts +7 -0
  216. package/dist/i18n/application/en.d.ts +53 -0
  217. package/dist/i18n/application/zh-CN.d.ts +53 -0
  218. package/dist/i18n/en.d.ts +1014 -0
  219. package/dist/i18n/en.js +2 -0
  220. package/dist/i18n/fields/Parameters.d.ts +467 -0
  221. package/dist/i18n/fields/en.d.ts +349 -0
  222. package/dist/i18n/fields/zh-CN.d.ts +349 -0
  223. package/dist/i18n/index.d.ts +11 -0
  224. package/dist/i18n/index.js +4 -0
  225. package/dist/i18n/tables/Parameters.d.ts +687 -0
  226. package/dist/i18n/tables/en.d.ts +542 -0
  227. package/dist/i18n/tables/zh-CN.d.ts +542 -0
  228. package/dist/i18n/zh-CN.d.ts +1008 -0
  229. package/dist/i18n/zh-CN.js +2 -0
  230. package/dist/i18n-CJTJI6vg.js +172 -0
  231. package/dist/index.d.ts +62 -0
  232. package/dist/index.js +13 -0
  233. package/dist/layout/AsamActionBar.vue.d.ts +16 -0
  234. package/dist/layout/AsamAdminLayout.vue.d.ts +25 -0
  235. package/dist/layout/AsamContentGrid.vue.d.ts +14 -0
  236. package/dist/layout/AsamFooter.vue.d.ts +11 -0
  237. package/dist/layout/AsamLayoutSettings.vue.d.ts +31 -0
  238. package/dist/layout/AsamPageContainer.vue.d.ts +20 -0
  239. package/dist/layout/Context.d.ts +2 -0
  240. package/dist/layout/Index.d.ts +8 -0
  241. package/dist/layout/Settings.d.ts +4 -0
  242. package/dist/layout/Types.d.ts +118 -0
  243. package/dist/list/AsamListRowActions.d.ts +23 -0
  244. package/dist/list/AsamProTable.d.ts +29 -0
  245. package/dist/list/AsamSearchForm.d.ts +67 -0
  246. package/dist/list/Controller.d.ts +3 -0
  247. package/dist/list/QueryBoundary.d.ts +8 -0
  248. package/dist/list/RowActionAdapter.d.ts +9 -0
  249. package/dist/list/Types.d.ts +134 -0
  250. package/dist/lists/AsamCardList.d.ts +15 -0
  251. package/dist/lists/AsamListCover.vue.d.ts +7 -0
  252. package/dist/lists/AsamProList.d.ts +9 -0
  253. package/dist/lists/AsamProTaskCard.vue.d.ts +21 -0
  254. package/dist/lists/Index.d.ts +4 -0
  255. package/dist/lists/Types.d.ts +135 -0
  256. package/dist/navigation-BVLFymx7.js +395 -0
  257. package/dist/preferences-DgHizA2w.js +335 -0
  258. package/dist/public-api.d.ts +3662 -0
  259. package/dist/resolver/index.d.ts +33 -0
  260. package/dist/resolver/index.js +4447 -0
  261. package/dist/security-B_pdVCWk.js +299 -0
  262. package/dist/style.css +2 -0
  263. package/dist/table/ActionIcon.d.ts +5 -0
  264. package/dist/table/Appearance.d.ts +37 -0
  265. package/dist/table/ColumnVisibility.d.ts +71 -0
  266. package/dist/table/Density.d.ts +3 -0
  267. package/dist/table/Empty.d.ts +14 -0
  268. package/dist/table/I18n.d.ts +73 -0
  269. package/dist/table/RowActionPresentation.d.ts +5 -0
  270. package/dist/table/RowActions.d.ts +80 -0
  271. package/dist/table/TableDensity.vue.d.ts +19 -0
  272. package/dist/table/TablePagination.vue.d.ts +24 -0
  273. package/dist/table/TableToolbar.vue.d.ts +18 -0
  274. package/dist/table/TableViewport.vue.d.ts +13 -0
  275. package/dist/table/editing/AsamEditableTable.d.ts +69 -0
  276. package/dist/table/editing/AsamEditableTable.vue.d.ts +61 -0
  277. package/dist/table/editing/AsamSortableTable.vue.d.ts +61 -0
  278. package/dist/table/editing/AsamTableEditingHost.vue.d.ts +52 -0
  279. package/dist/table/editing/CellEditor.vue.d.ts +20 -0
  280. package/dist/table/editing/Controller.d.ts +2 -0
  281. package/dist/table/editing/ControllerCell.vue.d.ts +18 -0
  282. package/dist/table/editing/Drag.d.ts +29 -0
  283. package/dist/table/editing/EntryForm.vue.d.ts +20 -0
  284. package/dist/table/editing/Host.d.ts +11 -0
  285. package/dist/table/editing/HostTypes.d.ts +53 -0
  286. package/dist/table/editing/Index.d.ts +9 -0
  287. package/dist/table/editing/InlineModel.d.ts +24 -0
  288. package/dist/table/editing/InlineTypes.d.ts +135 -0
  289. package/dist/table/editing/LegacyEditableTable.d.ts +66 -0
  290. package/dist/table/editing/LegacyMotion.d.ts +10 -0
  291. package/dist/table/editing/Motion.d.ts +19 -0
  292. package/dist/table/editing/Order.d.ts +7 -0
  293. package/dist/table/editing/SaveFeedback.d.ts +4 -0
  294. package/dist/table/editing/Types.d.ts +71 -0
  295. package/dist/table/operations/Coordinator.d.ts +3 -0
  296. package/dist/table/operations/Index.d.ts +6 -0
  297. package/dist/table/operations/Preferences.d.ts +7 -0
  298. package/dist/table/operations/Selection.d.ts +2 -0
  299. package/dist/table/operations/Snapshot.d.ts +5 -0
  300. package/dist/table/operations/Types.d.ts +157 -0
  301. package/dist/table/operations/View.d.ts +108 -0
  302. package/dist/table/range/AsamTableRange.vue.d.ts +19 -0
  303. package/dist/table/range/Controller.d.ts +3 -0
  304. package/dist/table/range/Index.d.ts +3 -0
  305. package/dist/table/range/Types.d.ts +127 -0
  306. package/dist/table/renderTableInViewport.d.ts +6 -0
  307. package/dist/table/structured/AsamStructuredTable.d.ts +2 -0
  308. package/dist/table/structured/Controller.d.ts +7 -0
  309. package/dist/table/structured/Forest.d.ts +4 -0
  310. package/dist/table/structured/Index.d.ts +6 -0
  311. package/dist/table/structured/Span.d.ts +5 -0
  312. package/dist/table/structured/Summary.d.ts +8 -0
  313. package/dist/table/structured/Types.d.ts +137 -0
  314. package/dist/table/transfer/AsamTableTransfer.vue.d.ts +11 -0
  315. package/dist/table/transfer/Controller.d.ts +3 -0
  316. package/dist/table/transfer/Gate.d.ts +3 -0
  317. package/dist/table/transfer/Index.d.ts +6 -0
  318. package/dist/table/transfer/Text.d.ts +25 -0
  319. package/dist/table/transfer/Types.d.ts +170 -0
  320. package/dist/table/virtual/AsamProVirtualTable.d.ts +22 -0
  321. package/dist/table/virtual/Index.d.ts +4 -0
  322. package/dist/table/virtual/Model.d.ts +16 -0
  323. package/dist/table/virtual/Styles.d.ts +2 -0
  324. package/dist/table/virtual/Types.d.ts +68 -0
  325. package/dist/templates/crud/AsamCrudPage.vue.d.ts +52 -0
  326. package/dist/templates/crud/Controller.d.ts +3 -0
  327. package/dist/templates/crud/DetailEntry.d.ts +46 -0
  328. package/dist/templates/crud/Index.d.ts +4 -0
  329. package/dist/templates/crud/Index.js +2 -0
  330. package/dist/templates/crud/Readonly.d.ts +3 -0
  331. package/dist/templates/crud/Structure.d.ts +8 -0
  332. package/dist/templates/crud/Types.d.ts +272 -0
  333. package/dist/templates/index.d.ts +1 -0
  334. package/dist/templates/index.js +10 -0
  335. package/dist/transport-Cky1a5c-.js +161 -0
  336. package/dist/types/application.d.ts +5 -0
  337. package/dist/types/components.d.ts +1 -0
  338. package/dist/types/index.d.ts +6 -0
  339. package/dist/types/index.js +0 -0
  340. package/dist/types/templates.d.ts +1 -0
  341. package/dist/use-custom-field-value-DgA3wo05.js +108 -0
  342. package/dist/zh-CN-B5pAhh4V.js +56 -0
  343. package/dist/zh-CN-BBWziFEy.js +966 -0
  344. package/package.json +177 -3
@@ -0,0 +1,36 @@
1
+ import type { AsamFieldDefinition, AsamFieldMode } from './Types.js';
2
+ /** 单字段渲染适配。布局和整体校验由 AsamForm 及其容器负责。 */
3
+ export declare const AsamField: import("vue").DefineComponent<{
4
+ readonly field: AsamFieldDefinition;
5
+ readonly displayLabel?: string | undefined;
6
+ readonly modelValue?: unknown;
7
+ readonly mode?: AsamFieldMode | undefined;
8
+ readonly disabled?: boolean | undefined;
9
+ readonly session?: string | number | undefined;
10
+ readonly active?: boolean | undefined;
11
+ readonly popupOwner?: string | undefined;
12
+ }, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
13
+ [key: string]: any;
14
+ }> | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
15
+ 'popup-visible-change': (visible: boolean) => boolean;
16
+ 'update:modelValue': (value: unknown) => true;
17
+ }, string, import("vue").PublicProps, Readonly<{
18
+ readonly field: AsamFieldDefinition;
19
+ readonly displayLabel?: string | undefined;
20
+ readonly modelValue?: unknown;
21
+ readonly mode?: AsamFieldMode | undefined;
22
+ readonly disabled?: boolean | undefined;
23
+ readonly session?: string | number | undefined;
24
+ readonly active?: boolean | undefined;
25
+ readonly popupOwner?: string | undefined;
26
+ }> & Readonly<{
27
+ "onPopup-visible-change"?: ((visible: boolean) => any) | undefined;
28
+ "onUpdate:modelValue"?: ((value: unknown) => any) | undefined;
29
+ }>, {
30
+ disabled: boolean;
31
+ displayLabel: string;
32
+ mode: AsamFieldMode;
33
+ session: string | number;
34
+ active: boolean;
35
+ popupOwner: string;
36
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,70 @@
1
+ import type { AsamI18n, AsamI18nCall, AsamMessageKey } from '@asam-ui/ui/i18n';
2
+ import type { FormItemRule } from 'element-plus';
3
+ import type { AsamProFieldsMessageParameters } from '../i18n/fields/Parameters.js';
4
+ export interface AsamOwnedFieldMessage {
5
+ readonly key: AsamMessageKey;
6
+ readonly values: Readonly<Record<string, string | number>>;
7
+ readonly legacy: string;
8
+ readonly resolveValues?: (scope?: AsamI18n) => Readonly<Record<string, string | number>>;
9
+ }
10
+ type FieldMessageCall = {
11
+ [K in keyof AsamProFieldsMessageParameters]: keyof AsamProFieldsMessageParameters[K] extends never ? [
12
+ key: K,
13
+ legacy: string,
14
+ values?: Readonly<Record<string, never>>,
15
+ resolveValues?: (scope?: AsamI18n) => Readonly<Record<string, never>>
16
+ ] : [
17
+ key: K,
18
+ legacy: string,
19
+ values: Readonly<AsamProFieldsMessageParameters[K]>,
20
+ resolveValues?: (scope?: AsamI18n) => Readonly<AsamProFieldsMessageParameters[K]>
21
+ ];
22
+ }[keyof AsamProFieldsMessageParameters];
23
+ export declare function fieldMessage(...[key, legacy, values, resolveValues]: FieldMessageCall): AsamOwnedFieldMessage;
24
+ export type AsamFieldMessageDisplayContext = Readonly<{
25
+ label?: string;
26
+ }>;
27
+ /** Only library-owned validation of an explicit field label opts into view labels. */
28
+ export declare function withFieldDisplayLabel(message: AsamOwnedFieldMessage): AsamOwnedFieldMessage;
29
+ export declare function fieldText(message: AsamOwnedFieldMessage, scope?: AsamI18n, display?: AsamFieldMessageDisplayContext): string;
30
+ /** Attach typed display provenance; values are snapshotted without changing diagnostics. */
31
+ export declare function createAsamMessageIssue(legacy: string, ...call: AsamI18nCall): {
32
+ message: string;
33
+ };
34
+ export declare function createAsamMessageError<T extends Error>(error: T, ...call: AsamI18nCall): T;
35
+ export declare function createAsamMessageError(legacy: string, ...call: AsamI18nCall): Error;
36
+ /** Native validation calls this message function only when its rule fails. */
37
+ export declare function createAsamMessageRuleMessage(issue: {
38
+ readonly message: string;
39
+ }): () => string;
40
+ /** Explicit provenance; preserve original error identity, type, message, cause and stack. */
41
+ export declare function ownFieldError<T extends Error>(error: T, message: AsamOwnedFieldMessage): T;
42
+ export declare function ownedFieldIssue<const T extends object = Record<never, never>>(message: AsamOwnedFieldMessage, details?: T): Omit<T, 'message'> & {
43
+ message: string;
44
+ };
45
+ export declare function carryFieldMessage<T extends object>(target: T, source: unknown): T;
46
+ export declare function ownFieldIssues<T extends object>(target: T, issues: readonly {
47
+ readonly message: string;
48
+ readonly cause?: unknown;
49
+ }[]): T;
50
+ export declare function formatFieldError(value: unknown, scope?: AsamI18n, formatExternal?: (value: unknown, scope: AsamI18n) => string, display?: AsamFieldMessageDisplayContext): string;
51
+ export declare function formatFieldIssue(value: {
52
+ readonly message: string;
53
+ readonly cause?: unknown;
54
+ }, scope?: AsamI18n, display?: AsamFieldMessageDisplayContext): string;
55
+ /** Capture the validator's actual result before async-validator reduces Error to a string. */
56
+ export declare function createFieldRuleMessages(): {
57
+ rules: (key: string, input: readonly FormItemRule[]) => FormItemRule[];
58
+ issue(key: string, message: string): {
59
+ message: string;
60
+ };
61
+ format(key: string, fallback: string, scope: AsamI18n, display?: AsamFieldMessageDisplayContext): string;
62
+ };
63
+ /** Machine text stays stable while a view can resolve the owned message in its own scope. */
64
+ export declare function createOwnedFieldText(boundFormatter?: (value: unknown, scope: AsamI18n) => string): {
65
+ value: import("vue").WritableComputedRef<string, string>;
66
+ set: (next: AsamOwnedFieldMessage) => void;
67
+ from: (next: unknown, legacy?: string) => void;
68
+ format: (scope?: AsamI18n, formatExternal?: (value: unknown, scope: AsamI18n) => string) => string;
69
+ };
70
+ export {};
@@ -0,0 +1,13 @@
1
+ import type { AsamValue } from '@asam-ui/ui';
2
+ import type { AsamFieldDefinition, AsamFieldModel, AsamFieldTransformResult } from './Types.js';
3
+ /** 只复制数组、普通对象和 Date;其他模型必须显式提供 clone。 */
4
+ export declare function cloneAsamFieldValue(value: unknown): unknown;
5
+ export declare function isAsamFieldScalar(value: unknown): value is AsamValue;
6
+ export declare function isAsamFieldValue(field: AsamFieldDefinition, value: unknown): boolean;
7
+ export declare function clearAsamFieldValue(field: AsamFieldDefinition): unknown;
8
+ export declare function defineAsamFields<const F extends readonly AsamFieldDefinition[]>(fields: F): F;
9
+ /** 初始化边界调用;普通重渲染不会重新应用默认值。 */
10
+ export declare function createAsamFieldModel(fields: readonly AsamFieldDefinition[], input: Readonly<AsamFieldModel>, mode: 'create' | 'edit', options?: {
11
+ readonly defaultsOnEdit?: boolean;
12
+ }): AsamFieldModel;
13
+ export declare function transformAsamFields(fields: readonly AsamFieldDefinition[], model: Readonly<AsamFieldModel>, target: 'query' | 'submit', whitelist: readonly string[]): AsamFieldTransformResult;
@@ -0,0 +1,37 @@
1
+ import type { AsamDataRuntime, AsamOption, AsamValue } from '@asam-ui/ui';
2
+ import type { AsamI18n } from '@asam-ui/ui/i18n';
3
+ import type { MaybeRefOrGetter, Ref } from 'vue';
4
+ import type { AsamFieldDefinition } from './Types.js';
5
+ export type AsamFieldOption = AsamOption<AsamValue, object>;
6
+ export type AsamFieldReadStatus = 'idle' | 'loading' | 'ready' | 'empty' | 'error';
7
+ export interface AsamFieldReadState {
8
+ readonly data: Readonly<Ref<readonly AsamFieldOption[]>>;
9
+ readonly loading: Readonly<Ref<boolean>>;
10
+ readonly error: Readonly<Ref<unknown>>;
11
+ readonly status: Readonly<Ref<AsamFieldReadStatus>>;
12
+ retry(): Promise<void>;
13
+ }
14
+ export interface AsamFieldLabel {
15
+ readonly value: AsamValue;
16
+ readonly label: string;
17
+ readonly resolved: boolean;
18
+ readonly disabled: boolean;
19
+ }
20
+ export interface AsamFieldOptionsConfig {
21
+ readonly i18n?: AsamI18n;
22
+ readonly field: MaybeRefOrGetter<AsamFieldDefinition>;
23
+ readonly value: MaybeRefOrGetter<unknown>;
24
+ readonly session?: MaybeRefOrGetter<string | number | undefined>;
25
+ readonly active?: MaybeRefOrGetter<boolean>;
26
+ readonly runtime: AsamDataRuntime;
27
+ }
28
+ /** 当前字段会话的选中显示快照;所有请求、字典和可选缓存仍由已有数据层管理。 */
29
+ export declare function useAsamFieldOptions(config: AsamFieldOptionsConfig): {
30
+ keyword: Ref<string, string>;
31
+ search: AsamFieldReadState;
32
+ resolution: AsamFieldReadState;
33
+ labels: import("vue").ComputedRef<readonly AsamFieldLabel[]>;
34
+ labelStatus: import("vue").ComputedRef<"error" | "idle" | "loading" | "ready" | "unresolved">;
35
+ options: import("vue").ComputedRef<AsamFieldOption[]>;
36
+ refresh: () => Promise<void>;
37
+ };
@@ -0,0 +1,8 @@
1
+ import type { AsamControl, AsamFormSchemaEntry } from '@asam-ui/ui';
2
+ import type { AsamFieldDefinition, AsamFieldMode, AsamFieldModel, AsamFieldProps } from './Types.js';
3
+ /** 现有 Form 的自定义控件入口,既有规则/校验/事件协议保持不变。 */
4
+ export interface AsamFieldSchema {
5
+ readonly schema: readonly AsamFormSchemaEntry<AsamFieldModel>[];
6
+ readonly registry: Readonly<Record<'custom:pro-field', AsamControl<unknown, AsamFieldProps>>>;
7
+ }
8
+ export declare function createAsamFieldSchema(fields: readonly AsamFieldDefinition[], mode: AsamFieldMode): AsamFieldSchema;
@@ -0,0 +1,106 @@
1
+ import type { AsamControl, AsamOptionsSource, AsamValue } from '@asam-ui/ui';
2
+ import type { AsamI18n } from '@asam-ui/ui/i18n';
3
+ import type { FormItemRule } from 'element-plus';
4
+ import type { Component } from 'vue';
5
+ export interface AsamFieldFormatContext {
6
+ readonly i18n: AsamI18n;
7
+ }
8
+ export type AsamFieldMode = 'query' | 'edit' | 'detail';
9
+ export type AsamFieldModel = Record<string, unknown>;
10
+ export type AsamFieldSource = AsamOptionsSource<AsamValue, object>;
11
+ export interface AsamFieldContext {
12
+ readonly mode: AsamFieldMode;
13
+ readonly model: Readonly<AsamFieldModel>;
14
+ }
15
+ export interface AsamFieldModeConfig {
16
+ readonly hidden?: boolean;
17
+ readonly disabled?: boolean;
18
+ readonly readonly?: boolean;
19
+ /** 布局元数据;折叠不改变字段适用性,由消费容器展开定位。 */
20
+ readonly layout?: {
21
+ readonly group?: string;
22
+ readonly span?: 1 | 2 | 3;
23
+ readonly collapsed?: boolean;
24
+ };
25
+ readonly rules?: readonly FormItemRule[];
26
+ readonly componentProps?: Readonly<Record<string, unknown>>;
27
+ }
28
+ export interface AsamFieldRemote {
29
+ /** 返回既有 api/request 数据源;参数与响应只在此适配一次。 */
30
+ readonly search: (keyword: string) => AsamFieldSource;
31
+ readonly resolve: (values: readonly AsamValue[]) => AsamFieldSource;
32
+ }
33
+ interface FieldBase<V> {
34
+ readonly key: string;
35
+ readonly label: string;
36
+ readonly defaultValue?: () => V;
37
+ readonly modes?: Partial<Readonly<Record<AsamFieldMode, AsamFieldModeConfig>>>;
38
+ /** 自定义控件支持原生 teleported、popperClass 与 visible-change 时声明。 */
39
+ readonly popup?: boolean;
40
+ readonly adaptInput?: (value: unknown) => V;
41
+ readonly clone?: (value: unknown) => unknown;
42
+ readonly format?: (value: V, context?: AsamFieldFormatContext) => string;
43
+ readonly query?: (value: V, context: AsamFieldContext) => unknown;
44
+ readonly submit?: (value: V, context: AsamFieldContext) => unknown;
45
+ /** 隐藏字段只有显式提交映射且本开关为 true 才参与提交。 */
46
+ readonly submitHidden?: boolean;
47
+ }
48
+ interface ChoiceSource {
49
+ readonly source?: AsamFieldSource;
50
+ readonly remote?: AsamFieldRemote;
51
+ }
52
+ export type AsamFieldDefinition = (Omit<FieldBase<string | null>, 'defaultValue'> & {
53
+ readonly kind: 'text' | 'textarea';
54
+ readonly defaultValue?: () => string;
55
+ }) | (FieldBase<AsamValue | null> & ChoiceSource & {
56
+ readonly kind: 'single';
57
+ readonly control?: 'select' | 'radio' | 'radio-button';
58
+ }) | (FieldBase<readonly AsamValue[]> & ChoiceSource & {
59
+ readonly kind: 'multiple';
60
+ readonly control?: 'select' | 'checkbox' | 'checkbox-button';
61
+ }) | (FieldBase<unknown> & {
62
+ readonly kind: 'custom';
63
+ readonly control: AsamControl<unknown, object>;
64
+ readonly isValue: (value: unknown) => boolean;
65
+ readonly emptyValue: () => unknown;
66
+ readonly isEmpty: (value: unknown) => boolean;
67
+ readonly format: (value: unknown, context?: AsamFieldFormatContext) => string;
68
+ readonly query: (value: unknown, context: AsamFieldContext) => unknown;
69
+ readonly submit: (value: unknown, context: AsamFieldContext) => unknown;
70
+ readonly display?: Component;
71
+ });
72
+ export interface AsamFieldIssue {
73
+ readonly key: string;
74
+ readonly message: string;
75
+ readonly cause: unknown;
76
+ }
77
+ export type AsamFieldTransformResult = {
78
+ readonly status: 'success';
79
+ readonly data: AsamFieldModel;
80
+ } | {
81
+ readonly status: 'error';
82
+ readonly issues: readonly AsamFieldIssue[];
83
+ };
84
+ export interface AsamFieldProps {
85
+ readonly field: AsamFieldDefinition;
86
+ /** Presentation only; does not change the field definition or model session. */
87
+ readonly displayLabel?: string;
88
+ readonly modelValue?: unknown;
89
+ readonly mode?: AsamFieldMode;
90
+ readonly disabled?: boolean;
91
+ readonly session?: string | number;
92
+ readonly active?: boolean;
93
+ /** 单元格宿主的专属原生弹层类名;仅作用于 Select 或声明 popup 的控件。 */
94
+ readonly popupOwner?: string;
95
+ }
96
+ export interface AsamFieldEmits {
97
+ 'update:modelValue': [value: unknown];
98
+ 'popup-visible-change': [visible: boolean];
99
+ }
100
+ export interface AsamFieldExpose {
101
+ refresh(): Promise<void>;
102
+ focus(): void;
103
+ /** 仅调用控件公开关闭/失焦能力,不更改模型。 */
104
+ closePopup?(): void;
105
+ }
106
+ export {};
@@ -0,0 +1,74 @@
1
+ import type { PropType } from 'vue';
2
+ import type { AsamChoiceCardProps, AsamChoiceCardSlots } from './Types.js';
3
+ type __VLS_Slots = AsamChoiceCardSlots;
4
+ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
5
+ modelValue: {
6
+ type: PropType<boolean>;
7
+ default: boolean;
8
+ };
9
+ label: {
10
+ type: StringConstructor;
11
+ required: true;
12
+ };
13
+ description: {
14
+ type: StringConstructor;
15
+ default: undefined;
16
+ };
17
+ disabled: BooleanConstructor;
18
+ readonly: BooleanConstructor;
19
+ size: {
20
+ type: PropType<AsamChoiceCardProps["size"]>;
21
+ default: undefined;
22
+ };
23
+ actionButtonType: {
24
+ type: PropType<AsamChoiceCardProps["actionButtonType"]>;
25
+ default: string;
26
+ };
27
+ }>, {
28
+ focus: () => void | undefined;
29
+ clear: () => void | undefined;
30
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
31
+ "update:modelValue": (value: boolean) => any;
32
+ change: (value: boolean) => any;
33
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
34
+ modelValue: {
35
+ type: PropType<boolean>;
36
+ default: boolean;
37
+ };
38
+ label: {
39
+ type: StringConstructor;
40
+ required: true;
41
+ };
42
+ description: {
43
+ type: StringConstructor;
44
+ default: undefined;
45
+ };
46
+ disabled: BooleanConstructor;
47
+ readonly: BooleanConstructor;
48
+ size: {
49
+ type: PropType<AsamChoiceCardProps["size"]>;
50
+ default: undefined;
51
+ };
52
+ actionButtonType: {
53
+ type: PropType<AsamChoiceCardProps["actionButtonType"]>;
54
+ default: string;
55
+ };
56
+ }>> & Readonly<{
57
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
58
+ onChange?: ((value: boolean) => any) | undefined;
59
+ }>, {
60
+ description: string;
61
+ size: import("@asam-ui/ui").AsamControlSize | undefined;
62
+ disabled: boolean;
63
+ modelValue: boolean;
64
+ readonly: boolean;
65
+ actionButtonType: import("@asam-ui/ui").AsamButtonType | undefined;
66
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
67
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
68
+ declare const _default: typeof __VLS_export;
69
+ export default _default;
70
+ type __VLS_WithSlots<T, S> = T & {
71
+ new (): {
72
+ $slots: S;
73
+ };
74
+ };
@@ -0,0 +1,25 @@
1
+ import type { AsamChoiceGroupProps, AsamChoiceGroupSlots, AsamChoiceGroupExpose, AsamChoiceValue } from './Types.js';
2
+ type __VLS_Slots = AsamChoiceGroupSlots;
3
+ declare const __VLS_base: import("vue").DefineComponent<AsamChoiceGroupProps, AsamChoiceGroupExpose, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
4
+ "update:modelValue": (value: AsamChoiceValue | readonly AsamChoiceValue[] | null) => any;
5
+ change: (value: AsamChoiceValue | readonly AsamChoiceValue[] | null) => any;
6
+ }, string, import("vue").PublicProps, Readonly<AsamChoiceGroupProps> & Readonly<{
7
+ "onUpdate:modelValue"?: ((value: AsamChoiceValue | readonly AsamChoiceValue[] | null) => any) | undefined;
8
+ onChange?: ((value: AsamChoiceValue | readonly AsamChoiceValue[] | null) => any) | undefined;
9
+ }>, {
10
+ readonly multiple: boolean;
11
+ readonly size: import("@asam-ui/ui").AsamControlSize;
12
+ readonly disabled: boolean;
13
+ readonly modelValue: AsamChoiceValue | readonly AsamChoiceValue[] | null;
14
+ readonly readonly: boolean;
15
+ readonly appearance: "card" | "tag";
16
+ readonly actionButtonType: import("@asam-ui/ui").AsamButtonType;
17
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
19
+ declare const _default: typeof __VLS_export;
20
+ export default _default;
21
+ type __VLS_WithSlots<T, S> = T & {
22
+ new (): {
23
+ $slots: S;
24
+ };
25
+ };
@@ -0,0 +1,2 @@
1
+ /** 与宿主运行环境无关的颜色输入边界;仅接受明确的hex/rgb/hsl/hsv语法。 */
2
+ export declare function isAsamChoiceColor(value: unknown): boolean;
@@ -0,0 +1,8 @@
1
+ import type { AsamCardFieldOptions, AsamChoiceFieldDefinition, AsamChoiceValue, AsamColorFieldOptions, AsamOptionChoiceFieldOptions, AsamRateFieldOptions, AsamSegmentedFieldOptions, AsamSliderFieldOptions, AsamSwitchFieldOptions } from './Types.js';
2
+ export declare function createAsamSwitchField(options: AsamSwitchFieldOptions): AsamChoiceFieldDefinition;
3
+ export declare function createAsamSliderField(options: AsamSliderFieldOptions): AsamChoiceFieldDefinition;
4
+ export declare function createAsamRateField(options: AsamRateFieldOptions): AsamChoiceFieldDefinition;
5
+ export declare function createAsamColorField(options: AsamColorFieldOptions): AsamChoiceFieldDefinition;
6
+ export declare function createAsamSegmentedField(options: AsamSegmentedFieldOptions): AsamChoiceFieldDefinition;
7
+ export declare function createAsamTagFilterField(options: AsamOptionChoiceFieldOptions<readonly AsamChoiceValue[]>): AsamChoiceFieldDefinition;
8
+ export declare function createAsamCardField(options: AsamCardFieldOptions): AsamChoiceFieldDefinition;
@@ -0,0 +1,6 @@
1
+ export * from './Types.js';
2
+ export * from './Selection.js';
3
+ export * from './Color.js';
4
+ export * from './Fields.js';
5
+ export { default as AsamChoiceGroup } from './AsamChoiceGroup.vue';
6
+ export { default as AsamChoiceCard } from './AsamChoiceCard.vue';
@@ -0,0 +1,5 @@
1
+ import type { AsamChoiceOption, AsamChoiceValue } from './Types.js';
2
+ export declare function isAsamChoiceValue(value: unknown): value is AsamChoiceValue;
3
+ /** 不合并0/false/空串;重复值按首次出现顺序去重。 */
4
+ export declare function normalizeAsamChoiceValues(values: readonly AsamChoiceValue[]): AsamChoiceValue[];
5
+ export declare function checkAsamChoiceOptions(options: readonly AsamChoiceOption[]): void;
@@ -0,0 +1,97 @@
1
+ import type { AsamButtonType, AsamColorPickerProps, AsamControlSize, AsamRateProps, AsamSegmentedProps, AsamSliderProps, AsamSwitchProps } from '@asam-ui/ui';
2
+ import type { VNodeChild } from 'vue';
3
+ import type { AsamFieldDefinition } from '../Types.js';
4
+ export type AsamChoiceValue = string | number | boolean;
5
+ export type AsamChoiceFieldDefinition = Extract<AsamFieldDefinition, {
6
+ kind: 'custom';
7
+ }>;
8
+ export interface AsamChoiceFieldOptions<V> {
9
+ /** 字段清空等普通操作的颜色语义,默认 primary。 */
10
+ readonly actionButtonType?: AsamButtonType;
11
+ readonly key: string;
12
+ readonly label: string;
13
+ readonly defaultValue?: () => V;
14
+ readonly modes?: AsamChoiceFieldDefinition['modes'];
15
+ }
16
+ export interface AsamSwitchFieldOptions extends AsamChoiceFieldOptions<AsamChoiceValue | null> {
17
+ /** 是否显示附加清空按钮,默认 false;显式开启后清空为 null,不等同关闭。 */
18
+ readonly clearable?: boolean;
19
+ readonly activeValue?: AsamChoiceValue;
20
+ readonly inactiveValue?: AsamChoiceValue;
21
+ readonly inputProps?: Omit<AsamSwitchProps<AsamChoiceValue>, 'modelValue' | 'activeValue' | 'inactiveValue' | 'disabled'>;
22
+ }
23
+ export interface AsamSliderFieldOptions extends AsamChoiceFieldOptions<number | readonly [number, number] | null> {
24
+ readonly range?: boolean;
25
+ readonly inputProps?: Omit<AsamSliderProps, 'modelValue' | 'range' | 'disabled'>;
26
+ }
27
+ export interface AsamRateFieldOptions extends AsamChoiceFieldOptions<number | null> {
28
+ readonly inputProps?: Omit<AsamRateProps, 'modelValue' | 'disabled'>;
29
+ }
30
+ export interface AsamColorFieldOptions extends AsamChoiceFieldOptions<string | null> {
31
+ /** 字段的可序列化颜色格式;其他原生格式直接使用基础ColorPicker。 */
32
+ readonly inputProps?: Omit<AsamColorPickerProps, 'modelValue' | 'disabled' | 'colorFormat'> & {
33
+ readonly colorFormat?: 'hex' | 'rgb' | 'hsl' | 'hsv';
34
+ };
35
+ }
36
+ export interface AsamChoiceOption {
37
+ readonly value: AsamChoiceValue;
38
+ readonly label: string;
39
+ readonly disabled?: boolean;
40
+ readonly description?: string;
41
+ }
42
+ export interface AsamOptionChoiceFieldOptions<V = AsamChoiceValue | readonly AsamChoiceValue[] | null> extends AsamChoiceFieldOptions<V> {
43
+ /** 动态快照;失效或禁用的宿主值继续保留,直到宿主显式清理。 */
44
+ readonly options: () => readonly AsamChoiceOption[];
45
+ readonly size?: AsamControlSize;
46
+ readonly content?: (scope: AsamChoiceContentScope) => VNodeChild;
47
+ }
48
+ export interface AsamSegmentedFieldOptions extends AsamOptionChoiceFieldOptions<AsamChoiceValue | null> {
49
+ readonly inputProps?: Omit<AsamSegmentedProps, 'modelValue' | 'options' | 'disabled'>;
50
+ }
51
+ export type AsamCardFieldOptions = (AsamOptionChoiceFieldOptions<AsamChoiceValue | null> & {
52
+ readonly multiple?: false;
53
+ }) | (AsamOptionChoiceFieldOptions<readonly AsamChoiceValue[]> & {
54
+ readonly multiple: true;
55
+ });
56
+ export interface AsamChoiceContentScope {
57
+ readonly option: AsamChoiceOption;
58
+ readonly selected: boolean;
59
+ }
60
+ export interface AsamChoiceGroupProps {
61
+ readonly actionButtonType?: AsamButtonType;
62
+ readonly modelValue?: AsamChoiceValue | readonly AsamChoiceValue[] | null;
63
+ readonly options: readonly AsamChoiceOption[];
64
+ readonly multiple?: boolean;
65
+ readonly disabled?: boolean;
66
+ readonly readonly?: boolean;
67
+ readonly size?: AsamControlSize;
68
+ readonly appearance?: 'card' | 'tag';
69
+ readonly label: string;
70
+ }
71
+ export interface AsamChoiceGroupEmits {
72
+ 'update:modelValue': [value: AsamChoiceValue | readonly AsamChoiceValue[] | null];
73
+ change: [value: AsamChoiceValue | readonly AsamChoiceValue[] | null];
74
+ }
75
+ export interface AsamChoiceGroupExpose {
76
+ focus(): void;
77
+ clear(): void;
78
+ }
79
+ export interface AsamChoiceGroupSlots {
80
+ content?: (scope: AsamChoiceContentScope) => VNodeChild;
81
+ }
82
+ export interface AsamChoiceCardProps {
83
+ readonly actionButtonType?: AsamButtonType;
84
+ readonly modelValue?: boolean;
85
+ readonly label: string;
86
+ readonly description?: string;
87
+ readonly disabled?: boolean;
88
+ readonly readonly?: boolean;
89
+ readonly size?: AsamControlSize;
90
+ }
91
+ export interface AsamChoiceCardEmits {
92
+ 'update:modelValue': [value: boolean];
93
+ change: [value: boolean];
94
+ }
95
+ export interface AsamChoiceCardSlots {
96
+ default?: () => VNodeChild;
97
+ }
@@ -0,0 +1,25 @@
1
+ import type { AsamContentEditorExpose, AsamContentEditorProps, AsamEditorFieldState, AsamEditorFieldValue } from './Types.js';
2
+ declare const __VLS_export: import("vue").DefineComponent<AsamContentEditorProps, AsamContentEditorExpose, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
3
+ "update:modelValue": (value: AsamEditorFieldValue) => any;
4
+ change: (value: AsamEditorFieldValue) => any;
5
+ state: (state: AsamEditorFieldState) => any;
6
+ }, string, import("vue").PublicProps, Readonly<AsamContentEditorProps> & Readonly<{
7
+ "onUpdate:modelValue"?: ((value: AsamEditorFieldValue) => any) | undefined;
8
+ onChange?: ((value: AsamEditorFieldValue) => any) | undefined;
9
+ onState?: ((state: AsamEditorFieldState) => any) | undefined;
10
+ }>, {
11
+ readonly label: string;
12
+ readonly size: import("@asam-ui/ui").AsamControlSize;
13
+ readonly loading: boolean;
14
+ readonly disabled: boolean;
15
+ readonly modelValue: AsamEditorFieldValue;
16
+ readonly session: string | number;
17
+ readonly active: boolean;
18
+ readonly readonly: boolean;
19
+ readonly actionButtonType: import("@asam-ui/ui").AsamButtonType;
20
+ readonly services: import("../resources/Types.js").AsamResourceServices;
21
+ readonly showClear: boolean;
22
+ readonly maxLength: number;
23
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
24
+ declare const _default: typeof __VLS_export;
25
+ export default _default;
@@ -0,0 +1,19 @@
1
+ import type { AsamButtonType, AsamControlSize } from '@asam-ui/ui';
2
+ import type { AsamEditorFieldState } from './Types.js';
3
+ type __VLS_Props = {
4
+ state: AsamEditorFieldState;
5
+ size: AsamControlSize;
6
+ type: AsamButtonType;
7
+ message?: string;
8
+ blocked: boolean;
9
+ retryAvailable: boolean;
10
+ };
11
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
+ retry: () => any;
13
+ cancel: () => any;
14
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
15
+ onRetry?: (() => any) | undefined;
16
+ onCancel?: (() => any) | undefined;
17
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
+ declare const _default: typeof __VLS_export;
19
+ export default _default;
@@ -0,0 +1,13 @@
1
+ import type { AsamEditorDocument } from '@asam-ui/ui';
2
+ import type { AsamFieldDefinition } from '../Types.js';
3
+ import type { AsamEditorFieldKind, AsamEditorFieldOptions } from './Types.js';
4
+ /** 每个表单实例创建独立工厂,挂载中的上传/错误会由 submit 映射强制阻止。 */
5
+ export declare function createAsamEditorField(kind: AsamEditorFieldKind, options: AsamEditorFieldOptions): Extract<AsamFieldDefinition, {
6
+ kind: 'custom';
7
+ }>;
8
+ export declare const createAsamRichTextField: (options: AsamEditorFieldOptions<AsamEditorDocument>) => Extract<AsamFieldDefinition, {
9
+ kind: "custom";
10
+ }>;
11
+ export declare const createAsamMarkdownField: (options: AsamEditorFieldOptions<string>) => Extract<AsamFieldDefinition, {
12
+ kind: "custom";
13
+ }>;
@@ -0,0 +1,5 @@
1
+ export { default as AsamContentEditor } from './AsamContentEditor.vue';
2
+ export * from './Types.js';
3
+ export * from './Model.js';
4
+ export * from './Markdown.js';
5
+ export * from './Fields.js';
@@ -0,0 +1,3 @@
1
+ /** 返回派生预览,不修改原始 Markdown,也不承诺服务器存储已消毒。 */
2
+ export declare function renderAsamMarkdown(source: string): string;
3
+ export declare function markdownResource(name: string, url: string, image: boolean): string;
@@ -0,0 +1,5 @@
1
+ import type { AsamEditorFieldKind, AsamEditorFieldValue } from './Types.js';
2
+ export declare function emptyAsamEditorValue(kind: AsamEditorFieldKind): AsamEditorFieldValue;
3
+ export declare function cloneAsamEditorValue(kind: AsamEditorFieldKind, value: unknown): AsamEditorFieldValue;
4
+ export declare function editorValueLength(value: AsamEditorFieldValue): number;
5
+ export declare function isEmptyAsamEditorValue(value: AsamEditorFieldValue): boolean;
@@ -0,0 +1,52 @@
1
+ import type { AsamButtonType, AsamControlSize, AsamEditorDocument } from '@asam-ui/ui';
2
+ import type { AsamResourceServices } from '../resources/Types.js';
3
+ import type { AsamFieldDefinition } from '../Types.js';
4
+ export type AsamEditorFieldValue = AsamEditorDocument | string;
5
+ export type AsamEditorFieldKind = 'richtext' | 'markdown';
6
+ export interface AsamEditorFieldState {
7
+ readonly pending: boolean;
8
+ readonly progress: number;
9
+ readonly error: string;
10
+ readonly status: 'idle' | 'uploading' | 'error' | 'cancelled';
11
+ readonly generation: number;
12
+ }
13
+ export interface AsamContentEditorProps {
14
+ /** Whether to render the clear action. Defaults to true. */
15
+ readonly showClear?: boolean;
16
+ /** 预览/清空/插入/重试普通操作默认 primary;取消上传保留次要操作语义。 */
17
+ readonly actionButtonType?: AsamButtonType;
18
+ readonly kind: AsamEditorFieldKind;
19
+ readonly modelValue?: AsamEditorFieldValue;
20
+ readonly services?: AsamResourceServices;
21
+ readonly session?: string | number;
22
+ readonly active?: boolean;
23
+ readonly disabled?: boolean;
24
+ readonly readonly?: boolean;
25
+ readonly loading?: boolean;
26
+ readonly size?: AsamControlSize;
27
+ readonly label?: string;
28
+ /** UTF-16 字符数;富文本按 JSON 序列化长度计算,超限保留原内容并阻止提交。 */
29
+ readonly maxLength?: number;
30
+ }
31
+ export interface AsamContentEditorExpose {
32
+ focus(): void;
33
+ clear(): void;
34
+ cancel(): void;
35
+ /** 组合输入未结束时不调用服务,state.error 提示结束输入后显式重试。 */
36
+ upload(file: File, image?: boolean): Promise<void>;
37
+ retry(): Promise<void>;
38
+ getValue(): AsamEditorFieldValue;
39
+ getState(): AsamEditorFieldState;
40
+ /** 仅 Markdown 的派生 HTML;富文本由现有公开 Editor 返回。 */
41
+ getHTML(): string;
42
+ }
43
+ export interface AsamEditorFieldOptions<V extends AsamEditorFieldValue = AsamEditorFieldValue> {
44
+ readonly actionButtonType?: AsamButtonType;
45
+ readonly key: string;
46
+ readonly label: string;
47
+ readonly services?: AsamResourceServices;
48
+ readonly maxLength?: number;
49
+ readonly defaultValue?: () => V;
50
+ readonly modes?: AsamFieldDefinition['modes'];
51
+ readonly adaptInput?: (value: unknown) => V;
52
+ }