ysyt-react-agent-lib 1.0.1 → 1.0.3
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 → ConsultModel-DSUS4oAZ.js} +1 -1
- package/dist/ConsultModel-DljDMfEI.mjs +50 -0
- package/dist/TransferModel-B0wM8RRP.js +2 -0
- package/dist/{TransferModel-Bu4UQ9aN.mjs → TransferModel-DA1McTfO.mjs} +142 -124
- package/dist/{index-DZfpPJgy.js → index-CA2K8i3v.js} +307 -307
- package/dist/{index-DTX4tP2H.mjs → index-DQqM3Rj7.mjs} +30369 -30207
- package/dist/index-DX9HJNYe.js +14 -0
- package/dist/{index-NUSGrx9W.mjs → index-rGtROgVw.mjs} +1633 -1634
- package/dist/ysyt-react-agent-lib.cjs.js +1 -1
- package/dist/ysyt-react-agent-lib.css +1 -1
- package/dist/ysyt-react-agent-lib.es.js +1 -1
- package/package.json +2 -1
- package/dist/ConsultModel-CiPCsHT1.mjs +0 -28
- package/dist/TransferModel-DxA5-9Ev.js +0 -2
- package/dist/index-BMQnWcgt.js +0 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-DX9HJNYe.js"),e=require("./index-CA2K8i3v.js"),s=require("react"),x=s.memo(({open:n,onCallBack:r,queryFetch:a})=>{const[i,c]=s.useState([]);return s.useEffect(()=>{(async()=>{try{await a({success:t=>{c(t.data||[])}})}catch(t){console.log(t)}})()},[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:e.jsxRuntimeExports.jsx(e.Space,{wrap:!0,children:i.map(t=>e.jsxRuntimeExports.jsxs(o.Tag,{color:"processing",onClick:()=>r(t.agent_no),children:[e.jsxRuntimeExports.jsxs("span",{style:{marginRight:10},children:["咨询坐席: ",t.agent_name]}),e.jsxRuntimeExports.jsx(e.IconSvg,{name:"zixun"})]},t.agent_no))})})})})});exports.default=x;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { M as c, T as l } from "./index-rGtROgVw.mjs";
|
|
2
|
+
import { j as e, M as i, S as d, I as g } from "./index-DQqM3Rj7.mjs";
|
|
3
|
+
import { memo as m, useState as x, useEffect as j } from "react";
|
|
4
|
+
const h = m(({
|
|
5
|
+
open: a,
|
|
6
|
+
onCallBack: t,
|
|
7
|
+
queryFetch: n
|
|
8
|
+
}) => {
|
|
9
|
+
const [o, r] = x([]);
|
|
10
|
+
return j(() => {
|
|
11
|
+
(async () => {
|
|
12
|
+
try {
|
|
13
|
+
await n({
|
|
14
|
+
success: (s) => {
|
|
15
|
+
r(s.data || []);
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
} catch (s) {
|
|
19
|
+
console.log(s);
|
|
20
|
+
}
|
|
21
|
+
})();
|
|
22
|
+
}, [a]), /* @__PURE__ */ e.jsx(e.Fragment, {
|
|
23
|
+
children: /* @__PURE__ */ e.jsx(c, {
|
|
24
|
+
open: a,
|
|
25
|
+
title: "咨询",
|
|
26
|
+
footer: !1,
|
|
27
|
+
onCancel: () => t(),
|
|
28
|
+
children: /* @__PURE__ */ e.jsx(i, {
|
|
29
|
+
children: /* @__PURE__ */ e.jsx(d, {
|
|
30
|
+
wrap: !0,
|
|
31
|
+
children: o.map((s) => /* @__PURE__ */ e.jsxs(l, {
|
|
32
|
+
color: "processing",
|
|
33
|
+
onClick: () => t(s.agent_no),
|
|
34
|
+
children: [/* @__PURE__ */ e.jsxs("span", {
|
|
35
|
+
style: {
|
|
36
|
+
marginRight: 10
|
|
37
|
+
},
|
|
38
|
+
children: ["咨询坐席: ", s.agent_name]
|
|
39
|
+
}), /* @__PURE__ */ e.jsx(g, {
|
|
40
|
+
name: "zixun"
|
|
41
|
+
})]
|
|
42
|
+
}, s.agent_no))
|
|
43
|
+
})
|
|
44
|
+
})
|
|
45
|
+
})
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
export {
|
|
49
|
+
h as default
|
|
50
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-CA2K8i3v.js"),A=require("./index-DX9HJNYe.js"),j=require("react");function K(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const i in e)if(i!=="default"){const t=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(n,i,t.get?t:{enumerable:!0,get:()=>e[i]})}}return n.default=e,Object.freeze(n)}const a=K(j),Q=e=>{const{componentCls:n,antCls:i}=e,t=`${n}-group`;return{[t]:Object.assign(Object.assign({},r.resetComponent(e)),{display:"inline-block",fontSize:0,[`&${t}-rtl`]:{direction:"rtl"},[`&${t}-block`]:{display:"flex"},[`${i}-badge ${i}-badge-count`]:{zIndex:1},[`> ${i}-badge:not(:first-child) > ${i}-button-wrapper`]:{borderInlineStart:"none"}})}},Y=e=>{const{componentCls:n,wrapperMarginInlineEnd:i,colorPrimary:t,radioSize:o,motionDurationSlow:l,motionDurationMid:C,motionEaseInOutCirc:g,colorBgContainer:d,colorBorder:$,lineWidth:f,colorBgContainerDisabled:s,colorTextDisabled:O,paddingXS:k,dotColorDisabled:w,lineType:x,radioColor:u,radioBgColor:R,calc:h}=e,S=`${n}-inner`,P=h(o).sub(h(4).mul(2)),c=h(1).mul(o).equal({unit:!0});return{[`${n}-wrapper`]:Object.assign(Object.assign({},r.resetComponent(e)),{display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:i,cursor:"pointer","&:last-child":{marginInlineEnd:0},[`&${n}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:e.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},"&-block":{flex:1,justifyContent:"center"},[`${n}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${r.unit(f)} ${x} ${t}`,borderRadius:"50%",visibility:"hidden",opacity:0,content:'""'},[n]:Object.assign(Object.assign({},r.resetComponent(e)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center",borderRadius:"50%"}),[`${n}-wrapper:hover &,
|
|
2
|
+
&:hover ${S}`]:{borderColor:t},[`${n}-input:focus-visible + ${S}`]:Object.assign({},r.genFocusOutline(e)),[`${n}:hover::after, ${n}-wrapper:hover &::after`]:{visibility:"visible"},[`${n}-inner`]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:c,height:c,marginBlockStart:h(1).mul(o).div(-2).equal({unit:!0}),marginInlineStart:h(1).mul(o).div(-2).equal({unit:!0}),backgroundColor:u,borderBlockStart:0,borderInlineStart:0,borderRadius:c,transform:"scale(0)",opacity:0,transition:`all ${l} ${g}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:c,height:c,backgroundColor:d,borderColor:$,borderStyle:"solid",borderWidth:f,borderRadius:"50%",transition:`all ${C}`},[`${n}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0},[`${n}-checked`]:{[S]:{borderColor:t,backgroundColor:R,"&::after":{transform:`scale(${e.calc(e.dotSize).div(o).equal()})`,opacity:1,transition:`all ${l} ${g}`}}},[`${n}-disabled`]:{cursor:"not-allowed",[S]:{backgroundColor:s,borderColor:$,cursor:"not-allowed","&::after":{backgroundColor:w}},[`${n}-input`]:{cursor:"not-allowed"},[`${n}-disabled + span`]:{color:O,cursor:"not-allowed"},[`&${n}-checked`]:{[S]:{"&::after":{transform:`scale(${h(P).div(o).equal()})`}}}},[`span${n} + *`]:{paddingInlineStart:k,paddingInlineEnd:k}})}},Z=e=>{const{buttonColor:n,controlHeight:i,componentCls:t,lineWidth:o,lineType:l,colorBorder:C,motionDurationSlow:g,motionDurationMid:d,buttonPaddingInline:$,fontSize:f,buttonBg:s,fontSizeLG:O,controlHeightLG:k,controlHeightSM:w,paddingXS:x,borderRadius:u,borderRadiusSM:R,borderRadiusLG:h,buttonCheckedBg:S,buttonSolidCheckedColor:y,colorTextDisabled:P,colorBgContainerDisabled:c,buttonCheckedBgDisabled:_,buttonCheckedColorDisabled:v,colorPrimary:b,colorPrimaryHover:z,colorPrimaryActive:p,buttonSolidCheckedBg:I,buttonSolidCheckedHoverBg:B,buttonSolidCheckedActiveBg:N,calc:E}=e;return{[`${t}-button-wrapper`]:{position:"relative",display:"inline-block",height:i,margin:0,paddingInline:$,paddingBlock:0,color:n,fontSize:f,lineHeight:r.unit(E(i).sub(E(o).mul(2)).equal()),background:s,border:`${r.unit(o)} ${l} ${C}`,borderBlockStartWidth:E(o).add(.02).equal(),borderInlineStartWidth:0,borderInlineEndWidth:o,cursor:"pointer",transition:[`color ${d}`,`background ${d}`,`box-shadow ${d}`].join(","),a:{color:n},[`> ${t}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:first-child)":{"&::before":{position:"absolute",insetBlockStart:E(o).mul(-1).equal(),insetInlineStart:E(o).mul(-1).equal(),display:"block",boxSizing:"content-box",width:1,height:"100%",paddingBlock:o,paddingInline:0,backgroundColor:C,transition:`background-color ${g}`,content:'""'}},"&:first-child":{borderInlineStart:`${r.unit(o)} ${l} ${C}`,borderStartStartRadius:u,borderEndStartRadius:u},"&:last-child":{borderStartEndRadius:u,borderEndEndRadius:u},"&:first-child:last-child":{borderRadius:u},[`${t}-group-large &`]:{height:k,fontSize:O,lineHeight:r.unit(E(k).sub(E(o).mul(2)).equal()),"&:first-child":{borderStartStartRadius:h,borderEndStartRadius:h},"&:last-child":{borderStartEndRadius:h,borderEndEndRadius:h}},[`${t}-group-small &`]:{height:w,paddingInline:E(x).sub(o).equal(),paddingBlock:0,lineHeight:r.unit(E(w).sub(E(o).mul(2)).equal()),"&:first-child":{borderStartStartRadius:R,borderEndStartRadius:R},"&:last-child":{borderStartEndRadius:R,borderEndEndRadius:R}},"&:hover":{position:"relative",color:b},"&:has(:focus-visible)":Object.assign({},r.genFocusOutline(e)),[`${t}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${t}-button-wrapper-disabled)`]:{zIndex:1,color:b,background:S,borderColor:b,"&::before":{backgroundColor:b},"&:first-child":{borderColor:b},"&:hover":{color:z,borderColor:z,"&::before":{backgroundColor:z}},"&:active":{color:p,borderColor:p,"&::before":{backgroundColor:p}}},[`${t}-group-solid &-checked:not(${t}-button-wrapper-disabled)`]:{color:y,background:I,borderColor:I,"&:hover":{color:y,background:B,borderColor:B},"&:active":{color:y,background:N,borderColor:N}},"&-disabled":{color:P,backgroundColor:c,borderColor:C,cursor:"not-allowed","&:first-child, &:hover":{color:P,backgroundColor:c,borderColor:C}},[`&-disabled${t}-button-wrapper-checked`]:{color:v,backgroundColor:_,borderColor:C,boxShadow:"none"},"&-block":{flex:1,textAlign:"center"}}}},ee=e=>{const{wireframe:n,padding:i,marginXS:t,lineWidth:o,fontSizeLG:l,colorText:C,colorBgContainer:g,colorTextDisabled:d,controlItemBgActiveDisabled:$,colorTextLightSolid:f,colorPrimary:s,colorPrimaryHover:O,colorPrimaryActive:k,colorWhite:w}=e,x=4,u=l,R=n?u-x*2:u-(x+o)*2;return{radioSize:u,dotSize:R,dotColorDisabled:d,buttonSolidCheckedColor:f,buttonSolidCheckedBg:s,buttonSolidCheckedHoverBg:O,buttonSolidCheckedActiveBg:k,buttonBg:g,buttonCheckedBg:g,buttonColor:C,buttonCheckedBgDisabled:$,buttonCheckedColorDisabled:d,buttonPaddingInline:i-o,wrapperMarginInlineEnd:t,radioColor:n?s:w,radioBgColor:n?g:s}},H=r.genStyleHooks("Radio",e=>{const{controlOutline:n,controlOutlineWidth:i}=e,t=`0 0 0 ${r.unit(i)} ${n}`,o=t,l=r.merge(e,{radioFocusShadow:t,radioButtonFocusShadow:o});return[Q(l),Y(l),Z(l)]},ee,{unitless:{radioSize:!0,dotSize:!0}}),W=a.createContext(null),te=W.Provider,F=a.createContext(null),oe=F.Provider;var re=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],ne=j.forwardRef(function(e,n){var i=e.prefixCls,t=i===void 0?"rc-checkbox":i,o=e.className,l=e.style,C=e.checked,g=e.disabled,d=e.defaultChecked,$=d===void 0?!1:d,f=e.type,s=f===void 0?"checkbox":f,O=e.title,k=e.onChange,w=r._objectWithoutProperties(e,re),x=j.useRef(null),u=j.useRef(null),R=r.useMergedState($,{value:C}),h=r._slicedToArray(R,2),S=h[0],y=h[1];j.useImperativeHandle(n,function(){return{focus:function(v){var b;(b=x.current)===null||b===void 0||b.focus(v)},blur:function(){var v;(v=x.current)===null||v===void 0||v.blur()},input:x.current,nativeElement:u.current}});var P=r.classNames(t,o,r._defineProperty(r._defineProperty({},"".concat(t,"-checked"),S),"".concat(t,"-disabled"),g)),c=function(v){g||("checked"in e||y(v.target.checked),k==null||k({target:r._objectSpread2(r._objectSpread2({},e),{},{type:s,checked:v.target.checked}),stopPropagation:function(){v.stopPropagation()},preventDefault:function(){v.preventDefault()},nativeEvent:v.nativeEvent}))};return a.createElement("span",{className:P,title:O,style:l,ref:u},a.createElement("input",r._extends({},w,{className:"".concat(t,"-input"),ref:x,onChange:c,disabled:g,checked:!!S,type:s})),a.createElement("span",{className:"".concat(t,"-inner")}))});function ie(e){const n=j.useRef(null),i=()=>{r.wrapperRaf.cancel(n.current),n.current=null};return[()=>{i(),n.current=r.wrapperRaf(()=>{n.current=null})},l=>{n.current&&(l.stopPropagation(),i()),e==null||e(l)}]}var ae=function(e,n){var i={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(i[t]=e[t]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,t=Object.getOwnPropertySymbols(e);o<t.length;o++)n.indexOf(t[o])<0&&Object.prototype.propertyIsEnumerable.call(e,t[o])&&(i[t[o]]=e[t[o]]);return i};const le=(e,n)=>{var i,t;const o=a.useContext(W),l=a.useContext(F),{getPrefixCls:C,direction:g,radio:d}=a.useContext(r.ConfigContext),$=a.useRef(null),f=r.composeRef(n,$),{isFormItemInput:s}=a.useContext(r.FormItemInputContext);if(process.env.NODE_ENV!=="production"){const D=r.devUseWarning("Radio");process.env.NODE_ENV!=="production"&&D(!("optionType"in e),"usage","`optionType` is only support in Radio.Group.")}const O=D=>{var M,T;(M=e.onChange)===null||M===void 0||M.call(e,D),(T=o==null?void 0:o.onChange)===null||T===void 0||T.call(o,D)},{prefixCls:k,className:w,rootClassName:x,children:u,style:R,title:h}=e,S=ae(e,["prefixCls","className","rootClassName","children","style","title"]),y=C("radio",k),P=((o==null?void 0:o.optionType)||l)==="button",c=P?`${y}-button`:y,_=r.useCSSVarCls(y),[v,b,z]=H(y,_),p=Object.assign({},S),I=a.useContext(r.DisabledContext);o&&(p.name=o.name,p.onChange=O,p.checked=e.value===o.value,p.disabled=(i=p.disabled)!==null&&i!==void 0?i:o.disabled),p.disabled=(t=p.disabled)!==null&&t!==void 0?t:I;const B=r.classNames(`${c}-wrapper`,{[`${c}-wrapper-checked`]:p.checked,[`${c}-wrapper-disabled`]:p.disabled,[`${c}-wrapper-rtl`]:g==="rtl",[`${c}-wrapper-in-form-item`]:s,[`${c}-wrapper-block`]:!!(o!=null&&o.block)},d==null?void 0:d.className,w,x,b,z,_),[N,E]=ie(p.onClick);return v(a.createElement(r.Wave,{component:"Radio",disabled:p.disabled},a.createElement("label",{className:B,style:Object.assign(Object.assign({},d==null?void 0:d.style),R),onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,title:h,onClick:N},a.createElement(ne,Object.assign({},p,{className:r.classNames(p.className,{[r.TARGET_CLS]:!P}),type:"radio",prefixCls:c,ref:f,onClick:E})),u!==void 0?a.createElement("span",{className:`${c}-label`},u):null)))},V=a.forwardRef(le);process.env.NODE_ENV!=="production"&&(V.displayName="Radio");const se=a.forwardRef((e,n)=>{const{getPrefixCls:i,direction:t}=a.useContext(r.ConfigContext),o=r.useId(),{prefixCls:l,className:C,rootClassName:g,options:d,buttonStyle:$="outline",disabled:f,children:s,size:O,style:k,id:w,optionType:x,name:u=o,defaultValue:R,value:h,block:S=!1,onChange:y,onMouseEnter:P,onMouseLeave:c,onFocus:_,onBlur:v}=e,[b,z]=r.useMergedState(R,{value:h}),p=a.useCallback(m=>{const J=b,G=m.target.value;"value"in e||z(G),G!==J&&(y==null||y(m))},[b,z,y]),I=i("radio",l),B=`${I}-group`,N=r.useCSSVarCls(I),[E,D,M]=H(I,N);let T=s;d&&d.length>0&&(T=d.map(m=>typeof m=="string"||typeof m=="number"?a.createElement(V,{key:m.toString(),prefixCls:I,disabled:f,value:m,checked:b===m},m):a.createElement(V,{key:`radio-group-value-options-${m.value}`,prefixCls:I,disabled:m.disabled||f,value:m.value,checked:b===m.value,title:m.title,style:m.style,id:m.id,required:m.required},m.label)));const L=r.useSize(O),X=r.classNames(B,`${B}-${$}`,{[`${B}-${L}`]:L,[`${B}-rtl`]:t==="rtl",[`${B}-block`]:S},C,g,D,M,N),U=a.useMemo(()=>({onChange:p,value:b,disabled:f,name:u,optionType:x,block:S}),[p,b,f,u,x,S]);return E(a.createElement("div",Object.assign({},r.pickAttrs(e,{aria:!0,data:!0}),{className:X,style:k,onMouseEnter:P,onMouseLeave:c,onFocus:_,onBlur:v,id:w,ref:n}),a.createElement(te,{value:U},T)))}),de=a.memo(se);var ce=function(e,n){var i={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(i[t]=e[t]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,t=Object.getOwnPropertySymbols(e);o<t.length;o++)n.indexOf(t[o])<0&&Object.prototype.propertyIsEnumerable.call(e,t[o])&&(i[t[o]]=e[t[o]]);return i};const ue=(e,n)=>{const{getPrefixCls:i}=a.useContext(r.ConfigContext),{prefixCls:t}=e,o=ce(e,["prefixCls"]),l=i("radio",t);return a.createElement(oe,{value:"button"},a.createElement(V,Object.assign({prefixCls:l},o,{type:"radio",ref:n})))},be=a.forwardRef(ue),q=V;q.Button=be;q.Group=de;q.__ANT_RADIO=!0;const pe=j.memo(({open:e,onCallBack:n,queryFetch:i})=>{const[t,o]=j.useState([]),[l,C]=j.useState(0),[g,d]=j.useState(""),[$,f]=j.useState(!1);return j.useEffect(()=>{(async()=>{f(!0);try{await i({success:s=>{o(s.data||[])}})}catch(s){console.log(s)}f(!1)})()},[e]),r.jsxRuntimeExports.jsx(r.jsxRuntimeExports.Fragment,{children:r.jsxRuntimeExports.jsx(A.Modal,{open:e,title:"转接",footer:!1,onCancel:()=>n(),children:r.jsxRuntimeExports.jsxs(r.ModelBody,{children:[r.jsxRuntimeExports.jsx("div",{children:r.jsxRuntimeExports.jsx(q.Group,{options:[{label:"转接坐席",value:0},{label:"转接技能组",value:1}],value:l,onChange:s=>C(s.target.value)})}),r.jsxRuntimeExports.jsx(r.Spin,{spinning:$,children:r.jsxRuntimeExports.jsxs("div",{style:{borderTop:"1px solid #eee",marginTop:10,paddingTop:10},children:[l===0&&r.jsxRuntimeExports.jsx(r.Space,{wrap:!0,children:t.map(s=>r.jsxRuntimeExports.jsxs(A.Tag,{color:"processing",onClick:()=>n(s.agent_no),children:[r.jsxRuntimeExports.jsxs("span",{style:{marginRight:10},children:["咨询坐席: ",s.agent_name]}),r.jsxRuntimeExports.jsx(r.IconSvg,{name:"zixun"})]},s.agent_no))}),l===1&&r.jsxRuntimeExports.jsx(r.Input,{value:g,onChange:s=>d(s.target.value),placeholder:"请输入外线号码, 回车转接",onPressEnter:()=>{n(g)}})]})})]})})})});exports.default=pe;
|
|
@@ -1,70 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { g as ie, m as le, u as D, r as W, a as Q, _ as se, b as Y, c as de, d as q, e as X, f as ce, h as U, w as J, 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-DQqM3Rj7.mjs";
|
|
2
|
+
import { M as Re, T as we } from "./index-rGtROgVw.mjs";
|
|
2
3
|
import * as a from "react";
|
|
3
|
-
import
|
|
4
|
-
|
|
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) => {
|
|
4
|
+
import Ee, { forwardRef as Ie, useRef as K, useImperativeHandle as Pe, memo as Be, useState as V, useEffect as Oe } from "react";
|
|
5
|
+
const je = (e) => {
|
|
68
6
|
const {
|
|
69
7
|
componentCls: r,
|
|
70
8
|
antCls: n
|
|
@@ -88,7 +26,7 @@ const Ne = (e) => {
|
|
|
88
26
|
}
|
|
89
27
|
})
|
|
90
28
|
};
|
|
91
|
-
},
|
|
29
|
+
}, _e = (e) => {
|
|
92
30
|
const {
|
|
93
31
|
componentCls: r,
|
|
94
32
|
wrapperMarginInlineEnd: n,
|
|
@@ -164,7 +102,7 @@ const Ne = (e) => {
|
|
|
164
102
|
&:hover ${S}`]: {
|
|
165
103
|
borderColor: o
|
|
166
104
|
},
|
|
167
|
-
[`${r}-input:focus-visible + ${S}`]: Object.assign({},
|
|
105
|
+
[`${r}-input:focus-visible + ${S}`]: Object.assign({}, Q(e)),
|
|
168
106
|
[`${r}:hover::after, ${r}-wrapper:hover &::after`]: {
|
|
169
107
|
visibility: "visible"
|
|
170
108
|
},
|
|
@@ -256,7 +194,7 @@ const Ne = (e) => {
|
|
|
256
194
|
}
|
|
257
195
|
})
|
|
258
196
|
};
|
|
259
|
-
},
|
|
197
|
+
}, ze = (e) => {
|
|
260
198
|
const {
|
|
261
199
|
buttonColor: r,
|
|
262
200
|
controlHeight: n,
|
|
@@ -380,7 +318,7 @@ const Ne = (e) => {
|
|
|
380
318
|
position: "relative",
|
|
381
319
|
color: u
|
|
382
320
|
},
|
|
383
|
-
"&:has(:focus-visible)": Object.assign({},
|
|
321
|
+
"&:has(:focus-visible)": Object.assign({}, Q(e)),
|
|
384
322
|
[`${o}-inner, input[type='checkbox'], input[type='radio']`]: {
|
|
385
323
|
width: 0,
|
|
386
324
|
height: 0,
|
|
@@ -451,7 +389,7 @@ const Ne = (e) => {
|
|
|
451
389
|
}
|
|
452
390
|
}
|
|
453
391
|
};
|
|
454
|
-
},
|
|
392
|
+
}, De = (e) => {
|
|
455
393
|
const {
|
|
456
394
|
wireframe: r,
|
|
457
395
|
padding: n,
|
|
@@ -489,21 +427,82 @@ const Ne = (e) => {
|
|
|
489
427
|
radioColor: r ? l : E,
|
|
490
428
|
radioBgColor: r ? p : l
|
|
491
429
|
};
|
|
492
|
-
},
|
|
430
|
+
}, ee = ie("Radio", (e) => {
|
|
493
431
|
const {
|
|
494
432
|
controlOutline: r,
|
|
495
433
|
controlOutlineWidth: n
|
|
496
|
-
} = e, o = `0 0 0 ${D(n)} ${r}`, i =
|
|
434
|
+
} = e, o = `0 0 0 ${D(n)} ${r}`, i = le(e, {
|
|
497
435
|
radioFocusShadow: o,
|
|
498
436
|
radioButtonFocusShadow: o
|
|
499
437
|
});
|
|
500
|
-
return [
|
|
501
|
-
},
|
|
438
|
+
return [je(i), _e(i), ze(i)];
|
|
439
|
+
}, De, {
|
|
502
440
|
unitless: {
|
|
503
441
|
radioSize: !0,
|
|
504
442
|
dotSize: !0
|
|
505
443
|
}
|
|
444
|
+
}), oe = /* @__PURE__ */ a.createContext(null), Te = oe.Provider, te = /* @__PURE__ */ a.createContext(null), Ne = te.Provider;
|
|
445
|
+
var Me = ["prefixCls", "className", "style", "checked", "disabled", "defaultChecked", "type", "title", "onChange"], Le = /* @__PURE__ */ Ie(function(e, r) {
|
|
446
|
+
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 = se(e, Me), m = K(null), c = K(null), $ = Y(x, {
|
|
447
|
+
value: f
|
|
448
|
+
}), h = de($, 2), S = h[0], y = h[1];
|
|
449
|
+
Pe(r, function() {
|
|
450
|
+
return {
|
|
451
|
+
focus: function(v) {
|
|
452
|
+
var u;
|
|
453
|
+
(u = m.current) === null || u === void 0 || u.focus(v);
|
|
454
|
+
},
|
|
455
|
+
blur: function() {
|
|
456
|
+
var v;
|
|
457
|
+
(v = m.current) === null || v === void 0 || v.blur();
|
|
458
|
+
},
|
|
459
|
+
input: m.current,
|
|
460
|
+
nativeElement: c.current
|
|
461
|
+
};
|
|
462
|
+
});
|
|
463
|
+
var P = q(o, t, X(X({}, "".concat(o, "-checked"), S), "".concat(o, "-disabled"), p)), d = function(v) {
|
|
464
|
+
p || ("checked" in e || y(v.target.checked), k == null || k({
|
|
465
|
+
target: U(U({}, e), {}, {
|
|
466
|
+
type: l,
|
|
467
|
+
checked: v.target.checked
|
|
468
|
+
}),
|
|
469
|
+
stopPropagation: function() {
|
|
470
|
+
v.stopPropagation();
|
|
471
|
+
},
|
|
472
|
+
preventDefault: function() {
|
|
473
|
+
v.preventDefault();
|
|
474
|
+
},
|
|
475
|
+
nativeEvent: v.nativeEvent
|
|
476
|
+
}));
|
|
477
|
+
};
|
|
478
|
+
return /* @__PURE__ */ a.createElement("span", {
|
|
479
|
+
className: P,
|
|
480
|
+
title: I,
|
|
481
|
+
style: i,
|
|
482
|
+
ref: c
|
|
483
|
+
}, /* @__PURE__ */ a.createElement("input", ce({}, E, {
|
|
484
|
+
className: "".concat(o, "-input"),
|
|
485
|
+
ref: m,
|
|
486
|
+
onChange: d,
|
|
487
|
+
disabled: p,
|
|
488
|
+
checked: !!S,
|
|
489
|
+
type: l
|
|
490
|
+
})), /* @__PURE__ */ a.createElement("span", {
|
|
491
|
+
className: "".concat(o, "-inner")
|
|
492
|
+
}));
|
|
506
493
|
});
|
|
494
|
+
function Ve(e) {
|
|
495
|
+
const r = Ee.useRef(null), n = () => {
|
|
496
|
+
J.cancel(r.current), r.current = null;
|
|
497
|
+
};
|
|
498
|
+
return [() => {
|
|
499
|
+
n(), r.current = J(() => {
|
|
500
|
+
r.current = null;
|
|
501
|
+
});
|
|
502
|
+
}, (i) => {
|
|
503
|
+
r.current && (i.stopPropagation(), n()), e == null || e(i);
|
|
504
|
+
}];
|
|
505
|
+
}
|
|
507
506
|
var qe = function(e, r) {
|
|
508
507
|
var n = {};
|
|
509
508
|
for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && r.indexOf(o) < 0 && (n[o] = e[o]);
|
|
@@ -513,7 +512,7 @@ var qe = function(e, r) {
|
|
|
513
512
|
};
|
|
514
513
|
const Ge = (e, r) => {
|
|
515
514
|
var n, o;
|
|
516
|
-
const t = a.useContext(
|
|
515
|
+
const t = a.useContext(oe), i = a.useContext(te), {
|
|
517
516
|
getPrefixCls: f,
|
|
518
517
|
direction: p,
|
|
519
518
|
radio: s
|
|
@@ -534,7 +533,7 @@ const Ge = (e, r) => {
|
|
|
534
533
|
children: c,
|
|
535
534
|
style: $,
|
|
536
535
|
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, _] =
|
|
536
|
+
} = 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, _] = ee(y, j), b = Object.assign({}, S), B = a.useContext(ge);
|
|
538
537
|
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
538
|
const O = q(`${d}-wrapper`, {
|
|
540
539
|
[`${d}-wrapper-checked`]: b.checked,
|
|
@@ -542,7 +541,7 @@ const Ge = (e, r) => {
|
|
|
542
541
|
[`${d}-wrapper-rtl`]: p === "rtl",
|
|
543
542
|
[`${d}-wrapper-in-form-item`]: l,
|
|
544
543
|
[`${d}-wrapper-block`]: !!(t != null && t.block)
|
|
545
|
-
}, s == null ? void 0 : s.className, E, m, u, _, j), [z, R] =
|
|
544
|
+
}, s == null ? void 0 : s.className, E, m, u, _, j), [z, R] = Ve(b.onClick);
|
|
546
545
|
return v(/* @__PURE__ */ a.createElement(fe, {
|
|
547
546
|
component: "Radio",
|
|
548
547
|
disabled: b.disabled
|
|
@@ -553,7 +552,7 @@ const Ge = (e, r) => {
|
|
|
553
552
|
onMouseLeave: e.onMouseLeave,
|
|
554
553
|
title: h,
|
|
555
554
|
onClick: z
|
|
556
|
-
}, /* @__PURE__ */ a.createElement(
|
|
555
|
+
}, /* @__PURE__ */ a.createElement(Le, Object.assign({}, b, {
|
|
557
556
|
className: q(b.className, {
|
|
558
557
|
[he]: !P
|
|
559
558
|
}),
|
|
@@ -591,12 +590,12 @@ const We = /* @__PURE__ */ a.forwardRef((e, r) => {
|
|
|
591
590
|
onMouseLeave: d,
|
|
592
591
|
onFocus: j,
|
|
593
592
|
onBlur: v
|
|
594
|
-
} = e, [u, _] =
|
|
593
|
+
} = e, [u, _] = Y($, {
|
|
595
594
|
value: h
|
|
596
595
|
}), b = a.useCallback((C) => {
|
|
597
596
|
const ae = u, F = C.target.value;
|
|
598
597
|
"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] =
|
|
598
|
+
}, [u, _, y]), B = n("radio", i), O = `${B}-group`, z = Z(B), [R, T, M] = ee(B, z);
|
|
600
599
|
let N = l;
|
|
601
600
|
s && s.length > 0 && (N = s.map((C) => typeof C == "string" || typeof C == "number" ? /* @__PURE__ */ a.createElement(L, {
|
|
602
601
|
key: C.toString(),
|
|
@@ -639,7 +638,7 @@ const We = /* @__PURE__ */ a.forwardRef((e, r) => {
|
|
|
639
638
|
onBlur: v,
|
|
640
639
|
id: E,
|
|
641
640
|
ref: r
|
|
642
|
-
}), /* @__PURE__ */ a.createElement(
|
|
641
|
+
}), /* @__PURE__ */ a.createElement(Te, {
|
|
643
642
|
value: ne
|
|
644
643
|
}, N)));
|
|
645
644
|
}), Ae = /* @__PURE__ */ a.memo(We);
|
|
@@ -656,7 +655,7 @@ const Fe = (e, r) => {
|
|
|
656
655
|
} = a.useContext(A), {
|
|
657
656
|
prefixCls: o
|
|
658
657
|
} = e, t = He(e, ["prefixCls"]), i = n("radio", o);
|
|
659
|
-
return /* @__PURE__ */ a.createElement(
|
|
658
|
+
return /* @__PURE__ */ a.createElement(Ne, {
|
|
660
659
|
value: "button"
|
|
661
660
|
}, /* @__PURE__ */ a.createElement(L, Object.assign({
|
|
662
661
|
prefixCls: i
|
|
@@ -668,9 +667,13 @@ const Fe = (e, r) => {
|
|
|
668
667
|
G.Button = Xe;
|
|
669
668
|
G.Group = Ae;
|
|
670
669
|
G.__ANT_RADIO = !0;
|
|
671
|
-
const Qe =
|
|
670
|
+
const Qe = Be(({
|
|
671
|
+
open: e,
|
|
672
|
+
onCallBack: r,
|
|
673
|
+
queryFetch: n
|
|
674
|
+
}) => {
|
|
672
675
|
const [o, t] = V([]), [i, f] = V(0), [p, s] = V(""), [x, g] = V(!1);
|
|
673
|
-
return
|
|
676
|
+
return Oe(() => {
|
|
674
677
|
(async () => {
|
|
675
678
|
g(!0);
|
|
676
679
|
try {
|
|
@@ -684,45 +687,60 @@ const Qe = Ie(({ open: e, onCallBack: r, queryFetch: n }) => {
|
|
|
684
687
|
}
|
|
685
688
|
g(!1);
|
|
686
689
|
})();
|
|
687
|
-
}, [e]), /* @__PURE__ */ w.jsx(w.Fragment, {
|
|
688
|
-
/* @__PURE__ */ w.jsx(
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
690
|
+
}, [e]), /* @__PURE__ */ w.jsx(w.Fragment, {
|
|
691
|
+
children: /* @__PURE__ */ w.jsx(Re, {
|
|
692
|
+
open: e,
|
|
693
|
+
title: "转接",
|
|
694
|
+
footer: !1,
|
|
695
|
+
onCancel: () => r(),
|
|
696
|
+
children: /* @__PURE__ */ w.jsxs(Se, {
|
|
697
|
+
children: [/* @__PURE__ */ w.jsx("div", {
|
|
698
|
+
children: /* @__PURE__ */ w.jsx(G.Group, {
|
|
699
|
+
options: [{
|
|
700
|
+
label: "转接坐席",
|
|
701
|
+
value: 0
|
|
702
|
+
}, {
|
|
703
|
+
label: "转接技能组",
|
|
704
|
+
value: 1
|
|
705
|
+
}],
|
|
706
|
+
value: i,
|
|
707
|
+
onChange: (l) => f(l.target.value)
|
|
708
|
+
})
|
|
709
|
+
}), /* @__PURE__ */ w.jsx(ye, {
|
|
710
|
+
spinning: x,
|
|
711
|
+
children: /* @__PURE__ */ w.jsxs("div", {
|
|
712
|
+
style: {
|
|
713
|
+
borderTop: "1px solid #eee",
|
|
714
|
+
marginTop: 10,
|
|
715
|
+
paddingTop: 10
|
|
716
|
+
},
|
|
717
|
+
children: [i === 0 && /* @__PURE__ */ w.jsx(ke, {
|
|
718
|
+
wrap: !0,
|
|
719
|
+
children: o.map((l) => /* @__PURE__ */ w.jsxs(we, {
|
|
720
|
+
color: "processing",
|
|
721
|
+
onClick: () => r(l.agent_no),
|
|
722
|
+
children: [/* @__PURE__ */ w.jsxs("span", {
|
|
723
|
+
style: {
|
|
724
|
+
marginRight: 10
|
|
725
|
+
},
|
|
726
|
+
children: ["咨询坐席: ", l.agent_name]
|
|
727
|
+
}), /* @__PURE__ */ w.jsx(xe, {
|
|
728
|
+
name: "zixun"
|
|
729
|
+
})]
|
|
730
|
+
}, l.agent_no))
|
|
731
|
+
}), i === 1 && /* @__PURE__ */ w.jsx($e, {
|
|
732
|
+
value: p,
|
|
733
|
+
onChange: (l) => s(l.target.value),
|
|
734
|
+
placeholder: "请输入外线号码, 回车转接",
|
|
735
|
+
onPressEnter: () => {
|
|
736
|
+
r(p);
|
|
737
|
+
}
|
|
738
|
+
})]
|
|
739
|
+
})
|
|
740
|
+
})]
|
|
741
|
+
})
|
|
742
|
+
})
|
|
743
|
+
});
|
|
726
744
|
});
|
|
727
745
|
export {
|
|
728
746
|
Qe as default
|