yc-agent-ui 1.2.6 → 1.2.7

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 (200) hide show
  1. package/es/components/chart/src/chart-card.vue.d.ts +21 -21
  2. package/es/components/chart/src/chart-container.vue.d.ts +2 -2
  3. package/es/components/chart/src/metric-card.vue.d.ts +1 -1
  4. package/es/components/data-table/src/data-table-pagination.vue.d.ts +3 -3
  5. package/es/components/data-table/src/data-table-toolbar.vue.d.ts +1 -1
  6. package/es/components/data-table/src/data-table.vue.d.ts +11 -11
  7. package/es/components/descriptions/index.d.ts +9 -9
  8. package/es/components/descriptions/src/index.vue.d.ts +3 -3
  9. package/es/components/dialog/index.d.ts +6 -6
  10. package/es/components/dialog/src/index.vue.d.ts +2 -2
  11. package/es/components/dialog-form/index.d.ts +14 -14
  12. package/es/components/dialog-form/src/index.vue.d.ts +10 -10
  13. package/es/components/display-item/index.d.ts +27 -27
  14. package/es/components/display-item/src/index.vue.d.ts +25 -25
  15. package/es/components/drawer-form/index.d.ts +23 -23
  16. package/es/components/drawer-form/src/index.vue.d.ts +13 -13
  17. package/es/components/form/index.d.ts +25 -25
  18. package/es/components/form/src/form-content.vue.d.ts +19 -19
  19. package/es/components/form/src/index.vue.d.ts +19 -19
  20. package/es/components/form-item/index.d.ts +31 -31
  21. package/es/components/form-item/src/index.vue.d.ts +18 -18
  22. package/es/components/input-tag/index.d.ts +3 -3
  23. package/es/components/input-tag/src/index.vue.d.ts +3 -3
  24. package/es/components/page/index.d.ts +753 -753
  25. package/es/components/page/src/index.vue.d.ts +256 -256
  26. package/es/components/pagination/index.d.ts +3 -3
  27. package/es/components/pagination/src/index.vue.d.ts +1 -1
  28. package/es/components/radio/index.d.ts +5 -5
  29. package/es/components/radio/src/index.vue.d.ts +5 -5
  30. package/es/components/render/index.d.ts +1 -1
  31. package/es/components/render/src/index.vue.d.ts +1 -1
  32. package/es/components/search/index.d.ts +182 -182
  33. package/es/components/search/src/index.vue.d.ts +66 -66
  34. package/es/components/table/index.d.ts +18 -18
  35. package/es/components/table/src/index.vue.d.ts +2 -2
  36. package/es/components/table/src/table-action-bar.vue.d.ts +2 -2
  37. package/es/components/table/src/table-column.vue.d.ts +58 -58
  38. package/es/components/utils/index.d.ts +3 -3
  39. package/es/components/virtual-table/index.d.ts +10 -10
  40. package/es/components/virtual-table/src/index.vue.d.ts +3 -3
  41. package/es/components/yc-ai-chat/src/bubble.vue.d.ts +1 -1
  42. package/es/components/yc-ai-chat/src/file-card.vue.d.ts +1 -1
  43. package/es/components/yc-ai-chat/src/mobile-frame.vue.d.ts +1 -1
  44. package/es/components/yc-ai-chat/src/select.vue.d.ts +5 -5
  45. package/es/components/yc-ai-chat/src/sender.vue.d.ts +1 -1
  46. package/es/components/yc-ai-chat/src/sidebar.vue.d.ts +4 -4
  47. package/es/components/yc-ai-chat/src/studio.vue.d.ts +1 -1
  48. package/es/components/yc-controls/src/choice-cards.vue.d.ts +2 -2
  49. package/es/components/yc-controls/src/segmented.vue.d.ts +1 -1
  50. package/es/components/yc-coss-table/src/coss-table.vue.d.ts +5 -5
  51. package/es/components/yc-coss-table/src/table-head.vue.d.ts +3 -3
  52. package/es/components/yc-display-cards/index.d.ts +20 -2
  53. package/es/components/yc-display-cards/src/form-card.vue.d.ts +22 -0
  54. package/es/components/yc-display-cards/src/table-card.vue.d.ts +1 -1
  55. package/es/components/yc-display-cards/src/types.d.ts +56 -0
  56. package/es/components/yc-gradient-card/src/index.vue.d.ts +2 -2
  57. package/es/components/yc-input/src/input.vue.d.ts +4 -4
  58. package/es/components/yc-input/src/money-input.vue.d.ts +3 -3
  59. package/es/components/yc-input/src/stepper-input.vue.d.ts +3 -3
  60. package/es/components/yc-input/src/textarea.vue.d.ts +1 -1
  61. package/es/components/yc-input-otp/src/index.vue.d.ts +3 -3
  62. package/es/components/yc-pagination/src/index.vue.d.ts +2 -2
  63. package/es/components/yc-plus-page/src/header-filter-cell.vue.d.ts +8 -8
  64. package/es/components/yc-plus-page/src/index.vue.d.ts +779 -779
  65. package/es/components/yc-plus-tree/src/index.vue.d.ts +1 -1
  66. package/es/components/yc-property-table/src/asset-table.vue.d.ts +2 -2
  67. package/es/components/yc-property-table/src/bill-table.vue.d.ts +2 -2
  68. package/es/components/yc-property-table/src/device-table.vue.d.ts +2 -2
  69. package/es/components/yc-property-table/src/order-table.vue.d.ts +2 -2
  70. package/es/components/yc-property-table/src/property-table.vue.d.ts +7 -7
  71. package/es/components/yc-select-v2/src/index.vue.d.ts +4 -4
  72. package/es/components/yc-status-dialog/src/index.vue.d.ts +1 -1
  73. package/es/components/yc-svg-icon/src/index.vue.d.ts +1 -1
  74. package/es/hooks/usePlusFormReset.d.ts +216 -216
  75. package/es/index.css +10 -9
  76. package/es/index.mjs +1 -1
  77. package/es/packages/components/index.mjs +1 -1
  78. package/es/packages/components/yc-display-cards/capability.mjs +24 -2
  79. package/es/packages/components/yc-display-cards/index.mjs +3 -1
  80. package/es/packages/components/yc-display-cards/src/detail-card.vue.mjs +1 -1
  81. package/es/packages/components/yc-display-cards/src/form-card.vue.mjs +6 -0
  82. package/es/packages/components/yc-display-cards/src/form-card2.vue.mjs +907 -0
  83. package/es/packages/components/yc-display-cards/src/metrics-card.vue.mjs +1 -1
  84. package/es/packages/components/yc-display-cards/src/table-card.vue.mjs +1 -1
  85. package/es/version.d.ts +1 -1
  86. package/es/version.mjs +1 -1
  87. package/index.css +4 -3
  88. package/index.js +1465 -535
  89. package/index.min.css +4 -3
  90. package/index.min.js +38 -37
  91. package/index.min.mjs +36 -35
  92. package/index.mjs +1463 -534
  93. package/lib/components/chart/src/chart-card.vue.d.ts +21 -21
  94. package/lib/components/chart/src/chart-container.vue.d.ts +2 -2
  95. package/lib/components/chart/src/metric-card.vue.d.ts +1 -1
  96. package/lib/components/data-table/src/data-table-pagination.vue.d.ts +3 -3
  97. package/lib/components/data-table/src/data-table-toolbar.vue.d.ts +1 -1
  98. package/lib/components/data-table/src/data-table.vue.d.ts +11 -11
  99. package/lib/components/descriptions/index.d.ts +9 -9
  100. package/lib/components/descriptions/src/index.vue.d.ts +3 -3
  101. package/lib/components/dialog/index.d.ts +6 -6
  102. package/lib/components/dialog/src/index.vue.d.ts +2 -2
  103. package/lib/components/dialog-form/index.d.ts +14 -14
  104. package/lib/components/dialog-form/src/index.vue.d.ts +10 -10
  105. package/lib/components/display-item/index.d.ts +27 -27
  106. package/lib/components/display-item/src/index.vue.d.ts +25 -25
  107. package/lib/components/drawer-form/index.d.ts +23 -23
  108. package/lib/components/drawer-form/src/index.vue.d.ts +13 -13
  109. package/lib/components/form/index.d.ts +25 -25
  110. package/lib/components/form/src/form-content.vue.d.ts +19 -19
  111. package/lib/components/form/src/index.vue.d.ts +19 -19
  112. package/lib/components/form-item/index.d.ts +31 -31
  113. package/lib/components/form-item/src/index.vue.d.ts +18 -18
  114. package/lib/components/input-tag/index.d.ts +3 -3
  115. package/lib/components/input-tag/src/index.vue.d.ts +3 -3
  116. package/lib/components/page/index.d.ts +753 -753
  117. package/lib/components/page/src/index.vue.d.ts +256 -256
  118. package/lib/components/pagination/index.d.ts +3 -3
  119. package/lib/components/pagination/src/index.vue.d.ts +1 -1
  120. package/lib/components/radio/index.d.ts +5 -5
  121. package/lib/components/radio/src/index.vue.d.ts +5 -5
  122. package/lib/components/render/index.d.ts +1 -1
  123. package/lib/components/render/src/index.vue.d.ts +1 -1
  124. package/lib/components/search/index.d.ts +182 -182
  125. package/lib/components/search/src/index.vue.d.ts +66 -66
  126. package/lib/components/table/index.d.ts +18 -18
  127. package/lib/components/table/src/index.vue.d.ts +2 -2
  128. package/lib/components/table/src/table-action-bar.vue.d.ts +2 -2
  129. package/lib/components/table/src/table-column.vue.d.ts +58 -58
  130. package/lib/components/utils/index.d.ts +3 -3
  131. package/lib/components/virtual-table/index.d.ts +10 -10
  132. package/lib/components/virtual-table/src/index.vue.d.ts +3 -3
  133. package/lib/components/yc-ai-chat/src/bubble.vue.d.ts +1 -1
  134. package/lib/components/yc-ai-chat/src/file-card.vue.d.ts +1 -1
  135. package/lib/components/yc-ai-chat/src/mobile-frame.vue.d.ts +1 -1
  136. package/lib/components/yc-ai-chat/src/select.vue.d.ts +5 -5
  137. package/lib/components/yc-ai-chat/src/sender.vue.d.ts +1 -1
  138. package/lib/components/yc-ai-chat/src/sidebar.vue.d.ts +4 -4
  139. package/lib/components/yc-ai-chat/src/studio.vue.d.ts +1 -1
  140. package/lib/components/yc-controls/src/choice-cards.vue.d.ts +2 -2
  141. package/lib/components/yc-controls/src/segmented.vue.d.ts +1 -1
  142. package/lib/components/yc-coss-table/src/coss-table.vue.d.ts +5 -5
  143. package/lib/components/yc-coss-table/src/table-head.vue.d.ts +3 -3
  144. package/lib/components/yc-display-cards/index.d.ts +20 -2
  145. package/lib/components/yc-display-cards/src/form-card.vue.d.ts +22 -0
  146. package/lib/components/yc-display-cards/src/table-card.vue.d.ts +1 -1
  147. package/lib/components/yc-display-cards/src/types.d.ts +56 -0
  148. package/lib/components/yc-gradient-card/src/index.vue.d.ts +2 -2
  149. package/lib/components/yc-input/src/input.vue.d.ts +4 -4
  150. package/lib/components/yc-input/src/money-input.vue.d.ts +3 -3
  151. package/lib/components/yc-input/src/stepper-input.vue.d.ts +3 -3
  152. package/lib/components/yc-input/src/textarea.vue.d.ts +1 -1
  153. package/lib/components/yc-input-otp/src/index.vue.d.ts +3 -3
  154. package/lib/components/yc-pagination/src/index.vue.d.ts +2 -2
  155. package/lib/components/yc-plus-page/src/header-filter-cell.vue.d.ts +8 -8
  156. package/lib/components/yc-plus-page/src/index.vue.d.ts +779 -779
  157. package/lib/components/yc-plus-tree/src/index.vue.d.ts +1 -1
  158. package/lib/components/yc-property-table/src/asset-table.vue.d.ts +2 -2
  159. package/lib/components/yc-property-table/src/bill-table.vue.d.ts +2 -2
  160. package/lib/components/yc-property-table/src/device-table.vue.d.ts +2 -2
  161. package/lib/components/yc-property-table/src/order-table.vue.d.ts +2 -2
  162. package/lib/components/yc-property-table/src/property-table.vue.d.ts +7 -7
  163. package/lib/components/yc-select-v2/src/index.vue.d.ts +4 -4
  164. package/lib/components/yc-status-dialog/src/index.vue.d.ts +1 -1
  165. package/lib/components/yc-svg-icon/src/index.vue.d.ts +1 -1
  166. package/lib/hooks/usePlusFormReset.d.ts +216 -216
  167. package/lib/index.css +13 -12
  168. package/lib/index.js +1 -0
  169. package/lib/packages/components/index.js +1 -0
  170. package/lib/packages/components/yc-display-cards/capability.js +23 -1
  171. package/lib/packages/components/yc-display-cards/index.js +3 -0
  172. package/lib/packages/components/yc-display-cards/src/detail-card.vue.js +1 -1
  173. package/lib/packages/components/yc-display-cards/src/form-card.vue.js +10 -0
  174. package/lib/packages/components/yc-display-cards/src/form-card2.vue.js +911 -0
  175. package/lib/packages/components/yc-display-cards/src/metrics-card.vue.js +1 -1
  176. package/lib/packages/components/yc-display-cards/src/table-card.vue.js +1 -1
  177. package/lib/version.d.ts +1 -1
  178. package/lib/version.js +1 -1
  179. package/locale/en.js +1 -1
  180. package/locale/en.min.js +1 -1
  181. package/locale/en.min.mjs +1 -1
  182. package/locale/en.mjs +1 -1
  183. package/locale/ja.js +1 -1
  184. package/locale/ja.min.js +1 -1
  185. package/locale/ja.min.mjs +1 -1
  186. package/locale/ja.mjs +1 -1
  187. package/locale/ko.js +1 -1
  188. package/locale/ko.min.js +1 -1
  189. package/locale/ko.min.mjs +1 -1
  190. package/locale/ko.mjs +1 -1
  191. package/locale/zh-cn.js +1 -1
  192. package/locale/zh-cn.min.js +1 -1
  193. package/locale/zh-cn.min.mjs +1 -1
  194. package/locale/zh-cn.mjs +1 -1
  195. package/locale/zh-tw.js +1 -1
  196. package/locale/zh-tw.min.js +1 -1
  197. package/locale/zh-tw.min.mjs +1 -1
  198. package/locale/zh-tw.mjs +1 -1
  199. package/package.json +1 -1
  200. package/theme-chalk/index.css +4 -3
@@ -0,0 +1,911 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var vue = require('vue');
6
+
7
+ const _hoisted_1 = { class: "yc-display-card__header" };
8
+ const _hoisted_2 = { class: "yc-display-card__title-wrap yc-display-form-card__title-group" };
9
+ const _hoisted_3 = { class: "yc-display-form-card__titles" };
10
+ const _hoisted_4 = { class: "yc-display-card__title" };
11
+ const _hoisted_5 = {
12
+ key: 0,
13
+ class: "yc-display-card__subtitle"
14
+ };
15
+ const _hoisted_6 = {
16
+ key: 0,
17
+ class: "yc-display-form-card__loading"
18
+ };
19
+ const _hoisted_7 = {
20
+ key: 1,
21
+ class: "yc-display-form-card__body"
22
+ };
23
+ const _hoisted_8 = {
24
+ key: 0,
25
+ class: "yc-display-form-card__grid"
26
+ };
27
+ const _hoisted_9 = { class: "yc-display-form-card__label" };
28
+ const _hoisted_10 = {
29
+ key: 0,
30
+ class: "is-required"
31
+ };
32
+ const _hoisted_11 = ["value", "disabled", "onFocus", "onChange"];
33
+ const _hoisted_12 = { value: "" };
34
+ const _hoisted_13 = ["value"];
35
+ const _hoisted_14 = ["type", "value", "disabled", "onInput"];
36
+ const _hoisted_15 = ["step", "inputmode", "value", "disabled", "placeholder", "onInput"];
37
+ const _hoisted_16 = ["aria-checked", "disabled", "onClick"];
38
+ const _hoisted_17 = {
39
+ key: 4,
40
+ class: "yc-display-form-card__upload"
41
+ };
42
+ const _hoisted_18 = ["accept", "onChange"];
43
+ const _hoisted_19 = { class: "yc-display-form-card__upload-list" };
44
+ const _hoisted_20 = {
45
+ key: 0,
46
+ class: "yc-display-form-card__thumb"
47
+ };
48
+ const _hoisted_21 = ["src", "alt"];
49
+ const _hoisted_22 = ["onClick"];
50
+ const _hoisted_23 = {
51
+ key: 1,
52
+ class: "yc-display-form-card__file-chip"
53
+ };
54
+ const _hoisted_24 = { class: "yc-display-form-card__file-name" };
55
+ const _hoisted_25 = ["onClick"];
56
+ const _hoisted_26 = ["disabled", "onClick"];
57
+ const _hoisted_27 = { key: 0 };
58
+ const _hoisted_28 = { key: 1 };
59
+ const _hoisted_29 = ["value", "disabled", "placeholder", "onInput"];
60
+ const _hoisted_30 = ["value", "disabled", "placeholder", "onInput"];
61
+ const _hoisted_31 = { class: "yc-display-form-card__actions" };
62
+ const _hoisted_32 = ["disabled"];
63
+ const _hoisted_33 = ["disabled"];
64
+ const _hoisted_34 = {
65
+ key: 1,
66
+ class: "yc-display-form-card__alert is-error"
67
+ };
68
+ const _hoisted_35 = {
69
+ key: 2,
70
+ class: "yc-display-form-card__alert is-success"
71
+ };
72
+ const _hoisted_36 = {
73
+ key: 3,
74
+ class: "yc-display-form-card__result"
75
+ };
76
+ const _hoisted_37 = {
77
+ key: 0,
78
+ class: "yc-display-form-card__table-wrap"
79
+ };
80
+ const _hoisted_38 = { class: "yc-display-form-card__table" };
81
+ const _hoisted_39 = {
82
+ key: 1,
83
+ class: "yc-display-form-card__kv"
84
+ };
85
+ const _hoisted_40 = { class: "yc-display-form-card__kv-label" };
86
+ const _hoisted_41 = { class: "yc-display-form-card__kv-value" };
87
+ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
88
+ ...{ name: "YcDisplayFormCard" },
89
+ __name: "form-card",
90
+ props: {
91
+ title: { default: "" },
92
+ subtitle: { default: "" },
93
+ operation: { default: "" },
94
+ mode: { default: void 0 },
95
+ submitLabel: { default: "" },
96
+ replyPrefix: { default: "" },
97
+ fields: { default: () => [] },
98
+ values: { default: () => ({}) },
99
+ compact: { type: Boolean, default: false },
100
+ skillName: { default: "" },
101
+ executeAction: { type: Function, default: void 0 },
102
+ uploadFile: { type: Function, default: void 0 }
103
+ },
104
+ emits: ["action"],
105
+ setup(__props, { emit: __emit }) {
106
+ const props = __props;
107
+ const emit = __emit;
108
+ const schemaTitle = vue.ref("");
109
+ const schemaReadOnly = vue.ref(null);
110
+ const loadedFields = vue.ref([]);
111
+ const loadingSchema = vue.ref(false);
112
+ const executing = vue.ref(false);
113
+ const errorMessage = vue.ref("");
114
+ const submitReceipt = vue.ref(null);
115
+ const resultData = vue.ref(null);
116
+ const hasExecuted = vue.ref(false);
117
+ const replySent = vue.ref(false);
118
+ const formValues = vue.reactive({});
119
+ const remoteOptions = vue.reactive({});
120
+ const loadingOptions = vue.reactive({});
121
+ const uploadedFiles = vue.reactive({});
122
+ const uploadingFields = vue.reactive({});
123
+ const fileInputRefs = /* @__PURE__ */ new Map();
124
+ const resolvedMode = vue.computed(() => {
125
+ if (props.mode === "reply") return "reply";
126
+ if (props.mode === "submit") return "submit";
127
+ if (props.mode === "query") return "query";
128
+ return schemaReadOnly.value === false ? "submit" : "query";
129
+ });
130
+ const cardTitle = vue.computed(() => {
131
+ var _a;
132
+ if ((_a = props.title) == null ? void 0 : _a.trim()) return props.title.trim();
133
+ if (schemaTitle.value) return schemaTitle.value;
134
+ return props.skillName || "\u4E1A\u52A1\u8868\u5355";
135
+ });
136
+ const cardSubtitle = vue.computed(
137
+ () => {
138
+ var _a;
139
+ return ((_a = props.subtitle) == null ? void 0 : _a.trim()) ? props.subtitle.trim() : "";
140
+ }
141
+ );
142
+ const resolvedSubmitLabel = vue.computed(() => {
143
+ var _a;
144
+ if ((_a = props.submitLabel) == null ? void 0 : _a.trim()) return props.submitLabel.trim();
145
+ return resolvedMode.value === "query" ? "\u67E5\u8BE2" : "\u63D0\u4EA4";
146
+ });
147
+ const canExecute = vue.computed(
148
+ () => {
149
+ var _a;
150
+ return resolvedMode.value === "reply" ? !replySent.value : Boolean(((_a = props.operation) == null ? void 0 : _a.trim()) && props.executeAction);
151
+ }
152
+ );
153
+ function isObject(value) {
154
+ return Boolean(value) && typeof value === "object" && !Array.isArray(value);
155
+ }
156
+ function normalizeInlineOptions(raw) {
157
+ var _a;
158
+ if (!Array.isArray(raw)) return void 0;
159
+ const options = [];
160
+ for (const item of raw) {
161
+ if (typeof item === "string" || typeof item === "number") {
162
+ options.push({ label: String(item), value: item });
163
+ } else if (isObject(item) && item.value !== void 0 && item.value !== null) {
164
+ options.push({
165
+ label: String((_a = item.label) != null ? _a : item.value),
166
+ value: typeof item.value === "string" || typeof item.value === "number" || typeof item.value === "boolean" ? item.value : String(item.value)
167
+ });
168
+ }
169
+ }
170
+ return options.length ? options : void 0;
171
+ }
172
+ const inlineFields = vue.computed(() => {
173
+ if (!Array.isArray(props.fields)) return [];
174
+ return props.fields.filter((item) => Boolean(item) && typeof item === "object" && Boolean(item.name)).map((item) => {
175
+ var _a;
176
+ return {
177
+ ...item,
178
+ name: String(item.name),
179
+ label: String((_a = item.label) != null ? _a : item.name),
180
+ visible: item.visible !== false
181
+ };
182
+ });
183
+ });
184
+ const visibleFields = vue.computed(() => {
185
+ const source = inlineFields.value.length > 0 ? inlineFields.value : loadedFields.value;
186
+ return source.filter((field) => field.visible !== false);
187
+ });
188
+ function isSelectField(field) {
189
+ var _a, _b;
190
+ return Boolean(
191
+ field.widget === "select" || field.options_operation || ((_a = field.options) == null ? void 0 : _a.length) || ((_b = field.enum) == null ? void 0 : _b.length)
192
+ );
193
+ }
194
+ function isDateField(field) {
195
+ return field.widget === "date" || field.widget === "datetime";
196
+ }
197
+ function isNumberField(field) {
198
+ return field.type === "number" || field.type === "integer";
199
+ }
200
+ function isUploadField(field) {
201
+ return field.widget === "image" || field.widget === "file";
202
+ }
203
+ function extractArray(obj) {
204
+ for (const key of ["data", "rows", "items", "list", "records"]) {
205
+ if (Array.isArray(obj[key])) return obj[key];
206
+ }
207
+ return null;
208
+ }
209
+ const resultRows = vue.computed(() => {
210
+ if (!hasExecuted.value || resultData.value == null) return null;
211
+ const raw = Array.isArray(resultData.value) ? resultData.value : isObject(resultData.value) ? extractArray(resultData.value) : null;
212
+ if (!raw) return null;
213
+ return raw.filter((item) => isObject(item));
214
+ });
215
+ const resultColumns = vue.computed(() => {
216
+ const rows = resultRows.value;
217
+ if (!(rows == null ? void 0 : rows.length)) return [];
218
+ return Object.keys(rows[0]);
219
+ });
220
+ const resultDetailEntries = vue.computed(() => {
221
+ if (!hasExecuted.value || resultRows.value || resultData.value == null) {
222
+ return [];
223
+ }
224
+ if (!isObject(resultData.value)) {
225
+ return [{ label: "\u7ED3\u679C", value: String(resultData.value) }];
226
+ }
227
+ return Object.entries(resultData.value).filter(
228
+ ([, val]) => val === null || ["string", "number", "boolean"].includes(typeof val)
229
+ ).map(([key, val]) => ({
230
+ label: key,
231
+ value: val === null ? "-" : String(val)
232
+ }));
233
+ });
234
+ function initPrefilledValues() {
235
+ if (isObject(props.values)) {
236
+ for (const [k, v] of Object.entries(props.values)) {
237
+ formValues[k] = v;
238
+ }
239
+ }
240
+ }
241
+ function extractSelectOptions(data, labelKey, valueKey) {
242
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
243
+ const rows = Array.isArray(data) ? data : isObject(data) ? (_a = extractArray(data)) != null ? _a : [] : [];
244
+ const options = [];
245
+ for (const row of rows) {
246
+ if (typeof row === "string" || typeof row === "number") {
247
+ options.push({ label: String(row), value: row });
248
+ continue;
249
+ }
250
+ if (!isObject(row)) continue;
251
+ const rawVal = (_g = (_f = (_e = (_d = (_c = (_b = valueKey && row[valueKey] !== void 0 ? row[valueKey] : void 0) != null ? _b : row.id) != null ? _c : row.value) != null ? _d : row.code) != null ? _e : row.key) != null ? _f : row.projectId) != null ? _g : row.name;
252
+ const rawLabel = (_l = (_k = (_j = (_i = (_h = labelKey && row[labelKey] !== void 0 ? row[labelKey] : void 0) != null ? _h : row.name) != null ? _i : row.label) != null ? _j : row.title) != null ? _k : row.projectName) != null ? _l : rawVal;
253
+ if (rawVal === void 0 || rawVal === null) continue;
254
+ options.push({
255
+ label: String(rawLabel != null ? rawLabel : rawVal),
256
+ value: typeof rawVal === "string" || typeof rawVal === "number" || typeof rawVal === "boolean" ? rawVal : String(rawVal)
257
+ });
258
+ }
259
+ return options;
260
+ }
261
+ async function loadFieldOptions(field) {
262
+ const op = field.options_operation;
263
+ if (!op || !props.executeAction || remoteOptions[field.name] || loadingOptions[field.name]) {
264
+ return;
265
+ }
266
+ loadingOptions[field.name] = true;
267
+ try {
268
+ const res = await props.executeAction({ operation: op, mode: "options" });
269
+ remoteOptions[field.name] = extractSelectOptions(
270
+ res.data,
271
+ field.option_label_key,
272
+ field.option_value_key
273
+ );
274
+ } catch (e) {
275
+ remoteOptions[field.name] = [];
276
+ } finally {
277
+ loadingOptions[field.name] = false;
278
+ }
279
+ }
280
+ function fieldOptions(field) {
281
+ var _a;
282
+ if ((_a = remoteOptions[field.name]) == null ? void 0 : _a.length) {
283
+ return remoteOptions[field.name];
284
+ }
285
+ const inline = normalizeInlineOptions(field.options);
286
+ if (inline == null ? void 0 : inline.length) return inline;
287
+ if (Array.isArray(field.enum) && field.enum.length > 0) {
288
+ return field.enum.map((item) => ({
289
+ label: String(item),
290
+ value: typeof item === "string" || typeof item === "number" || typeof item === "boolean" ? item : String(item)
291
+ }));
292
+ }
293
+ return [];
294
+ }
295
+ function handleSelectChange(field, event) {
296
+ var _a;
297
+ const select = event.target;
298
+ const raw = (_a = select == null ? void 0 : select.value) != null ? _a : "";
299
+ if (raw === "") {
300
+ formValues[field.name] = void 0;
301
+ return;
302
+ }
303
+ const matched = fieldOptions(field).find((opt) => String(opt.value) === raw);
304
+ formValues[field.name] = matched ? matched.value : raw;
305
+ }
306
+ function handleNumberInput(field, event) {
307
+ var _a;
308
+ const input = event.target;
309
+ const raw = (_a = input == null ? void 0 : input.value) != null ? _a : "";
310
+ if (raw.trim() === "") {
311
+ formValues[field.name] = void 0;
312
+ return;
313
+ }
314
+ const num = Number(raw);
315
+ formValues[field.name] = Number.isNaN(num) ? raw : num;
316
+ }
317
+ function formatDateInputValue(field, value) {
318
+ if (value === void 0 || value === null) return "";
319
+ const text = String(value);
320
+ if (field.widget === "datetime") {
321
+ return text.replace(" ", "T").slice(0, 16);
322
+ }
323
+ return text.slice(0, 10);
324
+ }
325
+ function handleDateInput(field, event) {
326
+ var _a;
327
+ const input = event.target;
328
+ const raw = (_a = input == null ? void 0 : input.value) != null ? _a : "";
329
+ if (!raw) {
330
+ formValues[field.name] = void 0;
331
+ return;
332
+ }
333
+ formValues[field.name] = field.widget === "datetime" ? raw.replace("T", " ") : raw;
334
+ }
335
+ async function loadSchemaIfNeeded() {
336
+ var _a, _b, _c;
337
+ if (inlineFields.value.length > 0) {
338
+ for (const f of visibleFields.value) {
339
+ if (f.options_operation) void loadFieldOptions(f);
340
+ }
341
+ return;
342
+ }
343
+ if (!((_a = props.operation) == null ? void 0 : _a.trim()) || !props.executeAction) return;
344
+ loadingSchema.value = true;
345
+ try {
346
+ const res = await props.executeAction({
347
+ operation: props.operation.trim(),
348
+ mode: "schema",
349
+ schema_only: true
350
+ });
351
+ schemaTitle.value = res.title || "";
352
+ schemaReadOnly.value = (_b = res.read_only) != null ? _b : null;
353
+ loadedFields.value = (_c = res.fields) != null ? _c : [];
354
+ for (const f of loadedFields.value) {
355
+ if (f.options_operation) void loadFieldOptions(f);
356
+ }
357
+ } catch (err) {
358
+ errorMessage.value = err instanceof Error ? err.message : "\u52A0\u8F7D\u8868\u5355\u5B57\u6BB5\u5B9A\u4E49\u5931\u8D25";
359
+ } finally {
360
+ loadingSchema.value = false;
361
+ }
362
+ }
363
+ function setFileInputRef(fieldName, el) {
364
+ if (el instanceof HTMLInputElement) {
365
+ fileInputRefs.set(fieldName, el);
366
+ } else {
367
+ fileInputRefs.delete(fieldName);
368
+ }
369
+ }
370
+ function triggerFileSelect(fieldName) {
371
+ var _a;
372
+ if (replySent.value || uploadingFields[fieldName]) return;
373
+ (_a = fileInputRefs.get(fieldName)) == null ? void 0 : _a.click();
374
+ }
375
+ function syncUploadFormValue(fieldName) {
376
+ var _a;
377
+ const items = (_a = uploadedFiles[fieldName]) != null ? _a : [];
378
+ formValues[fieldName] = items.length ? items.map((item) => item.attachment.fileName) : void 0;
379
+ }
380
+ async function createImagePreview(file) {
381
+ if (typeof URL !== "undefined" && typeof URL.createObjectURL === "function") {
382
+ return { previewUrl: URL.createObjectURL(file), isObjectUrl: true };
383
+ }
384
+ if (typeof FileReader !== "undefined") {
385
+ return new Promise((resolve) => {
386
+ const reader = new FileReader();
387
+ reader.onload = () => {
388
+ resolve({
389
+ previewUrl: typeof reader.result === "string" ? reader.result : void 0,
390
+ isObjectUrl: false
391
+ });
392
+ };
393
+ reader.onerror = () => resolve({});
394
+ reader.readAsDataURL(file);
395
+ });
396
+ }
397
+ return {};
398
+ }
399
+ async function handleFileInputChange(field, event) {
400
+ const input = event.target;
401
+ const files = (input == null ? void 0 : input.files) ? Array.from(input.files) : [];
402
+ if (input) input.value = "";
403
+ if (!files.length) return;
404
+ if (!props.uploadFile) {
405
+ errorMessage.value = "\u5F53\u524D\u9875\u9762\u672A\u914D\u7F6E\u8868\u5355\u4E0A\u4F20\u80FD\u529B\uFF0C\u8BF7\u5728\u4E0B\u65B9\u8F93\u5165\u6846\u76F4\u63A5\u53D1\u9001\u56FE\u7247";
406
+ return;
407
+ }
408
+ errorMessage.value = "";
409
+ uploadingFields[field.name] = true;
410
+ if (!uploadedFiles[field.name]) uploadedFiles[field.name] = [];
411
+ try {
412
+ for (const file of files) {
413
+ const attachment = await props.uploadFile(file);
414
+ const isImage = field.widget === "image" || file.type.startsWith("image/");
415
+ const preview = isImage ? await createImagePreview(file) : {};
416
+ uploadedFiles[field.name].push({
417
+ attachment,
418
+ previewUrl: preview.previewUrl,
419
+ isObjectUrl: preview.isObjectUrl
420
+ });
421
+ }
422
+ syncUploadFormValue(field.name);
423
+ } catch (err) {
424
+ errorMessage.value = err instanceof Error ? err.message : `\u4E0A\u4F20\u300C${field.label || field.name}\u300D\u5931\u8D25`;
425
+ } finally {
426
+ uploadingFields[field.name] = false;
427
+ }
428
+ }
429
+ function removeUploadedItem(fieldName, index) {
430
+ if (replySent.value) return;
431
+ const list = uploadedFiles[fieldName];
432
+ if (!list) return;
433
+ const [removed] = list.splice(index, 1);
434
+ if ((removed == null ? void 0 : removed.previewUrl) && removed.isObjectUrl && typeof URL !== "undefined" && typeof URL.revokeObjectURL === "function") {
435
+ URL.revokeObjectURL(removed.previewUrl);
436
+ }
437
+ syncUploadFormValue(fieldName);
438
+ }
439
+ function collectUploadedAttachments() {
440
+ const result = [];
441
+ for (const field of inlineFields.value) {
442
+ if (!isUploadField(field)) continue;
443
+ const list = uploadedFiles[field.name];
444
+ if (list == null ? void 0 : list.length) {
445
+ for (const item of list) result.push(item.attachment);
446
+ }
447
+ }
448
+ return result;
449
+ }
450
+ function isBlank(value) {
451
+ if (Array.isArray(value)) return value.length === 0;
452
+ return value === void 0 || value === null || String(value).trim() === "";
453
+ }
454
+ function displayValue(field, value) {
455
+ var _a;
456
+ if (isUploadField(field)) {
457
+ const items = (_a = uploadedFiles[field.name]) != null ? _a : [];
458
+ if (items.length) {
459
+ return `\u5DF2\u968F\u6D88\u606F\u4E0A\u4F20 ${items.length} \u4E2A\u9644\u4EF6\uFF08${items.map((item) => item.attachment.fileName).join("\u3001")}\uFF09`;
460
+ }
461
+ }
462
+ const option = fieldOptions(field).find((opt) => opt.value === value);
463
+ if (!option || option.label === String(value)) return String(value);
464
+ return `${option.label}\uFF08${String(value)}\uFF09`;
465
+ }
466
+ function buildReplyText() {
467
+ var _a;
468
+ const prefix = ((_a = props.replyPrefix) == null ? void 0 : _a.trim()) ? props.replyPrefix.trim() : `\u8BF7\u6309\u4EE5\u4E0B\u4FE1\u606F${cardTitle.value}`;
469
+ const lines = [];
470
+ for (const field of inlineFields.value) {
471
+ const value = formValues[field.name];
472
+ if (isBlank(value)) continue;
473
+ lines.push(`${field.label || field.name}\uFF1A${displayValue(field, value)}`);
474
+ }
475
+ return [`${prefix}\uFF1A`, ...lines].join("\n");
476
+ }
477
+ async function handleExecute() {
478
+ if (!canExecute.value || executing.value) return;
479
+ errorMessage.value = "";
480
+ submitReceipt.value = null;
481
+ if (Object.values(uploadingFields).some(Boolean)) {
482
+ errorMessage.value = "\u9644\u4EF6\u6B63\u5728\u4E0A\u4F20\u4E2D\uFF0C\u8BF7\u7A0D\u5019\u518D\u63D0\u4EA4";
483
+ return;
484
+ }
485
+ for (const field of visibleFields.value) {
486
+ if (field.required && isBlank(formValues[field.name])) {
487
+ const label = field.label || field.name;
488
+ errorMessage.value = isUploadField(field) ? `\u8BF7\u5148\u4E0A\u4F20\u300C${label}\u300D` : `\u8BF7\u5148\u586B\u5199\u300C${label}\u300D`;
489
+ return;
490
+ }
491
+ }
492
+ if (resolvedMode.value === "reply") {
493
+ const attachments = collectUploadedAttachments();
494
+ replySent.value = true;
495
+ submitReceipt.value = "\u5DF2\u63D0\u4EA4\uFF0CAgent \u6B63\u5728\u6309\u4F60\u586B\u5199\u7684\u4FE1\u606F\u5904\u7406";
496
+ if (attachments.length) {
497
+ emit("action", buildReplyText(), attachments);
498
+ } else {
499
+ emit("action", buildReplyText());
500
+ }
501
+ return;
502
+ }
503
+ if (!props.executeAction) return;
504
+ executing.value = true;
505
+ try {
506
+ const payload = {};
507
+ for (const [k, v] of Object.entries(formValues)) {
508
+ if (!isBlank(v)) {
509
+ payload[k] = v;
510
+ }
511
+ }
512
+ const res = await props.executeAction({
513
+ operation: props.operation.trim(),
514
+ mode: resolvedMode.value,
515
+ values: payload
516
+ });
517
+ hasExecuted.value = true;
518
+ resultData.value = res.data;
519
+ if (resolvedMode.value === "submit") {
520
+ submitReceipt.value = `${cardTitle.value}\u5DF2\u63D0\u4EA4\u6210\u529F`;
521
+ }
522
+ } catch (err) {
523
+ errorMessage.value = err instanceof Error ? err.message : "\u64CD\u4F5C\u6267\u884C\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u8F93\u5165\u6761\u4EF6";
524
+ } finally {
525
+ executing.value = false;
526
+ }
527
+ }
528
+ function revokeAllUploadPreviews() {
529
+ if (typeof URL === "undefined" || typeof URL.revokeObjectURL !== "function") {
530
+ return;
531
+ }
532
+ for (const list of Object.values(uploadedFiles)) {
533
+ for (const item of list) {
534
+ if (item.previewUrl && item.isObjectUrl) URL.revokeObjectURL(item.previewUrl);
535
+ }
536
+ }
537
+ }
538
+ function handleReset() {
539
+ for (const key of Object.keys(formValues)) {
540
+ delete formValues[key];
541
+ }
542
+ revokeAllUploadPreviews();
543
+ for (const key of Object.keys(uploadedFiles)) {
544
+ delete uploadedFiles[key];
545
+ }
546
+ initPrefilledValues();
547
+ errorMessage.value = "";
548
+ if (!replySent.value) submitReceipt.value = null;
549
+ }
550
+ vue.watch(
551
+ () => props.values,
552
+ () => {
553
+ initPrefilledValues();
554
+ },
555
+ { immediate: true, deep: true }
556
+ );
557
+ vue.onMounted(() => {
558
+ void loadSchemaIfNeeded();
559
+ });
560
+ vue.onBeforeUnmount(() => {
561
+ revokeAllUploadPreviews();
562
+ });
563
+ return (_ctx, _cache) => {
564
+ var _a;
565
+ return vue.openBlock(), vue.createElementBlock(
566
+ "div",
567
+ {
568
+ class: vue.normalizeClass(["yc-display-card yc-display-form-card", { "is-compact": __props.compact }])
569
+ },
570
+ [
571
+ vue.createElementVNode("div", _hoisted_1, [
572
+ vue.createElementVNode("div", _hoisted_2, [
573
+ _cache[0] || (_cache[0] = vue.createElementVNode(
574
+ "span",
575
+ { class: "yc-display-form-card__accent" },
576
+ null,
577
+ -1
578
+ /* CACHED */
579
+ )),
580
+ vue.createElementVNode("div", _hoisted_3, [
581
+ vue.createElementVNode(
582
+ "div",
583
+ _hoisted_4,
584
+ vue.toDisplayString(cardTitle.value),
585
+ 1
586
+ /* TEXT */
587
+ ),
588
+ cardSubtitle.value ? (vue.openBlock(), vue.createElementBlock(
589
+ "div",
590
+ _hoisted_5,
591
+ vue.toDisplayString(cardSubtitle.value),
592
+ 1
593
+ /* TEXT */
594
+ )) : vue.createCommentVNode("v-if", true)
595
+ ])
596
+ ]),
597
+ vue.createElementVNode(
598
+ "span",
599
+ {
600
+ class: vue.normalizeClass(["yc-display-form-card__badge", resolvedMode.value === "query" ? "is-query" : "is-form"])
601
+ },
602
+ vue.toDisplayString(resolvedMode.value === "query" ? "\u7B5B\u9009\u67E5\u8BE2" : "\u4E1A\u52A1\u8868\u5355"),
603
+ 3
604
+ /* TEXT, CLASS */
605
+ )
606
+ ]),
607
+ loadingSchema.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6, " \u6B63\u5728\u52A0\u8F7D\u8868\u5355\u914D\u7F6E\u2026 ")) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_7, [
608
+ visibleFields.value.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8, [
609
+ (vue.openBlock(true), vue.createElementBlock(
610
+ vue.Fragment,
611
+ null,
612
+ vue.renderList(visibleFields.value, (field) => {
613
+ var _a2, _b, _c, _d, _e;
614
+ return vue.openBlock(), vue.createElementBlock(
615
+ "div",
616
+ {
617
+ key: field.name,
618
+ class: vue.normalizeClass(["yc-display-form-card__field", {
619
+ "is-full-row": field.widget === "textarea" || isUploadField(field)
620
+ }])
621
+ },
622
+ [
623
+ vue.createElementVNode("label", _hoisted_9, [
624
+ field.required ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_10, "*")) : vue.createCommentVNode("v-if", true),
625
+ vue.createTextVNode(
626
+ " " + vue.toDisplayString(field.label || field.name),
627
+ 1
628
+ /* TEXT */
629
+ )
630
+ ]),
631
+ isSelectField(field) ? (vue.openBlock(), vue.createElementBlock("select", {
632
+ key: 0,
633
+ value: (_a2 = formValues[field.name]) != null ? _a2 : "",
634
+ disabled: replySent.value,
635
+ class: "yc-display-form-card__control yc-display-form-card__select",
636
+ onFocus: ($event) => loadFieldOptions(field),
637
+ onChange: (event) => handleSelectChange(field, event)
638
+ }, [
639
+ vue.createElementVNode(
640
+ "option",
641
+ _hoisted_12,
642
+ vue.toDisplayString(loadingOptions[field.name] ? "\u52A0\u8F7D\u9009\u9879\u4E2D\u2026" : `\u8BF7\u9009\u62E9${field.label || field.name}`),
643
+ 1
644
+ /* TEXT */
645
+ ),
646
+ (vue.openBlock(true), vue.createElementBlock(
647
+ vue.Fragment,
648
+ null,
649
+ vue.renderList(fieldOptions(field), (opt) => {
650
+ return vue.openBlock(), vue.createElementBlock("option", {
651
+ key: String(opt.value),
652
+ value: String(opt.value)
653
+ }, vue.toDisplayString(opt.label), 9, _hoisted_13);
654
+ }),
655
+ 128
656
+ /* KEYED_FRAGMENT */
657
+ ))
658
+ ], 40, _hoisted_11)) : isDateField(field) ? (vue.openBlock(), vue.createElementBlock("input", {
659
+ key: 1,
660
+ type: field.widget === "datetime" ? "datetime-local" : "date",
661
+ value: formatDateInputValue(field, formValues[field.name]),
662
+ disabled: replySent.value,
663
+ class: "yc-display-form-card__control yc-display-form-card__input",
664
+ onInput: (event) => handleDateInput(field, event)
665
+ }, null, 40, _hoisted_14)) : isNumberField(field) ? (vue.openBlock(), vue.createElementBlock("input", {
666
+ key: 2,
667
+ type: "number",
668
+ step: field.type === "integer" ? "1" : "any",
669
+ inputmode: field.type === "integer" ? "numeric" : "decimal",
670
+ value: (_b = formValues[field.name]) != null ? _b : "",
671
+ disabled: replySent.value,
672
+ placeholder: `\u8BF7\u8F93\u5165${field.label || field.name}`,
673
+ class: "yc-display-form-card__control yc-display-form-card__input",
674
+ onInput: (event) => handleNumberInput(field, event)
675
+ }, null, 40, _hoisted_15)) : field.type === "boolean" ? (vue.openBlock(), vue.createElementBlock("button", {
676
+ key: 3,
677
+ type: "button",
678
+ role: "switch",
679
+ "aria-checked": Boolean(formValues[field.name]),
680
+ disabled: replySent.value,
681
+ class: vue.normalizeClass(["yc-display-form-card__switch", { "is-checked": Boolean(formValues[field.name]) }]),
682
+ onClick: ($event) => formValues[field.name] = !formValues[field.name]
683
+ }, [..._cache[1] || (_cache[1] = [
684
+ vue.createElementVNode(
685
+ "span",
686
+ { class: "yc-display-form-card__switch-thumb" },
687
+ null,
688
+ -1
689
+ /* CACHED */
690
+ )
691
+ ])], 10, _hoisted_16)) : isUploadField(field) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_17, [
692
+ vue.createElementVNode("input", {
693
+ ref_for: true,
694
+ ref: (el) => setFileInputRef(field.name, el),
695
+ type: "file",
696
+ multiple: "",
697
+ accept: field.widget === "image" ? "image/*" : void 0,
698
+ class: "yc-display-form-card__upload-input",
699
+ onChange: (event) => handleFileInputChange(field, event)
700
+ }, null, 40, _hoisted_18),
701
+ vue.createElementVNode("div", _hoisted_19, [
702
+ (vue.openBlock(true), vue.createElementBlock(
703
+ vue.Fragment,
704
+ null,
705
+ vue.renderList((_c = uploadedFiles[field.name]) != null ? _c : [], (item, idx) => {
706
+ return vue.openBlock(), vue.createElementBlock(
707
+ vue.Fragment,
708
+ {
709
+ key: `${item.attachment.fileRef || item.attachment.fileName}-${idx}`
710
+ },
711
+ [
712
+ item.previewUrl ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_20, [
713
+ vue.createElementVNode("img", {
714
+ src: item.previewUrl,
715
+ alt: item.attachment.fileName
716
+ }, null, 8, _hoisted_21),
717
+ !replySent.value ? (vue.openBlock(), vue.createElementBlock("button", {
718
+ key: 0,
719
+ type: "button",
720
+ class: "yc-display-form-card__thumb-remove",
721
+ title: "\u79FB\u9664",
722
+ onClick: ($event) => removeUploadedItem(field.name, idx)
723
+ }, " \xD7 ", 8, _hoisted_22)) : vue.createCommentVNode("v-if", true)
724
+ ])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_23, [
725
+ vue.createElementVNode(
726
+ "span",
727
+ _hoisted_24,
728
+ vue.toDisplayString(item.attachment.fileName),
729
+ 1
730
+ /* TEXT */
731
+ ),
732
+ !replySent.value ? (vue.openBlock(), vue.createElementBlock("button", {
733
+ key: 0,
734
+ type: "button",
735
+ class: "yc-display-form-card__file-remove",
736
+ title: "\u79FB\u9664",
737
+ onClick: ($event) => removeUploadedItem(field.name, idx)
738
+ }, " \xD7 ", 8, _hoisted_25)) : vue.createCommentVNode("v-if", true)
739
+ ]))
740
+ ],
741
+ 64
742
+ /* STABLE_FRAGMENT */
743
+ );
744
+ }),
745
+ 128
746
+ /* KEYED_FRAGMENT */
747
+ )),
748
+ !replySent.value ? (vue.openBlock(), vue.createElementBlock("button", {
749
+ key: 0,
750
+ type: "button",
751
+ class: vue.normalizeClass(["yc-display-form-card__upload-trigger", {
752
+ "is-image": field.widget === "image",
753
+ "is-loading": Boolean(uploadingFields[field.name])
754
+ }]),
755
+ disabled: Boolean(uploadingFields[field.name]),
756
+ onClick: ($event) => triggerFileSelect(field.name)
757
+ }, [
758
+ uploadingFields[field.name] ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_27, "\u4E0A\u4F20\u4E2D\u2026")) : (vue.openBlock(), vue.createElementBlock(
759
+ "span",
760
+ _hoisted_28,
761
+ vue.toDisplayString(field.widget === "image" ? "+ \u4E0A\u4F20\u56FE\u7247" : "+ \u4E0A\u4F20\u9644\u4EF6"),
762
+ 1
763
+ /* TEXT */
764
+ ))
765
+ ], 10, _hoisted_26)) : vue.createCommentVNode("v-if", true)
766
+ ])
767
+ ])) : field.widget === "textarea" ? (vue.openBlock(), vue.createElementBlock("textarea", {
768
+ key: 5,
769
+ rows: "3",
770
+ value: String((_d = formValues[field.name]) != null ? _d : ""),
771
+ disabled: replySent.value,
772
+ placeholder: `\u8BF7\u8F93\u5165${field.label || field.name}`,
773
+ class: "yc-display-form-card__control yc-display-form-card__textarea",
774
+ onInput: (event) => formValues[field.name] = event.target.value
775
+ }, null, 40, _hoisted_29)) : (vue.openBlock(), vue.createElementBlock("input", {
776
+ key: 6,
777
+ type: "text",
778
+ value: String((_e = formValues[field.name]) != null ? _e : ""),
779
+ disabled: replySent.value,
780
+ placeholder: `\u8BF7\u8F93\u5165${field.label || field.name}`,
781
+ class: "yc-display-form-card__control yc-display-form-card__input",
782
+ onInput: (event) => formValues[field.name] = event.target.value
783
+ }, null, 40, _hoisted_30))
784
+ ],
785
+ 2
786
+ /* CLASS */
787
+ );
788
+ }),
789
+ 128
790
+ /* KEYED_FRAGMENT */
791
+ ))
792
+ ])) : vue.createCommentVNode("v-if", true),
793
+ vue.createElementVNode("div", _hoisted_31, [
794
+ vue.createElementVNode("button", {
795
+ type: "button",
796
+ class: "yc-display-form-card__btn is-primary",
797
+ disabled: !canExecute.value || executing.value,
798
+ onClick: handleExecute
799
+ }, vue.toDisplayString(executing.value ? "\u5904\u7406\u4E2D\u2026" : resolvedSubmitLabel.value), 9, _hoisted_32),
800
+ vue.createElementVNode("button", {
801
+ type: "button",
802
+ class: "yc-display-form-card__btn is-default",
803
+ disabled: executing.value || replySent.value,
804
+ onClick: handleReset
805
+ }, " \u91CD\u7F6E ", 8, _hoisted_33)
806
+ ]),
807
+ errorMessage.value ? (vue.openBlock(), vue.createElementBlock(
808
+ "div",
809
+ _hoisted_34,
810
+ vue.toDisplayString(errorMessage.value),
811
+ 1
812
+ /* TEXT */
813
+ )) : vue.createCommentVNode("v-if", true),
814
+ submitReceipt.value ? (vue.openBlock(), vue.createElementBlock(
815
+ "div",
816
+ _hoisted_35,
817
+ vue.toDisplayString(submitReceipt.value),
818
+ 1
819
+ /* TEXT */
820
+ )) : vue.createCommentVNode("v-if", true),
821
+ hasExecuted.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_36, [
822
+ ((_a = resultRows.value) == null ? void 0 : _a.length) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_37, [
823
+ vue.createElementVNode("table", _hoisted_38, [
824
+ vue.createElementVNode("thead", null, [
825
+ vue.createElementVNode("tr", null, [
826
+ (vue.openBlock(true), vue.createElementBlock(
827
+ vue.Fragment,
828
+ null,
829
+ vue.renderList(resultColumns.value, (col) => {
830
+ return vue.openBlock(), vue.createElementBlock(
831
+ "th",
832
+ { key: col },
833
+ vue.toDisplayString(col),
834
+ 1
835
+ /* TEXT */
836
+ );
837
+ }),
838
+ 128
839
+ /* KEYED_FRAGMENT */
840
+ ))
841
+ ])
842
+ ]),
843
+ vue.createElementVNode("tbody", null, [
844
+ (vue.openBlock(true), vue.createElementBlock(
845
+ vue.Fragment,
846
+ null,
847
+ vue.renderList(resultRows.value, (row, rIdx) => {
848
+ return vue.openBlock(), vue.createElementBlock("tr", { key: rIdx }, [
849
+ (vue.openBlock(true), vue.createElementBlock(
850
+ vue.Fragment,
851
+ null,
852
+ vue.renderList(resultColumns.value, (col) => {
853
+ var _a2;
854
+ return vue.openBlock(), vue.createElementBlock(
855
+ "td",
856
+ { key: col },
857
+ vue.toDisplayString((_a2 = row[col]) != null ? _a2 : "\u2014"),
858
+ 1
859
+ /* TEXT */
860
+ );
861
+ }),
862
+ 128
863
+ /* KEYED_FRAGMENT */
864
+ ))
865
+ ]);
866
+ }),
867
+ 128
868
+ /* KEYED_FRAGMENT */
869
+ ))
870
+ ])
871
+ ])
872
+ ])) : resultDetailEntries.value.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_39, [
873
+ (vue.openBlock(true), vue.createElementBlock(
874
+ vue.Fragment,
875
+ null,
876
+ vue.renderList(resultDetailEntries.value, (entry) => {
877
+ return vue.openBlock(), vue.createElementBlock("div", {
878
+ key: entry.label,
879
+ class: "yc-display-form-card__kv-row"
880
+ }, [
881
+ vue.createElementVNode(
882
+ "span",
883
+ _hoisted_40,
884
+ vue.toDisplayString(entry.label),
885
+ 1
886
+ /* TEXT */
887
+ ),
888
+ vue.createElementVNode(
889
+ "span",
890
+ _hoisted_41,
891
+ vue.toDisplayString(entry.value),
892
+ 1
893
+ /* TEXT */
894
+ )
895
+ ]);
896
+ }),
897
+ 128
898
+ /* KEYED_FRAGMENT */
899
+ ))
900
+ ])) : vue.createCommentVNode("v-if", true)
901
+ ])) : vue.createCommentVNode("v-if", true)
902
+ ]))
903
+ ],
904
+ 2
905
+ /* CLASS */
906
+ );
907
+ };
908
+ }
909
+ });
910
+
911
+ exports.default = _sfc_main;