@sdata/web-vue 1.14.0 → 1.19.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 (233) hide show
  1. package/dist/sd.css +364 -1
  2. package/dist/sd.min.css +1 -1
  3. package/es/_components/picker/input-range.vue.d.ts +2 -2
  4. package/es/_components/picker/input.vue.d.ts +1 -1
  5. package/es/_components/resize-trigger.vue_vue_type_script_lang.js +1 -1
  6. package/es/_components/select-view/select-view.d.ts +2 -2
  7. package/es/_components/virtual-list/virtual-list.vue.d.ts +3 -3
  8. package/es/_hooks/use-popup-manager.js +2 -4
  9. package/es/_utils/dom.d.ts +5 -2
  10. package/es/_utils/dom.js +1 -1
  11. package/es/anchor/anchor.vue.d.ts +2 -2
  12. package/es/anchor/index.d.ts +9 -9
  13. package/es/auto-complete/auto-complete.d.ts +3 -3
  14. package/es/auto-complete/index.d.ts +9 -9
  15. package/es/button/button.vue.d.ts +2 -2
  16. package/es/button/index.d.ts +6 -6
  17. package/es/calendar/calendar.d.ts +1 -1
  18. package/es/calendar/index.d.ts +3 -3
  19. package/es/card/card.d.ts +4 -4
  20. package/es/card/index.d.ts +9 -9
  21. package/es/carousel/carousel-arrow.vue.d.ts +1 -1
  22. package/es/carousel/carousel-indicator.vue.d.ts +1 -1
  23. package/es/carousel/carousel.d.ts +3 -3
  24. package/es/carousel/index.d.ts +9 -9
  25. package/es/cascader/base-cascader-panel.d.ts +1 -1
  26. package/es/cascader/cascader-search-panel.d.ts +1 -1
  27. package/es/cascader/cascader.vue.d.ts +14 -14
  28. package/es/checkbox/checkbox-group.d.ts +1 -1
  29. package/es/checkbox/index.d.ts +1 -1
  30. package/es/color-picker/color-picker.d.ts +5 -5
  31. package/es/color-picker/index.d.ts +15 -15
  32. package/es/color-picker/panel.d.ts +2 -2
  33. package/es/components.d.ts +1 -0
  34. package/es/config-provider/config-provider.vue.d.ts +8 -2
  35. package/es/config-provider/config-provider.vue_vue_type_script_lang.js +6 -0
  36. package/es/config-provider/context.d.ts +3 -0
  37. package/es/config-provider/index.d.ts +13 -3
  38. package/es/cropper/cropper.vue.d.ts +1 -1
  39. package/es/cropper/index.d.ts +3 -3
  40. package/es/date-picker/index.d.ts +94 -94
  41. package/es/date-picker/panels/date/index.vue.d.ts +15 -15
  42. package/es/date-picker/panels/footer.vue.d.ts +15 -15
  43. package/es/date-picker/panels/shortcuts.vue.d.ts +6 -6
  44. package/es/date-picker/panels/week/index.vue.d.ts +16 -16
  45. package/es/date-picker/picker-panel.vue.d.ts +54 -54
  46. package/es/date-picker/picker.vue.d.ts +87 -87
  47. package/es/date-picker/pickers/date-picker.d.ts +1 -1
  48. package/es/date-picker/pickers/week-picker.d.ts +1 -1
  49. package/es/date-picker/range-picker-panel.vue.d.ts +55 -55
  50. package/es/date-picker/range-picker.vue.d.ts +90 -90
  51. package/es/descriptions/descriptions.d.ts +1 -1
  52. package/es/descriptions/index.d.ts +3 -3
  53. package/es/drawer/drawer.vue.d.ts +11 -11
  54. package/es/drawer/index.d.ts +27 -27
  55. package/es/dropdown/dropdown-button.vue.d.ts +24 -24
  56. package/es/dropdown/dropdown-submenu.vue.d.ts +17 -17
  57. package/es/dropdown/dropdown.vue.d.ts +16 -16
  58. package/es/dropdown/index.d.ts +74 -74
  59. package/es/ellipsis/ellipsis.vue.d.ts +43 -43
  60. package/es/ellipsis/index.d.ts +182 -182
  61. package/es/ellipsis/performant-ellipsis.vue.d.ts +44 -44
  62. package/es/form/form-item-label.vue.d.ts +36 -36
  63. package/es/form/form-item.vue.d.ts +40 -40
  64. package/es/form/index.d.ts +40 -40
  65. package/es/grid/grid-row.vue.d.ts +3 -3
  66. package/es/grid/index.d.ts +3 -3
  67. package/es/image/image.vue.d.ts +38 -38
  68. package/es/image/preview-action.d.ts +36 -36
  69. package/es/image/preview-group.vue.d.ts +41 -41
  70. package/es/image/preview-toolbar.vue.d.ts +36 -36
  71. package/es/image/preview.vue.d.ts +38 -38
  72. package/es/index.css +364 -1
  73. package/es/index.d.ts +5 -1
  74. package/es/index.js +17 -15
  75. package/es/index.scss +1 -0
  76. package/es/input/index.d.ts +9 -9
  77. package/es/input/input-password.vue.d.ts +2 -2
  78. package/es/input/input-search.d.ts +1 -1
  79. package/es/input/input.d.ts +2 -2
  80. package/es/input-number/index.d.ts +9 -9
  81. package/es/input-number/input-number.d.ts +3 -3
  82. package/es/input-tag/index.d.ts +6 -6
  83. package/es/input-tag/input-tag.d.ts +2 -2
  84. package/es/json-form/index.d.ts +112 -0
  85. package/es/json-form/index.js +11 -0
  86. package/es/json-form/json-form-component.js +5 -0
  87. package/es/json-form/json-form-component.vue.d.ts +24 -0
  88. package/es/json-form/json-form-component.vue_vue_type_script_setup_true_lang.js +89 -0
  89. package/es/json-form/json-form-item.js +5 -0
  90. package/es/json-form/json-form-item.vue.d.ts +32 -0
  91. package/es/json-form/json-form-item.vue_vue_type_script_setup_true_lang.js +213 -0
  92. package/es/json-form/json-form.js +5 -0
  93. package/es/json-form/json-form.vue.d.ts +42 -0
  94. package/es/json-form/json-form.vue_vue_type_script_setup_true_lang.js +142 -0
  95. package/es/json-form/style/css.js +2 -0
  96. package/es/json-form/style/index.css +31 -0
  97. package/es/json-form/style/index.d.ts +2 -0
  98. package/es/json-form/style/index.js +2 -0
  99. package/es/json-form/style/index.scss +25 -0
  100. package/es/json-form/style/token.scss +8 -0
  101. package/es/json-form/types.d.ts +291 -0
  102. package/es/json-form/types.js +43 -0
  103. package/es/json-form/utils.d.ts +11 -0
  104. package/es/json-form/utils.js +336 -0
  105. package/es/layout/header.js +2 -18
  106. package/es/layout/header.vue.d.ts +38 -3
  107. package/es/layout/header.vue_vue_type_script_setup_true_lang.js +350 -0
  108. package/es/layout/index.d.ts +1029 -49
  109. package/es/layout/interface.d.ts +40 -0
  110. package/es/layout/sider.js +38 -9
  111. package/es/layout/sider.vue.d.ts +950 -39
  112. package/es/layout/sider.vue_vue_type_script_lang.js +304 -31
  113. package/es/layout/style/index.css +155 -1
  114. package/es/layout/style/index.scss +198 -16
  115. package/es/layout/style/token.scss +13 -0
  116. package/es/link/index.d.ts +9 -9
  117. package/es/link/link.vue.d.ts +3 -3
  118. package/es/list/index.d.ts +3 -3
  119. package/es/list/list.d.ts +1 -1
  120. package/es/mention/index.d.ts +12 -12
  121. package/es/mention/mention.d.ts +4 -4
  122. package/es/menu/base-menu.vue.d.ts +24 -5
  123. package/es/menu/base-menu.vue_vue_type_script_lang.js +19 -1
  124. package/es/menu/context.d.ts +1 -1
  125. package/es/menu/index.d.ts +1 -1
  126. package/es/menu/interface.d.ts +8 -0
  127. package/es/menu/item-group.js +9 -2
  128. package/es/menu/item-group.vue.d.ts +2894 -0
  129. package/es/menu/item-group.vue_vue_type_script_lang.js +7 -2
  130. package/es/menu/item.d.ts +1 -1
  131. package/es/menu/item.js +10 -3
  132. package/es/menu/menu.d.ts +54 -5
  133. package/es/menu/menu.js +8 -0
  134. package/es/menu/style/css.js +1 -0
  135. package/es/menu/style/index.css +194 -0
  136. package/es/menu/style/index.d.ts +1 -0
  137. package/es/menu/style/index.js +1 -0
  138. package/es/menu/style/index.scss +48 -1
  139. package/es/menu/sub-menu-inline.js +24 -3
  140. package/es/menu/sub-menu-inline.vue.d.ts +2894 -0
  141. package/es/menu/sub-menu-inline.vue_vue_type_script_lang.js +4 -1
  142. package/es/menu/sub-menu-pop.js +29 -2
  143. package/es/menu/sub-menu-pop.vue.d.ts +2924 -22
  144. package/es/menu/sub-menu-pop.vue_vue_type_script_lang.js +3 -1
  145. package/es/menu/sub-menu.d.ts +1 -1
  146. package/es/message/message-list.d.ts +1 -1
  147. package/es/message/message.vue.d.ts +1 -1
  148. package/es/modal/index.d.ts +27 -27
  149. package/es/modal/modal.vue.d.ts +11 -11
  150. package/es/notification/notification.vue.d.ts +1 -1
  151. package/es/overflow-list/index.d.ts +3 -3
  152. package/es/overflow-list/overflow-list.d.ts +1 -1
  153. package/es/pagination/page-jumper.vue.d.ts +9 -9
  154. package/es/pagination/page-options.vue.d.ts +66 -66
  155. package/es/popconfirm/index.d.ts +51 -51
  156. package/es/popconfirm/popconfirm.vue.d.ts +24 -24
  157. package/es/popover/index.d.ts +33 -33
  158. package/es/popover/popover.vue.d.ts +16 -16
  159. package/es/progress/circle.vue.d.ts +2 -2
  160. package/es/progress/index.d.ts +13 -13
  161. package/es/progress/line.vue.d.ts +1 -1
  162. package/es/progress/progress.vue.d.ts +6 -6
  163. package/es/progress/steps.vue.d.ts +2 -2
  164. package/es/radio/index.d.ts +4 -4
  165. package/es/radio/radio-group.d.ts +1 -1
  166. package/es/radio/radio.d.ts +1 -1
  167. package/es/sd-vue.js +17 -14
  168. package/es/select/index.d.ts +66 -66
  169. package/es/select/option.vue.d.ts +2 -2
  170. package/es/select/select-dropdown.vue.d.ts +4 -4
  171. package/es/select/select.d.ts +27 -27
  172. package/es/skeleton/index.d.ts +1 -1
  173. package/es/skeleton/shape.vue.d.ts +1 -1
  174. package/es/slider/index.d.ts +97 -97
  175. package/es/slider/slider-button.vue.d.ts +38 -38
  176. package/es/slider/slider-input.vue.d.ts +9 -9
  177. package/es/slider/slider.vue.d.ts +48 -48
  178. package/es/spin/index.d.ts +3 -3
  179. package/es/spin/spin.d.ts +1 -1
  180. package/es/statistic/index.d.ts +6 -6
  181. package/es/statistic/statistic.vue.d.ts +2 -2
  182. package/es/steps/index.d.ts +6 -6
  183. package/es/steps/steps.vue.d.ts +2 -2
  184. package/es/style/theme/z-index.d.ts +8 -0
  185. package/es/style/theme/z-index.js +7 -0
  186. package/es/switch/index.d.ts +21 -6
  187. package/es/switch/switch.vue.d.ts +11 -2
  188. package/es/switch/switch.vue_vue_type_script_lang.js +30 -5
  189. package/es/table/index.d.ts +15 -15
  190. package/es/table/table-operation-td.d.ts +5 -5
  191. package/es/table/table-th.js +1 -1
  192. package/es/table/table.d.ts +5 -5
  193. package/es/tabs/index.d.ts +9 -9
  194. package/es/tabs/tabs.d.ts +3 -3
  195. package/es/tag/index.d.ts +922 -922
  196. package/es/tag/tag.vue.d.ts +367 -367
  197. package/es/textarea/index.d.ts +6 -6
  198. package/es/textarea/textarea.vue.d.ts +2 -2
  199. package/es/time-picker/index.d.ts +104 -104
  200. package/es/time-picker/panel.vue.d.ts +14 -14
  201. package/es/time-picker/range-panel.d.ts +14 -14
  202. package/es/time-picker/time-picker.vue.d.ts +50 -50
  203. package/es/timeline/index.d.ts +9 -9
  204. package/es/timeline/timeline.d.ts +4 -4
  205. package/es/tooltip/index.d.ts +36 -36
  206. package/es/tooltip/tooltip.vue.d.ts +17 -17
  207. package/es/transfer/index.d.ts +37 -37
  208. package/es/transfer/transfer-list-item.d.ts +2 -2
  209. package/es/transfer/transfer-view.vue.d.ts +8 -8
  210. package/es/transfer/transfer-view.vue_vue_type_script_lang.js +1 -1
  211. package/es/transfer/transfer.vue.d.ts +17 -17
  212. package/es/tree/base-node.vue.d.ts +2 -2
  213. package/es/tree/base-node.vue_vue_type_script_lang.js +1 -1
  214. package/es/tree/node-switcher.vue_vue_type_script_lang.js +1 -1
  215. package/es/tree/transition-node-list.vue.d.ts +2 -2
  216. package/es/tree/tree.vue.d.ts +27 -27
  217. package/es/tree/tree.vue_vue_type_script_lang.js +3 -3
  218. package/es/tree-select/tree-select.vue.d.ts +30 -30
  219. package/es/tree-select/tree-select.vue_vue_type_script_lang.js +2 -2
  220. package/es/trigger/index.d.ts +15 -15
  221. package/es/trigger/trigger.d.ts +5 -5
  222. package/es/typography/base.d.ts +1 -1
  223. package/es/typography/edit-content.vue.d.ts +27 -27
  224. package/es/typography/operations.vue.d.ts +36 -36
  225. package/es/upload/index.d.ts +6 -6
  226. package/es/upload/upload-button.d.ts +1 -1
  227. package/es/upload/upload.d.ts +2 -2
  228. package/es/watermark/index.d.ts +3 -3
  229. package/es/watermark/watermark.d.ts +1 -1
  230. package/json/vetur-attributes.json +150 -7
  231. package/json/vetur-tags.json +45 -4
  232. package/json/web-types.json +316 -19
  233. package/package.json +2 -1
@@ -0,0 +1,336 @@
1
+ import { _objectSpread2 } from "../_virtual/_@oxc-project_runtime@0.130.0/helpers/objectSpread2.js";
2
+ import input_password_default from "../input/input-password.js";
3
+ import input_search_default from "../input/input-search.js";
4
+ import Input from "../input/index.js";
5
+ import checkbox_group_default from "../checkbox/checkbox-group.js";
6
+ import Checkbox from "../checkbox/index.js";
7
+ import AutoComplete from "../auto-complete/index.js";
8
+ import radio_group_default from "../radio/radio-group.js";
9
+ import Radio from "../radio/index.js";
10
+ import InputTag from "../input-tag/index.js";
11
+ import Select from "../select/index.js";
12
+ import Cascader from "../cascader/index.js";
13
+ import InputNumber from "../input-number/index.js";
14
+ import range_picker_default from "../date-picker/range-picker.js";
15
+ import DatePicker from "../date-picker/index.js";
16
+ import grid_row_default from "../grid/grid-row.js";
17
+ import { JSON_FORM_COMPONENT_TYPES } from "./types.js";
18
+ import Textarea from "../textarea/index.js";
19
+ import Mention from "../mention/index.js";
20
+ import Rate from "../rate/index.js";
21
+ import Slider from "../slider/index.js";
22
+ import Switch from "../switch/index.js";
23
+ import TimePicker from "../time-picker/index.js";
24
+ import Transfer from "../transfer/index.js";
25
+ import TreeSelect from "../tree-select/index.js";
26
+ import VerificationCode from "../verification-code/index.js";
27
+ import { camelCase, isPlainObject, omitBy } from "es-toolkit";
28
+ //#region components/json-form/utils.ts
29
+ var JSON_FORM_STANDARD_A2UI_0_8_COMPONENTS = new Set([
30
+ "Row",
31
+ "Column",
32
+ "TextField",
33
+ "CheckBox",
34
+ "Slider",
35
+ "DateTimeInput",
36
+ "MultipleChoice",
37
+ "ChoicePicker"
38
+ ]);
39
+ var JSON_FORM_A2UI_0_8_COMPONENT_ALIASES = {
40
+ AutoComplete: JSON_FORM_COMPONENT_TYPES.autoComplete,
41
+ Cascader: JSON_FORM_COMPONENT_TYPES.cascader,
42
+ CheckBox: JSON_FORM_COMPONENT_TYPES.checkbox,
43
+ Checkbox: JSON_FORM_COMPONENT_TYPES.checkbox,
44
+ CheckboxGroup: JSON_FORM_COMPONENT_TYPES.checkboxGroup,
45
+ DatePicker: JSON_FORM_COMPONENT_TYPES.datePicker,
46
+ Input: JSON_FORM_COMPONENT_TYPES.input,
47
+ InputNumber: JSON_FORM_COMPONENT_TYPES.inputNumber,
48
+ InputPassword: JSON_FORM_COMPONENT_TYPES.inputPassword,
49
+ InputSearch: JSON_FORM_COMPONENT_TYPES.inputSearch,
50
+ InputTag: JSON_FORM_COMPONENT_TYPES.inputTag,
51
+ Mention: JSON_FORM_COMPONENT_TYPES.mention,
52
+ NoFormItem: JSON_FORM_COMPONENT_TYPES.noFormItem,
53
+ Radio: JSON_FORM_COMPONENT_TYPES.radio,
54
+ RadioGroup: JSON_FORM_COMPONENT_TYPES.radioGroup,
55
+ RangePicker: JSON_FORM_COMPONENT_TYPES.rangePicker,
56
+ Rate: JSON_FORM_COMPONENT_TYPES.rate,
57
+ Row: JSON_FORM_COMPONENT_TYPES.row,
58
+ Select: JSON_FORM_COMPONENT_TYPES.select,
59
+ Slider: JSON_FORM_COMPONENT_TYPES.slider,
60
+ Switch: JSON_FORM_COMPONENT_TYPES.switch,
61
+ TextArea: JSON_FORM_COMPONENT_TYPES.textarea,
62
+ Textarea: JSON_FORM_COMPONENT_TYPES.textarea,
63
+ TimePicker: JSON_FORM_COMPONENT_TYPES.timePicker,
64
+ Transfer: JSON_FORM_COMPONENT_TYPES.transfer,
65
+ TreeSelect: JSON_FORM_COMPONENT_TYPES.treeSelect,
66
+ VerificationCode: JSON_FORM_COMPONENT_TYPES.verificationCode
67
+ };
68
+ var JSON_FORM_A2UI_0_8_RESERVED_PROPS = new Set([
69
+ "label",
70
+ "text",
71
+ "value",
72
+ "selections",
73
+ "children",
74
+ "maxAllowedSelections"
75
+ ]);
76
+ var STRETCH_COMPONENT_TYPES = new Set([
77
+ JSON_FORM_COMPONENT_TYPES.autoComplete,
78
+ JSON_FORM_COMPONENT_TYPES.cascader,
79
+ JSON_FORM_COMPONENT_TYPES.datePicker,
80
+ JSON_FORM_COMPONENT_TYPES.input,
81
+ JSON_FORM_COMPONENT_TYPES.inputNumber,
82
+ JSON_FORM_COMPONENT_TYPES.inputPassword,
83
+ JSON_FORM_COMPONENT_TYPES.inputSearch,
84
+ JSON_FORM_COMPONENT_TYPES.inputTag,
85
+ JSON_FORM_COMPONENT_TYPES.mention,
86
+ JSON_FORM_COMPONENT_TYPES.rangePicker,
87
+ JSON_FORM_COMPONENT_TYPES.select,
88
+ JSON_FORM_COMPONENT_TYPES.textarea,
89
+ JSON_FORM_COMPONENT_TYPES.timePicker,
90
+ JSON_FORM_COMPONENT_TYPES.treeSelect,
91
+ JSON_FORM_COMPONENT_TYPES.verificationCode
92
+ ]);
93
+ var jsonFormBuiltInComponents = {
94
+ autoComplete: AutoComplete,
95
+ cascader: Cascader,
96
+ checkbox: Checkbox,
97
+ checkboxGroup: checkbox_group_default,
98
+ datePicker: DatePicker,
99
+ input: Input,
100
+ inputNumber: InputNumber,
101
+ inputPassword: input_password_default,
102
+ inputSearch: input_search_default,
103
+ inputTag: InputTag,
104
+ mention: Mention,
105
+ radio: Radio,
106
+ radioGroup: radio_group_default,
107
+ rangePicker: range_picker_default,
108
+ rate: Rate,
109
+ row: grid_row_default,
110
+ select: Select,
111
+ slider: Slider,
112
+ switch: Switch,
113
+ textarea: Textarea,
114
+ timePicker: TimePicker,
115
+ transfer: Transfer,
116
+ treeSelect: TreeSelect,
117
+ verificationCode: VerificationCode
118
+ };
119
+ function resolveJsonFormComponents(customComponents) {
120
+ return _objectSpread2(_objectSpread2({}, jsonFormBuiltInComponents), customComponents);
121
+ }
122
+ function shouldStretchJsonFormControl(type) {
123
+ return type ? STRETCH_COMPONENT_TYPES.has(type) : true;
124
+ }
125
+ function parseJsonFormPath(path, adapter = "default") {
126
+ if (!path) return [];
127
+ if (adapter === "a2ui-0.8") return path.split("/").slice(1).map((segment) => segment.replaceAll("~1", "/").replaceAll("~0", "~"));
128
+ return path.split(".").filter(Boolean);
129
+ }
130
+ function getJsonFormValue(model, path, adapter = "default") {
131
+ const segments = parseJsonFormPath(path, adapter);
132
+ let current = model;
133
+ for (const segment of segments) {
134
+ if (!isPlainObject(current) && !Array.isArray(current)) return;
135
+ current = current[segment];
136
+ }
137
+ return current;
138
+ }
139
+ function setJsonFormValue(model, path, value, adapter = "default") {
140
+ if (!model) return;
141
+ const segments = parseJsonFormPath(path, adapter);
142
+ if (segments.length === 0) return;
143
+ let current = model;
144
+ for (const segment of segments.slice(0, -1)) {
145
+ const nextValue = current[segment];
146
+ if (!isPlainObject(nextValue) && !Array.isArray(nextValue)) current[segment] = {};
147
+ current = current[segment];
148
+ }
149
+ current[segments.at(-1)] = value;
150
+ }
151
+ function resolveA2UIBoundText(value) {
152
+ if (typeof value === "string") return value;
153
+ return value === null || value === void 0 ? void 0 : value.literalString;
154
+ }
155
+ function resolveA2UIBoundPath(value) {
156
+ if (typeof value === "string") return;
157
+ return value === null || value === void 0 ? void 0 : value.path;
158
+ }
159
+ function getA2UIChildren(children) {
160
+ var _children$explicitLis;
161
+ if (Array.isArray(children)) return children;
162
+ return (_children$explicitLis = children === null || children === void 0 ? void 0 : children.explicitList) !== null && _children$explicitLis !== void 0 ? _children$explicitLis : [];
163
+ }
164
+ function resolveA2UIComponent(node) {
165
+ var _component$name;
166
+ if (typeof node.component === "string") return {
167
+ name: node.component,
168
+ props: node
169
+ };
170
+ const component = node.component;
171
+ const [name] = Object.keys(component);
172
+ return {
173
+ name,
174
+ props: (_component$name = component[name]) !== null && _component$name !== void 0 ? _component$name : {}
175
+ };
176
+ }
177
+ function resolveA2UIBoundValue(value) {
178
+ if (typeof value === "string") return value;
179
+ if (!value || typeof value !== "object") return value;
180
+ if ("literalString" in value && typeof value.literalString === "string") return value.literalString;
181
+ if (Array.isArray(value)) return value.map((item) => resolveA2UIBoundValue(item));
182
+ return value;
183
+ }
184
+ function normalizeA2UI_0_8ComponentType(componentName) {
185
+ if (JSON_FORM_A2UI_0_8_COMPONENT_ALIASES[componentName]) return JSON_FORM_A2UI_0_8_COMPONENT_ALIASES[componentName];
186
+ const normalizedName = camelCase(componentName);
187
+ if (normalizedName in JSON_FORM_COMPONENT_TYPES) return normalizedName;
188
+ return normalizedName;
189
+ }
190
+ function resolveA2UI_0_8FieldPath(props) {
191
+ const candidates = [
192
+ props.value,
193
+ props.text,
194
+ props.selections
195
+ ];
196
+ for (const candidate of candidates) {
197
+ const path = resolveA2UIBoundPath(candidate);
198
+ if (path) return path;
199
+ }
200
+ }
201
+ function resolveA2UI_0_8Label(props) {
202
+ return resolveA2UIBoundText(props.label);
203
+ }
204
+ function translateA2UI_0_8CommonComponentProps(props) {
205
+ const baseProps = omitBy(props, (_, key) => JSON_FORM_A2UI_0_8_RESERVED_PROPS.has(key));
206
+ if (Array.isArray(baseProps.options)) baseProps.options = translateA2UIChoiceOptions(baseProps.options);
207
+ for (const key of Object.keys(baseProps)) baseProps[key] = resolveA2UIBoundValue(baseProps[key]);
208
+ if (typeof props.maxAllowedSelections === "number") baseProps.multiple = props.maxAllowedSelections !== 1;
209
+ return baseProps;
210
+ }
211
+ function translateA2UI_0_8GenericField(node) {
212
+ var _resolveA2UI_0_8Field;
213
+ const { name, props } = resolveA2UIComponent(node);
214
+ const normalizedType = normalizeA2UI_0_8ComponentType(name);
215
+ const resolvedProps = props;
216
+ if (normalizedType === JSON_FORM_COMPONENT_TYPES.row || normalizedType === "column") return [];
217
+ return [{
218
+ field: (_resolveA2UI_0_8Field = resolveA2UI_0_8FieldPath(resolvedProps)) !== null && _resolveA2UI_0_8Field !== void 0 ? _resolveA2UI_0_8Field : node.id,
219
+ label: resolveA2UI_0_8Label(resolvedProps),
220
+ type: normalizedType,
221
+ componentProps: translateA2UI_0_8CommonComponentProps(resolvedProps)
222
+ }];
223
+ }
224
+ function translateA2UIChoiceOptions(options = []) {
225
+ return options.map((option) => {
226
+ var _resolveA2UIBoundText;
227
+ return {
228
+ label: (_resolveA2UIBoundText = resolveA2UIBoundText(option.label)) !== null && _resolveA2UIBoundText !== void 0 ? _resolveA2UIBoundText : String(option.value),
229
+ value: option.value
230
+ };
231
+ });
232
+ }
233
+ function translateA2UI_0_8Field(node) {
234
+ const { name, props } = resolveA2UIComponent(node);
235
+ switch (name) {
236
+ case "TextField": {
237
+ var _resolveA2UIBoundPath;
238
+ const field = (_resolveA2UIBoundPath = resolveA2UIBoundPath(props.value)) !== null && _resolveA2UIBoundPath !== void 0 ? _resolveA2UIBoundPath : resolveA2UIBoundPath(props.text);
239
+ if (!field) return [];
240
+ const textFieldType = props.textFieldType;
241
+ const mappedType = textFieldType === "longText" ? JSON_FORM_COMPONENT_TYPES.textarea : textFieldType === "number" ? JSON_FORM_COMPONENT_TYPES.inputNumber : textFieldType === "obscured" ? JSON_FORM_COMPONENT_TYPES.inputPassword : textFieldType === "date" ? JSON_FORM_COMPONENT_TYPES.datePicker : JSON_FORM_COMPONENT_TYPES.input;
242
+ return [{
243
+ field,
244
+ label: resolveA2UIBoundText(props.label),
245
+ type: mappedType,
246
+ componentProps: _objectSpread2(_objectSpread2({}, translateA2UI_0_8CommonComponentProps(props)), {}, { placeholder: resolveA2UIBoundText(props.placeholder) })
247
+ }];
248
+ }
249
+ case "CheckBox": {
250
+ const field = resolveA2UIBoundPath(props.value);
251
+ if (!field) return [];
252
+ return [{
253
+ field,
254
+ label: resolveA2UIBoundText(props.label),
255
+ type: JSON_FORM_COMPONENT_TYPES.checkbox,
256
+ componentProps: translateA2UI_0_8CommonComponentProps(props)
257
+ }];
258
+ }
259
+ case "Slider": {
260
+ const field = resolveA2UIBoundPath(props.value);
261
+ if (!field) return [];
262
+ return [{
263
+ field,
264
+ type: JSON_FORM_COMPONENT_TYPES.slider,
265
+ componentProps: _objectSpread2(_objectSpread2({}, translateA2UI_0_8CommonComponentProps(props)), {}, {
266
+ min: props.minValue,
267
+ max: props.maxValue
268
+ })
269
+ }];
270
+ }
271
+ case "DateTimeInput": {
272
+ var _props$enableDate, _props$enableTime;
273
+ const field = resolveA2UIBoundPath(props.value);
274
+ if (!field) return [];
275
+ const enableDate = (_props$enableDate = props.enableDate) !== null && _props$enableDate !== void 0 ? _props$enableDate : true;
276
+ const enableTime = (_props$enableTime = props.enableTime) !== null && _props$enableTime !== void 0 ? _props$enableTime : false;
277
+ const type = enableDate ? JSON_FORM_COMPONENT_TYPES.datePicker : JSON_FORM_COMPONENT_TYPES.timePicker;
278
+ return [{
279
+ field,
280
+ label: resolveA2UIBoundText(props.label),
281
+ type,
282
+ componentProps: _objectSpread2(_objectSpread2({}, translateA2UI_0_8CommonComponentProps(props)), enableDate && enableTime ? { showTime: true } : {})
283
+ }];
284
+ }
285
+ case "MultipleChoice":
286
+ case "ChoicePicker": {
287
+ const choiceProps = props;
288
+ const field = resolveA2UIBoundPath(choiceProps.selections);
289
+ if (!field) return [];
290
+ return [{
291
+ field,
292
+ label: resolveA2UIBoundText(choiceProps.label),
293
+ type: JSON_FORM_COMPONENT_TYPES.select,
294
+ componentProps: _objectSpread2(_objectSpread2({}, translateA2UI_0_8CommonComponentProps(props)), {}, {
295
+ options: translateA2UIChoiceOptions(choiceProps.options),
296
+ multiple: choiceProps.maxAllowedSelections !== 1
297
+ })
298
+ }];
299
+ }
300
+ default: return translateA2UI_0_8GenericField(node);
301
+ }
302
+ }
303
+ function translateA2UI_0_8ToJsonFormSchemas(nodes) {
304
+ const nodeMap = new Map(nodes.map((node) => [node.id, node]));
305
+ const referencedIds = /* @__PURE__ */ new Set();
306
+ const visitedIds = /* @__PURE__ */ new Set();
307
+ for (const node of nodes) {
308
+ const { name, props } = resolveA2UIComponent(node);
309
+ if (name === "Row" || name === "Column") for (const childId of getA2UIChildren(props.children)) referencedIds.add(childId);
310
+ }
311
+ const expandNode = (node) => {
312
+ if (visitedIds.has(node.id)) return [];
313
+ visitedIds.add(node.id);
314
+ const { name, props } = resolveA2UIComponent(node);
315
+ if (name === "Column") return getA2UIChildren(props.children).flatMap((childId) => {
316
+ const childNode = nodeMap.get(childId);
317
+ return childNode ? expandNode(childNode) : [];
318
+ });
319
+ if (name === "Row") {
320
+ const children = getA2UIChildren(props.children).map((childId) => nodeMap.get(childId)).flatMap((childNode) => childNode ? expandNode(childNode) : []);
321
+ return [{
322
+ field: node.id,
323
+ type: JSON_FORM_COMPONENT_TYPES.row,
324
+ children
325
+ }];
326
+ }
327
+ if (JSON_FORM_STANDARD_A2UI_0_8_COMPONENTS.has(name)) return translateA2UI_0_8Field(node);
328
+ return translateA2UI_0_8GenericField(node);
329
+ };
330
+ return nodes.filter((node) => !referencedIds.has(node.id)).flatMap((node) => expandNode(node));
331
+ }
332
+ function mergeJsonFormClassName(...classNames) {
333
+ return classNames.filter(Boolean);
334
+ }
335
+ //#endregion
336
+ export { getJsonFormValue, mergeJsonFormClassName, resolveJsonFormComponents, setJsonFormValue, shouldStretchJsonFormControl, translateA2UI_0_8ToJsonFormSchemas };
@@ -1,21 +1,5 @@
1
- import { getPrefixCls } from "../_utils/global-config.js";
2
- import _plugin_vue_export_helper_default from "../_virtual/_plugin-vue_export-helper.js";
3
- import { createElementBlock, defineComponent, normalizeClass, openBlock, renderSlot } from "vue";
1
+ import header_vue_vue_type_script_setup_true_lang_default from "./header.vue_vue_type_script_setup_true_lang.js";
4
2
  //#region components/layout/header.vue
5
- var _sfc_main = defineComponent({
6
- name: "LayoutHeader",
7
- /**
8
- * @zh 内容
9
- * @en Content
10
- * @slot default
11
- */
12
- setup() {
13
- return { classNames: [getPrefixCls("layout-header")] };
14
- }
15
- });
16
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
17
- return openBlock(), createElementBlock("header", { class: normalizeClass(_ctx.classNames) }, [renderSlot(_ctx.$slots, "default")], 2);
18
- }
19
- var header_default = /* @__PURE__ */ _plugin_vue_export_helper_default(_sfc_main, [["render", _sfc_render]]);
3
+ var header_default = header_vue_vue_type_script_setup_true_lang_default;
20
4
  //#endregion
21
5
  export { header_default as default };
@@ -1,5 +1,40 @@
1
+ import type { LayoutHeaderDensity, LayoutHeaderProps } from './interface';
2
+ declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {}, __VLS_7: {}, __VLS_9: {}, __VLS_11: {};
3
+ type __VLS_Slots = {} & {
4
+ image?: (props: typeof __VLS_1) => any;
5
+ } & {
6
+ prepend?: (props: typeof __VLS_3) => any;
7
+ } & {
8
+ title?: (props: typeof __VLS_5) => any;
9
+ } & {
10
+ default?: (props: typeof __VLS_7) => any;
11
+ } & {
12
+ append?: (props: typeof __VLS_9) => any;
13
+ } & {
14
+ extension?: (props: typeof __VLS_11) => any;
15
+ };
16
+ declare const __VLS_base: import("vue").DefineComponent<LayoutHeaderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
17
+ "update:modelValue": (value: boolean) => any;
18
+ }, string, import("vue").PublicProps, Readonly<LayoutHeaderProps> & Readonly<{
19
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
20
+ }>, {
21
+ flat: boolean;
22
+ fixed: boolean;
23
+ height: number | string;
24
+ absolute: boolean;
25
+ sticky: boolean;
26
+ defaultVisible: boolean;
27
+ location: "top" | "bottom";
28
+ density: LayoutHeaderDensity;
29
+ extensionHeight: number | string;
30
+ floating: boolean;
31
+ scrollThreshold: number | string;
32
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
33
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
1
34
  declare const _default: typeof __VLS_export;
2
35
  export default _default;
3
- declare const __VLS_export: import("vue").DefineComponent<{}, {
4
- classNames: string[];
5
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
36
+ type __VLS_WithSlots<T, S> = T & {
37
+ new (): {
38
+ $slots: S;
39
+ };
40
+ };