gasp-components 1.0.10 → 1.0.12
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/UploadOutlined-9WKjHsqa.js +878 -0
- package/dist/components/ag-grid-table/index.js +57877 -38314
- package/dist/components/button/index.js +18 -18
- package/dist/components/checklist/checklist-item.js +3 -3
- package/dist/components/checklist/index.js +5 -5
- package/dist/components/date-picker/index.js +9 -5022
- package/dist/components/dragger/index.js +28 -28
- package/dist/components/dropdown/index.js +10 -11
- package/dist/components/form/index.js +8 -9
- package/dist/components/form-item/index.js +10 -10
- package/dist/components/input/index.js +8 -8
- package/dist/components/modal/index.js +18 -20
- package/dist/components/password-input/index.js +2 -2
- package/dist/components/progress/index.js +16 -18
- package/dist/components/progress-circle/index.js +3 -3
- package/dist/components/radio-button/index.js +8 -8
- package/dist/components/result-popup/index.js +13 -14
- package/dist/components/select/index.js +1 -1
- package/dist/components/side-menu/index.js +2 -2
- package/dist/components/side-menu/menu-item.js +4 -6
- package/dist/components/steps/index.js +9 -9
- package/dist/components/table/index.js +16 -9298
- package/dist/components/tabs/index.js +10 -10
- package/dist/components/tabs/tab.js +7 -8
- package/dist/components/tag/index.js +9 -258
- package/dist/components/timeline-horizontal/index.js +7 -7
- package/dist/components/upload/index.js +62 -77
- package/dist/index-WlPrqxgY.js +87 -0
- package/dist/main.js +69 -457
- package/package.json +1 -1
- package/dist/CheckCircleFilled-xt-0R96Z.js +0 -16
- package/dist/CheckOutlined-EgxCAgj_.js +0 -16
- package/dist/CloseCircleFilled-bIgIULWb.js +0 -16
- package/dist/CloseOutlined-Q3kC3EZS.js +0 -16
- package/dist/Compact-fdEKV_mF.js +0 -180
- package/dist/ExclamationCircleFilled-XzDBEGmA.js +0 -16
- package/dist/KeyCode-qFRXB1-n.js +0 -517
- package/dist/LoadingOutlined-6Ipqn0og.js +0 -16
- package/dist/Overflow-JFdXKgCr.js +0 -231
- package/dist/PurePanel-hLGnXbul.js +0 -60
- package/dist/SearchOutlined-rJTFGXUi.js +0 -16
- package/dist/TextArea-n3dknzTq.js +0 -716
- package/dist/UploadOutlined-D8jfLEgv.js +0 -27
- package/dist/asyncToGenerator-t4sKr8R4.js +0 -340
- package/dist/button-LN5ZDad8.js +0 -819
- package/dist/collapse-ilv4Tji1.js +0 -20
- package/dist/colors-opGg9oSz.js +0 -25
- package/dist/compact-item-jjuVmDBH.js +0 -61
- package/dist/context-h3WSVDPz.js +0 -2087
- package/dist/createFormattedComponent-FcpICAm8.js +0 -3260
- package/dist/index--6VfGMUo.js +0 -402
- package/dist/index-0mpuHoS5.js +0 -996
- package/dist/index-1KQbTQJ2.js +0 -4405
- package/dist/index-5Uo03BMk.js +0 -681
- package/dist/index-BFgxz47K.js +0 -89
- package/dist/index-D3LMPWyJ.js +0 -1437
- package/dist/index-DVS_nWxv.js +0 -3026
- package/dist/index-ELHBhuK9.js +0 -100
- package/dist/index-Fn8q8B3V.js +0 -107
- package/dist/index-GgkQrebz.js +0 -950
- package/dist/index-L-MzVDcK.js +0 -616
- package/dist/index-M3WnMjiA.js +0 -230
- package/dist/index-NQd_zMf0.js +0 -69
- package/dist/index-ZT64Ec6u.js +0 -267
- package/dist/index-aawDqn9q.js +0 -3337
- package/dist/index-k04G4nlS.js +0 -1416
- package/dist/index-s3u4YBl4.js +0 -8
- package/dist/index-vtDVJV8q.js +0 -19571
- package/dist/isVisible-Qi9l15Ty.js +0 -232
- package/dist/motion-0ToOu81j.js +0 -226
- package/dist/motion-NQme0FJ_.js +0 -32
- package/dist/omit-ylWA0ZLZ.js +0 -10
- package/dist/pickAttrs-zaQzRTqh.js +0 -42
- package/dist/progress-a1_pwKVT.js +0 -722
- package/dist/reactNode-R20zZQk1.js +0 -18
- package/dist/responsiveObserver-V1_1G14X.js +0 -71
- package/dist/roundedArrow-p1Pmd9av.js +0 -64
- package/dist/row-sPFiFm0C.js +0 -230
- package/dist/slide-mFXPRHku.js +0 -265
- package/dist/styleChecker-pZ3k2IiY.js +0 -37
- package/dist/useCSSVarCls-GwZT_WiF.js +0 -9
- package/dist/useClosable-4G12n4Bp.js +0 -15
- package/dist/useLocale-eThlLZJw.js +0 -16
- package/dist/useMergedState-qUafLuUa.js +0 -23
- package/dist/useVariants-s0IcneBD.js +0 -25
- package/dist/zoom-Ps8y0jNW.js +0 -174
package/dist/index-0mpuHoS5.js
DELETED
|
@@ -1,996 +0,0 @@
|
|
|
1
|
-
import * as r from "react";
|
|
2
|
-
import { e as ue, ab as pt, d as ut, h as ft, C as $e, G as je, D as re, z as te } from "./index-1KQbTQJ2.js";
|
|
3
|
-
import { C as mt } from "./CheckOutlined-EgxCAgj_.js";
|
|
4
|
-
import { A as fe } from "./isVisible-Qi9l15Ty.js";
|
|
5
|
-
import { g as gt, c as ne } from "./index-NQd_zMf0.js";
|
|
6
|
-
import { R as yt } from "./index--6VfGMUo.js";
|
|
7
|
-
import { t as Re } from "./Compact-fdEKV_mF.js";
|
|
8
|
-
import { u as bt } from "./useMergedState-qUafLuUa.js";
|
|
9
|
-
import { o as _e } from "./omit-ylWA0ZLZ.js";
|
|
10
|
-
import { o as De, i as xe } from "./styleChecker-pZ3k2IiY.js";
|
|
11
|
-
import { K as oe } from "./KeyCode-qFRXB1-n.js";
|
|
12
|
-
import { u as vt } from "./useLocale-eThlLZJw.js";
|
|
13
|
-
import { T as pe } from "./index-5Uo03BMk.js";
|
|
14
|
-
import { c as Et } from "./reactNode-R20zZQk1.js";
|
|
15
|
-
import { T as ht } from "./TextArea-n3dknzTq.js";
|
|
16
|
-
var Ot = function(e, t) {
|
|
17
|
-
var o = {};
|
|
18
|
-
for (var n in e)
|
|
19
|
-
Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
|
|
20
|
-
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
21
|
-
for (var i = 0, n = Object.getOwnPropertySymbols(e); i < n.length; i++)
|
|
22
|
-
t.indexOf(n[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[i]) && (o[n[i]] = e[n[i]]);
|
|
23
|
-
return o;
|
|
24
|
-
};
|
|
25
|
-
const xt = {
|
|
26
|
-
border: 0,
|
|
27
|
-
background: "transparent",
|
|
28
|
-
padding: 0,
|
|
29
|
-
lineHeight: "inherit",
|
|
30
|
-
display: "inline-block"
|
|
31
|
-
}, St = /* @__PURE__ */ r.forwardRef((e, t) => {
|
|
32
|
-
const o = (m) => {
|
|
33
|
-
const {
|
|
34
|
-
keyCode: s
|
|
35
|
-
} = m;
|
|
36
|
-
s === oe.ENTER && m.preventDefault();
|
|
37
|
-
}, n = (m) => {
|
|
38
|
-
const {
|
|
39
|
-
keyCode: s
|
|
40
|
-
} = m, {
|
|
41
|
-
onClick: b
|
|
42
|
-
} = e;
|
|
43
|
-
s === oe.ENTER && b && b();
|
|
44
|
-
}, {
|
|
45
|
-
style: i,
|
|
46
|
-
noStyle: c,
|
|
47
|
-
disabled: f
|
|
48
|
-
} = e, d = Ot(e, ["style", "noStyle", "disabled"]);
|
|
49
|
-
let p = {};
|
|
50
|
-
return c || (p = Object.assign({}, xt)), f && (p.pointerEvents = "none"), p = Object.assign(Object.assign({}, p), i), /* @__PURE__ */ r.createElement("div", Object.assign({
|
|
51
|
-
role: "button",
|
|
52
|
-
tabIndex: 0,
|
|
53
|
-
ref: t
|
|
54
|
-
}, d, {
|
|
55
|
-
onKeyDown: o,
|
|
56
|
-
onKeyUp: n,
|
|
57
|
-
style: p
|
|
58
|
-
}));
|
|
59
|
-
}), Se = St;
|
|
60
|
-
var Ct = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z" } }] }, name: "copy", theme: "outlined" };
|
|
61
|
-
const wt = Ct;
|
|
62
|
-
var Ie = function(t, o) {
|
|
63
|
-
return /* @__PURE__ */ r.createElement(fe, ue({}, t, {
|
|
64
|
-
ref: o,
|
|
65
|
-
icon: wt
|
|
66
|
-
}));
|
|
67
|
-
};
|
|
68
|
-
process.env.NODE_ENV !== "production" && (Ie.displayName = "CopyOutlined");
|
|
69
|
-
const Tt = /* @__PURE__ */ r.forwardRef(Ie);
|
|
70
|
-
var Nt = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z" } }] }, name: "edit", theme: "outlined" };
|
|
71
|
-
const $t = Nt;
|
|
72
|
-
var Le = function(t, o) {
|
|
73
|
-
return /* @__PURE__ */ r.createElement(fe, ue({}, t, {
|
|
74
|
-
ref: o,
|
|
75
|
-
icon: $t
|
|
76
|
-
}));
|
|
77
|
-
};
|
|
78
|
-
process.env.NODE_ENV !== "production" && (Le.displayName = "EditOutlined");
|
|
79
|
-
const jt = /* @__PURE__ */ r.forwardRef(Le);
|
|
80
|
-
var Rt = function() {
|
|
81
|
-
var e = document.getSelection();
|
|
82
|
-
if (!e.rangeCount)
|
|
83
|
-
return function() {
|
|
84
|
-
};
|
|
85
|
-
for (var t = document.activeElement, o = [], n = 0; n < e.rangeCount; n++)
|
|
86
|
-
o.push(e.getRangeAt(n));
|
|
87
|
-
switch (t.tagName.toUpperCase()) {
|
|
88
|
-
case "INPUT":
|
|
89
|
-
case "TEXTAREA":
|
|
90
|
-
t.blur();
|
|
91
|
-
break;
|
|
92
|
-
default:
|
|
93
|
-
t = null;
|
|
94
|
-
break;
|
|
95
|
-
}
|
|
96
|
-
return e.removeAllRanges(), function() {
|
|
97
|
-
e.type === "Caret" && e.removeAllRanges(), e.rangeCount || o.forEach(function(i) {
|
|
98
|
-
e.addRange(i);
|
|
99
|
-
}), t && t.focus();
|
|
100
|
-
};
|
|
101
|
-
}, _t = Rt, Ce = {
|
|
102
|
-
"text/plain": "Text",
|
|
103
|
-
"text/html": "Url",
|
|
104
|
-
default: "Text"
|
|
105
|
-
}, Dt = "Copy to clipboard: #{key}, Enter";
|
|
106
|
-
function It(e) {
|
|
107
|
-
var t = (/mac os x/i.test(navigator.userAgent) ? "⌘" : "Ctrl") + "+C";
|
|
108
|
-
return e.replace(/#{\s*key\s*}/g, t);
|
|
109
|
-
}
|
|
110
|
-
function Lt(e, t) {
|
|
111
|
-
var o, n, i, c, f, d, p = !1;
|
|
112
|
-
t || (t = {}), o = t.debug || !1;
|
|
113
|
-
try {
|
|
114
|
-
i = _t(), c = document.createRange(), f = document.getSelection(), d = document.createElement("span"), d.textContent = e, d.ariaHidden = "true", d.style.all = "unset", d.style.position = "fixed", d.style.top = 0, d.style.clip = "rect(0, 0, 0, 0)", d.style.whiteSpace = "pre", d.style.webkitUserSelect = "text", d.style.MozUserSelect = "text", d.style.msUserSelect = "text", d.style.userSelect = "text", d.addEventListener("copy", function(s) {
|
|
115
|
-
if (s.stopPropagation(), t.format)
|
|
116
|
-
if (s.preventDefault(), typeof s.clipboardData > "u") {
|
|
117
|
-
o && console.warn("unable to use e.clipboardData"), o && console.warn("trying IE specific stuff"), window.clipboardData.clearData();
|
|
118
|
-
var b = Ce[t.format] || Ce.default;
|
|
119
|
-
window.clipboardData.setData(b, e);
|
|
120
|
-
} else
|
|
121
|
-
s.clipboardData.clearData(), s.clipboardData.setData(t.format, e);
|
|
122
|
-
t.onCopy && (s.preventDefault(), t.onCopy(s.clipboardData));
|
|
123
|
-
}), document.body.appendChild(d), c.selectNodeContents(d), f.addRange(c);
|
|
124
|
-
var m = document.execCommand("copy");
|
|
125
|
-
if (!m)
|
|
126
|
-
throw new Error("copy command was unsuccessful");
|
|
127
|
-
p = !0;
|
|
128
|
-
} catch (s) {
|
|
129
|
-
o && console.error("unable to copy using execCommand: ", s), o && console.warn("trying IE specific stuff");
|
|
130
|
-
try {
|
|
131
|
-
window.clipboardData.setData(t.format || "text", e), t.onCopy && t.onCopy(window.clipboardData), p = !0;
|
|
132
|
-
} catch (b) {
|
|
133
|
-
o && console.error("unable to copy using clipboardData: ", b), o && console.error("falling back to prompt"), n = It("message" in t ? t.message : Dt), window.prompt(n, e);
|
|
134
|
-
}
|
|
135
|
-
} finally {
|
|
136
|
-
f && (typeof f.removeRange == "function" ? f.removeRange(c) : f.removeAllRanges()), d && document.body.removeChild(d), i();
|
|
137
|
-
}
|
|
138
|
-
return p;
|
|
139
|
-
}
|
|
140
|
-
var Pt = Lt;
|
|
141
|
-
const kt = /* @__PURE__ */ gt(Pt);
|
|
142
|
-
var zt = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z" } }] }, name: "enter", theme: "outlined" };
|
|
143
|
-
const Mt = zt;
|
|
144
|
-
var Pe = function(t, o) {
|
|
145
|
-
return /* @__PURE__ */ r.createElement(fe, ue({}, t, {
|
|
146
|
-
ref: o,
|
|
147
|
-
icon: Mt
|
|
148
|
-
}));
|
|
149
|
-
};
|
|
150
|
-
process.env.NODE_ENV !== "production" && (Pe.displayName = "EnterOutlined");
|
|
151
|
-
const Ht = /* @__PURE__ */ r.forwardRef(Pe), Bt = (e, t, o, n) => {
|
|
152
|
-
const {
|
|
153
|
-
titleMarginBottom: i,
|
|
154
|
-
fontWeightStrong: c
|
|
155
|
-
} = n;
|
|
156
|
-
return {
|
|
157
|
-
marginBottom: i,
|
|
158
|
-
color: o,
|
|
159
|
-
fontWeight: c,
|
|
160
|
-
fontSize: e,
|
|
161
|
-
lineHeight: t
|
|
162
|
-
};
|
|
163
|
-
}, Vt = (e) => {
|
|
164
|
-
const t = [1, 2, 3, 4, 5], o = {};
|
|
165
|
-
return t.forEach((n) => {
|
|
166
|
-
o[`
|
|
167
|
-
h${n}&,
|
|
168
|
-
div&-h${n},
|
|
169
|
-
div&-h${n} > textarea,
|
|
170
|
-
h${n}
|
|
171
|
-
`] = Bt(e[`fontSizeHeading${n}`], e[`lineHeightHeading${n}`], e.colorTextHeading, e);
|
|
172
|
-
}), o;
|
|
173
|
-
}, At = (e) => {
|
|
174
|
-
const {
|
|
175
|
-
componentCls: t
|
|
176
|
-
} = e;
|
|
177
|
-
return {
|
|
178
|
-
"a&, a": Object.assign(Object.assign({}, De(e)), {
|
|
179
|
-
textDecoration: e.linkDecoration,
|
|
180
|
-
"&:active, &:hover": {
|
|
181
|
-
textDecoration: e.linkHoverDecoration
|
|
182
|
-
},
|
|
183
|
-
[`&[disabled], &${t}-disabled`]: {
|
|
184
|
-
color: e.colorTextDisabled,
|
|
185
|
-
cursor: "not-allowed",
|
|
186
|
-
"&:active, &:hover": {
|
|
187
|
-
color: e.colorTextDisabled
|
|
188
|
-
},
|
|
189
|
-
"&:active": {
|
|
190
|
-
pointerEvents: "none"
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
})
|
|
194
|
-
};
|
|
195
|
-
}, Wt = (e) => ({
|
|
196
|
-
code: {
|
|
197
|
-
margin: "0 0.2em",
|
|
198
|
-
paddingInline: "0.4em",
|
|
199
|
-
paddingBlock: "0.2em 0.1em",
|
|
200
|
-
fontSize: "85%",
|
|
201
|
-
fontFamily: e.fontFamilyCode,
|
|
202
|
-
background: "rgba(150, 150, 150, 0.1)",
|
|
203
|
-
border: "1px solid rgba(100, 100, 100, 0.2)",
|
|
204
|
-
borderRadius: 3
|
|
205
|
-
},
|
|
206
|
-
kbd: {
|
|
207
|
-
margin: "0 0.2em",
|
|
208
|
-
paddingInline: "0.4em",
|
|
209
|
-
paddingBlock: "0.15em 0.1em",
|
|
210
|
-
fontSize: "90%",
|
|
211
|
-
fontFamily: e.fontFamilyCode,
|
|
212
|
-
background: "rgba(150, 150, 150, 0.06)",
|
|
213
|
-
border: "1px solid rgba(100, 100, 100, 0.2)",
|
|
214
|
-
borderBottomWidth: 2,
|
|
215
|
-
borderRadius: 3
|
|
216
|
-
},
|
|
217
|
-
mark: {
|
|
218
|
-
padding: 0,
|
|
219
|
-
// FIXME hardcode in v4
|
|
220
|
-
backgroundColor: pt[2]
|
|
221
|
-
},
|
|
222
|
-
"u, ins": {
|
|
223
|
-
textDecoration: "underline",
|
|
224
|
-
textDecorationSkipInk: "auto"
|
|
225
|
-
},
|
|
226
|
-
"s, del": {
|
|
227
|
-
textDecoration: "line-through"
|
|
228
|
-
},
|
|
229
|
-
strong: {
|
|
230
|
-
fontWeight: 600
|
|
231
|
-
},
|
|
232
|
-
// list
|
|
233
|
-
"ul, ol": {
|
|
234
|
-
marginInline: 0,
|
|
235
|
-
marginBlock: "0 1em",
|
|
236
|
-
padding: 0,
|
|
237
|
-
li: {
|
|
238
|
-
marginInline: "20px 0",
|
|
239
|
-
marginBlock: 0,
|
|
240
|
-
paddingInline: "4px 0",
|
|
241
|
-
paddingBlock: 0
|
|
242
|
-
}
|
|
243
|
-
},
|
|
244
|
-
ul: {
|
|
245
|
-
listStyleType: "circle",
|
|
246
|
-
ul: {
|
|
247
|
-
listStyleType: "disc"
|
|
248
|
-
}
|
|
249
|
-
},
|
|
250
|
-
ol: {
|
|
251
|
-
listStyleType: "decimal"
|
|
252
|
-
},
|
|
253
|
-
// pre & block
|
|
254
|
-
"pre, blockquote": {
|
|
255
|
-
margin: "1em 0"
|
|
256
|
-
},
|
|
257
|
-
pre: {
|
|
258
|
-
padding: "0.4em 0.6em",
|
|
259
|
-
whiteSpace: "pre-wrap",
|
|
260
|
-
wordWrap: "break-word",
|
|
261
|
-
background: "rgba(150, 150, 150, 0.1)",
|
|
262
|
-
border: "1px solid rgba(100, 100, 100, 0.2)",
|
|
263
|
-
borderRadius: 3,
|
|
264
|
-
fontFamily: e.fontFamilyCode,
|
|
265
|
-
// Compatible for marked
|
|
266
|
-
code: {
|
|
267
|
-
display: "inline",
|
|
268
|
-
margin: 0,
|
|
269
|
-
padding: 0,
|
|
270
|
-
fontSize: "inherit",
|
|
271
|
-
fontFamily: "inherit",
|
|
272
|
-
background: "transparent",
|
|
273
|
-
border: 0
|
|
274
|
-
}
|
|
275
|
-
},
|
|
276
|
-
blockquote: {
|
|
277
|
-
paddingInline: "0.6em 0",
|
|
278
|
-
paddingBlock: 0,
|
|
279
|
-
borderInlineStart: "4px solid rgba(100, 100, 100, 0.2)",
|
|
280
|
-
opacity: 0.85
|
|
281
|
-
}
|
|
282
|
-
}), Kt = (e) => {
|
|
283
|
-
const {
|
|
284
|
-
componentCls: t,
|
|
285
|
-
paddingSM: o
|
|
286
|
-
} = e, n = o;
|
|
287
|
-
return {
|
|
288
|
-
"&-edit-content": {
|
|
289
|
-
position: "relative",
|
|
290
|
-
"div&": {
|
|
291
|
-
insetInlineStart: e.calc(e.paddingSM).mul(-1).equal(),
|
|
292
|
-
marginTop: e.calc(n).mul(-1).equal(),
|
|
293
|
-
marginBottom: `calc(1em - ${ut(n)})`
|
|
294
|
-
},
|
|
295
|
-
[`${t}-edit-content-confirm`]: {
|
|
296
|
-
position: "absolute",
|
|
297
|
-
insetInlineEnd: e.calc(e.marginXS).add(2).equal(),
|
|
298
|
-
insetBlockEnd: e.marginXS,
|
|
299
|
-
color: e.colorTextDescription,
|
|
300
|
-
// default style
|
|
301
|
-
fontWeight: "normal",
|
|
302
|
-
fontSize: e.fontSize,
|
|
303
|
-
fontStyle: "normal",
|
|
304
|
-
pointerEvents: "none"
|
|
305
|
-
},
|
|
306
|
-
textarea: {
|
|
307
|
-
margin: "0!important",
|
|
308
|
-
// Fix Editable Textarea flash in Firefox
|
|
309
|
-
MozTransition: "none",
|
|
310
|
-
height: "1em"
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
};
|
|
314
|
-
}, Ft = (e) => ({
|
|
315
|
-
[`${e.componentCls}-copy-success`]: {
|
|
316
|
-
"\n &,\n &:hover,\n &:focus": {
|
|
317
|
-
color: e.colorSuccess
|
|
318
|
-
}
|
|
319
|
-
},
|
|
320
|
-
[`${e.componentCls}-copy-icon-only`]: {
|
|
321
|
-
marginInlineStart: 0
|
|
322
|
-
}
|
|
323
|
-
}), Ut = () => ({
|
|
324
|
-
"\n a&-ellipsis,\n span&-ellipsis\n ": {
|
|
325
|
-
display: "inline-block",
|
|
326
|
-
maxWidth: "100%"
|
|
327
|
-
},
|
|
328
|
-
"&-single-line": {
|
|
329
|
-
whiteSpace: "nowrap"
|
|
330
|
-
},
|
|
331
|
-
"&-ellipsis-single-line": {
|
|
332
|
-
overflow: "hidden",
|
|
333
|
-
textOverflow: "ellipsis",
|
|
334
|
-
// https://blog.csdn.net/iefreer/article/details/50421025
|
|
335
|
-
"a&, span&": {
|
|
336
|
-
verticalAlign: "bottom"
|
|
337
|
-
},
|
|
338
|
-
"> code": {
|
|
339
|
-
paddingBlock: 0,
|
|
340
|
-
maxWidth: "calc(100% - 1.2em)",
|
|
341
|
-
display: "inline-block",
|
|
342
|
-
overflow: "hidden",
|
|
343
|
-
textOverflow: "ellipsis",
|
|
344
|
-
verticalAlign: "bottom",
|
|
345
|
-
// https://github.com/ant-design/ant-design/issues/45953
|
|
346
|
-
boxSizing: "content-box"
|
|
347
|
-
}
|
|
348
|
-
},
|
|
349
|
-
"&-ellipsis-multiple-line": {
|
|
350
|
-
display: "-webkit-box",
|
|
351
|
-
overflow: "hidden",
|
|
352
|
-
WebkitLineClamp: 3,
|
|
353
|
-
WebkitBoxOrient: "vertical"
|
|
354
|
-
}
|
|
355
|
-
}), qt = (e) => {
|
|
356
|
-
const {
|
|
357
|
-
componentCls: t,
|
|
358
|
-
titleMarginTop: o
|
|
359
|
-
} = e;
|
|
360
|
-
return {
|
|
361
|
-
[t]: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({
|
|
362
|
-
color: e.colorText,
|
|
363
|
-
wordBreak: "break-word",
|
|
364
|
-
lineHeight: e.lineHeight,
|
|
365
|
-
[`&${t}-secondary`]: {
|
|
366
|
-
color: e.colorTextDescription
|
|
367
|
-
},
|
|
368
|
-
[`&${t}-success`]: {
|
|
369
|
-
color: e.colorSuccess
|
|
370
|
-
},
|
|
371
|
-
[`&${t}-warning`]: {
|
|
372
|
-
color: e.colorWarning
|
|
373
|
-
},
|
|
374
|
-
[`&${t}-danger`]: {
|
|
375
|
-
color: e.colorError,
|
|
376
|
-
"a&:active, a&:focus": {
|
|
377
|
-
color: e.colorErrorActive
|
|
378
|
-
},
|
|
379
|
-
"a&:hover": {
|
|
380
|
-
color: e.colorErrorHover
|
|
381
|
-
}
|
|
382
|
-
},
|
|
383
|
-
[`&${t}-disabled`]: {
|
|
384
|
-
color: e.colorTextDisabled,
|
|
385
|
-
cursor: "not-allowed",
|
|
386
|
-
userSelect: "none"
|
|
387
|
-
},
|
|
388
|
-
"\n div&,\n p\n ": {
|
|
389
|
-
marginBottom: "1em"
|
|
390
|
-
}
|
|
391
|
-
}, Vt(e)), {
|
|
392
|
-
[`
|
|
393
|
-
& + h1${t},
|
|
394
|
-
& + h2${t},
|
|
395
|
-
& + h3${t},
|
|
396
|
-
& + h4${t},
|
|
397
|
-
& + h5${t}
|
|
398
|
-
`]: {
|
|
399
|
-
marginTop: o
|
|
400
|
-
},
|
|
401
|
-
"\n div,\n ul,\n li,\n p,\n h1,\n h2,\n h3,\n h4,\n h5": {
|
|
402
|
-
"\n + h1,\n + h2,\n + h3,\n + h4,\n + h5\n ": {
|
|
403
|
-
marginTop: o
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
}), Wt(e)), At(e)), {
|
|
407
|
-
// Operation
|
|
408
|
-
[`
|
|
409
|
-
${t}-expand,
|
|
410
|
-
${t}-edit,
|
|
411
|
-
${t}-copy
|
|
412
|
-
`]: Object.assign(Object.assign({}, De(e)), {
|
|
413
|
-
marginInlineStart: e.marginXXS
|
|
414
|
-
})
|
|
415
|
-
}), Kt(e)), Ft(e)), Ut()), {
|
|
416
|
-
"&-rtl": {
|
|
417
|
-
direction: "rtl"
|
|
418
|
-
}
|
|
419
|
-
})
|
|
420
|
-
};
|
|
421
|
-
}, Xt = () => ({
|
|
422
|
-
titleMarginTop: "1.2em",
|
|
423
|
-
titleMarginBottom: "0.5em"
|
|
424
|
-
}), ke = ft("Typography", (e) => [qt(e)], Xt), Jt = (e) => {
|
|
425
|
-
const {
|
|
426
|
-
prefixCls: t,
|
|
427
|
-
"aria-label": o,
|
|
428
|
-
className: n,
|
|
429
|
-
style: i,
|
|
430
|
-
direction: c,
|
|
431
|
-
maxLength: f,
|
|
432
|
-
autoSize: d = !0,
|
|
433
|
-
value: p,
|
|
434
|
-
onSave: m,
|
|
435
|
-
onCancel: s,
|
|
436
|
-
onEnd: b,
|
|
437
|
-
component: j,
|
|
438
|
-
enterIcon: N = /* @__PURE__ */ r.createElement(Ht, null)
|
|
439
|
-
} = e, y = r.useRef(null), v = r.useRef(!1), $ = r.useRef(), [M, L] = r.useState(p);
|
|
440
|
-
r.useEffect(() => {
|
|
441
|
-
L(p);
|
|
442
|
-
}, [p]), r.useEffect(() => {
|
|
443
|
-
if (y.current && y.current.resizableTextArea) {
|
|
444
|
-
const {
|
|
445
|
-
textArea: S
|
|
446
|
-
} = y.current.resizableTextArea;
|
|
447
|
-
S.focus();
|
|
448
|
-
const {
|
|
449
|
-
length: T
|
|
450
|
-
} = S.value;
|
|
451
|
-
S.setSelectionRange(T, T);
|
|
452
|
-
}
|
|
453
|
-
}, []);
|
|
454
|
-
const u = (S) => {
|
|
455
|
-
let {
|
|
456
|
-
target: T
|
|
457
|
-
} = S;
|
|
458
|
-
L(T.value.replace(/[\n\r]/g, ""));
|
|
459
|
-
}, x = () => {
|
|
460
|
-
v.current = !0;
|
|
461
|
-
}, w = () => {
|
|
462
|
-
v.current = !1;
|
|
463
|
-
}, E = (S) => {
|
|
464
|
-
let {
|
|
465
|
-
keyCode: T
|
|
466
|
-
} = S;
|
|
467
|
-
v.current || ($.current = T);
|
|
468
|
-
}, W = () => {
|
|
469
|
-
m(M.trim());
|
|
470
|
-
}, k = (S) => {
|
|
471
|
-
let {
|
|
472
|
-
keyCode: T,
|
|
473
|
-
ctrlKey: U,
|
|
474
|
-
altKey: B,
|
|
475
|
-
metaKey: K,
|
|
476
|
-
shiftKey: X
|
|
477
|
-
} = S;
|
|
478
|
-
$.current === T && !v.current && !U && !B && !K && !X && (T === oe.ENTER ? (W(), b == null || b()) : T === oe.ESC && s());
|
|
479
|
-
}, g = () => {
|
|
480
|
-
W();
|
|
481
|
-
}, h = j ? `${t}-${j}` : "", [D, R, z] = ke(t), H = ne(t, `${t}-edit-content`, {
|
|
482
|
-
[`${t}-rtl`]: c === "rtl"
|
|
483
|
-
}, n, h, R, z);
|
|
484
|
-
return D(/* @__PURE__ */ r.createElement("div", {
|
|
485
|
-
className: H,
|
|
486
|
-
style: i
|
|
487
|
-
}, /* @__PURE__ */ r.createElement(ht, {
|
|
488
|
-
ref: y,
|
|
489
|
-
maxLength: f,
|
|
490
|
-
value: M,
|
|
491
|
-
onChange: u,
|
|
492
|
-
onKeyDown: E,
|
|
493
|
-
onKeyUp: k,
|
|
494
|
-
onCompositionStart: x,
|
|
495
|
-
onCompositionEnd: w,
|
|
496
|
-
onBlur: g,
|
|
497
|
-
"aria-label": o,
|
|
498
|
-
rows: 1,
|
|
499
|
-
autoSize: d
|
|
500
|
-
}), N !== null ? Et(N, {
|
|
501
|
-
className: `${t}-edit-content-confirm`
|
|
502
|
-
}) : null));
|
|
503
|
-
}, Gt = Jt;
|
|
504
|
-
function se(e, t) {
|
|
505
|
-
return r.useMemo(() => {
|
|
506
|
-
const o = !!e;
|
|
507
|
-
return [o, Object.assign(Object.assign({}, t), o && typeof e == "object" ? e : null)];
|
|
508
|
-
}, [e]);
|
|
509
|
-
}
|
|
510
|
-
const Qt = (e, t) => {
|
|
511
|
-
const o = r.useRef(!1);
|
|
512
|
-
r.useEffect(() => {
|
|
513
|
-
o.current ? e() : o.current = !0;
|
|
514
|
-
}, t);
|
|
515
|
-
};
|
|
516
|
-
var Yt = function(e, t) {
|
|
517
|
-
var o = {};
|
|
518
|
-
for (var n in e)
|
|
519
|
-
Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
|
|
520
|
-
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
521
|
-
for (var i = 0, n = Object.getOwnPropertySymbols(e); i < n.length; i++)
|
|
522
|
-
t.indexOf(n[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[i]) && (o[n[i]] = e[n[i]]);
|
|
523
|
-
return o;
|
|
524
|
-
};
|
|
525
|
-
const ze = /* @__PURE__ */ r.forwardRef((e, t) => {
|
|
526
|
-
const {
|
|
527
|
-
prefixCls: o,
|
|
528
|
-
component: n = "article",
|
|
529
|
-
className: i,
|
|
530
|
-
rootClassName: c,
|
|
531
|
-
setContentRef: f,
|
|
532
|
-
children: d,
|
|
533
|
-
direction: p,
|
|
534
|
-
style: m
|
|
535
|
-
} = e, s = Yt(e, ["prefixCls", "component", "className", "rootClassName", "setContentRef", "children", "direction", "style"]), {
|
|
536
|
-
getPrefixCls: b,
|
|
537
|
-
direction: j,
|
|
538
|
-
typography: N
|
|
539
|
-
} = r.useContext($e), y = p ?? j;
|
|
540
|
-
let v = t;
|
|
541
|
-
f && (v = je(t, f)), process.env.NODE_ENV !== "production" && re("Typography").deprecated(!f, "setContentRef", "ref");
|
|
542
|
-
const $ = b("typography", o), [M, L, u] = ke($), x = ne($, N == null ? void 0 : N.className, {
|
|
543
|
-
[`${$}-rtl`]: y === "rtl"
|
|
544
|
-
}, i, c, L, u), w = Object.assign(Object.assign({}, N == null ? void 0 : N.style), m);
|
|
545
|
-
return M(
|
|
546
|
-
// @ts-expect-error: Expression produces a union type that is too complex to represent.
|
|
547
|
-
/* @__PURE__ */ r.createElement(n, Object.assign({
|
|
548
|
-
className: x,
|
|
549
|
-
style: w,
|
|
550
|
-
ref: v
|
|
551
|
-
}, s), d)
|
|
552
|
-
);
|
|
553
|
-
});
|
|
554
|
-
process.env.NODE_ENV !== "production" && (ze.displayName = "Typography");
|
|
555
|
-
const Me = ze;
|
|
556
|
-
function He(e) {
|
|
557
|
-
const t = typeof e;
|
|
558
|
-
return t === "string" || t === "number";
|
|
559
|
-
}
|
|
560
|
-
function Zt(e) {
|
|
561
|
-
let t = 0;
|
|
562
|
-
return e.forEach((o) => {
|
|
563
|
-
He(o) ? t += String(o).length : t += 1;
|
|
564
|
-
}), t;
|
|
565
|
-
}
|
|
566
|
-
function ae(e, t) {
|
|
567
|
-
let o = 0;
|
|
568
|
-
const n = [];
|
|
569
|
-
for (let i = 0; i < e.length; i += 1) {
|
|
570
|
-
if (o === t)
|
|
571
|
-
return n;
|
|
572
|
-
const c = e[i], d = He(c) ? String(c).length : 1, p = o + d;
|
|
573
|
-
if (p > t) {
|
|
574
|
-
const m = t - o;
|
|
575
|
-
return n.push(String(c).slice(0, m)), n;
|
|
576
|
-
}
|
|
577
|
-
n.push(c), o = p;
|
|
578
|
-
}
|
|
579
|
-
return e;
|
|
580
|
-
}
|
|
581
|
-
const en = 0, Z = 1, we = 2, ce = 3, de = 4, Be = (e) => {
|
|
582
|
-
let {
|
|
583
|
-
enabledMeasure: t,
|
|
584
|
-
children: o,
|
|
585
|
-
text: n,
|
|
586
|
-
width: i,
|
|
587
|
-
fontSize: c,
|
|
588
|
-
rows: f,
|
|
589
|
-
onEllipsis: d
|
|
590
|
-
} = e;
|
|
591
|
-
const [[p, m, s], b] = r.useState([0, 0, 0]), [j, N] = r.useState(0), [y, v] = r.useState(en), [$, M] = r.useState(0), L = r.useRef(null), u = r.useRef(null), x = r.useMemo(() => Re(n), [n]), w = r.useMemo(() => Zt(x), [x]), E = r.useMemo(() => !t || y !== ce ? j && y !== de && t ? o(ae(x, j), j < w) : o(x, !1) : o(ae(x, m), m < w), [t, y, o, x, m, w]);
|
|
592
|
-
te(() => {
|
|
593
|
-
t && i && c && w && (v(Z), b([0, Math.ceil(w / 2), w]));
|
|
594
|
-
}, [t, i, c, n, w, f]), te(() => {
|
|
595
|
-
var h;
|
|
596
|
-
y === Z && M(((h = L.current) === null || h === void 0 ? void 0 : h.offsetHeight) || 0);
|
|
597
|
-
}, [y]), te(() => {
|
|
598
|
-
var h, D;
|
|
599
|
-
if ($) {
|
|
600
|
-
if (y === Z) {
|
|
601
|
-
const R = ((h = u.current) === null || h === void 0 ? void 0 : h.offsetHeight) || 0, z = f * $;
|
|
602
|
-
R <= z ? (v(de), d(!1)) : v(we);
|
|
603
|
-
} else if (y === we)
|
|
604
|
-
if (p !== s) {
|
|
605
|
-
const R = ((D = u.current) === null || D === void 0 ? void 0 : D.offsetHeight) || 0, z = f * $;
|
|
606
|
-
let H = p, S = s;
|
|
607
|
-
p === s - 1 ? S = p : R <= z ? H = m : S = m;
|
|
608
|
-
const T = Math.ceil((H + S) / 2);
|
|
609
|
-
b([H, T, S]);
|
|
610
|
-
} else
|
|
611
|
-
v(ce), N(m), d(!0);
|
|
612
|
-
}
|
|
613
|
-
}, [y, p, s, f, $]);
|
|
614
|
-
const W = {
|
|
615
|
-
width: i,
|
|
616
|
-
whiteSpace: "normal",
|
|
617
|
-
margin: 0,
|
|
618
|
-
padding: 0
|
|
619
|
-
}, k = (h, D, R) => /* @__PURE__ */ r.createElement("span", {
|
|
620
|
-
"aria-hidden": !0,
|
|
621
|
-
ref: D,
|
|
622
|
-
style: Object.assign({
|
|
623
|
-
position: "fixed",
|
|
624
|
-
display: "block",
|
|
625
|
-
left: 0,
|
|
626
|
-
top: 0,
|
|
627
|
-
zIndex: -9999,
|
|
628
|
-
visibility: "hidden",
|
|
629
|
-
pointerEvents: "none",
|
|
630
|
-
fontSize: Math.ceil(c / 2) * 2
|
|
631
|
-
}, R)
|
|
632
|
-
}, h), g = (h, D) => {
|
|
633
|
-
const R = ae(x, h);
|
|
634
|
-
return k(o(R, !0), D, W);
|
|
635
|
-
};
|
|
636
|
-
return /* @__PURE__ */ r.createElement(r.Fragment, null, E, t && y !== ce && y !== de && /* @__PURE__ */ r.createElement(r.Fragment, null, k("lg", L, {
|
|
637
|
-
wordBreak: "keep-all",
|
|
638
|
-
whiteSpace: "nowrap"
|
|
639
|
-
}), y === Z ? k(o(x, !1), u, W) : g(m, u)));
|
|
640
|
-
};
|
|
641
|
-
process.env.NODE_ENV !== "production" && (Be.displayName = "Ellipsis");
|
|
642
|
-
const tn = Be, Ve = (e) => {
|
|
643
|
-
let {
|
|
644
|
-
enabledEllipsis: t,
|
|
645
|
-
isEllipsis: o,
|
|
646
|
-
children: n,
|
|
647
|
-
tooltipProps: i
|
|
648
|
-
} = e;
|
|
649
|
-
return !(i != null && i.title) || !t ? n : /* @__PURE__ */ r.createElement(pe, Object.assign({
|
|
650
|
-
open: o ? void 0 : !1
|
|
651
|
-
}, i), n);
|
|
652
|
-
};
|
|
653
|
-
process.env.NODE_ENV !== "production" && (Ve.displayName = "EllipsisTooltip");
|
|
654
|
-
const nn = Ve;
|
|
655
|
-
var on = function(e, t) {
|
|
656
|
-
var o = {};
|
|
657
|
-
for (var n in e)
|
|
658
|
-
Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
|
|
659
|
-
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
660
|
-
for (var i = 0, n = Object.getOwnPropertySymbols(e); i < n.length; i++)
|
|
661
|
-
t.indexOf(n[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[i]) && (o[n[i]] = e[n[i]]);
|
|
662
|
-
return o;
|
|
663
|
-
};
|
|
664
|
-
function rn(e, t) {
|
|
665
|
-
let {
|
|
666
|
-
mark: o,
|
|
667
|
-
code: n,
|
|
668
|
-
underline: i,
|
|
669
|
-
delete: c,
|
|
670
|
-
strong: f,
|
|
671
|
-
keyboard: d,
|
|
672
|
-
italic: p
|
|
673
|
-
} = e, m = t;
|
|
674
|
-
function s(b, j) {
|
|
675
|
-
j && (m = /* @__PURE__ */ r.createElement(b, {}, m));
|
|
676
|
-
}
|
|
677
|
-
return s("strong", f), s("u", i), s("del", c), s("code", n), s("mark", o), s("kbd", d), s("i", p), m;
|
|
678
|
-
}
|
|
679
|
-
function ee(e, t, o) {
|
|
680
|
-
return e === !0 || e === void 0 ? t : e || o && t;
|
|
681
|
-
}
|
|
682
|
-
function Te(e) {
|
|
683
|
-
return e === !1 ? [!1, !1] : Array.isArray(e) ? e : [e];
|
|
684
|
-
}
|
|
685
|
-
const ln = "...", sn = /* @__PURE__ */ r.forwardRef((e, t) => {
|
|
686
|
-
var o, n, i;
|
|
687
|
-
const {
|
|
688
|
-
prefixCls: c,
|
|
689
|
-
className: f,
|
|
690
|
-
style: d,
|
|
691
|
-
type: p,
|
|
692
|
-
disabled: m,
|
|
693
|
-
children: s,
|
|
694
|
-
ellipsis: b,
|
|
695
|
-
editable: j,
|
|
696
|
-
copyable: N,
|
|
697
|
-
component: y,
|
|
698
|
-
title: v
|
|
699
|
-
} = e, $ = on(e, ["prefixCls", "className", "style", "type", "disabled", "children", "ellipsis", "editable", "copyable", "component", "title"]), {
|
|
700
|
-
getPrefixCls: M,
|
|
701
|
-
direction: L
|
|
702
|
-
} = r.useContext($e), [u] = vt("Text"), x = r.useRef(null), w = r.useRef(null), E = M("typography", c), W = _e($, ["mark", "code", "delete", "underline", "strong", "keyboard", "italic"]), [k, g] = se(j), [h, D] = bt(!1, {
|
|
703
|
-
value: g.editing
|
|
704
|
-
}), {
|
|
705
|
-
triggerType: R = ["icon"]
|
|
706
|
-
} = g, z = (l) => {
|
|
707
|
-
var a;
|
|
708
|
-
l && ((a = g.onStart) === null || a === void 0 || a.call(g)), D(l);
|
|
709
|
-
};
|
|
710
|
-
Qt(() => {
|
|
711
|
-
var l;
|
|
712
|
-
h || (l = w.current) === null || l === void 0 || l.focus();
|
|
713
|
-
}, [h]);
|
|
714
|
-
const H = (l) => {
|
|
715
|
-
l == null || l.preventDefault(), z(!0);
|
|
716
|
-
}, S = (l) => {
|
|
717
|
-
var a;
|
|
718
|
-
(a = g.onChange) === null || a === void 0 || a.call(g, l), z(!1);
|
|
719
|
-
}, T = () => {
|
|
720
|
-
var l;
|
|
721
|
-
(l = g.onCancel) === null || l === void 0 || l.call(g), z(!1);
|
|
722
|
-
}, [U, B] = se(N), [K, X] = r.useState(!1), le = r.useRef(null), me = {};
|
|
723
|
-
B.format && (me.format = B.format);
|
|
724
|
-
const ge = () => {
|
|
725
|
-
le.current && clearTimeout(le.current);
|
|
726
|
-
}, Ae = (l) => {
|
|
727
|
-
var a;
|
|
728
|
-
l == null || l.preventDefault(), l == null || l.stopPropagation(), kt(B.text || String(s) || "", me), X(!0), ge(), le.current = setTimeout(() => {
|
|
729
|
-
X(!1);
|
|
730
|
-
}, 3e3), (a = B.onCopy) === null || a === void 0 || a.call(B, l);
|
|
731
|
-
};
|
|
732
|
-
r.useEffect(() => ge, []);
|
|
733
|
-
const [ye, We] = r.useState(!1), [be, Ke] = r.useState(!1), [Fe, Ue] = r.useState(!1), [ve, qe] = r.useState(!1), [Ee, Xe] = r.useState(!1), [Je, Ge] = r.useState(!0), [V, O] = se(b, {
|
|
734
|
-
expandable: !1
|
|
735
|
-
}), I = V && !Fe, {
|
|
736
|
-
rows: F = 1
|
|
737
|
-
} = O, J = r.useMemo(() => (
|
|
738
|
-
// Disable ellipsis
|
|
739
|
-
!I || // Provide suffix
|
|
740
|
-
O.suffix !== void 0 || O.onEllipsis || // Can't use css ellipsis since we need to provide the place for button
|
|
741
|
-
O.expandable || k || U
|
|
742
|
-
), [I, O, k, U]);
|
|
743
|
-
te(() => {
|
|
744
|
-
V && !J && (We(xe("webkitLineClamp")), Ke(xe("textOverflow")));
|
|
745
|
-
}, [J, V]);
|
|
746
|
-
const P = r.useMemo(() => J ? !1 : F === 1 ? be : ye, [J, be, ye]), he = I && (P ? Ee : ve), Qe = I && F === 1 && P, G = I && F > 1 && P, Ye = (l) => {
|
|
747
|
-
var a;
|
|
748
|
-
Ue(!0), (a = O.onExpand) === null || a === void 0 || a.call(O, l);
|
|
749
|
-
}, [Oe, Ze] = r.useState(0), [et, tt] = r.useState(0), nt = (l, a) => {
|
|
750
|
-
let {
|
|
751
|
-
offsetWidth: C
|
|
752
|
-
} = l;
|
|
753
|
-
var _;
|
|
754
|
-
Ze(C), tt(parseInt((_ = window.getComputedStyle) === null || _ === void 0 ? void 0 : _.call(window, a).fontSize, 10) || 0);
|
|
755
|
-
}, ot = (l) => {
|
|
756
|
-
var a;
|
|
757
|
-
qe(l), ve !== l && ((a = O.onEllipsis) === null || a === void 0 || a.call(O, l));
|
|
758
|
-
};
|
|
759
|
-
r.useEffect(() => {
|
|
760
|
-
const l = x.current;
|
|
761
|
-
if (V && P && l) {
|
|
762
|
-
const a = G ? l.offsetHeight < l.scrollHeight : l.offsetWidth < l.scrollWidth;
|
|
763
|
-
Ee !== a && Xe(a);
|
|
764
|
-
}
|
|
765
|
-
}, [V, P, s, G, Je, Oe]), r.useEffect(() => {
|
|
766
|
-
const l = x.current;
|
|
767
|
-
if (typeof IntersectionObserver > "u" || !l || !P || !I)
|
|
768
|
-
return;
|
|
769
|
-
const a = new IntersectionObserver(() => {
|
|
770
|
-
Ge(!!l.offsetParent);
|
|
771
|
-
});
|
|
772
|
-
return a.observe(l), () => {
|
|
773
|
-
a.disconnect();
|
|
774
|
-
};
|
|
775
|
-
}, [P, I]);
|
|
776
|
-
let A = {};
|
|
777
|
-
O.tooltip === !0 ? A = {
|
|
778
|
-
title: (o = g.text) !== null && o !== void 0 ? o : s
|
|
779
|
-
} : /* @__PURE__ */ r.isValidElement(O.tooltip) ? A = {
|
|
780
|
-
title: O.tooltip
|
|
781
|
-
} : typeof O.tooltip == "object" ? A = Object.assign({
|
|
782
|
-
title: (n = g.text) !== null && n !== void 0 ? n : s
|
|
783
|
-
}, O.tooltip) : A = {
|
|
784
|
-
title: O.tooltip
|
|
785
|
-
};
|
|
786
|
-
const Q = r.useMemo(() => {
|
|
787
|
-
const l = (a) => ["string", "number"].includes(typeof a);
|
|
788
|
-
if (!(!V || P)) {
|
|
789
|
-
if (l(g.text))
|
|
790
|
-
return g.text;
|
|
791
|
-
if (l(s))
|
|
792
|
-
return s;
|
|
793
|
-
if (l(v))
|
|
794
|
-
return v;
|
|
795
|
-
if (l(A.title))
|
|
796
|
-
return A.title;
|
|
797
|
-
}
|
|
798
|
-
}, [V, P, v, A.title, he]);
|
|
799
|
-
if (h)
|
|
800
|
-
return /* @__PURE__ */ r.createElement(Gt, {
|
|
801
|
-
value: (i = g.text) !== null && i !== void 0 ? i : typeof s == "string" ? s : "",
|
|
802
|
-
onSave: S,
|
|
803
|
-
onCancel: T,
|
|
804
|
-
onEnd: g.onEnd,
|
|
805
|
-
prefixCls: E,
|
|
806
|
-
className: f,
|
|
807
|
-
style: d,
|
|
808
|
-
direction: L,
|
|
809
|
-
component: y,
|
|
810
|
-
maxLength: g.maxLength,
|
|
811
|
-
autoSize: g.autoSize,
|
|
812
|
-
enterIcon: g.enterIcon
|
|
813
|
-
});
|
|
814
|
-
const rt = () => {
|
|
815
|
-
const {
|
|
816
|
-
expandable: l,
|
|
817
|
-
symbol: a
|
|
818
|
-
} = O;
|
|
819
|
-
if (!l)
|
|
820
|
-
return null;
|
|
821
|
-
let C;
|
|
822
|
-
return a ? C = a : C = u == null ? void 0 : u.expand, /* @__PURE__ */ r.createElement("a", {
|
|
823
|
-
key: "expand",
|
|
824
|
-
className: `${E}-expand`,
|
|
825
|
-
onClick: Ye,
|
|
826
|
-
"aria-label": u == null ? void 0 : u.expand
|
|
827
|
-
}, C);
|
|
828
|
-
}, it = () => {
|
|
829
|
-
if (!k)
|
|
830
|
-
return;
|
|
831
|
-
const {
|
|
832
|
-
icon: l,
|
|
833
|
-
tooltip: a
|
|
834
|
-
} = g, C = Re(a)[0] || (u == null ? void 0 : u.edit), _ = typeof C == "string" ? C : "";
|
|
835
|
-
return R.includes("icon") ? /* @__PURE__ */ r.createElement(pe, {
|
|
836
|
-
key: "edit",
|
|
837
|
-
title: a === !1 ? "" : C
|
|
838
|
-
}, /* @__PURE__ */ r.createElement(Se, {
|
|
839
|
-
ref: w,
|
|
840
|
-
className: `${E}-edit`,
|
|
841
|
-
onClick: H,
|
|
842
|
-
"aria-label": _
|
|
843
|
-
}, l || /* @__PURE__ */ r.createElement(jt, {
|
|
844
|
-
role: "button"
|
|
845
|
-
}))) : null;
|
|
846
|
-
}, lt = () => {
|
|
847
|
-
if (!U)
|
|
848
|
-
return null;
|
|
849
|
-
const {
|
|
850
|
-
tooltips: l,
|
|
851
|
-
icon: a
|
|
852
|
-
} = B, C = Te(l), _ = Te(a), Y = K ? ee(C[1], u == null ? void 0 : u.copied) : ee(C[0], u == null ? void 0 : u.copy), ct = K ? u == null ? void 0 : u.copied : u == null ? void 0 : u.copy, dt = typeof Y == "string" ? Y : ct;
|
|
853
|
-
return /* @__PURE__ */ r.createElement(pe, {
|
|
854
|
-
key: "copy",
|
|
855
|
-
title: Y
|
|
856
|
-
}, /* @__PURE__ */ r.createElement(Se, {
|
|
857
|
-
className: ne(`${E}-copy`, {
|
|
858
|
-
[`${E}-copy-success`]: K,
|
|
859
|
-
[`${E}-copy-icon-only`]: s == null
|
|
860
|
-
}),
|
|
861
|
-
onClick: Ae,
|
|
862
|
-
"aria-label": dt
|
|
863
|
-
}, K ? ee(_[1], /* @__PURE__ */ r.createElement(mt, null), !0) : ee(_[0], /* @__PURE__ */ r.createElement(Tt, null), !0)));
|
|
864
|
-
}, st = (l) => [l && rt(), it(), lt()], at = (l) => [l && /* @__PURE__ */ r.createElement("span", {
|
|
865
|
-
"aria-hidden": !0,
|
|
866
|
-
key: "ellipsis"
|
|
867
|
-
}, ln), O.suffix, st(l)];
|
|
868
|
-
return /* @__PURE__ */ r.createElement(yt, {
|
|
869
|
-
onResize: nt,
|
|
870
|
-
disabled: !I
|
|
871
|
-
}, (l) => /* @__PURE__ */ r.createElement(nn, {
|
|
872
|
-
tooltipProps: A,
|
|
873
|
-
enabledEllipsis: I,
|
|
874
|
-
isEllipsis: he
|
|
875
|
-
}, /* @__PURE__ */ r.createElement(Me, Object.assign({
|
|
876
|
-
className: ne({
|
|
877
|
-
[`${E}-${p}`]: p,
|
|
878
|
-
[`${E}-disabled`]: m,
|
|
879
|
-
[`${E}-ellipsis`]: V,
|
|
880
|
-
[`${E}-single-line`]: I && F === 1,
|
|
881
|
-
[`${E}-ellipsis-single-line`]: Qe,
|
|
882
|
-
[`${E}-ellipsis-multiple-line`]: G
|
|
883
|
-
}, f),
|
|
884
|
-
prefixCls: c,
|
|
885
|
-
style: Object.assign(Object.assign({}, d), {
|
|
886
|
-
WebkitLineClamp: G ? F : void 0
|
|
887
|
-
}),
|
|
888
|
-
component: y,
|
|
889
|
-
ref: je(l, x, t),
|
|
890
|
-
direction: L,
|
|
891
|
-
onClick: R.includes("text") ? H : void 0,
|
|
892
|
-
"aria-label": Q == null ? void 0 : Q.toString(),
|
|
893
|
-
title: v
|
|
894
|
-
}, W), /* @__PURE__ */ r.createElement(tn, {
|
|
895
|
-
enabledMeasure: I && !P,
|
|
896
|
-
text: s,
|
|
897
|
-
rows: F,
|
|
898
|
-
width: Oe,
|
|
899
|
-
fontSize: et,
|
|
900
|
-
onEllipsis: ot
|
|
901
|
-
}, (a, C) => {
|
|
902
|
-
let _ = a;
|
|
903
|
-
return a.length && C && Q && (_ = /* @__PURE__ */ r.createElement("span", {
|
|
904
|
-
key: "show-content",
|
|
905
|
-
"aria-hidden": !0
|
|
906
|
-
}, _)), rn(e, /* @__PURE__ */ r.createElement(r.Fragment, null, _, at(C)));
|
|
907
|
-
}))));
|
|
908
|
-
}), ie = sn;
|
|
909
|
-
var an = function(e, t) {
|
|
910
|
-
var o = {};
|
|
911
|
-
for (var n in e)
|
|
912
|
-
Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
|
|
913
|
-
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
914
|
-
for (var i = 0, n = Object.getOwnPropertySymbols(e); i < n.length; i++)
|
|
915
|
-
t.indexOf(n[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[i]) && (o[n[i]] = e[n[i]]);
|
|
916
|
-
return o;
|
|
917
|
-
};
|
|
918
|
-
const cn = /* @__PURE__ */ r.forwardRef((e, t) => {
|
|
919
|
-
var {
|
|
920
|
-
ellipsis: o,
|
|
921
|
-
rel: n
|
|
922
|
-
} = e, i = an(e, ["ellipsis", "rel"]);
|
|
923
|
-
if (process.env.NODE_ENV !== "production") {
|
|
924
|
-
const f = re("Typography.Link");
|
|
925
|
-
process.env.NODE_ENV !== "production" && f(typeof o != "object", "usage", "`ellipsis` only supports boolean value.");
|
|
926
|
-
}
|
|
927
|
-
const c = Object.assign(Object.assign({}, i), {
|
|
928
|
-
rel: n === void 0 && i.target === "_blank" ? "noopener noreferrer" : n
|
|
929
|
-
});
|
|
930
|
-
return delete c.navigate, /* @__PURE__ */ r.createElement(ie, Object.assign({}, c, {
|
|
931
|
-
ref: t,
|
|
932
|
-
ellipsis: !!o,
|
|
933
|
-
component: "a"
|
|
934
|
-
}));
|
|
935
|
-
}), dn = cn, pn = /* @__PURE__ */ r.forwardRef((e, t) => /* @__PURE__ */ r.createElement(ie, Object.assign({
|
|
936
|
-
ref: t
|
|
937
|
-
}, e, {
|
|
938
|
-
component: "div"
|
|
939
|
-
}))), un = pn;
|
|
940
|
-
var fn = function(e, t) {
|
|
941
|
-
var o = {};
|
|
942
|
-
for (var n in e)
|
|
943
|
-
Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
|
|
944
|
-
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
945
|
-
for (var i = 0, n = Object.getOwnPropertySymbols(e); i < n.length; i++)
|
|
946
|
-
t.indexOf(n[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[i]) && (o[n[i]] = e[n[i]]);
|
|
947
|
-
return o;
|
|
948
|
-
};
|
|
949
|
-
const mn = (e, t) => {
|
|
950
|
-
var {
|
|
951
|
-
ellipsis: o
|
|
952
|
-
} = e, n = fn(e, ["ellipsis"]);
|
|
953
|
-
const i = r.useMemo(() => o && typeof o == "object" ? _e(o, ["expandable", "rows"]) : o, [o]);
|
|
954
|
-
if (process.env.NODE_ENV !== "production") {
|
|
955
|
-
const c = re("Typography.Text");
|
|
956
|
-
process.env.NODE_ENV !== "production" && c(typeof o != "object" || !o || !("expandable" in o) && !("rows" in o), "usage", "`ellipsis` do not support `expandable` or `rows` props.");
|
|
957
|
-
}
|
|
958
|
-
return /* @__PURE__ */ r.createElement(ie, Object.assign({
|
|
959
|
-
ref: t
|
|
960
|
-
}, n, {
|
|
961
|
-
ellipsis: i,
|
|
962
|
-
component: "span"
|
|
963
|
-
}));
|
|
964
|
-
}, gn = /* @__PURE__ */ r.forwardRef(mn);
|
|
965
|
-
var yn = function(e, t) {
|
|
966
|
-
var o = {};
|
|
967
|
-
for (var n in e)
|
|
968
|
-
Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
|
|
969
|
-
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
970
|
-
for (var i = 0, n = Object.getOwnPropertySymbols(e); i < n.length; i++)
|
|
971
|
-
t.indexOf(n[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[i]) && (o[n[i]] = e[n[i]]);
|
|
972
|
-
return o;
|
|
973
|
-
};
|
|
974
|
-
const Ne = [1, 2, 3, 4, 5], bn = /* @__PURE__ */ r.forwardRef((e, t) => {
|
|
975
|
-
const {
|
|
976
|
-
level: o = 1
|
|
977
|
-
} = e, n = yn(e, ["level"]);
|
|
978
|
-
let i;
|
|
979
|
-
if (process.env.NODE_ENV !== "production") {
|
|
980
|
-
const c = re("Typography.Title");
|
|
981
|
-
process.env.NODE_ENV !== "production" && c(Ne.includes(o), "usage", "Title only accept `1 | 2 | 3 | 4 | 5` as `level` value. And `5` need 4.6.0+ version.");
|
|
982
|
-
}
|
|
983
|
-
return Ne.includes(o) ? i = `h${o}` : i = "h1", /* @__PURE__ */ r.createElement(ie, Object.assign({
|
|
984
|
-
ref: t
|
|
985
|
-
}, n, {
|
|
986
|
-
component: i
|
|
987
|
-
}));
|
|
988
|
-
}), vn = bn, q = Me;
|
|
989
|
-
q.Text = gn;
|
|
990
|
-
q.Link = dn;
|
|
991
|
-
q.Title = vn;
|
|
992
|
-
q.Paragraph = un;
|
|
993
|
-
const In = q;
|
|
994
|
-
export {
|
|
995
|
-
In as T
|
|
996
|
-
};
|