yc-agent-ui 1.2.4 → 1.2.5

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 (148) hide show
  1. package/es/components/descriptions/index.d.ts +3 -3
  2. package/es/components/descriptions/src/index.vue.d.ts +1 -1
  3. package/es/components/dialog/index.d.ts +6 -6
  4. package/es/components/dialog/src/index.vue.d.ts +2 -2
  5. package/es/components/dialog-form/index.d.ts +2 -2
  6. package/es/components/dialog-form/src/index.vue.d.ts +2 -2
  7. package/es/components/display-item/index.d.ts +9 -9
  8. package/es/components/display-item/src/index.vue.d.ts +7 -7
  9. package/es/components/drawer-form/index.d.ts +20 -20
  10. package/es/components/drawer-form/src/index.vue.d.ts +8 -8
  11. package/es/components/form/index.d.ts +39 -39
  12. package/es/components/form/src/form-content.vue.d.ts +11 -11
  13. package/es/components/form/src/index.vue.d.ts +17 -17
  14. package/es/components/form-item/index.d.ts +61 -61
  15. package/es/components/form-item/src/index.vue.d.ts +22 -22
  16. package/es/components/index.d.ts +1 -0
  17. package/es/components/page/index.d.ts +850 -850
  18. package/es/components/page/src/index.vue.d.ts +286 -286
  19. package/es/components/popover/index.d.ts +9 -9
  20. package/es/components/popover/src/index.vue.d.ts +3 -3
  21. package/es/components/render/index.d.ts +1 -1
  22. package/es/components/render/src/index.vue.d.ts +1 -1
  23. package/es/components/search/index.d.ts +256 -256
  24. package/es/components/search/src/index.vue.d.ts +88 -88
  25. package/es/components/table/index.d.ts +9 -9
  26. package/es/components/table/src/index.vue.d.ts +1 -1
  27. package/es/components/table/src/table-column.vue.d.ts +22 -22
  28. package/es/components/utils/index.d.ts +1 -1
  29. package/es/components/yc-date-picker/src/date-picker.vue.d.ts +1 -1
  30. package/es/components/yc-display-cards/capability.d.ts +4 -0
  31. package/es/components/yc-display-cards/index.d.ts +24 -0
  32. package/es/components/yc-display-cards/src/detail-card.vue.d.ts +10 -0
  33. package/es/components/yc-display-cards/src/metrics-card.vue.d.ts +8 -0
  34. package/es/components/yc-display-cards/src/table-card.vue.d.ts +12 -0
  35. package/es/components/yc-display-cards/src/types.d.ts +47 -0
  36. package/es/components/yc-input/src/input.vue.d.ts +1 -1
  37. package/es/components/yc-input/src/money-input.vue.d.ts +1 -1
  38. package/es/components/yc-plus-page/src/index.vue.d.ts +858 -858
  39. package/es/components/yc-plus-tree/src/index.vue.d.ts +1 -1
  40. package/es/components/yc-questionnaire/src/index.vue.d.ts +1 -1
  41. package/es/components/yc-select-v2/src/index.vue.d.ts +1 -1
  42. package/es/components/yc-status-dialog/src/index.vue.d.ts +1 -1
  43. package/es/hooks/usePlusFormReset.d.ts +114 -114
  44. package/es/index.css +13 -10
  45. package/es/index.mjs +1 -0
  46. package/es/packages/components/index.mjs +1 -0
  47. package/es/packages/components/yc-ai-chat/src/question-card2.vue.mjs +240 -86
  48. package/es/packages/components/yc-display-cards/capability.mjs +75 -0
  49. package/es/packages/components/yc-display-cards/index.mjs +10 -0
  50. package/es/packages/components/yc-display-cards/src/detail-card.vue.mjs +6 -0
  51. package/es/packages/components/yc-display-cards/src/detail-card2.vue.mjs +118 -0
  52. package/es/packages/components/yc-display-cards/src/metrics-card.vue.mjs +6 -0
  53. package/es/packages/components/yc-display-cards/src/metrics-card2.vue.mjs +132 -0
  54. package/es/packages/components/yc-display-cards/src/table-card.vue.mjs +6 -0
  55. package/es/packages/components/yc-display-cards/src/table-card2.vue.mjs +199 -0
  56. package/es/packages/components/yc-display-cards/src/types.mjs +1 -0
  57. package/es/packages/registry/load.mjs +9 -8
  58. package/es/version.d.ts +1 -1
  59. package/es/version.mjs +1 -1
  60. package/index.css +4 -1
  61. package/index.js +1274 -595
  62. package/index.min.css +3 -0
  63. package/index.min.js +20 -20
  64. package/index.min.mjs +24 -24
  65. package/index.mjs +1270 -594
  66. package/lib/components/descriptions/index.d.ts +3 -3
  67. package/lib/components/descriptions/src/index.vue.d.ts +1 -1
  68. package/lib/components/dialog/index.d.ts +6 -6
  69. package/lib/components/dialog/src/index.vue.d.ts +2 -2
  70. package/lib/components/dialog-form/index.d.ts +2 -2
  71. package/lib/components/dialog-form/src/index.vue.d.ts +2 -2
  72. package/lib/components/display-item/index.d.ts +9 -9
  73. package/lib/components/display-item/src/index.vue.d.ts +7 -7
  74. package/lib/components/drawer-form/index.d.ts +20 -20
  75. package/lib/components/drawer-form/src/index.vue.d.ts +8 -8
  76. package/lib/components/form/index.d.ts +39 -39
  77. package/lib/components/form/src/form-content.vue.d.ts +11 -11
  78. package/lib/components/form/src/index.vue.d.ts +17 -17
  79. package/lib/components/form-item/index.d.ts +61 -61
  80. package/lib/components/form-item/src/index.vue.d.ts +22 -22
  81. package/lib/components/index.d.ts +1 -0
  82. package/lib/components/page/index.d.ts +850 -850
  83. package/lib/components/page/src/index.vue.d.ts +286 -286
  84. package/lib/components/popover/index.d.ts +9 -9
  85. package/lib/components/popover/src/index.vue.d.ts +3 -3
  86. package/lib/components/render/index.d.ts +1 -1
  87. package/lib/components/render/src/index.vue.d.ts +1 -1
  88. package/lib/components/search/index.d.ts +256 -256
  89. package/lib/components/search/src/index.vue.d.ts +88 -88
  90. package/lib/components/table/index.d.ts +9 -9
  91. package/lib/components/table/src/index.vue.d.ts +1 -1
  92. package/lib/components/table/src/table-column.vue.d.ts +22 -22
  93. package/lib/components/utils/index.d.ts +1 -1
  94. package/lib/components/yc-date-picker/src/date-picker.vue.d.ts +1 -1
  95. package/lib/components/yc-display-cards/capability.d.ts +4 -0
  96. package/lib/components/yc-display-cards/index.d.ts +24 -0
  97. package/lib/components/yc-display-cards/src/detail-card.vue.d.ts +10 -0
  98. package/lib/components/yc-display-cards/src/metrics-card.vue.d.ts +8 -0
  99. package/lib/components/yc-display-cards/src/table-card.vue.d.ts +12 -0
  100. package/lib/components/yc-display-cards/src/types.d.ts +47 -0
  101. package/lib/components/yc-input/src/input.vue.d.ts +1 -1
  102. package/lib/components/yc-input/src/money-input.vue.d.ts +1 -1
  103. package/lib/components/yc-plus-page/src/index.vue.d.ts +858 -858
  104. package/lib/components/yc-plus-tree/src/index.vue.d.ts +1 -1
  105. package/lib/components/yc-questionnaire/src/index.vue.d.ts +1 -1
  106. package/lib/components/yc-select-v2/src/index.vue.d.ts +1 -1
  107. package/lib/components/yc-status-dialog/src/index.vue.d.ts +1 -1
  108. package/lib/hooks/usePlusFormReset.d.ts +114 -114
  109. package/lib/index.css +12 -9
  110. package/lib/index.js +10 -6
  111. package/lib/packages/components/index.js +10 -6
  112. package/lib/packages/components/yc-ai-chat/src/question-card2.vue.js +239 -85
  113. package/lib/packages/components/yc-display-cards/capability.js +79 -0
  114. package/lib/packages/components/yc-display-cards/index.js +14 -0
  115. package/lib/packages/components/yc-display-cards/src/detail-card.vue.js +10 -0
  116. package/lib/packages/components/yc-display-cards/src/detail-card2.vue.js +122 -0
  117. package/lib/packages/components/yc-display-cards/src/metrics-card.vue.js +10 -0
  118. package/lib/packages/components/yc-display-cards/src/metrics-card2.vue.js +136 -0
  119. package/lib/packages/components/yc-display-cards/src/table-card.vue.js +10 -0
  120. package/lib/packages/components/yc-display-cards/src/table-card2.vue.js +203 -0
  121. package/lib/packages/components/yc-display-cards/src/types.js +2 -0
  122. package/lib/packages/registry/load.js +9 -8
  123. package/lib/version.d.ts +1 -1
  124. package/lib/version.js +1 -1
  125. package/locale/en.js +1 -1
  126. package/locale/en.min.js +1 -1
  127. package/locale/en.min.mjs +1 -1
  128. package/locale/en.mjs +1 -1
  129. package/locale/ja.js +1 -1
  130. package/locale/ja.min.js +1 -1
  131. package/locale/ja.min.mjs +1 -1
  132. package/locale/ja.mjs +1 -1
  133. package/locale/ko.js +1 -1
  134. package/locale/ko.min.js +1 -1
  135. package/locale/ko.min.mjs +1 -1
  136. package/locale/ko.mjs +1 -1
  137. package/locale/zh-cn.js +1 -1
  138. package/locale/zh-cn.min.js +1 -1
  139. package/locale/zh-cn.min.mjs +1 -1
  140. package/locale/zh-cn.mjs +1 -1
  141. package/locale/zh-tw.js +1 -1
  142. package/locale/zh-tw.min.js +1 -1
  143. package/locale/zh-tw.min.mjs +1 -1
  144. package/locale/zh-tw.mjs +1 -1
  145. package/package.json +1 -1
  146. package/theme-chalk/index.css +4 -1
  147. package/theme-chalk/plus-yc-ai-chat.css +1 -1
  148. package/theme-chalk/src/yc-ai-chat.scss +90 -0
@@ -1,66 +1,98 @@
1
- import { defineComponent, reactive, watch, computed, openBlock, createElementBlock, normalizeClass, createElementVNode, toDisplayString, Fragment, renderList, createCommentVNode, withDirectives, vModelText } from 'vue';
1
+ import { defineComponent, reactive, ref, watch, computed, openBlock, createElementBlock, normalizeClass, createElementVNode, toDisplayString, createCommentVNode, Fragment, renderList, withDirectives, vModelText } from 'vue';
2
2
  import { validChatQuestionRequest, validChatOtherText, validChatAnswersForRequest } from './question-validation.mjs';
3
3
 
4
4
  const _hoisted_1 = ["data-state", "data-testid"];
5
5
  const _hoisted_2 = { class: "yc-chat-question-card__header question-card__header" };
6
6
  const _hoisted_3 = { class: "yc-chat-question-card__title-wrap" };
7
- const _hoisted_4 = { class: "yc-chat-question-card__title" };
8
- const _hoisted_5 = { class: "yc-chat-question-card__questions" };
9
- const _hoisted_6 = ["disabled"];
10
- const _hoisted_7 = { class: "yc-chat-question-card__legend" };
7
+ const _hoisted_4 = {
8
+ key: 0,
9
+ viewBox: "0 0 18 18",
10
+ fill: "none"
11
+ };
12
+ const _hoisted_5 = {
13
+ key: 1,
14
+ viewBox: "0 0 18 18",
15
+ fill: "none"
16
+ };
17
+ const _hoisted_6 = { class: "yc-chat-question-card__title" };
18
+ const _hoisted_7 = { class: "yc-chat-question-card__header-meta" };
11
19
  const _hoisted_8 = {
12
20
  key: 0,
13
- class: "yc-chat-question-card__mode-tag"
21
+ class: "yc-chat-question-card__summary",
22
+ "data-testid": "question-card-summary"
23
+ };
24
+ const _hoisted_9 = { class: "yc-chat-question-card__summary-question" };
25
+ const _hoisted_10 = {
26
+ key: 0,
27
+ class: "yc-chat-question-card__answer-chips"
14
28
  };
15
- const _hoisted_9 = { class: "yc-chat-question-card__options" };
16
- const _hoisted_10 = ["data-testid", "type", "name", "checked", "onChange"];
17
29
  const _hoisted_11 = {
30
+ key: 0,
31
+ class: "yc-chat-question-card__answer-chip is-other"
32
+ };
33
+ const _hoisted_12 = {
34
+ key: 1,
35
+ class: "yc-chat-question-card__summary-empty"
36
+ };
37
+ const _hoisted_13 = {
38
+ key: 1,
39
+ class: "yc-chat-question-card__questions"
40
+ };
41
+ const _hoisted_14 = ["disabled"];
42
+ const _hoisted_15 = { class: "yc-chat-question-card__legend" };
43
+ const _hoisted_16 = {
44
+ key: 0,
45
+ class: "yc-chat-question-card__mode-tag"
46
+ };
47
+ const _hoisted_17 = { class: "yc-chat-question-card__options" };
48
+ const _hoisted_18 = ["data-testid", "type", "name", "checked", "onChange"];
49
+ const _hoisted_19 = {
18
50
  key: 0,
19
51
  viewBox: "0 0 12 12",
20
52
  fill: "none"
21
53
  };
22
- const _hoisted_12 = { class: "yc-chat-question-card__option-body" };
23
- const _hoisted_13 = { class: "yc-chat-question-card__option-label" };
24
- const _hoisted_14 = {
54
+ const _hoisted_20 = { class: "yc-chat-question-card__option-body" };
55
+ const _hoisted_21 = { class: "yc-chat-question-card__option-label" };
56
+ const _hoisted_22 = {
25
57
  key: 0,
26
58
  class: "yc-chat-question-card__option-desc"
27
59
  };
28
- const _hoisted_15 = {
60
+ const _hoisted_23 = {
29
61
  key: 1,
30
62
  class: "yc-chat-question-card__event question-card__event"
31
63
  };
32
- const _hoisted_16 = ["data-testid", "type", "name", "checked", "onChange"];
33
- const _hoisted_17 = {
64
+ const _hoisted_24 = ["data-testid", "type", "name", "checked", "onChange"];
65
+ const _hoisted_25 = {
34
66
  key: 0,
35
67
  viewBox: "0 0 12 12",
36
68
  fill: "none"
37
69
  };
38
- const _hoisted_18 = { class: "yc-chat-question-card__option-body" };
39
- const _hoisted_19 = { class: "yc-chat-question-card__option-label" };
40
- const _hoisted_20 = {
70
+ const _hoisted_26 = { class: "yc-chat-question-card__option-body" };
71
+ const _hoisted_27 = { class: "yc-chat-question-card__option-label" };
72
+ const _hoisted_28 = {
41
73
  key: 0,
42
74
  class: "yc-chat-question-card__textarea-box"
43
75
  };
44
- const _hoisted_21 = ["onUpdate:modelValue", "data-testid"];
45
- const _hoisted_22 = {
46
- key: 0,
76
+ const _hoisted_29 = ["onUpdate:modelValue", "data-testid"];
77
+ const _hoisted_30 = {
78
+ key: 2,
47
79
  class: "yc-chat-question-card__notice question-card__notice"
48
80
  };
49
- const _hoisted_23 = {
50
- key: 1,
81
+ const _hoisted_31 = {
82
+ key: 3,
51
83
  class: "yc-chat-question-card__notice question-card__notice"
52
84
  };
53
- const _hoisted_24 = {
54
- key: 2,
85
+ const _hoisted_32 = {
86
+ key: 4,
55
87
  class: "yc-chat-question-card__notice question-card__notice",
56
88
  "data-testid": "client-event-not-executed"
57
89
  };
58
- const _hoisted_25 = {
59
- key: 3,
90
+ const _hoisted_33 = {
91
+ key: 5,
60
92
  class: "yc-chat-question-card__actions question-card__actions"
61
93
  };
62
- const _hoisted_26 = ["disabled"];
63
- const _hoisted_27 = ["disabled"];
94
+ const _hoisted_34 = ["disabled"];
95
+ const _hoisted_35 = ["disabled"];
64
96
  var _sfc_main = /* @__PURE__ */ defineComponent({
65
97
  ...{
66
98
  name: "YcChatQuestionCard"
@@ -81,6 +113,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
81
113
  const selected = reactive({});
82
114
  const otherActive = reactive({});
83
115
  const otherText = reactive({});
116
+ const showDetails = ref(false);
84
117
  const statusLabels = {
85
118
  preparing: "\u51C6\u5907\u4E2D",
86
119
  pending: "\u5F85\u56DE\u7B54",
@@ -90,6 +123,12 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
90
123
  cancelled: "\u5DF2\u53D6\u6D88",
91
124
  superseded: "\u5DF2\u88AB\u65B0\u6D88\u606F\u66FF\u4EE3"
92
125
  };
126
+ watch(
127
+ () => [props.interaction.request.request_id, props.interaction.state],
128
+ () => {
129
+ showDetails.value = false;
130
+ }
131
+ );
93
132
  watch(
94
133
  () => [props.interaction.request.request_id, props.interaction.answers],
95
134
  () => {
@@ -108,6 +147,30 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
108
147
  const requestIsValid = computed(
109
148
  () => validChatQuestionRequest(props.interaction.request)
110
149
  );
150
+ const isPending = computed(() => props.interaction.state === "pending");
151
+ const showForm = computed(() => isPending.value || showDetails.value);
152
+ const answerSummaries = computed(
153
+ () => props.interaction.request.questions.map((question) => {
154
+ var _a, _b, _c, _d;
155
+ const answer = props.interaction.answers.find(
156
+ (item) => item.question_id === question.id
157
+ );
158
+ const optionIds = (_b = (_a = answer == null ? void 0 : answer.selected_option_ids) != null ? _a : selected[question.id]) != null ? _b : [];
159
+ const labels = optionIds.map(
160
+ (id) => {
161
+ var _a2, _b2;
162
+ return (_b2 = (_a2 = question.options.find((option) => option.id === id)) == null ? void 0 : _a2.label) != null ? _b2 : id;
163
+ }
164
+ );
165
+ const customText = ((_d = (_c = answer == null ? void 0 : answer.other_text) != null ? _c : otherActive[question.id] ? otherText[question.id] : "") != null ? _d : "").trim();
166
+ return {
167
+ id: question.id,
168
+ title: question.title,
169
+ labels,
170
+ customText
171
+ };
172
+ })
173
+ );
111
174
  const canAnswer = computed(
112
175
  () => props.answerEnabled && props.interaction.state === "pending" && requestIsValid.value
113
176
  );
@@ -163,58 +226,149 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
163
226
  return (_ctx, _cache) => {
164
227
  var _a;
165
228
  return openBlock(), createElementBlock("section", {
166
- class: normalizeClass(["yc-chat-question-card question-card", { "is-compact": __props.compact, "is-readonly": !canAnswer.value }]),
229
+ class: normalizeClass(["yc-chat-question-card question-card", {
230
+ "is-compact": __props.compact,
231
+ "is-readonly": !canAnswer.value,
232
+ "is-summary": !showForm.value
233
+ }]),
167
234
  "data-state": __props.interaction.state,
168
235
  "data-testid": `question-card-${__props.interaction.request.request_id}`
169
236
  }, [
170
237
  createElementVNode("header", _hoisted_2, [
171
238
  createElementVNode("div", _hoisted_3, [
172
- _cache[1] || (_cache[1] = createElementVNode(
239
+ createElementVNode(
173
240
  "span",
174
241
  {
175
- class: "yc-chat-question-card__badge-icon",
242
+ class: normalizeClass(["yc-chat-question-card__badge-icon", { "is-answered": __props.interaction.state === "answered" }]),
176
243
  "aria-hidden": "true"
177
244
  },
178
245
  [
179
- createElementVNode("svg", {
180
- viewBox: "0 0 18 18",
181
- fill: "none"
182
- }, [
183
- createElementVNode("path", {
184
- d: "M9 2.25C9.42 5.45 10.75 6.78 13.95 7.2C10.75 7.62 9.42 8.95 9 12.15C8.58 8.95 7.25 7.62 4.05 7.2C7.25 6.78 8.58 5.45 9 2.25Z",
185
- fill: "currentColor"
186
- }),
187
- createElementVNode("circle", {
188
- cx: "14.2",
189
- cy: "13.2",
190
- r: "1.35",
191
- fill: "currentColor",
192
- opacity: "0.7"
193
- })
194
- ])
246
+ __props.interaction.state === "answered" ? (openBlock(), createElementBlock("svg", _hoisted_4, [..._cache[2] || (_cache[2] = [
247
+ createElementVNode(
248
+ "path",
249
+ {
250
+ d: "M4.2 9.4L7.4 12.6L13.8 5.8",
251
+ stroke: "currentColor",
252
+ "stroke-width": "2",
253
+ "stroke-linecap": "round",
254
+ "stroke-linejoin": "round"
255
+ },
256
+ null,
257
+ -1
258
+ /* CACHED */
259
+ )
260
+ ])])) : (openBlock(), createElementBlock("svg", _hoisted_5, [..._cache[3] || (_cache[3] = [
261
+ createElementVNode(
262
+ "path",
263
+ {
264
+ d: "M9 2.25C9.42 5.45 10.75 6.78 13.95 7.2C10.75 7.62 9.42 8.95 9 12.15C8.58 8.95 7.25 7.62 4.05 7.2C7.25 6.78 8.58 5.45 9 2.25Z",
265
+ fill: "currentColor"
266
+ },
267
+ null,
268
+ -1
269
+ /* CACHED */
270
+ ),
271
+ createElementVNode(
272
+ "circle",
273
+ {
274
+ cx: "14.2",
275
+ cy: "13.2",
276
+ r: "1.35",
277
+ fill: "currentColor",
278
+ opacity: "0.7"
279
+ },
280
+ null,
281
+ -1
282
+ /* CACHED */
283
+ )
284
+ ])]))
195
285
  ],
196
- -1
197
- /* CACHED */
198
- )),
286
+ 2
287
+ /* CLASS */
288
+ ),
199
289
  createElementVNode(
200
290
  "strong",
201
- _hoisted_4,
291
+ _hoisted_6,
202
292
  toDisplayString(__props.title),
203
293
  1
204
294
  /* TEXT */
205
295
  )
206
296
  ]),
207
- createElementVNode(
208
- "span",
209
- {
210
- class: normalizeClass(["yc-chat-question-card__status question-card__status", `is-${__props.interaction.state}`])
211
- },
212
- toDisplayString(statusLabels[__props.interaction.state]),
213
- 3
214
- /* TEXT, CLASS */
215
- )
297
+ createElementVNode("div", _hoisted_7, [
298
+ !isPending.value ? (openBlock(), createElementBlock(
299
+ "button",
300
+ {
301
+ key: 0,
302
+ type: "button",
303
+ class: "yc-chat-question-card__toggle-btn",
304
+ "data-testid": "toggle-question-details",
305
+ onClick: _cache[0] || (_cache[0] = ($event) => showDetails.value = !showDetails.value)
306
+ },
307
+ toDisplayString(showDetails.value ? "\u6536\u8D77\u9009\u9879" : "\u67E5\u770B\u9009\u9879"),
308
+ 1
309
+ /* TEXT */
310
+ )) : createCommentVNode("v-if", true),
311
+ createElementVNode(
312
+ "span",
313
+ {
314
+ class: normalizeClass(["yc-chat-question-card__status question-card__status", `is-${__props.interaction.state}`])
315
+ },
316
+ toDisplayString(statusLabels[__props.interaction.state]),
317
+ 3
318
+ /* TEXT, CLASS */
319
+ )
320
+ ])
216
321
  ]),
217
- createElementVNode("div", _hoisted_5, [
322
+ !showForm.value ? (openBlock(), createElementBlock("div", _hoisted_8, [
323
+ (openBlock(true), createElementBlock(
324
+ Fragment,
325
+ null,
326
+ renderList(answerSummaries.value, (item) => {
327
+ return openBlock(), createElementBlock("div", {
328
+ key: item.id,
329
+ class: "yc-chat-question-card__summary-item"
330
+ }, [
331
+ createElementVNode(
332
+ "p",
333
+ _hoisted_9,
334
+ toDisplayString(item.title),
335
+ 1
336
+ /* TEXT */
337
+ ),
338
+ __props.interaction.state === "answered" ? (openBlock(), createElementBlock("div", _hoisted_10, [
339
+ (openBlock(true), createElementBlock(
340
+ Fragment,
341
+ null,
342
+ renderList(item.labels, (label, idx) => {
343
+ return openBlock(), createElementBlock(
344
+ "span",
345
+ {
346
+ key: `${item.id}-opt-${idx}`,
347
+ class: "yc-chat-question-card__answer-chip"
348
+ },
349
+ toDisplayString(label),
350
+ 1
351
+ /* TEXT */
352
+ );
353
+ }),
354
+ 128
355
+ /* KEYED_FRAGMENT */
356
+ )),
357
+ item.customText ? (openBlock(), createElementBlock(
358
+ "span",
359
+ _hoisted_11,
360
+ toDisplayString(item.customText),
361
+ 1
362
+ /* TEXT */
363
+ )) : createCommentVNode("v-if", true),
364
+ item.labels.length === 0 && !item.customText ? (openBlock(), createElementBlock("span", _hoisted_12, " \u5DF2\u63D0\u4EA4\u56DE\u7B54 ")) : createCommentVNode("v-if", true)
365
+ ])) : createCommentVNode("v-if", true)
366
+ ]);
367
+ }),
368
+ 128
369
+ /* KEYED_FRAGMENT */
370
+ ))
371
+ ])) : (openBlock(), createElementBlock("div", _hoisted_13, [
218
372
  (openBlock(true), createElementBlock(
219
373
  Fragment,
220
374
  null,
@@ -224,7 +378,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
224
378
  class: "yc-chat-question-card__question question-card__question",
225
379
  disabled: !canAnswer.value
226
380
  }, [
227
- createElementVNode("legend", _hoisted_7, [
381
+ createElementVNode("legend", _hoisted_15, [
228
382
  createElementVNode(
229
383
  "span",
230
384
  null,
@@ -232,9 +386,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
232
386
  1
233
387
  /* TEXT */
234
388
  ),
235
- question.selection_mode === "multiple" ? (openBlock(), createElementBlock("span", _hoisted_8, " \u53EF\u591A\u9009 ")) : createCommentVNode("v-if", true)
389
+ question.selection_mode === "multiple" ? (openBlock(), createElementBlock("span", _hoisted_16, " \u53EF\u591A\u9009 ")) : createCommentVNode("v-if", true)
236
390
  ]),
237
- createElementVNode("div", _hoisted_9, [
391
+ createElementVNode("div", _hoisted_17, [
238
392
  (openBlock(true), createElementBlock(
239
393
  Fragment,
240
394
  null,
@@ -256,7 +410,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
256
410
  name: `question-${__props.interaction.request.request_id}-${question.id}`,
257
411
  checked: optionChecked(question, option.id),
258
412
  onChange: ($event) => selectOption(question, option.id)
259
- }, null, 40, _hoisted_10),
413
+ }, null, 40, _hoisted_18),
260
414
  createElementVNode(
261
415
  "span",
262
416
  {
@@ -267,7 +421,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
267
421
  "aria-hidden": "true"
268
422
  },
269
423
  [
270
- question.selection_mode === "multiple" && optionChecked(question, option.id) ? (openBlock(), createElementBlock("svg", _hoisted_11, [..._cache[2] || (_cache[2] = [
424
+ question.selection_mode === "multiple" && optionChecked(question, option.id) ? (openBlock(), createElementBlock("svg", _hoisted_19, [..._cache[4] || (_cache[4] = [
271
425
  createElementVNode(
272
426
  "path",
273
427
  {
@@ -286,22 +440,22 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
286
440
  2
287
441
  /* CLASS */
288
442
  ),
289
- createElementVNode("span", _hoisted_12, [
443
+ createElementVNode("span", _hoisted_20, [
290
444
  createElementVNode(
291
445
  "strong",
292
- _hoisted_13,
446
+ _hoisted_21,
293
447
  toDisplayString(option.label),
294
448
  1
295
449
  /* TEXT */
296
450
  ),
297
451
  option.description ? (openBlock(), createElementBlock(
298
452
  "small",
299
- _hoisted_14,
453
+ _hoisted_22,
300
454
  toDisplayString(option.description),
301
455
  1
302
456
  /* TEXT */
303
457
  )) : createCommentVNode("v-if", true),
304
- option.event ? (openBlock(), createElementBlock("span", _hoisted_15, [
458
+ option.event ? (openBlock(), createElementBlock("span", _hoisted_23, [
305
459
  createElementVNode(
306
460
  "span",
307
461
  null,
@@ -316,7 +470,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
316
470
  1
317
471
  /* TEXT */
318
472
  ),
319
- _cache[3] || (_cache[3] = createElementVNode(
473
+ _cache[5] || (_cache[5] = createElementVNode(
320
474
  "em",
321
475
  null,
322
476
  "Admin \u4E0D\u652F\u6301\u6267\u884C\u5BA2\u6237\u7AEF\u4E8B\u4EF6",
@@ -355,7 +509,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
355
509
  name: `question-${__props.interaction.request.request_id}-${question.id}`,
356
510
  checked: otherActive[question.id],
357
511
  onChange: ($event) => selectOther(question, $event.target.checked)
358
- }, null, 40, _hoisted_16),
512
+ }, null, 40, _hoisted_24),
359
513
  createElementVNode(
360
514
  "span",
361
515
  {
@@ -366,7 +520,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
366
520
  "aria-hidden": "true"
367
521
  },
368
522
  [
369
- question.selection_mode === "multiple" && otherActive[question.id] ? (openBlock(), createElementBlock("svg", _hoisted_17, [..._cache[4] || (_cache[4] = [
523
+ question.selection_mode === "multiple" && otherActive[question.id] ? (openBlock(), createElementBlock("svg", _hoisted_25, [..._cache[6] || (_cache[6] = [
370
524
  createElementVNode(
371
525
  "path",
372
526
  {
@@ -385,10 +539,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
385
539
  2
386
540
  /* CLASS */
387
541
  ),
388
- createElementVNode("span", _hoisted_18, [
542
+ createElementVNode("span", _hoisted_26, [
389
543
  createElementVNode(
390
544
  "strong",
391
- _hoisted_19,
545
+ _hoisted_27,
392
546
  toDisplayString(question.other.label),
393
547
  1
394
548
  /* TEXT */
@@ -398,14 +552,14 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
398
552
  2
399
553
  /* CLASS */
400
554
  ),
401
- otherActive[question.id] ? (openBlock(), createElementBlock("div", _hoisted_20, [
555
+ otherActive[question.id] ? (openBlock(), createElementBlock("div", _hoisted_28, [
402
556
  withDirectives(createElementVNode("textarea", {
403
557
  "onUpdate:modelValue": ($event) => otherText[question.id] = $event,
404
558
  class: "yc-chat-question-card__textarea",
405
559
  "data-testid": `other-text-${question.id}`,
406
560
  rows: "2",
407
561
  placeholder: "\u8BF7\u8F93\u5165\u4F60\u7684\u8865\u5145\u8BF4\u660E\u6216\u81EA\u5B9A\u4E49\u7B54\u6848\u2026"
408
- }, null, 8, _hoisted_21), [
562
+ }, null, 8, _hoisted_29), [
409
563
  [vModelText, otherText[question.id]]
410
564
  ])
411
565
  ])) : createCommentVNode("v-if", true)
@@ -414,42 +568,42 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
414
568
  /* CLASS */
415
569
  )
416
570
  ])
417
- ], 8, _hoisted_6);
571
+ ], 8, _hoisted_14);
418
572
  }),
419
573
  128
420
574
  /* KEYED_FRAGMENT */
421
575
  ))
422
- ]),
423
- !requestIsValid.value ? (openBlock(), createElementBlock("p", _hoisted_22, " \u4EA4\u4E92\u8BF7\u6C42\u4E0D\u7B26\u5408\u5BA2\u6237\u7AEF\u4E8B\u4EF6\u7EA6\u675F\uFF0C\u65E0\u6CD5\u63D0\u4EA4\u56DE\u7B54\u3002 ")) : createCommentVNode("v-if", true),
576
+ ])),
577
+ !requestIsValid.value ? (openBlock(), createElementBlock("p", _hoisted_30, " \u4EA4\u4E92\u8BF7\u6C42\u4E0D\u7B26\u5408\u5BA2\u6237\u7AEF\u4E8B\u4EF6\u7EA6\u675F\uFF0C\u65E0\u6CD5\u63D0\u4EA4\u56DE\u7B54\u3002 ")) : createCommentVNode("v-if", true),
424
578
  !__props.answerEnabled && __props.interaction.state === "pending" ? (openBlock(), createElementBlock(
425
579
  "p",
426
- _hoisted_23,
580
+ _hoisted_31,
427
581
  toDisplayString(__props.unavailableReason || "\u5F53\u524D\u754C\u9762\u6682\u4E0D\u652F\u6301\u63D0\u4EA4\u56DE\u7B54"),
428
582
  1
429
583
  /* TEXT */
430
584
  )) : createCommentVNode("v-if", true),
431
585
  ((_a = __props.interaction.receipt) == null ? void 0 : _a.clientEvent) ? (openBlock(), createElementBlock(
432
586
  "p",
433
- _hoisted_24,
587
+ _hoisted_32,
434
588
  " \u5BA2\u6237\u7AEF\u4E8B\u4EF6 " + toDisplayString(__props.interaction.receipt.clientEvent.type) + " \u672A\u5728 Admin \u6267\u884C\u3002 ",
435
589
  1
436
590
  /* TEXT */
437
591
  )) : createCommentVNode("v-if", true),
438
- __props.interaction.state === "pending" ? (openBlock(), createElementBlock("div", _hoisted_25, [
592
+ __props.interaction.state === "pending" ? (openBlock(), createElementBlock("div", _hoisted_33, [
439
593
  createElementVNode("button", {
440
594
  type: "button",
441
595
  class: "yc-chat-question-card__btn yc-chat-question-card__btn--cancel question-card__cancel",
442
596
  "data-testid": "cancel-interaction",
443
597
  disabled: !__props.answerEnabled || __props.submitting,
444
- onClick: _cache[0] || (_cache[0] = ($event) => emit("cancel"))
445
- }, " \u53D6\u6D88 ", 8, _hoisted_26),
598
+ onClick: _cache[1] || (_cache[1] = ($event) => emit("cancel"))
599
+ }, " \u53D6\u6D88 ", 8, _hoisted_34),
446
600
  createElementVNode("button", {
447
601
  type: "button",
448
602
  class: "yc-chat-question-card__btn yc-chat-question-card__btn--submit",
449
603
  "data-testid": "submit-answers",
450
604
  disabled: !canAnswer.value || !complete.value || __props.submitting,
451
605
  onClick: submit
452
- }, toDisplayString(__props.submitting ? "\u63D0\u4EA4\u4E2D\u2026" : "\u63D0\u4EA4\u56DE\u7B54"), 9, _hoisted_27)
606
+ }, toDisplayString(__props.submitting ? "\u63D0\u4EA4\u4E2D\u2026" : "\u63D0\u4EA4\u56DE\u7B54"), 9, _hoisted_35)
453
607
  ])) : createCommentVNode("v-if", true)
454
608
  ], 10, _hoisted_1);
455
609
  };
@@ -0,0 +1,75 @@
1
+ import { YcDisplayTableCard, YcDisplayMetricsCard, YcDisplayDetailCard } from './index.mjs';
2
+
3
+ const capability = {
4
+ install: [YcDisplayTableCard, YcDisplayMetricsCard, YcDisplayDetailCard],
5
+ gallery: [
6
+ {
7
+ id: "yc.common.table",
8
+ title: "\u901A\u7528\u6570\u636E\u8868\u683C\u5361",
9
+ categories: ["\u5361\u7247\u4E0E\u5C55\u793A", "\u6570\u636E\u8868\u683C"],
10
+ component: YcDisplayTableCard,
11
+ props: {
12
+ title: "\u9879\u76EE\u6570\u91CF\u6309\u57CE\u5E02\u6C47\u603B",
13
+ subtitle: "\u5171 2,141 \u4E2A\u5DF2\u6388\u6743\u9879\u76EE",
14
+ summary: [
15
+ { label: "\u5DF2\u8BC6\u522B\u57CE\u5E02", value: "359 \u4E2A" },
16
+ { label: "\u672A\u8BC6\u522B", value: "185 \u4E2A" }
17
+ ],
18
+ columns: [
19
+ { key: "city", label: "\u6240\u5C5E\u57CE\u5E02" },
20
+ { key: "count", label: "\u9879\u76EE\u6570", align: "right" }
21
+ ],
22
+ rows: [
23
+ { city: "\u91CD\u5E86", count: 74 },
24
+ { city: "\u6210\u90FD", count: 72 },
25
+ { city: "\u6C88\u9633", count: 46 }
26
+ ]
27
+ }
28
+ },
29
+ {
30
+ id: "yc.common.metrics",
31
+ title: "\u6838\u5FC3\u6307\u6807\u6C47\u603B\u5361",
32
+ categories: ["\u5361\u7247\u4E0E\u5C55\u793A"],
33
+ component: YcDisplayMetricsCard,
34
+ props: {
35
+ title: "\u672C\u671F\u6536\u7F34\u6982\u89C8",
36
+ subtitle: "2026-11 \u622A\u81F3\u6628\u65E5",
37
+ items: [
38
+ {
39
+ label: "\u5B9E\u6536\u91D1\u989D",
40
+ value: "128,460.00",
41
+ unit: "\u5143",
42
+ trend: "+2.4%",
43
+ trendType: "up"
44
+ },
45
+ {
46
+ label: "\u5F53\u671F\u6536\u7F34\u7387",
47
+ value: "94.6",
48
+ unit: "%",
49
+ description: "\u8F83\u4E0A\u6708\u63D0\u5347"
50
+ }
51
+ ]
52
+ }
53
+ },
54
+ {
55
+ id: "yc.common.detail",
56
+ title: "\u7ED3\u6784\u5316\u8BE6\u60C5\u5361",
57
+ categories: ["\u5361\u7247\u4E0E\u5C55\u793A"],
58
+ component: YcDisplayDetailCard,
59
+ props: {
60
+ title: "\u91D1\u78A7\u82B1\u56ED18 \xB7 \u623F\u5C4B\u8D26\u5355\u6982\u51B5",
61
+ subtitle: "1\u680B1\u5355\u51430603",
62
+ status: { text: "\u5DF2\u7ED3\u6E05", type: "success" },
63
+ fields: [
64
+ { label: "\u7F34\u8D39\u4EBA", value: "\u5468\u5F3A\u660E" },
65
+ { label: "\u6B20\u8D39\u672C\u91D1", value: "0.00 \u5143" },
66
+ { label: "\u8FDD\u7EA6\u91D1", value: "0.00 \u5143" },
67
+ { label: "\u5408\u8BA1\u6B20\u8D39", value: "0.00 \u5143" }
68
+ ],
69
+ note: "\u5982\u9700\u67E5\u8BE2\u5176\u4ED6\u697C\u5C42\u623F\u53F7\uFF0C\u53EF\u7EE7\u7EED\u8865\u5145\u697C\u5C42\u4FE1\u606F\u3002"
70
+ }
71
+ }
72
+ ]
73
+ };
74
+
75
+ export { capability as default };
@@ -0,0 +1,10 @@
1
+ import { withInstall } from '../../utils/src/component.mjs';
2
+ import TableCard from './src/table-card.vue.mjs';
3
+ import MetricsCard from './src/metrics-card.vue.mjs';
4
+ import DetailCard from './src/detail-card.vue.mjs';
5
+
6
+ const YcDisplayTableCard = withInstall(TableCard);
7
+ const YcDisplayMetricsCard = withInstall(MetricsCard);
8
+ const YcDisplayDetailCard = withInstall(DetailCard);
9
+
10
+ export { YcDisplayDetailCard, YcDisplayMetricsCard, YcDisplayTableCard };
@@ -0,0 +1,6 @@
1
+ import _sfc_main from './detail-card2.vue.mjs';
2
+ import _export_sfc from '../../../../_virtual/_plugin-vue_export-helper.mjs';
3
+
4
+ var DetailCard = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-ceb0fb47"]]);
5
+
6
+ export { DetailCard as default };