@robot-admin/naive-ui-components 0.31.4 → 0.32.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 (265) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +11 -5
  3. package/README_EN.md +11 -5
  4. package/dist/C_AutoComplete.cjs +1 -0
  5. package/dist/C_AutoComplete.css +36 -0
  6. package/dist/C_AutoComplete.d.cts +4 -0
  7. package/dist/C_AutoComplete.d.ts +4 -0
  8. package/dist/C_AutoComplete.js +1 -0
  9. package/dist/C_AutoComplete2.cjs +1 -0
  10. package/dist/C_AutoComplete2.js +1 -0
  11. package/dist/C_AvatarGroup.d.cts +1 -1
  12. package/dist/C_AvatarGroup.d.ts +1 -1
  13. package/dist/C_Barcode.d.cts +1 -1
  14. package/dist/C_Barcode.d.ts +1 -1
  15. package/dist/C_BatchResult.d.cts +1 -1
  16. package/dist/C_BatchResult.d.ts +1 -1
  17. package/dist/C_Breadcrumb.d.cts +2 -2
  18. package/dist/C_Breadcrumb.d.ts +1 -1
  19. package/dist/C_Cascade.d.cts +1 -1
  20. package/dist/C_Cascade.d.ts +1 -1
  21. package/dist/C_Chat.d.cts +1 -1
  22. package/dist/C_Chat.d.ts +1 -1
  23. package/dist/C_City.d.cts +1 -1
  24. package/dist/C_City.d.ts +1 -1
  25. package/dist/C_Code.d.cts +1 -1
  26. package/dist/C_Code.d.ts +1 -1
  27. package/dist/C_ContextMenu.d.cts +1 -1
  28. package/dist/C_ContextMenu.d.ts +1 -1
  29. package/dist/C_DataPicker.css +198 -31
  30. package/dist/C_DataPicker.d.cts +2 -2
  31. package/dist/C_DataPicker.d.ts +2 -2
  32. package/dist/C_Date.d.cts +1 -1
  33. package/dist/C_Date.d.ts +1 -1
  34. package/dist/C_Density.d.cts +1 -1
  35. package/dist/C_Density.d.ts +1 -1
  36. package/dist/C_Editor.d.cts +1 -1
  37. package/dist/C_Editor.d.ts +1 -1
  38. package/dist/C_ErrorSummary.d.cts +1 -1
  39. package/dist/C_ErrorSummary.d.ts +1 -1
  40. package/dist/C_Form.base.css +68 -1
  41. package/dist/C_Form.cjs +1 -1
  42. package/dist/C_Form.css +68 -1
  43. package/dist/C_Form.d.cts +3 -3
  44. package/dist/C_Form.d.ts +5 -3
  45. package/dist/C_Form.js +1 -1
  46. package/dist/C_FormModal.cjs +1 -1
  47. package/dist/C_FormModal.d.cts +1 -1
  48. package/dist/C_FormModal.d.ts +3 -1
  49. package/dist/C_FormModal.js +1 -1
  50. package/dist/C_FormModal2.cjs +1 -1
  51. package/dist/C_FormModal2.js +1 -1
  52. package/dist/C_FormSearch.css +139 -72
  53. package/dist/C_FormSearch.d.cts +1 -1
  54. package/dist/C_FormSearch.d.ts +1 -1
  55. package/dist/C_Guide.d.cts +1 -1
  56. package/dist/C_Guide.d.ts +1 -1
  57. package/dist/C_Icon.d.cts +1 -1
  58. package/dist/C_Icon.d.ts +1 -1
  59. package/dist/C_Language.d.cts +1 -1
  60. package/dist/C_Language.d.ts +1 -1
  61. package/dist/C_Loading.d.cts +1 -1
  62. package/dist/C_Loading.d.ts +1 -1
  63. package/dist/C_Login.d.cts +1 -1
  64. package/dist/C_Login.d.ts +1 -1
  65. package/dist/C_Markdown.d.cts +1 -1
  66. package/dist/C_Markdown.d.ts +1 -1
  67. package/dist/C_Menu.d.cts +2 -2
  68. package/dist/C_Menu.d.ts +1 -1
  69. package/dist/C_OrgChart.d.cts +1 -1
  70. package/dist/C_OrgChart.d.ts +1 -1
  71. package/dist/C_Progress.d.cts +1 -1
  72. package/dist/C_Progress.d.ts +1 -1
  73. package/dist/C_SectionNav.d.cts +1 -1
  74. package/dist/C_SectionNav.d.ts +1 -1
  75. package/dist/C_Select.css +32 -1
  76. package/dist/C_Select.d.cts +4 -2
  77. package/dist/C_Select.d.ts +4 -2
  78. package/dist/C_Select2.cjs +1 -1
  79. package/dist/C_Select2.js +1 -1
  80. package/dist/C_Skeleton.d.cts +1 -1
  81. package/dist/C_Skeleton.d.ts +1 -1
  82. package/dist/C_Steps.d.cts +1 -1
  83. package/dist/C_Steps.d.ts +1 -1
  84. package/dist/C_Table.base.css +183 -111
  85. package/dist/C_Table.cjs +1 -1
  86. package/dist/C_Table.css +115 -110
  87. package/dist/C_Table.d.cts +1 -1
  88. package/dist/C_Table.d.ts +11 -8
  89. package/dist/C_Table.js +1 -1
  90. package/dist/C_Table2.cjs +3 -3
  91. package/dist/C_Table2.js +3 -3
  92. package/dist/C_TagsView.d.cts +2 -2
  93. package/dist/C_TagsView.d.ts +1 -1
  94. package/dist/C_Theme.d.cts +1 -1
  95. package/dist/C_Theme.d.ts +1 -1
  96. package/dist/C_Timeline.d.cts +1 -1
  97. package/dist/C_Timeline.d.ts +1 -1
  98. package/dist/C_Transfer.d.cts +1 -1
  99. package/dist/C_Transfer.d.ts +1 -1
  100. package/dist/C_Tree.cjs +1 -1
  101. package/dist/C_Tree.d.ts +10 -7
  102. package/dist/C_Tree.js +1 -1
  103. package/dist/C_Tree2.cjs +1 -1
  104. package/dist/C_Tree2.js +1 -1
  105. package/dist/OptionStatus.cjs +1 -0
  106. package/dist/OptionStatus.js +1 -0
  107. package/dist/constants.d.cts +3 -3
  108. package/dist/constants.d.ts +3 -3
  109. package/dist/constants2.d.cts +2 -2
  110. package/dist/constants2.d.ts +2 -2
  111. package/dist/constants3.d.cts +3 -3
  112. package/dist/constants3.d.ts +3 -3
  113. package/dist/constants4.d.cts +7 -7
  114. package/dist/constants4.d.ts +7 -7
  115. package/dist/constants5.d.cts +2 -2
  116. package/dist/constants5.d.ts +2 -2
  117. package/dist/data.d.cts +2 -1
  118. package/dist/data.d.ts +2 -1
  119. package/dist/data2.d.cts +8 -8
  120. package/dist/data2.d.ts +8 -8
  121. package/dist/dateRange.d.cts +9 -4
  122. package/dist/dateRange.d.ts +9 -4
  123. package/dist/fieldRenderers.cjs +1 -0
  124. package/dist/fieldRenderers.js +1 -0
  125. package/dist/formField.cjs +1 -1
  126. package/dist/formField.d.cts +46 -19
  127. package/dist/formField.d.ts +46 -19
  128. package/dist/formField.js +1 -1
  129. package/dist/helpers.cjs +1 -1
  130. package/dist/helpers.js +1 -1
  131. package/dist/index.cjs +1 -1
  132. package/dist/index.d.cts +62 -58
  133. package/dist/index.d.ts +62 -57
  134. package/dist/index.js +1 -1
  135. package/dist/index.vue.d.cts +4 -4
  136. package/dist/index.vue.d.ts +4 -4
  137. package/dist/index10.vue.d.cts +27 -35
  138. package/dist/index10.vue.d.ts +37 -80
  139. package/dist/index11.vue.d.cts +37 -80
  140. package/dist/index11.vue.d.ts +83 -16
  141. package/dist/index12.vue.d.cts +83 -16
  142. package/dist/index12.vue.d.ts +16 -59
  143. package/dist/index13.vue.d.cts +16 -59
  144. package/dist/index13.vue.d.ts +57 -17
  145. package/dist/index14.vue.d.cts +57 -17
  146. package/dist/index14.vue.d.ts +18 -55
  147. package/dist/index15.vue.d.cts +18 -55
  148. package/dist/index15.vue.d.ts +53 -124
  149. package/dist/index16.vue.d.cts +53 -124
  150. package/dist/index16.vue.d.ts +123 -51
  151. package/dist/index17.vue.d.cts +123 -51
  152. package/dist/index17.vue.d.ts +52 -25
  153. package/dist/index18.vue.d.cts +52 -25
  154. package/dist/index18.vue.d.ts +25 -12
  155. package/dist/index19.vue.d.cts +25 -12
  156. package/dist/index19.vue.d.ts +13 -129
  157. package/dist/index2.vue.d.cts +26 -82
  158. package/dist/index2.vue.d.ts +26 -82
  159. package/dist/index20.vue.d.cts +13 -129
  160. package/dist/index20.vue.d.ts +129 -76
  161. package/dist/index21.vue.d.cts +129 -76
  162. package/dist/index21.vue.d.ts +78 -72
  163. package/dist/index22.vue.d.cts +75 -97
  164. package/dist/index22.vue.d.ts +68 -96
  165. package/dist/index23.vue.d.cts +91 -40
  166. package/dist/index23.vue.d.ts +91 -40
  167. package/dist/index24.vue.d.cts +49 -23
  168. package/dist/index24.vue.d.ts +49 -23
  169. package/dist/index25.vue.d.cts +19 -46
  170. package/dist/index25.vue.d.ts +19 -46
  171. package/dist/index26.vue.d.cts +25 -98
  172. package/dist/index26.vue.d.ts +25 -98
  173. package/dist/index27.vue.d.cts +95 -37
  174. package/dist/index27.vue.d.ts +95 -37
  175. package/dist/index28.vue.d.cts +34 -8
  176. package/dist/index28.vue.d.ts +34 -8
  177. package/dist/index29.vue.d.cts +9 -86
  178. package/dist/index29.vue.d.ts +9 -86
  179. package/dist/index3.vue.d.cts +80 -30
  180. package/dist/index3.vue.d.ts +80 -30
  181. package/dist/index30.vue.d.cts +85 -99
  182. package/dist/index30.vue.d.ts +85 -99
  183. package/dist/index31.vue.d.cts +94 -63
  184. package/dist/index31.vue.d.ts +94 -63
  185. package/dist/index32.vue.d.cts +79 -0
  186. package/dist/index32.vue.d.ts +79 -0
  187. package/dist/index4.vue.d.cts +30 -19
  188. package/dist/index4.vue.d.ts +30 -19
  189. package/dist/index5.vue.d.cts +19 -128
  190. package/dist/index5.vue.d.ts +17 -34
  191. package/dist/index6.vue.d.cts +127 -35
  192. package/dist/index6.vue.d.ts +30 -22
  193. package/dist/index7.vue.d.cts +30 -22
  194. package/dist/index7.vue.d.ts +25 -118
  195. package/dist/index8.vue.d.cts +25 -118
  196. package/dist/index8.vue.d.ts +112 -21
  197. package/dist/index9.vue.d.cts +112 -21
  198. package/dist/index9.vue.d.ts +27 -35
  199. package/dist/mapUtils.d.cts +3 -3
  200. package/dist/mapUtils.d.ts +3 -3
  201. package/dist/optionSource.d.cts +30 -0
  202. package/dist/optionSource.d.ts +30 -0
  203. package/dist/resolver.cjs +1 -1
  204. package/dist/resolver.d.cts +1 -1
  205. package/dist/resolver.d.ts +1 -1
  206. package/dist/resolver.js +1 -1
  207. package/dist/serializeSearch.cjs +1 -1
  208. package/dist/serializeSearch.js +1 -1
  209. package/dist/style.css +349 -213
  210. package/dist/types2.d.cts +29 -103
  211. package/dist/types2.d.ts +30 -55
  212. package/dist/types3.d.cts +104 -55
  213. package/dist/types3.d.ts +60 -0
  214. package/dist/types4.d.cts +60 -0
  215. package/dist/types4.d.ts +42 -0
  216. package/dist/types5.d.cts +42 -0
  217. package/dist/useCalendarEvents.d.cts +1 -1
  218. package/dist/useCalendarEvents.d.ts +1 -1
  219. package/dist/useCollapsePanel.d.cts +3 -3
  220. package/dist/useCollapsePanel.d.ts +3 -3
  221. package/dist/useComponentLocale.cjs +1 -1
  222. package/dist/useComponentLocale.js +1 -1
  223. package/dist/useCropperCore.d.cts +9 -9
  224. package/dist/useCropperCore.d.ts +9 -9
  225. package/dist/useDataResource.cjs +1 -1
  226. package/dist/useDataResource.js +1 -1
  227. package/dist/useDynamicFormState.d.cts +15 -1
  228. package/dist/useDynamicFormState.d.ts +15 -1
  229. package/dist/useEdgeInteraction.d.cts +2 -2
  230. package/dist/useEdgeInteraction.d.ts +2 -2
  231. package/dist/useFormConfig.d.cts +5 -2
  232. package/dist/useFormConfig.d.ts +5 -2
  233. package/dist/useFormRenderer.d.cts +1 -1
  234. package/dist/useFormRenderer.d.ts +1 -1
  235. package/dist/useFullscreen.d.cts +2 -2
  236. package/dist/useFullscreen.d.ts +2 -2
  237. package/dist/useGridWidth.cjs +1 -1
  238. package/dist/useGridWidth.js +1 -1
  239. package/dist/useInfiniteScroll.d.cts +4 -4
  240. package/dist/useInfiniteScroll.d.ts +4 -4
  241. package/dist/useQRCode.d.cts +4 -4
  242. package/dist/useQRCode.d.ts +4 -4
  243. package/dist/useSignatureHistory.d.cts +3 -3
  244. package/dist/useSignatureHistory.d.ts +3 -3
  245. package/dist/useSplitResize.d.cts +5 -5
  246. package/dist/useSplitResize.d.ts +5 -5
  247. package/dist/useTableQuery.d.cts +13 -11
  248. package/dist/useTableQuery.d.ts +13 -11
  249. package/dist/useWorkflowValidation.d.cts +34 -34
  250. package/dist/useWorkflowValidation.d.ts +34 -34
  251. package/dist/verification.d.cts +2 -2
  252. package/dist/verification.d.ts +2 -2
  253. package/docs/architecture.md +3 -1
  254. package/docs/components.en.md +2 -1
  255. package/docs/components.md +2 -1
  256. package/docs/engineering.en.md +11 -1
  257. package/docs/engineering.md +11 -1
  258. package/docs/guides/data-picker.md +37 -1
  259. package/docs/guides/remote-options.md +93 -0
  260. package/docs/guides/search-workflows.md +99 -2
  261. package/docs/search-selection-coverage.md +59 -0
  262. package/docs/wl-ui-produce-coverage.md +2 -0
  263. package/package.json +6 -3
  264. package/dist/helpers2.cjs +0 -1
  265. package/dist/helpers2.js +0 -1
@@ -1,43 +1,203 @@
1
1
  @import "./C_Table.base.css";
2
- .c-data-picker[data-v-53b96a9d] {
2
+ .c-tree[data-v-d71f9eac] {
3
+ --c-tree-padding: 12px;
4
+ --c-tree-gap: 10px;
5
+ display: flex;
6
+ flex-direction: column;
7
+ min-width: 0;
8
+ min-height: 0;
9
+ height: 100%;
10
+ gap: var(--c-tree-gap);
11
+ }
12
+ .c-tree--compact[data-v-d71f9eac] {
13
+ --c-tree-padding: 8px;
14
+ --c-tree-gap: 8px;
15
+ }
16
+ .c-tree--comfortable[data-v-d71f9eac] {
17
+ --c-tree-padding: 16px;
18
+ --c-tree-gap: 14px;
19
+ }
20
+ .c-tree .c-tree-toolbar[data-v-d71f9eac] {
21
+ display: flex;
22
+ flex-wrap: wrap;
23
+ align-items: center;
24
+ gap: var(--c-tree-gap);
25
+ padding: var(--c-tree-padding);
26
+ background: var(--c-tree-surface);
27
+ border-radius: var(--c-tree-radius);
28
+ flex-shrink: 0;
29
+ }
30
+ .c-tree .toolbar-left[data-v-d71f9eac] {
31
+ flex: 1 1 140px;
32
+ min-width: 0;
33
+ }
34
+ .c-tree .toolbar-left .search-input[data-v-d71f9eac] {
3
35
  width: 100%;
36
+ }
37
+ .c-tree .toolbar-right[data-v-d71f9eac] {
38
+ display: flex;
39
+ flex-wrap: wrap;
40
+ align-items: center;
41
+ gap: 6px;
42
+ margin-left: auto;
43
+ }
44
+ .c-tree .c-tree-container[data-v-d71f9eac] {
45
+ flex: 1 1 auto;
4
46
  min-width: 0;
47
+ min-height: 0;
48
+ border: 1px solid var(--c-tree-border);
49
+ border-radius: var(--c-tree-radius);
50
+ padding: var(--c-tree-padding);
51
+ overflow: auto;
52
+ scrollbar-width: thin;
5
53
  }
6
- .c-data-picker__inline[data-v-53b96a9d] {
7
- margin-top: 8px;
54
+ .c-tree--virtual .c-tree-container[data-v-d71f9eac] {
55
+ overflow: hidden;
56
+ }
57
+ .c-tree--virtual .tree-instance[data-v-d71f9eac] {
58
+ height: 100%;
59
+ }
60
+ .c-tree[data-v-d71f9eac] .n-tree-node-content,
61
+ .c-tree[data-v-d71f9eac] .n-tree-node-content__text {
8
62
  min-width: 0;
9
63
  }
10
- .c-data-picker__content[data-v-53b96a9d]:focus {
11
- outline: none;
64
+ .c-tree[data-v-d71f9eac] .c-tree-node-label {
65
+ display: flex;
66
+ align-items: center;
67
+ min-width: 0;
68
+ width: 100%;
69
+ gap: 6px;
70
+ }
71
+ .c-tree[data-v-d71f9eac] .c-tree-node-title {
72
+ overflow: hidden;
73
+ white-space: nowrap;
74
+ text-overflow: ellipsis;
75
+ }
76
+ .c-tree[data-v-d71f9eac] .c-tree-node-status,
77
+ .c-tree[data-v-d71f9eac] .c-tree-node-icon {
78
+ flex-shrink: 0;
79
+ }
80
+ .c-tree[data-v-d71f9eac] .tree-actions {
81
+ display: inline-flex;
82
+ align-items: center;
83
+ gap: 2px;
84
+ margin-left: 6px;
85
+ opacity: 0;
86
+ transition: opacity 0.15s ease;
87
+ }
88
+ .c-tree[data-v-d71f9eac] .n-tree-node:hover .tree-actions,
89
+ .c-tree[data-v-d71f9eac] .n-tree-node:focus-within .tree-actions,
90
+ .c-tree[data-v-d71f9eac] .tree-actions:focus-within {
91
+ opacity: 1;
92
+ }
93
+ @media (hover: none), (max-width: 640px) {
94
+ .c-tree[data-v-d71f9eac] .tree-actions {
95
+ opacity: 1;
96
+ }
97
+ }
98
+ @media (prefers-reduced-motion: reduce) {
99
+ .c-tree[data-v-d71f9eac] .tree-actions {
100
+ transition: none;
101
+ }
102
+ }
103
+
104
+ /* layer: default */
105
+ .filter[data-v-d71f9eac]{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);}
106
+
107
+ .c-data-picker[data-v-70a385cc] {
108
+ width: 100%;
109
+ min-width: 0;
12
110
  }
13
- .c-data-picker__trigger[data-v-53b96a9d], .c-data-picker__search[data-v-53b96a9d], .c-data-picker__actions[data-v-53b96a9d], .c-data-picker__selection[data-v-53b96a9d] {
111
+ .c-data-picker__inline[data-v-70a385cc] {
112
+ margin-top: 8px;
113
+ min-width: 0;
114
+ }
115
+ .c-data-picker__trigger[data-v-70a385cc] {
14
116
  display: flex;
15
117
  align-items: center;
16
118
  gap: 8px;
17
119
  }
18
- .c-data-picker__open[data-v-53b96a9d] {
120
+ .c-data-picker[data-v-70a385cc] .c-data-picker__open {
19
121
  flex: 1;
20
122
  min-width: 0;
21
123
  }
22
- .c-data-picker__open[data-v-53b96a9d] .n-button__content {
124
+ .c-data-picker[data-v-70a385cc] .c-data-picker__open .n-button__content {
23
125
  display: flex;
24
126
  gap: 12px;
25
127
  width: 100%;
26
128
  justify-content: space-between;
27
129
  overflow: hidden;
28
130
  }
29
- .c-data-picker__open span[data-v-53b96a9d]:first-child {
131
+ .c-data-picker[data-v-70a385cc] .c-data-picker__open span:first-child {
30
132
  overflow: hidden;
31
133
  text-overflow: ellipsis;
32
134
  white-space: nowrap;
33
135
  }
34
- .c-data-picker__placeholder[data-v-53b96a9d] {
136
+ .c-data-picker[data-v-70a385cc] .c-data-picker__placeholder {
35
137
  opacity: 0.55;
36
138
  }
37
- .c-data-picker__search[data-v-53b96a9d] {
139
+ .c-data-picker__label-error[data-v-70a385cc] {
140
+ font-size: 12px;
141
+ color: var(--n-text-color);
142
+ }
143
+
144
+ /* layer: icons */
145
+ .i-mdi\:close[data-v-70a385cc]{--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;}
146
+ .i-mdi\:magnify[data-v-70a385cc]{--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;}
147
+ .i-mdi\:refresh[data-v-70a385cc]{--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;}
148
+ /* layer: default */
149
+ .visible[data-v-70a385cc]{visibility:visible;}
150
+ .\!inline[data-v-70a385cc]{display:inline !important;}
151
+ .inline[data-v-70a385cc]{display:inline;}
152
+ .h-4[data-v-70a385cc]{height:1rem;}
153
+ .w-4[data-v-70a385cc]{width:1rem;}
154
+ .shrink-0[data-v-70a385cc]{flex-shrink:0;}
155
+ .table[data-v-70a385cc]{display:table;}
156
+
157
+ .c-data-picker__layout[data-v-fc3e13b4] {
158
+ display: flex;
159
+ gap: 12px;
160
+ align-items: stretch;
161
+ }
162
+ .c-data-picker__navigation[data-v-fc3e13b4] {
163
+ flex: 0 0 180px;
164
+ max-height: 420px;
165
+ overflow: auto;
166
+ }
167
+ .c-data-picker__navigation-title[data-v-fc3e13b4] {
168
+ margin-block: 4px 8px;
169
+ font-weight: 600;
170
+ }
171
+ .c-data-picker__favorite[data-v-fc3e13b4] {
172
+ display: inline-flex;
173
+ gap: 2px;
174
+ }
175
+ .c-data-picker__main[data-v-fc3e13b4] {
176
+ min-width: 0;
177
+ flex: 1;
178
+ }
179
+ .c-data-picker__footer[data-v-fc3e13b4] {
180
+ margin-top: 12px;
181
+ }
182
+ .c-data-picker__history > div[data-v-fc3e13b4] {
183
+ display: flex;
184
+ flex-wrap: wrap;
185
+ align-items: center;
186
+ gap: 6px;
187
+ margin-block: 8px;
188
+ }
189
+ .c-data-picker__content[data-v-fc3e13b4]:focus {
190
+ outline: none;
191
+ }
192
+ .c-data-picker__search[data-v-fc3e13b4], .c-data-picker__actions[data-v-fc3e13b4], .c-data-picker__selection[data-v-fc3e13b4] {
193
+ display: flex;
194
+ align-items: center;
195
+ gap: 8px;
196
+ }
197
+ .c-data-picker__search[data-v-fc3e13b4] {
38
198
  margin-bottom: 12px;
39
199
  }
40
- .c-data-picker__result-bar[data-v-53b96a9d] {
200
+ .c-data-picker__result-bar[data-v-fc3e13b4] {
41
201
  display: flex;
42
202
  align-items: center;
43
203
  justify-content: space-between;
@@ -45,47 +205,54 @@
45
205
  gap: 6px 12px;
46
206
  margin-block-start: 10px;
47
207
  }
48
- .c-data-picker__pagination[data-v-53b96a9d] {
208
+ .c-data-picker__pagination[data-v-fc3e13b4] {
49
209
  margin-inline-start: auto;
50
210
  max-width: 100%;
51
211
  }
52
- .c-data-picker__pagination[data-v-53b96a9d] .n-pagination {
212
+ .c-data-picker__pagination[data-v-fc3e13b4] .n-pagination {
53
213
  flex-wrap: wrap;
54
214
  justify-content: flex-end;
55
215
  }
56
- .c-data-picker__selection[data-v-53b96a9d] {
216
+ .c-data-picker__selection[data-v-fc3e13b4] {
57
217
  flex-wrap: wrap;
58
218
  min-width: 0;
59
219
  max-width: 100%;
60
220
  font-size: 12px;
61
221
  }
62
- .c-data-picker__selection[data-v-53b96a9d] .n-tag {
222
+ .c-data-picker__selection[data-v-fc3e13b4] .n-tag {
63
223
  max-width: 100%;
64
224
  }
65
- .c-data-picker__selection[data-v-53b96a9d] .n-tag__content {
225
+ .c-data-picker__selection[data-v-fc3e13b4] .n-tag__content {
66
226
  overflow: hidden;
67
227
  text-overflow: ellipsis;
68
228
  white-space: nowrap;
69
229
  }
70
- .c-data-picker__actions[data-v-53b96a9d] {
230
+ .c-data-picker__actions[data-v-fc3e13b4] {
71
231
  justify-content: flex-end;
72
232
  }
73
- .c-data-picker__error[data-v-53b96a9d], .c-data-picker__label-error[data-v-53b96a9d] {
233
+ .c-data-picker__error[data-v-fc3e13b4] {
74
234
  font-size: 12px;
75
235
  color: var(--n-text-color);
76
236
  }
237
+ @media (max-width: 640px) {
238
+ .c-data-picker__layout[data-v-fc3e13b4] {
239
+ flex-direction: column;
240
+ }
241
+ .c-data-picker__navigation[data-v-fc3e13b4] {
242
+ flex-basis: auto;
243
+ max-height: 160px;
244
+ }
245
+ }
77
246
 
78
247
  /* layer: icons */
79
- .i-mdi\:check[data-v-53b96a9d]{--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;}
80
- .i-mdi\:close[data-v-53b96a9d]{--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;}
81
- .i-mdi\:magnify[data-v-53b96a9d]{--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;}
82
- .i-mdi\:refresh[data-v-53b96a9d]{--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;}
248
+ .i-mdi\:check[data-v-fc3e13b4]{--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;}
249
+ .i-mdi\:close[data-v-fc3e13b4]{--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;}
250
+ .i-mdi\:magnify[data-v-fc3e13b4]{--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;}
251
+ .i-mdi\:refresh[data-v-fc3e13b4]{--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;}
83
252
  /* layer: default */
84
- .visible[data-v-53b96a9d]{visibility:visible;}
85
- .\!inline[data-v-53b96a9d]{display:inline !important;}
86
- .inline[data-v-53b96a9d]{display:inline;}
87
- .hidden[data-v-53b96a9d]{display:none;}
88
- .h-4[data-v-53b96a9d]{height:1rem;}
89
- .w-4[data-v-53b96a9d]{width:1rem;}
90
- .shrink-0[data-v-53b96a9d]{flex-shrink:0;}
91
- .table[data-v-53b96a9d]{display:table;}
253
+ .visible[data-v-fc3e13b4]{visibility:visible;}
254
+ .inline[data-v-fc3e13b4]{display:inline;}
255
+ .hidden[data-v-fc3e13b4]{display:none;}
256
+ .h-4[data-v-fc3e13b4]{height:1rem;}
257
+ .w-4[data-v-fc3e13b4]{width:1rem;}
258
+ .table[data-v-fc3e13b4]{display:table;}
@@ -1,2 +1,2 @@
1
- import { a as DataPickerRequest, c as DataPickerValue, i as DataPickerProps, n as _default, o as DataPickerSource, r as DataPickerEmits, s as DataPickerSourceInput, t as createDataPickerField } from "./formField.cjs";
2
- export { _default as C_DataPicker, type DataPickerEmits, type DataPickerProps, type DataPickerRequest, type DataPickerSource, type DataPickerSourceInput, type DataPickerValue, createDataPickerField };
1
+ import { a as DataPickerNavigation, c as DataPickerRequest, d as DataPickerValue, i as DataPickerHistoryOptions, l as DataPickerSource, n as _default, o as DataPickerNavigationNode, r as DataPickerEmits, s as DataPickerProps, t as createDataPickerField, u as DataPickerSourceInput } from "./formField.cjs";
2
+ export { _default as C_DataPicker, type DataPickerEmits, type DataPickerHistoryOptions, type DataPickerNavigation, type DataPickerNavigationNode, type DataPickerProps, type DataPickerRequest, type DataPickerSource, type DataPickerSourceInput, type DataPickerValue, createDataPickerField };
@@ -1,6 +1,6 @@
1
1
  import "./types.js";
2
2
  import "./useFormConfig.js";
3
3
  import "./config2.js";
4
- import { a as DataPickerRequest, c as DataPickerValue, i as DataPickerProps, n as _default, o as DataPickerSource, r as DataPickerEmits, s as DataPickerSourceInput, t as createDataPickerField } from "./formField.js";
4
+ import { a as DataPickerNavigation, c as DataPickerRequest, d as DataPickerValue, i as DataPickerHistoryOptions, l as DataPickerSource, n as _default, o as DataPickerNavigationNode, r as DataPickerEmits, s as DataPickerProps, t as createDataPickerField, u as DataPickerSourceInput } from "./formField.js";
5
5
  import "./useFormRenderer.js";
6
- export { _default as C_DataPicker, type DataPickerEmits, type DataPickerProps, type DataPickerRequest, type DataPickerSource, type DataPickerSourceInput, type DataPickerValue, createDataPickerField };
6
+ export { _default as C_DataPicker, type DataPickerEmits, type DataPickerHistoryOptions, type DataPickerNavigation, type DataPickerNavigationNode, type DataPickerProps, type DataPickerRequest, type DataPickerSource, type DataPickerSourceInput, type DataPickerValue, createDataPickerField };
package/dist/C_Date.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { a as DateProps, i as DatePickerMode, n as DateExpose, o as DateRangeValue, r as DateModelValue, s as DateValue, t as DateEmits } from "./types3.cjs";
1
+ import { a as DateProps, i as DatePickerMode, n as DateExpose, o as DateRangeValue, r as DateModelValue, s as DateValue, t as DateEmits } from "./types4.cjs";
2
2
  import { AllowedComponentProps, ComponentCustomProps, EmitFn, VNode, VNodeProps } from "vue";
3
3
 
4
4
  //#region src/components/C_Date/index.d.ts
package/dist/C_Date.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { a as DateProps, i as DatePickerMode, n as DateExpose, o as DateRangeValue, r as DateModelValue, s as DateValue, t as DateEmits } from "./types2.js";
1
+ import { a as DateProps, i as DatePickerMode, n as DateExpose, o as DateRangeValue, r as DateModelValue, s as DateValue, t as DateEmits } from "./types3.js";
2
2
  import { AllowedComponentProps, ComponentCustomProps, EmitFn, VNode, VNodeProps } from "vue";
3
3
 
4
4
  //#region src/components/C_Date/index.d.ts
@@ -1,3 +1,3 @@
1
1
  import { t as ComponentDensity } from "./density.cjs";
2
- import { t as _default } from "./index12.vue.cjs";
2
+ import { t as _default } from "./index13.vue.cjs";
3
3
  export { _default as C_Density, type ComponentDensity };
@@ -1,3 +1,3 @@
1
1
  import { t as ComponentDensity } from "./density.js";
2
- import { t as _default } from "./index11.vue.js";
2
+ import { t as _default } from "./index12.vue.js";
3
3
  export { _default as C_Density, type ComponentDensity };
@@ -1,2 +1,2 @@
1
- import { t as _default } from "./index13.vue.cjs";
1
+ import { t as _default } from "./index14.vue.cjs";
2
2
  export { _default as C_Editor };
@@ -1,2 +1,2 @@
1
- import { t as _default } from "./index12.vue.js";
1
+ import { t as _default } from "./index13.vue.js";
2
2
  export { _default as C_Editor };
@@ -1,3 +1,3 @@
1
1
  import { n as ValidationTarget, t as ValidationIssue } from "./validation.cjs";
2
- import { n as ErrorSummaryProps, t as _default } from "./index14.vue.cjs";
2
+ import { n as ErrorSummaryProps, t as _default } from "./index15.vue.cjs";
3
3
  export { _default as C_ErrorSummary, type ErrorSummaryProps, type ValidationIssue, type ValidationTarget };
@@ -1,3 +1,3 @@
1
1
  import { n as ValidationTarget, t as ValidationIssue } from "./validation.js";
2
- import { n as ErrorSummaryProps, t as _default } from "./index13.vue.js";
2
+ import { n as ErrorSummaryProps, t as _default } from "./index14.vue.js";
3
3
  export { _default as C_ErrorSummary, type ErrorSummaryProps, type ValidationIssue, type ValidationTarget };
@@ -1,4 +1,35 @@
1
1
  @import "./shared-tokens.css";
2
+ .c-option-status {
3
+ display: flex;
4
+ align-items: center;
5
+ gap: 8px;
6
+ min-width: 0;
7
+ padding: 6px 2px;
8
+ color: inherit;
9
+ font-size: 12px;
10
+ line-height: 1.5;
11
+ }
12
+ .c-option-status--compact {
13
+ display: inline-flex;
14
+ padding: 0;
15
+ white-space: nowrap;
16
+ }
17
+ .c-option-status button {
18
+ border: 0;
19
+ padding: 0 2px;
20
+ background: transparent;
21
+ color: var(--n-loading-color, var(--n-caret-color, var(--c-primary, #18a058)));
22
+ font: inherit;
23
+ cursor: pointer;
24
+ }
25
+ .c-option-status button:focus-visible {
26
+ outline: 2px solid currentColor;
27
+ outline-offset: 2px;
28
+ }
29
+ .c-select-field {
30
+ min-width: 0;
31
+ width: 100%;
32
+ }
2
33
  .c-select {
3
34
  min-width: 0;
4
35
  max-width: 100%;
@@ -27,7 +58,43 @@
27
58
  }
28
59
 
29
60
  /* layer: default */
30
- .blur[data-v-e82176d6]{--un-blur:blur(8px);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);}
61
+ .blur[data-v-cefd9bda]{--un-blur:blur(8px);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);}
62
+
63
+ .c-option-status {
64
+ display: flex;
65
+ align-items: center;
66
+ gap: 8px;
67
+ min-width: 0;
68
+ padding: 6px 2px;
69
+ color: inherit;
70
+ font-size: 12px;
71
+ line-height: 1.5;
72
+ }
73
+ .c-option-status--compact {
74
+ display: inline-flex;
75
+ padding: 0;
76
+ white-space: nowrap;
77
+ }
78
+ .c-option-status button {
79
+ border: 0;
80
+ padding: 0 2px;
81
+ background: transparent;
82
+ color: var(--n-loading-color, var(--n-caret-color, var(--c-primary, #18a058)));
83
+ font: inherit;
84
+ cursor: pointer;
85
+ }
86
+ .c-option-status button:focus-visible {
87
+ outline: 2px solid currentColor;
88
+ outline-offset: 2px;
89
+ }
90
+ .c-auto-complete {
91
+ min-width: 0;
92
+ width: 100%;
93
+ }
94
+
95
+ /* layer: default */
96
+ .fixed[data-v-52f22b9b]{position:fixed;}
97
+ .blur[data-v-52f22b9b]{--un-blur:blur(8px);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);}
31
98
 
32
99
  .c-form[data-v-75867577] .c-form-option-state {
33
100
  width: 100%;
package/dist/C_Form.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`./chunk.cjs`);const e=require(`./config.cjs`);require(`./C_Icon2.cjs`);const t=require(`./useFormConfig.cjs`),n=require(`./helpers.cjs`),r=require(`./useDynamicFormState.cjs`);let i=require(`@robot-admin/form-validate`);exports.C_Form=n.i,exports.DYNAMIC_FORM_STATE_KEY=r.t,exports.FIELD_TYPE_OPTIONS=r.n,exports.FORM_DEFAULTS=t.t,exports.FORM_GLOBAL_CONFIG_KEY=e.FORM_GLOBAL_CONFIG_KEY,exports.FORM_RENDERER_REGISTRY_KEY=n.a,exports.LAYOUTS_WITH_OWN_CONTROLS=t.n,Object.defineProperty(exports,`NAIVE_COMBOS`,{enumerable:!0,get:function(){return i.NAIVE_COMBOS}}),Object.defineProperty(exports,`PRESET_RULES`,{enumerable:!0,get:function(){return i.PRESET_RULES}}),Object.defineProperty(exports,`SPEC_RULES`,{enumerable:!0,get:function(){return i.SPEC_RULES}}),exports.createFormRendererRegistry=n.o,exports.defineFormConfig=n.t,exports.defineFormOptions=n.n,exports.mergeFormConfig=t.r,exports.registerRenderer=n.s,exports.resolveFormConfig=t.i,exports.shouldShowActions=t.a,exports.unregisterRenderer=n.c,exports.useCForm=n.r,exports.useDynamicFormState=r.r,exports.useFormDirty=n.d,exports.useFormGlobalConfig=t.o,exports.useFormRenderer=n.l,exports.useFormState=n.u;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`./chunk.cjs`);const e=require(`./config.cjs`);require(`./C_Icon2.cjs`);const t=require(`./useFormConfig.cjs`),n=require(`./fieldRenderers.cjs`),r=require(`./useDynamicFormState.cjs`);let i=require(`@robot-admin/form-validate`);exports.C_Form=n.o,exports.DYNAMIC_FORM_STATE_KEY=r.t,exports.FIELD_TYPE_OPTIONS=r.n,exports.FORM_DEFAULTS=t.t,exports.FORM_GLOBAL_CONFIG_KEY=e.FORM_GLOBAL_CONFIG_KEY,exports.FORM_RENDERER_REGISTRY_KEY=n.s,exports.LAYOUTS_WITH_OWN_CONTROLS=t.n,Object.defineProperty(exports,`NAIVE_COMBOS`,{enumerable:!0,get:function(){return i.NAIVE_COMBOS}}),Object.defineProperty(exports,`PRESET_RULES`,{enumerable:!0,get:function(){return i.PRESET_RULES}}),Object.defineProperty(exports,`SPEC_RULES`,{enumerable:!0,get:function(){return i.SPEC_RULES}}),exports.createAutoCompleteField=n.t,exports.createFormRendererRegistry=n.c,exports.createSelectField=n.n,exports.defineFormConfig=n.r,exports.defineFormOptions=n.i,exports.mergeFormConfig=t.r,exports.registerRenderer=n.l,exports.resolveFormConfig=t.i,exports.shouldShowActions=t.a,exports.unregisterRenderer=n.u,exports.useCForm=n.a,exports.useDynamicFormState=r.r,exports.useFormDirty=n.p,exports.useFormGlobalConfig=t.o,exports.useFormRenderer=n.d,exports.useFormState=n.f;
package/dist/C_Form.css CHANGED
@@ -1,4 +1,35 @@
1
1
  @import "./C_Editor.css";
2
+ .c-option-status {
3
+ display: flex;
4
+ align-items: center;
5
+ gap: 8px;
6
+ min-width: 0;
7
+ padding: 6px 2px;
8
+ color: inherit;
9
+ font-size: 12px;
10
+ line-height: 1.5;
11
+ }
12
+ .c-option-status--compact {
13
+ display: inline-flex;
14
+ padding: 0;
15
+ white-space: nowrap;
16
+ }
17
+ .c-option-status button {
18
+ border: 0;
19
+ padding: 0 2px;
20
+ background: transparent;
21
+ color: var(--n-loading-color, var(--n-caret-color, var(--c-primary, #18a058)));
22
+ font: inherit;
23
+ cursor: pointer;
24
+ }
25
+ .c-option-status button:focus-visible {
26
+ outline: 2px solid currentColor;
27
+ outline-offset: 2px;
28
+ }
29
+ .c-select-field {
30
+ min-width: 0;
31
+ width: 100%;
32
+ }
2
33
  .c-select {
3
34
  min-width: 0;
4
35
  max-width: 100%;
@@ -27,7 +58,43 @@
27
58
  }
28
59
 
29
60
  /* layer: default */
30
- .blur[data-v-e82176d6]{--un-blur:blur(8px);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);}
61
+ .blur[data-v-cefd9bda]{--un-blur:blur(8px);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);}
62
+
63
+ .c-option-status {
64
+ display: flex;
65
+ align-items: center;
66
+ gap: 8px;
67
+ min-width: 0;
68
+ padding: 6px 2px;
69
+ color: inherit;
70
+ font-size: 12px;
71
+ line-height: 1.5;
72
+ }
73
+ .c-option-status--compact {
74
+ display: inline-flex;
75
+ padding: 0;
76
+ white-space: nowrap;
77
+ }
78
+ .c-option-status button {
79
+ border: 0;
80
+ padding: 0 2px;
81
+ background: transparent;
82
+ color: var(--n-loading-color, var(--n-caret-color, var(--c-primary, #18a058)));
83
+ font: inherit;
84
+ cursor: pointer;
85
+ }
86
+ .c-option-status button:focus-visible {
87
+ outline: 2px solid currentColor;
88
+ outline-offset: 2px;
89
+ }
90
+ .c-auto-complete {
91
+ min-width: 0;
92
+ width: 100%;
93
+ }
94
+
95
+ /* layer: default */
96
+ .fixed[data-v-52f22b9b]{position:fixed;}
97
+ .blur[data-v-52f22b9b]{--un-blur:blur(8px);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);}
31
98
 
32
99
  .c-form[data-v-75867577] .c-form-option-state {
33
100
  width: 100%;
package/dist/C_Form.d.cts CHANGED
@@ -1,7 +1,7 @@
1
+ import { t as ComponentDensity } from "./density.cjs";
1
2
  import { t as OptionsState } from "./options.cjs";
2
3
  import { A as FormTabActionsSlotProps, B as TabsLayoutConfig, C as FormMode, D as FormSlots, E as FormRecord, F as LayoutType, G as SPEC_RULES, H as NAIVE_COMBOS, I as MaybePromise, L as OptionItem, M as InlineLayoutConfig, N as LabelPlacement, O as FormStepActionsSlotProps, P as LayoutConfig, R as StepsLayoutConfig, S as FormInstance, T as FormOption, U as PRESET_RULES, V as FormValidationRule, W as RuleSpec, _ as DynamicFormState, a as ResolvedFormConfig, b as FormActionSlotProps, c as shouldShowActions, d as CardLayoutConfig, f as ComponentType, g as DynamicFormController, h as DynamicFormConfig, i as LayoutCallbacks, j as GridLayoutConfig, k as FormSubmitContext, l as useFormGlobalConfig, m as DynamicFieldConfig, n as FormConfig, o as mergeFormConfig, p as CustomLayoutConfig, r as LAYOUTS_WITH_OWN_CONTROLS, s as resolveFormConfig, t as FORM_DEFAULTS, u as AsyncOptionsContext, v as FieldPath, w as FormModel, x as FormErrorContext, y as FieldPathValue, z as SubmitEventPayload } from "./useFormConfig.cjs";
3
- import { t as ComponentDensity } from "./density.cjs";
4
4
  import { FORM_GLOBAL_CONFIG_KEY } from "./config.cjs";
5
5
  import { a as FormRendererRegistry, c as createFormRendererRegistry, d as useFormRenderer, i as FormRendererContext, l as registerRenderer, n as FORM_RENDERER_REGISTRY_KEY, o as RendererProps, r as FormRenderer, s as UseFormRendererOptions, t as ComponentMap, u as unregisterRenderer } from "./useFormRenderer.cjs";
6
- import { a as UseFormDirtyReturn, c as UseCFormOptions, d as defineFormOptions, f as useCForm, i as useDynamicFormState, l as UseCFormReturn, n as DynamicFormStateType, o as useFormDirty, p as _default, r as FIELD_TYPE_OPTIONS, s as useFormState, t as DYNAMIC_FORM_STATE_KEY, u as defineFormConfig } from "./useDynamicFormState.cjs";
7
- export { type AsyncOptionsContext, _default as C_Form, type CardLayoutConfig, type ComponentDensity, type ComponentMap, type ComponentType, type CustomLayoutConfig, DYNAMIC_FORM_STATE_KEY, type DynamicFieldConfig, type DynamicFormConfig, type DynamicFormController, type DynamicFormState, type DynamicFormStateType, FIELD_TYPE_OPTIONS, FORM_DEFAULTS, FORM_GLOBAL_CONFIG_KEY, FORM_RENDERER_REGISTRY_KEY, type FieldPath, type FieldPathValue, type FormActionSlotProps, type FormConfig, type FormErrorContext, type FormInstance, type FormMode, type FormModel, type FormOption, type FormRecord, type FormRenderer, type FormRendererContext, type FormRendererRegistry, type FormSlots, type FormStepActionsSlotProps, type FormSubmitContext, type FormTabActionsSlotProps, type FormValidationRule, type GridLayoutConfig, type InlineLayoutConfig, LAYOUTS_WITH_OWN_CONTROLS, type LabelPlacement, type LayoutCallbacks, type LayoutConfig, type LayoutType, type MaybePromise, NAIVE_COMBOS, type OptionItem, type OptionsState, PRESET_RULES, type RendererProps, type ResolvedFormConfig, type RuleSpec, SPEC_RULES, type StepsLayoutConfig, type SubmitEventPayload, type TabsLayoutConfig, type UseCFormOptions, type UseCFormReturn, type UseFormDirtyReturn, type UseFormRendererOptions, createFormRendererRegistry, defineFormConfig, defineFormOptions, mergeFormConfig, registerRenderer, resolveFormConfig, shouldShowActions, unregisterRenderer, useCForm, useDynamicFormState, useFormDirty, useFormGlobalConfig, useFormRenderer, useFormState };
6
+ import { a as UseFormDirtyReturn, c as createAutoCompleteField, d as UseCFormReturn, f as defineFormConfig, h as _default, i as useDynamicFormState, l as createSelectField, m as useCForm, n as DynamicFormStateType, o as useFormDirty, p as defineFormOptions, r as FIELD_TYPE_OPTIONS, s as useFormState, t as DYNAMIC_FORM_STATE_KEY, u as UseCFormOptions } from "./useDynamicFormState.cjs";
7
+ export { type AsyncOptionsContext, _default as C_Form, type CardLayoutConfig, type ComponentDensity, type ComponentMap, type ComponentType, type CustomLayoutConfig, DYNAMIC_FORM_STATE_KEY, type DynamicFieldConfig, type DynamicFormConfig, type DynamicFormController, type DynamicFormState, type DynamicFormStateType, FIELD_TYPE_OPTIONS, FORM_DEFAULTS, FORM_GLOBAL_CONFIG_KEY, FORM_RENDERER_REGISTRY_KEY, type FieldPath, type FieldPathValue, type FormActionSlotProps, type FormConfig, type FormErrorContext, type FormInstance, type FormMode, type FormModel, type FormOption, type FormRecord, type FormRenderer, type FormRendererContext, type FormRendererRegistry, type FormSlots, type FormStepActionsSlotProps, type FormSubmitContext, type FormTabActionsSlotProps, type FormValidationRule, type GridLayoutConfig, type InlineLayoutConfig, LAYOUTS_WITH_OWN_CONTROLS, type LabelPlacement, type LayoutCallbacks, type LayoutConfig, type LayoutType, type MaybePromise, NAIVE_COMBOS, type OptionItem, type OptionsState, PRESET_RULES, type RendererProps, type ResolvedFormConfig, type RuleSpec, SPEC_RULES, type StepsLayoutConfig, type SubmitEventPayload, type TabsLayoutConfig, type UseCFormOptions, type UseCFormReturn, type UseFormDirtyReturn, type UseFormRendererOptions, createAutoCompleteField, createFormRendererRegistry, createSelectField, defineFormConfig, defineFormOptions, mergeFormConfig, registerRenderer, resolveFormConfig, shouldShowActions, unregisterRenderer, useCForm, useDynamicFormState, useFormDirty, useFormGlobalConfig, useFormRenderer, useFormState };
package/dist/C_Form.d.ts CHANGED
@@ -1,6 +1,8 @@
1
- import { A as FormTabActionsSlotProps, B as TabsLayoutConfig, C as FormMode, D as FormSlots, E as FormRecord, F as LayoutType, G as SPEC_RULES, H as NAIVE_COMBOS, I as MaybePromise, K as OptionsState, L as OptionItem, M as InlineLayoutConfig, N as LabelPlacement, O as FormStepActionsSlotProps, P as LayoutConfig, R as StepsLayoutConfig, S as FormInstance, T as FormOption, U as PRESET_RULES, V as FormValidationRule, W as RuleSpec, _ as DynamicFormState, a as ResolvedFormConfig, b as FormActionSlotProps, c as shouldShowActions, d as CardLayoutConfig, f as ComponentType, g as DynamicFormController, h as DynamicFormConfig, i as LayoutCallbacks, j as GridLayoutConfig, k as FormSubmitContext, l as useFormGlobalConfig, m as DynamicFieldConfig, n as FormConfig, o as mergeFormConfig, p as CustomLayoutConfig, r as LAYOUTS_WITH_OWN_CONTROLS, s as resolveFormConfig, t as FORM_DEFAULTS, u as AsyncOptionsContext, v as FieldPath, w as FormModel, x as FormErrorContext, y as FieldPathValue, z as SubmitEventPayload } from "./useFormConfig.js";
2
1
  import { t as ComponentDensity } from "./density.js";
2
+ import "./types2.js";
3
+ import { A as FormTabActionsSlotProps, B as TabsLayoutConfig, C as FormMode, D as FormSlots, E as FormRecord, F as LayoutType, G as SPEC_RULES, H as NAIVE_COMBOS, I as MaybePromise, K as OptionsState, L as OptionItem, M as InlineLayoutConfig, N as LabelPlacement, O as FormStepActionsSlotProps, P as LayoutConfig, R as StepsLayoutConfig, S as FormInstance, T as FormOption, U as PRESET_RULES, V as FormValidationRule, W as RuleSpec, _ as DynamicFormState, a as ResolvedFormConfig, b as FormActionSlotProps, c as shouldShowActions, d as CardLayoutConfig, f as ComponentType, g as DynamicFormController, h as DynamicFormConfig, i as LayoutCallbacks, j as GridLayoutConfig, k as FormSubmitContext, l as useFormGlobalConfig, m as DynamicFieldConfig, n as FormConfig, o as mergeFormConfig, p as CustomLayoutConfig, r as LAYOUTS_WITH_OWN_CONTROLS, s as resolveFormConfig, t as FORM_DEFAULTS, u as AsyncOptionsContext, v as FieldPath, w as FormModel, x as FormErrorContext, y as FieldPathValue, z as SubmitEventPayload } from "./useFormConfig.js";
3
4
  import { FORM_GLOBAL_CONFIG_KEY } from "./config.js";
4
5
  import { a as FormRendererRegistry, c as createFormRendererRegistry, d as useFormRenderer, i as FormRendererContext, l as registerRenderer, n as FORM_RENDERER_REGISTRY_KEY, o as RendererProps, r as FormRenderer, s as UseFormRendererOptions, t as ComponentMap, u as unregisterRenderer } from "./useFormRenderer.js";
5
- import { a as UseFormDirtyReturn, c as UseCFormOptions, d as defineFormOptions, f as useCForm, i as useDynamicFormState, l as UseCFormReturn, n as DynamicFormStateType, o as useFormDirty, p as _default, r as FIELD_TYPE_OPTIONS, s as useFormState, t as DYNAMIC_FORM_STATE_KEY, u as defineFormConfig } from "./useDynamicFormState.js";
6
- export { type AsyncOptionsContext, _default as C_Form, type CardLayoutConfig, type ComponentDensity, type ComponentMap, type ComponentType, type CustomLayoutConfig, DYNAMIC_FORM_STATE_KEY, type DynamicFieldConfig, type DynamicFormConfig, type DynamicFormController, type DynamicFormState, type DynamicFormStateType, FIELD_TYPE_OPTIONS, FORM_DEFAULTS, FORM_GLOBAL_CONFIG_KEY, FORM_RENDERER_REGISTRY_KEY, type FieldPath, type FieldPathValue, type FormActionSlotProps, type FormConfig, type FormErrorContext, type FormInstance, type FormMode, type FormModel, type FormOption, type FormRecord, type FormRenderer, type FormRendererContext, type FormRendererRegistry, type FormSlots, type FormStepActionsSlotProps, type FormSubmitContext, type FormTabActionsSlotProps, type FormValidationRule, type GridLayoutConfig, type InlineLayoutConfig, LAYOUTS_WITH_OWN_CONTROLS, type LabelPlacement, type LayoutCallbacks, type LayoutConfig, type LayoutType, type MaybePromise, NAIVE_COMBOS, type OptionItem, type OptionsState, PRESET_RULES, type RendererProps, type ResolvedFormConfig, type RuleSpec, SPEC_RULES, type StepsLayoutConfig, type SubmitEventPayload, type TabsLayoutConfig, type UseCFormOptions, type UseCFormReturn, type UseFormDirtyReturn, type UseFormRendererOptions, createFormRendererRegistry, defineFormConfig, defineFormOptions, mergeFormConfig, registerRenderer, resolveFormConfig, shouldShowActions, unregisterRenderer, useCForm, useDynamicFormState, useFormDirty, useFormGlobalConfig, useFormRenderer, useFormState };
6
+ import { a as UseFormDirtyReturn, c as createAutoCompleteField, d as UseCFormReturn, f as defineFormConfig, h as _default, i as useDynamicFormState, l as createSelectField, m as useCForm, n as DynamicFormStateType, o as useFormDirty, p as defineFormOptions, r as FIELD_TYPE_OPTIONS, s as useFormState, t as DYNAMIC_FORM_STATE_KEY, u as UseCFormOptions } from "./useDynamicFormState.js";
7
+ import "./types4.js";
8
+ export { type AsyncOptionsContext, _default as C_Form, type CardLayoutConfig, type ComponentDensity, type ComponentMap, type ComponentType, type CustomLayoutConfig, DYNAMIC_FORM_STATE_KEY, type DynamicFieldConfig, type DynamicFormConfig, type DynamicFormController, type DynamicFormState, type DynamicFormStateType, FIELD_TYPE_OPTIONS, FORM_DEFAULTS, FORM_GLOBAL_CONFIG_KEY, FORM_RENDERER_REGISTRY_KEY, type FieldPath, type FieldPathValue, type FormActionSlotProps, type FormConfig, type FormErrorContext, type FormInstance, type FormMode, type FormModel, type FormOption, type FormRecord, type FormRenderer, type FormRendererContext, type FormRendererRegistry, type FormSlots, type FormStepActionsSlotProps, type FormSubmitContext, type FormTabActionsSlotProps, type FormValidationRule, type GridLayoutConfig, type InlineLayoutConfig, LAYOUTS_WITH_OWN_CONTROLS, type LabelPlacement, type LayoutCallbacks, type LayoutConfig, type LayoutType, type MaybePromise, NAIVE_COMBOS, type OptionItem, type OptionsState, PRESET_RULES, type RendererProps, type ResolvedFormConfig, type RuleSpec, SPEC_RULES, type StepsLayoutConfig, type SubmitEventPayload, type TabsLayoutConfig, type UseCFormOptions, type UseCFormReturn, type UseFormDirtyReturn, type UseFormRendererOptions, createAutoCompleteField, createFormRendererRegistry, createSelectField, defineFormConfig, defineFormOptions, mergeFormConfig, registerRenderer, resolveFormConfig, shouldShowActions, unregisterRenderer, useCForm, useDynamicFormState, useFormDirty, useFormGlobalConfig, useFormRenderer, useFormState };
package/dist/C_Form.js CHANGED
@@ -1 +1 @@
1
- import{FORM_GLOBAL_CONFIG_KEY as e}from"./config.js";import"./C_Icon2.js";import{a as t,i as n,n as r,o as i,r as a,t as o}from"./useFormConfig.js";import{a as s,c,d as l,i as u,l as d,n as f,o as p,r as m,s as h,t as g,u as _}from"./helpers.js";import{n as v,r as y,t as b}from"./formValidation.js";import{n as x,r as S,t as C}from"./useDynamicFormState.js";export{u as C_Form,C as DYNAMIC_FORM_STATE_KEY,x as FIELD_TYPE_OPTIONS,o as FORM_DEFAULTS,e as FORM_GLOBAL_CONFIG_KEY,s as FORM_RENDERER_REGISTRY_KEY,r as LAYOUTS_WITH_OWN_CONTROLS,b as NAIVE_COMBOS,v as PRESET_RULES,y as SPEC_RULES,p as createFormRendererRegistry,g as defineFormConfig,f as defineFormOptions,a as mergeFormConfig,h as registerRenderer,n as resolveFormConfig,t as shouldShowActions,c as unregisterRenderer,m as useCForm,S as useDynamicFormState,l as useFormDirty,i as useFormGlobalConfig,d as useFormRenderer,_ as useFormState};
1
+ import{FORM_GLOBAL_CONFIG_KEY as e}from"./config.js";import"./C_Icon2.js";import{a as t,i as n,n as r,o as i,r as a,t as o}from"./useFormConfig.js";import{a as s,c,d as l,f as u,i as d,l as f,n as p,o as m,p as h,r as g,s as _,t as v,u as y}from"./fieldRenderers.js";import{n as b,r as x,t as S}from"./formValidation.js";import{n as C,r as w,t as T}from"./useDynamicFormState.js";export{m as C_Form,T as DYNAMIC_FORM_STATE_KEY,C as FIELD_TYPE_OPTIONS,o as FORM_DEFAULTS,e as FORM_GLOBAL_CONFIG_KEY,_ as FORM_RENDERER_REGISTRY_KEY,r as LAYOUTS_WITH_OWN_CONTROLS,S as NAIVE_COMBOS,b as PRESET_RULES,x as SPEC_RULES,v as createAutoCompleteField,c as createFormRendererRegistry,p as createSelectField,g as defineFormConfig,d as defineFormOptions,a as mergeFormConfig,f as registerRenderer,n as resolveFormConfig,t as shouldShowActions,y as unregisterRenderer,s as useCForm,w as useDynamicFormState,h as useFormDirty,i as useFormGlobalConfig,l as useFormRenderer,u as useFormState};
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`./C_Icon2.cjs`),require(`./C_ActionBar2.cjs`),require(`./helpers.cjs`);const e=require(`./C_FormModal2.cjs`);exports.C_FormModal=e.t;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`./C_Icon2.cjs`),require(`./C_ActionBar2.cjs`),require(`./fieldRenderers.cjs`);const e=require(`./C_FormModal2.cjs`);exports.C_FormModal=e.t;
@@ -1,2 +1,2 @@
1
- import { a as FormModalProps, i as FormModalMode, n as FormModalEditor, r as FormModalEmits, t as _default } from "./index15.vue.cjs";
1
+ import { a as FormModalProps, i as FormModalMode, n as FormModalEditor, r as FormModalEmits, t as _default } from "./index16.vue.cjs";
2
2
  export { _default as C_FormModal, type FormModalEditor, type FormModalEmits, type FormModalMode, type FormModalProps };
@@ -1,5 +1,7 @@
1
+ import "./types2.js";
1
2
  import "./useFormConfig.js";
2
3
  import "./useFormRenderer.js";
3
4
  import "./useDynamicFormState.js";
4
- import { a as FormModalProps, i as FormModalMode, n as FormModalEditor, r as FormModalEmits, t as _default } from "./index14.vue.js";
5
+ import "./types4.js";
6
+ import { a as FormModalProps, i as FormModalMode, n as FormModalEditor, r as FormModalEmits, t as _default } from "./index15.vue.js";
5
7
  export { _default as C_FormModal, type FormModalEditor, type FormModalEmits, type FormModalMode, type FormModalProps };
@@ -1 +1 @@
1
- import"./C_Icon2.js";import"./C_ActionBar2.js";import"./helpers.js";import{t as e}from"./C_FormModal2.js";export{e as C_FormModal};
1
+ import"./C_Icon2.js";import"./C_ActionBar2.js";import"./fieldRenderers.js";import{t as e}from"./C_FormModal2.js";export{e as C_FormModal};
@@ -1 +1 @@
1
- require(`./chunk.cjs`);const e=require(`./density.cjs`),t=require(`./observer.cjs`),n=require(`./data2.cjs`),r=require(`./feedback.cjs`),i=require(`./export-helper.cjs`),a=require(`./useActionTask.cjs`),o=require(`./C_ActionBar2.cjs`),s=require(`./useFormConfig.cjs`),c=require(`./helpers.cjs`),l=require(`./formModal.cjs`);let u=require(`vue`),d=require(`naive-ui`);const f={key:0,role:`status`,style:{margin:`0 0 8px`}},p=(0,u.defineComponent)({name:`C_FormModal`,__name:`index`,props:{editor:{},options:{},config:{default:()=>({})},renderers:{},width:{default:`min(620px, calc(100vw - 24px))`},createText:{default:`创建`},saveText:{default:`保存`},cancelText:{default:`取消`},closable:{type:Boolean,default:!0},maskClosable:{type:Boolean,default:!0},closeOnEsc:{type:Boolean,default:!0}},emits:[`submit`,`close`],setup(i,{emit:p}){let m=i,h=p,g=(0,u.ref)(null),_=s.o(),v=(0,u.computed)(()=>s.r(m.config,_)),y=r.t(()=>v.value.feedback),b=(0,u.computed)(()=>m.config?.density??_.density??`compact`),x=(0,u.computed)({get:()=>m.editor.visible.value,set:e=>{e||M()}}),S=(0,u.computed)(()=>m.editor.title.value),C=(0,u.ref)(0),w=(0,u.ref)(!1),T=a.t(),E=(0,u.computed)(()=>T.isRunning(C.value)),D=(0,u.computed)(()=>E.value||m.editor.loading.value||!!g.value?.isSubmitting);(0,u.watch)([()=>m.editor,()=>m.editor.visible.value],([e,t],[n])=>{(t||e!==n)&&(C.value++,w.value=!1)},{flush:`sync`}),(0,u.onScopeDispose)(()=>{C.value++});let O=(0,u.computed)(()=>l.t(m.width,b.value)),k=(0,u.computed)({get:()=>m.editor.model.value??{},set:e=>{E.value||m.editor.setModel(e)}}),A=e=>e===void 0||n.a(e,g.value?.getModel())?!0:(w.value=!0,!1),j=(0,u.computed)(()=>({...m.config,...E.value?{disabled:!0}:{},density:b.value,mode:m.editor.mode.value,showActions:!1,submitSuccessText:``,onSubmit:async(e,r)=>{let{editor:i,config:a}=m,o=C.value;w.value=!1;let s=()=>o===C.value&&!r?.signal.aborted&&i.visible.value,c;a?.onSubmit&&(c=n.t(e.model),await a.onSubmit(e,r));let l=await T.run(o,()=>i.submit(e.model),()=>s()&&A(c));if(!l.executed)return;let u=l.value;if(o!==C.value||!u&&!s())return;h(`submit`,e,u);let d=v.value.submitSuccessText;u&&d&&t.t(()=>y.success(d))}})),M=()=>{D.value||!x.value||(m.editor.close(),h(`close`))},N=(0,u.computed)(()=>{let t=e.t(b.value);return{align:`right`,size:v.value.size??(b.value===`compact`?`tiny`:t.size),gap:t.gap,compact:b.value===`compact`}}),P=(0,u.computed)(()=>o.a([{key:`cancel`,label:m.cancelText,disabled:D,onClick:M},{key:m.editor.mode.value===`create`?`create`:`save`,label:m.editor.mode.value===`create`?m.createText:m.saveText,loading:D,onClick:async()=>{await g.value?.submit()}}]));return(e,t)=>((0,u.openBlock)(),(0,u.createBlock)((0,u.unref)(d.NModal),{show:x.value,"onUpdate:show":t[1]||=e=>x.value=e,preset:`card`,title:S.value,"aria-label":S.value,style:(0,u.normalizeStyle)(O.value.shell),"header-style":O.value.header,"content-style":O.value.content,"footer-style":O.value.footer,"footer-class":`c-form-modal__footer`,"mask-closable":i.maskClosable&&!D.value,"close-on-esc":i.closeOnEsc&&!D.value,closable:i.closable&&!D.value,class:(0,u.normalizeClass)([`c-form-modal`,`c-form-modal--${b.value}`])},{footer:(0,u.withCtx)(()=>[w.value?((0,u.openBlock)(),(0,u.createElementBlock)(`p`,f,` 表单已修改,请重新保存。 `)):(0,u.createCommentVNode)(`v-if`,!0),((0,u.openBlock)(),(0,u.createBlock)(o.t,{key:C.value,actions:P.value,config:N.value},null,8,[`actions`,`config`]))]),default:(0,u.withCtx)(()=>[x.value&&i.editor.model.value?((0,u.openBlock)(),(0,u.createBlock)((0,u.unref)(c.i),{key:C.value,ref_key:`formRef`,ref:g,modelValue:k.value,"onUpdate:modelValue":t[0]||=e=>k.value=e,options:i.options,config:j.value,renderers:i.renderers,inert:E.value},(0,u.createSlots)({_:2},[(0,u.renderList)(e.$slots,(t,n)=>({name:n,fn:(0,u.withCtx)(t=>[(0,u.renderSlot)(e.$slots,n,(0,u.normalizeProps)((0,u.guardReactiveProps)(t)),void 0,!0)])}))]),1032,[`modelValue`,`options`,`config`,`renderers`,`inert`])):(0,u.createCommentVNode)(`v-if`,!0)]),_:3},8,[`show`,`title`,`aria-label`,`style`,`header-style`,`content-style`,`footer-style`,`mask-closable`,`close-on-esc`,`closable`,`class`]))}});var m=i.t(p,[[`__scopeId`,`data-v-ac918c0a`]]);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return m}});
1
+ require(`./chunk.cjs`);const e=require(`./density.cjs`),t=require(`./observer.cjs`),n=require(`./data2.cjs`),r=require(`./feedback.cjs`),i=require(`./export-helper.cjs`),a=require(`./useActionTask.cjs`),o=require(`./C_ActionBar2.cjs`),s=require(`./useFormConfig.cjs`),c=require(`./fieldRenderers.cjs`),l=require(`./formModal.cjs`);let u=require(`vue`),d=require(`naive-ui`);const f={key:0,role:`status`,style:{margin:`0 0 8px`}},p=(0,u.defineComponent)({name:`C_FormModal`,__name:`index`,props:{editor:{},options:{},config:{default:()=>({})},renderers:{},width:{default:`min(620px, calc(100vw - 24px))`},createText:{default:`创建`},saveText:{default:`保存`},cancelText:{default:`取消`},closable:{type:Boolean,default:!0},maskClosable:{type:Boolean,default:!0},closeOnEsc:{type:Boolean,default:!0}},emits:[`submit`,`close`],setup(i,{emit:p}){let m=i,h=p,g=(0,u.ref)(null),_=s.o(),v=(0,u.computed)(()=>s.r(m.config,_)),y=r.t(()=>v.value.feedback),b=(0,u.computed)(()=>m.config?.density??_.density??`compact`),x=(0,u.computed)({get:()=>m.editor.visible.value,set:e=>{e||M()}}),S=(0,u.computed)(()=>m.editor.title.value),C=(0,u.ref)(0),w=(0,u.ref)(!1),T=a.t(),E=(0,u.computed)(()=>T.isRunning(C.value)),D=(0,u.computed)(()=>E.value||m.editor.loading.value||!!g.value?.isSubmitting);(0,u.watch)([()=>m.editor,()=>m.editor.visible.value],([e,t],[n])=>{(t||e!==n)&&(C.value++,w.value=!1)},{flush:`sync`}),(0,u.onScopeDispose)(()=>{C.value++});let O=(0,u.computed)(()=>l.t(m.width,b.value)),k=(0,u.computed)({get:()=>m.editor.model.value??{},set:e=>{E.value||m.editor.setModel(e)}}),A=e=>e===void 0||n.a(e,g.value?.getModel())?!0:(w.value=!0,!1),j=(0,u.computed)(()=>({...m.config,...E.value?{disabled:!0}:{},density:b.value,mode:m.editor.mode.value,showActions:!1,submitSuccessText:``,onSubmit:async(e,r)=>{let{editor:i,config:a}=m,o=C.value;w.value=!1;let s=()=>o===C.value&&!r?.signal.aborted&&i.visible.value,c;a?.onSubmit&&(c=n.t(e.model),await a.onSubmit(e,r));let l=await T.run(o,()=>i.submit(e.model),()=>s()&&A(c));if(!l.executed)return;let u=l.value;if(o!==C.value||!u&&!s())return;h(`submit`,e,u);let d=v.value.submitSuccessText;u&&d&&t.t(()=>y.success(d))}})),M=()=>{D.value||!x.value||(m.editor.close(),h(`close`))},N=(0,u.computed)(()=>{let t=e.t(b.value);return{align:`right`,size:v.value.size??(b.value===`compact`?`tiny`:t.size),gap:t.gap,compact:b.value===`compact`}}),P=(0,u.computed)(()=>o.a([{key:`cancel`,label:m.cancelText,disabled:D,onClick:M},{key:m.editor.mode.value===`create`?`create`:`save`,label:m.editor.mode.value===`create`?m.createText:m.saveText,loading:D,onClick:async()=>{await g.value?.submit()}}]));return(e,t)=>((0,u.openBlock)(),(0,u.createBlock)((0,u.unref)(d.NModal),{show:x.value,"onUpdate:show":t[1]||=e=>x.value=e,preset:`card`,title:S.value,"aria-label":S.value,style:(0,u.normalizeStyle)(O.value.shell),"header-style":O.value.header,"content-style":O.value.content,"footer-style":O.value.footer,"footer-class":`c-form-modal__footer`,"mask-closable":i.maskClosable&&!D.value,"close-on-esc":i.closeOnEsc&&!D.value,closable:i.closable&&!D.value,class:(0,u.normalizeClass)([`c-form-modal`,`c-form-modal--${b.value}`])},{footer:(0,u.withCtx)(()=>[w.value?((0,u.openBlock)(),(0,u.createElementBlock)(`p`,f,` 表单已修改,请重新保存。 `)):(0,u.createCommentVNode)(`v-if`,!0),((0,u.openBlock)(),(0,u.createBlock)(o.t,{key:C.value,actions:P.value,config:N.value},null,8,[`actions`,`config`]))]),default:(0,u.withCtx)(()=>[x.value&&i.editor.model.value?((0,u.openBlock)(),(0,u.createBlock)((0,u.unref)(c.o),{key:C.value,ref_key:`formRef`,ref:g,modelValue:k.value,"onUpdate:modelValue":t[0]||=e=>k.value=e,options:i.options,config:j.value,renderers:i.renderers,inert:E.value},(0,u.createSlots)({_:2},[(0,u.renderList)(e.$slots,(t,n)=>({name:n,fn:(0,u.withCtx)(t=>[(0,u.renderSlot)(e.$slots,n,(0,u.normalizeProps)((0,u.guardReactiveProps)(t)),void 0,!0)])}))]),1032,[`modelValue`,`options`,`config`,`renderers`,`inert`])):(0,u.createCommentVNode)(`v-if`,!0)]),_:3},8,[`show`,`title`,`aria-label`,`style`,`header-style`,`content-style`,`footer-style`,`mask-closable`,`close-on-esc`,`closable`,`class`]))}});var m=i.t(p,[[`__scopeId`,`data-v-ac918c0a`]]);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return m}});