yc-agent-ui 1.2.4 → 1.2.6

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