ysyt-react-agent-lib 1.0.22 → 1.0.25
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-B1a6NllG.js → ConsultModel-1uklVcWG.js} +1 -1
- package/dist/{ConsultModel-C8MFgNfb.mjs → ConsultModel-DDGMKwtj.mjs} +6 -6
- package/dist/{TransferModel-BxInY08x.js → TransferModel-BMUlnrUh.js} +1 -1
- package/dist/{TransferModel-DSzScIiP.mjs → TransferModel-Cqm_yCZw.mjs} +2 -2
- package/dist/antd-custom.d.ts +11 -0
- package/dist/components/confirm/index.d.ts +10 -0
- package/dist/es/YsytBarPhone/index.d.ts +20 -0
- package/dist/{index-CXG2aiPa.mjs → index-C5Ql87M5.mjs} +67 -68
- package/dist/index-CUJsSuse.js +1549 -0
- package/dist/{index-CIwinjCK.js → index-Css1h-TE.js} +3 -3
- package/dist/{index-B-pJUkQY.mjs → index-DHm5c-__.mjs} +22470 -22301
- package/dist/index.d.ts +2 -1
- package/dist/ysyt-react-agent-lib.cjs.js +1 -1
- package/dist/ysyt-react-agent-lib.es.js +3 -3
- package/package.json +2 -2
- package/dist/index-Dbb92Mi6.js +0 -1508
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CUJsSuse.js"),s=require("react"),i=require("./index-Css1h-TE.js"),c=s.memo(({open:n,onCallBack:r,queryFetch:x})=>{const[o,a]=s.useState([]);return s.useEffect(()=>{(async()=>{try{await x({success:t=>{a(t.data||[])}})}catch(t){console.log(t)}})()},[n]),e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:e.jsxRuntimeExports.jsx(i.Modal,{open:n,title:"咨询",footer:!1,onCancel:()=>r(),children:e.jsxRuntimeExports.jsx(e.ModelBody,{children:o.length===0?e.jsxRuntimeExports.jsx(e.Empty,{image:e.Empty.PRESENTED_IMAGE_SIMPLE}):e.jsxRuntimeExports.jsx(e.Space,{wrap:!0,children:o.map(t=>e.jsxRuntimeExports.jsx(i.Tag,{color:"processing",onClick:()=>r(t.agent_no),children:e.jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[e.jsxRuntimeExports.jsx(e.YsytIconSvg,{name:"zixun"}),e.jsxRuntimeExports.jsxs("span",{style:{marginLeft:10},children:["咨询坐席: ",t.agent_name]})]})},t.agent_no))})})})})});exports.default=c;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { j as e, M as c, E as r, S as i, Y as d } from "./index-
|
|
2
|
-
import { memo as
|
|
3
|
-
import { M as j, T as p } from "./index-
|
|
4
|
-
const E =
|
|
5
|
-
const [n, l] =
|
|
1
|
+
import { j as e, M as c, E as r, S as i, Y as d } from "./index-DHm5c-__.mjs";
|
|
2
|
+
import { memo as m, useState as g, useEffect as x } from "react";
|
|
3
|
+
import { M as j, T as p } from "./index-C5Ql87M5.mjs";
|
|
4
|
+
const E = m(({ open: a, onCallBack: t, queryFetch: o }) => {
|
|
5
|
+
const [n, l] = g([]);
|
|
6
6
|
return x(() => {
|
|
7
7
|
(async () => {
|
|
8
8
|
try {
|
|
@@ -17,7 +17,7 @@ const E = g(({ open: a, onCallBack: t, queryFetch: o }) => {
|
|
|
17
17
|
})();
|
|
18
18
|
}, [a]), /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsx(j, { open: a, title: "咨询", footer: !1, onCancel: () => t(), children: /* @__PURE__ */ e.jsx(c, { children: n.length === 0 ? /* @__PURE__ */ e.jsx(r, { image: r.PRESENTED_IMAGE_SIMPLE }) : /* @__PURE__ */ e.jsx(i, { wrap: !0, children: n.map((s) => /* @__PURE__ */ e.jsx(p, { color: "processing", onClick: () => t(s.agent_no), children: /* @__PURE__ */ e.jsxs("div", { style: { display: "flex", alignItems: "center" }, children: [
|
|
19
19
|
/* @__PURE__ */ e.jsx(d, { name: "zixun" }),
|
|
20
|
-
/* @__PURE__ */ e.jsxs("span", { style: {
|
|
20
|
+
/* @__PURE__ */ e.jsxs("span", { style: { marginLeft: 10 }, children: [
|
|
21
21
|
"咨询坐席: ",
|
|
22
22
|
s.agent_name
|
|
23
23
|
] })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CUJsSuse.js"),s=require("react"),l=require("./index-Css1h-TE.js"),m=s.memo(({open:o,onCallBack:n,queryFetch:u})=>{const[a,p]=s.useState([]),[r,c]=s.useState(0),[i,d]=s.useState(""),[j,x]=s.useState(!1);return s.useEffect(()=>{(async()=>{x(!0);try{await u({success:t=>{p(t.data||[])}})}catch(t){console.log(t)}x(!1)})()},[o]),e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:e.jsxRuntimeExports.jsx(l.Modal,{open:o,title:"转接",footer:!1,onCancel:()=>n(),children:e.jsxRuntimeExports.jsxs(e.ModelBody,{children:[e.jsxRuntimeExports.jsx("div",{children:e.jsxRuntimeExports.jsx(e.Radio.Group,{options:[{label:"转接坐席",value:0},{label:"转接外线",value:1}],value:r,onChange:t=>c(t.target.value)})}),e.jsxRuntimeExports.jsx(e.Spin,{spinning:j,children:e.jsxRuntimeExports.jsxs("div",{style:{borderTop:"1px solid #eee",marginTop:10,paddingTop:10},children:[r===0&&e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:a.length===0?e.jsxRuntimeExports.jsx(e.Empty,{image:e.Empty.PRESENTED_IMAGE_SIMPLE}):e.jsxRuntimeExports.jsx(e.Space,{wrap:!0,children:a.map(t=>e.jsxRuntimeExports.jsx(l.Tag,{color:"processing",onClick:()=>n(t.agent_no,0),children:e.jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[e.jsxRuntimeExports.jsx(e.YsytIconSvg,{name:"zixun"}),e.jsxRuntimeExports.jsxs("span",{style:{marginRight:10},children:["转接坐席: ",t.agent_name]})]})},t.agent_no))})}),r===1&&e.jsxRuntimeExports.jsx(e.Input,{value:i,onChange:t=>d(t.target.value),placeholder:"请输入外线号码, 回车转接",onPressEnter:()=>{n(i,1)}})]})})]})})})});exports.default=m;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { j as e, M as m, R as h, a as j, E as c, S as f, Y as y, I as v } from "./index-
|
|
1
|
+
import { j as e, M as m, R as h, a as j, E as c, S as f, Y as y, I as v } from "./index-DHm5c-__.mjs";
|
|
2
2
|
import { memo as E, useState as a, useEffect as T } from "react";
|
|
3
|
-
import { M, T as S } from "./index-
|
|
3
|
+
import { M, T as S } from "./index-C5Ql87M5.mjs";
|
|
4
4
|
const _ = E(({ open: r, onCallBack: n, queryFetch: d }) => {
|
|
5
5
|
const [l, g] = a([]), [t, p] = a(0), [o, u] = a(""), [x, i] = a(!1);
|
|
6
6
|
return T(() => {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { default as Radio } from 'antd/es/radio';
|
|
2
|
+
export { default as Input } from 'antd/es/input';
|
|
3
|
+
export { default as Dropdown } from 'antd/es/dropdown';
|
|
4
|
+
export { default as message } from 'antd/es/message';
|
|
5
|
+
export { default as Popover } from 'antd/es/popover';
|
|
6
|
+
export { default as Select } from 'antd/es/select';
|
|
7
|
+
export { default as Spin } from 'antd/es/spin';
|
|
8
|
+
export { default as Tooltip } from 'antd/es/tooltip';
|
|
9
|
+
export { default as Tag } from 'antd/es/tag';
|
|
10
|
+
export { default as Empty } from 'antd/es/empty';
|
|
11
|
+
export { default as Space } from 'antd/es/space';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface ConfirmOptions {
|
|
3
|
+
title: string;
|
|
4
|
+
content: React.ReactNode;
|
|
5
|
+
icon?: React.ReactNode;
|
|
6
|
+
onOk?: () => void | Promise<void>;
|
|
7
|
+
onCancel?: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function confirm({ title, content, icon, onOk, onCancel }: ConfirmOptions): void;
|
|
10
|
+
export {};
|
|
@@ -1,4 +1,23 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
import { EventName } from 'ysyt-agent-sdk';
|
|
3
|
+
/**
|
|
4
|
+
* @param url 默认为 https://aicc.yescloudy.com
|
|
5
|
+
* @param appKey
|
|
6
|
+
* @param appSecret
|
|
7
|
+
* @param agentNo 坐席工号
|
|
8
|
+
* @param enableBrowserAlert 浏览器通知是否开启
|
|
9
|
+
* @param logBuiltinEnabled 开发日志是否开启
|
|
10
|
+
* @param style 样式
|
|
11
|
+
* 整体高度
|
|
12
|
+
* height?: string;
|
|
13
|
+
* 空闲颜色
|
|
14
|
+
* idle?: string;
|
|
15
|
+
* 忙碌颜色
|
|
16
|
+
* busy?: string;
|
|
17
|
+
* 选择外显字体颜色
|
|
18
|
+
* selectOutNumberColor?: string
|
|
19
|
+
* @param onCallBack 回调
|
|
20
|
+
*/
|
|
2
21
|
interface Props {
|
|
3
22
|
url?: string;
|
|
4
23
|
appKey: string;
|
|
@@ -12,6 +31,7 @@ interface Props {
|
|
|
12
31
|
busy?: string;
|
|
13
32
|
selectOutNumberColor?: string;
|
|
14
33
|
};
|
|
34
|
+
onCallBack?: (type: EventName.KICK_OFF) => void;
|
|
15
35
|
}
|
|
16
36
|
declare const YsytBarPhone: React.FC<Props>;
|
|
17
37
|
export default YsytBarPhone;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as r from "react";
|
|
2
2
|
import $, { useContext as re, useRef as Z, useMemo as Lt, useEffect as De } from "react";
|
|
3
|
-
import { i as Dt, K as Ne,
|
|
3
|
+
import { i as Dt, K as Ne, g as se, F as kt, m as fe, u as N, r as nt, b as Pe, p as je, C as q, c as O, d as Ie, e as At, o as ge, f as Ce, h as _t, k as Vt, l as Wt, W as qt, n as Gt, B as Te, q as ot, s as Xt, _ as R, t as ke, v as Y, w as Me, x as at, y as Ae, z as Ut, A as _e, D as Ve, P as Kt, G as Qt, H as K, J as Zt, L as Yt, N as Re, O as Jt, Q as lt, T as en, U as tn, V as rt, X as nn, Z as on, $ as an, a0 as ue, a1 as ln, a2 as st, a3 as rn, a4 as sn, a5 as cn, a6 as dn, a7 as un, a8 as mn, a9 as fn, aa as gn, ab as Cn, ac as it, ad as pn, ae as vn } from "./index-DHm5c-__.mjs";
|
|
4
4
|
const bn = new Ne("antFadeIn", {
|
|
5
5
|
"0%": {
|
|
6
6
|
opacity: 0
|
|
@@ -32,67 +32,7 @@ const bn = new Ne("antFadeIn", {
|
|
|
32
32
|
animationTimingFunction: "linear"
|
|
33
33
|
}
|
|
34
34
|
}];
|
|
35
|
-
}
|
|
36
|
-
function me(e) {
|
|
37
|
-
if (e)
|
|
38
|
-
return {
|
|
39
|
-
closable: e.closable,
|
|
40
|
-
closeIcon: e.closeIcon
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
function We(e) {
|
|
44
|
-
const {
|
|
45
|
-
closable: t,
|
|
46
|
-
closeIcon: o
|
|
47
|
-
} = e || {};
|
|
48
|
-
return $.useMemo(() => {
|
|
49
|
-
if (
|
|
50
|
-
// If `closable`, whatever rest be should be true
|
|
51
|
-
!t && (t === !1 || o === !1 || o === null)
|
|
52
|
-
)
|
|
53
|
-
return !1;
|
|
54
|
-
if (t === void 0 && o === void 0)
|
|
55
|
-
return null;
|
|
56
|
-
let n = {
|
|
57
|
-
closeIcon: typeof o != "boolean" && o !== null ? o : void 0
|
|
58
|
-
};
|
|
59
|
-
return t && typeof t == "object" && (n = Object.assign(Object.assign({}, n), t)), n;
|
|
60
|
-
}, [t, o]);
|
|
61
|
-
}
|
|
62
|
-
function qe() {
|
|
63
|
-
const e = {};
|
|
64
|
-
for (var t = arguments.length, o = new Array(t), n = 0; n < t; n++)
|
|
65
|
-
o[n] = arguments[n];
|
|
66
|
-
return o.forEach((a) => {
|
|
67
|
-
a && Object.keys(a).forEach((l) => {
|
|
68
|
-
a[l] !== void 0 && (e[l] = a[l]);
|
|
69
|
-
});
|
|
70
|
-
}), e;
|
|
71
|
-
}
|
|
72
|
-
const $n = {};
|
|
73
|
-
function ct(e, t) {
|
|
74
|
-
let o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : $n;
|
|
75
|
-
const n = We(e), a = We(t), l = typeof n != "boolean" ? !!(n != null && n.disabled) : !1, s = $.useMemo(() => Object.assign({
|
|
76
|
-
closeIcon: /* @__PURE__ */ $.createElement(Pe, null)
|
|
77
|
-
}, o), [o]), d = $.useMemo(() => n === !1 ? !1 : n ? qe(s, a, n) : a === !1 ? !1 : a ? qe(s, a) : s.closable ? s : !1, [n, a, s]);
|
|
78
|
-
return $.useMemo(() => {
|
|
79
|
-
if (d === !1)
|
|
80
|
-
return [!1, null, l];
|
|
81
|
-
const {
|
|
82
|
-
closeIconRender: i
|
|
83
|
-
} = s, {
|
|
84
|
-
closeIcon: f
|
|
85
|
-
} = d;
|
|
86
|
-
let c = f;
|
|
87
|
-
if (c != null) {
|
|
88
|
-
i && (c = i(f));
|
|
89
|
-
const u = je(d, !0);
|
|
90
|
-
Object.keys(u).length && (c = /* @__PURE__ */ $.isValidElement(c) ? /* @__PURE__ */ $.cloneElement(c, u) : /* @__PURE__ */ $.createElement("span", Object.assign({}, u), c));
|
|
91
|
-
}
|
|
92
|
-
return [!0, c, l];
|
|
93
|
-
}, [d, s]);
|
|
94
|
-
}
|
|
95
|
-
const xn = (e) => {
|
|
35
|
+
}, $n = (e) => {
|
|
96
36
|
const {
|
|
97
37
|
paddingXXS: t,
|
|
98
38
|
lineWidth: o,
|
|
@@ -193,10 +133,69 @@ const xn = (e) => {
|
|
|
193
133
|
}, ze = (e) => ({
|
|
194
134
|
defaultBg: new kt(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),
|
|
195
135
|
defaultColor: e.colorText
|
|
196
|
-
}),
|
|
136
|
+
}), ct = se("Tag", (e) => {
|
|
197
137
|
const t = Be(e);
|
|
198
|
-
return
|
|
138
|
+
return $n(t);
|
|
199
139
|
}, ze);
|
|
140
|
+
function me(e) {
|
|
141
|
+
if (e)
|
|
142
|
+
return {
|
|
143
|
+
closable: e.closable,
|
|
144
|
+
closeIcon: e.closeIcon
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
function We(e) {
|
|
148
|
+
const {
|
|
149
|
+
closable: t,
|
|
150
|
+
closeIcon: o
|
|
151
|
+
} = e || {};
|
|
152
|
+
return $.useMemo(() => {
|
|
153
|
+
if (
|
|
154
|
+
// If `closable`, whatever rest be should be true
|
|
155
|
+
!t && (t === !1 || o === !1 || o === null)
|
|
156
|
+
)
|
|
157
|
+
return !1;
|
|
158
|
+
if (t === void 0 && o === void 0)
|
|
159
|
+
return null;
|
|
160
|
+
let n = {
|
|
161
|
+
closeIcon: typeof o != "boolean" && o !== null ? o : void 0
|
|
162
|
+
};
|
|
163
|
+
return t && typeof t == "object" && (n = Object.assign(Object.assign({}, n), t)), n;
|
|
164
|
+
}, [t, o]);
|
|
165
|
+
}
|
|
166
|
+
function qe() {
|
|
167
|
+
const e = {};
|
|
168
|
+
for (var t = arguments.length, o = new Array(t), n = 0; n < t; n++)
|
|
169
|
+
o[n] = arguments[n];
|
|
170
|
+
return o.forEach((a) => {
|
|
171
|
+
a && Object.keys(a).forEach((l) => {
|
|
172
|
+
a[l] !== void 0 && (e[l] = a[l]);
|
|
173
|
+
});
|
|
174
|
+
}), e;
|
|
175
|
+
}
|
|
176
|
+
const xn = {};
|
|
177
|
+
function dt(e, t) {
|
|
178
|
+
let o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : xn;
|
|
179
|
+
const n = We(e), a = We(t), l = typeof n != "boolean" ? !!(n != null && n.disabled) : !1, s = $.useMemo(() => Object.assign({
|
|
180
|
+
closeIcon: /* @__PURE__ */ $.createElement(Pe, null)
|
|
181
|
+
}, o), [o]), d = $.useMemo(() => n === !1 ? !1 : n ? qe(s, a, n) : a === !1 ? !1 : a ? qe(s, a) : s.closable ? s : !1, [n, a, s]);
|
|
182
|
+
return $.useMemo(() => {
|
|
183
|
+
if (d === !1)
|
|
184
|
+
return [!1, null, l];
|
|
185
|
+
const {
|
|
186
|
+
closeIconRender: i
|
|
187
|
+
} = s, {
|
|
188
|
+
closeIcon: f
|
|
189
|
+
} = d;
|
|
190
|
+
let c = f;
|
|
191
|
+
if (c != null) {
|
|
192
|
+
i && (c = i(f));
|
|
193
|
+
const u = je(d, !0);
|
|
194
|
+
Object.keys(u).length && (c = /* @__PURE__ */ $.isValidElement(c) ? /* @__PURE__ */ $.cloneElement(c, u) : /* @__PURE__ */ $.createElement("span", Object.assign({}, u), c));
|
|
195
|
+
}
|
|
196
|
+
return [!0, c, l];
|
|
197
|
+
}, [d, s]);
|
|
198
|
+
}
|
|
200
199
|
var Sn = function(e, t) {
|
|
201
200
|
var o = {};
|
|
202
201
|
for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
|
|
@@ -217,7 +216,7 @@ const On = /* @__PURE__ */ r.forwardRef((e, t) => {
|
|
|
217
216
|
tag: c
|
|
218
217
|
} = r.useContext(q), u = (b) => {
|
|
219
218
|
s == null || s(!l), d == null || d(b);
|
|
220
|
-
}, m = f("tag", o), [p, y, g] =
|
|
219
|
+
}, m = f("tag", o), [p, y, g] = ct(m), C = O(m, `${m}-checkable`, {
|
|
221
220
|
[`${m}-checkable-checked`]: l
|
|
222
221
|
}, c == null ? void 0 : c.className, a, y, g);
|
|
223
222
|
return p(/* @__PURE__ */ r.createElement("span", Object.assign({}, i, {
|
|
@@ -301,7 +300,7 @@ const In = /* @__PURE__ */ r.forwardRef((e, t) => {
|
|
|
301
300
|
}, [u]);
|
|
302
301
|
const x = _t(i), E = Vt(i), w = x || E, S = Object.assign(Object.assign({
|
|
303
302
|
backgroundColor: i && !w ? i : void 0
|
|
304
|
-
}, g == null ? void 0 : g.style), l), h = p("tag", o), [I, j, L] =
|
|
303
|
+
}, g == null ? void 0 : g.style), l), h = p("tag", o), [I, j, L] = ct(h), H = O(h, g == null ? void 0 : g.className, {
|
|
305
304
|
[`${h}-${i}`]: w,
|
|
306
305
|
[`${h}-has-color`]: i && !w,
|
|
307
306
|
[`${h}-hidden`]: !C,
|
|
@@ -309,7 +308,7 @@ const In = /* @__PURE__ */ r.forwardRef((e, t) => {
|
|
|
309
308
|
[`${h}-borderless`]: !c
|
|
310
309
|
}, n, a, j, L), F = (T) => {
|
|
311
310
|
T.stopPropagation(), f == null || f(T), !T.defaultPrevented && b(!1);
|
|
312
|
-
}, [, X] =
|
|
311
|
+
}, [, X] = dt(me(e), me(g), {
|
|
313
312
|
closable: !1,
|
|
314
313
|
closeIconRender: (T) => {
|
|
315
314
|
const J = /* @__PURE__ */ r.createElement("span", {
|
|
@@ -1830,7 +1829,7 @@ const St = (e) => {
|
|
|
1830
1829
|
}), W = x !== null && !h ? /* @__PURE__ */ r.createElement(bt, Object.assign({}, e, {
|
|
1831
1830
|
onOk: d,
|
|
1832
1831
|
onCancel: s
|
|
1833
|
-
})) : null, [A, T, J] =
|
|
1832
|
+
})) : null, [A, T, J] = dt(me(e), me(l), {
|
|
1834
1833
|
closable: !0,
|
|
1835
1834
|
closeIcon: /* @__PURE__ */ r.createElement(Pe, {
|
|
1836
1835
|
className: `${j}-close-icon`
|