ysyt-react-agent-lib 1.0.14 → 1.0.16

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.
@@ -1,728 +0,0 @@
1
- import { _ as le, u as Q, a as se, c as q, b as X, d as de, e as Y, w as U, g as ce, m as ue, f as D, r as A, h as Z, C as W, i as be, F as pe, k as ge, l as ee, D as fe, W as he, T as Ce, n as me, o as ve, p as Se, j as v, M as ye, q as xe, E as J, S as ke, Y as $e, I as Re } from "./index-CgpAwGZh.mjs";
2
- import * as a from "react";
3
- import we, { forwardRef as Ee, useRef as K, useImperativeHandle as Ie, memo as Pe, useState as V, useEffect as je } from "react";
4
- import { M as Be, T as Oe } from "./index-BWQnZT8R.mjs";
5
- const oe = /* @__PURE__ */ a.createContext(null), _e = oe.Provider, te = /* @__PURE__ */ a.createContext(null), ze = te.Provider;
6
- var De = ["prefixCls", "className", "style", "checked", "disabled", "defaultChecked", "type", "title", "onChange"], Te = /* @__PURE__ */ Ee(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, $ = s === void 0 ? !1 : s, g = e.type, l = g === void 0 ? "checkbox" : g, I = e.title, k = e.onChange, E = le(e, De), S = K(null), c = K(null), R = Q($, {
8
- value: f
9
- }), h = se(R, 2), y = h[0], x = h[1];
10
- Ie(r, function() {
11
- return {
12
- focus: function(m) {
13
- var u;
14
- (u = S.current) === null || u === void 0 || u.focus(m);
15
- },
16
- blur: function() {
17
- var m;
18
- (m = S.current) === null || m === void 0 || m.blur();
19
- },
20
- input: S.current,
21
- nativeElement: c.current
22
- };
23
- });
24
- var P = q(o, t, X(X({}, "".concat(o, "-checked"), y), "".concat(o, "-disabled"), p)), d = function(m) {
25
- p || ("checked" in e || x(m.target.checked), k == null || k({
26
- target: Y(Y({}, e), {}, {
27
- type: l,
28
- checked: m.target.checked
29
- }),
30
- stopPropagation: function() {
31
- m.stopPropagation();
32
- },
33
- preventDefault: function() {
34
- m.preventDefault();
35
- },
36
- nativeEvent: m.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", de({}, E, {
45
- className: "".concat(o, "-input"),
46
- ref: S,
47
- onChange: d,
48
- disabled: p,
49
- checked: !!y,
50
- type: l
51
- })), /* @__PURE__ */ a.createElement("span", {
52
- className: "".concat(o, "-inner")
53
- }));
54
- });
55
- function Ne(e) {
56
- const r = we.useRef(null), n = () => {
57
- U.cancel(r.current), r.current = null;
58
- };
59
- return [() => {
60
- n(), r.current = U(() => {
61
- r.current = null;
62
- });
63
- }, (i) => {
64
- r.current && (i.stopPropagation(), n()), e == null || e(i);
65
- }];
66
- }
67
- const Me = (e) => {
68
- const {
69
- componentCls: r,
70
- antCls: n
71
- } = e, o = `${r}-group`;
72
- return {
73
- [o]: Object.assign(Object.assign({}, A(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
- }, Le = (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: $,
102
- lineWidth: g,
103
- colorBgContainerDisabled: l,
104
- colorTextDisabled: I,
105
- paddingXS: k,
106
- dotColorDisabled: E,
107
- lineType: S,
108
- radioColor: c,
109
- radioBgColor: R,
110
- calc: h
111
- } = e, y = `${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({}, A(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)} ${S} ${o}`,
150
- borderRadius: "50%",
151
- visibility: "hidden",
152
- opacity: 0,
153
- content: '""'
154
- },
155
- [r]: Object.assign(Object.assign({}, A(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 ${y}`]: {
165
- borderColor: o
166
- },
167
- [`${r}-input:focus-visible + ${y}`]: Object.assign({}, Z(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: $,
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
- [y]: {
219
- borderColor: o,
220
- backgroundColor: R,
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
- [y]: {
231
- backgroundColor: l,
232
- borderColor: $,
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
- [y]: {
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
- }, Ve = (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: $,
270
- fontSize: g,
271
- buttonBg: l,
272
- fontSizeLG: I,
273
- controlHeightLG: k,
274
- controlHeightSM: E,
275
- paddingXS: S,
276
- borderRadius: c,
277
- borderRadiusSM: R,
278
- borderRadiusLG: h,
279
- buttonCheckedBg: y,
280
- buttonSolidCheckedColor: x,
281
- colorTextDisabled: P,
282
- colorBgContainerDisabled: d,
283
- buttonCheckedBgDisabled: O,
284
- buttonCheckedColorDisabled: m,
285
- colorPrimary: u,
286
- colorPrimaryHover: _,
287
- colorPrimaryActive: b,
288
- buttonSolidCheckedBg: j,
289
- buttonSolidCheckedHoverBg: B,
290
- buttonSolidCheckedActiveBg: z,
291
- calc: w
292
- } = e;
293
- return {
294
- [`${o}-button-wrapper`]: {
295
- position: "relative",
296
- display: "inline-block",
297
- height: n,
298
- margin: 0,
299
- paddingInline: $,
300
- paddingBlock: 0,
301
- color: r,
302
- fontSize: g,
303
- lineHeight: D(w(n).sub(w(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: w(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: w(t).mul(-1).equal(),
328
- insetInlineStart: w(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(w(k).sub(w(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: w(S).sub(t).equal(),
368
- paddingBlock: 0,
369
- lineHeight: D(w(E).sub(w(t).mul(2)).equal()),
370
- "&:first-child": {
371
- borderStartStartRadius: R,
372
- borderEndStartRadius: R
373
- },
374
- "&:last-child": {
375
- borderStartEndRadius: R,
376
- borderEndEndRadius: R
377
- }
378
- },
379
- "&:hover": {
380
- position: "relative",
381
- color: u
382
- },
383
- "&:has(:focus-visible)": Object.assign({}, Z(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: y,
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: x,
418
- background: j,
419
- borderColor: j,
420
- "&:hover": {
421
- color: x,
422
- background: B,
423
- borderColor: B
424
- },
425
- "&:active": {
426
- color: x,
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: m,
444
- backgroundColor: O,
445
- borderColor: f,
446
- boxShadow: "none"
447
- },
448
- "&-block": {
449
- flex: 1,
450
- textAlign: "center"
451
- }
452
- }
453
- };
454
- }, qe = (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: $,
465
- colorTextLightSolid: g,
466
- colorPrimary: l,
467
- colorPrimaryHover: I,
468
- colorPrimaryActive: k,
469
- colorWhite: E
470
- } = e, S = 4, c = i, R = r ? c - S * 2 : c - (S + t) * 2;
471
- return {
472
- // Radio
473
- radioSize: c,
474
- dotSize: R,
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: $,
485
- buttonCheckedColorDisabled: s,
486
- buttonPaddingInline: n - t,
487
- wrapperMarginInlineEnd: o,
488
- // internal
489
- radioColor: r ? l : E,
490
- radioBgColor: r ? p : l
491
- };
492
- }, re = ce("Radio", (e) => {
493
- const {
494
- controlOutline: r,
495
- controlOutlineWidth: n
496
- } = e, o = `0 0 0 ${D(n)} ${r}`, i = ue(e, {
497
- radioFocusShadow: o,
498
- radioButtonFocusShadow: o
499
- });
500
- return [Me(i), Le(i), Ve(i)];
501
- }, qe, {
502
- unitless: {
503
- radioSize: !0,
504
- dotSize: !0
505
- }
506
- });
507
- var Ge = 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 Ae = (e, r) => {
515
- var n, o;
516
- const t = a.useContext(oe), i = a.useContext(te), {
517
- getPrefixCls: f,
518
- direction: p,
519
- radio: s
520
- } = a.useContext(W), $ = a.useRef(null), g = be(r, $), {
521
- isFormItemInput: l
522
- } = a.useContext(pe);
523
- if (process.env.NODE_ENV !== "production") {
524
- const T = ge("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: S,
534
- children: c,
535
- style: R,
536
- title: h
537
- } = e, y = Ge(e, ["prefixCls", "className", "rootClassName", "children", "style", "title"]), x = f("radio", k), P = ((t == null ? void 0 : t.optionType) || i) === "button", d = P ? `${x}-button` : x, O = ee(x), [m, u, _] = re(x, O), b = Object.assign({}, y), j = a.useContext(fe);
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 : j;
539
- const B = 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, S, u, _, O), [z, w] = Ne(b.onClick);
546
- return m(/* @__PURE__ */ a.createElement(he, {
547
- component: "Radio",
548
- disabled: b.disabled
549
- }, /* @__PURE__ */ a.createElement("label", {
550
- className: B,
551
- style: Object.assign(Object.assign({}, s == null ? void 0 : s.style), R),
552
- onMouseEnter: e.onMouseEnter,
553
- onMouseLeave: e.onMouseLeave,
554
- title: h,
555
- onClick: z
556
- }, /* @__PURE__ */ a.createElement(Te, Object.assign({}, b, {
557
- className: q(b.className, {
558
- [Ce]: !P
559
- }),
560
- type: "radio",
561
- prefixCls: d,
562
- ref: g,
563
- onClick: w
564
- })), c !== void 0 ? /* @__PURE__ */ a.createElement("span", {
565
- className: `${d}-label`
566
- }, c) : null)));
567
- }, L = /* @__PURE__ */ a.forwardRef(Ae);
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(W), t = me(), {
574
- prefixCls: i,
575
- className: f,
576
- rootClassName: p,
577
- options: s,
578
- buttonStyle: $ = "outline",
579
- disabled: g,
580
- children: l,
581
- size: I,
582
- style: k,
583
- id: E,
584
- optionType: S,
585
- name: c = t,
586
- defaultValue: R,
587
- value: h,
588
- block: y = !1,
589
- onChange: x,
590
- onMouseEnter: P,
591
- onMouseLeave: d,
592
- onFocus: O,
593
- onBlur: m
594
- } = e, [u, _] = Q(R, {
595
- value: h
596
- }), b = a.useCallback((C) => {
597
- const ie = u, F = C.target.value;
598
- "value" in e || _(F), F !== ie && (x == null || x(C));
599
- }, [u, _, x]), j = n("radio", i), B = `${j}-group`, z = ee(j), [w, T, M] = re(j, 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: j,
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: j,
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), ne = q(B, `${B}-${$}`, {
619
- [`${B}-${H}`]: H,
620
- [`${B}-rtl`]: o === "rtl",
621
- [`${B}-block`]: y
622
- }, f, p, T, M, z), ae = a.useMemo(() => ({
623
- onChange: b,
624
- value: u,
625
- disabled: g,
626
- name: c,
627
- optionType: S,
628
- block: y
629
- }), [b, u, g, c, S, y]);
630
- return w(/* @__PURE__ */ a.createElement("div", Object.assign({}, Se(e, {
631
- aria: !0,
632
- data: !0
633
- }), {
634
- className: ne,
635
- style: k,
636
- onMouseEnter: P,
637
- onMouseLeave: d,
638
- onFocus: O,
639
- onBlur: m,
640
- id: E,
641
- ref: r
642
- }), /* @__PURE__ */ a.createElement(_e, {
643
- value: ae
644
- }, N)));
645
- }), He = /* @__PURE__ */ a.memo(We);
646
- var Fe = 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 Xe = (e, r) => {
654
- const {
655
- getPrefixCls: n
656
- } = a.useContext(W), {
657
- prefixCls: o
658
- } = e, t = Fe(e, ["prefixCls"]), i = n("radio", o);
659
- return /* @__PURE__ */ a.createElement(ze, {
660
- value: "button"
661
- }, /* @__PURE__ */ a.createElement(L, Object.assign({
662
- prefixCls: i
663
- }, t, {
664
- type: "radio",
665
- ref: r
666
- })));
667
- }, Ye = /* @__PURE__ */ a.forwardRef(Xe), G = L;
668
- G.Button = Ye;
669
- G.Group = He;
670
- G.__ANT_RADIO = !0;
671
- const Qe = Pe(({ open: e, onCallBack: r, queryFetch: n }) => {
672
- const [o, t] = V([]), [i, f] = V(0), [p, s] = V(""), [$, g] = V(!1);
673
- return je(() => {
674
- (async () => {
675
- g(!0);
676
- try {
677
- await n({
678
- success: (l) => {
679
- t(l.data || []);
680
- }
681
- });
682
- } catch {
683
- }
684
- g(!1);
685
- })();
686
- }, [e]), /* @__PURE__ */ v.jsx(v.Fragment, { children: /* @__PURE__ */ v.jsx(Be, { open: e, title: "转接", footer: !1, onCancel: () => r(), children: /* @__PURE__ */ v.jsxs(ye, { children: [
687
- /* @__PURE__ */ v.jsx("div", { children: /* @__PURE__ */ v.jsx(
688
- G.Group,
689
- {
690
- options: [
691
- {
692
- label: "转接坐席",
693
- value: 0
694
- },
695
- {
696
- label: "转接外线",
697
- value: 1
698
- }
699
- ],
700
- value: i,
701
- onChange: (l) => f(l.target.value)
702
- }
703
- ) }),
704
- /* @__PURE__ */ v.jsx(xe, { spinning: $, children: /* @__PURE__ */ v.jsxs("div", { style: { borderTop: "1px solid #eee", marginTop: 10, paddingTop: 10 }, children: [
705
- i === 0 && /* @__PURE__ */ v.jsx(v.Fragment, { children: o.length === 0 ? /* @__PURE__ */ v.jsx(J, { image: J.PRESENTED_IMAGE_SIMPLE }) : /* @__PURE__ */ v.jsx(ke, { wrap: !0, children: o.map((l) => /* @__PURE__ */ v.jsx(Oe, { color: "processing", onClick: () => r(l.agent_no, 0), children: /* @__PURE__ */ v.jsxs("div", { style: { display: "flex", alignItems: "center" }, children: [
706
- /* @__PURE__ */ v.jsx($e, { name: "zixun" }),
707
- /* @__PURE__ */ v.jsxs("span", { style: { marginRight: 10 }, children: [
708
- "转接坐席: ",
709
- l.agent_name
710
- ] })
711
- ] }) }, l.agent_no)) }) }),
712
- i === 1 && /* @__PURE__ */ v.jsx(
713
- Re,
714
- {
715
- value: p,
716
- onChange: (l) => s(l.target.value),
717
- placeholder: "请输入外线号码, 回车转接",
718
- onPressEnter: () => {
719
- r(p, 1);
720
- }
721
- }
722
- )
723
- ] }) })
724
- ] }) }) });
725
- });
726
- export {
727
- Qe as default
728
- };