@gientech/modual 1.4.2 → 1.4.4
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/assets/{AppLoading-BCu9TPs5.js → AppLoading-BpA2wf4Z.js} +1 -1
- package/chat.d.ts +4 -0
- package/chat.js +11 -11
- package/database.js +2 -2
- package/index.js +1 -1
- package/package.json +1 -1
- /package/assets/{mysql.svg → MySQL.svg} +0 -0
|
@@ -403,7 +403,7 @@ html body {
|
|
|
403
403
|
* https://clipboardjs.com/
|
|
404
404
|
*
|
|
405
405
|
* Licensed MIT © Zeno Rocha
|
|
406
|
-
*/var tA=Fi.exports,Um;function nA(){return Um||(Um=1,(function(e,t){(function(r,o){e.exports=o()})(tA,function(){return(function(){var n={686:(function(a,i,l){l.d(i,{default:function(){return W}});var s=l(279),c=l.n(s),d=l(370),f=l.n(d),p=l(817),v=l.n(p);function h(R){try{return document.execCommand(R)}catch{return!1}}var g=function(A){var F=v()(A);return h("cut"),F},m=g;function b(R){var A=document.documentElement.getAttribute("dir")==="rtl",F=document.createElement("textarea");F.style.fontSize="12pt",F.style.border="0",F.style.padding="0",F.style.margin="0",F.style.position="absolute",F.style[A?"right":"left"]="-9999px";var H=window.pageYOffset||document.documentElement.scrollTop;return F.style.top="".concat(H,"px"),F.setAttribute("readonly",""),F.value=R,F}var x=function(A,F){var H=b(A);F.container.appendChild(H);var z=v()(H);return h("copy"),H.remove(),z},y=function(A){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},H="";return typeof A=="string"?H=x(A,F):A instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(A==null?void 0:A.type)?H=x(A.value,F):(H=v()(A),h("copy")),H},w=y;function C(R){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?C=function(F){return typeof F}:C=function(F){return F&&typeof Symbol=="function"&&F.constructor===Symbol&&F!==Symbol.prototype?"symbol":typeof F},C(R)}var S=function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},F=A.action,H=F===void 0?"copy":F,z=A.container,V=A.target,K=A.text;if(H!=="copy"&&H!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(V!==void 0)if(V&&C(V)==="object"&&V.nodeType===1){if(H==="copy"&&V.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(H==="cut"&&(V.hasAttribute("readonly")||V.hasAttribute("disabled")))throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`)}else throw new Error('Invalid "target" value, use a valid Element');if(K)return w(K,{container:z});if(V)return H==="cut"?m(V):w(V,{container:z})},$=S;function k(R){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?k=function(F){return typeof F}:k=function(F){return F&&typeof Symbol=="function"&&F.constructor===Symbol&&F!==Symbol.prototype?"symbol":typeof F},k(R)}function E(R,A){if(!(R instanceof A))throw new TypeError("Cannot call a class as a function")}function O(R,A){for(var F=0;F<A.length;F++){var H=A[F];H.enumerable=H.enumerable||!1,H.configurable=!0,"value"in H&&(H.writable=!0),Object.defineProperty(R,H.key,H)}}function M(R,A,F){return A&&O(R.prototype,A),F&&O(R,F),R}function N(R,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function");R.prototype=Object.create(A&&A.prototype,{constructor:{value:R,writable:!0,configurable:!0}}),A&&T(R,A)}function T(R,A){return T=Object.setPrototypeOf||function(H,z){return H.__proto__=z,H},T(R,A)}function P(R){var A=B();return function(){var H=I(R),z;if(A){var V=I(this).constructor;z=Reflect.construct(H,arguments,V)}else z=H.apply(this,arguments);return D(this,z)}}function D(R,A){return A&&(k(A)==="object"||typeof A=="function")?A:j(R)}function j(R){if(R===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return R}function B(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function I(R){return I=Object.setPrototypeOf?Object.getPrototypeOf:function(F){return F.__proto__||Object.getPrototypeOf(F)},I(R)}function _(R,A){var F="data-clipboard-".concat(R);if(A.hasAttribute(F))return A.getAttribute(F)}var L=(function(R){N(F,R);var A=P(F);function F(H,z){var V;return E(this,F),V=A.call(this),V.resolveOptions(z),V.listenClick(H),V}return M(F,[{key:"resolveOptions",value:function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof z.action=="function"?z.action:this.defaultAction,this.target=typeof z.target=="function"?z.target:this.defaultTarget,this.text=typeof z.text=="function"?z.text:this.defaultText,this.container=k(z.container)==="object"?z.container:document.body}},{key:"listenClick",value:function(z){var V=this;this.listener=f()(z,"click",function(K){return V.onClick(K)})}},{key:"onClick",value:function(z){var V=z.delegateTarget||z.currentTarget,K=this.action(V)||"copy",J=$({action:K,container:this.container,target:this.target(V),text:this.text(V)});this.emit(J?"success":"error",{action:K,text:J,trigger:V,clearSelection:function(){V&&V.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(z){return _("action",z)}},{key:"defaultTarget",value:function(z){var V=_("target",z);if(V)return document.querySelector(V)}},{key:"defaultText",value:function(z){return _("text",z)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(z){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return w(z,V)}},{key:"cut",value:function(z){return m(z)}},{key:"isSupported",value:function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],V=typeof z=="string"?[z]:z,K=!!document.queryCommandSupported;return V.forEach(function(J){K=K&&!!document.queryCommandSupported(J)}),K}}]),F})(c()),W=L}),828:(function(a){var i=9;if(typeof Element<"u"&&!Element.prototype.matches){var l=Element.prototype;l.matches=l.matchesSelector||l.mozMatchesSelector||l.msMatchesSelector||l.oMatchesSelector||l.webkitMatchesSelector}function s(c,d){for(;c&&c.nodeType!==i;){if(typeof c.matches=="function"&&c.matches(d))return c;c=c.parentNode}}a.exports=s}),438:(function(a,i,l){var s=l(828);function c(p,v,h,g,m){var b=f.apply(this,arguments);return p.addEventListener(h,b,m),{destroy:function(){p.removeEventListener(h,b,m)}}}function d(p,v,h,g,m){return typeof p.addEventListener=="function"?c.apply(null,arguments):typeof h=="function"?c.bind(null,document).apply(null,arguments):(typeof p=="string"&&(p=document.querySelectorAll(p)),Array.prototype.map.call(p,function(b){return c(b,v,h,g,m)}))}function f(p,v,h,g){return function(m){m.delegateTarget=s(m.target,v),m.delegateTarget&&g.call(p,m)}}a.exports=d}),879:(function(a,i){i.node=function(l){return l!==void 0&&l instanceof HTMLElement&&l.nodeType===1},i.nodeList=function(l){var s=Object.prototype.toString.call(l);return l!==void 0&&(s==="[object NodeList]"||s==="[object HTMLCollection]")&&"length"in l&&(l.length===0||i.node(l[0]))},i.string=function(l){return typeof l=="string"||l instanceof String},i.fn=function(l){var s=Object.prototype.toString.call(l);return s==="[object Function]"}}),370:(function(a,i,l){var s=l(879),c=l(438);function d(h,g,m){if(!h&&!g&&!m)throw new Error("Missing required arguments");if(!s.string(g))throw new TypeError("Second argument must be a String");if(!s.fn(m))throw new TypeError("Third argument must be a Function");if(s.node(h))return f(h,g,m);if(s.nodeList(h))return p(h,g,m);if(s.string(h))return v(h,g,m);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function f(h,g,m){return h.addEventListener(g,m),{destroy:function(){h.removeEventListener(g,m)}}}function p(h,g,m){return Array.prototype.forEach.call(h,function(b){b.addEventListener(g,m)}),{destroy:function(){Array.prototype.forEach.call(h,function(b){b.removeEventListener(g,m)})}}}function v(h,g,m){return c(document.body,h,g,m)}a.exports=d}),817:(function(a){function i(l){var s;if(l.nodeName==="SELECT")l.focus(),s=l.value;else if(l.nodeName==="INPUT"||l.nodeName==="TEXTAREA"){var c=l.hasAttribute("readonly");c||l.setAttribute("readonly",""),l.select(),l.setSelectionRange(0,l.value.length),c||l.removeAttribute("readonly"),s=l.value}else{l.hasAttribute("contenteditable")&&l.focus();var d=window.getSelection(),f=document.createRange();f.selectNodeContents(l),d.removeAllRanges(),d.addRange(f),s=d.toString()}return s}a.exports=i}),279:(function(a){function i(){}i.prototype={on:function(l,s,c){var d=this.e||(this.e={});return(d[l]||(d[l]=[])).push({fn:s,ctx:c}),this},once:function(l,s,c){var d=this;function f(){d.off(l,f),s.apply(c,arguments)}return f._=s,this.on(l,f,c)},emit:function(l){var s=[].slice.call(arguments,1),c=((this.e||(this.e={}))[l]||[]).slice(),d=0,f=c.length;for(d;d<f;d++)c[d].fn.apply(c[d].ctx,s);return this},off:function(l,s){var c=this.e||(this.e={}),d=c[l],f=[];if(d&&s)for(var p=0,v=d.length;p<v;p++)d[p].fn!==s&&d[p].fn._!==s&&f.push(d[p]);return f.length?c[l]=f:delete c[l],this}},a.exports=i,a.exports.TinyEmitter=i})},r={};function o(a){if(r[a])return r[a].exports;var i=r[a]={exports:{}};return n[a](i,i.exports,o),i.exports}return(function(){o.n=function(a){var i=a&&a.__esModule?function(){return a.default}:function(){return a};return o.d(i,{a:i}),i}})(),(function(){o.d=function(a,i){for(var l in i)o.o(i,l)&&!o.o(a,l)&&Object.defineProperty(a,l,{enumerable:!0,get:i[l]})}})(),(function(){o.o=function(a,i){return Object.prototype.hasOwnProperty.call(a,i)}})(),o(686)})().default})})(Fi)),Fi.exports}var rA=nA();const pA=ay(rA),oA="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAACRSURBVHgB7ZJBCsQgDEWTmQvMncT7dOuqmY3iai6kMN31UmIjdNFFKuk+DwKahP9ABDAMQyTnvHCtT/ZjjIs0e0nN1hr03kkjGTu8+0PEjzR/S81a6+6cQz6S9x5KKdsknLi+IQRSC07JfybRhE8FM4k2fICgIKVE/MYrF427NlwtuEpOgSr8MUNy9x0Nw7jnAFsnZ7Uu5CkqAAAAAElFTkSuQmCC",{TextArea:Gm}=zs,{useForm:aA}=Fo,Ab={\u56DE\u7B54\u4E0D\u4F73:"ansPoor",\u683C\u5F0F\u95EE\u9898:"formatError",\u7406\u89E3\u95EE\u9898\u6709\u8BEF:"harmfulInfo",\u5176\u4ED6:"othres"},mA=({open:e,setOpen:t,feedBackList:n,handleConfirm:r})=>{const o={header:{padding:"20px 24px",borderBottom:"1px solid #F0F0F0",margin:0},body:{padding:"16px 24px 20px 24px",borderBottom:"1px solid #F0F0F0"},mask:{},footer:{padding:"16px 24px",margin:0},content:{padding:0,borderRadius:"4px",width:"563px"}},[a]=aA(),[i,l]=Pt({}),s=async()=>{try{const c=await a.validateFields();t(!1);const d={...c};Object.entries(i||{}).forEach(f=>{const[p,v]=f;v&&(d[Ab[p]]=v)}),r(d)}catch(c){console.log(c);return}};return It(()=>{e||(a.resetFields(),l(null))},[e]),_t(iy,{modal:{styles:o},children:mn(dy,{open:e,onCancel:()=>t(!1),title:_t("div",{className:"text-[16px] text-[#2A2A2A] font-bold leading-[1]",children:"\u611F\u8C22\u60A8\u7684\u53CD\u9988\uFF01\u8FD9\u5C06\u5E2E\u52A9\u6211\u4EEC\u4E0D\u65AD\u4F18\u5316\u4E0E\u63D0\u5347\u3002"}),footer:mn("div",{children:[_t(Bi,{className:"mr-[16px] w-[76px]",onClick:()=>{t(!1)},children:"\u53D6\u6D88"}),_t(Bi,{type:"primary",className:"w-[76px] border-none",onClick:s,children:"\u786E\u8BA4"})]}),children:[_t(iA,{feedBackList:n,treeSelectResult:i,setTreeSelectResult:l}),mn(Fo,{form:a,layout:"vertical",children:[_t(Fo.Item,{name:"supplementExplain",label:"\u8865\u5145\u63CF\u8FF0",children:_t(Gm,{})})," ",_t(Fo.Item,{name:"idealAnswer",label:"\u60A8\u89C9\u5F97\u66F4\u597D\u7684\u56DE\u7B54\u662F\u4EC0\u4E48\uFF1F",children:_t(Gm,{})}),_t(Fo.Item,{name:"userPhone",label:"\u8054\u7CFB\u7535\u8BDD",children:_t(zs,{})}),_t(Fo.Item,{name:"deptName",label:"\u90E8\u95E8",children:_t(zs,{})})]})]})})},iA=({feedBackList:e,treeSelectResult:t,setTreeSelectResult:n})=>{const[r,o]=Pt(!1),[a,i]=Pt([]),[l,s]=Pt([]),[c,d]=Pt([]),[f,p]=Pt(null),v=En(()=>(s([]),f!=null&&f.items?[{title:"\u5168\u9009",key:"\u5168\u9009",children:f.items.map(g=>({title:g,key:g}))}]:[]),[f]),h=g=>{d(m=>Array.isArray(m)&&Array.isArray(l)?Object.entries(t).reduce((x,y)=>{const[w,C]=y,$=(C?C.split(";"):[]).filter(k=>k!==g);return n(k=>({...k||{},[w]:$.join(";")})),[...x,...$]},[]):m)};return It(()=>{if(i(["\u5168\u9009"]),!t||!(f!=null&&f.que_name))return;const g=t[f.que_name]||"",m=g?g.split(";"):[];s(m)},[v,r]),It(()=>{t===null&&(d([]),p(null),s([]))},[t]),It(()=>{console.log("treeSelectResult",t),console.log("selectedValue",c),console.log("feedBackList",e),console.log("pKey",Ab),console.log("selectedParent",f)},[t,c]),mn("div",{className:"relative mb-[24px] z-20",children:[mn("div",{className:"absolute w-full z-10",children:[mn("div",{className:"h-[32px] box-border flex items-center justify-between border-[1px] border-solid border-[#D9D9D9] rounded-[4px] cursor-pointer",onClick:()=>o(!r),children:[_t("div",{className:"ml-[16px]",children:"\u95EE\u9898\u7C7B\u578B"}),_t("img",{src:oA,width:24,height:24,className:"mr-[16px]"})]}),mn("div",{style:{display:r?"":"none"},className:"h-[288px] rounded-[4px] shadow-md mt-[4px] bg-white",children:[mn("div",{className:"h-[248px] flex",style:{borderBottom:"1px solid #F0F0F0"},children:[_t("div",{className:"w-[203px] px-[8px] py-[8px]",style:{borderRight:"1px solid #F0F0F0"},children:e.map((g,m)=>{var b;return mn("div",{className:"rounded-[4px] h-[32px] cursor-pointer flex items-center",style:{backgroundColor:(f==null?void 0:f.que_name)===g.que_name?"#E6F4FF":""},children:[_t("div",{className:"h-full w-full leading-[32px]",onClick:()=>{p(g)},children:mn("div",{className:"ml-[8px] text-[14px] text-[#2A2A2A]",children:[g.que_name,"(",t&&t[g.que_name]?t[g.que_name].split(";").length:0,"/",(b=g==null?void 0:g.items)==null?void 0:b.length,")"]})}),_t(ly,{className:"mr-[8px] w-3 h-3 text-[rgba(0,0,0,0.45)]"})]},m)})}),_t("div",{className:"selfTree h-full flex-1 mt-[8px] ml-[16px]",children:_t(bu,{checkable:!0,defaultSelectedKeys:["0-1"],treeData:v,blockNode:!0,checkedKeys:l,expandedKeys:a,onCheck:g=>{Array.isArray(g)&&n(m=>({...m||{},[(f==null?void 0:f.que_name)||""]:(g||[]).filter(b=>b!=="\u5168\u9009").join(";")})),s(g)}})})]}),mn("div",{className:"flex justify-end h-[40px] items-center",children:[_t(Bi,{size:"small",className:"mr-[8px]",onClick:()=>o(!1),children:"\u53D6\u6D88"}),_t(Bi,{size:"small",type:"primary",className:"border-none mr-[16px]",onClick:()=>{d(g=>Array.isArray(g)&&Array.isArray(l)?Object.values(t).reduce((b,x)=>[...b,...x?x.split(";"):[]],[]):g),o(!1)},children:"\u786E\u8BA4"})]})]})]}),_t("div",{className:"h-[32px]"}),!!(c!=null&&c.length)&&mn("div",{children:[mn("div",{className:"mt-[5px] text-[12px] text-[#555555]",children:["\u5DF2\u9009\u62E9 ",c.length," \u4E2A"]}),(c||[]).map(g=>{let m="";return Object.entries(t||{}).forEach(b=>{const[x,y]=b;y.indexOf(g)>-1&&(m=x)}),mn(sy,{closable:!0,className:"mt-[5px]",onClose:()=>h(g),children:[m,"\uFF08",g,"\uFF09"]},g)})]})]})};function gA(){const[e,t]=Pt(0);return It(()=>{let n;return e<98?n=setTimeout(()=>{t(r=>r+Math.random()*6+1)},80):e<100&&(n=setTimeout(()=>t(100),400)),()=>clearTimeout(n)},[e]),mn("div",{className:"flex flex-col justify-center items-center min-h-screen bg-gradient-to-br from-[#EEF4FF] via-white to-[#F5F8FF]",children:[mn("div",{className:"mb-8 flex flex-col items-center",children:[_t("div",{className:"mt-6 text-2xl font-semibold text-[#222222] tracking-wide",children:"\u5C0F\u9CB8\u667A\u80FD\u4F1A\u8BDD\u52A9\u624B"}),_t("div",{className:"mt-2 text-sm text-[#555555]",children:"\u8BA9\u667A\u80FD\u5BF9\u8BDD\u66F4\u7B80\u5355"})]}),mn("div",{className:"relative w-80 max-w-sm",children:[_t("div",{className:"w-full h-2 bg-[#EEF4FF] rounded-full overflow-hidden shadow-inner",children:_t("div",{className:"h-full bg-gradient-to-r from-[#2B69FF] to-[#8F91FF] transition-all duration-300 ease-out",style:{width:`${Math.min(e,100)}%`}})}),mn("div",{className:"absolute -right-2 top-5 text-sm text-[#555555]",children:[Math.min(Math.round(e),100),"%"]})]}),mn("div",{className:"mt-8 flex flex-col items-center gap-2",children:[_t("div",{className:"text-sm text-[#555555] animate-pulse",children:"\u6B63\u5728\u521D\u59CB\u5316\u5E94\u7528"}),_t("div",{className:"text-xs text-[#888888]",children:"\u9996\u6B21\u52A0\u8F7D\u53EF\u80FD\u9700\u8981\u4E00\u4E9B\u65F6\u95F4\uFF0C\u8BF7\u8010\u5FC3\u7B49\u5F85"})]})]})}const Tb=document.createElement("style");Tb.textContent=`
|
|
406
|
+
*/var tA=Fi.exports,Um;function nA(){return Um||(Um=1,(function(e,t){(function(r,o){e.exports=o()})(tA,function(){return(function(){var n={686:(function(a,i,l){l.d(i,{default:function(){return W}});var s=l(279),c=l.n(s),d=l(370),f=l.n(d),p=l(817),v=l.n(p);function h(R){try{return document.execCommand(R)}catch{return!1}}var g=function(A){var F=v()(A);return h("cut"),F},m=g;function b(R){var A=document.documentElement.getAttribute("dir")==="rtl",F=document.createElement("textarea");F.style.fontSize="12pt",F.style.border="0",F.style.padding="0",F.style.margin="0",F.style.position="absolute",F.style[A?"right":"left"]="-9999px";var H=window.pageYOffset||document.documentElement.scrollTop;return F.style.top="".concat(H,"px"),F.setAttribute("readonly",""),F.value=R,F}var x=function(A,F){var H=b(A);F.container.appendChild(H);var z=v()(H);return h("copy"),H.remove(),z},y=function(A){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},H="";return typeof A=="string"?H=x(A,F):A instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(A==null?void 0:A.type)?H=x(A.value,F):(H=v()(A),h("copy")),H},w=y;function C(R){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?C=function(F){return typeof F}:C=function(F){return F&&typeof Symbol=="function"&&F.constructor===Symbol&&F!==Symbol.prototype?"symbol":typeof F},C(R)}var S=function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},F=A.action,H=F===void 0?"copy":F,z=A.container,V=A.target,K=A.text;if(H!=="copy"&&H!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(V!==void 0)if(V&&C(V)==="object"&&V.nodeType===1){if(H==="copy"&&V.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(H==="cut"&&(V.hasAttribute("readonly")||V.hasAttribute("disabled")))throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`)}else throw new Error('Invalid "target" value, use a valid Element');if(K)return w(K,{container:z});if(V)return H==="cut"?m(V):w(V,{container:z})},$=S;function k(R){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?k=function(F){return typeof F}:k=function(F){return F&&typeof Symbol=="function"&&F.constructor===Symbol&&F!==Symbol.prototype?"symbol":typeof F},k(R)}function E(R,A){if(!(R instanceof A))throw new TypeError("Cannot call a class as a function")}function O(R,A){for(var F=0;F<A.length;F++){var H=A[F];H.enumerable=H.enumerable||!1,H.configurable=!0,"value"in H&&(H.writable=!0),Object.defineProperty(R,H.key,H)}}function M(R,A,F){return A&&O(R.prototype,A),F&&O(R,F),R}function N(R,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function");R.prototype=Object.create(A&&A.prototype,{constructor:{value:R,writable:!0,configurable:!0}}),A&&T(R,A)}function T(R,A){return T=Object.setPrototypeOf||function(H,z){return H.__proto__=z,H},T(R,A)}function P(R){var A=B();return function(){var H=I(R),z;if(A){var V=I(this).constructor;z=Reflect.construct(H,arguments,V)}else z=H.apply(this,arguments);return D(this,z)}}function D(R,A){return A&&(k(A)==="object"||typeof A=="function")?A:j(R)}function j(R){if(R===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return R}function B(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function I(R){return I=Object.setPrototypeOf?Object.getPrototypeOf:function(F){return F.__proto__||Object.getPrototypeOf(F)},I(R)}function _(R,A){var F="data-clipboard-".concat(R);if(A.hasAttribute(F))return A.getAttribute(F)}var L=(function(R){N(F,R);var A=P(F);function F(H,z){var V;return E(this,F),V=A.call(this),V.resolveOptions(z),V.listenClick(H),V}return M(F,[{key:"resolveOptions",value:function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof z.action=="function"?z.action:this.defaultAction,this.target=typeof z.target=="function"?z.target:this.defaultTarget,this.text=typeof z.text=="function"?z.text:this.defaultText,this.container=k(z.container)==="object"?z.container:document.body}},{key:"listenClick",value:function(z){var V=this;this.listener=f()(z,"click",function(K){return V.onClick(K)})}},{key:"onClick",value:function(z){var V=z.delegateTarget||z.currentTarget,K=this.action(V)||"copy",J=$({action:K,container:this.container,target:this.target(V),text:this.text(V)});this.emit(J?"success":"error",{action:K,text:J,trigger:V,clearSelection:function(){V&&V.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(z){return _("action",z)}},{key:"defaultTarget",value:function(z){var V=_("target",z);if(V)return document.querySelector(V)}},{key:"defaultText",value:function(z){return _("text",z)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(z){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return w(z,V)}},{key:"cut",value:function(z){return m(z)}},{key:"isSupported",value:function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],V=typeof z=="string"?[z]:z,K=!!document.queryCommandSupported;return V.forEach(function(J){K=K&&!!document.queryCommandSupported(J)}),K}}]),F})(c()),W=L}),828:(function(a){var i=9;if(typeof Element<"u"&&!Element.prototype.matches){var l=Element.prototype;l.matches=l.matchesSelector||l.mozMatchesSelector||l.msMatchesSelector||l.oMatchesSelector||l.webkitMatchesSelector}function s(c,d){for(;c&&c.nodeType!==i;){if(typeof c.matches=="function"&&c.matches(d))return c;c=c.parentNode}}a.exports=s}),438:(function(a,i,l){var s=l(828);function c(p,v,h,g,m){var b=f.apply(this,arguments);return p.addEventListener(h,b,m),{destroy:function(){p.removeEventListener(h,b,m)}}}function d(p,v,h,g,m){return typeof p.addEventListener=="function"?c.apply(null,arguments):typeof h=="function"?c.bind(null,document).apply(null,arguments):(typeof p=="string"&&(p=document.querySelectorAll(p)),Array.prototype.map.call(p,function(b){return c(b,v,h,g,m)}))}function f(p,v,h,g){return function(m){m.delegateTarget=s(m.target,v),m.delegateTarget&&g.call(p,m)}}a.exports=d}),879:(function(a,i){i.node=function(l){return l!==void 0&&l instanceof HTMLElement&&l.nodeType===1},i.nodeList=function(l){var s=Object.prototype.toString.call(l);return l!==void 0&&(s==="[object NodeList]"||s==="[object HTMLCollection]")&&"length"in l&&(l.length===0||i.node(l[0]))},i.string=function(l){return typeof l=="string"||l instanceof String},i.fn=function(l){var s=Object.prototype.toString.call(l);return s==="[object Function]"}}),370:(function(a,i,l){var s=l(879),c=l(438);function d(h,g,m){if(!h&&!g&&!m)throw new Error("Missing required arguments");if(!s.string(g))throw new TypeError("Second argument must be a String");if(!s.fn(m))throw new TypeError("Third argument must be a Function");if(s.node(h))return f(h,g,m);if(s.nodeList(h))return p(h,g,m);if(s.string(h))return v(h,g,m);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function f(h,g,m){return h.addEventListener(g,m),{destroy:function(){h.removeEventListener(g,m)}}}function p(h,g,m){return Array.prototype.forEach.call(h,function(b){b.addEventListener(g,m)}),{destroy:function(){Array.prototype.forEach.call(h,function(b){b.removeEventListener(g,m)})}}}function v(h,g,m){return c(document.body,h,g,m)}a.exports=d}),817:(function(a){function i(l){var s;if(l.nodeName==="SELECT")l.focus(),s=l.value;else if(l.nodeName==="INPUT"||l.nodeName==="TEXTAREA"){var c=l.hasAttribute("readonly");c||l.setAttribute("readonly",""),l.select(),l.setSelectionRange(0,l.value.length),c||l.removeAttribute("readonly"),s=l.value}else{l.hasAttribute("contenteditable")&&l.focus();var d=window.getSelection(),f=document.createRange();f.selectNodeContents(l),d.removeAllRanges(),d.addRange(f),s=d.toString()}return s}a.exports=i}),279:(function(a){function i(){}i.prototype={on:function(l,s,c){var d=this.e||(this.e={});return(d[l]||(d[l]=[])).push({fn:s,ctx:c}),this},once:function(l,s,c){var d=this;function f(){d.off(l,f),s.apply(c,arguments)}return f._=s,this.on(l,f,c)},emit:function(l){var s=[].slice.call(arguments,1),c=((this.e||(this.e={}))[l]||[]).slice(),d=0,f=c.length;for(d;d<f;d++)c[d].fn.apply(c[d].ctx,s);return this},off:function(l,s){var c=this.e||(this.e={}),d=c[l],f=[];if(d&&s)for(var p=0,v=d.length;p<v;p++)d[p].fn!==s&&d[p].fn._!==s&&f.push(d[p]);return f.length?c[l]=f:delete c[l],this}},a.exports=i,a.exports.TinyEmitter=i})},r={};function o(a){if(r[a])return r[a].exports;var i=r[a]={exports:{}};return n[a](i,i.exports,o),i.exports}return(function(){o.n=function(a){var i=a&&a.__esModule?function(){return a.default}:function(){return a};return o.d(i,{a:i}),i}})(),(function(){o.d=function(a,i){for(var l in i)o.o(i,l)&&!o.o(a,l)&&Object.defineProperty(a,l,{enumerable:!0,get:i[l]})}})(),(function(){o.o=function(a,i){return Object.prototype.hasOwnProperty.call(a,i)}})(),o(686)})().default})})(Fi)),Fi.exports}var rA=nA();const pA=ay(rA),oA="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAACRSURBVHgB7ZJBCsQgDEWTmQvMncT7dOuqmY3iai6kMN31UmIjdNFFKuk+DwKahP9ABDAMQyTnvHCtT/ZjjIs0e0nN1hr03kkjGTu8+0PEjzR/S81a6+6cQz6S9x5KKdsknLi+IQRSC07JfybRhE8FM4k2fICgIKVE/MYrF427NlwtuEpOgSr8MUNy9x0Nw7jnAFsnZ7Uu5CkqAAAAAElFTkSuQmCC",{TextArea:Gm}=zs,{useForm:aA}=Fo,Ab={\u56DE\u7B54\u4E0D\u4F73:"ansPoor",\u683C\u5F0F\u95EE\u9898:"formatError",\u7406\u89E3\u95EE\u9898\u6709\u8BEF:"harmfulInfo",\u5176\u4ED6:"othres"},mA=({open:e,setOpen:t,feedBackList:n,handleConfirm:r})=>{const o={header:{padding:"20px 24px",borderBottom:"1px solid #F0F0F0",margin:0},body:{padding:"16px 24px 20px 24px",borderBottom:"1px solid #F0F0F0"},mask:{},footer:{padding:"16px 24px",margin:0},content:{padding:0,borderRadius:"4px",width:"563px"}},[a]=aA(),[i,l]=Pt({}),s=async()=>{try{const c=await a.validateFields();t(!1);const d={...c};Object.entries(i||{}).forEach(f=>{const[p,v]=f;v&&(d[Ab[p]]=v)}),r(d)}catch(c){console.log(c);return}};return It(()=>{e||(a.resetFields(),l(null))},[e]),_t(iy,{modal:{styles:o},children:mn(dy,{open:e,onCancel:()=>t(!1),title:_t("div",{className:"text-[16px] text-[#2A2A2A] font-bold leading-[1]",children:"\u611F\u8C22\u60A8\u7684\u53CD\u9988\uFF01\u8FD9\u5C06\u5E2E\u52A9\u6211\u4EEC\u4E0D\u65AD\u4F18\u5316\u4E0E\u63D0\u5347\u3002"}),footer:mn("div",{children:[_t(Bi,{className:"mr-[16px] w-[76px]",onClick:()=>{t(!1)},children:"\u53D6\u6D88"}),_t(Bi,{type:"primary",className:"w-[76px] border-none",onClick:s,children:"\u786E\u8BA4"})]}),children:[_t(iA,{feedBackList:n,treeSelectResult:i,setTreeSelectResult:l}),mn(Fo,{form:a,layout:"vertical",children:[_t(Fo.Item,{name:"supplementExplain",label:"\u8865\u5145\u63CF\u8FF0",children:_t(Gm,{})})," ",_t(Fo.Item,{name:"idealAnswer",label:"\u60A8\u89C9\u5F97\u66F4\u597D\u7684\u56DE\u7B54\u662F\u4EC0\u4E48\uFF1F",children:_t(Gm,{})}),_t(Fo.Item,{name:"userPhone",label:"\u8054\u7CFB\u7535\u8BDD",children:_t(zs,{})}),_t(Fo.Item,{name:"deptName",label:"\u90E8\u95E8",children:_t(zs,{})})]})]})})},iA=({feedBackList:e,treeSelectResult:t,setTreeSelectResult:n})=>{const[r,o]=Pt(!1),[a,i]=Pt([]),[l,s]=Pt([]),[c,d]=Pt([]),[f,p]=Pt(null),v=En(()=>(s([]),f!=null&&f.items?[{title:"\u5168\u9009",key:"\u5168\u9009",children:f.items.map(g=>({title:g,key:g}))}]:[]),[f]),h=g=>{d(m=>Array.isArray(m)&&Array.isArray(l)?Object.entries(t).reduce((x,y)=>{const[w,C]=y,$=(C?C.split(";"):[]).filter(k=>k!==g);return n(k=>({...k||{},[w]:$.join(";")})),[...x,...$]},[]):m)};return It(()=>{if(i(["\u5168\u9009"]),!t||!(f!=null&&f.que_name))return;const g=t[f.que_name]||"",m=g?g.split(";"):[];s(m)},[v,r]),It(()=>{t===null&&(d([]),p(null),s([]))},[t]),It(()=>{console.log("treeSelectResult",t),console.log("selectedValue",c),console.log("feedBackList",e),console.log("pKey",Ab),console.log("selectedParent",f)},[t,c]),mn("div",{className:"relative mb-[24px] z-20",children:[mn("div",{className:"absolute w-full z-10",children:[mn("div",{className:"h-[32px] box-border flex items-center justify-between border-[1px] border-solid border-[#D9D9D9] rounded-[4px] cursor-pointer",onClick:()=>o(!r),children:[_t("div",{className:"ml-[16px]",children:"\u95EE\u9898\u7C7B\u578B"}),_t("img",{src:oA,width:24,height:24,className:"mr-[16px]"})]}),mn("div",{style:{display:r?"":"none"},className:"h-[288px] rounded-[4px] shadow-md mt-[4px] bg-white",children:[mn("div",{className:"h-[248px] flex",style:{borderBottom:"1px solid #F0F0F0"},children:[_t("div",{className:"w-[203px] px-[8px] py-[8px]",style:{borderRight:"1px solid #F0F0F0"},children:e.map((g,m)=>{var b;return mn("div",{className:"rounded-[4px] h-[32px] cursor-pointer flex items-center",style:{backgroundColor:(f==null?void 0:f.que_name)===g.que_name?"#E6F4FF":""},children:[_t("div",{className:"h-full w-full leading-[32px]",onClick:()=>{p(g)},children:mn("div",{className:"ml-[8px] text-[14px] text-[#2A2A2A]",children:[g.que_name,"(",t&&t[g.que_name]?t[g.que_name].split(";").length:0,"/",(b=g==null?void 0:g.items)==null?void 0:b.length,")"]})}),_t(ly,{className:"mr-[8px] w-3 h-3 text-[rgba(0,0,0,0.45)]"})]},m)})}),_t("div",{className:"selfTree h-full flex-1 mt-[8px] ml-[16px]",children:_t(bu,{checkable:!0,defaultSelectedKeys:["0-1"],treeData:v,blockNode:!0,checkedKeys:l,expandedKeys:a,onCheck:g=>{Array.isArray(g)&&n(m=>({...m||{},[(f==null?void 0:f.que_name)||""]:(g||[]).filter(b=>b!=="\u5168\u9009").join(";")})),s(g)}})})]}),mn("div",{className:"flex justify-end h-[40px] items-center",children:[_t(Bi,{size:"small",className:"mr-[8px]",onClick:()=>o(!1),children:"\u53D6\u6D88"}),_t(Bi,{size:"small",type:"primary",className:"border-none mr-[16px]",onClick:()=>{d(g=>Array.isArray(g)&&Array.isArray(l)?Object.values(t).reduce((b,x)=>[...b,...x?x.split(";"):[]],[]):g),o(!1)},children:"\u786E\u8BA4"})]})]})]}),_t("div",{className:"h-[32px]"}),!!(c!=null&&c.length)&&mn("div",{children:[mn("div",{className:"mt-[5px] text-[12px] text-[#555555]",children:["\u5DF2\u9009\u62E9 ",c.length," \u4E2A"]}),(c||[]).map(g=>{let m="";return Object.entries(t||{}).forEach(b=>{const[x,y]=b;y.indexOf(g)>-1&&(m=x)}),mn(sy,{closable:!0,className:"mt-[5px]",onClose:()=>h(g),children:[m,"\uFF08",g,"\uFF09"]},g)})]})]})};function gA({title:e,subtitle:t}){const[n,r]=Pt(0);return It(()=>{let o;return n<98?o=setTimeout(()=>{r(a=>a+Math.random()*6+1)},80):n<100&&(o=setTimeout(()=>r(100),400)),()=>clearTimeout(o)},[n]),mn("div",{className:"flex flex-col justify-center items-center min-h-screen bg-gradient-to-br from-[#EEF4FF] via-white to-[#F5F8FF]",children:[mn("div",{className:"mb-8 flex flex-col items-center",children:[_t("div",{className:"mt-6 text-2xl font-semibold text-[#222222] tracking-wide",children:e||"\u5C0F\u9CB8\u667A\u80FD\u4F1A\u8BDD\u52A9\u624B"}),_t("div",{className:"mt-2 text-sm text-[#555555]",children:t||"\u8BA9\u667A\u80FD\u5BF9\u8BDD\u66F4\u7B80\u5355"})]}),mn("div",{className:"relative w-80 max-w-sm",children:[_t("div",{className:"w-full h-2 bg-[#EEF4FF] rounded-full overflow-hidden shadow-inner",children:_t("div",{className:"h-full bg-gradient-to-r from-[#2B69FF] to-[#8F91FF] transition-all duration-300 ease-out",style:{width:`${Math.min(n,100)}%`}})}),mn("div",{className:"absolute -right-2 top-5 text-sm text-[#555555]",children:[Math.min(Math.round(n),100),"%"]})]}),mn("div",{className:"mt-8 flex flex-col items-center gap-2",children:[_t("div",{className:"text-sm text-[#555555] animate-pulse",children:"\u6B63\u5728\u521D\u59CB\u5316\u5E94\u7528"}),_t("div",{className:"text-xs text-[#888888]",children:"\u9996\u6B21\u52A0\u8F7D\u53EF\u80FD\u9700\u8981\u4E00\u4E9B\u65F6\u95F4\uFF0C\u8BF7\u8010\u5FC3\u7B49\u5F85"})]})]})}const Tb=document.createElement("style");Tb.textContent=`
|
|
407
407
|
.animate-bounce-slow {
|
|
408
408
|
animation: bounce 2.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
|
|
409
409
|
}
|
package/chat.d.ts
CHANGED
|
@@ -23,6 +23,10 @@ declare interface GientechChatAdopterProps {
|
|
|
23
23
|
eventsEmit?: (eventName: string, data: any) => void;
|
|
24
24
|
CustomComponents?: CustomComponents;
|
|
25
25
|
senderConfig?: SenderConfig;
|
|
26
|
+
appLoadingConfig?: {
|
|
27
|
+
title?: string;
|
|
28
|
+
subtitle?: string;
|
|
29
|
+
};
|
|
26
30
|
[key: string]: any;
|
|
27
31
|
}
|
|
28
32
|
|