@witlink/components 1.0.5 → 1.0.7

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/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const B=require("ant-design-vue/es"),e=require("vue"),f=require("./utils.cjs"),j=require("dayjs"),E=require("ant-design-vue"),z=require("element-plus"),se={class:"icon",viewBox:"0 0 1024 1024",width:"1.2em",height:"1.2em"};function ie(t,n){return e.openBlock(),e.createElementBlock("svg",se,n[0]||(n[0]=[e.createElementVNode("path",{fill:"currentColor",d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8"},null,-1),e.createElementVNode("path",{fill:"currentColor",d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8Z"},null,-1)]))}const le=e.markRaw({name:"ant-design-plus",render:ie}),ce={class:"icon",viewBox:"0 0 1024 1024",width:"1.2em",height:"1.2em"};function ue(t,n){return e.openBlock(),e.createElementBlock("svg",ce,n[0]||(n[0]=[e.createElementVNode("path",{fill:"currentColor",d:"M872 474H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8"},null,-1)]))}const de=e.markRaw({name:"ant-design-minus",render:ue}),W=e.defineComponent({inheritAttrs:!1,__name:"index",props:e.mergeModels({precision:{type:Number},stringMode:{type:Boolean,default:!1},customControls:{type:Boolean,default:!1}},{value:{},valueModifiers:{}}),emits:e.mergeModels(["change"],["update:value"]),setup(t,{emit:n}){const o=e.useModel(t,"value"),i=t,c=n,l=e.useSlots(),r=e.useAttrs();function a(m){if(f.isNullOrUndef(m))o.value=null,c("change",null);else{let b=m;i.stringMode&&(b=Number(b).toFixed(i.precision)),o.value!==b&&(o.value=b,c("change",b))}}function d(){if(f.isNullOrUndef(o.value))return;let m=o.value;i.stringMode&&(m=Number(m).toFixed(i.precision)),o.value=m}function p(){if(r.disabled)return;const m=Number(o.value);!f.isNullOrUndef(r.min)&&m<=Number(r.min)||a(m-1)}function u(){if(r.disabled)return;const m=Number(o.value);!f.isNullOrUndef(r.max)&&m>=Number(r.max)||a(m+1)}return(m,b)=>{const k=de,x=le,C=B.InputNumber;return e.openBlock(),e.createBlock(C,e.mergeProps({value:o.value,precision:t.precision,stringMode:t.stringMode,controls:!t.customControls,onChange:a,onBlur:d},m.$attrs),e.createSlots({_:2},[e.renderList(Object.keys(e.unref(l)),v=>({name:v,fn:e.withCtx(g=>[e.renderSlot(m.$slots,v,e.normalizeProps(e.guardReactiveProps(g)))])})),t.customControls?{name:"addonBefore",fn:e.withCtx(()=>[e.createElementVNode("div",{class:"btn-control",onClick:p},[e.createVNode(k,{class:"btn-icon"})])]),key:"0"}:void 0,t.customControls?{name:"addonAfter",fn:e.withCtx(()=>[e.createElementVNode("div",{class:"btn-control",onClick:u},[e.createVNode(x,{class:"btn-icon"})])]),key:"1"}:void 0]),1040,["value","precision","stringMode","controls"])}}}),q=e.defineComponent({__name:"index",props:{value:{},max:{type:Number,default:0},maxUnit:{type:String,default:"day"},min:{type:Number,default:0},minUnit:{type:String,default:"day"},interval:{type:Number,default:60}},emits:["update:value","change"],setup(t,{emit:n}){const o=t,i=n,c=e.ref(),l=e.ref(),r=u=>{const m=j().add(o.max,o.maxUnit),b=j().subtract(o.min,o.minUnit),k=o.interval;if(!c.value||c.value.length===0)return u.isAfter(m)||u.isBefore(b);const x=c.value[0]&&(u.diff(c.value[0],"days")>k||u.isAfter(m));return c.value[1]&&(c.value[1].diff(u,"days")>k||u.isBefore(b))||x},a=u=>{u?(c.value=[],l.value=[]):l.value=void 0},d=u=>{i("update:value",u),i("change",u)},p=u=>{c.value=u};return(u,m)=>{const b=B.RangePicker;return e.openBlock(),e.createBlock(b,e.mergeProps({value:e.unref(l)||t.value,"disabled-date":r,onChange:d,onOpenChange:a,onCalendarChange:p},u.$attrs),e.createSlots({_:2},[e.renderList(Object.keys(u.$slots),k=>({name:k,fn:e.withCtx(x=>[e.renderSlot(u.$slots,k)])}))]),1040,["value"])}}});function P(t){t||(t=e.getCurrentInstance());const n=(t==null?void 0:t.provides)||{},o=pe(n,"configProvider"),i=n[o];return Object.fromEntries(Object.entries(i).map(([l,r])=>[l,e.unref(r)]))}function pe(t,n){for(;t;){const o=Reflect.ownKeys(t).find(i=>i===n||typeof i=="symbol"&&i.description===n);if(o)return o;t=Object.getPrototypeOf(t)}return null}function fe(t){var o;let n=(o=e.getCurrentInstance())==null?void 0:o.parent;for(;n;){if(n.type.name===t)return n;n=n.parent}return null}const me="data:image/svg+xml,%3csvg%20width='25'%20height='24'%20viewBox='0%200%2025%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M7.3125%205.5L2.3125%2012L7.3125%2018.5H22.3125V5.5H7.3125Z'%20stroke='%23272E3B'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M10.8125%209.5L15.8125%2014.5'%20stroke='%23272E3B'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M15.8125%209.5L10.8125%2014.5'%20stroke='%23272E3B'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",ve=Object.freeze(Object.defineProperty({__proto__:null,default:me},Symbol.toStringTag,{value:"Module"})),ge="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20aria-hidden='true'%20role='img'%20class='iconify%20iconify--logos'%20width='37.07'%20height='36'%20preserveAspectRatio='xMidYMid%20meet'%20viewBox='0%200%20256%20198'%3e%3cpath%20fill='%2341B883'%20d='M204.8%200H256L128%20220.8L0%200h97.92L128%2051.2L157.44%200h47.36Z'%3e%3c/path%3e%3cpath%20fill='%2341B883'%20d='m0%200l128%20220.8L256%200h-51.2L128%20132.48L50.56%200H0Z'%3e%3c/path%3e%3cpath%20fill='%2335495E'%20d='M50.56%200L128%20133.12L204.8%200h-47.36L128%2051.2L97.92%200H50.56Z'%3e%3c/path%3e%3c/svg%3e",he=Object.freeze(Object.defineProperty({__proto__:null,default:ge},Symbol.toStringTag,{value:"Module"}));function ye(t){return Object.assign({"/src/assets/svg/clear.svg":ve,"/src/assets/vue.svg":he})[`/src/assets/${t}`].default}let M;E.Drawer.destroy=function(){const t=E.Drawer.instanceArr||[],n=t.pop();if(n&&e.render(null,n.container),t.length>0){const o=t[t.length-1].instance;Object.assign(o.component.props,{contentWrapperStyle:{transform:null}}),o.component.update()}};E.Drawer.destroyAll=function(){(E.Drawer.instanceArr||[]).forEach(n=>{e.render(null,n.container)}),E.Drawer.instanceArr=[]};function be(){var k,x;const t=e.getCurrentInstance(),{message:n,modal:o,notification:i}=E.App.useApp(),c={zh:"关闭",en:"Close",fr:"fermeture"},l={zh:"请输入",en:"Please Enter",fr:"Veuillez entrer"},r=P(),a=((x=(k=r==null?void 0:r.locale)==null?void 0:k.locale)==null?void 0:x.slice(0,2))||"en";function d({title:C,...v}){const g=e.ref();return p({title:C,...v,comp:E.Textarea,props:{placeholder:l[a],autoSize:{minRows:6},value:g,"onUpdate:value":s=>{g.value=s},...v.props},class:"modal-comp modal-comp-input",type:"confirm",onOk:()=>new Promise((s,h)=>{v.onOk&&(v.onOk(g.value)?s(1):h()),s(1)})})}function p({title:C,comp:v,props:g,...s}){const h=e.h(v,g),y=(s==null?void 0:s.type)??"info",_={title:C,content:h,width:"auto",icon:null,closable:!0,maskClosable:!0,centered:!0,class:"modal-comp",...s};switch(y){case"info":M=o.info(_);break;case"warning":M=o.warning(_);break;case"success":M=o.success(_);break;case"confirm":M=o.confirm(_);break}return M}function u(){M==null||M.destroy()}function m({title:C,comp:v,props:g,...s}){const h=s.getContainer||document.createDocumentFragment();E.Drawer.instanceArr||(E.Drawer.instanceArr=[]);const y=E.Drawer.instanceArr,_=y[y.length-1];let w;if((_==null?void 0:_.comp)===v){const S=_.instance;Object.assign(S.component.props,{title:C,...s}),S.component.update(),w=_.compInstance,Object.assign(w.component.props,{...g}),w.component.update()}else{if(_){const $=_.instance;Object.assign($.component.props,{contentWrapperStyle:{transform:"translateX(-180px)"}}),$.component.update()}w=e.h(v,g);const S={default:()=>e.h(z.ElScrollbar,{style:{height:"100%"},wrapStyle:{overflowX:"hidden"}},w)};s.footer===void 0&&Object.assign(S,{footer:()=>e.h(E.Button,{onClick:()=>{E.Drawer.destroy()}},c[a])});const N=s.width||992;delete s.width;const L=e.h(E.Drawer,{title:C,width:N,open:!0,class:"drawer-comp",footerStyle:{textAlign:"right"},onClose:()=>{s!=null&&s.afterClose&&s.afterClose(),E.Drawer.destroy()},...s},S),ae=r.getPrefixCls(),V=e.h(E.ConfigProvider,{...r,prefixCls:ae},{default:()=>L});V.appContext=t.appContext,e.render(V,h),y.push({instance:L,comp:v,compInstance:w,container:h})}return{updateProps:S=>{Object.assign(w.component.props,{...S}),w.component.update()}}}function b(){E.Drawer.destroy()}return{message:n,modal:o,notification:i,modalInput:d,modalComp:p,modalDestroy:u,drawerComp:m,drawerDestroy:b}}const K=e.defineComponent({inheritAttrs:!1,__name:"index",props:{loadData:{type:Function,required:!0},formatSortParams:{type:Boolean,default:!0}},setup(t,{expose:n}){const o=t,i=e.useSlots(),c=e.ref([]),l=e.ref(!1),r=e.ref(0),a=e.ref(1),d=e.ref(10),p=e.ref(),u=e.ref(),m={zh:"共 {num} 条",en:"Total {num} items",fr:"Total de {num}"},b=P(),k=e.computed(()=>{var _,w;return((w=(_=b==null?void 0:b.locale)==null?void 0:_.locale)==null?void 0:w.slice(0,2))||"en"}),x=e.computed(()=>({total:r.value,current:a.value,pageSize:d.value,showSizeChanger:!0,size:"small",showTotal:y=>m[k.value].replace("{num}",y)}));function C(){var y;if(typeof o.loadData=="function"){l.value=!0;const _={pageNo:a.value,pageSize:d.value};o.formatSortParams&&((y=u.value)!=null&&y.orderMap)&&(_[u.value.field+"SortField"]=u.value.orderMap),o.loadData(_,p.value,u.value).then(w=>{l.value=!1,(w==null?void 0:w.code)===0&&(r.value=w.result.totalCount,c.value=w.result.data)})}}function v(y,_,w){if(a.value=y.current,d.value=y.pageSize,p.value=_,w){const S={ascend:"asc",descend:"desc"};w.orderMap=S[w.order]||""}u.value=w,C()}function g(y,_){_.width=y}function s(){a.value=1,C()}function h(){a.value=1,r.value=0,c.value=[]}return n({loadData:C,refresh:s,reset:h}),(y,_)=>{const w=B.Table;return e.openBlock(),e.createBlock(w,e.mergeProps({class:"table-ex",loading:e.unref(l),pagination:e.unref(x),dataSource:e.unref(c),onChange:v,onResizeColumn:g},y.$attrs),e.createSlots({_:2},[e.renderList(Object.keys(e.unref(i)),S=>({name:S,fn:e.withCtx(N=>[S!=="emptyText"?e.renderSlot(y.$slots,S,e.normalizeProps(e.mergeProps({key:0},N))):e.renderSlot(y.$slots,S,{key:1})])}))]),1040,["loading","pagination","dataSource"])}}}),H=e.defineComponent({__name:"index",props:{leftMin:{type:Number,default:.1},leftMax:{type:Number,default:.3},bordered:{type:Boolean,default:!0}},setup(t){const n=t,o=e.ref(),i=e.ref(),c=e.ref({}),l=e.ref({}),r=e.ref(.2);function a(p){c.value={width:`calc(${p*100}% - 5px)`},l.value={width:`calc(${(1-p)*100}% - 5px)`}}function d(){const p=o.value;if(!p)return;const u=p.clientWidth,m=p.getBoundingClientRect(),b=m.left;function k(C){C.preventDefault(),(C.clientX<m.left||C.clientX>m.right||C.clientY<m.top||C.clientY>m.bottom)&&x();const g=(C.clientX-b)/u;g>n.leftMin&&g<n.leftMax&&(r.value=g,a(g))}function x(){document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",x)}document.addEventListener("mousemove",k),document.addEventListener("mouseup",x)}return e.onMounted(()=>{a(r.value),i.value&&i.value.addEventListener("mousedown",d,!1)}),e.onUnmounted(()=>{i.value&&i.value.removeEventListener("mousedown",d)}),(p,u)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"container",ref:o,class:e.normalizeClass(["wl-splitter",{bordered:t.bordered}])},[e.createElementVNode("div",{class:"my-left",style:e.normalizeStyle(e.unref(c))},[e.renderSlot(p.$slots,"left")],4),e.createElementVNode("div",{ref_key:"spliter",ref:i,style:{height:"100%",width:"10px"},class:"my-spliter"},null,512),e.createElementVNode("div",{class:"my-right",style:e.normalizeStyle(e.unref(l))},[e.renderSlot(p.$slots,"right")],4)],2))}}),_e={class:"icon",width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function we(t,n){return e.openBlock(),e.createElementBlock("svg",_e,n[0]||(n[0]=[e.createElementVNode("path",{d:"M7.3125 5.5L2.3125 12L7.3125 18.5H22.3125V5.5H7.3125Z",stroke:"#272E3B","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),e.createElementVNode("path",{d:"M10.8125 9.5L15.8125 14.5",stroke:"#272E3B","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),e.createElementVNode("path",{d:"M15.8125 9.5L10.8125 14.5",stroke:"#272E3B","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const Ce=e.markRaw({name:"local-clear",render:we}),ke={class:"nums-box"},xe={class:"btn-box"},X=e.defineComponent({inheritAttrs:!1,__name:"index",props:e.mergeModels({quickNums:{type:Array,default:()=>[100,500,1e3,1500,2e3,2500]},min:{type:Number,default:0},max:{type:Number,default:1e8},precision:{type:Number,default:0}},{value:{type:String},valueModifiers:{}}),emits:e.mergeModels(["enter"],["update:value"]),setup(t,{emit:n}){const o=t,i=n,c=e.ref(),l=e.ref(),r=e.ref(["7","8","9","4","5","6","1","2","3","0","00","."]),a=e.useModel(t,"value"),d=e.ref(!1);function p(){d.value=!0}function u(){C()}function m(v){l.value.focus(),a.value=Number(v).toFixed(o.precision)}function b(v){if(l.value.focus(),f.isNullOrUndef(a.value)||a.value===""){if(["00","."].includes(v))return;a.value=v}else{const g=String(a.value),s=c.value.getElementsByTagName("input")[0],h=s.selectionStart||0,y=s.selectionEnd||0;a.value=`${g.slice(0,h)}${v}${g.slice(y)}`;const _=h+v.length;e.nextTick(()=>{l.value.setSelectionRange(_,_)})}}function k(){if(l.value.focus(),f.isNullOrUndef(a.value))return;const v=String(a.value);if(v!=null&&v.length){const g=c.value.getElementsByTagName("input")[0],s=g.selectionStart||0,h=g.selectionEnd||0,y=s>0?s-1:0;s===h?a.value=v.slice(0,y)+v.slice(h):a.value=v.slice(0,s)+v.slice(h),e.nextTick(()=>{l.value.setSelectionRange(y,y)})}}function x(){l.value.blur()}function C(){const v=o.min,g=o.max;let s=parseFloat(a.value||"0");f.isNullOrUndef(v)||(s=s>v?s:v),f.isNullOrUndef(g)||(s=s>g?g:s),a.value=Number(s).toFixed(o.precision),d.value=!1,i("enter")}return(v,g)=>{const s=B.Button,h=B.Col,y=Ce,_=B.Row,w=B.Input,S=B.Popover;return e.openBlock(),e.createElementBlock("div",{class:"number-keyboard",ref_key:"numberKeyboard",ref:c},[e.createVNode(S,{overlayClassName:"popover-keyboard",trigger:"manual",placement:"bottomLeft",align:{offset:[0,-9]},open:e.unref(d),"onUpdate:open":g[2]||(g[2]=N=>e.isRef(d)?d.value=N:null)},{content:e.withCtx(()=>[e.createElementVNode("div",{class:"keyboard-panel",onMousedownCapture:g[0]||(g[0]=e.withModifiers(()=>{},["prevent","stop"]))},[e.createVNode(_,{gutter:"8"},{default:e.withCtx(()=>[e.createVNode(h,{span:18},{default:e.withCtx(()=>[e.createElementVNode("div",ke,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.quickNums,N=>(e.openBlock(),e.createBlock(s,{class:"btn-num",key:N,onClick:L=>m(N)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(N),1)]),_:2},1032,["onClick"]))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r),N=>(e.openBlock(),e.createBlock(s,{class:"btn-num",key:N,onClick:L=>b(N)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(N),1)]),_:2},1032,["onClick"]))),128))])]),_:1}),e.createVNode(h,{span:6},{default:e.withCtx(()=>[e.createElementVNode("div",xe,[e.createVNode(s,{class:"btn-clear",onClick:k},{default:e.withCtx(()=>[e.createVNode(y,{style:{width:"24px",height:"24px"}})]),_:1}),e.createVNode(s,{class:"btn-enter",type:"primary",onClick:e.withModifiers(x,["stop"])},{default:e.withCtx(()=>g[3]||(g[3]=[e.createTextVNode("Enter ")])),_:1})])]),_:1})]),_:1})],32)]),default:e.withCtx(()=>[e.createVNode(w,e.mergeProps({ref_key:"inputRef",ref:l,value:a.value,"onUpdate:value":g[1]||(g[1]=N=>a.value=N)},v.$attrs,{onFocus:p,onBlur:u,onKeyup:e.withKeys(x,["enter"])}),null,16,["value"])]),_:1},8,["open"])],512)}}}),R=Object.freeze(Object.defineProperty({__proto__:null,AInputNumberEx:W,ARangePickerEx:q,ATableEx:K,WlNumberKeyboard:X,WlSplitter:H},Symbol.toStringTag,{value:"Module"}));function Z(t){return e.getCurrentScope()?(e.onScopeDispose(t),!0):!1}const O=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Ee=Object.prototype.toString,Se=t=>Ee.call(t)==="[object Object]";function Ne(t){let n;function o(){return n||(n=t()),n}return o.reset=async()=>{const i=n;n=void 0,i&&await i},o}function T(t){return Array.isArray(t)?t:[t]}function Me(t,n,o={}){const{immediate:i=!0,immediateCallback:c=!1}=o,l=e.shallowRef(!1);let r=null;function a(){r&&(clearTimeout(r),r=null)}function d(){l.value=!1,a()}function p(...u){c&&t(),a(),l.value=!0,r=setTimeout(()=>{l.value=!1,r=null,t(...u)},e.toValue(n))}return i&&(l.value=!0,O&&p()),Z(d),{isPending:e.shallowReadonly(l),start:p,stop:d}}function Be(t,n,o){return e.watch(t,n,{...o,immediate:!0})}const Le=O?window:void 0,Y=O?window.navigator:void 0;function Pe(t){var n;const o=e.toValue(t);return(n=o==null?void 0:o.$el)!=null?n:o}function G(...t){const n=[],o=()=>{n.forEach(a=>a()),n.length=0},i=(a,d,p,u)=>(a.addEventListener(d,p,u),()=>a.removeEventListener(d,p,u)),c=e.computed(()=>{const a=T(e.toValue(t[0])).filter(d=>d!=null);return a.every(d=>typeof d!="string")?a:void 0}),l=Be(()=>{var a,d;return[(d=(a=c.value)==null?void 0:a.map(p=>Pe(p)))!=null?d:[Le].filter(p=>p!=null),T(e.toValue(c.value?t[1]:t[0])),T(e.unref(c.value?t[2]:t[1])),e.toValue(c.value?t[3]:t[2])]},([a,d,p,u])=>{if(o(),!(a!=null&&a.length)||!(d!=null&&d.length)||!(p!=null&&p.length))return;const m=Se(u)?{...u}:u;n.push(...a.flatMap(b=>d.flatMap(k=>p.map(x=>i(b,k,x,m)))))},{flush:"post"}),r=()=>{l(),o()};return Z(o),r}function Te(){const t=e.shallowRef(!1),n=e.getCurrentInstance();return n&&e.onMounted(()=>{t.value=!0},n),t}function Q(t){const n=Te();return e.computed(()=>(n.value,!!t()))}function A(t,n={}){const{controls:o=!1,navigator:i=Y}=n,c=Q(()=>i&&"permissions"in i),l=e.shallowRef(),r=typeof t=="string"?{name:t}:t,a=e.shallowRef(),d=()=>{var u,m;a.value=(m=(u=l.value)==null?void 0:u.state)!=null?m:"prompt"};G(l,"change",d,{passive:!0});const p=Ne(async()=>{if(c.value){if(!l.value)try{l.value=await i.permissions.query(r)}catch{l.value=void 0}finally{d()}if(o)return e.toRaw(l.value)}});return p(),o?{state:a,isSupported:c,query:p}:a}function De(t={}){const{navigator:n=Y,read:o=!1,source:i,copiedDuring:c=1500,legacy:l=!1}=t,r=Q(()=>n&&"clipboard"in n),a=A("clipboard-read"),d=A("clipboard-write"),p=e.computed(()=>r.value||l),u=e.shallowRef(""),m=e.shallowRef(!1),b=Me(()=>m.value=!1,c,{immediate:!1});async function k(){let s=!(r.value&&g(a.value));if(!s)try{u.value=await n.clipboard.readText()}catch{s=!0}s&&(u.value=v())}p.value&&o&&G(["copy","cut"],k,{passive:!0});async function x(s=e.toValue(i)){if(p.value&&s!=null){let h=!(r.value&&g(d.value));if(!h)try{await n.clipboard.writeText(s)}catch{h=!0}h&&C(s),u.value=s,m.value=!0,b.start()}}function C(s){const h=document.createElement("textarea");h.value=s??"",h.style.position="absolute",h.style.opacity="0",document.body.appendChild(h),h.select(),document.execCommand("copy"),h.remove()}function v(){var s,h,y;return(y=(h=(s=document==null?void 0:document.getSelection)==null?void 0:s.call(document))==null?void 0:h.toString())!=null?y:""}function g(s){return s==="granted"||s==="prompt"}return{isSupported:p,text:u,copied:m,copy:x}}const Oe=De();let D;const J={mounted(t,n,o){var r,a;const i=P(o.ctx),c=((a=(r=i==null?void 0:i.locale)==null?void 0:r.locale)==null?void 0:a.slice(0,2))||"en",l={zh:"复制成功",en:"Copy successfully",fr:"Copie réussie"};D=()=>{Oe.copy(n.value),E.message.success(l[c])},t.addEventListener("click",D)},unmounted(t){t.removeEventListener("click",D)}},ee={beforeMount(t,n,o){const i=n.value,c={letterNumber:/^\w*$/,price:/^(\d*|(\d+\.\d{0,2}))$/,phone:/^\d{0,11}$/,number:/^\d*$/,negativePrice:/^\-?(\d*|(\d+\.\d{0,2}))$/,loginVerify:/^[0-9a-zA-Z]{0,4}$/,verify:/^\d{0,6}$/,idCard:/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/},l=i instanceof RegExp?i:n.arg&&c[n.arg]?c[n.arg]:null;t._handleInput=r=>{if(r.isTrusted&&!(!r.isComposing&&r.inputType==="insertCompositionText"&&r.data)){const a=l==null?void 0:l.test(r.target.value);if(t._input=a?r.target.value:t._input,r.target.value="",r.target.value=t._input,!a)r.target.selectionStart=t._start,r.target.selectionEnd=t._end;else switch(r.inputType){case"deleteContentForward":case"deleteByDrag":case"deleteByCut":r.target.selectionStart=t._start,r.target.selectionEnd=t._start;break;case"deleteContentBackward":r.target.selectionStart=t._start===t._end?t._start-1:t._start,r.target.selectionEnd=t._start===t._end?t._start-1:t._start;break;case"insertFromPaste":case"insertFromDrop":const p=r.dataTransfer||r.clipboardData||null;if(p){const u=p.getData("text")||"";r.target.selectionStart=t._start+u.length,r.target.selectionEnd=t._start+u.length}break;case"insertText":case"insertCompositionText":r.target.selectionStart=t._start+1,r.target.selectionEnd=t._start+1;break}const d=new InputEvent("input",{isComposing:!1});r.target.dispatchEvent(d)}},t._handleKeydown=r=>{const a=l==null?void 0:l.test(r.target.value);t._input=a?r.target.value:"",t._start=r.target.selectionStart,t._end=r.target.selectionEnd},t._handleDrop=r=>{r.stopPropagation()},o.type==="input"&&(t.addEventListener("input",t._handleInput),t.addEventListener("keydown",t._handleKeydown),t.addEventListener("drop",t._handleDrop))},unmounted(t){t._handleInput&&t.removeEventListener("input",t._handleInput),t._handleKeydown&&t.removeEventListener("keydown",t._handleKeydown),t._handleDrop&&t.removeEventListener("drop",t._handleDrop)}};function U(t,n,o){const i=n.value;if(i){const c=i/2;t.style.marginLeft=`-${c}px`,t.style.marginRight=`-${c}px`;const l=o.children;l!=null&&l.length&&l[0].children.forEach(r=>{if(r.component){const a=r.el;a!=null&&a.style&&(a.style.paddingLeft=c+"px",a.style.paddingRight=c+"px")}else Array.isArray(r.children)&&r.children.forEach(a=>{const d=a.el;d!=null&&d.style&&(d.style.paddingLeft=c+"px",d.style.paddingRight=c+"px")})})}}const te={beforeMount(t){t.classList.add("ant-row"),t.style.display="flex",t.style.flexWrap="wrap",t.style.flexDirection="row",t.style.minWidth=0},mounted(t,n,o){U(t,n,o)},updated(t,n,o,i){U(t,n,o)}},ne={beforeMount(t,n){t.classList.add("ant-col",`ant-col-${n.value}`);const o=n.value/24*100;t.style.position="relative",t.style.flex=`0 0 ${o}%`,t.style.maxWidth=`${o}%`}},oe={mounted(t,n,o){const{value:i}=n,{content:c="",placement:l="top",enabled:r=!0,padding:a=8,...d}=typeof i=="string"?{content:i}:i;if(t.tooltipDisabled=!1,!r)t.tooltipDisabled=!0;else if(n.modifiers.exceed){const k=t.clientWidth,x=I(c);t.tooltipDisabled=x<k-a*2}const p=e.ref({top:0,left:0,bottom:0,right:0}),u=e.ref({getBoundingClientRect:()=>p.value}),m=e.h(z.ElTooltip,{visible:!1,content:c,placement:l,virtualTriggering:!0,virtualRef:u.value,popperClass:"vtooltip",...d}),b=document.createDocumentFragment();e.render(m,b),t.tooltipVm=m,t.tooltipContainer=b,t.addEventListener("mouseenter",()=>{p.value=t.getBoundingClientRect(),m.component&&!t.tooltipDisabled&&(Object.assign(m.component.props,{visible:!0}),m.component.update())}),t.addEventListener("mouseleave",()=>{m.component&&(Object.assign(m.component.props,{visible:!1}),m.component.update())})},updated(t,n){if(t.tooltipVm){const{value:o}=n,{content:i="",placement:c="top",enabled:l=!0,padding:r=8,...a}=typeof o=="string"?{content:o}:o;if(t.tooltipDisabled=!1,!l)t.tooltipDisabled=!0;else if(n.modifiers.exceed){const p=t.clientWidth,u=I(i);t.tooltipDisabled=u<p-r*2}const d=t.tooltipVm;d.component&&(Object.assign(d.component.props,{content:i,placement:c,...a}),d.component.update())}},unmounted(t){t.tooltipContainer&&e.render(null,t.tooltipContainer)}};function I(t,n){const i=document.createElement("canvas").getContext("2d");return i.font="14px Arial",i.measureText(t).width}const re={beforeMount(t,n){const{value:o}=n;o&&(f.hasPermission(o)||setTimeout(()=>{var c;(c=t.parentNode)==null||c.removeChild(t)},50))}},F=Object.freeze(Object.defineProperty({__proto__:null,col:ne,copy:J,inputlimit:ee,permission:re,row:te,tooltip:oe},Symbol.toStringTag,{value:"Module"}));function Ve(t){Object.keys(R).forEach(n=>{t.component(n,R[n])}),Object.keys(F).forEach(n=>{t.directive(n,F[n])})}const $e={install:Ve};exports.UserCenterKey=f.UserCenterKey;exports.buildTree=f.buildTree;exports.exportFile=f.exportFile;exports.forEachTree=f.forEachTree;exports.getButtonPermissions=f.getButtonPermissions;exports.getLocale=f.getLocale;exports.getMenuInfo=f.getMenuInfo;exports.getToken=f.getToken;exports.getUserCenterParams=f.getUserCenterParams;exports.getUserCenterParamsByUrl=f.getUserCenterParamsByUrl;exports.getUserInfo=f.getUserInfo;exports.hasPermission=f.hasPermission;exports.is=f.is;exports.isArray=f.isArray;exports.isAsyncFunction=f.isAsyncFunction;exports.isBoolean=f.isBoolean;exports.isClient=f.isClient;exports.isDate=f.isDate;exports.isDef=f.isDef;exports.isElement=f.isElement;exports.isFunction=f.isFunction;exports.isImageDom=f.isImageDom;exports.isNull=f.isNull;exports.isNullOrUndef=f.isNullOrUndef;exports.isNumber=f.isNumber;exports.isObject=f.isObject;exports.isPromise=f.isPromise;exports.isServer=f.isServer;exports.isString=f.isString;exports.isUndef=f.isUndef;exports.isWindow=f.isWindow;exports.logoutToUserCenter=f.logoutToUserCenter;exports.removeAll=f.removeAll;exports.removeLocale=f.removeLocale;exports.removeToken=f.removeToken;exports.setLocale=f.setLocale;exports.setMenuInfo=f.setMenuInfo;exports.setToken=f.setToken;exports.setUserCenterParams=f.setUserCenterParams;exports.setUserInfo=f.setUserInfo;exports.toUserCenterConsole=f.toUserCenterConsole;exports.AInputNumberEx=W;exports.ARangePickerEx=q;exports.ATableEx=K;exports.WlNumberKeyboard=X;exports.WlSplitter=H;exports.col=ne;exports.copy=J;exports.default=$e;exports.inputlimit=ee;exports.permission=re;exports.row=te;exports.tooltip=oe;exports.useConfigProvider=P;exports.useFindParent=fe;exports.useModal=be;exports.useRequire=ye;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const B=require("ant-design-vue/es"),e=require("vue"),f=require("./utils.cjs"),R=require("dayjs"),E=require("ant-design-vue"),W=require("element-plus"),ie={class:"icon",viewBox:"0 0 1024 1024",width:"1.2em",height:"1.2em"};function le(t,n){return e.openBlock(),e.createElementBlock("svg",ie,n[0]||(n[0]=[e.createElementVNode("path",{fill:"currentColor",d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8"},null,-1),e.createElementVNode("path",{fill:"currentColor",d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8Z"},null,-1)]))}const ce=e.markRaw({name:"ant-design-plus",render:le}),ue={class:"icon",viewBox:"0 0 1024 1024",width:"1.2em",height:"1.2em"};function de(t,n){return e.openBlock(),e.createElementBlock("svg",ue,n[0]||(n[0]=[e.createElementVNode("path",{fill:"currentColor",d:"M872 474H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8"},null,-1)]))}const pe=e.markRaw({name:"ant-design-minus",render:de}),q=e.defineComponent({inheritAttrs:!1,__name:"index",props:e.mergeModels({precision:{type:Number},stringMode:{type:Boolean,default:!1},customControls:{type:Boolean,default:!1}},{value:{},valueModifiers:{}}),emits:e.mergeModels(["change"],["update:value"]),setup(t,{emit:n}){const o=e.useModel(t,"value"),i=t,c=n,l=e.useSlots(),r=e.useAttrs();function a(m){if(f.isNullOrUndef(m))o.value=null,c("change",null);else{let b=m;i.stringMode&&(b=Number(b).toFixed(i.precision)),o.value!==b&&(o.value=b,c("change",b))}}function d(){if(f.isNullOrUndef(o.value))return;let m=o.value;i.stringMode&&(m=Number(m).toFixed(i.precision)),o.value=m}function p(){if(r.disabled)return;const m=Number(o.value);!f.isNullOrUndef(r.min)&&m<=Number(r.min)||a(m-1)}function u(){if(r.disabled)return;const m=Number(o.value);!f.isNullOrUndef(r.max)&&m>=Number(r.max)||a(m+1)}return(m,b)=>{const C=pe,x=ce,k=B.InputNumber;return e.openBlock(),e.createBlock(k,e.mergeProps({value:o.value,precision:t.precision,stringMode:t.stringMode,controls:!t.customControls,onChange:a,onBlur:d},m.$attrs),e.createSlots({_:2},[e.renderList(Object.keys(e.unref(l)),v=>({name:v,fn:e.withCtx(g=>[e.renderSlot(m.$slots,v,e.normalizeProps(e.guardReactiveProps(g)))])})),t.customControls?{name:"addonBefore",fn:e.withCtx(()=>[e.createElementVNode("div",{class:"btn-control",onClick:p},[e.createVNode(C,{class:"btn-icon"})])]),key:"0"}:void 0,t.customControls?{name:"addonAfter",fn:e.withCtx(()=>[e.createElementVNode("div",{class:"btn-control",onClick:u},[e.createVNode(x,{class:"btn-icon"})])]),key:"1"}:void 0]),1040,["value","precision","stringMode","controls"])}}}),K=e.defineComponent({__name:"index",props:{value:{},max:{type:Number,default:0},maxUnit:{type:String,default:"day"},min:{type:Number,default:0},minUnit:{type:String,default:"day"},interval:{type:Number,default:60}},emits:["update:value","change"],setup(t,{emit:n}){const o=t,i=n,c=e.ref(),l=e.ref(),r=u=>{const m=R().add(o.max,o.maxUnit),b=R().subtract(o.min,o.minUnit),C=o.interval;if(!c.value||c.value.length===0)return u.isAfter(m)||u.isBefore(b);const x=c.value[0]&&(u.diff(c.value[0],"days")>C||u.isAfter(m));return c.value[1]&&(c.value[1].diff(u,"days")>C||u.isBefore(b))||x},a=u=>{u?(c.value=[],l.value=[]):l.value=void 0},d=u=>{i("update:value",u),i("change",u)},p=u=>{c.value=u};return(u,m)=>{const b=B.RangePicker;return e.openBlock(),e.createBlock(b,e.mergeProps({value:e.unref(l)||t.value,"disabled-date":r,onChange:d,onOpenChange:a,onCalendarChange:p},u.$attrs),e.createSlots({_:2},[e.renderList(Object.keys(u.$slots),C=>({name:C,fn:e.withCtx(x=>[e.renderSlot(u.$slots,C)])}))]),1040,["value"])}}});function P(t){t||(t=e.getCurrentInstance());const n=(t==null?void 0:t.provides)||{},o=fe(n,"configProvider"),i=n[o];return Object.fromEntries(Object.entries(i).map(([l,r])=>[l,e.unref(r)]))}function fe(t,n){for(;t;){const o=Reflect.ownKeys(t).find(i=>i===n||typeof i=="symbol"&&i.description===n);if(o)return o;t=Object.getPrototypeOf(t)}return null}function me(t){var o;let n=(o=e.getCurrentInstance())==null?void 0:o.parent;for(;n;){if(n.type.name===t)return n;n=n.parent}return null}const ve="data:image/svg+xml,%3csvg%20width='25'%20height='24'%20viewBox='0%200%2025%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M7.3125%205.5L2.3125%2012L7.3125%2018.5H22.3125V5.5H7.3125Z'%20stroke='%23272E3B'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M10.8125%209.5L15.8125%2014.5'%20stroke='%23272E3B'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M15.8125%209.5L10.8125%2014.5'%20stroke='%23272E3B'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",ge=Object.freeze(Object.defineProperty({__proto__:null,default:ve},Symbol.toStringTag,{value:"Module"})),he="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20aria-hidden='true'%20role='img'%20class='iconify%20iconify--logos'%20width='37.07'%20height='36'%20preserveAspectRatio='xMidYMid%20meet'%20viewBox='0%200%20256%20198'%3e%3cpath%20fill='%2341B883'%20d='M204.8%200H256L128%20220.8L0%200h97.92L128%2051.2L157.44%200h47.36Z'%3e%3c/path%3e%3cpath%20fill='%2341B883'%20d='m0%200l128%20220.8L256%200h-51.2L128%20132.48L50.56%200H0Z'%3e%3c/path%3e%3cpath%20fill='%2335495E'%20d='M50.56%200L128%20133.12L204.8%200h-47.36L128%2051.2L97.92%200H50.56Z'%3e%3c/path%3e%3c/svg%3e",ye=Object.freeze(Object.defineProperty({__proto__:null,default:he},Symbol.toStringTag,{value:"Module"}));function be(t){return Object.assign({"/src/assets/svg/clear.svg":ge,"/src/assets/vue.svg":ye})[`/src/assets/${t}`].default}let M;E.Drawer.destroy=function(){const t=E.Drawer.instanceArr||[],n=t.pop();if(n&&e.render(null,n.container),t.length>0){const o=t[t.length-1].instance;Object.assign(o.component.props,{contentWrapperStyle:{transform:null}}),o.component.update()}};E.Drawer.destroyAll=function(){(E.Drawer.instanceArr||[]).forEach(n=>{e.render(null,n.container)}),E.Drawer.instanceArr=[]};function _e(){var C,x;const t=e.getCurrentInstance(),{message:n,modal:o,notification:i}=E.App.useApp(),c={zh:"关闭",en:"Close",fr:"fermeture"},l={zh:"请输入",en:"Please Enter",fr:"Veuillez entrer"},r=P(),a=((x=(C=r==null?void 0:r.locale)==null?void 0:C.locale)==null?void 0:x.slice(0,2))||"en";function d({title:k,...v}){const g=e.ref();return p({title:k,...v,comp:E.Textarea,props:{placeholder:l[a],autoSize:{minRows:6},value:g,"onUpdate:value":s=>{g.value=s},...v.props},class:"modal-comp modal-comp-input",type:"confirm",onOk:()=>new Promise((s,h)=>{v.onOk&&(v.onOk(g.value)?s(1):h()),s(1)})})}function p({title:k,comp:v,props:g,...s}){const h=e.h(v,g),y=(s==null?void 0:s.type)??"info",_={title:k,content:h,width:"auto",icon:null,closable:!0,maskClosable:!0,centered:!0,class:"modal-comp",...s};switch(y){case"info":M=o.info(_);break;case"warning":M=o.warning(_);break;case"success":M=o.success(_);break;case"confirm":M=o.confirm(_);break}return M}function u(){M==null||M.destroy()}function m({title:k,comp:v,props:g,...s}){const h=s.getContainer||document.createDocumentFragment();E.Drawer.instanceArr||(E.Drawer.instanceArr=[]);const y=E.Drawer.instanceArr,_=y[y.length-1];let w;if((_==null?void 0:_.comp)===v){const S=_.instance;Object.assign(S.component.props,{title:k,...s}),S.component.update(),w=_.compInstance,Object.assign(w.component.props,{...g}),w.component.update()}else{if(_){const j=_.instance;Object.assign(j.component.props,{contentWrapperStyle:{transform:"translateX(-180px)"}}),j.component.update()}w=e.h(v,g);const S={default:()=>e.h(W.ElScrollbar,{style:{height:"100%"},wrapStyle:{overflowX:"hidden"}},w)};s.footer===void 0&&Object.assign(S,{footer:()=>e.h(E.Button,{onClick:()=>{E.Drawer.destroy()}},c[a])});const N=s.width||992;delete s.width;const L=e.h(E.Drawer,{title:k,width:N,open:!0,class:"drawer-comp",footerStyle:{textAlign:"right"},onClose:()=>{s!=null&&s.afterClose&&s.afterClose(),E.Drawer.destroy()},...s},S),se=r.getPrefixCls(),$=e.h(E.ConfigProvider,{...r,prefixCls:se},{default:()=>L});$.appContext=t.appContext,e.render($,h),y.push({instance:L,comp:v,compInstance:w,container:h})}return{updateProps:S=>{Object.assign(w.component.props,{...S}),w.component.update()}}}function b(){E.Drawer.destroy()}return{message:n,modal:o,notification:i,modalInput:d,modalComp:p,modalDestroy:u,drawerComp:m,drawerDestroy:b}}const H=e.defineComponent({inheritAttrs:!1,__name:"index",props:{loadData:{type:Function,required:!0},formatSortParams:{type:Boolean,default:!0}},setup(t,{expose:n}){const o=t,i=e.useSlots(),c=e.ref([]),l=e.ref(!1),r=e.ref(0),a=e.ref(1),d=e.ref(10),p=e.ref(),u=e.ref(),m={zh:"共 {num} 条",en:"Total {num} items",fr:"Total de {num}"},b=P(),C=e.computed(()=>{var _,w;return((w=(_=b==null?void 0:b.locale)==null?void 0:_.locale)==null?void 0:w.slice(0,2))||"en"}),x=e.computed(()=>({total:r.value,current:a.value,pageSize:d.value,showSizeChanger:!0,size:"small",showTotal:y=>m[C.value].replace("{num}",y)}));function k(){var y;if(typeof o.loadData=="function"){l.value=!0;const _={pageNo:a.value,pageSize:d.value};o.formatSortParams&&((y=u.value)!=null&&y.orderMap)&&(_[u.value.field+"SortField"]=u.value.orderMap),o.loadData(_,p.value,u.value).then(w=>{l.value=!1,(w==null?void 0:w.code)===0&&(r.value=w.result.totalCount,c.value=w.result.data)})}}function v(y,_,w){if(a.value=y.current,d.value=y.pageSize,p.value=_,w){const S={ascend:"asc",descend:"desc"};w.orderMap=S[w.order]||""}u.value=w,k()}function g(y,_){_.width=y}function s(){a.value=1,k()}function h(){a.value=1,r.value=0,c.value=[]}return n({loadData:k,refresh:s,reset:h}),(y,_)=>{const w=B.Table;return e.openBlock(),e.createBlock(w,e.mergeProps({class:"table-ex",loading:e.unref(l),pagination:e.unref(x),dataSource:e.unref(c),onChange:v,onResizeColumn:g},y.$attrs),e.createSlots({_:2},[e.renderList(Object.keys(e.unref(i)),S=>({name:S,fn:e.withCtx(N=>[S!=="emptyText"?e.renderSlot(y.$slots,S,e.normalizeProps(e.mergeProps({key:0},N))):e.renderSlot(y.$slots,S,{key:1})])}))]),1040,["loading","pagination","dataSource"])}}}),X=e.defineComponent({__name:"index",props:{leftMin:{type:Number,default:.1},leftMax:{type:Number,default:.3},bordered:{type:Boolean,default:!0}},setup(t){const n=t,o=e.ref(),i=e.ref(),c=e.ref({}),l=e.ref({}),r=e.ref(.2);function a(p){c.value={width:`calc(${p*100}% - 5px)`},l.value={width:`calc(${(1-p)*100}% - 5px)`}}function d(){const p=o.value;if(!p)return;const u=p.clientWidth,m=p.getBoundingClientRect(),b=m.left;function C(k){k.preventDefault(),(k.clientX<m.left||k.clientX>m.right||k.clientY<m.top||k.clientY>m.bottom)&&x();const g=(k.clientX-b)/u;g>n.leftMin&&g<n.leftMax&&(r.value=g,a(g))}function x(){document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",x)}document.addEventListener("mousemove",C),document.addEventListener("mouseup",x)}return e.onMounted(()=>{a(r.value),i.value&&i.value.addEventListener("mousedown",d,!1)}),e.onUnmounted(()=>{i.value&&i.value.removeEventListener("mousedown",d)}),(p,u)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"container",ref:o,class:e.normalizeClass(["wl-splitter",{bordered:t.bordered}])},[e.createElementVNode("div",{class:"my-left",style:e.normalizeStyle(e.unref(c))},[e.renderSlot(p.$slots,"left")],4),e.createElementVNode("div",{ref_key:"spliter",ref:i,style:{height:"100%",width:"10px"},class:"my-spliter"},null,512),e.createElementVNode("div",{class:"my-right",style:e.normalizeStyle(e.unref(l))},[e.renderSlot(p.$slots,"right")],4)],2))}}),we={class:"icon",width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Ce(t,n){return e.openBlock(),e.createElementBlock("svg",we,n[0]||(n[0]=[e.createElementVNode("path",{d:"M7.3125 5.5L2.3125 12L7.3125 18.5H22.3125V5.5H7.3125Z",stroke:"#272E3B","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),e.createElementVNode("path",{d:"M10.8125 9.5L15.8125 14.5",stroke:"#272E3B","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),e.createElementVNode("path",{d:"M15.8125 9.5L10.8125 14.5",stroke:"#272E3B","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const ke=e.markRaw({name:"local-clear",render:Ce}),xe={class:"nums-box"},Ee={class:"btn-box"},Z=e.defineComponent({inheritAttrs:!1,__name:"index",props:e.mergeModels({quickNums:{type:Array,default:()=>[100,500,1e3,1500,2e3,2500]},min:{type:Number,default:0},max:{type:Number,default:1e8},precision:{type:Number,default:0}},{value:{type:String},valueModifiers:{}}),emits:e.mergeModels(["enter"],["update:value"]),setup(t,{emit:n}){const o=t,i=n,c=e.ref(),l=e.ref(),r=e.ref(["7","8","9","4","5","6","1","2","3","0","00","."]),a=e.useModel(t,"value"),d=e.ref(!1);function p(){d.value=!0}function u(){k()}function m(v){l.value.focus(),a.value=Number(v).toFixed(o.precision)}function b(v){if(l.value.focus(),f.isNullOrUndef(a.value)||a.value===""){if(["00","."].includes(v))return;a.value=v}else{const g=String(a.value),s=c.value.getElementsByTagName("input")[0],h=s.selectionStart||0,y=s.selectionEnd||0;a.value=`${g.slice(0,h)}${v}${g.slice(y)}`;const _=h+v.length;e.nextTick(()=>{l.value.setSelectionRange(_,_)})}}function C(){if(l.value.focus(),f.isNullOrUndef(a.value))return;const v=String(a.value);if(v!=null&&v.length){const g=c.value.getElementsByTagName("input")[0],s=g.selectionStart||0,h=g.selectionEnd||0,y=s>0?s-1:0;s===h?a.value=v.slice(0,y)+v.slice(h):a.value=v.slice(0,s)+v.slice(h),e.nextTick(()=>{l.value.setSelectionRange(y,y)})}}function x(){l.value.blur()}function k(){const v=o.min,g=o.max;let s=parseFloat(a.value||"0");f.isNullOrUndef(v)||(s=s>v?s:v),f.isNullOrUndef(g)||(s=s>g?g:s),a.value=Number(s).toFixed(o.precision),d.value=!1,i("enter")}return(v,g)=>{const s=B.Button,h=B.Col,y=ke,_=B.Row,w=B.Input,S=B.Popover;return e.openBlock(),e.createElementBlock("div",{class:"number-keyboard",ref_key:"numberKeyboard",ref:c},[e.createVNode(S,{overlayClassName:"popover-keyboard",trigger:"manual",placement:"bottomLeft",align:{offset:[0,-9]},open:e.unref(d),"onUpdate:open":g[2]||(g[2]=N=>e.isRef(d)?d.value=N:null)},{content:e.withCtx(()=>[e.createElementVNode("div",{class:"keyboard-panel",onMousedownCapture:g[0]||(g[0]=e.withModifiers(()=>{},["prevent","stop"]))},[e.createVNode(_,{gutter:"8"},{default:e.withCtx(()=>[e.createVNode(h,{span:18},{default:e.withCtx(()=>[e.createElementVNode("div",xe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.quickNums,N=>(e.openBlock(),e.createBlock(s,{class:"btn-num",key:N,onClick:L=>m(N)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(N),1)]),_:2},1032,["onClick"]))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r),N=>(e.openBlock(),e.createBlock(s,{class:"btn-num",key:N,onClick:L=>b(N)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(N),1)]),_:2},1032,["onClick"]))),128))])]),_:1}),e.createVNode(h,{span:6},{default:e.withCtx(()=>[e.createElementVNode("div",Ee,[e.createVNode(s,{class:"btn-clear",onClick:C},{default:e.withCtx(()=>[e.createVNode(y,{style:{width:"24px",height:"24px"}})]),_:1}),e.createVNode(s,{class:"btn-enter",type:"primary",onClick:e.withModifiers(x,["stop"])},{default:e.withCtx(()=>g[3]||(g[3]=[e.createTextVNode("Enter ")])),_:1})])]),_:1})]),_:1})],32)]),default:e.withCtx(()=>[e.createVNode(w,e.mergeProps({ref_key:"inputRef",ref:l,value:a.value,"onUpdate:value":g[1]||(g[1]=N=>a.value=N)},v.$attrs,{onFocus:p,onBlur:u,onKeyup:e.withKeys(x,["enter"])}),null,16,["value"])]),_:1},8,["open"])],512)}}}),A=Object.freeze(Object.defineProperty({__proto__:null,AInputNumberEx:q,ARangePickerEx:K,ATableEx:H,WlNumberKeyboard:Z,WlSplitter:X},Symbol.toStringTag,{value:"Module"}));function Y(t){return e.getCurrentScope()?(e.onScopeDispose(t),!0):!1}const V=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Se=Object.prototype.toString,Ne=t=>Se.call(t)==="[object Object]";function Me(t){let n;function o(){return n||(n=t()),n}return o.reset=async()=>{const i=n;n=void 0,i&&await i},o}function T(t){return Array.isArray(t)?t:[t]}function Be(t,n,o={}){const{immediate:i=!0,immediateCallback:c=!1}=o,l=e.shallowRef(!1);let r=null;function a(){r&&(clearTimeout(r),r=null)}function d(){l.value=!1,a()}function p(...u){c&&t(),a(),l.value=!0,r=setTimeout(()=>{l.value=!1,r=null,t(...u)},e.toValue(n))}return i&&(l.value=!0,V&&p()),Y(d),{isPending:e.shallowReadonly(l),start:p,stop:d}}function Le(t,n,o){return e.watch(t,n,{...o,immediate:!0})}const Pe=V?window:void 0,G=V?window.navigator:void 0;function Te(t){var n;const o=e.toValue(t);return(n=o==null?void 0:o.$el)!=null?n:o}function Q(...t){const n=[],o=()=>{n.forEach(a=>a()),n.length=0},i=(a,d,p,u)=>(a.addEventListener(d,p,u),()=>a.removeEventListener(d,p,u)),c=e.computed(()=>{const a=T(e.toValue(t[0])).filter(d=>d!=null);return a.every(d=>typeof d!="string")?a:void 0}),l=Le(()=>{var a,d;return[(d=(a=c.value)==null?void 0:a.map(p=>Te(p)))!=null?d:[Pe].filter(p=>p!=null),T(e.toValue(c.value?t[1]:t[0])),T(e.unref(c.value?t[2]:t[1])),e.toValue(c.value?t[3]:t[2])]},([a,d,p,u])=>{if(o(),!(a!=null&&a.length)||!(d!=null&&d.length)||!(p!=null&&p.length))return;const m=Ne(u)?{...u}:u;n.push(...a.flatMap(b=>d.flatMap(C=>p.map(x=>i(b,C,x,m)))))},{flush:"post"}),r=()=>{l(),o()};return Y(o),r}function De(){const t=e.shallowRef(!1),n=e.getCurrentInstance();return n&&e.onMounted(()=>{t.value=!0},n),t}function J(t){const n=De();return e.computed(()=>(n.value,!!t()))}function U(t,n={}){const{controls:o=!1,navigator:i=G}=n,c=J(()=>i&&"permissions"in i),l=e.shallowRef(),r=typeof t=="string"?{name:t}:t,a=e.shallowRef(),d=()=>{var u,m;a.value=(m=(u=l.value)==null?void 0:u.state)!=null?m:"prompt"};Q(l,"change",d,{passive:!0});const p=Me(async()=>{if(c.value){if(!l.value)try{l.value=await i.permissions.query(r)}catch{l.value=void 0}finally{d()}if(o)return e.toRaw(l.value)}});return p(),o?{state:a,isSupported:c,query:p}:a}function Oe(t={}){const{navigator:n=G,read:o=!1,source:i,copiedDuring:c=1500,legacy:l=!1}=t,r=J(()=>n&&"clipboard"in n),a=U("clipboard-read"),d=U("clipboard-write"),p=e.computed(()=>r.value||l),u=e.shallowRef(""),m=e.shallowRef(!1),b=Be(()=>m.value=!1,c,{immediate:!1});async function C(){let s=!(r.value&&g(a.value));if(!s)try{u.value=await n.clipboard.readText()}catch{s=!0}s&&(u.value=v())}p.value&&o&&Q(["copy","cut"],C,{passive:!0});async function x(s=e.toValue(i)){if(p.value&&s!=null){let h=!(r.value&&g(d.value));if(!h)try{await n.clipboard.writeText(s)}catch{h=!0}h&&k(s),u.value=s,m.value=!0,b.start()}}function k(s){const h=document.createElement("textarea");h.value=s??"",h.style.position="absolute",h.style.opacity="0",document.body.appendChild(h),h.select(),document.execCommand("copy"),h.remove()}function v(){var s,h,y;return(y=(h=(s=document==null?void 0:document.getSelection)==null?void 0:s.call(document))==null?void 0:h.toString())!=null?y:""}function g(s){return s==="granted"||s==="prompt"}return{isSupported:p,text:u,copied:m,copy:x}}const Ve=Oe();let D,O;const ee={mounted(t,n,o){var r,a;const i=P(o.ctx),c=((a=(r=i==null?void 0:i.locale)==null?void 0:r.locale)==null?void 0:a.slice(0,2))||"en",l={zh:"复制成功",en:"Copy successfully",fr:"Copie réussie"};D=n.value,O=()=>{Ve.copy(D),E.message.success(l[c])},t.addEventListener("click",O)},updated(t,n){D=n.value},unmounted(t){t.removeEventListener("click",O)}},te={beforeMount(t,n,o){const i=n.value,c={letterNumber:/^\w*$/,price:/^(\d*|(\d+\.\d{0,2}))$/,phone:/^\d{0,11}$/,number:/^\d*$/,negativePrice:/^\-?(\d*|(\d+\.\d{0,2}))$/,loginVerify:/^[0-9a-zA-Z]{0,4}$/,verify:/^\d{0,6}$/,idCard:/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/},l=i instanceof RegExp?i:n.arg&&c[n.arg]?c[n.arg]:null;t._handleInput=r=>{if(r.isTrusted&&!(!r.isComposing&&r.inputType==="insertCompositionText"&&r.data)){const a=l==null?void 0:l.test(r.target.value);if(t._input=a?r.target.value:t._input,r.target.value="",r.target.value=t._input,!a)r.target.selectionStart=t._start,r.target.selectionEnd=t._end;else switch(r.inputType){case"deleteContentForward":case"deleteByDrag":case"deleteByCut":r.target.selectionStart=t._start,r.target.selectionEnd=t._start;break;case"deleteContentBackward":r.target.selectionStart=t._start===t._end?t._start-1:t._start,r.target.selectionEnd=t._start===t._end?t._start-1:t._start;break;case"insertFromPaste":case"insertFromDrop":const p=r.dataTransfer||r.clipboardData||null;if(p){const u=p.getData("text")||"";r.target.selectionStart=t._start+u.length,r.target.selectionEnd=t._start+u.length}break;case"insertText":case"insertCompositionText":r.target.selectionStart=t._start+1,r.target.selectionEnd=t._start+1;break}const d=new InputEvent("input",{isComposing:!1});r.target.dispatchEvent(d)}},t._handleKeydown=r=>{const a=l==null?void 0:l.test(r.target.value);t._input=a?r.target.value:"",t._start=r.target.selectionStart,t._end=r.target.selectionEnd},t._handleDrop=r=>{r.stopPropagation()},o.type==="input"&&(t.addEventListener("input",t._handleInput),t.addEventListener("keydown",t._handleKeydown),t.addEventListener("drop",t._handleDrop))},unmounted(t){t._handleInput&&t.removeEventListener("input",t._handleInput),t._handleKeydown&&t.removeEventListener("keydown",t._handleKeydown),t._handleDrop&&t.removeEventListener("drop",t._handleDrop)}};function I(t,n,o){const i=n.value;if(i){const c=i/2;t.style.marginLeft=`-${c}px`,t.style.marginRight=`-${c}px`;const l=o.children;l!=null&&l.length&&l[0].children.forEach(r=>{if(r.component){const a=r.el;a!=null&&a.style&&(a.style.paddingLeft=c+"px",a.style.paddingRight=c+"px")}else Array.isArray(r.children)&&r.children.forEach(a=>{const d=a.el;d!=null&&d.style&&(d.style.paddingLeft=c+"px",d.style.paddingRight=c+"px")})})}}const ne={beforeMount(t){t.classList.add("ant-row"),t.style.display="flex",t.style.flexWrap="wrap",t.style.flexDirection="row",t.style.minWidth=0},mounted(t,n,o){I(t,n,o)},updated(t,n,o,i){I(t,n,o)}},oe={beforeMount(t,n){t.classList.add("ant-col",`ant-col-${n.value}`);const o=n.value/24*100;t.style.position="relative",t.style.flex=`0 0 ${o}%`,t.style.maxWidth=`${o}%`}},re={mounted(t,n,o){const{value:i}=n,{content:c="",placement:l="top",enabled:r=!0,padding:a=8,...d}=typeof i=="string"?{content:i}:i;if(t.tooltipDisabled=!1,!r)t.tooltipDisabled=!0;else if(n.modifiers.exceed){const C=t.clientWidth,x=F(c);t.tooltipDisabled=C?x<C-a*2:!0}const p=e.ref({top:0,left:0,bottom:0,right:0}),u=e.ref({getBoundingClientRect:()=>p.value}),m=e.h(W.ElTooltip,{visible:!1,content:c,placement:l,virtualTriggering:!0,virtualRef:u.value,popperClass:"vtooltip",...d}),b=document.createDocumentFragment();e.render(m,b),t.tooltipVm=m,t.tooltipContainer=b,t.addEventListener("mouseenter",()=>{p.value=t.getBoundingClientRect(),m.component&&!t.tooltipDisabled&&(Object.assign(m.component.props,{visible:!0}),m.component.update())}),t.addEventListener("mouseleave",()=>{m.component&&(Object.assign(m.component.props,{visible:!1}),m.component.update())})},updated(t,n){if(t.tooltipVm){const{value:o}=n,{content:i="",placement:c="top",enabled:l=!0,padding:r=8,...a}=typeof o=="string"?{content:o}:o;if(t.tooltipDisabled=!1,!l)t.tooltipDisabled=!0;else if(n.modifiers.exceed){const p=t.clientWidth,u=F(i);t.tooltipDisabled=p?u<p-r*2:!0}const d=t.tooltipVm;d.component&&(Object.assign(d.component.props,{content:i,placement:c,...a}),d.component.update())}},unmounted(t){t.tooltipContainer&&e.render(null,t.tooltipContainer)}};function F(t,n){const i=document.createElement("canvas").getContext("2d");return i.font="14px Arial",i.measureText(t).width}const ae={beforeMount(t,n){const{value:o}=n;o&&(f.hasPermission(o)||setTimeout(()=>{var c;(c=t.parentNode)==null||c.removeChild(t)},50))}},z=Object.freeze(Object.defineProperty({__proto__:null,col:oe,copy:ee,inputlimit:te,permission:ae,row:ne,tooltip:re},Symbol.toStringTag,{value:"Module"}));function $e(t){Object.keys(A).forEach(n=>{t.component(n,A[n])}),Object.keys(z).forEach(n=>{t.directive(n,z[n])})}const je={install:$e};exports.UserCenterKey=f.UserCenterKey;exports.buildTree=f.buildTree;exports.exportFile=f.exportFile;exports.forEachTree=f.forEachTree;exports.getButtonPermissions=f.getButtonPermissions;exports.getLocale=f.getLocale;exports.getMenuInfo=f.getMenuInfo;exports.getToken=f.getToken;exports.getUserCenterParams=f.getUserCenterParams;exports.getUserCenterParamsByUrl=f.getUserCenterParamsByUrl;exports.getUserInfo=f.getUserInfo;exports.hasPermission=f.hasPermission;exports.is=f.is;exports.isArray=f.isArray;exports.isAsyncFunction=f.isAsyncFunction;exports.isBoolean=f.isBoolean;exports.isClient=f.isClient;exports.isDate=f.isDate;exports.isDef=f.isDef;exports.isElement=f.isElement;exports.isFunction=f.isFunction;exports.isImageDom=f.isImageDom;exports.isNull=f.isNull;exports.isNullOrUndef=f.isNullOrUndef;exports.isNumber=f.isNumber;exports.isObject=f.isObject;exports.isPromise=f.isPromise;exports.isServer=f.isServer;exports.isString=f.isString;exports.isUndef=f.isUndef;exports.isWindow=f.isWindow;exports.logoutToUserCenter=f.logoutToUserCenter;exports.removeAll=f.removeAll;exports.removeLocale=f.removeLocale;exports.removeToken=f.removeToken;exports.setLocale=f.setLocale;exports.setMenuInfo=f.setMenuInfo;exports.setToken=f.setToken;exports.setUserCenterParams=f.setUserCenterParams;exports.setUserInfo=f.setUserInfo;exports.toUserCenterConsole=f.toUserCenterConsole;exports.AInputNumberEx=q;exports.ARangePickerEx=K;exports.ATableEx=H;exports.WlNumberKeyboard=Z;exports.WlSplitter=X;exports.col=oe;exports.copy=ee;exports.default=je;exports.inputlimit=te;exports.permission=ae;exports.row=ne;exports.tooltip=re;exports.useConfigProvider=P;exports.useFindParent=me;exports.useModal=_e;exports.useRequire=be;
package/dist/index.js CHANGED
@@ -1,18 +1,18 @@
1
- import { InputNumber as Ce, RangePicker as ke, Table as Se, Popover as Ee, Input as Me, Row as Le, Col as $e, Button as Te } from "ant-design-vue/es";
2
- import { markRaw as G, createElementBlock as P, openBlock as $, createElementVNode as M, defineComponent as V, mergeModels as K, useModel as me, useSlots as ve, useAttrs as Be, createBlock as z, mergeProps as F, createSlots as Q, renderList as W, withCtx as E, unref as T, renderSlot as D, normalizeProps as ge, guardReactiveProps as Ne, createVNode as B, ref as C, getCurrentInstance as H, render as I, h as j, computed as U, onMounted as he, onUnmounted as Oe, normalizeClass as je, normalizeStyle as oe, isRef as Pe, withKeys as Ae, withModifiers as ae, Fragment as se, createTextVNode as X, toDisplayString as re, nextTick as ie, shallowRef as R, shallowReadonly as De, toValue as A, getCurrentScope as Re, onScopeDispose as ze, watch as Fe, toRaw as We } from "vue";
3
- import { isNullOrUndef as O, hasPermission as Ie } from "./utils.js";
4
- import { UserCenterKey as Kt, buildTree as Ht, exportFile as Xt, forEachTree as Zt, getButtonPermissions as Yt, getLocale as Gt, getMenuInfo as Qt, getToken as Jt, getUserCenterParams as en, getUserCenterParamsByUrl as tn, getUserInfo as nn, is as on, isArray as an, isAsyncFunction as sn, isBoolean as rn, isClient as ln, isDate as cn, isDef as un, isElement as dn, isFunction as pn, isImageDom as fn, isNull as mn, isNumber as vn, isObject as gn, isPromise as hn, isServer as yn, isString as bn, isUndef as _n, isWindow as xn, logoutToUserCenter as wn, removeAll as Cn, removeLocale as kn, removeToken as Sn, setLocale as En, setMenuInfo as Mn, setToken as Ln, setUserCenterParams as $n, setUserInfo as Tn, toUserCenterConsole as Bn } from "./utils.js";
5
- import le from "dayjs";
6
- import { Drawer as L, App as Ue, Button as Ve, ConfigProvider as qe, Textarea as Ke, message as He } from "ant-design-vue";
7
- import { ElScrollbar as Xe, ElTooltip as Ze } from "element-plus";
8
- const Ye = {
1
+ import { InputNumber as ke, RangePicker as Se, Table as Ee, Popover as Me, Input as Le, Row as $e, Col as Te, Button as Be } from "ant-design-vue/es";
2
+ import { markRaw as Q, createElementBlock as P, openBlock as $, createElementVNode as M, defineComponent as V, mergeModels as K, useModel as ve, useSlots as ge, useAttrs as Ne, createBlock as z, mergeProps as F, createSlots as J, renderList as W, withCtx as E, unref as T, renderSlot as D, normalizeProps as he, guardReactiveProps as Oe, createVNode as B, ref as C, getCurrentInstance as H, render as I, h as j, computed as U, onMounted as ye, onUnmounted as je, normalizeClass as Pe, normalizeStyle as ae, isRef as Ae, withKeys as De, withModifiers as se, Fragment as re, createTextVNode as X, toDisplayString as ie, nextTick as le, shallowRef as R, shallowReadonly as Re, toValue as A, getCurrentScope as ze, onScopeDispose as Fe, watch as We, toRaw as Ie } from "vue";
3
+ import { isNullOrUndef as O, hasPermission as Ue } from "./utils.js";
4
+ import { UserCenterKey as Ht, buildTree as Xt, exportFile as Zt, forEachTree as Yt, getButtonPermissions as Gt, getLocale as Qt, getMenuInfo as Jt, getToken as en, getUserCenterParams as tn, getUserCenterParamsByUrl as nn, getUserInfo as on, is as an, isArray as sn, isAsyncFunction as rn, isBoolean as ln, isClient as cn, isDate as un, isDef as dn, isElement as pn, isFunction as fn, isImageDom as mn, isNull as vn, isNumber as gn, isObject as hn, isPromise as yn, isServer as bn, isString as _n, isUndef as xn, isWindow as wn, logoutToUserCenter as Cn, removeAll as kn, removeLocale as Sn, removeToken as En, setLocale as Mn, setMenuInfo as Ln, setToken as $n, setUserCenterParams as Tn, setUserInfo as Bn, toUserCenterConsole as Nn } from "./utils.js";
5
+ import ce from "dayjs";
6
+ import { Drawer as L, App as Ve, Button as qe, ConfigProvider as Ke, Textarea as He, message as Xe } from "ant-design-vue";
7
+ import { ElScrollbar as Ze, ElTooltip as Ye } from "element-plus";
8
+ const Ge = {
9
9
  class: "icon",
10
10
  viewBox: "0 0 1024 1024",
11
11
  width: "1.2em",
12
12
  height: "1.2em"
13
13
  };
14
- function Ge(e, t) {
15
- return $(), P("svg", Ye, t[0] || (t[0] = [
14
+ function Qe(e, t) {
15
+ return $(), P("svg", Ge, t[0] || (t[0] = [
16
16
  M("path", {
17
17
  fill: "currentColor",
18
18
  d: "M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8"
@@ -23,21 +23,21 @@ function Ge(e, t) {
23
23
  }, null, -1)
24
24
  ]));
25
25
  }
26
- const Qe = G({ name: "ant-design-plus", render: Ge }), Je = {
26
+ const Je = Q({ name: "ant-design-plus", render: Qe }), et = {
27
27
  class: "icon",
28
28
  viewBox: "0 0 1024 1024",
29
29
  width: "1.2em",
30
30
  height: "1.2em"
31
31
  };
32
- function et(e, t) {
33
- return $(), P("svg", Je, t[0] || (t[0] = [
32
+ function tt(e, t) {
33
+ return $(), P("svg", et, t[0] || (t[0] = [
34
34
  M("path", {
35
35
  fill: "currentColor",
36
36
  d: "M872 474H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8"
37
37
  }, null, -1)
38
38
  ]));
39
39
  }
40
- const tt = G({ name: "ant-design-minus", render: et }), nt = /* @__PURE__ */ V({
40
+ const nt = Q({ name: "ant-design-minus", render: tt }), ot = /* @__PURE__ */ V({
41
41
  inheritAttrs: !1,
42
42
  __name: "index",
43
43
  props: /* @__PURE__ */ K({
@@ -58,7 +58,7 @@ const tt = G({ name: "ant-design-minus", render: et }), nt = /* @__PURE__ */ V({
58
58
  }),
59
59
  emits: /* @__PURE__ */ K(["change"], ["update:value"]),
60
60
  setup(e, { emit: t }) {
61
- const n = me(e, "value"), r = e, l = t, i = ve(), o = Be();
61
+ const n = ve(e, "value"), r = e, l = t, i = ge(), o = Ne();
62
62
  function a(p) {
63
63
  if (O(p))
64
64
  n.value = null, l("change", null);
@@ -84,19 +84,19 @@ const tt = G({ name: "ant-design-minus", render: et }), nt = /* @__PURE__ */ V({
84
84
  !O(o.max) && p >= Number(o.max) || a(p + 1);
85
85
  }
86
86
  return (p, h) => {
87
- const x = tt, w = Qe, _ = Ce;
88
- return $(), z(_, F({
87
+ const _ = nt, w = Je, x = ke;
88
+ return $(), z(x, F({
89
89
  value: n.value,
90
90
  precision: e.precision,
91
91
  stringMode: e.stringMode,
92
92
  controls: !e.customControls,
93
93
  onChange: a,
94
94
  onBlur: u
95
- }, p.$attrs), Q({ _: 2 }, [
95
+ }, p.$attrs), J({ _: 2 }, [
96
96
  W(Object.keys(T(i)), (f) => ({
97
97
  name: f,
98
98
  fn: E((m) => [
99
- D(p.$slots, f, ge(Ne(m)))
99
+ D(p.$slots, f, he(Oe(m)))
100
100
  ])
101
101
  })),
102
102
  e.customControls ? {
@@ -106,7 +106,7 @@ const tt = G({ name: "ant-design-minus", render: et }), nt = /* @__PURE__ */ V({
106
106
  class: "btn-control",
107
107
  onClick: d
108
108
  }, [
109
- B(x, { class: "btn-icon" })
109
+ B(_, { class: "btn-icon" })
110
110
  ])
111
111
  ]),
112
112
  key: "0"
@@ -126,7 +126,7 @@ const tt = G({ name: "ant-design-minus", render: et }), nt = /* @__PURE__ */ V({
126
126
  ]), 1040, ["value", "precision", "stringMode", "controls"]);
127
127
  };
128
128
  }
129
- }), ot = /* @__PURE__ */ V({
129
+ }), at = /* @__PURE__ */ V({
130
130
  __name: "index",
131
131
  props: {
132
132
  value: {},
@@ -157,11 +157,11 @@ const tt = G({ name: "ant-design-minus", render: et }), nt = /* @__PURE__ */ V({
157
157
  emits: ["update:value", "change"],
158
158
  setup(e, { emit: t }) {
159
159
  const n = e, r = t, l = C(), i = C(), o = (c) => {
160
- const p = le().add(n.max, n.maxUnit), h = le().subtract(n.min, n.minUnit), x = n.interval;
160
+ const p = ce().add(n.max, n.maxUnit), h = ce().subtract(n.min, n.minUnit), _ = n.interval;
161
161
  if (!l.value || l.value.length === 0)
162
162
  return c.isAfter(p) || c.isBefore(h);
163
- const w = l.value[0] && (c.diff(l.value[0], "days") > x || c.isAfter(p));
164
- return l.value[1] && (l.value[1].diff(c, "days") > x || c.isBefore(h)) || w;
163
+ const w = l.value[0] && (c.diff(l.value[0], "days") > _ || c.isAfter(p));
164
+ return l.value[1] && (l.value[1].diff(c, "days") > _ || c.isBefore(h)) || w;
165
165
  }, a = (c) => {
166
166
  c ? (l.value = [], i.value = []) : i.value = void 0;
167
167
  }, u = (c) => {
@@ -170,32 +170,32 @@ const tt = G({ name: "ant-design-minus", render: et }), nt = /* @__PURE__ */ V({
170
170
  l.value = c;
171
171
  };
172
172
  return (c, p) => {
173
- const h = ke;
173
+ const h = Se;
174
174
  return $(), z(h, F({
175
175
  value: T(i) || e.value,
176
176
  "disabled-date": o,
177
177
  onChange: u,
178
178
  onOpenChange: a,
179
179
  onCalendarChange: d
180
- }, c.$attrs), Q({ _: 2 }, [
181
- W(Object.keys(c.$slots), (x) => ({
182
- name: x,
180
+ }, c.$attrs), J({ _: 2 }, [
181
+ W(Object.keys(c.$slots), (_) => ({
182
+ name: _,
183
183
  fn: E((w) => [
184
- D(c.$slots, x)
184
+ D(c.$slots, _)
185
185
  ])
186
186
  }))
187
187
  ]), 1040, ["value"]);
188
188
  };
189
189
  }
190
190
  });
191
- function J(e) {
191
+ function ee(e) {
192
192
  e || (e = H());
193
- const t = (e == null ? void 0 : e.provides) || {}, n = at(t, "configProvider"), r = t[n];
193
+ const t = (e == null ? void 0 : e.provides) || {}, n = st(t, "configProvider"), r = t[n];
194
194
  return Object.fromEntries(
195
195
  Object.entries(r).map(([i, o]) => [i, T(o)])
196
196
  );
197
197
  }
198
- function at(e, t) {
198
+ function st(e, t) {
199
199
  for (; e; ) {
200
200
  const n = Reflect.ownKeys(e).find(
201
201
  (r) => r === t || typeof r == "symbol" && r.description === t
@@ -206,7 +206,7 @@ function at(e, t) {
206
206
  }
207
207
  return null;
208
208
  }
209
- function Ft(e) {
209
+ function Wt(e) {
210
210
  var n;
211
211
  let t = (n = H()) == null ? void 0 : n.parent;
212
212
  for (; t; ) {
@@ -216,15 +216,15 @@ function Ft(e) {
216
216
  }
217
217
  return null;
218
218
  }
219
- const st = "data:image/svg+xml,%3csvg%20width='25'%20height='24'%20viewBox='0%200%2025%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M7.3125%205.5L2.3125%2012L7.3125%2018.5H22.3125V5.5H7.3125Z'%20stroke='%23272E3B'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M10.8125%209.5L15.8125%2014.5'%20stroke='%23272E3B'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M15.8125%209.5L10.8125%2014.5'%20stroke='%23272E3B'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e", rt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
219
+ const rt = "data:image/svg+xml,%3csvg%20width='25'%20height='24'%20viewBox='0%200%2025%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M7.3125%205.5L2.3125%2012L7.3125%2018.5H22.3125V5.5H7.3125Z'%20stroke='%23272E3B'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M10.8125%209.5L15.8125%2014.5'%20stroke='%23272E3B'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M15.8125%209.5L10.8125%2014.5'%20stroke='%23272E3B'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e", it = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
220
220
  __proto__: null,
221
- default: st
222
- }, Symbol.toStringTag, { value: "Module" })), it = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20aria-hidden='true'%20role='img'%20class='iconify%20iconify--logos'%20width='37.07'%20height='36'%20preserveAspectRatio='xMidYMid%20meet'%20viewBox='0%200%20256%20198'%3e%3cpath%20fill='%2341B883'%20d='M204.8%200H256L128%20220.8L0%200h97.92L128%2051.2L157.44%200h47.36Z'%3e%3c/path%3e%3cpath%20fill='%2341B883'%20d='m0%200l128%20220.8L256%200h-51.2L128%20132.48L50.56%200H0Z'%3e%3c/path%3e%3cpath%20fill='%2335495E'%20d='M50.56%200L128%20133.12L204.8%200h-47.36L128%2051.2L97.92%200H50.56Z'%3e%3c/path%3e%3c/svg%3e", lt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
221
+ default: rt
222
+ }, Symbol.toStringTag, { value: "Module" })), lt = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20aria-hidden='true'%20role='img'%20class='iconify%20iconify--logos'%20width='37.07'%20height='36'%20preserveAspectRatio='xMidYMid%20meet'%20viewBox='0%200%20256%20198'%3e%3cpath%20fill='%2341B883'%20d='M204.8%200H256L128%20220.8L0%200h97.92L128%2051.2L157.44%200h47.36Z'%3e%3c/path%3e%3cpath%20fill='%2341B883'%20d='m0%200l128%20220.8L256%200h-51.2L128%20132.48L50.56%200H0Z'%3e%3c/path%3e%3cpath%20fill='%2335495E'%20d='M50.56%200L128%20133.12L204.8%200h-47.36L128%2051.2L97.92%200H50.56Z'%3e%3c/path%3e%3c/svg%3e", ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
223
223
  __proto__: null,
224
- default: it
224
+ default: lt
225
225
  }, Symbol.toStringTag, { value: "Module" }));
226
- function Wt(e) {
227
- return (/* @__PURE__ */ Object.assign({ "/src/assets/svg/clear.svg": rt, "/src/assets/vue.svg": lt }))[`/src/assets/${e}`].default;
226
+ function It(e) {
227
+ return (/* @__PURE__ */ Object.assign({ "/src/assets/svg/clear.svg": it, "/src/assets/vue.svg": ct }))[`/src/assets/${e}`].default;
228
228
  }
229
229
  let N;
230
230
  L.destroy = function() {
@@ -241,9 +241,9 @@ L.destroyAll = function() {
241
241
  I(null, t.container);
242
242
  }), L.instanceArr = [];
243
243
  };
244
- function It() {
245
- var x, w;
246
- const e = H(), { message: t, modal: n, notification: r } = Ue.useApp(), l = {
244
+ function Ut() {
245
+ var _, w;
246
+ const e = H(), { message: t, modal: n, notification: r } = Ve.useApp(), l = {
247
247
  zh: "关闭",
248
248
  en: "Close",
249
249
  fr: "fermeture"
@@ -251,13 +251,13 @@ function It() {
251
251
  zh: "请输入",
252
252
  en: "Please Enter",
253
253
  fr: "Veuillez entrer"
254
- }, o = J(), a = ((w = (x = o == null ? void 0 : o.locale) == null ? void 0 : x.locale) == null ? void 0 : w.slice(0, 2)) || "en";
255
- function u({ title: _, ...f }) {
254
+ }, o = ee(), a = ((w = (_ = o == null ? void 0 : o.locale) == null ? void 0 : _.locale) == null ? void 0 : w.slice(0, 2)) || "en";
255
+ function u({ title: x, ...f }) {
256
256
  const m = C();
257
257
  return d({
258
- title: _,
258
+ title: x,
259
259
  ...f,
260
- comp: Ke,
260
+ comp: He,
261
261
  props: {
262
262
  placeholder: i[a],
263
263
  autoSize: { minRows: 6 },
@@ -274,9 +274,9 @@ function It() {
274
274
  })
275
275
  });
276
276
  }
277
- function d({ title: _, comp: f, props: m, ...s }) {
277
+ function d({ title: x, comp: f, props: m, ...s }) {
278
278
  const v = j(f, m), g = (s == null ? void 0 : s.type) ?? "info", y = {
279
- title: _,
279
+ title: x,
280
280
  content: v,
281
281
  width: "auto",
282
282
  icon: null,
@@ -305,32 +305,32 @@ function It() {
305
305
  function c() {
306
306
  N == null || N.destroy();
307
307
  }
308
- function p({ title: _, comp: f, props: m, ...s }) {
308
+ function p({ title: x, comp: f, props: m, ...s }) {
309
309
  const v = s.getContainer || document.createDocumentFragment();
310
310
  L.instanceArr || (L.instanceArr = []);
311
311
  const g = L.instanceArr, y = g[g.length - 1];
312
312
  let b;
313
313
  if ((y == null ? void 0 : y.comp) === f) {
314
314
  const k = y.instance;
315
- Object.assign(k.component.props, { title: _, ...s }), k.component.update(), b = y.compInstance, Object.assign(b.component.props, { ...m }), b.component.update();
315
+ Object.assign(k.component.props, { title: x, ...s }), k.component.update(), b = y.compInstance, Object.assign(b.component.props, { ...m }), b.component.update();
316
316
  } else {
317
317
  if (y) {
318
- const ne = y.instance;
319
- Object.assign(ne.component.props, {
318
+ const oe = y.instance;
319
+ Object.assign(oe.component.props, {
320
320
  contentWrapperStyle: { transform: "translateX(-180px)" }
321
- }), ne.component.update();
321
+ }), oe.component.update();
322
322
  }
323
323
  b = j(f, m);
324
324
  const k = {
325
325
  default: () => j(
326
- Xe,
326
+ Ze,
327
327
  { style: { height: "100%" }, wrapStyle: { overflowX: "hidden" } },
328
328
  b
329
329
  )
330
330
  };
331
331
  s.footer === void 0 && Object.assign(k, {
332
332
  footer: () => j(
333
- Ve,
333
+ qe,
334
334
  {
335
335
  onClick: () => {
336
336
  L.destroy();
@@ -344,7 +344,7 @@ function It() {
344
344
  const q = j(
345
345
  L,
346
346
  {
347
- title: _,
347
+ title: x,
348
348
  width: S,
349
349
  open: !0,
350
350
  class: "drawer-comp",
@@ -357,12 +357,12 @@ function It() {
357
357
  ...s
358
358
  },
359
359
  k
360
- ), we = o.getPrefixCls(), te = j(
361
- qe,
362
- { ...o, prefixCls: we },
360
+ ), Ce = o.getPrefixCls(), ne = j(
361
+ Ke,
362
+ { ...o, prefixCls: Ce },
363
363
  { default: () => q }
364
364
  );
365
- te.appContext = e.appContext, I(te, v), g.push({ instance: q, comp: f, compInstance: b, container: v });
365
+ ne.appContext = e.appContext, I(ne, v), g.push({ instance: q, comp: f, compInstance: b, container: v });
366
366
  }
367
367
  return {
368
368
  updateProps: (k) => {
@@ -384,7 +384,7 @@ function It() {
384
384
  drawerDestroy: h
385
385
  };
386
386
  }
387
- const ct = /* @__PURE__ */ V({
387
+ const ut = /* @__PURE__ */ V({
388
388
  inheritAttrs: !1,
389
389
  __name: "index",
390
390
  props: {
@@ -398,11 +398,11 @@ const ct = /* @__PURE__ */ V({
398
398
  }
399
399
  },
400
400
  setup(e, { expose: t }) {
401
- const n = e, r = ve(), l = C([]), i = C(!1), o = C(0), a = C(1), u = C(10), d = C(), c = C(), p = {
401
+ const n = e, r = ge(), l = C([]), i = C(!1), o = C(0), a = C(1), u = C(10), d = C(), c = C(), p = {
402
402
  zh: "共 {num} 条",
403
403
  en: "Total {num} items",
404
404
  fr: "Total de {num}"
405
- }, h = J(), x = U(() => {
405
+ }, h = ee(), _ = U(() => {
406
406
  var y, b;
407
407
  return ((b = (y = h == null ? void 0 : h.locale) == null ? void 0 : y.locale) == null ? void 0 : b.slice(0, 2)) || "en";
408
408
  }), w = U(() => ({
@@ -411,9 +411,9 @@ const ct = /* @__PURE__ */ V({
411
411
  pageSize: u.value,
412
412
  showSizeChanger: !0,
413
413
  size: "small",
414
- showTotal: (g) => p[x.value].replace("{num}", g)
414
+ showTotal: (g) => p[_.value].replace("{num}", g)
415
415
  }));
416
- function _() {
416
+ function x() {
417
417
  var g;
418
418
  if (typeof n.loadData == "function") {
419
419
  i.value = !0;
@@ -431,23 +431,23 @@ const ct = /* @__PURE__ */ V({
431
431
  };
432
432
  b.orderMap = k[b.order] || "";
433
433
  }
434
- c.value = b, _();
434
+ c.value = b, x();
435
435
  }
436
436
  function m(g, y) {
437
437
  y.width = g;
438
438
  }
439
439
  function s() {
440
- a.value = 1, _();
440
+ a.value = 1, x();
441
441
  }
442
442
  function v() {
443
443
  a.value = 1, o.value = 0, l.value = [];
444
444
  }
445
445
  return t({
446
- loadData: _,
446
+ loadData: x,
447
447
  refresh: s,
448
448
  reset: v
449
449
  }), (g, y) => {
450
- const b = Se;
450
+ const b = Ee;
451
451
  return $(), z(b, F({
452
452
  class: "table-ex",
453
453
  loading: T(i),
@@ -455,17 +455,17 @@ const ct = /* @__PURE__ */ V({
455
455
  dataSource: T(l),
456
456
  onChange: f,
457
457
  onResizeColumn: m
458
- }, g.$attrs), Q({ _: 2 }, [
458
+ }, g.$attrs), J({ _: 2 }, [
459
459
  W(Object.keys(T(r)), (k) => ({
460
460
  name: k,
461
461
  fn: E((S) => [
462
- k !== "emptyText" ? D(g.$slots, k, ge(F({ key: 0 }, S))) : D(g.$slots, k, { key: 1 })
462
+ k !== "emptyText" ? D(g.$slots, k, he(F({ key: 0 }, S))) : D(g.$slots, k, { key: 1 })
463
463
  ])
464
464
  }))
465
465
  ]), 1040, ["loading", "pagination", "dataSource"]);
466
466
  };
467
467
  }
468
- }), ut = /* @__PURE__ */ V({
468
+ }), dt = /* @__PURE__ */ V({
469
469
  __name: "index",
470
470
  props: {
471
471
  leftMin: {
@@ -491,28 +491,28 @@ const ct = /* @__PURE__ */ V({
491
491
  if (!d)
492
492
  return;
493
493
  const c = d.clientWidth, p = d.getBoundingClientRect(), h = p.left;
494
- function x(_) {
495
- _.preventDefault(), (_.clientX < p.left || _.clientX > p.right || _.clientY < p.top || _.clientY > p.bottom) && w();
496
- const m = (_.clientX - h) / c;
494
+ function _(x) {
495
+ x.preventDefault(), (x.clientX < p.left || x.clientX > p.right || x.clientY < p.top || x.clientY > p.bottom) && w();
496
+ const m = (x.clientX - h) / c;
497
497
  m > t.leftMin && m < t.leftMax && (o.value = m, a(m));
498
498
  }
499
499
  function w() {
500
- document.removeEventListener("mousemove", x), document.removeEventListener("mouseup", w);
500
+ document.removeEventListener("mousemove", _), document.removeEventListener("mouseup", w);
501
501
  }
502
- document.addEventListener("mousemove", x), document.addEventListener("mouseup", w);
502
+ document.addEventListener("mousemove", _), document.addEventListener("mouseup", w);
503
503
  }
504
- return he(() => {
504
+ return ye(() => {
505
505
  a(o.value), r.value && r.value.addEventListener("mousedown", u, !1);
506
- }), Oe(() => {
506
+ }), je(() => {
507
507
  r.value && r.value.removeEventListener("mousedown", u);
508
508
  }), (d, c) => ($(), P("div", {
509
509
  ref_key: "container",
510
510
  ref: n,
511
- class: je(["wl-splitter", { bordered: e.bordered }])
511
+ class: Pe(["wl-splitter", { bordered: e.bordered }])
512
512
  }, [
513
513
  M("div", {
514
514
  class: "my-left",
515
- style: oe(T(l))
515
+ style: ae(T(l))
516
516
  }, [
517
517
  D(d.$slots, "left")
518
518
  ], 4),
@@ -524,13 +524,13 @@ const ct = /* @__PURE__ */ V({
524
524
  }, null, 512),
525
525
  M("div", {
526
526
  class: "my-right",
527
- style: oe(T(i))
527
+ style: ae(T(i))
528
528
  }, [
529
529
  D(d.$slots, "right")
530
530
  ], 4)
531
531
  ], 2));
532
532
  }
533
- }), dt = {
533
+ }), pt = {
534
534
  class: "icon",
535
535
  width: "25",
536
536
  height: "24",
@@ -538,8 +538,8 @@ const ct = /* @__PURE__ */ V({
538
538
  fill: "none",
539
539
  xmlns: "http://www.w3.org/2000/svg"
540
540
  };
541
- function pt(e, t) {
542
- return $(), P("svg", dt, t[0] || (t[0] = [
541
+ function ft(e, t) {
542
+ return $(), P("svg", pt, t[0] || (t[0] = [
543
543
  M("path", {
544
544
  d: "M7.3125 5.5L2.3125 12L7.3125 18.5H22.3125V5.5H7.3125Z",
545
545
  stroke: "#272E3B",
@@ -560,7 +560,7 @@ function pt(e, t) {
560
560
  }, null, -1)
561
561
  ]));
562
562
  }
563
- const ft = G({ name: "local-clear", render: pt }), mt = { class: "nums-box" }, vt = { class: "btn-box" }, gt = /* @__PURE__ */ V({
563
+ const mt = Q({ name: "local-clear", render: ft }), vt = { class: "nums-box" }, gt = { class: "btn-box" }, ht = /* @__PURE__ */ V({
564
564
  inheritAttrs: !1,
565
565
  __name: "index",
566
566
  props: /* @__PURE__ */ K({
@@ -586,12 +586,12 @@ const ft = G({ name: "local-clear", render: pt }), mt = { class: "nums-box" }, v
586
586
  }),
587
587
  emits: /* @__PURE__ */ K(["enter"], ["update:value"]),
588
588
  setup(e, { emit: t }) {
589
- const n = e, r = t, l = C(), i = C(), o = C(["7", "8", "9", "4", "5", "6", "1", "2", "3", "0", "00", "."]), a = me(e, "value"), u = C(!1);
589
+ const n = e, r = t, l = C(), i = C(), o = C(["7", "8", "9", "4", "5", "6", "1", "2", "3", "0", "00", "."]), a = ve(e, "value"), u = C(!1);
590
590
  function d() {
591
591
  u.value = !0;
592
592
  }
593
593
  function c() {
594
- _();
594
+ x();
595
595
  }
596
596
  function p(f) {
597
597
  i.value.focus(), a.value = Number(f).toFixed(n.precision);
@@ -605,18 +605,18 @@ const ft = G({ name: "local-clear", render: pt }), mt = { class: "nums-box" }, v
605
605
  const m = String(a.value), s = l.value.getElementsByTagName("input")[0], v = s.selectionStart || 0, g = s.selectionEnd || 0;
606
606
  a.value = `${m.slice(0, v)}${f}${m.slice(g)}`;
607
607
  const y = v + f.length;
608
- ie(() => {
608
+ le(() => {
609
609
  i.value.setSelectionRange(y, y);
610
610
  });
611
611
  }
612
612
  }
613
- function x() {
613
+ function _() {
614
614
  if (i.value.focus(), O(a.value))
615
615
  return;
616
616
  const f = String(a.value);
617
617
  if (f != null && f.length) {
618
618
  const m = l.value.getElementsByTagName("input")[0], s = m.selectionStart || 0, v = m.selectionEnd || 0, g = s > 0 ? s - 1 : 0;
619
- s === v ? a.value = f.slice(0, g) + f.slice(v) : a.value = f.slice(0, s) + f.slice(v), ie(() => {
619
+ s === v ? a.value = f.slice(0, g) + f.slice(v) : a.value = f.slice(0, s) + f.slice(v), le(() => {
620
620
  i.value.setSelectionRange(g, g);
621
621
  });
622
622
  }
@@ -624,13 +624,13 @@ const ft = G({ name: "local-clear", render: pt }), mt = { class: "nums-box" }, v
624
624
  function w() {
625
625
  i.value.blur();
626
626
  }
627
- function _() {
627
+ function x() {
628
628
  const f = n.min, m = n.max;
629
629
  let s = parseFloat(a.value || "0");
630
630
  O(f) || (s = s > f ? s : f), O(m) || (s = s > m ? m : s), a.value = Number(s).toFixed(n.precision), u.value = !1, r("enter");
631
631
  }
632
632
  return (f, m) => {
633
- const s = Te, v = $e, g = ft, y = Le, b = Me, k = Ee;
633
+ const s = Be, v = Te, g = mt, y = $e, b = Le, k = Me;
634
634
  return $(), P("div", {
635
635
  class: "number-keyboard",
636
636
  ref_key: "numberKeyboard",
@@ -642,36 +642,36 @@ const ft = G({ name: "local-clear", render: pt }), mt = { class: "nums-box" }, v
642
642
  placement: "bottomLeft",
643
643
  align: { offset: [0, -9] },
644
644
  open: T(u),
645
- "onUpdate:open": m[2] || (m[2] = (S) => Pe(u) ? u.value = S : null)
645
+ "onUpdate:open": m[2] || (m[2] = (S) => Ae(u) ? u.value = S : null)
646
646
  }, {
647
647
  content: E(() => [
648
648
  M("div", {
649
649
  class: "keyboard-panel",
650
- onMousedownCapture: m[0] || (m[0] = ae(() => {
650
+ onMousedownCapture: m[0] || (m[0] = se(() => {
651
651
  }, ["prevent", "stop"]))
652
652
  }, [
653
653
  B(y, { gutter: "8" }, {
654
654
  default: E(() => [
655
655
  B(v, { span: 18 }, {
656
656
  default: E(() => [
657
- M("div", mt, [
658
- ($(!0), P(se, null, W(e.quickNums, (S) => ($(), z(s, {
657
+ M("div", vt, [
658
+ ($(!0), P(re, null, W(e.quickNums, (S) => ($(), z(s, {
659
659
  class: "btn-num",
660
660
  key: S,
661
661
  onClick: (q) => p(S)
662
662
  }, {
663
663
  default: E(() => [
664
- X(re(S), 1)
664
+ X(ie(S), 1)
665
665
  ]),
666
666
  _: 2
667
667
  }, 1032, ["onClick"]))), 128)),
668
- ($(!0), P(se, null, W(T(o), (S) => ($(), z(s, {
668
+ ($(!0), P(re, null, W(T(o), (S) => ($(), z(s, {
669
669
  class: "btn-num",
670
670
  key: S,
671
671
  onClick: (q) => h(S)
672
672
  }, {
673
673
  default: E(() => [
674
- X(re(S), 1)
674
+ X(ie(S), 1)
675
675
  ]),
676
676
  _: 2
677
677
  }, 1032, ["onClick"]))), 128))
@@ -681,10 +681,10 @@ const ft = G({ name: "local-clear", render: pt }), mt = { class: "nums-box" }, v
681
681
  }),
682
682
  B(v, { span: 6 }, {
683
683
  default: E(() => [
684
- M("div", vt, [
684
+ M("div", gt, [
685
685
  B(s, {
686
686
  class: "btn-clear",
687
- onClick: x
687
+ onClick: _
688
688
  }, {
689
689
  default: E(() => [
690
690
  B(g, { style: { width: "24px", height: "24px" } })
@@ -694,7 +694,7 @@ const ft = G({ name: "local-clear", render: pt }), mt = { class: "nums-box" }, v
694
694
  B(s, {
695
695
  class: "btn-enter",
696
696
  type: "primary",
697
- onClick: ae(w, ["stop"])
697
+ onClick: se(w, ["stop"])
698
698
  }, {
699
699
  default: E(() => m[3] || (m[3] = [
700
700
  X("Enter ")
@@ -719,7 +719,7 @@ const ft = G({ name: "local-clear", render: pt }), mt = { class: "nums-box" }, v
719
719
  }, f.$attrs, {
720
720
  onFocus: d,
721
721
  onBlur: c,
722
- onKeyup: Ae(w, ["enter"])
722
+ onKeyup: De(w, ["enter"])
723
723
  }), null, 16, ["value"])
724
724
  ]),
725
725
  _: 1
@@ -727,21 +727,21 @@ const ft = G({ name: "local-clear", render: pt }), mt = { class: "nums-box" }, v
727
727
  ], 512);
728
728
  };
729
729
  }
730
- }), ce = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
730
+ }), ue = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
731
731
  __proto__: null,
732
- AInputNumberEx: nt,
733
- ARangePickerEx: ot,
734
- ATableEx: ct,
735
- WlNumberKeyboard: gt,
736
- WlSplitter: ut
732
+ AInputNumberEx: ot,
733
+ ARangePickerEx: at,
734
+ ATableEx: ut,
735
+ WlNumberKeyboard: ht,
736
+ WlSplitter: dt
737
737
  }, Symbol.toStringTag, { value: "Module" }));
738
- function ye(e) {
739
- return Re() ? (ze(e), !0) : !1;
738
+ function be(e) {
739
+ return ze() ? (Fe(e), !0) : !1;
740
740
  }
741
- const ee = typeof window < "u" && typeof document < "u";
741
+ const te = typeof window < "u" && typeof document < "u";
742
742
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
743
- const ht = Object.prototype.toString, yt = (e) => ht.call(e) === "[object Object]";
744
- function bt(e) {
743
+ const yt = Object.prototype.toString, bt = (e) => yt.call(e) === "[object Object]";
744
+ function _t(e) {
745
745
  let t;
746
746
  function n() {
747
747
  return t || (t = e()), t;
@@ -754,7 +754,7 @@ function bt(e) {
754
754
  function Z(e) {
755
755
  return Array.isArray(e) ? e : [e];
756
756
  }
757
- function _t(e, t, n = {}) {
757
+ function xt(e, t, n = {}) {
758
758
  const {
759
759
  immediate: r = !0,
760
760
  immediateCallback: l = !1
@@ -771,14 +771,14 @@ function _t(e, t, n = {}) {
771
771
  i.value = !1, o = null, e(...c);
772
772
  }, A(t));
773
773
  }
774
- return r && (i.value = !0, ee && d()), ye(u), {
775
- isPending: De(i),
774
+ return r && (i.value = !0, te && d()), be(u), {
775
+ isPending: Re(i),
776
776
  start: d,
777
777
  stop: u
778
778
  };
779
779
  }
780
- function xt(e, t, n) {
781
- return Fe(
780
+ function wt(e, t, n) {
781
+ return We(
782
782
  e,
783
783
  t,
784
784
  {
@@ -787,23 +787,23 @@ function xt(e, t, n) {
787
787
  }
788
788
  );
789
789
  }
790
- const wt = ee ? window : void 0, be = ee ? window.navigator : void 0;
791
- function Ct(e) {
790
+ const Ct = te ? window : void 0, _e = te ? window.navigator : void 0;
791
+ function kt(e) {
792
792
  var t;
793
793
  const n = A(e);
794
794
  return (t = n == null ? void 0 : n.$el) != null ? t : n;
795
795
  }
796
- function _e(...e) {
796
+ function xe(...e) {
797
797
  const t = [], n = () => {
798
798
  t.forEach((a) => a()), t.length = 0;
799
799
  }, r = (a, u, d, c) => (a.addEventListener(u, d, c), () => a.removeEventListener(u, d, c)), l = U(() => {
800
800
  const a = Z(A(e[0])).filter((u) => u != null);
801
801
  return a.every((u) => typeof u != "string") ? a : void 0;
802
- }), i = xt(
802
+ }), i = wt(
803
803
  () => {
804
804
  var a, u;
805
805
  return [
806
- (u = (a = l.value) == null ? void 0 : a.map((d) => Ct(d))) != null ? u : [wt].filter((d) => d != null),
806
+ (u = (a = l.value) == null ? void 0 : a.map((d) => kt(d))) != null ? u : [Ct].filter((d) => d != null),
807
807
  Z(A(l.value ? e[1] : e[0])),
808
808
  Z(T(l.value ? e[2] : e[1])),
809
809
  // @ts-expect-error - TypeScript gets the correct types, but somehow still complains
@@ -813,11 +813,11 @@ function _e(...e) {
813
813
  ([a, u, d, c]) => {
814
814
  if (n(), !(a != null && a.length) || !(u != null && u.length) || !(d != null && d.length))
815
815
  return;
816
- const p = yt(c) ? { ...c } : c;
816
+ const p = bt(c) ? { ...c } : c;
817
817
  t.push(
818
818
  ...a.flatMap(
819
819
  (h) => u.flatMap(
820
- (x) => d.map((w) => r(h, x, w, p))
820
+ (_) => d.map((w) => r(h, _, w, p))
821
821
  )
822
822
  )
823
823
  );
@@ -826,28 +826,28 @@ function _e(...e) {
826
826
  ), o = () => {
827
827
  i(), n();
828
828
  };
829
- return ye(n), o;
829
+ return be(n), o;
830
830
  }
831
- function kt() {
831
+ function St() {
832
832
  const e = R(!1), t = H();
833
- return t && he(() => {
833
+ return t && ye(() => {
834
834
  e.value = !0;
835
835
  }, t), e;
836
836
  }
837
- function xe(e) {
838
- const t = kt();
837
+ function we(e) {
838
+ const t = St();
839
839
  return U(() => (t.value, !!e()));
840
840
  }
841
- function ue(e, t = {}) {
841
+ function de(e, t = {}) {
842
842
  const {
843
843
  controls: n = !1,
844
- navigator: r = be
845
- } = t, l = xe(() => r && "permissions" in r), i = R(), o = typeof e == "string" ? { name: e } : e, a = R(), u = () => {
844
+ navigator: r = _e
845
+ } = t, l = we(() => r && "permissions" in r), i = R(), o = typeof e == "string" ? { name: e } : e, a = R(), u = () => {
846
846
  var c, p;
847
847
  a.value = (p = (c = i.value) == null ? void 0 : c.state) != null ? p : "prompt";
848
848
  };
849
- _e(i, "change", u, { passive: !0 });
850
- const d = bt(async () => {
849
+ xe(i, "change", u, { passive: !0 });
850
+ const d = _t(async () => {
851
851
  if (l.value) {
852
852
  if (!i.value)
853
853
  try {
@@ -858,7 +858,7 @@ function ue(e, t = {}) {
858
858
  u();
859
859
  }
860
860
  if (n)
861
- return We(i.value);
861
+ return Ie(i.value);
862
862
  }
863
863
  });
864
864
  return d(), n ? {
@@ -867,15 +867,15 @@ function ue(e, t = {}) {
867
867
  query: d
868
868
  } : a;
869
869
  }
870
- function St(e = {}) {
870
+ function Et(e = {}) {
871
871
  const {
872
- navigator: t = be,
872
+ navigator: t = _e,
873
873
  read: n = !1,
874
874
  source: r,
875
875
  copiedDuring: l = 1500,
876
876
  legacy: i = !1
877
- } = e, o = xe(() => t && "clipboard" in t), a = ue("clipboard-read"), u = ue("clipboard-write"), d = U(() => o.value || i), c = R(""), p = R(!1), h = _t(() => p.value = !1, l, { immediate: !1 });
878
- async function x() {
877
+ } = e, o = we(() => t && "clipboard" in t), a = de("clipboard-read"), u = de("clipboard-write"), d = U(() => o.value || i), c = R(""), p = R(!1), h = xt(() => p.value = !1, l, { immediate: !1 });
878
+ async function _() {
879
879
  let s = !(o.value && m(a.value));
880
880
  if (!s)
881
881
  try {
@@ -885,7 +885,7 @@ function St(e = {}) {
885
885
  }
886
886
  s && (c.value = f());
887
887
  }
888
- d.value && n && _e(["copy", "cut"], x, { passive: !0 });
888
+ d.value && n && xe(["copy", "cut"], _, { passive: !0 });
889
889
  async function w(s = A(r)) {
890
890
  if (d.value && s != null) {
891
891
  let v = !(o.value && m(u.value));
@@ -895,10 +895,10 @@ function St(e = {}) {
895
895
  } catch {
896
896
  v = !0;
897
897
  }
898
- v && _(s), c.value = s, p.value = !0, h.start();
898
+ v && x(s), c.value = s, p.value = !0, h.start();
899
899
  }
900
900
  }
901
- function _(s) {
901
+ function x(s) {
902
902
  const v = document.createElement("textarea");
903
903
  v.value = s ?? "", v.style.position = "absolute", v.style.opacity = "0", document.body.appendChild(v), v.select(), document.execCommand("copy"), v.remove();
904
904
  }
@@ -916,24 +916,27 @@ function St(e = {}) {
916
916
  copy: w
917
917
  };
918
918
  }
919
- const Et = St();
920
- let Y;
921
- const Mt = {
919
+ const Mt = Et();
920
+ let Y, G;
921
+ const Lt = {
922
922
  mounted(e, t, n) {
923
923
  var o, a;
924
- const r = J(n.ctx), l = ((a = (o = r == null ? void 0 : r.locale) == null ? void 0 : o.locale) == null ? void 0 : a.slice(0, 2)) || "en", i = {
924
+ const r = ee(n.ctx), l = ((a = (o = r == null ? void 0 : r.locale) == null ? void 0 : o.locale) == null ? void 0 : a.slice(0, 2)) || "en", i = {
925
925
  zh: "复制成功",
926
926
  en: "Copy successfully",
927
927
  fr: "Copie réussie"
928
928
  };
929
- Y = () => {
930
- Et.copy(t.value), He.success(i[l]);
931
- }, e.addEventListener("click", Y);
929
+ Y = t.value, G = () => {
930
+ Mt.copy(Y), Xe.success(i[l]);
931
+ }, e.addEventListener("click", G);
932
+ },
933
+ updated(e, t) {
934
+ Y = t.value;
932
935
  },
933
936
  unmounted(e) {
934
- e.removeEventListener("click", Y);
937
+ e.removeEventListener("click", G);
935
938
  }
936
- }, Lt = {
939
+ }, $t = {
937
940
  beforeMount(e, t, n) {
938
941
  const r = t.value, l = {
939
942
  letterNumber: /^\w*$/,
@@ -996,7 +999,7 @@ const Mt = {
996
999
  e._handleInput && e.removeEventListener("input", e._handleInput), e._handleKeydown && e.removeEventListener("keydown", e._handleKeydown), e._handleDrop && e.removeEventListener("drop", e._handleDrop);
997
1000
  }
998
1001
  };
999
- function de(e, t, n) {
1002
+ function pe(e, t, n) {
1000
1003
  const r = t.value;
1001
1004
  if (r) {
1002
1005
  const l = r / 2;
@@ -1013,23 +1016,23 @@ function de(e, t, n) {
1013
1016
  });
1014
1017
  }
1015
1018
  }
1016
- const $t = {
1019
+ const Tt = {
1017
1020
  beforeMount(e) {
1018
1021
  e.classList.add("ant-row"), e.style.display = "flex", e.style.flexWrap = "wrap", e.style.flexDirection = "row", e.style.minWidth = 0;
1019
1022
  },
1020
1023
  mounted(e, t, n) {
1021
- de(e, t, n);
1024
+ pe(e, t, n);
1022
1025
  },
1023
1026
  updated(e, t, n, r) {
1024
- de(e, t, n);
1027
+ pe(e, t, n);
1025
1028
  }
1026
- }, Tt = {
1029
+ }, Bt = {
1027
1030
  beforeMount(e, t) {
1028
1031
  e.classList.add("ant-col", `ant-col-${t.value}`);
1029
1032
  const n = t.value / 24 * 100;
1030
1033
  e.style.position = "relative", e.style.flex = `0 0 ${n}%`, e.style.maxWidth = `${n}%`;
1031
1034
  }
1032
- }, Bt = {
1035
+ }, Nt = {
1033
1036
  mounted(e, t, n) {
1034
1037
  const { value: r } = t, {
1035
1038
  content: l = "",
@@ -1042,8 +1045,8 @@ const $t = {
1042
1045
  if (e.tooltipDisabled = !1, !o)
1043
1046
  e.tooltipDisabled = !0;
1044
1047
  else if (t.modifiers.exceed) {
1045
- const x = e.clientWidth, w = pe(l);
1046
- e.tooltipDisabled = w < x - a * 2;
1048
+ const _ = e.clientWidth, w = fe(l);
1049
+ e.tooltipDisabled = _ ? w < _ - a * 2 : !0;
1047
1050
  }
1048
1051
  const d = C({
1049
1052
  top: 0,
@@ -1052,7 +1055,7 @@ const $t = {
1052
1055
  right: 0
1053
1056
  }), c = C({
1054
1057
  getBoundingClientRect: () => d.value
1055
- }), p = j(Ze, {
1058
+ }), p = j(Ye, {
1056
1059
  visible: !1,
1057
1060
  content: l,
1058
1061
  placement: i,
@@ -1080,8 +1083,8 @@ const $t = {
1080
1083
  if (e.tooltipDisabled = !1, !i)
1081
1084
  e.tooltipDisabled = !0;
1082
1085
  else if (t.modifiers.exceed) {
1083
- const d = e.clientWidth, c = pe(r);
1084
- e.tooltipDisabled = c < d - o * 2;
1086
+ const d = e.clientWidth, c = fe(r);
1087
+ e.tooltipDisabled = d ? c < d - o * 2 : !0;
1085
1088
  }
1086
1089
  const u = e.tooltipVm;
1087
1090
  u.component && (Object.assign(u.component.props, { content: r, placement: l, ...a }), u.component.update());
@@ -1091,91 +1094,91 @@ const $t = {
1091
1094
  e.tooltipContainer && I(null, e.tooltipContainer);
1092
1095
  }
1093
1096
  };
1094
- function pe(e, t) {
1097
+ function fe(e, t) {
1095
1098
  const r = document.createElement("canvas").getContext("2d");
1096
1099
  return r.font = "14px Arial", r.measureText(e).width;
1097
1100
  }
1098
- const Nt = {
1101
+ const Ot = {
1099
1102
  beforeMount(e, t) {
1100
1103
  const { value: n } = t;
1101
- n && (Ie(n) || setTimeout(() => {
1104
+ n && (Ue(n) || setTimeout(() => {
1102
1105
  var l;
1103
1106
  (l = e.parentNode) == null || l.removeChild(e);
1104
1107
  }, 50));
1105
1108
  }
1106
- }, fe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1109
+ }, me = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1107
1110
  __proto__: null,
1108
- col: Tt,
1109
- copy: Mt,
1110
- inputlimit: Lt,
1111
- permission: Nt,
1112
- row: $t,
1113
- tooltip: Bt
1111
+ col: Bt,
1112
+ copy: Lt,
1113
+ inputlimit: $t,
1114
+ permission: Ot,
1115
+ row: Tt,
1116
+ tooltip: Nt
1114
1117
  }, Symbol.toStringTag, { value: "Module" }));
1115
- function Ot(e) {
1116
- Object.keys(ce).forEach((t) => {
1117
- e.component(t, ce[t]);
1118
- }), Object.keys(fe).forEach((t) => {
1119
- e.directive(t, fe[t]);
1118
+ function jt(e) {
1119
+ Object.keys(ue).forEach((t) => {
1120
+ e.component(t, ue[t]);
1121
+ }), Object.keys(me).forEach((t) => {
1122
+ e.directive(t, me[t]);
1120
1123
  });
1121
1124
  }
1122
- const Ut = { install: Ot };
1125
+ const Vt = { install: jt };
1123
1126
  export {
1124
- nt as AInputNumberEx,
1125
- ot as ARangePickerEx,
1126
- ct as ATableEx,
1127
- Kt as UserCenterKey,
1128
- gt as WlNumberKeyboard,
1129
- ut as WlSplitter,
1130
- Ht as buildTree,
1131
- Tt as col,
1132
- Mt as copy,
1133
- Ut as default,
1134
- Xt as exportFile,
1135
- Zt as forEachTree,
1136
- Yt as getButtonPermissions,
1137
- Gt as getLocale,
1138
- Qt as getMenuInfo,
1139
- Jt as getToken,
1140
- en as getUserCenterParams,
1141
- tn as getUserCenterParamsByUrl,
1142
- nn as getUserInfo,
1143
- Ie as hasPermission,
1144
- Lt as inputlimit,
1145
- on as is,
1146
- an as isArray,
1147
- sn as isAsyncFunction,
1148
- rn as isBoolean,
1149
- ln as isClient,
1150
- cn as isDate,
1151
- un as isDef,
1152
- dn as isElement,
1153
- pn as isFunction,
1154
- fn as isImageDom,
1155
- mn as isNull,
1127
+ ot as AInputNumberEx,
1128
+ at as ARangePickerEx,
1129
+ ut as ATableEx,
1130
+ Ht as UserCenterKey,
1131
+ ht as WlNumberKeyboard,
1132
+ dt as WlSplitter,
1133
+ Xt as buildTree,
1134
+ Bt as col,
1135
+ Lt as copy,
1136
+ Vt as default,
1137
+ Zt as exportFile,
1138
+ Yt as forEachTree,
1139
+ Gt as getButtonPermissions,
1140
+ Qt as getLocale,
1141
+ Jt as getMenuInfo,
1142
+ en as getToken,
1143
+ tn as getUserCenterParams,
1144
+ nn as getUserCenterParamsByUrl,
1145
+ on as getUserInfo,
1146
+ Ue as hasPermission,
1147
+ $t as inputlimit,
1148
+ an as is,
1149
+ sn as isArray,
1150
+ rn as isAsyncFunction,
1151
+ ln as isBoolean,
1152
+ cn as isClient,
1153
+ un as isDate,
1154
+ dn as isDef,
1155
+ pn as isElement,
1156
+ fn as isFunction,
1157
+ mn as isImageDom,
1158
+ vn as isNull,
1156
1159
  O as isNullOrUndef,
1157
- vn as isNumber,
1158
- gn as isObject,
1159
- hn as isPromise,
1160
- yn as isServer,
1161
- bn as isString,
1162
- _n as isUndef,
1163
- xn as isWindow,
1164
- wn as logoutToUserCenter,
1165
- Nt as permission,
1166
- Cn as removeAll,
1167
- kn as removeLocale,
1168
- Sn as removeToken,
1169
- $t as row,
1170
- En as setLocale,
1171
- Mn as setMenuInfo,
1172
- Ln as setToken,
1173
- $n as setUserCenterParams,
1174
- Tn as setUserInfo,
1175
- Bn as toUserCenterConsole,
1176
- Bt as tooltip,
1177
- J as useConfigProvider,
1178
- Ft as useFindParent,
1179
- It as useModal,
1180
- Wt as useRequire
1160
+ gn as isNumber,
1161
+ hn as isObject,
1162
+ yn as isPromise,
1163
+ bn as isServer,
1164
+ _n as isString,
1165
+ xn as isUndef,
1166
+ wn as isWindow,
1167
+ Cn as logoutToUserCenter,
1168
+ Ot as permission,
1169
+ kn as removeAll,
1170
+ Sn as removeLocale,
1171
+ En as removeToken,
1172
+ Tt as row,
1173
+ Mn as setLocale,
1174
+ Ln as setMenuInfo,
1175
+ $n as setToken,
1176
+ Tn as setUserCenterParams,
1177
+ Bn as setUserInfo,
1178
+ Nn as toUserCenterConsole,
1179
+ Nt as tooltip,
1180
+ ee as useConfigProvider,
1181
+ Wt as useFindParent,
1182
+ Ut as useModal,
1183
+ It as useRequire
1181
1184
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@witlink/components",
3
3
  "private": false,
4
- "version": "1.0.5",
4
+ "version": "1.0.7",
5
5
  "description": "witlink公共组件库",
6
6
  "license": "MIT",
7
7
  "type": "module",