ysyt-react-agent-lib 1.0.0
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/ConsultModel-Bm-jG2b7.js +1 -0
- package/dist/ConsultModel-CiPCsHT1.mjs +28 -0
- package/dist/TransferModel-Bu4UQ9aN.mjs +729 -0
- package/dist/TransferModel-DxA5-9Ev.js +2 -0
- package/dist/components/IconSvg/index.d.ts +11 -0
- package/dist/es/YsytBarPhone/components/CallNumber.d.ts +6 -0
- package/dist/es/YsytBarPhone/components/ConsultModel.d.ts +9 -0
- package/dist/es/YsytBarPhone/components/Time.d.ts +3 -0
- package/dist/es/YsytBarPhone/components/TransferModel.d.ts +9 -0
- package/dist/es/YsytBarPhone/index.d.ts +15 -0
- package/dist/es/YsytBarPhone/style.d.ts +14 -0
- package/dist/es/YsytBarPhone/useTimer.d.ts +9 -0
- package/dist/index-BMQnWcgt.js +14 -0
- package/dist/index-DTX4tP2H.mjs +33430 -0
- package/dist/index-DZfpPJgy.js +1358 -0
- package/dist/index-NUSGrx9W.mjs +2410 -0
- package/dist/index.d.ts +1 -0
- package/dist/resource.d.ts +4 -0
- package/dist/types/index.d.ts +0 -0
- package/dist/ysyt-react-agent-lib.cjs.js +1 -0
- package/dist/ysyt-react-agent-lib.css +1 -0
- package/dist/ysyt-react-agent-lib.es.js +4 -0
- package/package.json +56 -0
|
@@ -0,0 +1,729 @@
|
|
|
1
|
+
import { _ as ie, u as Q, a as le, c as q, b as X, d as se, e as U, w as J, g as de, m as ce, f as D, r as W, h as Y, C as A, i as ue, F as be, k as pe, l as Z, D as ge, W as fe, T as he, n as Ce, o as ve, p as me, j as w, M as Se, q as ye, S as ke, I as xe, s as $e } from "./index-DTX4tP2H.mjs";
|
|
2
|
+
import * as a from "react";
|
|
3
|
+
import Re, { forwardRef as we, useRef as K, useImperativeHandle as Ee, memo as Ie, useState as V, useEffect as Pe } from "react";
|
|
4
|
+
import { M as Be, T as Oe } from "./index-NUSGrx9W.mjs";
|
|
5
|
+
const ee = /* @__PURE__ */ a.createContext(null), je = ee.Provider, oe = /* @__PURE__ */ a.createContext(null), _e = oe.Provider;
|
|
6
|
+
var ze = ["prefixCls", "className", "style", "checked", "disabled", "defaultChecked", "type", "title", "onChange"], De = /* @__PURE__ */ we(function(e, r) {
|
|
7
|
+
var n = e.prefixCls, o = n === void 0 ? "rc-checkbox" : n, t = e.className, i = e.style, f = e.checked, p = e.disabled, s = e.defaultChecked, x = s === void 0 ? !1 : s, g = e.type, l = g === void 0 ? "checkbox" : g, I = e.title, k = e.onChange, E = ie(e, ze), m = K(null), c = K(null), $ = Q(x, {
|
|
8
|
+
value: f
|
|
9
|
+
}), h = le($, 2), S = h[0], y = h[1];
|
|
10
|
+
Ee(r, function() {
|
|
11
|
+
return {
|
|
12
|
+
focus: function(v) {
|
|
13
|
+
var u;
|
|
14
|
+
(u = m.current) === null || u === void 0 || u.focus(v);
|
|
15
|
+
},
|
|
16
|
+
blur: function() {
|
|
17
|
+
var v;
|
|
18
|
+
(v = m.current) === null || v === void 0 || v.blur();
|
|
19
|
+
},
|
|
20
|
+
input: m.current,
|
|
21
|
+
nativeElement: c.current
|
|
22
|
+
};
|
|
23
|
+
});
|
|
24
|
+
var P = q(o, t, X(X({}, "".concat(o, "-checked"), S), "".concat(o, "-disabled"), p)), d = function(v) {
|
|
25
|
+
p || ("checked" in e || y(v.target.checked), k == null || k({
|
|
26
|
+
target: U(U({}, e), {}, {
|
|
27
|
+
type: l,
|
|
28
|
+
checked: v.target.checked
|
|
29
|
+
}),
|
|
30
|
+
stopPropagation: function() {
|
|
31
|
+
v.stopPropagation();
|
|
32
|
+
},
|
|
33
|
+
preventDefault: function() {
|
|
34
|
+
v.preventDefault();
|
|
35
|
+
},
|
|
36
|
+
nativeEvent: v.nativeEvent
|
|
37
|
+
}));
|
|
38
|
+
};
|
|
39
|
+
return /* @__PURE__ */ a.createElement("span", {
|
|
40
|
+
className: P,
|
|
41
|
+
title: I,
|
|
42
|
+
style: i,
|
|
43
|
+
ref: c
|
|
44
|
+
}, /* @__PURE__ */ a.createElement("input", se({}, E, {
|
|
45
|
+
className: "".concat(o, "-input"),
|
|
46
|
+
ref: m,
|
|
47
|
+
onChange: d,
|
|
48
|
+
disabled: p,
|
|
49
|
+
checked: !!S,
|
|
50
|
+
type: l
|
|
51
|
+
})), /* @__PURE__ */ a.createElement("span", {
|
|
52
|
+
className: "".concat(o, "-inner")
|
|
53
|
+
}));
|
|
54
|
+
});
|
|
55
|
+
function Te(e) {
|
|
56
|
+
const r = Re.useRef(null), n = () => {
|
|
57
|
+
J.cancel(r.current), r.current = null;
|
|
58
|
+
};
|
|
59
|
+
return [() => {
|
|
60
|
+
n(), r.current = J(() => {
|
|
61
|
+
r.current = null;
|
|
62
|
+
});
|
|
63
|
+
}, (i) => {
|
|
64
|
+
r.current && (i.stopPropagation(), n()), e == null || e(i);
|
|
65
|
+
}];
|
|
66
|
+
}
|
|
67
|
+
const Ne = (e) => {
|
|
68
|
+
const {
|
|
69
|
+
componentCls: r,
|
|
70
|
+
antCls: n
|
|
71
|
+
} = e, o = `${r}-group`;
|
|
72
|
+
return {
|
|
73
|
+
[o]: Object.assign(Object.assign({}, W(e)), {
|
|
74
|
+
display: "inline-block",
|
|
75
|
+
fontSize: 0,
|
|
76
|
+
// RTL
|
|
77
|
+
[`&${o}-rtl`]: {
|
|
78
|
+
direction: "rtl"
|
|
79
|
+
},
|
|
80
|
+
[`&${o}-block`]: {
|
|
81
|
+
display: "flex"
|
|
82
|
+
},
|
|
83
|
+
[`${n}-badge ${n}-badge-count`]: {
|
|
84
|
+
zIndex: 1
|
|
85
|
+
},
|
|
86
|
+
[`> ${n}-badge:not(:first-child) > ${n}-button-wrapper`]: {
|
|
87
|
+
borderInlineStart: "none"
|
|
88
|
+
}
|
|
89
|
+
})
|
|
90
|
+
};
|
|
91
|
+
}, Me = (e) => {
|
|
92
|
+
const {
|
|
93
|
+
componentCls: r,
|
|
94
|
+
wrapperMarginInlineEnd: n,
|
|
95
|
+
colorPrimary: o,
|
|
96
|
+
radioSize: t,
|
|
97
|
+
motionDurationSlow: i,
|
|
98
|
+
motionDurationMid: f,
|
|
99
|
+
motionEaseInOutCirc: p,
|
|
100
|
+
colorBgContainer: s,
|
|
101
|
+
colorBorder: x,
|
|
102
|
+
lineWidth: g,
|
|
103
|
+
colorBgContainerDisabled: l,
|
|
104
|
+
colorTextDisabled: I,
|
|
105
|
+
paddingXS: k,
|
|
106
|
+
dotColorDisabled: E,
|
|
107
|
+
lineType: m,
|
|
108
|
+
radioColor: c,
|
|
109
|
+
radioBgColor: $,
|
|
110
|
+
calc: h
|
|
111
|
+
} = e, S = `${r}-inner`, P = h(t).sub(h(4).mul(2)), d = h(1).mul(t).equal({
|
|
112
|
+
unit: !0
|
|
113
|
+
});
|
|
114
|
+
return {
|
|
115
|
+
[`${r}-wrapper`]: Object.assign(Object.assign({}, W(e)), {
|
|
116
|
+
display: "inline-flex",
|
|
117
|
+
alignItems: "baseline",
|
|
118
|
+
marginInlineStart: 0,
|
|
119
|
+
marginInlineEnd: n,
|
|
120
|
+
cursor: "pointer",
|
|
121
|
+
"&:last-child": {
|
|
122
|
+
marginInlineEnd: 0
|
|
123
|
+
},
|
|
124
|
+
// RTL
|
|
125
|
+
[`&${r}-wrapper-rtl`]: {
|
|
126
|
+
direction: "rtl"
|
|
127
|
+
},
|
|
128
|
+
"&-disabled": {
|
|
129
|
+
cursor: "not-allowed",
|
|
130
|
+
color: e.colorTextDisabled
|
|
131
|
+
},
|
|
132
|
+
"&::after": {
|
|
133
|
+
display: "inline-block",
|
|
134
|
+
width: 0,
|
|
135
|
+
overflow: "hidden",
|
|
136
|
+
content: '"\\a0"'
|
|
137
|
+
},
|
|
138
|
+
"&-block": {
|
|
139
|
+
flex: 1,
|
|
140
|
+
justifyContent: "center"
|
|
141
|
+
},
|
|
142
|
+
// hashId 在 wrapper 上,只能铺平
|
|
143
|
+
[`${r}-checked::after`]: {
|
|
144
|
+
position: "absolute",
|
|
145
|
+
insetBlockStart: 0,
|
|
146
|
+
insetInlineStart: 0,
|
|
147
|
+
width: "100%",
|
|
148
|
+
height: "100%",
|
|
149
|
+
border: `${D(g)} ${m} ${o}`,
|
|
150
|
+
borderRadius: "50%",
|
|
151
|
+
visibility: "hidden",
|
|
152
|
+
opacity: 0,
|
|
153
|
+
content: '""'
|
|
154
|
+
},
|
|
155
|
+
[r]: Object.assign(Object.assign({}, W(e)), {
|
|
156
|
+
position: "relative",
|
|
157
|
+
display: "inline-block",
|
|
158
|
+
outline: "none",
|
|
159
|
+
cursor: "pointer",
|
|
160
|
+
alignSelf: "center",
|
|
161
|
+
borderRadius: "50%"
|
|
162
|
+
}),
|
|
163
|
+
[`${r}-wrapper:hover &,
|
|
164
|
+
&:hover ${S}`]: {
|
|
165
|
+
borderColor: o
|
|
166
|
+
},
|
|
167
|
+
[`${r}-input:focus-visible + ${S}`]: Object.assign({}, Y(e)),
|
|
168
|
+
[`${r}:hover::after, ${r}-wrapper:hover &::after`]: {
|
|
169
|
+
visibility: "visible"
|
|
170
|
+
},
|
|
171
|
+
[`${r}-inner`]: {
|
|
172
|
+
"&::after": {
|
|
173
|
+
boxSizing: "border-box",
|
|
174
|
+
position: "absolute",
|
|
175
|
+
insetBlockStart: "50%",
|
|
176
|
+
insetInlineStart: "50%",
|
|
177
|
+
display: "block",
|
|
178
|
+
width: d,
|
|
179
|
+
height: d,
|
|
180
|
+
marginBlockStart: h(1).mul(t).div(-2).equal({
|
|
181
|
+
unit: !0
|
|
182
|
+
}),
|
|
183
|
+
marginInlineStart: h(1).mul(t).div(-2).equal({
|
|
184
|
+
unit: !0
|
|
185
|
+
}),
|
|
186
|
+
backgroundColor: c,
|
|
187
|
+
borderBlockStart: 0,
|
|
188
|
+
borderInlineStart: 0,
|
|
189
|
+
borderRadius: d,
|
|
190
|
+
transform: "scale(0)",
|
|
191
|
+
opacity: 0,
|
|
192
|
+
transition: `all ${i} ${p}`,
|
|
193
|
+
content: '""'
|
|
194
|
+
},
|
|
195
|
+
boxSizing: "border-box",
|
|
196
|
+
position: "relative",
|
|
197
|
+
insetBlockStart: 0,
|
|
198
|
+
insetInlineStart: 0,
|
|
199
|
+
display: "block",
|
|
200
|
+
width: d,
|
|
201
|
+
height: d,
|
|
202
|
+
backgroundColor: s,
|
|
203
|
+
borderColor: x,
|
|
204
|
+
borderStyle: "solid",
|
|
205
|
+
borderWidth: g,
|
|
206
|
+
borderRadius: "50%",
|
|
207
|
+
transition: `all ${f}`
|
|
208
|
+
},
|
|
209
|
+
[`${r}-input`]: {
|
|
210
|
+
position: "absolute",
|
|
211
|
+
inset: 0,
|
|
212
|
+
zIndex: 1,
|
|
213
|
+
cursor: "pointer",
|
|
214
|
+
opacity: 0
|
|
215
|
+
},
|
|
216
|
+
// 选中状态
|
|
217
|
+
[`${r}-checked`]: {
|
|
218
|
+
[S]: {
|
|
219
|
+
borderColor: o,
|
|
220
|
+
backgroundColor: $,
|
|
221
|
+
"&::after": {
|
|
222
|
+
transform: `scale(${e.calc(e.dotSize).div(t).equal()})`,
|
|
223
|
+
opacity: 1,
|
|
224
|
+
transition: `all ${i} ${p}`
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
[`${r}-disabled`]: {
|
|
229
|
+
cursor: "not-allowed",
|
|
230
|
+
[S]: {
|
|
231
|
+
backgroundColor: l,
|
|
232
|
+
borderColor: x,
|
|
233
|
+
cursor: "not-allowed",
|
|
234
|
+
"&::after": {
|
|
235
|
+
backgroundColor: E
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
[`${r}-input`]: {
|
|
239
|
+
cursor: "not-allowed"
|
|
240
|
+
},
|
|
241
|
+
[`${r}-disabled + span`]: {
|
|
242
|
+
color: I,
|
|
243
|
+
cursor: "not-allowed"
|
|
244
|
+
},
|
|
245
|
+
[`&${r}-checked`]: {
|
|
246
|
+
[S]: {
|
|
247
|
+
"&::after": {
|
|
248
|
+
transform: `scale(${h(P).div(t).equal()})`
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
[`span${r} + *`]: {
|
|
254
|
+
paddingInlineStart: k,
|
|
255
|
+
paddingInlineEnd: k
|
|
256
|
+
}
|
|
257
|
+
})
|
|
258
|
+
};
|
|
259
|
+
}, Le = (e) => {
|
|
260
|
+
const {
|
|
261
|
+
buttonColor: r,
|
|
262
|
+
controlHeight: n,
|
|
263
|
+
componentCls: o,
|
|
264
|
+
lineWidth: t,
|
|
265
|
+
lineType: i,
|
|
266
|
+
colorBorder: f,
|
|
267
|
+
motionDurationSlow: p,
|
|
268
|
+
motionDurationMid: s,
|
|
269
|
+
buttonPaddingInline: x,
|
|
270
|
+
fontSize: g,
|
|
271
|
+
buttonBg: l,
|
|
272
|
+
fontSizeLG: I,
|
|
273
|
+
controlHeightLG: k,
|
|
274
|
+
controlHeightSM: E,
|
|
275
|
+
paddingXS: m,
|
|
276
|
+
borderRadius: c,
|
|
277
|
+
borderRadiusSM: $,
|
|
278
|
+
borderRadiusLG: h,
|
|
279
|
+
buttonCheckedBg: S,
|
|
280
|
+
buttonSolidCheckedColor: y,
|
|
281
|
+
colorTextDisabled: P,
|
|
282
|
+
colorBgContainerDisabled: d,
|
|
283
|
+
buttonCheckedBgDisabled: j,
|
|
284
|
+
buttonCheckedColorDisabled: v,
|
|
285
|
+
colorPrimary: u,
|
|
286
|
+
colorPrimaryHover: _,
|
|
287
|
+
colorPrimaryActive: b,
|
|
288
|
+
buttonSolidCheckedBg: B,
|
|
289
|
+
buttonSolidCheckedHoverBg: O,
|
|
290
|
+
buttonSolidCheckedActiveBg: z,
|
|
291
|
+
calc: R
|
|
292
|
+
} = e;
|
|
293
|
+
return {
|
|
294
|
+
[`${o}-button-wrapper`]: {
|
|
295
|
+
position: "relative",
|
|
296
|
+
display: "inline-block",
|
|
297
|
+
height: n,
|
|
298
|
+
margin: 0,
|
|
299
|
+
paddingInline: x,
|
|
300
|
+
paddingBlock: 0,
|
|
301
|
+
color: r,
|
|
302
|
+
fontSize: g,
|
|
303
|
+
lineHeight: D(R(n).sub(R(t).mul(2)).equal()),
|
|
304
|
+
background: l,
|
|
305
|
+
border: `${D(t)} ${i} ${f}`,
|
|
306
|
+
// strange align fix for chrome but works
|
|
307
|
+
// https://gw.alipayobjects.com/zos/rmsportal/VFTfKXJuogBAXcvfAUWJ.gif
|
|
308
|
+
borderBlockStartWidth: R(t).add(0.02).equal(),
|
|
309
|
+
borderInlineStartWidth: 0,
|
|
310
|
+
borderInlineEndWidth: t,
|
|
311
|
+
cursor: "pointer",
|
|
312
|
+
transition: [`color ${s}`, `background ${s}`, `box-shadow ${s}`].join(","),
|
|
313
|
+
a: {
|
|
314
|
+
color: r
|
|
315
|
+
},
|
|
316
|
+
[`> ${o}-button`]: {
|
|
317
|
+
position: "absolute",
|
|
318
|
+
insetBlockStart: 0,
|
|
319
|
+
insetInlineStart: 0,
|
|
320
|
+
zIndex: -1,
|
|
321
|
+
width: "100%",
|
|
322
|
+
height: "100%"
|
|
323
|
+
},
|
|
324
|
+
"&:not(:first-child)": {
|
|
325
|
+
"&::before": {
|
|
326
|
+
position: "absolute",
|
|
327
|
+
insetBlockStart: R(t).mul(-1).equal(),
|
|
328
|
+
insetInlineStart: R(t).mul(-1).equal(),
|
|
329
|
+
display: "block",
|
|
330
|
+
boxSizing: "content-box",
|
|
331
|
+
width: 1,
|
|
332
|
+
height: "100%",
|
|
333
|
+
paddingBlock: t,
|
|
334
|
+
paddingInline: 0,
|
|
335
|
+
backgroundColor: f,
|
|
336
|
+
transition: `background-color ${p}`,
|
|
337
|
+
content: '""'
|
|
338
|
+
}
|
|
339
|
+
},
|
|
340
|
+
"&:first-child": {
|
|
341
|
+
borderInlineStart: `${D(t)} ${i} ${f}`,
|
|
342
|
+
borderStartStartRadius: c,
|
|
343
|
+
borderEndStartRadius: c
|
|
344
|
+
},
|
|
345
|
+
"&:last-child": {
|
|
346
|
+
borderStartEndRadius: c,
|
|
347
|
+
borderEndEndRadius: c
|
|
348
|
+
},
|
|
349
|
+
"&:first-child:last-child": {
|
|
350
|
+
borderRadius: c
|
|
351
|
+
},
|
|
352
|
+
[`${o}-group-large &`]: {
|
|
353
|
+
height: k,
|
|
354
|
+
fontSize: I,
|
|
355
|
+
lineHeight: D(R(k).sub(R(t).mul(2)).equal()),
|
|
356
|
+
"&:first-child": {
|
|
357
|
+
borderStartStartRadius: h,
|
|
358
|
+
borderEndStartRadius: h
|
|
359
|
+
},
|
|
360
|
+
"&:last-child": {
|
|
361
|
+
borderStartEndRadius: h,
|
|
362
|
+
borderEndEndRadius: h
|
|
363
|
+
}
|
|
364
|
+
},
|
|
365
|
+
[`${o}-group-small &`]: {
|
|
366
|
+
height: E,
|
|
367
|
+
paddingInline: R(m).sub(t).equal(),
|
|
368
|
+
paddingBlock: 0,
|
|
369
|
+
lineHeight: D(R(E).sub(R(t).mul(2)).equal()),
|
|
370
|
+
"&:first-child": {
|
|
371
|
+
borderStartStartRadius: $,
|
|
372
|
+
borderEndStartRadius: $
|
|
373
|
+
},
|
|
374
|
+
"&:last-child": {
|
|
375
|
+
borderStartEndRadius: $,
|
|
376
|
+
borderEndEndRadius: $
|
|
377
|
+
}
|
|
378
|
+
},
|
|
379
|
+
"&:hover": {
|
|
380
|
+
position: "relative",
|
|
381
|
+
color: u
|
|
382
|
+
},
|
|
383
|
+
"&:has(:focus-visible)": Object.assign({}, Y(e)),
|
|
384
|
+
[`${o}-inner, input[type='checkbox'], input[type='radio']`]: {
|
|
385
|
+
width: 0,
|
|
386
|
+
height: 0,
|
|
387
|
+
opacity: 0,
|
|
388
|
+
pointerEvents: "none"
|
|
389
|
+
},
|
|
390
|
+
[`&-checked:not(${o}-button-wrapper-disabled)`]: {
|
|
391
|
+
zIndex: 1,
|
|
392
|
+
color: u,
|
|
393
|
+
background: S,
|
|
394
|
+
borderColor: u,
|
|
395
|
+
"&::before": {
|
|
396
|
+
backgroundColor: u
|
|
397
|
+
},
|
|
398
|
+
"&:first-child": {
|
|
399
|
+
borderColor: u
|
|
400
|
+
},
|
|
401
|
+
"&:hover": {
|
|
402
|
+
color: _,
|
|
403
|
+
borderColor: _,
|
|
404
|
+
"&::before": {
|
|
405
|
+
backgroundColor: _
|
|
406
|
+
}
|
|
407
|
+
},
|
|
408
|
+
"&:active": {
|
|
409
|
+
color: b,
|
|
410
|
+
borderColor: b,
|
|
411
|
+
"&::before": {
|
|
412
|
+
backgroundColor: b
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
},
|
|
416
|
+
[`${o}-group-solid &-checked:not(${o}-button-wrapper-disabled)`]: {
|
|
417
|
+
color: y,
|
|
418
|
+
background: B,
|
|
419
|
+
borderColor: B,
|
|
420
|
+
"&:hover": {
|
|
421
|
+
color: y,
|
|
422
|
+
background: O,
|
|
423
|
+
borderColor: O
|
|
424
|
+
},
|
|
425
|
+
"&:active": {
|
|
426
|
+
color: y,
|
|
427
|
+
background: z,
|
|
428
|
+
borderColor: z
|
|
429
|
+
}
|
|
430
|
+
},
|
|
431
|
+
"&-disabled": {
|
|
432
|
+
color: P,
|
|
433
|
+
backgroundColor: d,
|
|
434
|
+
borderColor: f,
|
|
435
|
+
cursor: "not-allowed",
|
|
436
|
+
"&:first-child, &:hover": {
|
|
437
|
+
color: P,
|
|
438
|
+
backgroundColor: d,
|
|
439
|
+
borderColor: f
|
|
440
|
+
}
|
|
441
|
+
},
|
|
442
|
+
[`&-disabled${o}-button-wrapper-checked`]: {
|
|
443
|
+
color: v,
|
|
444
|
+
backgroundColor: j,
|
|
445
|
+
borderColor: f,
|
|
446
|
+
boxShadow: "none"
|
|
447
|
+
},
|
|
448
|
+
"&-block": {
|
|
449
|
+
flex: 1,
|
|
450
|
+
textAlign: "center"
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
};
|
|
454
|
+
}, Ve = (e) => {
|
|
455
|
+
const {
|
|
456
|
+
wireframe: r,
|
|
457
|
+
padding: n,
|
|
458
|
+
marginXS: o,
|
|
459
|
+
lineWidth: t,
|
|
460
|
+
fontSizeLG: i,
|
|
461
|
+
colorText: f,
|
|
462
|
+
colorBgContainer: p,
|
|
463
|
+
colorTextDisabled: s,
|
|
464
|
+
controlItemBgActiveDisabled: x,
|
|
465
|
+
colorTextLightSolid: g,
|
|
466
|
+
colorPrimary: l,
|
|
467
|
+
colorPrimaryHover: I,
|
|
468
|
+
colorPrimaryActive: k,
|
|
469
|
+
colorWhite: E
|
|
470
|
+
} = e, m = 4, c = i, $ = r ? c - m * 2 : c - (m + t) * 2;
|
|
471
|
+
return {
|
|
472
|
+
// Radio
|
|
473
|
+
radioSize: c,
|
|
474
|
+
dotSize: $,
|
|
475
|
+
dotColorDisabled: s,
|
|
476
|
+
// Radio buttons
|
|
477
|
+
buttonSolidCheckedColor: g,
|
|
478
|
+
buttonSolidCheckedBg: l,
|
|
479
|
+
buttonSolidCheckedHoverBg: I,
|
|
480
|
+
buttonSolidCheckedActiveBg: k,
|
|
481
|
+
buttonBg: p,
|
|
482
|
+
buttonCheckedBg: p,
|
|
483
|
+
buttonColor: f,
|
|
484
|
+
buttonCheckedBgDisabled: x,
|
|
485
|
+
buttonCheckedColorDisabled: s,
|
|
486
|
+
buttonPaddingInline: n - t,
|
|
487
|
+
wrapperMarginInlineEnd: o,
|
|
488
|
+
// internal
|
|
489
|
+
radioColor: r ? l : E,
|
|
490
|
+
radioBgColor: r ? p : l
|
|
491
|
+
};
|
|
492
|
+
}, te = de("Radio", (e) => {
|
|
493
|
+
const {
|
|
494
|
+
controlOutline: r,
|
|
495
|
+
controlOutlineWidth: n
|
|
496
|
+
} = e, o = `0 0 0 ${D(n)} ${r}`, i = ce(e, {
|
|
497
|
+
radioFocusShadow: o,
|
|
498
|
+
radioButtonFocusShadow: o
|
|
499
|
+
});
|
|
500
|
+
return [Ne(i), Me(i), Le(i)];
|
|
501
|
+
}, Ve, {
|
|
502
|
+
unitless: {
|
|
503
|
+
radioSize: !0,
|
|
504
|
+
dotSize: !0
|
|
505
|
+
}
|
|
506
|
+
});
|
|
507
|
+
var qe = function(e, r) {
|
|
508
|
+
var n = {};
|
|
509
|
+
for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && r.indexOf(o) < 0 && (n[o] = e[o]);
|
|
510
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var t = 0, o = Object.getOwnPropertySymbols(e); t < o.length; t++)
|
|
511
|
+
r.indexOf(o[t]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[t]) && (n[o[t]] = e[o[t]]);
|
|
512
|
+
return n;
|
|
513
|
+
};
|
|
514
|
+
const Ge = (e, r) => {
|
|
515
|
+
var n, o;
|
|
516
|
+
const t = a.useContext(ee), i = a.useContext(oe), {
|
|
517
|
+
getPrefixCls: f,
|
|
518
|
+
direction: p,
|
|
519
|
+
radio: s
|
|
520
|
+
} = a.useContext(A), x = a.useRef(null), g = ue(r, x), {
|
|
521
|
+
isFormItemInput: l
|
|
522
|
+
} = a.useContext(be);
|
|
523
|
+
if (process.env.NODE_ENV !== "production") {
|
|
524
|
+
const T = pe("Radio");
|
|
525
|
+
process.env.NODE_ENV !== "production" && T(!("optionType" in e), "usage", "`optionType` is only support in Radio.Group.");
|
|
526
|
+
}
|
|
527
|
+
const I = (T) => {
|
|
528
|
+
var M, N;
|
|
529
|
+
(M = e.onChange) === null || M === void 0 || M.call(e, T), (N = t == null ? void 0 : t.onChange) === null || N === void 0 || N.call(t, T);
|
|
530
|
+
}, {
|
|
531
|
+
prefixCls: k,
|
|
532
|
+
className: E,
|
|
533
|
+
rootClassName: m,
|
|
534
|
+
children: c,
|
|
535
|
+
style: $,
|
|
536
|
+
title: h
|
|
537
|
+
} = e, S = qe(e, ["prefixCls", "className", "rootClassName", "children", "style", "title"]), y = f("radio", k), P = ((t == null ? void 0 : t.optionType) || i) === "button", d = P ? `${y}-button` : y, j = Z(y), [v, u, _] = te(y, j), b = Object.assign({}, S), B = a.useContext(ge);
|
|
538
|
+
t && (b.name = t.name, b.onChange = I, b.checked = e.value === t.value, b.disabled = (n = b.disabled) !== null && n !== void 0 ? n : t.disabled), b.disabled = (o = b.disabled) !== null && o !== void 0 ? o : B;
|
|
539
|
+
const O = q(`${d}-wrapper`, {
|
|
540
|
+
[`${d}-wrapper-checked`]: b.checked,
|
|
541
|
+
[`${d}-wrapper-disabled`]: b.disabled,
|
|
542
|
+
[`${d}-wrapper-rtl`]: p === "rtl",
|
|
543
|
+
[`${d}-wrapper-in-form-item`]: l,
|
|
544
|
+
[`${d}-wrapper-block`]: !!(t != null && t.block)
|
|
545
|
+
}, s == null ? void 0 : s.className, E, m, u, _, j), [z, R] = Te(b.onClick);
|
|
546
|
+
return v(/* @__PURE__ */ a.createElement(fe, {
|
|
547
|
+
component: "Radio",
|
|
548
|
+
disabled: b.disabled
|
|
549
|
+
}, /* @__PURE__ */ a.createElement("label", {
|
|
550
|
+
className: O,
|
|
551
|
+
style: Object.assign(Object.assign({}, s == null ? void 0 : s.style), $),
|
|
552
|
+
onMouseEnter: e.onMouseEnter,
|
|
553
|
+
onMouseLeave: e.onMouseLeave,
|
|
554
|
+
title: h,
|
|
555
|
+
onClick: z
|
|
556
|
+
}, /* @__PURE__ */ a.createElement(De, Object.assign({}, b, {
|
|
557
|
+
className: q(b.className, {
|
|
558
|
+
[he]: !P
|
|
559
|
+
}),
|
|
560
|
+
type: "radio",
|
|
561
|
+
prefixCls: d,
|
|
562
|
+
ref: g,
|
|
563
|
+
onClick: R
|
|
564
|
+
})), c !== void 0 ? /* @__PURE__ */ a.createElement("span", {
|
|
565
|
+
className: `${d}-label`
|
|
566
|
+
}, c) : null)));
|
|
567
|
+
}, L = /* @__PURE__ */ a.forwardRef(Ge);
|
|
568
|
+
process.env.NODE_ENV !== "production" && (L.displayName = "Radio");
|
|
569
|
+
const We = /* @__PURE__ */ a.forwardRef((e, r) => {
|
|
570
|
+
const {
|
|
571
|
+
getPrefixCls: n,
|
|
572
|
+
direction: o
|
|
573
|
+
} = a.useContext(A), t = Ce(), {
|
|
574
|
+
prefixCls: i,
|
|
575
|
+
className: f,
|
|
576
|
+
rootClassName: p,
|
|
577
|
+
options: s,
|
|
578
|
+
buttonStyle: x = "outline",
|
|
579
|
+
disabled: g,
|
|
580
|
+
children: l,
|
|
581
|
+
size: I,
|
|
582
|
+
style: k,
|
|
583
|
+
id: E,
|
|
584
|
+
optionType: m,
|
|
585
|
+
name: c = t,
|
|
586
|
+
defaultValue: $,
|
|
587
|
+
value: h,
|
|
588
|
+
block: S = !1,
|
|
589
|
+
onChange: y,
|
|
590
|
+
onMouseEnter: P,
|
|
591
|
+
onMouseLeave: d,
|
|
592
|
+
onFocus: j,
|
|
593
|
+
onBlur: v
|
|
594
|
+
} = e, [u, _] = Q($, {
|
|
595
|
+
value: h
|
|
596
|
+
}), b = a.useCallback((C) => {
|
|
597
|
+
const ae = u, F = C.target.value;
|
|
598
|
+
"value" in e || _(F), F !== ae && (y == null || y(C));
|
|
599
|
+
}, [u, _, y]), B = n("radio", i), O = `${B}-group`, z = Z(B), [R, T, M] = te(B, z);
|
|
600
|
+
let N = l;
|
|
601
|
+
s && s.length > 0 && (N = s.map((C) => typeof C == "string" || typeof C == "number" ? /* @__PURE__ */ a.createElement(L, {
|
|
602
|
+
key: C.toString(),
|
|
603
|
+
prefixCls: B,
|
|
604
|
+
disabled: g,
|
|
605
|
+
value: C,
|
|
606
|
+
checked: u === C
|
|
607
|
+
}, C) : /* @__PURE__ */ a.createElement(L, {
|
|
608
|
+
key: `radio-group-value-options-${C.value}`,
|
|
609
|
+
prefixCls: B,
|
|
610
|
+
disabled: C.disabled || g,
|
|
611
|
+
value: C.value,
|
|
612
|
+
checked: u === C.value,
|
|
613
|
+
title: C.title,
|
|
614
|
+
style: C.style,
|
|
615
|
+
id: C.id,
|
|
616
|
+
required: C.required
|
|
617
|
+
}, C.label)));
|
|
618
|
+
const H = ve(I), re = q(O, `${O}-${x}`, {
|
|
619
|
+
[`${O}-${H}`]: H,
|
|
620
|
+
[`${O}-rtl`]: o === "rtl",
|
|
621
|
+
[`${O}-block`]: S
|
|
622
|
+
}, f, p, T, M, z), ne = a.useMemo(() => ({
|
|
623
|
+
onChange: b,
|
|
624
|
+
value: u,
|
|
625
|
+
disabled: g,
|
|
626
|
+
name: c,
|
|
627
|
+
optionType: m,
|
|
628
|
+
block: S
|
|
629
|
+
}), [b, u, g, c, m, S]);
|
|
630
|
+
return R(/* @__PURE__ */ a.createElement("div", Object.assign({}, me(e, {
|
|
631
|
+
aria: !0,
|
|
632
|
+
data: !0
|
|
633
|
+
}), {
|
|
634
|
+
className: re,
|
|
635
|
+
style: k,
|
|
636
|
+
onMouseEnter: P,
|
|
637
|
+
onMouseLeave: d,
|
|
638
|
+
onFocus: j,
|
|
639
|
+
onBlur: v,
|
|
640
|
+
id: E,
|
|
641
|
+
ref: r
|
|
642
|
+
}), /* @__PURE__ */ a.createElement(je, {
|
|
643
|
+
value: ne
|
|
644
|
+
}, N)));
|
|
645
|
+
}), Ae = /* @__PURE__ */ a.memo(We);
|
|
646
|
+
var He = function(e, r) {
|
|
647
|
+
var n = {};
|
|
648
|
+
for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && r.indexOf(o) < 0 && (n[o] = e[o]);
|
|
649
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var t = 0, o = Object.getOwnPropertySymbols(e); t < o.length; t++)
|
|
650
|
+
r.indexOf(o[t]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[t]) && (n[o[t]] = e[o[t]]);
|
|
651
|
+
return n;
|
|
652
|
+
};
|
|
653
|
+
const Fe = (e, r) => {
|
|
654
|
+
const {
|
|
655
|
+
getPrefixCls: n
|
|
656
|
+
} = a.useContext(A), {
|
|
657
|
+
prefixCls: o
|
|
658
|
+
} = e, t = He(e, ["prefixCls"]), i = n("radio", o);
|
|
659
|
+
return /* @__PURE__ */ a.createElement(_e, {
|
|
660
|
+
value: "button"
|
|
661
|
+
}, /* @__PURE__ */ a.createElement(L, Object.assign({
|
|
662
|
+
prefixCls: i
|
|
663
|
+
}, t, {
|
|
664
|
+
type: "radio",
|
|
665
|
+
ref: r
|
|
666
|
+
})));
|
|
667
|
+
}, Xe = /* @__PURE__ */ a.forwardRef(Fe), G = L;
|
|
668
|
+
G.Button = Xe;
|
|
669
|
+
G.Group = Ae;
|
|
670
|
+
G.__ANT_RADIO = !0;
|
|
671
|
+
const Qe = Ie(({ open: e, onCallBack: r, queryFetch: n }) => {
|
|
672
|
+
const [o, t] = V([]), [i, f] = V(0), [p, s] = V(""), [x, g] = V(!1);
|
|
673
|
+
return Pe(() => {
|
|
674
|
+
(async () => {
|
|
675
|
+
g(!0);
|
|
676
|
+
try {
|
|
677
|
+
await n({
|
|
678
|
+
success: (l) => {
|
|
679
|
+
t(l.data || []);
|
|
680
|
+
}
|
|
681
|
+
});
|
|
682
|
+
} catch (l) {
|
|
683
|
+
console.log(l);
|
|
684
|
+
}
|
|
685
|
+
g(!1);
|
|
686
|
+
})();
|
|
687
|
+
}, [e]), /* @__PURE__ */ w.jsx(w.Fragment, { children: /* @__PURE__ */ w.jsx(Be, { open: e, title: "转接", footer: !1, onCancel: () => r(), children: /* @__PURE__ */ w.jsxs(Se, { children: [
|
|
688
|
+
/* @__PURE__ */ w.jsx("div", { children: /* @__PURE__ */ w.jsx(
|
|
689
|
+
G.Group,
|
|
690
|
+
{
|
|
691
|
+
options: [
|
|
692
|
+
{
|
|
693
|
+
label: "转接坐席",
|
|
694
|
+
value: 0
|
|
695
|
+
},
|
|
696
|
+
{
|
|
697
|
+
label: "转接技能组",
|
|
698
|
+
value: 1
|
|
699
|
+
}
|
|
700
|
+
],
|
|
701
|
+
value: i,
|
|
702
|
+
onChange: (l) => f(l.target.value)
|
|
703
|
+
}
|
|
704
|
+
) }),
|
|
705
|
+
/* @__PURE__ */ w.jsx(ye, { spinning: x, children: /* @__PURE__ */ w.jsxs("div", { style: { borderTop: "1px solid #eee", marginTop: 10, paddingTop: 10 }, children: [
|
|
706
|
+
i === 0 && /* @__PURE__ */ w.jsx(ke, { wrap: !0, children: o.map((l) => /* @__PURE__ */ w.jsxs(Oe, { color: "processing", onClick: () => r(l.agent_no), children: [
|
|
707
|
+
/* @__PURE__ */ w.jsxs("span", { style: { marginRight: 10 }, children: [
|
|
708
|
+
"咨询坐席: ",
|
|
709
|
+
l.agent_name
|
|
710
|
+
] }),
|
|
711
|
+
/* @__PURE__ */ w.jsx(xe, { name: "zixun" })
|
|
712
|
+
] }, l.agent_no)) }),
|
|
713
|
+
i === 1 && /* @__PURE__ */ w.jsx(
|
|
714
|
+
$e,
|
|
715
|
+
{
|
|
716
|
+
value: p,
|
|
717
|
+
onChange: (l) => s(l.target.value),
|
|
718
|
+
placeholder: "请输入外线号码, 回车转接",
|
|
719
|
+
onPressEnter: () => {
|
|
720
|
+
r(p);
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
)
|
|
724
|
+
] }) })
|
|
725
|
+
] }) }) });
|
|
726
|
+
});
|
|
727
|
+
export {
|
|
728
|
+
Qe as default
|
|
729
|
+
};
|