hs-admin-ui 16.4.3 → 16.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -28472,6 +28472,10 @@ const uO = Ge(iO), cO = /* @__PURE__ */ H({
|
|
|
28472
28472
|
type: String,
|
|
28473
28473
|
default: ""
|
|
28474
28474
|
},
|
|
28475
|
+
readonly: {
|
|
28476
|
+
type: Boolean,
|
|
28477
|
+
default: !1
|
|
28478
|
+
},
|
|
28475
28479
|
min: {
|
|
28476
28480
|
type: [Number, String],
|
|
28477
28481
|
default: Number.MIN_SAFE_INTEGER
|
|
@@ -28481,38 +28485,49 @@ const uO = Ge(iO), cO = /* @__PURE__ */ H({
|
|
|
28481
28485
|
default: Number.MAX_SAFE_INTEGER
|
|
28482
28486
|
}
|
|
28483
28487
|
},
|
|
28484
|
-
emits: ["focus", "change"],
|
|
28488
|
+
emits: ["blur", "focus", "change"],
|
|
28485
28489
|
setup(e, { emit: t }) {
|
|
28486
|
-
const a = e, n = t, o =
|
|
28487
|
-
|
|
28488
|
-
|
|
28489
|
-
|
|
28490
|
-
|
|
28490
|
+
const a = e, n = t, o = L(a.readonly || !0);
|
|
28491
|
+
pe(
|
|
28492
|
+
() => a.readonly,
|
|
28493
|
+
(v) => {
|
|
28494
|
+
o.value = v;
|
|
28495
|
+
}
|
|
28496
|
+
);
|
|
28497
|
+
const s = me(), r = {
|
|
28498
|
+
ref: u,
|
|
28499
|
+
onChange: d,
|
|
28500
|
+
onBlur: f,
|
|
28501
|
+
onFocus: c
|
|
28502
|
+
}, i = Ie("setItemInstance", () => {
|
|
28491
28503
|
});
|
|
28492
|
-
function
|
|
28493
|
-
const
|
|
28494
|
-
Ee.set(
|
|
28495
|
-
var
|
|
28496
|
-
if (a.type == "vxe" && ((
|
|
28497
|
-
const
|
|
28498
|
-
|
|
28504
|
+
function u(v) {
|
|
28505
|
+
const m = () => a.type == "vxe" ? v == null ? void 0 : v.$el : v == null ? void 0 : v.ref, h = m();
|
|
28506
|
+
Ee.set(s, "exposed", Ee.assign({}, v || {}, { activeElement: m, focus: c })), Ve(() => {
|
|
28507
|
+
var C, k, b, y;
|
|
28508
|
+
if (a.type == "vxe" && ((k = (C = h == null ? void 0 : h.querySelector("input")) == null ? void 0 : C.classList) == null || k.add("el-input__inner")), typeof (h == null ? void 0 : h.closest) != "function") return;
|
|
28509
|
+
const S = h == null ? void 0 : h.closest(".el-form-item"), g = (y = (b = S == null ? void 0 : S.className) == null ? void 0 : b.match(/query_[a-zA-Z0-9_]+/)) == null ? void 0 : y[0];
|
|
28510
|
+
g && i({ ...s == null ? void 0 : s.exposed, activeElement: m, focus: c }, g.replace("query_", ""));
|
|
28499
28511
|
});
|
|
28500
28512
|
}
|
|
28501
|
-
function
|
|
28502
|
-
var
|
|
28503
|
-
a.type !== "vxe" ? (
|
|
28513
|
+
function c(v) {
|
|
28514
|
+
var m;
|
|
28515
|
+
a.type !== "vxe" ? (m = s == null ? void 0 : s.exposed) == null || m.select() : v.$input.select(), a.readonly || (o.value = !1), n("focus", v);
|
|
28504
28516
|
}
|
|
28505
|
-
function
|
|
28506
|
-
n("
|
|
28517
|
+
function f(v) {
|
|
28518
|
+
o.value = !0, n("blur", v);
|
|
28507
28519
|
}
|
|
28508
|
-
function
|
|
28509
|
-
|
|
28510
|
-
|
|
28511
|
-
|
|
28512
|
-
|
|
28513
|
-
|
|
28520
|
+
function d(v) {
|
|
28521
|
+
n("change", v);
|
|
28522
|
+
}
|
|
28523
|
+
function p(v) {
|
|
28524
|
+
let m = v.replace(/[^0-9.-]/g, "");
|
|
28525
|
+
const h = m.split(".");
|
|
28526
|
+
h.length > 2 && (m = h[0] + "." + h.slice(1).join(""));
|
|
28527
|
+
const S = m.split("-");
|
|
28528
|
+
return S.length > 2 && (m = S[0] + "-" + S.slice(1).join("")), m.startsWith("00") && m.length > 1 && (m = "0"), v === "" ? "" : Number(v) < Number(a.min) ? a.min : Number(v) > Number(a.max) ? a.max : m;
|
|
28514
28529
|
}
|
|
28515
|
-
return (
|
|
28530
|
+
return (v, m) => e.type === "number" ? ($(), q(ge(se(l(nn), { ...v.$attrs, ...r, type: "text", formatter: p, parser: p }, v.$slots)), { key: 0 })) : e.type == "vxe" ? ($(), q(ge(se(l(jh), { ...v.$attrs, ...r }, v.$slots)), { key: 1 })) : ($(), q(ge(se(l(nn), { ...v.$attrs, readonly: o.value, type: e.type, ...r }, v.$slots)), { key: 2 }));
|
|
28516
28531
|
}
|
|
28517
28532
|
}), nP = /* @__PURE__ */ H({
|
|
28518
28533
|
__name: "InputNumber",
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ct=require("./index-CXnSdJdR.cjs"),$t=require("./components-ERGTKcUy.cjs"),V=require("./index-BmG-cykr.cjs"),Ma=require("./bcIcon.vue_vue_type_script_setup_true_name_bcIcon_lang-B4FHqtSa.cjs"),e=require("vue"),a=require("./bcVisual.vue_vue_type_style_index_0_scoped_cae31cec_lang-BDGsoXRz.cjs"),rt=require("./index-CTCZcL1I.cjs");typeof String.prototype.removeHTMLTag>"u"&&(String.prototype.removeHTMLTag=function(){return this.replace(/<.+?>([^<>]+?)<.+?>/g,"$1")});(function(t,n){n(t),typeof define=="function"&&define.amd?define([],n):typeof module<"u"&&module.exports?module.exports=n():t.ws=n()})(window,function(t,n){if(!("WebSocket"in window))return;var l,o=document.createElement("div"),r={automaticOpen:!0,reconnectDecay:1.5,host:"127.0.0.1",port:54321,protocol:"ws"},i=function(u){switch(u.type){case"connecting":console.log("Connecting to cfprint.",u);break;case"open":console.log("Connected to cfprint.",u);break;case"close":console.log("Disconnected from cfprint.",u);break;case"message":console.log("Got a message from cfprint: "+u.data,u);break;case"error":console.log("A error occured: "+u.data,u);break;default:console.log("EVENT: ",u)}},s={CONNECTING:WebSocket.CONNECTING,OPEN:WebSocket.OPEN,CLOSING:WebSocket.CLOSING,CLOSED:WebSocket.CLOSED};function d(u,f,m){var h=this;this.ver="1.3.8.1",m||(m={});for(var p in r)typeof m[p]<"u"?this[p]=m[p]:this[p]=r[p];this.host=u||this.host,this.port=f||this.port,this.url=this.getURL(),this.readyState=WebSocket.CONNECTING;for(var _ in s)this[_]=s[_];return o.addEventListener("connecting",function(g){h!==window&&h.onconnecting(g)}),o.addEventListener("open",function(g){h!==window&&h.onopen(g)}),o.addEventListener("message",function(g){h!==window&&h.onmessage(g)}),o.addEventListener("close",function(g){h!==window&&h.onclose(g)}),o.addEventListener("error",function(g){h!==window&&h.onerror(g)}),this.addEventListener=o.addEventListener.bind(o),this.removeEventListener=o.removeEventListener.bind(o),this.dispatchEvent=o.dispatchEvent.bind(o),this.automaticOpen===!0&&this!==window&&this.open(),this}function c(u,f){var m=document.createEvent("CustomEvent");return m.initCustomEvent(u,!1,!1,f),m}return d.prototype.onconnecting=i,d.prototype.onopen=i,d.prototype.onmessage=i,d.prototype.onclose=i,d.prototype.onerror=i,d.prototype.setProtocol=function(u){this.wsocket&&(this.protocol=u)},d.prototype.setPort=function(u){this.wsocket&&(this.port=u)},d.prototype.setHost=function(u){this.wsocket&&(this.host=u)},d.prototype.getURL=function(u){return this.wsocket&&this.wsocket.readyState===this.OPEN?this.wsocket.url:(this.protocol||"ws")+"://"+(this.host||"127.0.0.1")+":"+(this.port||54321)},d.prototype.send=function(u){if(this.wsocket&&this.wsocket.readyState===1){var f="";if(typeof u=="string")f=u;else if(typeof u=="object")f=JSON.stringify(u,null,2);else{var m=c("error",{message:"Invalid data format, only json string or json object is allowed."});o.dispatchEvent(m);return}try{f=btoa(unescape(encodeURIComponent(f))),f="base64:"+f,this.wsocket.send(f)}catch(h){var m=c("error",{message:h.message});h.dispatchEvent(m)}}else{var f=c("error",{message:"Not connected to cfprint server or disconnected."});o.dispatchEvent(f)}},d.prototype.close=function(u,f){typeof u>"u"&&(u=1e3),this.wsocket&&this.wsocket.close(u,f)},d.prototype.open=function(){var u=this;return this.url=this.getURL(),l=new WebSocket(this.url,this.protocol||[]),o.dispatchEvent(c("connecting")),l.onopen=function(f){u.protocol=d.protocol,u.readyState=WebSocket.OPEN;var m=c("open");o.dispatchEvent(m)},l.onclose=function(f){u.readyState=WebSocket.CLOSED;var m=c("connecting");m.code=f.code,m.reason=f.reason,m.wasClean=f.wasClean,o.dispatchEvent(m),o.dispatchEvent(c("close"))},l.onmessage=function(f){var m=c("message");m.data=f.data,o.dispatchEvent(m)},l.onerror=function(f){var m=c("error");o.dispatchEvent(m)},this.wsocket=l,this},d.prototype.state=function(){return this.wsocket?this.wsocket.readyState:WebSocket.CLOSED},d.prototype.log=function(u,f){var m=this.output||"output",h=document.getElementById(m);if(h&&h.appendChild){var p=document.createElement("p");p.style.wordWrap="break-word",p.style.padding="8px",p.style.background="#eee",p.innerHTML="LOG: "+u,h.childNodes.length>0?h.insertBefore(p,h.childNodes[0]):h.appendChild(p)}f?console.log(u,f):console.log(u)},d});const qa=(t,n=0)=>{if(n===0)return t;const l=e.ref(!1);let o=null;const r=()=>{o&&clearTimeout(o),o=setTimeout(()=>{l.value=t.value},n)};return e.onMounted(r),e.watch(()=>t.value,i=>{i?r():l.value=i}),l},Fa=a.buildProps({size:{type:[Number,String],values:a.componentSizes,default:"",validator:t=>a.isNumber(t)},shape:{type:String,values:["circle","square"],default:"circle"},icon:{type:a.iconPropType},src:{type:String,default:""},alt:String,srcSet:String,fit:{type:a.definePropType(String),default:"cover"}}),Aa={error:t=>t instanceof Event},Ua=e.defineComponent({name:"ElAvatar"}),za=e.defineComponent({...Ua,props:Fa,emits:Aa,setup(t,{emit:n}){const l=t,o=a.useNamespace("avatar"),r=e.ref(!1),i=e.computed(()=>{const{size:u,icon:f,shape:m}=l,h=[o.b()];return a.isString(u)&&h.push(o.m(u)),f&&h.push(o.m("icon")),m&&h.push(o.m(m)),h}),s=e.computed(()=>{const{size:u}=l;return a.isNumber(u)?o.cssVarBlock({size:a.addUnit(u)||""}):void 0}),d=e.computed(()=>({objectFit:l.fit}));e.watch(()=>l.src,()=>r.value=!1);function c(u){r.value=!0,n("error",u)}return(u,f)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(e.unref(i)),style:e.normalizeStyle(e.unref(s))},[(u.src||u.srcSet)&&!r.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:u.src,alt:u.alt,srcset:u.srcSet,style:e.normalizeStyle(e.unref(d)),onError:c},null,44,["src","alt","srcset"])):u.icon?(e.openBlock(),e.createBlock(e.unref(a.ElIcon),{key:1},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u.icon)))]),_:1})):e.renderSlot(u.$slots,"default",{key:2})],6))}});var ja=a._export_sfc(za,[["__file","avatar.vue"]]);const Wa=a.withInstall(ja),Ha=a.buildProps({icon:{type:a.iconPropType,default:()=>a.back_default},title:String,content:{type:String,default:""}}),Ya={back:()=>!0},Ga=e.defineComponent({name:"ElPageHeader"}),Ka=e.defineComponent({...Ga,props:Ha,emits:Ya,setup(t,{emit:n}){const l=e.useSlots(),{t:o}=a.useLocale(),r=a.useNamespace("page-header"),i=e.computed(()=>[r.b(),{[r.m("has-breadcrumb")]:!!l.breadcrumb,[r.m("has-extra")]:!!l.extra,[r.is("contentful")]:!!l.default}]);function s(){n("back")}return(d,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(i))},[d.$slots.breadcrumb?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(r).e("breadcrumb"))},[e.renderSlot(d.$slots,"breadcrumb")],2)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(r).e("header"))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(r).e("left"))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(r).e("back")),role:"button",tabindex:"0",onClick:s},[d.icon||d.$slots.icon?(e.openBlock(),e.createElementBlock("div",{key:0,"aria-label":d.title||e.unref(o)("el.pageHeader.title"),class:e.normalizeClass(e.unref(r).e("icon"))},[e.renderSlot(d.$slots,"icon",{},()=>[d.icon?(e.openBlock(),e.createBlock(e.unref(a.ElIcon),{key:0},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d.icon)))]),_:1})):e.createCommentVNode("v-if",!0)])],10,["aria-label"])):e.createCommentVNode("v-if",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(r).e("title"))},[e.renderSlot(d.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(d.title||e.unref(o)("el.pageHeader.title")),1)])],2)],2),e.createVNode(e.unref(V.ElDivider),{direction:"vertical"}),e.createElementVNode("div",{class:e.normalizeClass(e.unref(r).e("content"))},[e.renderSlot(d.$slots,"content",{},()=>[e.createTextVNode(e.toDisplayString(d.content),1)])],2)],2),d.$slots.extra?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(r).e("extra"))},[e.renderSlot(d.$slots,"extra")],2)):e.createCommentVNode("v-if",!0)],2),d.$slots.default?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(r).e("main"))},[e.renderSlot(d.$slots,"default")],2)):e.createCommentVNode("v-if",!0)],2))}});var Qa=a._export_sfc(Ka,[["__file","page-header.vue"]]);const Xa=a.withInstall(Qa),Ja=({atXEndEdge:t,atXStartEdge:n,atYEndEdge:l,atYStartEdge:o},r)=>{let i=null,s=0,d=0;const c=(f,m)=>{const h=f<=0&&n.value||f>=0&&t.value,p=m<=0&&o.value||m>=0&&l.value;return h&&p};return{hasReachedEdge:c,onWheel:f=>{a.cAF(i);let m=f.deltaX,h=f.deltaY;Math.abs(m)>Math.abs(h)?h=0:m=0,f.shiftKey&&h!==0&&(m=h,h=0),!(c(s,d)&&c(s+m,d+h))&&(s+=m,d+=h,f.preventDefault(),i=a.rAF(()=>{r(s,d),s=0,d=0}))}}},Uo=({name:t,clearCache:n,getColumnPosition:l,getColumnStartIndexForOffset:o,getColumnStopIndexForStartIndex:r,getEstimatedTotalHeight:i,getEstimatedTotalWidth:s,getColumnOffset:d,getRowOffset:c,getRowPosition:u,getRowStartIndexForOffset:f,getRowStopIndexForStartIndex:m,initCache:h,injectToInstance:p,validateProps:_})=>e.defineComponent({name:t??"ElVirtualList",props:V.virtualizedGridProps,emits:[V.ITEM_RENDER_EVT,V.SCROLL_EVT],setup(g,{emit:w,expose:v,slots:k}){const y=a.useNamespace("vl");_(g);const D=e.getCurrentInstance(),N=e.ref(h(g,D));p==null||p(D,N);const b=e.ref(),C=e.ref(),P=e.ref(),$=e.ref(null),S=e.ref({isScrolling:!1,scrollLeft:a.isNumber(g.initScrollLeft)?g.initScrollLeft:0,scrollTop:a.isNumber(g.initScrollTop)?g.initScrollTop:0,updateRequested:!1,xAxisScrollDir:V.FORWARD,yAxisScrollDir:V.FORWARD}),x=V.useCache(),E=e.computed(()=>Number.parseInt(`${g.height}`,10)),I=e.computed(()=>Number.parseInt(`${g.width}`,10)),B=e.computed(()=>{const{totalColumn:Q,totalRow:J,columnCache:le}=g,{isScrolling:fe,xAxisScrollDir:pe,scrollLeft:_e}=e.unref(S);if(Q===0||J===0)return[0,0,0,0];const ve=o(g,_e,e.unref(N)),we=r(g,ve,_e,e.unref(N)),Ie=!fe||pe===V.BACKWARD?Math.max(1,le):1,Ne=!fe||pe===V.FORWARD?Math.max(1,le):1;return[Math.max(0,ve-Ie),Math.max(0,Math.min(Q-1,we+Ne)),ve,we]}),T=e.computed(()=>{const{totalColumn:Q,totalRow:J,rowCache:le}=g,{isScrolling:fe,yAxisScrollDir:pe,scrollTop:_e}=e.unref(S);if(Q===0||J===0)return[0,0,0,0];const ve=f(g,_e,e.unref(N)),we=m(g,ve,_e,e.unref(N)),Ie=!fe||pe===V.BACKWARD?Math.max(1,le):1,Ne=!fe||pe===V.FORWARD?Math.max(1,le):1;return[Math.max(0,ve-Ie),Math.max(0,Math.min(J-1,we+Ne)),ve,we]}),q=e.computed(()=>i(g,e.unref(N))),U=e.computed(()=>s(g,e.unref(N))),X=e.computed(()=>{var Q;return[{position:"relative",overflow:"hidden",WebkitOverflowScrolling:"touch",willChange:"transform"},{direction:g.direction,height:a.isNumber(g.height)?`${g.height}px`:g.height,width:a.isNumber(g.width)?`${g.width}px`:g.width},(Q=g.style)!=null?Q:{}]}),F=e.computed(()=>{const Q=`${e.unref(U)}px`;return{height:`${e.unref(q)}px`,pointerEvents:e.unref(S).isScrolling?"none":void 0,width:Q}}),R=()=>{const{totalColumn:Q,totalRow:J}=g;if(Q>0&&J>0){const[we,Ie,Ne,Te]=e.unref(B),[Ee,xe,Ae,Le]=e.unref(T);w(V.ITEM_RENDER_EVT,{columnCacheStart:we,columnCacheEnd:Ie,rowCacheStart:Ee,rowCacheEnd:xe,columnVisibleStart:Ne,columnVisibleEnd:Te,rowVisibleStart:Ae,rowVisibleEnd:Le})}const{scrollLeft:le,scrollTop:fe,updateRequested:pe,xAxisScrollDir:_e,yAxisScrollDir:ve}=e.unref(S);w(V.SCROLL_EVT,{xAxisScrollDir:_e,scrollLeft:le,yAxisScrollDir:ve,scrollTop:fe,updateRequested:pe})},H=Q=>{const{clientHeight:J,clientWidth:le,scrollHeight:fe,scrollLeft:pe,scrollTop:_e,scrollWidth:ve}=Q.currentTarget,we=e.unref(S);if(we.scrollTop===_e&&we.scrollLeft===pe)return;let Ie=pe;if(V.isRTL(g.direction))switch(V.getRTLOffsetType()){case V.RTL_OFFSET_NAG:Ie=-pe;break;case V.RTL_OFFSET_POS_DESC:Ie=ve-le-pe;break}S.value={...we,isScrolling:!0,scrollLeft:Ie,scrollTop:Math.max(0,Math.min(_e,fe-J)),updateRequested:!0,xAxisScrollDir:V.getScrollDir(we.scrollLeft,Ie),yAxisScrollDir:V.getScrollDir(we.scrollTop,_e)},e.nextTick(()=>K()),se(),R()},A=(Q,J)=>{const le=e.unref(E),fe=(q.value-le)/J*Q;z({scrollTop:Math.min(q.value-le,fe)})},Y=(Q,J)=>{const le=e.unref(I),fe=(U.value-le)/J*Q;z({scrollLeft:Math.min(U.value-le,fe)})},{onWheel:O}=Ja({atXStartEdge:e.computed(()=>S.value.scrollLeft<=0),atXEndEdge:e.computed(()=>S.value.scrollLeft>=U.value-e.unref(I)),atYStartEdge:e.computed(()=>S.value.scrollTop<=0),atYEndEdge:e.computed(()=>S.value.scrollTop>=q.value-e.unref(E))},(Q,J)=>{var le,fe,pe,_e;(fe=(le=C.value)==null?void 0:le.onMouseUp)==null||fe.call(le),(_e=(pe=P.value)==null?void 0:pe.onMouseUp)==null||_e.call(pe);const ve=e.unref(I),we=e.unref(E);z({scrollLeft:Math.min(S.value.scrollLeft+Q,U.value-ve),scrollTop:Math.min(S.value.scrollTop+J,q.value-we)})});a.useEventListener(b,"wheel",O,{passive:!1});const z=({scrollLeft:Q=S.value.scrollLeft,scrollTop:J=S.value.scrollTop})=>{Q=Math.max(Q,0),J=Math.max(J,0);const le=e.unref(S);J===le.scrollTop&&Q===le.scrollLeft||(S.value={...le,xAxisScrollDir:V.getScrollDir(le.scrollLeft,Q),yAxisScrollDir:V.getScrollDir(le.scrollTop,J),scrollLeft:Q,scrollTop:J,updateRequested:!0},e.nextTick(()=>K()),se(),R())},j=(Q=0,J=0,le=V.AUTO_ALIGNMENT)=>{const fe=e.unref(S);J=Math.max(0,Math.min(J,g.totalColumn-1)),Q=Math.max(0,Math.min(Q,g.totalRow-1));const pe=a.getScrollBarWidth(y.namespace.value),_e=e.unref(N),ve=i(g,_e),we=s(g,_e);z({scrollLeft:d(g,J,le,fe.scrollLeft,_e,we>g.width?pe:0),scrollTop:c(g,Q,le,fe.scrollTop,_e,ve>g.height?pe:0)})},Z=(Q,J)=>{const{columnWidth:le,direction:fe,rowHeight:pe}=g,_e=x.value(n&&le,n&&pe,n&&fe),ve=`${Q},${J}`;if(a.hasOwn(_e,ve))return _e[ve];{const[,we]=l(g,J,e.unref(N)),Ie=e.unref(N),Ne=V.isRTL(fe),[Te,Ee]=u(g,Q,Ie),[xe]=l(g,J,Ie);return _e[ve]={position:"absolute",left:Ne?void 0:`${we}px`,right:Ne?`${we}px`:void 0,top:`${Ee}px`,height:`${Te}px`,width:`${xe}px`},_e[ve]}},K=()=>{S.value.isScrolling=!1,e.nextTick(()=>{x.value(-1,null,null)})};e.onMounted(()=>{if(!a.isClient)return;const{initScrollLeft:Q,initScrollTop:J}=g,le=e.unref(b);le&&(a.isNumber(Q)&&(le.scrollLeft=Q),a.isNumber(J)&&(le.scrollTop=J)),R()});const se=()=>{const{direction:Q}=g,{scrollLeft:J,scrollTop:le,updateRequested:fe}=e.unref(S),pe=e.unref(b);if(fe&&pe){if(Q===V.RTL)switch(V.getRTLOffsetType()){case V.RTL_OFFSET_NAG:{pe.scrollLeft=-J;break}case V.RTL_OFFSET_POS_ASC:{pe.scrollLeft=J;break}default:{const{clientWidth:_e,scrollWidth:ve}=pe;pe.scrollLeft=ve-_e-J;break}}else pe.scrollLeft=Math.max(0,J);pe.scrollTop=Math.max(0,le)}},{resetAfterColumnIndex:re,resetAfterRowIndex:ce,resetAfter:ye}=D.proxy;v({windowRef:b,innerRef:$,getItemStyleCache:x,scrollTo:z,scrollToItem:j,states:S,resetAfterColumnIndex:re,resetAfterRowIndex:ce,resetAfter:ye});const ee=()=>{const{scrollbarAlwaysOn:Q,scrollbarStartGap:J,scrollbarEndGap:le,totalColumn:fe,totalRow:pe}=g,_e=e.unref(I),ve=e.unref(E),we=e.unref(U),Ie=e.unref(q),{scrollLeft:Ne,scrollTop:Te}=e.unref(S),Ee=e.h(V.ScrollBar,{ref:C,alwaysOn:Q,startGap:J,endGap:le,class:y.e("horizontal"),clientSize:_e,layout:"horizontal",onScroll:Y,ratio:_e*100/we,scrollFrom:Ne/(we-_e),total:pe,visible:!0}),xe=e.h(V.ScrollBar,{ref:P,alwaysOn:Q,startGap:J,endGap:le,class:y.e("vertical"),clientSize:ve,layout:"vertical",onScroll:A,ratio:ve*100/Ie,scrollFrom:Te/(Ie-ve),total:fe,visible:!0});return{horizontalScrollbar:Ee,verticalScrollbar:xe}},ae=()=>{var Q;const[J,le]=e.unref(B),[fe,pe]=e.unref(T),{data:_e,totalColumn:ve,totalRow:we,useIsScrolling:Ie,itemKey:Ne}=g,Te=[];if(we>0&&ve>0)for(let Ee=fe;Ee<=pe;Ee++)for(let xe=J;xe<=le;xe++){const Ae=Ne({columnIndex:xe,data:_e,rowIndex:Ee});Te.push(e.h(e.Fragment,{key:Ae},(Q=k.default)==null?void 0:Q.call(k,{columnIndex:xe,data:_e,isScrolling:Ie?e.unref(S).isScrolling:void 0,style:Z(Ee,xe),rowIndex:Ee})))}return Te},de=()=>{const Q=e.resolveDynamicComponent(g.innerElement),J=ae();return[e.h(Q,{style:e.unref(F),ref:$},a.isString(Q)?J:{default:()=>J})]};return()=>{const Q=e.resolveDynamicComponent(g.containerElement),{horizontalScrollbar:J,verticalScrollbar:le}=ee(),fe=de();return e.h("div",{key:0,class:y.e("wrapper"),role:g.role},[e.h(Q,{class:g.className,style:e.unref(X),onScroll:H,ref:b},a.isString(Q)?fe:{default:()=>fe}),J,le])}}}),so="ElFixedSizeGrid",Za=Uo({name:"ElFixedSizeGrid",getColumnPosition:({columnWidth:t},n)=>[t,n*t],getRowPosition:({rowHeight:t},n)=>[t,n*t],getEstimatedTotalHeight:({totalRow:t,rowHeight:n})=>n*t,getEstimatedTotalWidth:({totalColumn:t,columnWidth:n})=>n*t,getColumnOffset:({totalColumn:t,columnWidth:n,width:l},o,r,i,s,d)=>{l=Number(l);const c=Math.max(0,t*n-l),u=Math.min(c,o*n),f=Math.max(0,o*n-l+d+n);switch(r==="smart"&&(i>=f-l&&i<=u+l?r=V.AUTO_ALIGNMENT:r=V.CENTERED_ALIGNMENT),r){case V.START_ALIGNMENT:return u;case V.END_ALIGNMENT:return f;case V.CENTERED_ALIGNMENT:{const m=Math.round(f+(u-f)/2);return m<Math.ceil(l/2)?0:m>c+Math.floor(l/2)?c:m}case V.AUTO_ALIGNMENT:default:return i>=f&&i<=u?i:f>u||i<f?f:u}},getRowOffset:({rowHeight:t,height:n,totalRow:l},o,r,i,s,d)=>{n=Number(n);const c=Math.max(0,l*t-n),u=Math.min(c,o*t),f=Math.max(0,o*t-n+d+t);switch(r===V.SMART_ALIGNMENT&&(i>=f-n&&i<=u+n?r=V.AUTO_ALIGNMENT:r=V.CENTERED_ALIGNMENT),r){case V.START_ALIGNMENT:return u;case V.END_ALIGNMENT:return f;case V.CENTERED_ALIGNMENT:{const m=Math.round(f+(u-f)/2);return m<Math.ceil(n/2)?0:m>c+Math.floor(n/2)?c:m}case V.AUTO_ALIGNMENT:default:return i>=f&&i<=u?i:f>u||i<f?f:u}},getColumnStartIndexForOffset:({columnWidth:t,totalColumn:n},l)=>Math.max(0,Math.min(n-1,Math.floor(l/t))),getColumnStopIndexForStartIndex:({columnWidth:t,totalColumn:n,width:l},o,r)=>{const i=o*t,s=Math.ceil((l+r-i)/t);return Math.max(0,Math.min(n-1,o+s-1))},getRowStartIndexForOffset:({rowHeight:t,totalRow:n},l)=>Math.max(0,Math.min(n-1,Math.floor(l/t))),getRowStopIndexForStartIndex:({rowHeight:t,totalRow:n,height:l},o,r)=>{const i=o*t,s=Math.ceil((l+r-i)/t);return Math.max(0,Math.min(n-1,o+s-1))},initCache:()=>{},clearCache:!0,validateProps:({columnWidth:t,rowHeight:n})=>{process.env.NODE_ENV!=="production"&&(a.isNumber(t)||a.throwError(so,`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ct=require("./index-CXnSdJdR.cjs"),$t=require("./components-ERGTKcUy.cjs"),V=require("./index-9HSiqJZB.cjs"),Ma=require("./bcIcon.vue_vue_type_script_setup_true_name_bcIcon_lang-B4FHqtSa.cjs"),e=require("vue"),a=require("./bcVisual.vue_vue_type_style_index_0_scoped_cae31cec_lang-BDGsoXRz.cjs"),rt=require("./index-CTCZcL1I.cjs");typeof String.prototype.removeHTMLTag>"u"&&(String.prototype.removeHTMLTag=function(){return this.replace(/<.+?>([^<>]+?)<.+?>/g,"$1")});(function(t,n){n(t),typeof define=="function"&&define.amd?define([],n):typeof module<"u"&&module.exports?module.exports=n():t.ws=n()})(window,function(t,n){if(!("WebSocket"in window))return;var l,o=document.createElement("div"),r={automaticOpen:!0,reconnectDecay:1.5,host:"127.0.0.1",port:54321,protocol:"ws"},i=function(u){switch(u.type){case"connecting":console.log("Connecting to cfprint.",u);break;case"open":console.log("Connected to cfprint.",u);break;case"close":console.log("Disconnected from cfprint.",u);break;case"message":console.log("Got a message from cfprint: "+u.data,u);break;case"error":console.log("A error occured: "+u.data,u);break;default:console.log("EVENT: ",u)}},s={CONNECTING:WebSocket.CONNECTING,OPEN:WebSocket.OPEN,CLOSING:WebSocket.CLOSING,CLOSED:WebSocket.CLOSED};function d(u,f,m){var h=this;this.ver="1.3.8.1",m||(m={});for(var p in r)typeof m[p]<"u"?this[p]=m[p]:this[p]=r[p];this.host=u||this.host,this.port=f||this.port,this.url=this.getURL(),this.readyState=WebSocket.CONNECTING;for(var _ in s)this[_]=s[_];return o.addEventListener("connecting",function(g){h!==window&&h.onconnecting(g)}),o.addEventListener("open",function(g){h!==window&&h.onopen(g)}),o.addEventListener("message",function(g){h!==window&&h.onmessage(g)}),o.addEventListener("close",function(g){h!==window&&h.onclose(g)}),o.addEventListener("error",function(g){h!==window&&h.onerror(g)}),this.addEventListener=o.addEventListener.bind(o),this.removeEventListener=o.removeEventListener.bind(o),this.dispatchEvent=o.dispatchEvent.bind(o),this.automaticOpen===!0&&this!==window&&this.open(),this}function c(u,f){var m=document.createEvent("CustomEvent");return m.initCustomEvent(u,!1,!1,f),m}return d.prototype.onconnecting=i,d.prototype.onopen=i,d.prototype.onmessage=i,d.prototype.onclose=i,d.prototype.onerror=i,d.prototype.setProtocol=function(u){this.wsocket&&(this.protocol=u)},d.prototype.setPort=function(u){this.wsocket&&(this.port=u)},d.prototype.setHost=function(u){this.wsocket&&(this.host=u)},d.prototype.getURL=function(u){return this.wsocket&&this.wsocket.readyState===this.OPEN?this.wsocket.url:(this.protocol||"ws")+"://"+(this.host||"127.0.0.1")+":"+(this.port||54321)},d.prototype.send=function(u){if(this.wsocket&&this.wsocket.readyState===1){var f="";if(typeof u=="string")f=u;else if(typeof u=="object")f=JSON.stringify(u,null,2);else{var m=c("error",{message:"Invalid data format, only json string or json object is allowed."});o.dispatchEvent(m);return}try{f=btoa(unescape(encodeURIComponent(f))),f="base64:"+f,this.wsocket.send(f)}catch(h){var m=c("error",{message:h.message});h.dispatchEvent(m)}}else{var f=c("error",{message:"Not connected to cfprint server or disconnected."});o.dispatchEvent(f)}},d.prototype.close=function(u,f){typeof u>"u"&&(u=1e3),this.wsocket&&this.wsocket.close(u,f)},d.prototype.open=function(){var u=this;return this.url=this.getURL(),l=new WebSocket(this.url,this.protocol||[]),o.dispatchEvent(c("connecting")),l.onopen=function(f){u.protocol=d.protocol,u.readyState=WebSocket.OPEN;var m=c("open");o.dispatchEvent(m)},l.onclose=function(f){u.readyState=WebSocket.CLOSED;var m=c("connecting");m.code=f.code,m.reason=f.reason,m.wasClean=f.wasClean,o.dispatchEvent(m),o.dispatchEvent(c("close"))},l.onmessage=function(f){var m=c("message");m.data=f.data,o.dispatchEvent(m)},l.onerror=function(f){var m=c("error");o.dispatchEvent(m)},this.wsocket=l,this},d.prototype.state=function(){return this.wsocket?this.wsocket.readyState:WebSocket.CLOSED},d.prototype.log=function(u,f){var m=this.output||"output",h=document.getElementById(m);if(h&&h.appendChild){var p=document.createElement("p");p.style.wordWrap="break-word",p.style.padding="8px",p.style.background="#eee",p.innerHTML="LOG: "+u,h.childNodes.length>0?h.insertBefore(p,h.childNodes[0]):h.appendChild(p)}f?console.log(u,f):console.log(u)},d});const qa=(t,n=0)=>{if(n===0)return t;const l=e.ref(!1);let o=null;const r=()=>{o&&clearTimeout(o),o=setTimeout(()=>{l.value=t.value},n)};return e.onMounted(r),e.watch(()=>t.value,i=>{i?r():l.value=i}),l},Fa=a.buildProps({size:{type:[Number,String],values:a.componentSizes,default:"",validator:t=>a.isNumber(t)},shape:{type:String,values:["circle","square"],default:"circle"},icon:{type:a.iconPropType},src:{type:String,default:""},alt:String,srcSet:String,fit:{type:a.definePropType(String),default:"cover"}}),Aa={error:t=>t instanceof Event},Ua=e.defineComponent({name:"ElAvatar"}),za=e.defineComponent({...Ua,props:Fa,emits:Aa,setup(t,{emit:n}){const l=t,o=a.useNamespace("avatar"),r=e.ref(!1),i=e.computed(()=>{const{size:u,icon:f,shape:m}=l,h=[o.b()];return a.isString(u)&&h.push(o.m(u)),f&&h.push(o.m("icon")),m&&h.push(o.m(m)),h}),s=e.computed(()=>{const{size:u}=l;return a.isNumber(u)?o.cssVarBlock({size:a.addUnit(u)||""}):void 0}),d=e.computed(()=>({objectFit:l.fit}));e.watch(()=>l.src,()=>r.value=!1);function c(u){r.value=!0,n("error",u)}return(u,f)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(e.unref(i)),style:e.normalizeStyle(e.unref(s))},[(u.src||u.srcSet)&&!r.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:u.src,alt:u.alt,srcset:u.srcSet,style:e.normalizeStyle(e.unref(d)),onError:c},null,44,["src","alt","srcset"])):u.icon?(e.openBlock(),e.createBlock(e.unref(a.ElIcon),{key:1},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u.icon)))]),_:1})):e.renderSlot(u.$slots,"default",{key:2})],6))}});var ja=a._export_sfc(za,[["__file","avatar.vue"]]);const Wa=a.withInstall(ja),Ha=a.buildProps({icon:{type:a.iconPropType,default:()=>a.back_default},title:String,content:{type:String,default:""}}),Ya={back:()=>!0},Ga=e.defineComponent({name:"ElPageHeader"}),Ka=e.defineComponent({...Ga,props:Ha,emits:Ya,setup(t,{emit:n}){const l=e.useSlots(),{t:o}=a.useLocale(),r=a.useNamespace("page-header"),i=e.computed(()=>[r.b(),{[r.m("has-breadcrumb")]:!!l.breadcrumb,[r.m("has-extra")]:!!l.extra,[r.is("contentful")]:!!l.default}]);function s(){n("back")}return(d,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(i))},[d.$slots.breadcrumb?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(r).e("breadcrumb"))},[e.renderSlot(d.$slots,"breadcrumb")],2)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(r).e("header"))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(r).e("left"))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(r).e("back")),role:"button",tabindex:"0",onClick:s},[d.icon||d.$slots.icon?(e.openBlock(),e.createElementBlock("div",{key:0,"aria-label":d.title||e.unref(o)("el.pageHeader.title"),class:e.normalizeClass(e.unref(r).e("icon"))},[e.renderSlot(d.$slots,"icon",{},()=>[d.icon?(e.openBlock(),e.createBlock(e.unref(a.ElIcon),{key:0},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d.icon)))]),_:1})):e.createCommentVNode("v-if",!0)])],10,["aria-label"])):e.createCommentVNode("v-if",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(r).e("title"))},[e.renderSlot(d.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(d.title||e.unref(o)("el.pageHeader.title")),1)])],2)],2),e.createVNode(e.unref(V.ElDivider),{direction:"vertical"}),e.createElementVNode("div",{class:e.normalizeClass(e.unref(r).e("content"))},[e.renderSlot(d.$slots,"content",{},()=>[e.createTextVNode(e.toDisplayString(d.content),1)])],2)],2),d.$slots.extra?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(r).e("extra"))},[e.renderSlot(d.$slots,"extra")],2)):e.createCommentVNode("v-if",!0)],2),d.$slots.default?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(r).e("main"))},[e.renderSlot(d.$slots,"default")],2)):e.createCommentVNode("v-if",!0)],2))}});var Qa=a._export_sfc(Ka,[["__file","page-header.vue"]]);const Xa=a.withInstall(Qa),Ja=({atXEndEdge:t,atXStartEdge:n,atYEndEdge:l,atYStartEdge:o},r)=>{let i=null,s=0,d=0;const c=(f,m)=>{const h=f<=0&&n.value||f>=0&&t.value,p=m<=0&&o.value||m>=0&&l.value;return h&&p};return{hasReachedEdge:c,onWheel:f=>{a.cAF(i);let m=f.deltaX,h=f.deltaY;Math.abs(m)>Math.abs(h)?h=0:m=0,f.shiftKey&&h!==0&&(m=h,h=0),!(c(s,d)&&c(s+m,d+h))&&(s+=m,d+=h,f.preventDefault(),i=a.rAF(()=>{r(s,d),s=0,d=0}))}}},Uo=({name:t,clearCache:n,getColumnPosition:l,getColumnStartIndexForOffset:o,getColumnStopIndexForStartIndex:r,getEstimatedTotalHeight:i,getEstimatedTotalWidth:s,getColumnOffset:d,getRowOffset:c,getRowPosition:u,getRowStartIndexForOffset:f,getRowStopIndexForStartIndex:m,initCache:h,injectToInstance:p,validateProps:_})=>e.defineComponent({name:t??"ElVirtualList",props:V.virtualizedGridProps,emits:[V.ITEM_RENDER_EVT,V.SCROLL_EVT],setup(g,{emit:w,expose:v,slots:k}){const y=a.useNamespace("vl");_(g);const D=e.getCurrentInstance(),N=e.ref(h(g,D));p==null||p(D,N);const b=e.ref(),C=e.ref(),P=e.ref(),$=e.ref(null),S=e.ref({isScrolling:!1,scrollLeft:a.isNumber(g.initScrollLeft)?g.initScrollLeft:0,scrollTop:a.isNumber(g.initScrollTop)?g.initScrollTop:0,updateRequested:!1,xAxisScrollDir:V.FORWARD,yAxisScrollDir:V.FORWARD}),x=V.useCache(),E=e.computed(()=>Number.parseInt(`${g.height}`,10)),I=e.computed(()=>Number.parseInt(`${g.width}`,10)),B=e.computed(()=>{const{totalColumn:Q,totalRow:J,columnCache:le}=g,{isScrolling:fe,xAxisScrollDir:pe,scrollLeft:_e}=e.unref(S);if(Q===0||J===0)return[0,0,0,0];const ve=o(g,_e,e.unref(N)),we=r(g,ve,_e,e.unref(N)),Ie=!fe||pe===V.BACKWARD?Math.max(1,le):1,Ne=!fe||pe===V.FORWARD?Math.max(1,le):1;return[Math.max(0,ve-Ie),Math.max(0,Math.min(Q-1,we+Ne)),ve,we]}),T=e.computed(()=>{const{totalColumn:Q,totalRow:J,rowCache:le}=g,{isScrolling:fe,yAxisScrollDir:pe,scrollTop:_e}=e.unref(S);if(Q===0||J===0)return[0,0,0,0];const ve=f(g,_e,e.unref(N)),we=m(g,ve,_e,e.unref(N)),Ie=!fe||pe===V.BACKWARD?Math.max(1,le):1,Ne=!fe||pe===V.FORWARD?Math.max(1,le):1;return[Math.max(0,ve-Ie),Math.max(0,Math.min(J-1,we+Ne)),ve,we]}),q=e.computed(()=>i(g,e.unref(N))),U=e.computed(()=>s(g,e.unref(N))),X=e.computed(()=>{var Q;return[{position:"relative",overflow:"hidden",WebkitOverflowScrolling:"touch",willChange:"transform"},{direction:g.direction,height:a.isNumber(g.height)?`${g.height}px`:g.height,width:a.isNumber(g.width)?`${g.width}px`:g.width},(Q=g.style)!=null?Q:{}]}),F=e.computed(()=>{const Q=`${e.unref(U)}px`;return{height:`${e.unref(q)}px`,pointerEvents:e.unref(S).isScrolling?"none":void 0,width:Q}}),R=()=>{const{totalColumn:Q,totalRow:J}=g;if(Q>0&&J>0){const[we,Ie,Ne,Te]=e.unref(B),[Ee,xe,Ae,Le]=e.unref(T);w(V.ITEM_RENDER_EVT,{columnCacheStart:we,columnCacheEnd:Ie,rowCacheStart:Ee,rowCacheEnd:xe,columnVisibleStart:Ne,columnVisibleEnd:Te,rowVisibleStart:Ae,rowVisibleEnd:Le})}const{scrollLeft:le,scrollTop:fe,updateRequested:pe,xAxisScrollDir:_e,yAxisScrollDir:ve}=e.unref(S);w(V.SCROLL_EVT,{xAxisScrollDir:_e,scrollLeft:le,yAxisScrollDir:ve,scrollTop:fe,updateRequested:pe})},H=Q=>{const{clientHeight:J,clientWidth:le,scrollHeight:fe,scrollLeft:pe,scrollTop:_e,scrollWidth:ve}=Q.currentTarget,we=e.unref(S);if(we.scrollTop===_e&&we.scrollLeft===pe)return;let Ie=pe;if(V.isRTL(g.direction))switch(V.getRTLOffsetType()){case V.RTL_OFFSET_NAG:Ie=-pe;break;case V.RTL_OFFSET_POS_DESC:Ie=ve-le-pe;break}S.value={...we,isScrolling:!0,scrollLeft:Ie,scrollTop:Math.max(0,Math.min(_e,fe-J)),updateRequested:!0,xAxisScrollDir:V.getScrollDir(we.scrollLeft,Ie),yAxisScrollDir:V.getScrollDir(we.scrollTop,_e)},e.nextTick(()=>K()),se(),R()},A=(Q,J)=>{const le=e.unref(E),fe=(q.value-le)/J*Q;z({scrollTop:Math.min(q.value-le,fe)})},Y=(Q,J)=>{const le=e.unref(I),fe=(U.value-le)/J*Q;z({scrollLeft:Math.min(U.value-le,fe)})},{onWheel:O}=Ja({atXStartEdge:e.computed(()=>S.value.scrollLeft<=0),atXEndEdge:e.computed(()=>S.value.scrollLeft>=U.value-e.unref(I)),atYStartEdge:e.computed(()=>S.value.scrollTop<=0),atYEndEdge:e.computed(()=>S.value.scrollTop>=q.value-e.unref(E))},(Q,J)=>{var le,fe,pe,_e;(fe=(le=C.value)==null?void 0:le.onMouseUp)==null||fe.call(le),(_e=(pe=P.value)==null?void 0:pe.onMouseUp)==null||_e.call(pe);const ve=e.unref(I),we=e.unref(E);z({scrollLeft:Math.min(S.value.scrollLeft+Q,U.value-ve),scrollTop:Math.min(S.value.scrollTop+J,q.value-we)})});a.useEventListener(b,"wheel",O,{passive:!1});const z=({scrollLeft:Q=S.value.scrollLeft,scrollTop:J=S.value.scrollTop})=>{Q=Math.max(Q,0),J=Math.max(J,0);const le=e.unref(S);J===le.scrollTop&&Q===le.scrollLeft||(S.value={...le,xAxisScrollDir:V.getScrollDir(le.scrollLeft,Q),yAxisScrollDir:V.getScrollDir(le.scrollTop,J),scrollLeft:Q,scrollTop:J,updateRequested:!0},e.nextTick(()=>K()),se(),R())},j=(Q=0,J=0,le=V.AUTO_ALIGNMENT)=>{const fe=e.unref(S);J=Math.max(0,Math.min(J,g.totalColumn-1)),Q=Math.max(0,Math.min(Q,g.totalRow-1));const pe=a.getScrollBarWidth(y.namespace.value),_e=e.unref(N),ve=i(g,_e),we=s(g,_e);z({scrollLeft:d(g,J,le,fe.scrollLeft,_e,we>g.width?pe:0),scrollTop:c(g,Q,le,fe.scrollTop,_e,ve>g.height?pe:0)})},Z=(Q,J)=>{const{columnWidth:le,direction:fe,rowHeight:pe}=g,_e=x.value(n&&le,n&&pe,n&&fe),ve=`${Q},${J}`;if(a.hasOwn(_e,ve))return _e[ve];{const[,we]=l(g,J,e.unref(N)),Ie=e.unref(N),Ne=V.isRTL(fe),[Te,Ee]=u(g,Q,Ie),[xe]=l(g,J,Ie);return _e[ve]={position:"absolute",left:Ne?void 0:`${we}px`,right:Ne?`${we}px`:void 0,top:`${Ee}px`,height:`${Te}px`,width:`${xe}px`},_e[ve]}},K=()=>{S.value.isScrolling=!1,e.nextTick(()=>{x.value(-1,null,null)})};e.onMounted(()=>{if(!a.isClient)return;const{initScrollLeft:Q,initScrollTop:J}=g,le=e.unref(b);le&&(a.isNumber(Q)&&(le.scrollLeft=Q),a.isNumber(J)&&(le.scrollTop=J)),R()});const se=()=>{const{direction:Q}=g,{scrollLeft:J,scrollTop:le,updateRequested:fe}=e.unref(S),pe=e.unref(b);if(fe&&pe){if(Q===V.RTL)switch(V.getRTLOffsetType()){case V.RTL_OFFSET_NAG:{pe.scrollLeft=-J;break}case V.RTL_OFFSET_POS_ASC:{pe.scrollLeft=J;break}default:{const{clientWidth:_e,scrollWidth:ve}=pe;pe.scrollLeft=ve-_e-J;break}}else pe.scrollLeft=Math.max(0,J);pe.scrollTop=Math.max(0,le)}},{resetAfterColumnIndex:re,resetAfterRowIndex:ce,resetAfter:ye}=D.proxy;v({windowRef:b,innerRef:$,getItemStyleCache:x,scrollTo:z,scrollToItem:j,states:S,resetAfterColumnIndex:re,resetAfterRowIndex:ce,resetAfter:ye});const ee=()=>{const{scrollbarAlwaysOn:Q,scrollbarStartGap:J,scrollbarEndGap:le,totalColumn:fe,totalRow:pe}=g,_e=e.unref(I),ve=e.unref(E),we=e.unref(U),Ie=e.unref(q),{scrollLeft:Ne,scrollTop:Te}=e.unref(S),Ee=e.h(V.ScrollBar,{ref:C,alwaysOn:Q,startGap:J,endGap:le,class:y.e("horizontal"),clientSize:_e,layout:"horizontal",onScroll:Y,ratio:_e*100/we,scrollFrom:Ne/(we-_e),total:pe,visible:!0}),xe=e.h(V.ScrollBar,{ref:P,alwaysOn:Q,startGap:J,endGap:le,class:y.e("vertical"),clientSize:ve,layout:"vertical",onScroll:A,ratio:ve*100/Ie,scrollFrom:Te/(Ie-ve),total:fe,visible:!0});return{horizontalScrollbar:Ee,verticalScrollbar:xe}},ae=()=>{var Q;const[J,le]=e.unref(B),[fe,pe]=e.unref(T),{data:_e,totalColumn:ve,totalRow:we,useIsScrolling:Ie,itemKey:Ne}=g,Te=[];if(we>0&&ve>0)for(let Ee=fe;Ee<=pe;Ee++)for(let xe=J;xe<=le;xe++){const Ae=Ne({columnIndex:xe,data:_e,rowIndex:Ee});Te.push(e.h(e.Fragment,{key:Ae},(Q=k.default)==null?void 0:Q.call(k,{columnIndex:xe,data:_e,isScrolling:Ie?e.unref(S).isScrolling:void 0,style:Z(Ee,xe),rowIndex:Ee})))}return Te},de=()=>{const Q=e.resolveDynamicComponent(g.innerElement),J=ae();return[e.h(Q,{style:e.unref(F),ref:$},a.isString(Q)?J:{default:()=>J})]};return()=>{const Q=e.resolveDynamicComponent(g.containerElement),{horizontalScrollbar:J,verticalScrollbar:le}=ee(),fe=de();return e.h("div",{key:0,class:y.e("wrapper"),role:g.role},[e.h(Q,{class:g.className,style:e.unref(X),onScroll:H,ref:b},a.isString(Q)?fe:{default:()=>fe}),J,le])}}}),so="ElFixedSizeGrid",Za=Uo({name:"ElFixedSizeGrid",getColumnPosition:({columnWidth:t},n)=>[t,n*t],getRowPosition:({rowHeight:t},n)=>[t,n*t],getEstimatedTotalHeight:({totalRow:t,rowHeight:n})=>n*t,getEstimatedTotalWidth:({totalColumn:t,columnWidth:n})=>n*t,getColumnOffset:({totalColumn:t,columnWidth:n,width:l},o,r,i,s,d)=>{l=Number(l);const c=Math.max(0,t*n-l),u=Math.min(c,o*n),f=Math.max(0,o*n-l+d+n);switch(r==="smart"&&(i>=f-l&&i<=u+l?r=V.AUTO_ALIGNMENT:r=V.CENTERED_ALIGNMENT),r){case V.START_ALIGNMENT:return u;case V.END_ALIGNMENT:return f;case V.CENTERED_ALIGNMENT:{const m=Math.round(f+(u-f)/2);return m<Math.ceil(l/2)?0:m>c+Math.floor(l/2)?c:m}case V.AUTO_ALIGNMENT:default:return i>=f&&i<=u?i:f>u||i<f?f:u}},getRowOffset:({rowHeight:t,height:n,totalRow:l},o,r,i,s,d)=>{n=Number(n);const c=Math.max(0,l*t-n),u=Math.min(c,o*t),f=Math.max(0,o*t-n+d+t);switch(r===V.SMART_ALIGNMENT&&(i>=f-n&&i<=u+n?r=V.AUTO_ALIGNMENT:r=V.CENTERED_ALIGNMENT),r){case V.START_ALIGNMENT:return u;case V.END_ALIGNMENT:return f;case V.CENTERED_ALIGNMENT:{const m=Math.round(f+(u-f)/2);return m<Math.ceil(n/2)?0:m>c+Math.floor(n/2)?c:m}case V.AUTO_ALIGNMENT:default:return i>=f&&i<=u?i:f>u||i<f?f:u}},getColumnStartIndexForOffset:({columnWidth:t,totalColumn:n},l)=>Math.max(0,Math.min(n-1,Math.floor(l/t))),getColumnStopIndexForStartIndex:({columnWidth:t,totalColumn:n,width:l},o,r)=>{const i=o*t,s=Math.ceil((l+r-i)/t);return Math.max(0,Math.min(n-1,o+s-1))},getRowStartIndexForOffset:({rowHeight:t,totalRow:n},l)=>Math.max(0,Math.min(n-1,Math.floor(l/t))),getRowStopIndexForStartIndex:({rowHeight:t,totalRow:n,height:l},o,r)=>{const i=o*t,s=Math.ceil((l+r-i)/t);return Math.max(0,Math.min(n-1,o+s-1))},initCache:()=>{},clearCache:!0,validateProps:({columnWidth:t,rowHeight:n})=>{process.env.NODE_ENV!=="production"&&(a.isNumber(t)||a.throwError(so,`
|
|
2
2
|
"columnWidth" must be passed as number,
|
|
3
3
|
instead ${typeof t} was given.
|
|
4
4
|
`),a.isNumber(n)||a.throwError(so,`
|
package/dist/index.mjs
CHANGED
|
@@ -2,8 +2,8 @@ import { c as ci } from "./index-DA842K1J.js";
|
|
|
2
2
|
import { E as pv, a as vv, b as bv, d as yv, e as _v, f as wv, g as Sv, h as Dv } from "./index-DA842K1J.js";
|
|
3
3
|
import { V as fi } from "./components-JyXWdstB.js";
|
|
4
4
|
import { c as xv, b as Iv, d as Ev, a as kv, e as $v } from "./components-JyXWdstB.js";
|
|
5
|
-
import { E as mi, I as ml, S as hl, v as qa, F as xn, u as hi, A as Ta, B as gl, g as In, R as gi, a as pl, b as pi, c as vl, d as bl, i as yl, e as vi, C as Ua, f as Eo, h as ko, j as ls, D as _l, k as bi, l as yi, m as _i, n as wi, o as Si, p as Di, q as Ci } from "./index-
|
|
6
|
-
import { aS as Rv, aT as qv, aU as Vv, aV as Ov, aW as Nv, aX as Lv, aY as Mv, aZ as Av, a_ as Fv, a$ as Pv, b0 as jv, b1 as Bv, b2 as Uv, b3 as zv, b4 as Wv, b5 as Hv, b6 as Kv, c2 as Yv, b7 as Gv, b8 as Xv, b9 as Qv, aQ as Jv, ba as Zv, bb as eb, bc as tb, bd as ab, be as nb, bf as ob, bg as lb, bh as sb, bi as ib, bj as rb, bk as ub, bl as db, bm as cb, bn as fb, bo as mb, r as hb, s as gb, t as pb, w as vb, x as bb, y as yb, z as _b, G as wb, H as Sb, J as Db, K as Cb, L as xb, M as Ib, N as Eb, O as kb, P as $b, Q as Tb, T as Rb, U as qb, V as Vb, W as Ob, X as Nb, Y as Lb, Z as Mb, _ as Ab, $ as Fb, a0 as Pb, a1 as jb, a2 as Bb, a3 as Ub, a4 as zb, a5 as Wb, a6 as Hb, a7 as Kb, a8 as Yb, a9 as Gb, aa as Xb, ab as Qb, ac as Jb, ad as Zb, ah as ey, ae as ty, af as ay, ag as ny, ai as oy, aj as ly, ak as sy, al as iy, am as ry, an as uy, ao as dy, ap as cy, aq as fy, ar as my, as as hy, at as gy, au as py, av as vy, aw as by, ax as yy, ay as _y, az as wy, aC as Sy, aA as Dy, aB as Cy, aD as xy, aE as Iy, aF as Ey, aG as ky, aH as $y, aI as Ty, aJ as Ry, aK as qy, aL as Vy, aM as Oy, aN as Ny, aO as Ly, aP as My, bp as Ay, bq as Fy, br as Py, bs as jy, bt as By, bu as Uy, bv as zy, bw as Wy, bx as Hy, by as Ky, bz as Yy, bA as Gy, bB as Xy, bC as Qy, bD as Jy, bS as Zy, bT as e_, bF as t_, bG as a_, bH as n_, bI as o_, bJ as l_, bK as s_, bL as i_, bM as r_, bN as u_, bO as d_, bP as c_, bQ as f_, bR as m_, bU as h_, bV as g_, bW as p_, bX as v_, bY as b_, bE as y_, bZ as __, c0 as w_, b_ as S_, b$ as D_, c1 as C_, c3 as x_, c4 as I_, c7 as E_, c8 as k_, c5 as $_, c6 as T_, c9 as R_, ca as q_, cb as V_, cc as O_, cd as N_, ce as L_, cf as M_, cg as A_, ch as F_, aR as P_ } from "./index-
|
|
5
|
+
import { E as mi, I as ml, S as hl, v as qa, F as xn, u as hi, A as Ta, B as gl, g as In, R as gi, a as pl, b as pi, c as vl, d as bl, i as yl, e as vi, C as Ua, f as Eo, h as ko, j as ls, D as _l, k as bi, l as yi, m as _i, n as wi, o as Si, p as Di, q as Ci } from "./index-CVxMd2LI.js";
|
|
6
|
+
import { aS as Rv, aT as qv, aU as Vv, aV as Ov, aW as Nv, aX as Lv, aY as Mv, aZ as Av, a_ as Fv, a$ as Pv, b0 as jv, b1 as Bv, b2 as Uv, b3 as zv, b4 as Wv, b5 as Hv, b6 as Kv, c2 as Yv, b7 as Gv, b8 as Xv, b9 as Qv, aQ as Jv, ba as Zv, bb as eb, bc as tb, bd as ab, be as nb, bf as ob, bg as lb, bh as sb, bi as ib, bj as rb, bk as ub, bl as db, bm as cb, bn as fb, bo as mb, r as hb, s as gb, t as pb, w as vb, x as bb, y as yb, z as _b, G as wb, H as Sb, J as Db, K as Cb, L as xb, M as Ib, N as Eb, O as kb, P as $b, Q as Tb, T as Rb, U as qb, V as Vb, W as Ob, X as Nb, Y as Lb, Z as Mb, _ as Ab, $ as Fb, a0 as Pb, a1 as jb, a2 as Bb, a3 as Ub, a4 as zb, a5 as Wb, a6 as Hb, a7 as Kb, a8 as Yb, a9 as Gb, aa as Xb, ab as Qb, ac as Jb, ad as Zb, ah as ey, ae as ty, af as ay, ag as ny, ai as oy, aj as ly, ak as sy, al as iy, am as ry, an as uy, ao as dy, ap as cy, aq as fy, ar as my, as as hy, at as gy, au as py, av as vy, aw as by, ax as yy, ay as _y, az as wy, aC as Sy, aA as Dy, aB as Cy, aD as xy, aE as Iy, aF as Ey, aG as ky, aH as $y, aI as Ty, aJ as Ry, aK as qy, aL as Vy, aM as Oy, aN as Ny, aO as Ly, aP as My, bp as Ay, bq as Fy, br as Py, bs as jy, bt as By, bu as Uy, bv as zy, bw as Wy, bx as Hy, by as Ky, bz as Yy, bA as Gy, bB as Xy, bC as Qy, bD as Jy, bS as Zy, bT as e_, bF as t_, bG as a_, bH as n_, bI as o_, bJ as l_, bK as s_, bL as i_, bM as r_, bN as u_, bO as d_, bP as c_, bQ as f_, bR as m_, bU as h_, bV as g_, bW as p_, bX as v_, bY as b_, bE as y_, bZ as __, c0 as w_, b_ as S_, b$ as D_, c1 as C_, c3 as x_, c4 as I_, c7 as E_, c8 as k_, c5 as $_, c6 as T_, c9 as R_, ca as q_, cb as V_, cc as O_, cd as N_, ce as L_, cf as M_, cg as A_, ch as F_, aR as P_ } from "./index-CVxMd2LI.js";
|
|
7
7
|
import { _ as xi } from "./bcIcon.vue_vue_type_script_setup_true_name_bcIcon_lang-BwEGGUoG.js";
|
|
8
8
|
import { ref as Q, onMounted as vt, watch as at, defineComponent as fe, computed as X, createElementBlock as j, openBlock as I, normalizeStyle as nt, normalizeClass as Ge, unref as m, createBlock as K, renderSlot as _e, withCtx as N, resolveDynamicComponent as Tt, useSlots as Ii, createCommentVNode as le, createElementVNode as P, createVNode as T, createTextVNode as Ie, toDisplayString as Ne, getCurrentInstance as Qa, nextTick as Me, h as la, Fragment as Se, toRef as $o, mergeProps as be, renderList as De, normalizeProps as ct, watchEffect as Ei, isVNode as fa, shallowRef as Ve, onBeforeUnmount as Bt, inject as je, provide as Vt, useAttrs as ao, resolveComponent as U, onBeforeMount as no, resolveDirective as Ja, withDirectives as da, createSlots as _t, guardReactiveProps as yt, onActivated as Ko, onDeactivated as ss, withModifiers as ta, onUnmounted as Da, toRefs as ki, reactive as ma, isRef as Va, createStaticVNode as Yo, toValue as qe, mergeModels as Oa, useModel as Rt, vShow as To, Teleport as is, Transition as $i, shallowReactive as Ti, withAsyncContext as Ri, Suspense as qi, KeepAlive as Vi, triggerRef as Oi, TransitionGroup as Ni } from "vue";
|
|
9
9
|
import { b as Wt, d as He, i as rs, a as ft, c as us, _ as oo, u as Xt, e as Bn, f as un, E as lo, w as Za, g as Li, h as Mi, j as Ai, r as Fi, k as Pi, l as ji, m as Bi, n as Ui, t as Un, o as gn, p as zi, q as Wi, s as Hi, v as aa, P as ga, x as wl, y as Ki, z as Go, A as Yi, B as Gi, C as Xi, D as Qi, F as Ji, G as Zi, H as p, I as Na, J as Ot, K as It, M as er, L as gt, N as Ro, O as qo, Q as Ke, R as Mt, S as bt, T as ia, U as Ka, V as tr, W as Zt, X as Vo, Y as Aa, Z as ds, $ as zn, a0 as cs, a1 as fs, a2 as Oo, a3 as Pe, a4 as wn, a5 as No, a6 as ar, a7 as Xo, a8 as dt, a9 as Ya, aa as Sa, ab as nr, ac as Wn, ad as or, ae as Sl, af as lr, ag as sr, ah as ir, ai as Qo, aj as Jo, ak as ms, al as rr, am as ur, an as en, ao as dr, ap as hs, aq as zt, ar as Fe, as as ra, at as Ga, au as Lo, av as cr, aw as fr, ax as mr, ay as Zo, az as hr, aA as gr, aB as pr, aC as Dl, aD as vr, aE as br, aF as yr, aG as _r, aH as Cl, aI as Mo, aJ as wr, aK as Sr, aL as Dr, aM as Cr, aN as xr, aO as Ir, aP as Er, aQ as Hn, aR as At, aS as On, aT as we, aU as kr, aV as We, aW as $r, aX as Tr, aY as Rr, aZ as qr, a_ as Vr, a$ as En, b0 as ut, b1 as Or, b2 as Nr, b3 as Lr, b4 as Mr, b5 as Ar, b6 as Fr, b7 as gs, b8 as xt, b9 as Pr, ba as jr, bb as Br, bc as Yt, bd as xl, be as on, bf as Ur, bg as Ao, bh as zr, bi as Wr, bj as ps, bk as Kn, bl as Hr, bm as Fa, bn as ba, bo as Kr, bp as Yr, bq as Gr, br as Xr, bs as Qr } from "./bcVisual.vue_vue_type_style_index_0_scoped_cae31cec_lang-DVwBTR_W.js";
|