ysyt-react-agent-lib 1.0.9 → 1.0.11

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.
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-DEfQwyc5.js"),w=require("react"),A=require("./index-pHHgVGgx.js");function J(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const i in e)if(i!=="default"){const o=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(n,i,o.get?o:{enumerable:!0,get:()=>e[i]})}}return n.default=e,Object.freeze(n)}const a=J(w),H=a.createContext(null),K=H.Provider,W=a.createContext(null),Q=W.Provider;var Z=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],ee=w.forwardRef(function(e,n){var i=e.prefixCls,o=i===void 0?"rc-checkbox":i,r=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,P=e.title,k=e.onChange,j=t._objectWithoutProperties(e,Z),x=w.useRef(null),u=w.useRef(null),R=t.useMergedState($,{value:C}),h=t._slicedToArray(R,2),S=h[0],y=h[1];w.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 I=t.classNames(o,r,t._defineProperty(t._defineProperty({},"".concat(o,"-checked"),S),"".concat(o,"-disabled"),g)),c=function(v){g||("checked"in e||y(v.target.checked),k==null||k({target:t._objectSpread2(t._objectSpread2({},e),{},{type:s,checked:v.target.checked}),stopPropagation:function(){v.stopPropagation()},preventDefault:function(){v.preventDefault()},nativeEvent:v.nativeEvent}))};return a.createElement("span",{className:I,title:P,style:l,ref:u},a.createElement("input",t._extends({},j,{className:"".concat(o,"-input"),ref:x,onChange:c,disabled:g,checked:!!S,type:s})),a.createElement("span",{className:"".concat(o,"-inner")}))});function te(e){const n=w.useRef(null),i=()=>{t.wrapperRaf.cancel(n.current),n.current=null};return[()=>{i(),n.current=t.wrapperRaf(()=>{n.current=null})},l=>{n.current&&(l.stopPropagation(),i()),e==null||e(l)}]}const oe=e=>{const{componentCls:n,antCls:i}=e,o=`${n}-group`;return{[o]:Object.assign(Object.assign({},t.resetComponent(e)),{display:"inline-block",fontSize:0,[`&${o}-rtl`]:{direction:"rtl"},[`&${o}-block`]:{display:"flex"},[`${i}-badge ${i}-badge-count`]:{zIndex:1},[`> ${i}-badge:not(:first-child) > ${i}-button-wrapper`]:{borderInlineStart:"none"}})}},re=e=>{const{componentCls:n,wrapperMarginInlineEnd:i,colorPrimary:o,radioSize:r,motionDurationSlow:l,motionDurationMid:C,motionEaseInOutCirc:g,colorBgContainer:d,colorBorder:$,lineWidth:f,colorBgContainerDisabled:s,colorTextDisabled:P,paddingXS:k,dotColorDisabled:j,lineType:x,radioColor:u,radioBgColor:R,calc:h}=e,S=`${n}-inner`,I=h(r).sub(h(4).mul(2)),c=h(1).mul(r).equal({unit:!0});return{[`${n}-wrapper`]:Object.assign(Object.assign({},t.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:`${t.unit(f)} ${x} ${o}`,borderRadius:"50%",visibility:"hidden",opacity:0,content:'""'},[n]:Object.assign(Object.assign({},t.resetComponent(e)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center",borderRadius:"50%"}),[`${n}-wrapper:hover &,
2
+ &:hover ${S}`]:{borderColor:o},[`${n}-input:focus-visible + ${S}`]:Object.assign({},t.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(r).div(-2).equal({unit:!0}),marginInlineStart:h(1).mul(r).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:o,backgroundColor:R,"&::after":{transform:`scale(${e.calc(e.dotSize).div(r).equal()})`,opacity:1,transition:`all ${l} ${g}`}}},[`${n}-disabled`]:{cursor:"not-allowed",[S]:{backgroundColor:s,borderColor:$,cursor:"not-allowed","&::after":{backgroundColor:j}},[`${n}-input`]:{cursor:"not-allowed"},[`${n}-disabled + span`]:{color:P,cursor:"not-allowed"},[`&${n}-checked`]:{[S]:{"&::after":{transform:`scale(${h(I).div(r).equal()})`}}}},[`span${n} + *`]:{paddingInlineStart:k,paddingInlineEnd:k}})}},ne=e=>{const{buttonColor:n,controlHeight:i,componentCls:o,lineWidth:r,lineType:l,colorBorder:C,motionDurationSlow:g,motionDurationMid:d,buttonPaddingInline:$,fontSize:f,buttonBg:s,fontSizeLG:P,controlHeightLG:k,controlHeightSM:j,paddingXS:x,borderRadius:u,borderRadiusSM:R,borderRadiusLG:h,buttonCheckedBg:S,buttonSolidCheckedColor:y,colorTextDisabled:I,colorBgContainerDisabled:c,buttonCheckedBgDisabled:B,buttonCheckedColorDisabled:v,colorPrimary:b,colorPrimaryHover:N,colorPrimaryActive:p,buttonSolidCheckedBg:O,buttonSolidCheckedHoverBg:_,buttonSolidCheckedActiveBg:z,calc:E}=e;return{[`${o}-button-wrapper`]:{position:"relative",display:"inline-block",height:i,margin:0,paddingInline:$,paddingBlock:0,color:n,fontSize:f,lineHeight:t.unit(E(i).sub(E(r).mul(2)).equal()),background:s,border:`${t.unit(r)} ${l} ${C}`,borderBlockStartWidth:E(r).add(.02).equal(),borderInlineStartWidth:0,borderInlineEndWidth:r,cursor:"pointer",transition:[`color ${d}`,`background ${d}`,`box-shadow ${d}`].join(","),a:{color:n},[`> ${o}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:first-child)":{"&::before":{position:"absolute",insetBlockStart:E(r).mul(-1).equal(),insetInlineStart:E(r).mul(-1).equal(),display:"block",boxSizing:"content-box",width:1,height:"100%",paddingBlock:r,paddingInline:0,backgroundColor:C,transition:`background-color ${g}`,content:'""'}},"&:first-child":{borderInlineStart:`${t.unit(r)} ${l} ${C}`,borderStartStartRadius:u,borderEndStartRadius:u},"&:last-child":{borderStartEndRadius:u,borderEndEndRadius:u},"&:first-child:last-child":{borderRadius:u},[`${o}-group-large &`]:{height:k,fontSize:P,lineHeight:t.unit(E(k).sub(E(r).mul(2)).equal()),"&:first-child":{borderStartStartRadius:h,borderEndStartRadius:h},"&:last-child":{borderStartEndRadius:h,borderEndEndRadius:h}},[`${o}-group-small &`]:{height:j,paddingInline:E(x).sub(r).equal(),paddingBlock:0,lineHeight:t.unit(E(j).sub(E(r).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({},t.genFocusOutline(e)),[`${o}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${o}-button-wrapper-disabled)`]:{zIndex:1,color:b,background:S,borderColor:b,"&::before":{backgroundColor:b},"&:first-child":{borderColor:b},"&:hover":{color:N,borderColor:N,"&::before":{backgroundColor:N}},"&:active":{color:p,borderColor:p,"&::before":{backgroundColor:p}}},[`${o}-group-solid &-checked:not(${o}-button-wrapper-disabled)`]:{color:y,background:O,borderColor:O,"&:hover":{color:y,background:_,borderColor:_},"&:active":{color:y,background:z,borderColor:z}},"&-disabled":{color:I,backgroundColor:c,borderColor:C,cursor:"not-allowed","&:first-child, &:hover":{color:I,backgroundColor:c,borderColor:C}},[`&-disabled${o}-button-wrapper-checked`]:{color:v,backgroundColor:B,borderColor:C,boxShadow:"none"},"&-block":{flex:1,textAlign:"center"}}}},ie=e=>{const{wireframe:n,padding:i,marginXS:o,lineWidth:r,fontSizeLG:l,colorText:C,colorBgContainer:g,colorTextDisabled:d,controlItemBgActiveDisabled:$,colorTextLightSolid:f,colorPrimary:s,colorPrimaryHover:P,colorPrimaryActive:k,colorWhite:j}=e,x=4,u=l,R=n?u-x*2:u-(x+r)*2;return{radioSize:u,dotSize:R,dotColorDisabled:d,buttonSolidCheckedColor:f,buttonSolidCheckedBg:s,buttonSolidCheckedHoverBg:P,buttonSolidCheckedActiveBg:k,buttonBg:g,buttonCheckedBg:g,buttonColor:C,buttonCheckedBgDisabled:$,buttonCheckedColorDisabled:d,buttonPaddingInline:i-r,wrapperMarginInlineEnd:o,radioColor:n?s:j,radioBgColor:n?g:s}},F=t.genStyleHooks("Radio",e=>{const{controlOutline:n,controlOutlineWidth:i}=e,o=`0 0 0 ${t.unit(i)} ${n}`,r=o,l=t.merge(e,{radioFocusShadow:o,radioButtonFocusShadow:r});return[oe(l),re(l),ne(l)]},ie,{unitless:{radioSize:!0,dotSize:!0}});var ae=function(e,n){var i={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(i[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(i[o[r]]=e[o[r]]);return i};const le=(e,n)=>{var i,o;const r=a.useContext(H),l=a.useContext(W),{getPrefixCls:C,direction:g,radio:d}=a.useContext(t.ConfigContext),$=a.useRef(null),f=t.composeRef(n,$),{isFormItemInput:s}=a.useContext(t.FormItemInputContext);if(process.env.NODE_ENV!=="production"){const D=t.devUseWarning("Radio");process.env.NODE_ENV!=="production"&&D(!("optionType"in e),"usage","`optionType` is only support in Radio.Group.")}const P=D=>{var M,T;(M=e.onChange)===null||M===void 0||M.call(e,D),(T=r==null?void 0:r.onChange)===null||T===void 0||T.call(r,D)},{prefixCls:k,className:j,rootClassName:x,children:u,style:R,title:h}=e,S=ae(e,["prefixCls","className","rootClassName","children","style","title"]),y=C("radio",k),I=((r==null?void 0:r.optionType)||l)==="button",c=I?`${y}-button`:y,B=t.useCSSVarCls(y),[v,b,N]=F(y,B),p=Object.assign({},S),O=a.useContext(t.DisabledContext);r&&(p.name=r.name,p.onChange=P,p.checked=e.value===r.value,p.disabled=(i=p.disabled)!==null&&i!==void 0?i:r.disabled),p.disabled=(o=p.disabled)!==null&&o!==void 0?o:O;const _=t.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`]:!!(r!=null&&r.block)},d==null?void 0:d.className,j,x,b,N,B),[z,E]=te(p.onClick);return v(a.createElement(t.Wave,{component:"Radio",disabled:p.disabled},a.createElement("label",{className:_,style:Object.assign(Object.assign({},d==null?void 0:d.style),R),onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,title:h,onClick:z},a.createElement(ee,Object.assign({},p,{className:t.classNames(p.className,{[t.TARGET_CLS]:!I}),type:"radio",prefixCls:c,ref:f,onClick:E})),u!==void 0?a.createElement("span",{className:`${c}-label`},u):null)))},L=a.forwardRef(le);process.env.NODE_ENV!=="production"&&(L.displayName="Radio");const se=a.forwardRef((e,n)=>{const{getPrefixCls:i,direction:o}=a.useContext(t.ConfigContext),r=t.useId(),{prefixCls:l,className:C,rootClassName:g,options:d,buttonStyle:$="outline",disabled:f,children:s,size:P,style:k,id:j,optionType:x,name:u=r,defaultValue:R,value:h,block:S=!1,onChange:y,onMouseEnter:I,onMouseLeave:c,onFocus:B,onBlur:v}=e,[b,N]=t.useMergedState(R,{value:h}),p=a.useCallback(m=>{const Y=b,G=m.target.value;"value"in e||N(G),G!==Y&&(y==null||y(m))},[b,N,y]),O=i("radio",l),_=`${O}-group`,z=t.useCSSVarCls(O),[E,D,M]=F(O,z);let T=s;d&&d.length>0&&(T=d.map(m=>typeof m=="string"||typeof m=="number"?a.createElement(L,{key:m.toString(),prefixCls:O,disabled:f,value:m,checked:b===m},m):a.createElement(L,{key:`radio-group-value-options-${m.value}`,prefixCls:O,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 q=t.useSize(P),X=t.classNames(_,`${_}-${$}`,{[`${_}-${q}`]:q,[`${_}-rtl`]:o==="rtl",[`${_}-block`]:S},C,g,D,M,z),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({},t.pickAttrs(e,{aria:!0,data:!0}),{className:X,style:k,onMouseEnter:I,onMouseLeave:c,onFocus:B,onBlur:v,id:j,ref:n}),a.createElement(K,{value:U},T)))}),de=a.memo(se);var ce=function(e,n){var i={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(i[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(i[o[r]]=e[o[r]]);return i};const ue=(e,n)=>{const{getPrefixCls:i}=a.useContext(t.ConfigContext),{prefixCls:o}=e,r=ce(e,["prefixCls"]),l=i("radio",o);return a.createElement(Q,{value:"button"},a.createElement(L,Object.assign({prefixCls:l},r,{type:"radio",ref:n})))},be=a.forwardRef(ue),V=L;V.Button=be;V.Group=de;V.__ANT_RADIO=!0;const pe=w.memo(({open:e,onCallBack:n,queryFetch:i})=>{const[o,r]=w.useState([]),[l,C]=w.useState(0),[g,d]=w.useState(""),[$,f]=w.useState(!1);return w.useEffect(()=>{(async()=>{f(!0);try{await i({success:s=>{r(s.data||[])}})}catch{}f(!1)})()},[e]),t.jsxRuntimeExports.jsx(t.jsxRuntimeExports.Fragment,{children:t.jsxRuntimeExports.jsx(A.Modal,{open:e,title:"转接",footer:!1,onCancel:()=>n(),children:t.jsxRuntimeExports.jsxs(t.ModelBody,{children:[t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(V.Group,{options:[{label:"转接坐席",value:0},{label:"转接外线",value:1}],value:l,onChange:s=>C(s.target.value)})}),t.jsxRuntimeExports.jsx(t.Spin,{spinning:$,children:t.jsxRuntimeExports.jsxs("div",{style:{borderTop:"1px solid #eee",marginTop:10,paddingTop:10},children:[l===0&&t.jsxRuntimeExports.jsx(t.jsxRuntimeExports.Fragment,{children:o.length===0?t.jsxRuntimeExports.jsx(t.Empty,{image:t.Empty.PRESENTED_IMAGE_SIMPLE}):t.jsxRuntimeExports.jsx(t.Space,{wrap:!0,children:o.map(s=>t.jsxRuntimeExports.jsxs(A.Tag,{color:"processing",onClick:()=>n(s.agent_no,0),children:[t.jsxRuntimeExports.jsxs("span",{style:{marginRight:10},children:["咨询坐席: ",s.agent_name]}),t.jsxRuntimeExports.jsx(t.YsytIconSvg,{name:"zixun"})]},s.agent_no))})}),l===1&&t.jsxRuntimeExports.jsx(t.Input,{value:g,onChange:s=>d(s.target.value),placeholder:"请输入外线号码, 回车转接",onPressEnter:()=>{n(g,1)}})]})})]})})})});exports.default=pe;
@@ -0,0 +1,5 @@
1
+ export declare const setPhoneMethods: (methods: {
2
+ makeCall: (number: string) => Promise<void>;
3
+ }) => void;
4
+ export declare const clearPhoneMethods: () => void;
5
+ export declare const makeCall: (number: string) => Promise<void>;
@@ -11,4 +11,9 @@ export declare const NumberInputBody: import('styled-components/dist/types').ISt
11
11
  export declare const InputBody: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
12
12
  export declare const NumberActionBody: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
13
13
  export declare const ModelBody: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
14
+ export declare const WifiBody: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
15
+ export declare const BounceInTopDiv: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
16
+ height?: string;
17
+ show: boolean;
18
+ }>> & string;
14
19
  export {};