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.
- package/es/components/descriptions/index.d.ts +3 -3
- package/es/components/descriptions/src/index.vue.d.ts +1 -1
- package/es/components/dialog/index.d.ts +6 -6
- package/es/components/dialog/src/index.vue.d.ts +2 -2
- package/es/components/dialog-form/index.d.ts +2 -2
- package/es/components/dialog-form/src/index.vue.d.ts +2 -2
- package/es/components/display-item/index.d.ts +9 -9
- package/es/components/display-item/src/index.vue.d.ts +7 -7
- package/es/components/drawer-form/index.d.ts +20 -20
- package/es/components/drawer-form/src/index.vue.d.ts +8 -8
- package/es/components/form/index.d.ts +39 -39
- package/es/components/form/src/form-content.vue.d.ts +11 -11
- package/es/components/form/src/index.vue.d.ts +17 -17
- package/es/components/form-item/index.d.ts +61 -61
- package/es/components/form-item/src/index.vue.d.ts +22 -22
- package/es/components/index.d.ts +1 -0
- package/es/components/page/index.d.ts +850 -850
- package/es/components/page/src/index.vue.d.ts +286 -286
- package/es/components/popover/index.d.ts +9 -9
- package/es/components/popover/src/index.vue.d.ts +3 -3
- package/es/components/render/index.d.ts +1 -1
- package/es/components/render/src/index.vue.d.ts +1 -1
- package/es/components/search/index.d.ts +256 -256
- package/es/components/search/src/index.vue.d.ts +88 -88
- package/es/components/table/index.d.ts +9 -9
- package/es/components/table/src/index.vue.d.ts +1 -1
- package/es/components/table/src/table-column.vue.d.ts +22 -22
- package/es/components/utils/index.d.ts +1 -1
- package/es/components/yc-date-picker/src/date-picker.vue.d.ts +1 -1
- package/es/components/yc-display-cards/capability.d.ts +4 -0
- package/es/components/yc-display-cards/index.d.ts +24 -0
- package/es/components/yc-display-cards/src/detail-card.vue.d.ts +10 -0
- package/es/components/yc-display-cards/src/metrics-card.vue.d.ts +8 -0
- package/es/components/yc-display-cards/src/table-card.vue.d.ts +12 -0
- package/es/components/yc-display-cards/src/types.d.ts +47 -0
- package/es/components/yc-input/src/input.vue.d.ts +1 -1
- package/es/components/yc-input/src/money-input.vue.d.ts +1 -1
- package/es/components/yc-plus-page/src/index.vue.d.ts +858 -858
- package/es/components/yc-plus-tree/src/index.vue.d.ts +1 -1
- package/es/components/yc-questionnaire/src/index.vue.d.ts +1 -1
- package/es/components/yc-select-v2/src/index.vue.d.ts +1 -1
- package/es/components/yc-status-dialog/src/index.vue.d.ts +1 -1
- package/es/hooks/usePlusFormReset.d.ts +114 -114
- package/es/index.css +13 -10
- package/es/index.mjs +1 -0
- package/es/packages/components/index.mjs +1 -0
- package/es/packages/components/yc-ai-chat/src/question-card2.vue.mjs +240 -86
- package/es/packages/components/yc-display-cards/capability.mjs +75 -0
- package/es/packages/components/yc-display-cards/index.mjs +10 -0
- package/es/packages/components/yc-display-cards/src/detail-card.vue.mjs +6 -0
- package/es/packages/components/yc-display-cards/src/detail-card2.vue.mjs +118 -0
- package/es/packages/components/yc-display-cards/src/metrics-card.vue.mjs +6 -0
- package/es/packages/components/yc-display-cards/src/metrics-card2.vue.mjs +132 -0
- package/es/packages/components/yc-display-cards/src/table-card.vue.mjs +6 -0
- package/es/packages/components/yc-display-cards/src/table-card2.vue.mjs +199 -0
- package/es/packages/components/yc-display-cards/src/types.mjs +1 -0
- package/es/packages/registry/load.mjs +9 -8
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/index.css +4 -1
- package/index.js +1274 -595
- package/index.min.css +3 -0
- package/index.min.js +20 -20
- package/index.min.mjs +24 -24
- package/index.mjs +1270 -594
- package/lib/components/descriptions/index.d.ts +3 -3
- package/lib/components/descriptions/src/index.vue.d.ts +1 -1
- package/lib/components/dialog/index.d.ts +6 -6
- package/lib/components/dialog/src/index.vue.d.ts +2 -2
- package/lib/components/dialog-form/index.d.ts +2 -2
- package/lib/components/dialog-form/src/index.vue.d.ts +2 -2
- package/lib/components/display-item/index.d.ts +9 -9
- package/lib/components/display-item/src/index.vue.d.ts +7 -7
- package/lib/components/drawer-form/index.d.ts +20 -20
- package/lib/components/drawer-form/src/index.vue.d.ts +8 -8
- package/lib/components/form/index.d.ts +39 -39
- package/lib/components/form/src/form-content.vue.d.ts +11 -11
- package/lib/components/form/src/index.vue.d.ts +17 -17
- package/lib/components/form-item/index.d.ts +61 -61
- package/lib/components/form-item/src/index.vue.d.ts +22 -22
- package/lib/components/index.d.ts +1 -0
- package/lib/components/page/index.d.ts +850 -850
- package/lib/components/page/src/index.vue.d.ts +286 -286
- package/lib/components/popover/index.d.ts +9 -9
- package/lib/components/popover/src/index.vue.d.ts +3 -3
- package/lib/components/render/index.d.ts +1 -1
- package/lib/components/render/src/index.vue.d.ts +1 -1
- package/lib/components/search/index.d.ts +256 -256
- package/lib/components/search/src/index.vue.d.ts +88 -88
- package/lib/components/table/index.d.ts +9 -9
- package/lib/components/table/src/index.vue.d.ts +1 -1
- package/lib/components/table/src/table-column.vue.d.ts +22 -22
- package/lib/components/utils/index.d.ts +1 -1
- package/lib/components/yc-date-picker/src/date-picker.vue.d.ts +1 -1
- package/lib/components/yc-display-cards/capability.d.ts +4 -0
- package/lib/components/yc-display-cards/index.d.ts +24 -0
- package/lib/components/yc-display-cards/src/detail-card.vue.d.ts +10 -0
- package/lib/components/yc-display-cards/src/metrics-card.vue.d.ts +8 -0
- package/lib/components/yc-display-cards/src/table-card.vue.d.ts +12 -0
- package/lib/components/yc-display-cards/src/types.d.ts +47 -0
- package/lib/components/yc-input/src/input.vue.d.ts +1 -1
- package/lib/components/yc-input/src/money-input.vue.d.ts +1 -1
- package/lib/components/yc-plus-page/src/index.vue.d.ts +858 -858
- package/lib/components/yc-plus-tree/src/index.vue.d.ts +1 -1
- package/lib/components/yc-questionnaire/src/index.vue.d.ts +1 -1
- package/lib/components/yc-select-v2/src/index.vue.d.ts +1 -1
- package/lib/components/yc-status-dialog/src/index.vue.d.ts +1 -1
- package/lib/hooks/usePlusFormReset.d.ts +114 -114
- package/lib/index.css +12 -9
- package/lib/index.js +10 -6
- package/lib/packages/components/index.js +10 -6
- package/lib/packages/components/yc-ai-chat/src/question-card2.vue.js +239 -85
- package/lib/packages/components/yc-display-cards/capability.js +79 -0
- package/lib/packages/components/yc-display-cards/index.js +14 -0
- package/lib/packages/components/yc-display-cards/src/detail-card.vue.js +10 -0
- package/lib/packages/components/yc-display-cards/src/detail-card2.vue.js +122 -0
- package/lib/packages/components/yc-display-cards/src/metrics-card.vue.js +10 -0
- package/lib/packages/components/yc-display-cards/src/metrics-card2.vue.js +136 -0
- package/lib/packages/components/yc-display-cards/src/table-card.vue.js +10 -0
- package/lib/packages/components/yc-display-cards/src/table-card2.vue.js +203 -0
- package/lib/packages/components/yc-display-cards/src/types.js +2 -0
- package/lib/packages/registry/load.js +9 -8
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/locale/en.js +1 -1
- package/locale/en.min.js +1 -1
- package/locale/en.min.mjs +1 -1
- package/locale/en.mjs +1 -1
- package/locale/ja.js +1 -1
- package/locale/ja.min.js +1 -1
- package/locale/ja.min.mjs +1 -1
- package/locale/ja.mjs +1 -1
- package/locale/ko.js +1 -1
- package/locale/ko.min.js +1 -1
- package/locale/ko.min.mjs +1 -1
- package/locale/ko.mjs +1 -1
- package/locale/zh-cn.js +1 -1
- package/locale/zh-cn.min.js +1 -1
- package/locale/zh-cn.min.mjs +1 -1
- package/locale/zh-cn.mjs +1 -1
- package/locale/zh-tw.js +1 -1
- package/locale/zh-tw.min.js +1 -1
- package/locale/zh-tw.min.mjs +1 -1
- package/locale/zh-tw.mjs +1 -1
- package/package.json +1 -1
- package/theme-chalk/index.css +4 -1
- package/theme-chalk/plus-yc-ai-chat.css +1 -1
- 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 = {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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-
|
|
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
|
|
27
|
-
const
|
|
28
|
-
const
|
|
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
|
|
64
|
+
const _hoisted_23 = {
|
|
33
65
|
key: 1,
|
|
34
66
|
class: "yc-chat-question-card__event question-card__event"
|
|
35
67
|
};
|
|
36
|
-
const
|
|
37
|
-
const
|
|
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
|
|
43
|
-
const
|
|
44
|
-
const
|
|
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
|
|
49
|
-
const
|
|
50
|
-
key:
|
|
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
|
|
54
|
-
key:
|
|
85
|
+
const _hoisted_31 = {
|
|
86
|
+
key: 3,
|
|
55
87
|
class: "yc-chat-question-card__notice question-card__notice"
|
|
56
88
|
};
|
|
57
|
-
const
|
|
58
|
-
key:
|
|
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
|
|
63
|
-
key:
|
|
94
|
+
const _hoisted_33 = {
|
|
95
|
+
key: 5,
|
|
64
96
|
class: "yc-chat-question-card__actions question-card__actions"
|
|
65
97
|
};
|
|
66
|
-
const
|
|
67
|
-
const
|
|
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", {
|
|
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
|
-
|
|
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.
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
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
|
-
|
|
201
|
-
/*
|
|
202
|
-
)
|
|
290
|
+
2
|
|
291
|
+
/* CLASS */
|
|
292
|
+
),
|
|
203
293
|
vue.createElementVNode(
|
|
204
294
|
"strong",
|
|
205
|
-
|
|
295
|
+
_hoisted_6,
|
|
206
296
|
vue.toDisplayString(__props.title),
|
|
207
297
|
1
|
|
208
298
|
/* TEXT */
|
|
209
299
|
)
|
|
210
300
|
]),
|
|
211
|
-
vue.createElementVNode(
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
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.
|
|
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",
|
|
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",
|
|
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",
|
|
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,
|
|
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",
|
|
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",
|
|
447
|
+
vue.createElementVNode("span", _hoisted_20, [
|
|
294
448
|
vue.createElementVNode(
|
|
295
449
|
"strong",
|
|
296
|
-
|
|
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
|
-
|
|
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",
|
|
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[
|
|
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,
|
|
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",
|
|
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",
|
|
546
|
+
vue.createElementVNode("span", _hoisted_26, [
|
|
393
547
|
vue.createElementVNode(
|
|
394
548
|
"strong",
|
|
395
|
-
|
|
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",
|
|
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,
|
|
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,
|
|
575
|
+
], 8, _hoisted_14);
|
|
422
576
|
}),
|
|
423
577
|
128
|
|
424
578
|
/* KEYED_FRAGMENT */
|
|
425
579
|
))
|
|
426
|
-
]),
|
|
427
|
-
!requestIsValid.value ? (vue.openBlock(), vue.createElementBlock("p",
|
|
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
|
-
|
|
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
|
-
|
|
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",
|
|
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[
|
|
449
|
-
}, " \u53D6\u6D88 ", 8,
|
|
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,
|
|
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", "\u6570\u636E\u8868\u683C"],
|
|
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;
|