ant-design-x-vue 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/dist/index.umd.js +7 -7
- package/es/attachments/FileList/FileList2.mjs +10 -12
- package/es/bubble/Bubble.mjs +22 -18
- package/es/conversations/ConversationsItem.mjs +32 -28
- package/es/sender/Sender.mjs +13 -13
- package/es/thought-chain/item.mjs +83 -70
- package/es/thought-chain/style/index.mjs +20 -14
- package/lib/attachments/FileList/FileList2.js +1 -1
- package/lib/bubble/Bubble.js +1 -1
- package/lib/conversations/ConversationsItem.js +1 -1
- package/lib/sender/Sender.js +1 -1
- package/lib/thought-chain/item.js +1 -1
- package/lib/thought-chain/style/index.js +1 -1
- package/package.json +1 -1
- package/typings/bubble/Bubble.vue.d.ts +6 -2
- package/typings/bubble/index.d.ts +13 -5
- package/typings/bubble/interface.d.ts +1 -1
- package/typings/conversations/interface.d.ts +1 -0
- package/typings/sender/interface.d.ts +2 -2
- package/typings/thought-chain/interface.d.ts +14 -1
- package/typings/components.d.ts +0 -9
- package/typings/hooks.d.ts +0 -4
|
@@ -1246,18 +1246,16 @@ const Me = 1, on = /* @__PURE__ */ ze({
|
|
|
1246
1246
|
name: "AXAttachmentsFileList",
|
|
1247
1247
|
__name: "FileList",
|
|
1248
1248
|
props: {
|
|
1249
|
-
prefixCls:
|
|
1250
|
-
items:
|
|
1251
|
-
onRemove: {
|
|
1252
|
-
|
|
1253
|
-
},
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
itemClassName: null,
|
|
1260
|
-
itemStyle: null
|
|
1249
|
+
prefixCls: {},
|
|
1250
|
+
items: {},
|
|
1251
|
+
onRemove: {},
|
|
1252
|
+
overflow: {},
|
|
1253
|
+
upload: {},
|
|
1254
|
+
imageProps: {},
|
|
1255
|
+
listClassName: {},
|
|
1256
|
+
listStyle: {},
|
|
1257
|
+
itemClassName: {},
|
|
1258
|
+
itemStyle: {}
|
|
1261
1259
|
},
|
|
1262
1260
|
setup(e) {
|
|
1263
1261
|
const r = dt(() => `${e.prefixCls}-list`), t = mt("file-list-container"), [n, a] = I(!1), i = ht();
|
package/es/bubble/Bubble.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as j, mergeDefaults as D, toRef as h, useSlots as H, ref as d, watch as N, unref as k, watchEffect as q, computed as r, createVNode as l, isVNode as z, Fragment as G, toValue as
|
|
1
|
+
import { defineComponent as j, mergeDefaults as D, toRef as h, useSlots as H, ref as d, watch as N, unref as k, watchEffect as q, computed as r, createVNode as l, isVNode as z, Fragment as G, toValue as c, mergeProps as J } from "vue";
|
|
2
2
|
import { a as K } from "../attachments/Attachments2.mjs";
|
|
3
3
|
import { Avatar as L } from "ant-design-vue";
|
|
4
4
|
import M from "../_util/hooks/use-x-component-config.mjs";
|
|
@@ -9,7 +9,7 @@ import W from "./hooks/useTypingConfig.mjs";
|
|
|
9
9
|
import Y from "./loading.mjs";
|
|
10
10
|
import Z from "./style/index.mjs";
|
|
11
11
|
import { useBubbleContextInject as U } from "./context.mjs";
|
|
12
|
-
const
|
|
12
|
+
const ie = /* @__PURE__ */ j({
|
|
13
13
|
name: "AXBubble",
|
|
14
14
|
__name: "Bubble",
|
|
15
15
|
props: D({
|
|
@@ -33,7 +33,9 @@ const ce = /* @__PURE__ */ j({
|
|
|
33
33
|
variant: null,
|
|
34
34
|
shape: null,
|
|
35
35
|
onTypingComplete: null,
|
|
36
|
-
header:
|
|
36
|
+
header: {
|
|
37
|
+
type: Function
|
|
38
|
+
},
|
|
37
39
|
footer: {
|
|
38
40
|
type: Function
|
|
39
41
|
}
|
|
@@ -55,26 +57,26 @@ const ce = /* @__PURE__ */ j({
|
|
|
55
57
|
g.value = e.content;
|
|
56
58
|
});
|
|
57
59
|
const {
|
|
58
|
-
onUpdate:
|
|
60
|
+
onUpdate: i
|
|
59
61
|
} = k(U()), y = d(null), {
|
|
60
62
|
direction: b,
|
|
61
63
|
getPrefixCls: R
|
|
62
|
-
} = O(), t = R("bubble", e.prefixCls), n = M("bubble"), [T, P, S, C] = W(() => e.typing), [s, u] = Q(g, T, P, S),
|
|
64
|
+
} = O(), t = R("bubble", e.prefixCls), n = M("bubble"), [T, P, S, C] = W(() => e.typing), [s, u] = Q(g, T, P, S), f = d(!1);
|
|
63
65
|
N(s, () => {
|
|
64
|
-
|
|
66
|
+
i == null || i();
|
|
65
67
|
}), q(() => {
|
|
66
68
|
var o;
|
|
67
|
-
!u.value && !e.loading ?
|
|
69
|
+
!u.value && !e.loading ? f.value || (f.value = !0, (o = e.onTypingComplete) == null || o.call(e)) : f.value = !1;
|
|
68
70
|
});
|
|
69
|
-
const [V, w
|
|
71
|
+
const [F, V, w] = Z(() => t), B = r(() => [t, e.rootClassName, n.value.className, V.value, w, `${t}-${e.placement}`, {
|
|
70
72
|
[`${t}-rtl`]: b.value === "rtl"
|
|
71
73
|
}, {
|
|
72
74
|
[`${t}-typing`]: u.value && !e.loading && !e.messageRender && !a.message && !C.value
|
|
73
|
-
}]),
|
|
75
|
+
}]), E = r(() => a.avatar ? a.avatar() : z(e.avatar) ? e.avatar : l(L, e.avatar, null)), I = r(() => a.message ? a.message({
|
|
74
76
|
content: s.value
|
|
75
77
|
}) : e.messageRender ? e.messageRender(s.value) : s.value), X = r(() => e.loading ? a.loading ? a.loading() : e.loadingRender ? e.loadingRender() : l(Y, {
|
|
76
78
|
prefixCls: t
|
|
77
|
-
}, null) : l(G, null, [I.value, u.value &&
|
|
79
|
+
}, null) : l(G, null, [I.value, u.value && c(C)])), A = r(() => {
|
|
78
80
|
const o = l("div", {
|
|
79
81
|
style: {
|
|
80
82
|
...n.value.styles.content,
|
|
@@ -83,18 +85,20 @@ const ce = /* @__PURE__ */ j({
|
|
|
83
85
|
class: [`${t}-content`, `${t}-content-${e.variant}`, {
|
|
84
86
|
[`${t}-content-${e.shape}`]: e.shape
|
|
85
87
|
}, n.value.classNames.content, e.classNames.content]
|
|
86
|
-
}, [
|
|
88
|
+
}, [c(X)]), m = a.header ? a.header({
|
|
89
|
+
content: s.value
|
|
90
|
+
}) : typeof e.header == "function" ? e.header(s.value) : e.header, v = a.footer ? a.footer({
|
|
87
91
|
content: s.value
|
|
88
92
|
}) : typeof e.footer == "function" ? e.footer(s.value) : e.footer;
|
|
89
|
-
return
|
|
93
|
+
return m || v ? l("div", {
|
|
90
94
|
class: `${t}-content-wrapper`
|
|
91
|
-
}, [
|
|
95
|
+
}, [m && l("div", {
|
|
92
96
|
class: [`${t}-header`, n.value.classNames.header, e.classNames.header],
|
|
93
97
|
style: {
|
|
94
98
|
...n.value.styles.header,
|
|
95
99
|
...e.styles.header
|
|
96
100
|
}
|
|
97
|
-
}, [
|
|
101
|
+
}, [m]), o, v && l("div", {
|
|
98
102
|
class: [`${t}-footer`, n.value.classNames.footer, e.classNames.footer],
|
|
99
103
|
style: {
|
|
100
104
|
...n.value.styles.footer,
|
|
@@ -104,12 +108,12 @@ const ce = /* @__PURE__ */ j({
|
|
|
104
108
|
});
|
|
105
109
|
return x({
|
|
106
110
|
nativeElement: y
|
|
107
|
-
}), () =>
|
|
111
|
+
}), () => F(l("div", J({
|
|
108
112
|
style: {
|
|
109
113
|
...n.value.style
|
|
110
114
|
// ...(style as object),
|
|
111
115
|
},
|
|
112
|
-
class:
|
|
116
|
+
class: c(B)
|
|
113
117
|
}, $, {
|
|
114
118
|
ref: y
|
|
115
119
|
}), [(a.avatar || e.avatar) && l("div", {
|
|
@@ -118,9 +122,9 @@ const ce = /* @__PURE__ */ j({
|
|
|
118
122
|
...e.styles.avatar
|
|
119
123
|
},
|
|
120
124
|
class: [`${t}-avatar`, n.value.classNames.avatar, e.classNames.avatar]
|
|
121
|
-
}, [
|
|
125
|
+
}, [c(E)]), c(A)]));
|
|
122
126
|
}
|
|
123
127
|
});
|
|
124
128
|
export {
|
|
125
|
-
|
|
129
|
+
ie as default
|
|
126
130
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as p, toRef as y, computed as i, createVNode as t, mergeProps as h } from "vue";
|
|
2
2
|
import { a as $, c as O } from "../attachments/Attachments2.mjs";
|
|
3
3
|
import T from "../_util/pick-attrs.mjs";
|
|
4
|
-
import { Tooltip as E, Typography as M, Dropdown as
|
|
5
|
-
import
|
|
6
|
-
import { E as
|
|
7
|
-
const
|
|
4
|
+
import { Tooltip as E, Typography as M, Dropdown as w, Menu as I } from "ant-design-vue";
|
|
5
|
+
import s from "../_util/hooks/use-state.mjs";
|
|
6
|
+
import { E as N } from "../attachments/FileList/FileList2.mjs";
|
|
7
|
+
const S = /* @__PURE__ */ p({
|
|
8
8
|
name: "AXConversationsItem",
|
|
9
9
|
__name: "ConversationsItem",
|
|
10
10
|
props: {
|
|
@@ -20,34 +20,37 @@ const L = /* @__PURE__ */ y({
|
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
setup(e) {
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
const
|
|
23
|
+
const u = $(e, ["prefixCls", "info", "class", "direction", "onClick", "active", "menu"]);
|
|
24
|
+
y(e, "class");
|
|
25
|
+
const f = i(() => T(u, {
|
|
26
26
|
aria: !0,
|
|
27
27
|
data: !0,
|
|
28
28
|
attr: !0
|
|
29
|
-
})),
|
|
29
|
+
})), m = (n) => {
|
|
30
30
|
n.stopPropagation();
|
|
31
|
-
},
|
|
32
|
-
[`${e.prefixCls}-item-active`]: e.active && !
|
|
31
|
+
}, l = i(() => e.info.disabled), [d, g] = s(!1), [C, r] = s(!1), v = i(() => O(e.class, `${e.prefixCls}-item`, {
|
|
32
|
+
[`${e.prefixCls}-item-active`]: e.active && !l.value
|
|
33
33
|
}, {
|
|
34
|
-
[`${e.prefixCls}-item-disabled`]:
|
|
35
|
-
})),
|
|
36
|
-
!
|
|
37
|
-
},
|
|
34
|
+
[`${e.prefixCls}-item-disabled`]: l.value
|
|
35
|
+
})), x = () => {
|
|
36
|
+
!l.value && e.onClick && e.onClick(e.info);
|
|
37
|
+
}, P = (n) => {
|
|
38
38
|
n && r(!n);
|
|
39
|
-
}, o =
|
|
39
|
+
}, o = i(() => {
|
|
40
40
|
var n;
|
|
41
41
|
return (n = e.menu) == null ? void 0 : n.trigger;
|
|
42
|
-
}),
|
|
42
|
+
}), c = i(() => {
|
|
43
43
|
const {
|
|
44
44
|
trigger: n,
|
|
45
45
|
...a
|
|
46
46
|
} = e.menu || {};
|
|
47
47
|
return a;
|
|
48
|
+
}), b = i(() => {
|
|
49
|
+
var n;
|
|
50
|
+
return (n = c.value) == null ? void 0 : n.getPopupContainer;
|
|
48
51
|
}), k = (n) => {
|
|
49
|
-
const a = t(
|
|
50
|
-
onClick:
|
|
52
|
+
const a = t(N, {
|
|
53
|
+
onClick: m,
|
|
51
54
|
class: `${e.prefixCls}-menu-icon`
|
|
52
55
|
}, null);
|
|
53
56
|
return o.value ? typeof o.value == "function" ? o.value(n, {
|
|
@@ -56,34 +59,35 @@ const L = /* @__PURE__ */ y({
|
|
|
56
59
|
};
|
|
57
60
|
return () => t(E, {
|
|
58
61
|
title: e.info.label,
|
|
59
|
-
open:
|
|
62
|
+
open: d.value && C.value,
|
|
60
63
|
onOpenChange: r,
|
|
61
64
|
placement: e.direction === "rtl" ? "left" : "right"
|
|
62
65
|
}, {
|
|
63
|
-
default: () => [t("li", h(
|
|
66
|
+
default: () => [t("li", h(f.value, {
|
|
64
67
|
class: v.value,
|
|
65
|
-
onClick:
|
|
68
|
+
onClick: x
|
|
66
69
|
}), [e.info.icon && t("div", {
|
|
67
70
|
class: `${e.prefixCls}-icon`
|
|
68
71
|
}, [e.info.icon]), t(M.Text, {
|
|
69
72
|
class: `${e.prefixCls}-label`,
|
|
70
73
|
ellipsis: {
|
|
71
|
-
onEllipsis:
|
|
74
|
+
onEllipsis: g
|
|
72
75
|
}
|
|
73
76
|
}, {
|
|
74
77
|
default: () => [e.info.label]
|
|
75
|
-
}), !
|
|
78
|
+
}), !l.value && e.menu && t(w, {
|
|
76
79
|
placement: e.direction === "rtl" ? "bottomLeft" : "bottomRight",
|
|
77
80
|
trigger: ["click"],
|
|
78
|
-
disabled:
|
|
79
|
-
onOpenChange:
|
|
81
|
+
disabled: l.value,
|
|
82
|
+
onOpenChange: P,
|
|
83
|
+
getPopupContainer: b.value
|
|
80
84
|
}, {
|
|
81
85
|
default: () => k(e.info),
|
|
82
|
-
overlay: () => t(
|
|
86
|
+
overlay: () => t(I, c.value, null)
|
|
83
87
|
})])]
|
|
84
88
|
});
|
|
85
89
|
}
|
|
86
90
|
});
|
|
87
91
|
export {
|
|
88
|
-
|
|
92
|
+
S as default
|
|
89
93
|
};
|
package/es/sender/Sender.mjs
CHANGED
|
@@ -12,8 +12,8 @@ import D from "./components/LoadingButton.mjs";
|
|
|
12
12
|
import K from "./components/SendButton.mjs";
|
|
13
13
|
import R from "./components/SpeechButton/index.mjs";
|
|
14
14
|
import ve from "./style/index.mjs";
|
|
15
|
-
import
|
|
16
|
-
import
|
|
15
|
+
import ye from "./useSpeech.mjs";
|
|
16
|
+
import Ce from "../_util/getValue.mjs";
|
|
17
17
|
const Ae = /* @__PURE__ */ ee({
|
|
18
18
|
name: "AXSender",
|
|
19
19
|
__name: "Sender",
|
|
@@ -77,7 +77,7 @@ const Ae = /* @__PURE__ */ ee({
|
|
|
77
77
|
const V = le(e, ["prefixCls", "styles", "classNames", "className", "rootClassName", "style", "defaultValue", "value", "placeholder", "readOnly", "submitType", "onSubmit", "loading", "components", "onCancel", "onChange", "actions", "onKeyPress", "onKeyDown", "disabled", "allowSpeech", "prefix", "footer", "header", "onPaste", "onPasteFile", "autoSize"]);
|
|
78
78
|
te(e, "prefixCls");
|
|
79
79
|
function A(t, n, r) {
|
|
80
|
-
return
|
|
80
|
+
return Ce(t, n) || r;
|
|
81
81
|
}
|
|
82
82
|
const m = {
|
|
83
83
|
SendButton: K,
|
|
@@ -96,14 +96,14 @@ const Ae = /* @__PURE__ */ ee({
|
|
|
96
96
|
ae(() => e.value, () => {
|
|
97
97
|
x(e.value);
|
|
98
98
|
});
|
|
99
|
-
const
|
|
99
|
+
const y = (t, n) => {
|
|
100
100
|
x(t), E("update:value", t), e.onChange && e.onChange(t, n);
|
|
101
101
|
}, {
|
|
102
102
|
speechPermission: j,
|
|
103
103
|
triggerSpeech: b,
|
|
104
104
|
recording: q
|
|
105
|
-
} =
|
|
106
|
-
|
|
105
|
+
} = ye((t) => {
|
|
106
|
+
y(`${u.value} ${t}`);
|
|
107
107
|
}, () => e.allowSpeech), H = A(e.components, ["input"], se.TextArea), G = a(() => ue(V, {
|
|
108
108
|
attr: !0,
|
|
109
109
|
aria: !0,
|
|
@@ -111,10 +111,10 @@ const Ae = /* @__PURE__ */ ee({
|
|
|
111
111
|
})), J = a(() => ({
|
|
112
112
|
...G.value,
|
|
113
113
|
ref: f
|
|
114
|
-
})),
|
|
114
|
+
})), C = () => {
|
|
115
115
|
u.value && e.onSubmit && !e.loading && e.onSubmit(u.value);
|
|
116
116
|
}, Q = () => {
|
|
117
|
-
|
|
117
|
+
y("");
|
|
118
118
|
}, h = d(!1), U = () => {
|
|
119
119
|
h.value = !0;
|
|
120
120
|
}, W = () => {
|
|
@@ -123,10 +123,10 @@ const Ae = /* @__PURE__ */ ee({
|
|
|
123
123
|
const n = t.key === "Enter" && !h.value;
|
|
124
124
|
switch (e.submitType) {
|
|
125
125
|
case "enter":
|
|
126
|
-
n && !t.shiftKey && (t.preventDefault(),
|
|
126
|
+
n && !t.shiftKey && (t.preventDefault(), C());
|
|
127
127
|
break;
|
|
128
128
|
case "shiftEnter":
|
|
129
|
-
n && t.shiftKey && (t.preventDefault(),
|
|
129
|
+
n && t.shiftKey && (t.preventDefault(), C());
|
|
130
130
|
break;
|
|
131
131
|
}
|
|
132
132
|
e.onKeyPress && e.onKeyPress(t);
|
|
@@ -152,7 +152,7 @@ const Ae = /* @__PURE__ */ ee({
|
|
|
152
152
|
}) : typeof e.actions == "function" ? t = e.actions(t, n) : (e.actions || e.actions === !1) && (t = e.actions), t;
|
|
153
153
|
}), _ = a(() => ({
|
|
154
154
|
prefixCls: M.value,
|
|
155
|
-
onSend:
|
|
155
|
+
onSend: C,
|
|
156
156
|
onSendDisabled: !u.value,
|
|
157
157
|
onClear: Q,
|
|
158
158
|
onClearDisabled: !u.value,
|
|
@@ -172,7 +172,7 @@ const Ae = /* @__PURE__ */ ee({
|
|
|
172
172
|
}) : typeof e.footer == "function" ? t = e.footer({
|
|
173
173
|
components: m
|
|
174
174
|
}) : e.footer && (t = e.footer), t;
|
|
175
|
-
}), $ = a(() => i.header ? i.header() : e.header), w = a(() => i.prefix ? i.prefix() : e.prefix);
|
|
175
|
+
}), $ = a(() => i.header ? i.header() : typeof e.header == "function" ? e.header() : e.header), w = a(() => i.prefix ? i.prefix() : typeof e.prefix == "function" ? e.prefix() : e.prefix);
|
|
176
176
|
return I({
|
|
177
177
|
nativeElement: v.value,
|
|
178
178
|
// @ts-expect-error
|
|
@@ -220,7 +220,7 @@ const Ae = /* @__PURE__ */ ee({
|
|
|
220
220
|
autoSize: e.autoSize,
|
|
221
221
|
value: u.value,
|
|
222
222
|
onChange: (t) => {
|
|
223
|
-
|
|
223
|
+
y(t.target.value, t), b(!0);
|
|
224
224
|
},
|
|
225
225
|
onPressEnter: Y,
|
|
226
226
|
onCompositionstart: U,
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { a as
|
|
3
|
-
import
|
|
4
|
-
import { useThoughtChainNodeContextInject as
|
|
5
|
-
import { Avatar as
|
|
1
|
+
import { defineComponent as D, mergeDefaults as H, computed as e, useId as I, createVNode as l, mergeProps as K, withDirectives as V, vShow as j } from "vue";
|
|
2
|
+
import { a as X, c as i } from "../attachments/Attachments2.mjs";
|
|
3
|
+
import q from "../_util/pick-attrs.mjs";
|
|
4
|
+
import { useThoughtChainNodeContextInject as z } from "./context.mjs";
|
|
5
|
+
import { Avatar as B, Typography as P, Tooltip as S } from "ant-design-vue";
|
|
6
6
|
import "../transition-collapse/index.mjs";
|
|
7
|
-
import { L as
|
|
8
|
-
import
|
|
9
|
-
const
|
|
7
|
+
import { L as E, R as G } from "../attachments/FileList/FileList2.mjs";
|
|
8
|
+
import J from "../transition-collapse/TransitionCollapse.mjs";
|
|
9
|
+
const te = /* @__PURE__ */ D({
|
|
10
10
|
name: "AXThoughtChainNode",
|
|
11
11
|
__name: "item",
|
|
12
|
-
props:
|
|
12
|
+
props: H({
|
|
13
13
|
info: null,
|
|
14
14
|
nextStatus: null,
|
|
15
15
|
onClick: {
|
|
@@ -19,78 +19,91 @@ const U = /* @__PURE__ */ S({
|
|
|
19
19
|
info: () => ({})
|
|
20
20
|
}),
|
|
21
21
|
setup(t) {
|
|
22
|
-
const
|
|
22
|
+
const c = X(t, ["info", "nextStatus", "onClick"]), R = e(() => q(c, {
|
|
23
23
|
attr: !0,
|
|
24
24
|
aria: !0,
|
|
25
25
|
data: !0
|
|
26
|
-
})),
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
26
|
+
})), n = z(), C = e(() => n.value.prefixCls), v = e(() => n.value.enableCollapse), A = e(() => n.value.expandedKeys), g = e(() => n.value.direction), r = e(() => n.value.classNames), f = e(() => n.value.styles), F = I(), h = e(() => t.info.key ?? F), L = e(() => t.info.icon), d = e(() => t.info.title), x = e(() => t.info.extra), s = e(() => t.info.content), y = e(() => t.info.footer), $ = e(() => t.info.status), u = e(() => t.info.description), p = e(() => {
|
|
27
|
+
const a = t.info.tooltip ?? !0, T = g.value === "rtl" ? "topRight" : "topLeft", b = {
|
|
28
|
+
title: d.value,
|
|
29
|
+
placement: T
|
|
30
|
+
}, N = {
|
|
31
|
+
title: u.value,
|
|
32
|
+
placement: T
|
|
33
|
+
};
|
|
34
|
+
return typeof a == "boolean" ? {
|
|
35
|
+
titleConfig: b,
|
|
36
|
+
descriptionConfig: N
|
|
37
|
+
} : {
|
|
38
|
+
titleConfig: {
|
|
39
|
+
...b,
|
|
40
|
+
...a.titleConfig ? a.titleConfig : {}
|
|
41
|
+
},
|
|
42
|
+
descriptionConfig: {
|
|
43
|
+
...N,
|
|
44
|
+
...a.descriptionConfig ? a.descriptionConfig : {}
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
}), k = e(() => !t.info.tooltip), o = e(() => `${C.value}-item`), O = () => {
|
|
48
|
+
var a;
|
|
49
|
+
return (a = t.onClick) == null ? void 0 : a.call(t, h.value);
|
|
50
|
+
}, m = e(() => {
|
|
51
|
+
var a;
|
|
52
|
+
return (a = A.value) == null ? void 0 : a.includes(h.value);
|
|
53
|
+
}), w = e(() => v.value ? m.value : !0);
|
|
54
|
+
return () => l("div", K(R.value, {
|
|
55
|
+
class: i(o.value, {
|
|
56
|
+
[`${o.value}-${$.value}${t.nextStatus ? `-${t.nextStatus}` : ""}`]: $.value
|
|
57
|
+
}, c.class),
|
|
58
|
+
style: c.style
|
|
59
|
+
}), [l("div", {
|
|
60
|
+
class: i(`${o.value}-header`, r.value.itemHeader),
|
|
61
|
+
style: f.value.itemHeader,
|
|
62
|
+
onClick: O
|
|
63
|
+
}, [l(B, {
|
|
64
|
+
icon: L.value,
|
|
65
|
+
class: `${o.value}-icon`
|
|
66
|
+
}, null), l("div", {
|
|
67
|
+
class: i(`${o.value}-header-box`, {
|
|
68
|
+
[`${o.value}-collapsible`]: v.value && s.value
|
|
48
69
|
})
|
|
49
|
-
}, [
|
|
70
|
+
}, [l(P.Text, {
|
|
50
71
|
strong: !0,
|
|
51
|
-
|
|
52
|
-
tooltip: {
|
|
53
|
-
placement: v.value === "rtl" ? "topRight" : "topLeft",
|
|
54
|
-
title: C.value
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
class: `${l.value}-title`
|
|
72
|
+
class: `${o.value}-title`
|
|
58
73
|
}, {
|
|
59
|
-
default: () => [
|
|
60
|
-
class: `${
|
|
61
|
-
rotate:
|
|
62
|
-
}, null) :
|
|
63
|
-
class: `${
|
|
64
|
-
rotate:
|
|
65
|
-
}, null)),
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
placement: v.value === "rtl" ? "topRight" : "topLeft",
|
|
71
|
-
title: m.value
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
+
default: () => [v.value && s.value && (g.value === "rtl" ? l(E, {
|
|
75
|
+
class: `${o.value}-collapse-icon`,
|
|
76
|
+
rotate: m.value ? -90 : 0
|
|
77
|
+
}, null) : l(G, {
|
|
78
|
+
class: `${o.value}-collapse-icon`,
|
|
79
|
+
rotate: m.value ? 90 : 0
|
|
80
|
+
}, null)), k.value ? d.value : l(S, p.value.titleConfig, {
|
|
81
|
+
default: () => [d.value]
|
|
82
|
+
})]
|
|
83
|
+
}), u.value && l(P.Text, {
|
|
84
|
+
class: `${o.value}-desc`,
|
|
74
85
|
type: "secondary"
|
|
75
86
|
}, {
|
|
76
|
-
default: () => [
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
80
|
-
|
|
87
|
+
default: () => [k.value ? u.value : l(S, p.value.descriptionConfig, {
|
|
88
|
+
default: () => [u.value]
|
|
89
|
+
})]
|
|
90
|
+
})]), x.value && l("div", {
|
|
91
|
+
class: `${o.value}-extra`
|
|
92
|
+
}, [x.value])]), l(J, {
|
|
93
|
+
prefixCls: C.value
|
|
81
94
|
}, {
|
|
82
|
-
default: () => [
|
|
83
|
-
class:
|
|
84
|
-
}, [
|
|
85
|
-
class:
|
|
86
|
-
style:
|
|
87
|
-
}, [
|
|
88
|
-
}), y.value &&
|
|
89
|
-
class:
|
|
90
|
-
style:
|
|
95
|
+
default: () => [s.value && V(l("div", {
|
|
96
|
+
class: i(`${o.value}-content`)
|
|
97
|
+
}, [l("div", {
|
|
98
|
+
class: i(`${o.value}-content-box`, r.value.itemContent),
|
|
99
|
+
style: f.value.itemContent
|
|
100
|
+
}, [s.value])]), [[j, w.value]])]
|
|
101
|
+
}), y.value && l("div", {
|
|
102
|
+
class: i(`${o.value}-footer`, r.value.itemFooter),
|
|
103
|
+
style: f.value.itemFooter
|
|
91
104
|
}, [y.value])]);
|
|
92
105
|
}
|
|
93
106
|
});
|
|
94
107
|
export {
|
|
95
|
-
|
|
108
|
+
te as default
|
|
96
109
|
};
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import "../../_util/cssinjs/StyleContext.mjs";
|
|
2
2
|
import "vue";
|
|
3
|
-
import { unit as
|
|
3
|
+
import { unit as d } from "../../_util/cssinjs/util.mjs";
|
|
4
4
|
import "../../_util/cssinjs/theme/ThemeCache.mjs";
|
|
5
5
|
import "../../_util/warning.mjs";
|
|
6
6
|
import "../../_util/cssinjs/transformers/legacyLogicalProperties.mjs";
|
|
7
7
|
import { merge as h } from "../../_util/cssinjs-utils/util/statistic.mjs";
|
|
8
8
|
import { genStyleHooks as g } from "../../theme/genStyleUtils.mjs";
|
|
9
9
|
import "../../transition-collapse/index.mjs";
|
|
10
|
-
import { THOUGHT_CHAIN_ITEM_STATUS as
|
|
10
|
+
import { THOUGHT_CHAIN_ITEM_STATUS as m } from "../interface.mjs";
|
|
11
11
|
import { genTransitionCollapseStyle as u } from "../../transition-collapse/style/index.mjs";
|
|
12
12
|
const f = (e) => {
|
|
13
13
|
const { componentCls: t } = e, i = `${t}-item`, o = {
|
|
14
|
-
[
|
|
15
|
-
[
|
|
16
|
-
[
|
|
14
|
+
[m.PENDING]: e.colorPrimaryText,
|
|
15
|
+
[m.SUCCESS]: e.colorSuccessText,
|
|
16
|
+
[m.ERROR]: e.colorErrorText
|
|
17
17
|
}, l = Object.keys(o);
|
|
18
18
|
return l.reduce((c, r) => {
|
|
19
19
|
const s = o[r];
|
|
20
|
-
return l.forEach((
|
|
21
|
-
const
|
|
20
|
+
return l.forEach((a) => {
|
|
21
|
+
const S = `& ${i}-${r}-${a}`, p = r === a ? {} : {
|
|
22
22
|
backgroundColor: "none !important",
|
|
23
|
-
backgroundImage: `linear-gradient(${s}, ${o[
|
|
23
|
+
backgroundImage: `linear-gradient(${s}, ${o[a]})`
|
|
24
24
|
};
|
|
25
|
-
c[
|
|
25
|
+
c[S] = {
|
|
26
26
|
[`& ${i}-icon, & > *::before`]: {
|
|
27
27
|
backgroundColor: `${s} !important`
|
|
28
28
|
},
|
|
@@ -112,15 +112,21 @@ const f = (e) => {
|
|
|
112
112
|
overflow: "hidden",
|
|
113
113
|
[`& ${i}-title`]: {
|
|
114
114
|
height: e.itemSize,
|
|
115
|
-
lineHeight: `${
|
|
115
|
+
lineHeight: `${d(e.itemSize)}`,
|
|
116
116
|
maxHeight: e.itemSize,
|
|
117
117
|
fontSize: e.itemFontSize,
|
|
118
|
+
overflow: "hidden",
|
|
119
|
+
textOverflow: "ellipsis",
|
|
120
|
+
whiteSpace: "nowrap",
|
|
118
121
|
[`& ${i}-collapse-icon`]: {
|
|
119
122
|
marginInlineEnd: e.marginXS
|
|
120
123
|
}
|
|
121
124
|
},
|
|
122
125
|
[`& ${i}-desc`]: {
|
|
123
|
-
fontSize: e.itemFontSize
|
|
126
|
+
fontSize: e.itemFontSize,
|
|
127
|
+
overflow: "hidden",
|
|
128
|
+
textOverflow: "ellipsis",
|
|
129
|
+
whiteSpace: "nowrap"
|
|
124
130
|
}
|
|
125
131
|
}
|
|
126
132
|
},
|
|
@@ -134,7 +140,7 @@ const f = (e) => {
|
|
|
134
140
|
maxWidth: `calc(100% - ${e.itemSize})`,
|
|
135
141
|
borderRadius: e.borderRadiusLG,
|
|
136
142
|
backgroundColor: e.colorBgContainer,
|
|
137
|
-
border: `${
|
|
143
|
+
border: `${d(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`
|
|
138
144
|
}
|
|
139
145
|
},
|
|
140
146
|
[`& ${i}-footer`]: {
|
|
@@ -190,7 +196,7 @@ const f = (e) => {
|
|
|
190
196
|
}
|
|
191
197
|
}
|
|
192
198
|
};
|
|
193
|
-
},
|
|
199
|
+
}, L = g("ThoughtChain", (e) => {
|
|
194
200
|
const t = h(e, {
|
|
195
201
|
// small size tokens
|
|
196
202
|
itemFontSizeSM: e.fontSizeSM,
|
|
@@ -211,5 +217,5 @@ const f = (e) => {
|
|
|
211
217
|
];
|
|
212
218
|
});
|
|
213
219
|
export {
|
|
214
|
-
|
|
220
|
+
L as default
|
|
215
221
|
};
|