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,6 +1,6 @@
1
- import { j as e, M as l, E as r, S as i, Y as d } from "./index-CgpAwGZh.mjs";
1
+ import { j as e, M as l, E as r, S as i, Y as d } from "./index-nbd4NOcg.mjs";
2
2
  import { memo as m, useState as g, useEffect as x } from "react";
3
- import { M as j, T as p } from "./index-BWQnZT8R.mjs";
3
+ import { M as j, T as p } from "./index-BTFE6i_0.mjs";
4
4
  const E = m(({ open: a, onCallBack: t, queryFetch: o }) => {
5
5
  const [n, c] = g([]);
6
6
  return x(() => {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-Buw29L62.js"),s=require("react"),o=require("./index-sffudf5b.js"),c=s.memo(({open:n,onCallBack:r,queryFetch:x})=>{const[i,a]=s.useState([]);return s.useEffect(()=>{(async()=>{try{await x({success:t=>{a(t.data||[])}})}catch{}})()},[n]),e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:e.jsxRuntimeExports.jsx(o.Modal,{open:n,title:"咨询",footer:!1,onCancel:()=>r(),children:e.jsxRuntimeExports.jsx(e.ModelBody,{children:i.length===0?e.jsxRuntimeExports.jsx(e.Empty,{image:e.Empty.PRESENTED_IMAGE_SIMPLE}):e.jsxRuntimeExports.jsx(e.Space,{wrap:!0,children:i.map(t=>e.jsxRuntimeExports.jsx(o.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:{marginRight:10},children:["咨询坐席: ",t.agent_name]})]})},t.agent_no))})})})})});exports.default=c;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-B7SvH9mb.js"),s=require("react"),o=require("./index-DIGossl5.js"),c=s.memo(({open:n,onCallBack:r,queryFetch:x})=>{const[i,a]=s.useState([]);return s.useEffect(()=>{(async()=>{try{await x({success:t=>{a(t.data||[])}})}catch{}})()},[n]),e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:e.jsxRuntimeExports.jsx(o.Modal,{open:n,title:"咨询",footer:!1,onCancel:()=>r(),children:e.jsxRuntimeExports.jsx(e.ModelBody,{children:i.length===0?e.jsxRuntimeExports.jsx(e.Empty,{image:e.Empty.PRESENTED_IMAGE_SIMPLE}):e.jsxRuntimeExports.jsx(e.Space,{wrap:!0,children:i.map(t=>e.jsxRuntimeExports.jsx(o.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:{marginRight:10},children:["咨询坐席: ",t.agent_name]})]})},t.agent_no))})})})})});exports.default=c;
@@ -0,0 +1,61 @@
1
+ import { j as e, M as m, R as h, a as j, E as d, S as f, Y as y, I as v } from "./index-nbd4NOcg.mjs";
2
+ import { memo as E, useState as a, useEffect as T } from "react";
3
+ import { M, T as S } from "./index-BTFE6i_0.mjs";
4
+ const _ = E(({ open: r, onCallBack: n, queryFetch: c }) => {
5
+ const [l, g] = a([]), [t, p] = a(0), [o, u] = a(""), [x, i] = a(!1);
6
+ return T(() => {
7
+ (async () => {
8
+ i(!0);
9
+ try {
10
+ await c({
11
+ success: (s) => {
12
+ g(s.data || []);
13
+ }
14
+ });
15
+ } catch {
16
+ }
17
+ i(!1);
18
+ })();
19
+ }, [r]), /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsx(M, { open: r, title: "转接", footer: !1, onCancel: () => n(), children: /* @__PURE__ */ e.jsxs(m, { children: [
20
+ /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx(
21
+ h.Group,
22
+ {
23
+ options: [
24
+ {
25
+ label: "转接坐席",
26
+ value: 0
27
+ },
28
+ {
29
+ label: "转接外线",
30
+ value: 1
31
+ }
32
+ ],
33
+ value: t,
34
+ onChange: (s) => p(s.target.value)
35
+ }
36
+ ) }),
37
+ /* @__PURE__ */ e.jsx(j, { spinning: x, children: /* @__PURE__ */ e.jsxs("div", { style: { borderTop: "1px solid #eee", marginTop: 10, paddingTop: 10 }, children: [
38
+ t === 0 && /* @__PURE__ */ e.jsx(e.Fragment, { children: l.length === 0 ? /* @__PURE__ */ e.jsx(d, { image: d.PRESENTED_IMAGE_SIMPLE }) : /* @__PURE__ */ e.jsx(f, { wrap: !0, children: l.map((s) => /* @__PURE__ */ e.jsx(S, { color: "processing", onClick: () => n(s.agent_no, 0), children: /* @__PURE__ */ e.jsxs("div", { style: { display: "flex", alignItems: "center" }, children: [
39
+ /* @__PURE__ */ e.jsx(y, { name: "zixun" }),
40
+ /* @__PURE__ */ e.jsxs("span", { style: { marginRight: 10 }, children: [
41
+ "转接坐席: ",
42
+ s.agent_name
43
+ ] })
44
+ ] }) }, s.agent_no)) }) }),
45
+ t === 1 && /* @__PURE__ */ e.jsx(
46
+ v,
47
+ {
48
+ value: o,
49
+ onChange: (s) => u(s.target.value),
50
+ placeholder: "请输入外线号码, 回车转接",
51
+ onPressEnter: () => {
52
+ n(o, 1);
53
+ }
54
+ }
55
+ )
56
+ ] }) })
57
+ ] }) }) });
58
+ });
59
+ export {
60
+ _ as default
61
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-B7SvH9mb.js"),s=require("react"),u=require("./index-DIGossl5.js"),m=s.memo(({open:a,onCallBack:n,queryFetch:l})=>{const[i,p]=s.useState([]),[r,c]=s.useState(0),[o,d]=s.useState(""),[j,x]=s.useState(!1);return s.useEffect(()=>{(async()=>{x(!0);try{await l({success:t=>{p(t.data||[])}})}catch{}x(!1)})()},[a]),e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:e.jsxRuntimeExports.jsx(u.Modal,{open:a,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:i.length===0?e.jsxRuntimeExports.jsx(e.Empty,{image:e.Empty.PRESENTED_IMAGE_SIMPLE}):e.jsxRuntimeExports.jsx(e.Space,{wrap:!0,children:i.map(t=>e.jsxRuntimeExports.jsx(u.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:o,onChange:t=>d(t.target.value),placeholder:"请输入外线号码, 回车转接",onPressEnter:()=>{n(o,1)}})]})})]})})})});exports.default=m;
@@ -5,10 +5,12 @@ interface Props {
5
5
  appSecret: string;
6
6
  agentNo: string;
7
7
  enableBrowserAlert?: boolean;
8
+ logBuiltinEnabled?: boolean;
8
9
  style?: {
9
10
  height?: string;
10
11
  idle?: string;
11
12
  busy?: string;
13
+ selectOutNumberColor?: string;
12
14
  };
13
15
  }
14
16
  declare const YsytBarPhone: React.FC<Props>;
@@ -16,4 +16,7 @@ export declare const BounceInTopDiv: import('styled-components/dist/types').ISty
16
16
  height?: string;
17
17
  show: boolean;
18
18
  }>> & string;
19
+ export declare const SelectOutNumberBody: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
20
+ export declare const NumberBody: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
21
+ export declare const NumberItemBody: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
19
22
  export {};