sunyard-szyy-ui 0.7.6 → 0.7.8

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.
Files changed (45) hide show
  1. package/dist/index.full.js +4 -4
  2. package/dist/index.full.mjs +1485 -1413
  3. package/dist/utils/index.cjs +55 -0
  4. package/dist/utils/index.d.cts +168 -1
  5. package/dist/utils/index.d.ts +168 -1
  6. package/dist/utils/index.js +50 -0
  7. package/es/components/pro-table/index.mjs +1 -1
  8. package/es/hooks/dist/index.mjs +2 -2
  9. package/es/index.mjs +3 -3
  10. package/es/make-installer.mjs +1 -1
  11. package/es/pro-form/src/ProForm.vue.mjs +1 -1
  12. package/es/pro-table/src/ProTable.vue.mjs +1 -1
  13. package/es/pro-table/src/context.d.ts +1 -0
  14. package/es/pro-table/src/context.d.ts.map +1 -1
  15. package/es/pro-table/src/hooks/use-pro-table.d.ts.map +1 -1
  16. package/es/pro-table/src/hooks/use-pro-table.mjs +1 -1
  17. package/es/pro-table/src/pro-table.d.ts +2 -0
  18. package/es/pro-table/src/pro-table.d.ts.map +1 -1
  19. package/es/pro-table/src/pro-table.mjs +1 -1
  20. package/es/pro-table/src/shared/ProTableTable.vue.mjs +1 -1
  21. package/es/pro-table/src/types.d.ts +19 -7
  22. package/es/pro-table/src/types.d.ts.map +1 -1
  23. package/es/pro-table/src/variants/classic/ClassicLayout.vue.mjs +1 -1
  24. package/es/pro-table/src/variants/unify/UnifyLayout.vue.mjs +1 -1
  25. package/es/utils/dist/index.mjs +4 -4
  26. package/es/version.d.ts +1 -1
  27. package/es/version.mjs +2 -2
  28. package/lib/components/pro-table/index.js +1 -1
  29. package/lib/hooks/dist/index.js +2 -2
  30. package/lib/index.js +2 -2
  31. package/lib/make-installer.js +1 -1
  32. package/lib/pro-form/src/ProForm.vue.js +1 -1
  33. package/lib/pro-table/src/ProTable.vue.js +1 -1
  34. package/lib/pro-table/src/context.d.ts +1 -0
  35. package/lib/pro-table/src/hooks/use-pro-table.js +1 -1
  36. package/lib/pro-table/src/pro-table.d.ts +2 -0
  37. package/lib/pro-table/src/pro-table.js +1 -1
  38. package/lib/pro-table/src/shared/ProTableTable.vue.js +1 -1
  39. package/lib/pro-table/src/types.d.ts +19 -7
  40. package/lib/pro-table/src/variants/classic/ClassicLayout.vue.js +1 -1
  41. package/lib/pro-table/src/variants/unify/UnifyLayout.vue.js +1 -1
  42. package/lib/utils/dist/index.js +4 -4
  43. package/lib/version.d.ts +1 -1
  44. package/lib/version.js +2 -2
  45. package/package.json +4 -4
@@ -1,7 +1,7 @@
1
- (function(p,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue"),require("@sunyard-szyy-ui/hooks"),require("@sunyard-szyy-ui/utils"),require("@sunyard-szyy-ui/adapter"),require("@element-plus/icons-vue"),require("sortablejs")):typeof define=="function"&&define.amd?define(["exports","vue","@sunyard-szyy-ui/hooks","@sunyard-szyy-ui/utils","@sunyard-szyy-ui/adapter","@element-plus/icons-vue","sortablejs"],e):(p=typeof globalThis!="undefined"?globalThis:p||self,e(p.SunyardSzyyUI={},p.Vue,p.hooks,p.utils,p.adapter,p.iconsVue,p.Sortable))})(this,function(p,e,h,S,d,G,Ae){"use strict";var hs=Object.defineProperty,ys=Object.defineProperties;var Ss=Object.getOwnPropertyDescriptors;var gt=Object.getOwnPropertySymbols;var gs=Object.prototype.hasOwnProperty,Cs=Object.prototype.propertyIsEnumerable;var Ct=(p,e,h)=>e in p?hs(p,e,{enumerable:!0,configurable:!0,writable:!0,value:h}):p[e]=h,B=(p,e)=>{for(var h in e||(e={}))gs.call(e,h)&&Ct(p,h,e[h]);if(gt)for(var h of gt(e))Cs.call(e,h)&&Ct(p,h,e[h]);return p},O=(p,e)=>ys(p,Ss(e));var we=(p,e,h)=>new Promise((S,d)=>{var G=J=>{try{re(h.next(J))}catch(ae){d(ae)}},Ae=J=>{try{re(h.throw(J))}catch(ae){d(ae)}},re=J=>J.done?S(J.value):Promise.resolve(J.value).then(G,Ae);re((h=h.apply(p,e)).next())});/*!
2
- * sunyard-szyy-ui v0.7.6
1
+ (function(p,m){typeof exports=="object"&&typeof module!="undefined"?m(exports,require("@sunyard-szyy-ui/utils"),require("vue"),require("@sunyard-szyy-ui/hooks"),require("@sunyard-szyy-ui/adapter"),require("@element-plus/icons-vue"),require("sortablejs")):typeof define=="function"&&define.amd?define(["exports","@sunyard-szyy-ui/utils","vue","@sunyard-szyy-ui/hooks","@sunyard-szyy-ui/adapter","@element-plus/icons-vue","sortablejs"],m):(p=typeof globalThis!="undefined"?globalThis:p||self,m(p.SunyardSzyyUI={},p.utils,p.Vue,p.hooks,p.adapter,p.iconsVue,p.Sortable))})(this,function(p,m,e,y,d,X,Ie){"use strict";var Ns=Object.defineProperty,Ps=Object.defineProperties;var xs=Object.getOwnPropertyDescriptors;var Bt=Object.getOwnPropertySymbols;var Bs=Object.prototype.hasOwnProperty,Vs=Object.prototype.propertyIsEnumerable;var Vt=(p,m,e)=>m in p?Ns(p,m,{enumerable:!0,configurable:!0,writable:!0,value:e}):p[m]=e,B=(p,m)=>{for(var e in m||(m={}))Bs.call(m,e)&&Vt(p,e,m[e]);if(Bt)for(var e of Bt(m))Vs.call(m,e)&&Vt(p,e,m[e]);return p},U=(p,m)=>Ps(p,xs(m));var Te=(p,m,e)=>new Promise((y,d)=>{var X=oe=>{try{fe(e.next(oe))}catch(ue){d(ue)}},Ie=oe=>{try{fe(e.throw(oe))}catch(ue){d(ue)}},fe=oe=>oe.done?y(oe.value):Promise.resolve(oe.value).then(X,Ie);fe((e=e.apply(p,m)).next())});/*!
2
+ * sunyard-szyy-ui v0.7.8
3
3
  * (c) 2026 Sunyard SZYY Base Team
4
- */const re=e.defineComponent({name:"SyAutocomplete",inheritAttrs:!1,setup(o,{expose:s}){const r=h.useNamespace("autocomplete"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)},close:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.close)==null?void 0:t.call(n)},highlight:n=>{var t,a;return(a=(t=l.value)==null?void 0:t.highlight)==null?void 0:a.call(t,n)},handleKeyEnter:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.handleKeyEnter)==null?void 0:t.call(n)},handleSelect:n=>{var t,a;return(a=(t=l.value)==null?void 0:t.handleSelect)==null?void 0:a.call(t,n)}}),()=>e.h(d.AdapterAutocomplete,e.mergeProps({ref:l,class:r.b()},c),i)}}),J=S.withInstall(re),ae=e.defineComponent({name:"SyAlert",inheritAttrs:!1,setup(){const o=h.useNamespace("alert"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterAlert,e.mergeProps({class:o.b()},s),r)}}),bt=S.withInstall(ae),wt=e.defineComponent({name:"SyBacktop",inheritAttrs:!1,setup(){const o=h.useNamespace("backtop"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterBacktop,e.mergeProps({class:o.b()},s),r)}}),At=S.withInstall(wt),kt=e.defineComponent({name:"SyButton",inheritAttrs:!1,setup(o,{expose:s}){const r=h.useNamespace("button"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)}}),()=>e.h(d.AdapterButton,e.mergeProps({ref:l,class:r.b()},c),i)}}),U=S.withInstall(kt),Nt=e.defineComponent({name:"SyCard",inheritAttrs:!1,setup(){const o=h.useNamespace("card"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterCard,e.mergeProps({class:o.b()},s),r)}}),Pt=S.withInstall(Nt),Bt=e.defineComponent({name:"SyCascader",inheritAttrs:!1,setup(){const o=h.useNamespace("cascader"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterCascader,e.mergeProps({class:o.b()},s),r)}}),Re=S.withInstall(Bt),xt=e.defineComponent({name:"SyCheckbox",inheritAttrs:!1,setup(){const o=h.useNamespace("checkbox"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterCheckbox,e.mergeProps({class:o.b()},s),r)}}),Vt=e.defineComponent({name:"SyCheckboxGroup",inheritAttrs:!1,setup(){const o=h.useNamespace("checkbox-group"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterCheckboxGroup,e.mergeProps({class:o.b()},s),r)}}),_e=S.withInstall(xt),$e=S.withInstall(Vt),Tt=e.defineComponent({name:"SyCheckboxButton",inheritAttrs:!1,setup(){const o=h.useNamespace("checkbox-button"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterCheckboxButton,e.mergeProps({class:o.b()},s),r)}}),It=S.withInstall(Tt),Rt=e.defineComponent({name:"SyColorPicker",inheritAttrs:!1,setup(o,{expose:s}){const r=h.useNamespace("color-picker"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({show:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.show)==null?void 0:t.call(n)},hide:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.hide)==null?void 0:t.call(n)},focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)}}),()=>e.h(d.AdapterColorPicker,e.mergeProps({ref:l,class:r.b()},c),i)}}),_t=S.withInstall(Rt),$t=e.defineComponent({name:"SyCollapse",inheritAttrs:!1,setup(){const o=h.useNamespace("collapse"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterCollapse,e.mergeProps({class:o.b()},s),r)}}),Dt=e.defineComponent({name:"SyCollapseItem",inheritAttrs:!1,setup(){const o=h.useNamespace("collapse-item"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterCollapseItem,e.mergeProps({class:o.b()},s),r)}}),Mt=S.withInstall($t),Et=S.withInstall(Dt),Lt=new Set(["SyHeader","SyFooter","ElHeader","ElFooter"]);function Ft(o){return o.some(s=>{var c;const r=(c=s.type)==null?void 0:c.name;return!!r&&Lt.has(r)})}const zt=e.defineComponent({name:"SyContainer",inheritAttrs:!1,setup(){const o=h.useNamespace("container"),s=e.useAttrs(),r=e.useSlots();return()=>{const c={class:o.b()};if(!("direction"in s)&&r.default){const i=r.default();Ft(i)&&(c.direction="vertical")}return e.h(d.AdapterContainer,e.mergeProps(c,s),r)}}}),Ot=e.defineComponent({name:"SyHeader",inheritAttrs:!1,setup(){const o=h.useNamespace("header"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterHeader,e.mergeProps({class:o.b()},s),r)}}),qt=e.defineComponent({name:"SyAside",inheritAttrs:!1,setup(){const o=h.useNamespace("aside"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterAside,e.mergeProps({class:o.b()},s),r)}}),Ht=e.defineComponent({name:"SyMain",inheritAttrs:!1,setup(){const o=h.useNamespace("main"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterMain,e.mergeProps({class:o.b()},s),r)}}),jt=e.defineComponent({name:"SyFooter",inheritAttrs:!1,setup(){const o=h.useNamespace("footer"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterFooter,e.mergeProps({class:o.b()},s),r)}}),Ut=S.withInstall(zt),Kt=S.withInstall(Ot),Gt=S.withInstall(qt),Wt=S.withInstall(Ht),Qt=S.withInstall(jt),Yt=e.defineComponent({name:"SyConfigProvider",inheritAttrs:!1,setup(o,{expose:s}){const r=e.useAttrs(),c=e.useSlots(),i=e.ref();return s({}),()=>e.h(d.AdapterConfigProvider,e.mergeProps({ref:i},r),c)}}),Jt=S.withInstall(Yt),Zt=e.defineComponent({name:"SyDatePicker",inheritAttrs:!1,setup(o,{expose:s}){const r=h.useNamespace("date-picker"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)},handleOpen:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.handleOpen)==null?void 0:t.call(n)},handleClose:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.handleClose)==null?void 0:t.call(n)}}),()=>e.h(d.AdapterDatePicker,e.mergeProps({ref:l,class:r.b()},c),i)}}),De=S.withInstall(Zt),Xt=e.defineComponent({name:"SyDateTimePicker",inheritAttrs:!1,setup(o,{expose:s}){const r=h.useNamespace("date-time-picker"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)},handleOpen:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.handleOpen)==null?void 0:t.call(n)},handleClose:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.handleClose)==null?void 0:t.call(n)}}),()=>e.h(d.AdapterDatePicker,e.mergeProps({ref:l,class:r.b(),type:"datetime"},c),i)}}),vt=S.withInstall(Xt),en=e.defineComponent({name:"SyDescriptions",inheritAttrs:!1,setup(){const o=h.useNamespace("descriptions"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterDescriptions,e.mergeProps({class:o.b()},s),r)}}),tn=e.defineComponent({name:"ElDescriptionsItem",inheritAttrs:!1,setup(){const o=h.useNamespace("descriptions-item"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterDescriptionsItem,e.mergeProps({class:o.b()},s),r)}}),nn=S.withInstall(en),on=S.withInstall(tn,"SyDescriptionsItem"),sn=e.defineComponent({name:"SyDialog",inheritAttrs:!1,setup(){const o=h.useNamespace("dialog"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterDialog,e.mergeProps({class:o.b()},s),r)}}),rn=S.withInstall(sn),an=e.defineComponent({name:"SyDivider",inheritAttrs:!1,setup(){const o=h.useNamespace("divider"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterDivider,e.mergeProps({class:o.b()},s),r)}}),ln=S.withInstall(an),cn=e.defineComponent({name:"SyDrawer",inheritAttrs:!1,setup(){const o=h.useNamespace("drawer"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterDrawer,e.mergeProps({class:o.b()},s),r)}}),Me=S.withInstall(cn),dn=e.defineComponent({name:"SyDropdown",inheritAttrs:!1,setup(){const o=h.useNamespace("dropdown"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterDropdown,e.mergeProps({class:o.b()},s),r)}}),pn=e.defineComponent({name:"SyDropdownMenu",inheritAttrs:!1,setup(){const o=h.useNamespace("dropdown-menu"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterDropdownMenu,e.mergeProps({class:o.b()},s),r)}}),mn=e.defineComponent({name:"SyDropdownItem",inheritAttrs:!1,setup(){const o=h.useNamespace("dropdown-item"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterDropdownItem,e.mergeProps({class:o.b()},s),r)}}),fn=S.withInstall(dn),un=S.withInstall(pn),hn=S.withInstall(mn),yn=e.defineComponent({name:"SyEmpty",inheritAttrs:!1,setup(){const o=h.useNamespace("empty"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterEmpty,e.mergeProps({class:o.b()},s),r)}}),Ee=S.withInstall(yn),Sn=e.defineComponent({name:"SyForm",inheritAttrs:!1,setup(o,{expose:s}){const r=h.useNamespace("form"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({validate:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.validate)==null?void 0:a.call(t,...n)},validateField:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.validateField)==null?void 0:a.call(t,...n)},resetFields:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.resetFields)==null?void 0:a.call(t,...n)},scrollToField:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.scrollToField)==null?void 0:a.call(t,...n)},clearValidate:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.clearValidate)==null?void 0:a.call(t,...n)}}),()=>e.h(d.AdapterForm,e.mergeProps({ref:l,class:r.b()},c),i)}}),gn=e.defineComponent({name:"SyFormItem",inheritAttrs:!1,setup(o,{expose:s}){const r=h.useNamespace("form-item"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({resetField:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.resetField)==null?void 0:t.call(n)},clearValidate:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.clearValidate)==null?void 0:t.call(n)}}),()=>e.h(d.AdapterFormItem,e.mergeProps({ref:l,class:r.b()},c),i)}}),Le=S.withInstall(Sn),Fe=S.withInstall(gn),Cn=e.defineComponent({name:"SyIcon",inheritAttrs:!1,setup(){const o=e.useAttrs(),s=e.useSlots();return()=>e.h(d.AdapterIcon,e.mergeProps(o),s)}}),le=S.withInstall(Cn),bn=e.defineComponent({name:"SyImage",inheritAttrs:!1,setup(o,{expose:s}){const r=h.useNamespace("image"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({showPreview:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.showPreview)==null?void 0:t.call(n)}}),()=>e.h(d.AdapterImage,e.mergeProps({ref:l,class:r.b()},c),i)}}),wn=S.withInstall(bn),An=e.defineComponent({name:"SyInput",inheritAttrs:!1,setup(o,{expose:s}){const r=h.useNamespace("input"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)},clear:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.clear)==null?void 0:t.call(n)},select:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.select)==null?void 0:t.call(n)},resizeTextarea:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.resizeTextarea)==null?void 0:t.call(n)}}),()=>e.h(d.AdapterInput,e.mergeProps({ref:l,class:r.b()},c),i)}}),ke=S.withInstall(An),kn=e.defineComponent({name:"SyInputNumber",inheritAttrs:!1,setup(o,{expose:s}){const r=h.useNamespace("input-number"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)}}),()=>e.h(d.AdapterInputNumber,e.mergeProps({ref:l,class:r.b()},c),i)}}),ze=S.withInstall(kn),Nn=e.defineComponent({name:"SyRow",inheritAttrs:!1,setup(){const o=h.useNamespace("row"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterRow,e.mergeProps({class:o.b()},s),r)}}),Pn=e.defineComponent({name:"SyCol",inheritAttrs:!1,setup(){const o=h.useNamespace("col"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterCol,e.mergeProps({class:o.b()},s),r)}}),Bn=S.withInstall(Nn),xn=S.withInstall(Pn),Vn=e.defineComponent({name:"SyLink",inheritAttrs:!1,setup(){const o=h.useNamespace("link"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterLink,e.mergeProps({class:o.b()},s),r)}}),Tn=S.withInstall(Vn),Z="sy-loading",Ne="element-loading-custom-class";function In(o){return o!==null&&typeof o=="object"&&!Array.isArray(o)}function Rn(o){if(o==null||o==="")return Z;const s=String(e.unref(o));return s.includes(Z)?s:`${Z} ${s}`}function _n(o){if(o===void 0)return{customClass:Z};const s=B({},o),r=s.customClass;return r===void 0?s.customClass=Z:typeof r=="string"&&(s.customClass=`${Z} ${r}`),s}function Oe(o,s){if(!s.value)return s;if(In(s.value))return O(B({},s),{value:O(B({},s.value),{customClass:Rn(s.value.customClass)})});const r=o.getAttribute(Ne);return r?r.includes(Z)||o.setAttribute(Ne,`${Z} ${r}`):o.setAttribute(Ne,Z),s}const W=d.AdapterLoadingDirective,ue=(o,s)=>d.AdapterLoading.service(_n(o),s);Object.defineProperty(ue,"_context",{get(){return d.AdapterLoading.service._context},set(o){d.AdapterLoading.service._context=o}});const he={mounted(o,s,r,c){var i;(i=W.mounted)==null||i.call(W,o,Oe(o,s),r,c)},updated(o,s,r,c){var i;(i=W.updated)==null||i.call(W,o,Oe(o,s),r,c)},unmounted(o,s,r,c){var i;(i=W.unmounted)==null||i.call(W,o,s,r,c)},get _context(){return W._context},set _context(o){W._context=o}},$n={install(o){ue._context=o._context,he._context=o._context,o.directive("loading",he),o.config.globalProperties.$loading=ue},directive:he,service:ue},Dn=e.defineComponent({name:"SyMenu",inheritAttrs:!1,setup(){const o=h.useNamespace("menu"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterMenu,e.mergeProps({class:o.b()},s),r)}}),Mn=e.defineComponent({name:"SySubMenu",inheritAttrs:!1,setup(){const o=h.useNamespace("sub-menu"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterSubMenu,e.mergeProps({class:o.b()},s),r)}}),En=e.defineComponent({name:"SyMenuItem",inheritAttrs:!1,setup(){const o=h.useNamespace("menu-item"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterMenuItem,e.mergeProps({class:o.b()},s),r)}}),Ln=e.defineComponent({name:"SyMenuItemGroup",inheritAttrs:!1,setup(){const o=h.useNamespace("menu-item-group"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterMenuItemGroup,e.mergeProps({class:o.b()},s),r)}}),Fn=S.withInstall(Dn),zn=S.withInstall(Mn),On=S.withInstall(En),qn=S.withInstall(Ln),ye="sy-message";function ce(o){if(o===void 0)return{customClass:ye};if(typeof o!="object"||o.__v_isVNode===!0)return{message:o,customClass:ye};const s=o;return O(B({},s),{customClass:s.customClass?`${ye} ${s.customClass}`:ye})}const Pe=(o,s)=>d.AdapterMessage(ce(o),s);Pe.closeAll=o=>d.AdapterMessage.closeAll(o),Pe.closeAllByPlacement=o=>d.AdapterMessage.closeAllByPlacement(o);const ne=Pe;ne.success=(o,s)=>d.AdapterMessage.success(ce(o),s),ne.warning=(o,s)=>d.AdapterMessage.warning(ce(o),s),ne.info=(o,s)=>d.AdapterMessage.info(ce(o),s),ne.error=(o,s)=>d.AdapterMessage.error(ce(o),s),Object.defineProperty(ne,"_context",{get(){return d.AdapterMessage._context},set(o){d.AdapterMessage._context=o}});const Be="sy-message-box";function Se(o){return o?O(B({},o),{customClass:o.customClass?`${Be} ${o.customClass}`:Be}):{customClass:Be}}const ie=(o,s)=>d.AdapterMessageBox(Se(o),s);ie.alert=(...o)=>{const[s,r,c,i]=o;return d.AdapterMessageBox.alert(s,r,Se(c),i)},ie.confirm=(...o)=>{const[s,r,c,i]=o;return d.AdapterMessageBox.confirm(s,r,Se(c),i)},ie.prompt=(...o)=>{const[s,r,c,i]=o;return d.AdapterMessageBox.prompt(s,r,Se(c),i)},ie.close=()=>d.AdapterMessageBox.close();const qe=ie;Object.defineProperty(qe,"_context",{get(){return d.AdapterMessageBox._context},set(o){d.AdapterMessageBox._context=o}});const ge="sy-notification";function de(o){if(o===void 0)return{customClass:ge};if(typeof o!="object"||o.__v_isVNode===!0)return{message:o,customClass:ge};const s=o;return O(B({},s),{customClass:s.customClass?`${ge} ${s.customClass}`:ge})}const oe=(o,s)=>d.AdapterNotification(de(o),s);oe.success=(o,s)=>d.AdapterNotification.success(de(o),s),oe.warning=(o,s)=>d.AdapterNotification.warning(de(o),s),oe.info=(o,s)=>d.AdapterNotification.info(de(o),s),oe.error=(o,s)=>d.AdapterNotification.error(de(o),s),oe.closeAll=()=>d.AdapterNotification.closeAll();const He=oe;Object.defineProperty(He,"_context",{get(){return d.AdapterNotification._context},set(o){d.AdapterNotification._context=o}});const Hn=e.defineComponent({name:"SyPagination",inheritAttrs:!1,setup(){const o=h.useNamespace("pagination"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterPagination,e.mergeProps({class:o.b()},s),r)}}),je=S.withInstall(Hn),jn=e.defineComponent({name:"SyPopconfirm",inheritAttrs:!1,setup(){const o=h.useNamespace("popconfirm"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterPopconfirm,e.mergeProps({class:o.b()},s),r)}}),Un=S.withInstall(jn);function Kn(o,s){var n;const r=B({},o),c=r.class,i=(n=r.popperClass)!=null?n:r["popper-class"];delete r.class,delete r.popperClass,delete r["popper-class"];const l=[s,i,c].flat(10).filter(t=>typeof t=="string"&&t.length>0);return{rest:r,popperClass:l.length?l:[s]}}const Gn=e.defineComponent({name:"SyPopover",inheritAttrs:!1,setup(){const o=h.useNamespace("popover"),s=e.useAttrs(),r=e.useSlots();return()=>{const{rest:c,popperClass:i}=Kn(s,o.b());return e.h(d.AdapterPopover,e.mergeProps(c,{popperClass:i}),r)}}}),Wn=S.withInstall(Gn),Qn=e.defineComponent({name:"SyProgress",inheritAttrs:!1,setup(){const o=h.useNamespace("progress"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterProgress,e.mergeProps({class:o.b()},s),r)}}),Yn=S.withInstall(Qn),Jn=e.defineComponent({name:"SyRadio",inheritAttrs:!1,setup(){const o=h.useNamespace("radio"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterRadio,e.mergeProps({class:o.b()},s),r)}}),Zn=e.defineComponent({name:"SyRadioGroup",inheritAttrs:!1,setup(){const o=h.useNamespace("radio-group"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterRadioGroup,e.mergeProps({class:o.b()},s),r)}}),xe=S.withInstall(Jn),Ue=S.withInstall(Zn),Xn=e.defineComponent({name:"SyRadioButton",inheritAttrs:!1,setup(){const o=h.useNamespace("radio-button"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterRadioButton,e.mergeProps({class:o.b()},s),r)}}),Ke=S.withInstall(Xn),vn=e.defineComponent({name:"SyScrollbar",inheritAttrs:!1,setup(o,{expose:s}){const r=h.useNamespace("scrollbar"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({handleScroll:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.handleScroll)==null?void 0:t.call(n)},scrollTo:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.scrollTo)==null?void 0:a.call(t,...n)},setScrollTop:n=>{var t,a;return(a=(t=l.value)==null?void 0:t.setScrollTop)==null?void 0:a.call(t,n)},setScrollLeft:n=>{var t,a;return(a=(t=l.value)==null?void 0:t.setScrollLeft)==null?void 0:a.call(t,n)},update:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.update)==null?void 0:t.call(n)},wrapRef:()=>{var n;return(n=l.value)==null?void 0:n.wrapRef}}),()=>e.h(d.AdapterScrollbar,e.mergeProps({ref:l,class:r.b()},c),i)}}),eo=S.withInstall(vn),to=e.defineComponent({name:"SySelect",inheritAttrs:!1,setup(o,{expose:s}){const r=h.useNamespace("select"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)}}),()=>e.h(d.AdapterSelect,e.mergeProps({ref:l,class:r.b()},c),i)}}),no=e.defineComponent({name:"SyOption",inheritAttrs:!1,setup(){const o=h.useNamespace("option"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterOption,e.mergeProps({class:o.b()},s),r)}}),Ge=S.withInstall(to),We=S.withInstall(no),oo=d.AdapterSelectV2,so=e.defineComponent({name:"SySelectV2",inheritAttrs:!1,setup(o,{expose:s}){const r=h.useNamespace("select-v2"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)},scrollTo:n=>{var t,a;return(a=(t=l.value)==null?void 0:t.scrollTo)==null?void 0:a.call(t,n)},toggleMenu:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.toggleMenu)==null?void 0:t.call(n)}}),()=>e.h(oo,e.mergeProps({ref:l,class:r.b()},c),i)}}),ro=S.withInstall(so),ao=e.defineComponent({name:"SySkeleton",inheritAttrs:!1,setup(o,{expose:s}){const r=h.useNamespace("skeleton"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({get uiLoading(){var n;return(n=l.value)==null?void 0:n.uiLoading}}),()=>e.h(d.AdapterSkeleton,e.mergeProps({ref:l,class:r.b()},c),i)}}),lo=e.defineComponent({name:"SySkeletonItem",inheritAttrs:!1,setup(){const o=h.useNamespace("skeleton-item"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterSkeletonItem,e.mergeProps({class:o.b()},s),r)}}),co=S.withInstall(ao),io=S.withInstall(lo),po=e.defineComponent({name:"SySlider",inheritAttrs:!1,setup(){const o=h.useNamespace("slider"),s=e.useAttrs(),r=e.useSlots(),c=e.ref();return()=>e.h(d.AdapterSlider,e.mergeProps({ref:c,class:o.b()},s),r)}}),mo=S.withInstall(po),fo=e.defineComponent({name:"SySpace",inheritAttrs:!1,setup(){const o=h.useNamespace("space"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterSpace,e.mergeProps({class:o.b()},s),r)}}),uo=S.withInstall(fo),ho=e.defineComponent({name:"SySteps",inheritAttrs:!1,setup(){const o=h.useNamespace("steps"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterSteps,e.mergeProps({class:o.b()},s),r)}}),yo=e.defineComponent({name:"SyStep",inheritAttrs:!1,setup(){const o=h.useNamespace("step"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterStep,e.mergeProps({class:o.b()},s),r)}}),So=S.withInstall(ho),go=S.withInstall(yo),Co=e.defineComponent({name:"SySwitch",inheritAttrs:!1,setup(o,{expose:s}){const r=h.useNamespace("switch"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)}}),()=>e.h(d.AdapterSwitch,e.mergeProps({ref:l,class:r.b()},c),i)}}),Ce=S.withInstall(Co),bo=e.defineComponent({name:"SyTable",inheritAttrs:!1,setup(o,{expose:s}){const r=h.useNamespace("table"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({clearSelection:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.clearSelection)==null?void 0:t.call(n)},getSelectionRows:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.getSelectionRows)==null?void 0:t.call(n)},toggleRowSelection:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.toggleRowSelection)==null?void 0:a.call(t,...n)},toggleAllSelection:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.toggleAllSelection)==null?void 0:t.call(n)},toggleRowExpansion:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.toggleRowExpansion)==null?void 0:a.call(t,...n)},setCurrentRow:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.setCurrentRow)==null?void 0:a.call(t,...n)},clearSort:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.clearSort)==null?void 0:t.call(n)},clearFilter:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.clearFilter)==null?void 0:a.call(t,...n)},doLayout:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.doLayout)==null?void 0:t.call(n)},sort:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.sort)==null?void 0:a.call(t,...n)},scrollTo:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.scrollTo)==null?void 0:a.call(t,...n)},setScrollTop:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.setScrollTop)==null?void 0:a.call(t,...n)},setScrollLeft:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.setScrollLeft)==null?void 0:a.call(t,...n)}}),()=>e.h(d.AdapterTable,e.mergeProps({ref:l,class:r.b()},c),i)}}),wo=e.defineComponent({name:"SyTableColumn",inheritAttrs:!1,setup(){const o=h.useNamespace("table-column"),s=e.useAttrs(),r=e.useSlots();return()=>{const c=r.default?O(B({},r),{default:(...i)=>{var l;return((l=r.default(...i))!=null?l:[]).map(n=>{var t;return((t=n==null?void 0:n.type)==null?void 0:t.name)==="SyTableColumn"?e.h(d.AdapterTableColumn,n.props,n.children):n})}}):r;return e.h(d.AdapterTableColumn,e.mergeProps({class:o.b()},s),c)}}}),Ve=S.withInstall(bo),Y=S.withInstall(wo),Ao=e.defineComponent({name:"SyTabs",inheritAttrs:!1,setup(o,{expose:s}){const r=h.useNamespace("tabs"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({get currentName(){var n;return(n=l.value)==null?void 0:n.currentName},get tabNavRef(){var n;return(n=l.value)==null?void 0:n.tabNavRef}}),()=>e.h(d.AdapterTabs,e.mergeProps({ref:l,class:r.b()},c),i)}}),ko=e.defineComponent({name:"SyTabPane",inheritAttrs:!1,setup(){const o=h.useNamespace("tab-pane"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterTabPane,e.mergeProps({class:o.b()},s),r)}}),No=S.withInstall(Ao),Po=S.withInstall(ko),Bo=e.defineComponent({name:"SyTag",inheritAttrs:!1,setup(o,{expose:s}){const r=h.useNamespace("tag"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({ref:()=>l.value}),()=>e.h(d.AdapterTag,e.mergeProps({ref:l,class:r.b()},c),i)}}),be=S.withInstall(Bo),xo=e.defineComponent({name:"SyText",inheritAttrs:!1,setup(){const o=h.useNamespace("text"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterText,e.mergeProps({class:o.b()},s),r)}}),Vo=S.withInstall(xo),To=e.defineComponent({name:"SyTimePicker",inheritAttrs:!1,setup(o,{expose:s}){const r=h.useNamespace("time-picker"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)},handleOpen:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.handleOpen)==null?void 0:t.call(n)},handleClose:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.handleClose)==null?void 0:t.call(n)}}),()=>e.h(d.AdapterTimePicker,e.mergeProps({ref:l,class:r.b()},c),i)}}),Qe=S.withInstall(To),Io=e.defineComponent({name:"SyTimeSelect",inheritAttrs:!1,setup(o,{expose:s}){const r=h.useNamespace("time-select"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)}}),()=>e.h(d.AdapterTimeSelect,e.mergeProps({ref:l,class:r.b()},c),i)}}),Ye=S.withInstall(Io);function Ro(o,s){var n;const r=B({},o),c=r.class,i=(n=r.popperClass)!=null?n:r["popper-class"];delete r.class,delete r.popperClass,delete r["popper-class"];const l=[s,i,c].flat(10).filter(t=>typeof t=="string"&&t.length>0);return{rest:r,popperClass:l.length?l:[s]}}const _o=e.defineComponent({name:"SyTooltip",inheritAttrs:!1,setup(){const o=h.useNamespace("tooltip"),s=e.useAttrs(),r=e.useSlots();return()=>{const{rest:c,popperClass:i}=Ro(s,o.b());return e.h(d.AdapterTooltip,e.mergeProps(c,{popperClass:i}),r)}}}),pe=S.withInstall(_o),$o=e.defineComponent({name:"SyTree",inheritAttrs:!1,setup(o,{expose:s}){const r=h.useNamespace("tree"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({filter:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.filter)==null?void 0:a.call(t,...n)},updateKeyChildren:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.updateKeyChildren)==null?void 0:a.call(t,...n)},getCheckedNodes:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.getCheckedNodes)==null?void 0:a.call(t,...n)},getCheckedKeys:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.getCheckedKeys)==null?void 0:a.call(t,...n)},setCheckedNodes:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.setCheckedNodes)==null?void 0:a.call(t,...n)},setCheckedKeys:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.setCheckedKeys)==null?void 0:a.call(t,...n)},setChecked:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.setChecked)==null?void 0:a.call(t,...n)},getHalfCheckedNodes:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.getHalfCheckedNodes)==null?void 0:a.call(t,...n)},getHalfCheckedKeys:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.getHalfCheckedKeys)==null?void 0:a.call(t,...n)},getCurrentKey:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.getCurrentKey)==null?void 0:a.call(t,...n)},getCurrentNode:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.getCurrentNode)==null?void 0:a.call(t,...n)},setCurrentKey:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.setCurrentKey)==null?void 0:a.call(t,...n)},setCurrentNode:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.setCurrentNode)==null?void 0:a.call(t,...n)},getNode:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.getNode)==null?void 0:a.call(t,...n)},remove:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.remove)==null?void 0:a.call(t,...n)},append:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.append)==null?void 0:a.call(t,...n)},insertBefore:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.insertBefore)==null?void 0:a.call(t,...n)},insertAfter:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.insertAfter)==null?void 0:a.call(t,...n)}}),()=>e.h(d.AdapterTree,e.mergeProps({ref:l,class:r.b()},c),i)}}),Do=S.withInstall($o),Mo=e.defineComponent({name:"SyTreeSelect",inheritAttrs:!1,setup(o,{expose:s}){const r=h.useNamespace("tree-select"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)},filter:n=>{var t,a;return(a=(t=l.value)==null?void 0:t.filter)==null?void 0:a.call(t,n)},updateKeyChildren:(n,t)=>{var a,g;return(g=(a=l.value)==null?void 0:a.updateKeyChildren)==null?void 0:g.call(a,n,t)}}),()=>e.h(d.AdapterTreeSelect,e.mergeProps({ref:l,class:r.b()},c),i)}}),Eo=S.withInstall(Mo),Lo=e.defineComponent({name:"SyUpload",inheritAttrs:!1,setup(o,{expose:s}){const r=h.useNamespace("upload"),c=e.useAttrs(),i=e.useSlots(),l=e.ref();return s({abort:n=>{var t,a;return(a=(t=l.value)==null?void 0:t.abort)==null?void 0:a.call(t,n)},submit:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.submit)==null?void 0:t.call(n)},clearFiles:n=>{var t,a;return(a=(t=l.value)==null?void 0:t.clearFiles)==null?void 0:a.call(t,n)},handleStart:n=>{var t,a;return(a=(t=l.value)==null?void 0:t.handleStart)==null?void 0:a.call(t,n)},handleRemove:n=>{var t,a;return(a=(t=l.value)==null?void 0:t.handleRemove)==null?void 0:a.call(t,n)}}),()=>e.h(d.AdapterUpload,e.mergeProps({ref:l,class:r.b()},c),i)}}),Fo=S.withInstall(Lo),zo={input:ke,"input-number":ze,"time-picker":Qe,"time-select":Ye,autocomplete:d.AdapterAutocomplete,switch:Ce,slider:d.AdapterSlider,"color-picker":d.AdapterColorPicker},Te={input:o=>({placeholder:o.placeholder,clearable:o.clearable,style:"width: 100%"}),"input-number":o=>({placeholder:o.placeholder,style:"width: 100%"}),"time-picker":o=>({placeholder:o.placeholder,clearable:o.clearable,style:"width: 100%"}),"time-select":o=>({placeholder:o.placeholder,clearable:o.clearable,style:"width: 100%"}),autocomplete:o=>({placeholder:o.placeholder,clearable:o.clearable,style:"width: 100%"}),switch:()=>({}),slider:()=>({style:"width: 100%; padding: 0 6px"}),"color-picker":()=>({})};function Oo(o){return o?Object.fromEntries(Object.entries(o).map(([s,r])=>[s.startsWith("on")?s:`on${s[0].toUpperCase()}${s.slice(1)}`,r])):{}}const Je=e.defineComponent({name:"ProFormItem",props:{schema:{type:Object,required:!0},model:{type:Object,required:!0},modelValue:{default:void 0}},emits:["update:modelValue"],setup(o,{emit:s}){const r=e.inject("proTableEnumMap",{value:new Map}),c=e.computed({get:()=>o.modelValue,set:f=>s("update:modelValue",f)}),i=e.computed(()=>{var f,m;return(m=(f=o.schema.fieldNames)==null?void 0:f.label)!=null?m:"label"}),l=e.computed(()=>{var f,m;return(m=(f=o.schema.fieldNames)==null?void 0:f.value)!=null?m:"value"}),n=e.computed(()=>{var f,m;return(m=(f=o.schema.fieldNames)==null?void 0:f.children)!=null?m:"children"}),t=e.computed(()=>{var f;return o.schema.options!=null?o.schema.options:(f=r.value.get(o.schema.field))!=null?f:[]}),a=e.computed(()=>{const{label:f,value:m}={label:i.value,value:l.value};return f==="label"&&m==="value"?t.value:t.value.map(y=>O(B({},y),{label:y[f],value:y[m]}))}),g=e.computed(()=>{const f=B({},o.schema.props),{label:m,value:y,children:x}={label:i.value,value:l.value,children:n.value};return O(B({},f),{props:O(B({},f.props),{label:m,children:x}),nodeKey:y})}),P=e.computed(()=>{const f=B({},o.schema.props),{label:m,value:y,children:x}={label:i.value,value:l.value,children:n.value};return O(B({},f),{props:O(B({},f.props),{label:m,value:y,children:x})})}),N=e.computed(()=>B({},o.schema.props)),R=e.computed(()=>{var m,y,x;const f=(y=(m=o.schema.props)==null?void 0:m.type)!=null?y:"";return["daterange","datetimerange","monthrange","yearrange"].includes(f)||!!((x=o.schema.props)!=null&&x.isRange)}),I=e.computed(()=>{var m,y;if(((m=o.schema.props)==null?void 0:m.placeholder)!=null)return o.schema.props.placeholder;const f=(y=o.schema.component)!=null?y:"input";return["input","input-number","autocomplete"].includes(f)?"请输入":"请选择"}),C=e.computed(()=>{var f;return((f=o.schema.props)==null?void 0:f.clearable)!=null?o.schema.props.clearable:o.schema.defaultValue==null}),A=e.computed(()=>{var m,y,x;const f=B({},o.schema.props);return R.value?O(B({},f),{rangeSeparator:(m=f.rangeSeparator)!=null?m:"至",startPlaceholder:(y=f.startPlaceholder)!=null?y:"开始时间",endPlaceholder:(x=f.endPlaceholder)!=null?x:"结束时间",clearable:C.value}):O(B({},f),{placeholder:I.value,clearable:C.value})});return()=>{var _,T,$,L,E,q,z,u;const{schema:f}=o,m=(_=f.component)!=null?_:"input",y=Oo(f.events),x={modelValue:c.value,"onUpdate:modelValue":b=>c.value=b};if(f.render)return f.render(o.model);if(m==="text")return e.h("span",{class:"sy-pro-form-item__text"},String((T=c.value)!=null?T:""));if(m==="select")return e.h(Ge,O(B(B(B({},x),N.value),y),{placeholder:I.value,clearable:C.value,style:"width: 100%"}),{default:e.withCtx(()=>t.value.map(b=>e.h(We,{key:b[l.value],label:b[i.value],value:b[l.value]})))});if(m==="select-v2")return e.h(d.AdapterSelectV2,O(B(B(B({},x),N.value),y),{placeholder:I.value,clearable:C.value,options:a.value,style:"width: 100%"}));if(m==="tree-select"){const b=(L=($=o.schema.props)==null?void 0:$.data)!=null?L:t.value;return e.h(d.AdapterTreeSelect,O(B(B(B({},x),g.value),y),{placeholder:I.value,clearable:C.value,data:b,style:"width: 100%"}))}if(m==="cascader"){const b=(q=(E=o.schema.props)==null?void 0:E.options)!=null?q:t.value;return e.h(Re,O(B(B(B({},x),P.value),y),{placeholder:I.value,clearable:C.value,options:b,style:"width: 100%"}))}if(m==="radio"||m==="radio-button"){const b=m==="radio"?xe:Ke;return e.h(Ue,B(B(B({},x),N.value),y),{default:()=>t.value.map(k=>e.h(b,{key:k[l.value],value:k[l.value]},{default:()=>String(k[i.value])}))})}if(m==="checkbox")return e.h($e,B(B(B({},x),N.value),y),{default:()=>t.value.map(b=>e.h(_e,{key:b[l.value],value:b[l.value]},{default:()=>String(b[i.value])}))});if(m==="date-picker")return e.h(De,O(B(B(B({},x),A.value),y),{style:"width: 100%"}));const V=zo[m];if(V){const b=(u=(z=Te[m])==null?void 0:z.call(Te,{placeholder:I.value,clearable:C.value}))!=null?u:{};return e.h(V,B(B(B(B({},x),N.value),y),b))}return e.h(ke,O(B(B(B({},x),N.value),y),{placeholder:I.value,clearable:C.value,style:"width: 100%"}))}}}),qo=2,Ho=e.defineComponent({name:"SyProForm",__name:"ProForm",props:{model:{},schema:{},cols:{default:4},labelWidth:{default:"auto"},labelPosition:{default:"right"},disabled:{type:Boolean,default:!1},size:{},showQueryBtn:{type:Boolean,default:!0},showResetBtn:{type:Boolean,default:!0},queryBtnText:{default:"查询"},resetBtnText:{default:"重置"},loading:{type:Boolean,default:!1},collapsible:{type:[Boolean,Number],default:!1},defaultCollapsed:{type:Boolean,default:!0},buttonAlign:{default:"inline"}},emits:["search","reset"],setup(o,{expose:s,emit:r}){const c=e.useSlots(),i=o,l=r;h.useNamespace("pro-form");const n=e.ref(),t=e.ref(i.defaultCollapsed),a=e.ref("xl");function g(){const u=window.innerWidth;return u<768?"xs":u<992?"sm":u<1200?"md":u<1920?"lg":"xl"}function P(){a.value=g()}e.onMounted(()=>{a.value=g(),window.addEventListener("resize",P)}),e.onUnmounted(()=>{window.removeEventListener("resize",P)});const N=e.computed(()=>i.schema.filter(u=>typeof u.hidden=="function"?!u.hidden(i.model):!u.hidden).sort((u,b)=>{var k,M;return((k=u.order)!=null?k:0)-((M=b.order)!=null?M:0)}));function R(u){var k,M,F;const b=a.value;return(F=(M=(k=u[b])==null?void 0:k.span)!=null?M:u.span)!=null?F:1}function I(u){var k,M,F;const b=a.value;return(F=(M=(k=u[b])==null?void 0:k.offset)!=null?M:u.offset)!=null?F:0}const C=e.computed(()=>{var k,M,F,X,se,v;const u=i.cols;if(typeof u=="number")return u;const b=a.value;return(v=(se=(X=(F=(M=(k=u==null?void 0:u[b])!=null?k:u==null?void 0:u.xl)!=null?M:u==null?void 0:u.lg)!=null?F:u==null?void 0:u.md)!=null?X:u==null?void 0:u.sm)!=null?se:u==null?void 0:u.xs)!=null?v:4}),A=e.computed(()=>{const u=i.collapsible;return typeof u=="number"&&u>0?u:1}),f=e.computed(()=>{if(!i.collapsible)return-1;const u=i.buttonAlign==="inline"&&(i.showQueryBtn||i.showResetBtn||!!c["extra-buttons"]||!!c.buttons),b=C.value*A.value-(u?qo:0);if(b<=0)return 0;let k=0;for(let M=0;M<N.value.length;M++){const F=N.value[M];if(k+=R(F)+I(F),k>b)return M}return-1}),m=e.computed(()=>f.value>=0),y=e.computed(()=>({display:"grid",gridTemplateColumns:`repeat(${C.value}, 1fr)`,gap:"0 16px"}));function x(u){const b=R(u),k=I(u),M={gridColumn:`span ${b}`};return k>0&&(M.marginLeft=`calc(${k/C.value*100}% + ${k*16}px)`),M}const V=e.computed(()=>{const u=C.value,b=N.value,k=i.collapsible&&t.value&&f.value>=0?f.value:b.length;let M=0;for(let F=0;F<k;F++){const X=R(b[F]),se=I(b[F]),v=M+X+se;M=v>=u?v%u:v}return M}),_=e.computed(()=>{const u=V.value;return{gridColumn:`${u===0?1:u+1} / -1`}}),T={left:"flex-start",center:"center",right:"flex-end"},$=e.computed(()=>{var b;const u={display:"flex",alignItems:"center",justifyContent:(b=T[i.buttonAlign])!=null?b:"flex-start",gap:"8px",marginTop:"4px",flexWrap:"wrap"};if(i.buttonAlign==="left"&&i.labelPosition!=="top"){const k=i.labelWidth;k&&k!=="auto"&&(u.paddingLeft=typeof k=="number"?`${k}px`:String(k))}return u}),L=e.computed(()=>i.showQueryBtn||i.showResetBtn||!!c["extra-buttons"]||!!c.buttons);function E(u,b){i.model[u]=b}function q(){var u;(u=n.value)==null||u.validate(b=>{b&&l("search",i.model)})}function z(){var u,b;for(const k of i.schema)E(k.field,(u=k.defaultValue)!=null?u:null);(b=n.value)==null||b.clearValidate(),l("reset",i.model)}return s({formRef:n,validate:u=>{var b;return(b=n.value)==null?void 0:b.validate(u)},validateField:(u,b)=>{var k;return(k=n.value)==null?void 0:k.validateField(u,b)},resetFields:z,clearValidate:u=>{var b;return(b=n.value)==null?void 0:b.clearValidate(u)}}),(u,b)=>(e.openBlock(),e.createBlock(e.unref(Le),{ref_key:"formRef",ref:n,class:"sy-pro-form",model:o.model,"label-width":o.labelWidth,"label-position":o.labelPosition,disabled:o.disabled,size:o.size,onSubmit:b[2]||(b[2]=e.withModifiers(()=>{},["prevent"]))},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"sy-pro-form__grid",style:e.normalizeStyle(y.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(k,M)=>{var F;return e.openBlock(),e.createElementBlock(e.Fragment,{key:k.field},[!o.collapsible||!t.value||f.value<0||M<f.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"sy-pro-form__grid-item",style:e.normalizeStyle(x(k))},[e.createCommentVNode(" slot 类型:渲染具名插槽,用户自行提供完整的 sy-form-item 内容 "),k.component==="slot"?e.renderSlot(u.$slots,k.field,{key:0,item:k}):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createCommentVNode(" 内置组件类型:走原有渲染路径 "),e.createVNode(e.unref(Fe),e.mergeProps({prop:k.field,label:(F=k.label)!=null?F:""},{ref_for:!0},k.labelWidth!=null?{labelWidth:k.labelWidth}:{},{rules:k.rules}),e.createSlots({default:e.withCtx(()=>[e.createVNode(Je,{"model-value":o.model[k.field],schema:k,model:o.model,"onUpdate:modelValue":X=>E(k.field,X)},null,8,["model-value","schema","model","onUpdate:modelValue"])]),_:2},[k.tooltip?{name:"label",fn:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(k.label),1),e.createVNode(e.unref(pe),{content:k.tooltip,placement:"top"},{default:e.withCtx(()=>[e.createVNode(e.unref(le),{class:"sy-pro-form__tip-icon",style:{"margin-left":"4px","vertical-align":"middle",cursor:"pointer"}},{default:e.withCtx(()=>[e.createVNode(e.unref(G.InfoFilled))]),_:1})]),_:1},8,["content"])]),key:"0"}:void 0]),1040,["prop","label","rules"])],2112))],4)):e.createCommentVNode("v-if",!0)],64)}),128)),e.createCommentVNode(" 默认插槽:额外自定义字段 "),e.renderSlot(u.$slots,"default"),e.createCommentVNode(" 按钮区 —— inline 模式:在网格内贴右 "),o.buttonAlign==="inline"&&(L.value||o.collapsible&&m.value)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"sy-pro-form__grid-item sy-pro-form__buttons",style:e.normalizeStyle(_.value)},[e.renderSlot(u.$slots,"buttons",{},()=>[o.showQueryBtn?(e.openBlock(),e.createBlock(e.unref(U),{key:0,type:"primary",loading:o.loading,onClick:q},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.queryBtnText),1)]),_:1},8,["loading"])):e.createCommentVNode("v-if",!0),o.showResetBtn?(e.openBlock(),e.createBlock(e.unref(U),{key:1,onClick:z},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.resetBtnText),1)]),_:1})):e.createCommentVNode("v-if",!0),e.renderSlot(u.$slots,"extra-buttons")]),o.collapsible&&m.value?(e.openBlock(),e.createBlock(e.unref(U),{key:0,type:"primary",link:"",onClick:b[0]||(b[0]=k=>t.value=!t.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.value?"展开":"合并")+" ",1),e.createVNode(e.unref(le),{style:{"margin-left":"2px"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.value?e.unref(G.ArrowDown):e.unref(G.ArrowUp))))]),_:1})]),_:1})):e.createCommentVNode("v-if",!0)],4)):e.createCommentVNode("v-if",!0)],4),e.createCommentVNode(" 按钮区 —— 独立成行模式(left / center / right) "),o.buttonAlign!=="inline"&&(L.value||o.collapsible&&m.value)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"sy-pro-form__footer",style:e.normalizeStyle($.value)},[e.renderSlot(u.$slots,"buttons",{},()=>[o.showQueryBtn?(e.openBlock(),e.createBlock(e.unref(U),{key:0,type:"primary",loading:o.loading,onClick:q},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.queryBtnText),1)]),_:1},8,["loading"])):e.createCommentVNode("v-if",!0),o.showResetBtn?(e.openBlock(),e.createBlock(e.unref(U),{key:1,onClick:z},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.resetBtnText),1)]),_:1})):e.createCommentVNode("v-if",!0),e.renderSlot(u.$slots,"extra-buttons")]),o.collapsible&&m.value?(e.openBlock(),e.createBlock(e.unref(U),{key:0,type:"primary",link:"",onClick:b[1]||(b[1]=k=>t.value=!t.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.value?"展开":"合并")+" ",1),e.createVNode(e.unref(le),{style:{"margin-left":"2px"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.value?e.unref(G.ArrowDown):e.unref(G.ArrowUp))))]),_:1})]),_:1})):e.createCommentVNode("v-if",!0)],4)):e.createCommentVNode("v-if",!0)]),_:3},8,["model","label-width","label-position","disabled","size"]))}}),Ze=S.withInstall(Ho);function jo(o="id"){const s=e.ref([]),r=e.computed(()=>s.value.length>0),c=e.computed(()=>s.value.map(n=>n[o]));function i(n){s.value=n}function l(){s.value=[]}return{selectedList:s,isSelected:r,selectedListIds:c,selectionChange:i,clearSelection:l}}function Uo(o){const{request:s,params:r,searchParam:c,postData:i,requestError:l,pagination:n=!0,staticData:t,initialPageSize:a}=o,g=e.ref(!1),P=e.ref([]),N=e.reactive({pageNum:1,pageSize:a!=null?a:10,total:0}),R=e.reactive({}),I=e.reactive({}),C=e.computed(()=>{if(!(t!=null&&t.value))return P.value;if(!n)return t.value;const T=(N.pageNum-1)*N.pageSize;return t.value.slice(T,T+N.pageSize)});function A(T,$){for(const[L,E]of Object.entries(T))(E!=null&&E!==""||E===!1||E===0)&&($[L]=E)}function f(){const T={};return A(I,T),c!=null&&c.value&&A(c.value,T),T}function m(){return we(this,null,function*(){var T,$,L;if(t!=null&&t.value){N.total=t.value.length;return}if(s)try{g.value=!0;const E=f(),q=B(B(B({},R),E),(T=r==null?void 0:r.value)!=null?T:{});n&&(q.pageNum=N.pageNum,q.pageSize=N.pageSize);const z=yield s(q);if(!z.success){l==null||l(z);return}let u=($=z.data)!=null?$:[];i&&(u=i(u)),P.value=u,n&&(N.total=(L=z.total)!=null?L:0)}catch(E){l==null||l(E)}finally{g.value=!1}})}function y(){N.pageNum=1,m()}function x(){var T;N.pageNum=1;for(const $ of Object.keys(I))I[$]=(T=R[$])!=null?T:null;m()}function V(T){N.pageSize=T,N.pageNum=1,m()}function _(T){N.pageNum=T,m()}return r&&e.watch(r,()=>m(),{deep:!0}),{loading:g,tableData:P,pageable:N,processTableData:C,searchParam:I,searchInitParam:R,getTableList:m,search:y,reset:x,handleSizeChange:V,handleCurrentChange:_}}function Xe(o){var r;const s=[];for(const c of o)(r=c.children)!=null&&r.length?s.push(c,...Xe(c.children)):s.push(c);return s}function Ko(o,s,r){var st;const c=e.ref(),i=e.ref(),l=e.ref(),n=e.ref(o.type!=="unify"),t=e.ref(null),a=e.computed(()=>e.reactive(Xe(o.columns))),g=e.ref(new Map);function P(w){return we(this,null,function*(){var H;if(!w.enum||!w.prop)return;const D=w.enum;if(typeof D=="function"){g.value.set(w.prop,[]);try{const K=yield D();g.value.set(w.prop,K)}catch(K){}}else g.value.set(w.prop,Array.isArray(D)?D:(H=D.value)!=null?H:[])})}e.provide("proTableEnumMap",g),e.provide("proTableSlots",r);const N=e.computed(()=>a.value.filter(w=>{var D,H;return((D=w.search)==null?void 0:D.component)||((H=w.search)==null?void 0:H.render)}).sort((w,D)=>{var H,K,Q,j;return((K=(H=w.search)==null?void 0:H.order)!=null?K:0)-((j=(Q=D.search)==null?void 0:Q.order)!=null?j:0)})),R=e.computed(()=>N.value.filter(w=>{var D;return!!((D=w.search)!=null&&D.quick)}).sort((w,D)=>{var Q,j,ee,te,me,fe;const H=typeof((Q=w.search)==null?void 0:Q.quick)=="object"&&(ee=(j=w.search)==null?void 0:j.quick.order)!=null?ee:0,K=typeof((te=D.search)==null?void 0:te.quick)=="object"&&(fe=(me=D.search)==null?void 0:me.quick.order)!=null?fe:0;return H-K})),I=e.computed(()=>N.value.map(w=>{var D,H,K,Q,j,ee,te,me,fe,rt,at,lt,ct,it,dt;return{field:(K=(H=(D=w.search)==null?void 0:D.key)!=null?H:w.prop)!=null?K:"",label:w.label,component:(Q=w.search)==null?void 0:Q.component,props:(j=w.search)==null?void 0:j.props,options:(()=>{var pt,mt,ft,ut,ht,yt,St;if(((pt=w.search)==null?void 0:pt.options)!==void 0){const Ie=w.search.options;return Array.isArray(Ie)?Ie:(mt=e.unref(Ie))!=null?mt:void 0}if(!(!w.enum||(ut=(ft=w.search)==null?void 0:ft.component)!=null&&ut.includes("tree")))return typeof w.enum=="function"?(yt=g.value.get((ht=w.prop)!=null?ht:""))!=null?yt:void 0:Array.isArray(w.enum)?w.enum:(St=e.unref(w.enum))!=null?St:void 0})(),fieldNames:w.fieldNames,defaultValue:(ee=w.search)==null?void 0:ee.defaultValue,span:(te=w.search)==null?void 0:te.span,offset:(me=w.search)==null?void 0:me.offset,order:(fe=w.search)==null?void 0:fe.order,render:(rt=w.search)==null?void 0:rt.render,xs:(at=w.search)==null?void 0:at.xs,sm:(lt=w.search)==null?void 0:lt.sm,md:(ct=w.search)==null?void 0:ct.md,lg:(it=w.search)==null?void 0:it.lg,xl:(dt=w.search)==null?void 0:dt.xl}})),C=e.ref({}),A={};function f(){var w,D,H,K,Q;for(const j of Object.keys(C.value))delete C.value[j];for(const j of Object.keys(A))delete A[j];for(const j of N.value){const ee=(H=(D=(w=j.search)==null?void 0:w.key)!=null?D:j.prop)!=null?H:"",te=(Q=(K=j.search)==null?void 0:K.defaultValue)!=null?Q:null;C.value[ee]=te,A[ee]=te}}const{loading:m,processTableData:y,pageable:x,getTableList:V,handleSizeChange:_,handleCurrentChange:T}=Uo({request:o.request,params:e.toRef(o,"params"),searchParam:C,postData:o.postData,requestError:o.requestError,pagination:o.pagination,staticData:e.computed(()=>o.data),initialPageSize:o.pageSize});function $(){Object.assign(x,{pageNum:1}),V(),s("search")}function L(){f(),Object.assign(x,{pageNum:1}),V(),s("reset")}const{selectedList:E,isSelected:q,selectedListIds:z,selectionChange:u,clearSelection:b}=jo(o.rowKey);function k(w){var D;t.value=w[(D=o.rowKey)!=null?D:"id"]}function M(){var w,D;t.value=null,(D=(w=c.value)==null?void 0:w.setCurrentRow)==null||D.call(w,void 0)}function F(w){V()}function X(w){return o.toolButton===!0?!0:o.toolButton===!1?!1:o.toolButton.includes(w)}function se(){n.value=!n.value}function v(){var w,D;(D=(w=l.value)==null?void 0:w.open)==null||D.call(w)}return e.onMounted(()=>we(this,null,function*(){for(const w of a.value)P(w);f(),o.manualRequest||V()})),{props:o,type:(st=o.type)!=null?st:"classic",tableRef:c,formRef:i,colSettingRef:l,flatColumns:a,enumMap:g,searchColumns:N,quickSearchColumns:R,searchSchema:I,searchParam:C,searchInitParam:A,loading:m,tableData:y,pageable:x,selectedList:E,selectedListIds:z,isSelected:q,radio:t,isShowSearch:n,getTableList:V,search:$,reset:L,clearSelection:b,clearRadio:M,handleSizeChange:_,handleCurrentChange:T,onSortChange:F,onRadioChange:k,selectionChange:u,showToolBtn:X,toggleSearch:se,openColSetting:v}}const Go={key:1,style:{color:"var(--el-text-color-placeholder)"}},Wo=e.defineComponent({__name:"ColSetting",props:{columns:{}},setup(o,{expose:s}){const r=o,c=e.ref(!1),i=e.computed(()=>r.columns.filter(a=>{if(a.type&&["selection","index","expand","radio","sort"].includes(a.type))return!1;const g=a.isSetting;return g===void 0||g===!0}));e.computed(()=>i.value.every(a=>a.isShow!==!1)),e.computed(()=>{const a=i.value.length,g=i.value.filter(P=>P.isShow!==!1).length;return g>0&&g<a});const l=new WeakMap;function n(){i.value.forEach(a=>{l.has(a)||l.set(a,{isShow:a.isShow!==!1,sortable:a.sortable})})}function t(){n(),c.value=!0}return s({open:t}),(a,g)=>(e.openBlock(),e.createBlock(e.unref(Me),{modelValue:c.value,"onUpdate:modelValue":g[0]||(g[0]=P=>c.value=P),title:"列设置",size:"380px","append-to-body":!0,class:"sy-pro-table__col-setting"},{default:e.withCtx(()=>[e.createCommentVNode(" 全选 + 重置 "),e.createCommentVNode(` <div class="sy-pro-table__col-setting-toolbar">
4
+ */const fe=e.defineComponent({name:"SyAutocomplete",inheritAttrs:!1,setup(o,{expose:s}){const r=y.useNamespace("autocomplete"),i=e.useAttrs(),c=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)},close:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.close)==null?void 0:t.call(n)},highlight:n=>{var t,a;return(a=(t=l.value)==null?void 0:t.highlight)==null?void 0:a.call(t,n)},handleKeyEnter:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.handleKeyEnter)==null?void 0:t.call(n)},handleSelect:n=>{var t,a;return(a=(t=l.value)==null?void 0:t.handleSelect)==null?void 0:a.call(t,n)}}),()=>e.h(d.AdapterAutocomplete,e.mergeProps({ref:l,class:r.b()},i),c)}}),oe=m.withInstall(fe),ue=e.defineComponent({name:"SyAlert",inheritAttrs:!1,setup(){const o=y.useNamespace("alert"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterAlert,e.mergeProps({class:o.b()},s),r)}}),Tt=m.withInstall(ue),It=e.defineComponent({name:"SyBacktop",inheritAttrs:!1,setup(){const o=y.useNamespace("backtop"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterBacktop,e.mergeProps({class:o.b()},s),r)}}),Rt=m.withInstall(It),_t=e.defineComponent({name:"SyButton",inheritAttrs:!1,setup(o,{expose:s}){const r=y.useNamespace("button"),i=e.useAttrs(),c=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)}}),()=>e.h(d.AdapterButton,e.mergeProps({ref:l,class:r.b()},i),c)}}),W=m.withInstall(_t),$t=e.defineComponent({name:"SyCard",inheritAttrs:!1,setup(){const o=y.useNamespace("card"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterCard,e.mergeProps({class:o.b()},s),r)}}),Mt=m.withInstall($t),Dt=e.defineComponent({name:"SyCascader",inheritAttrs:!1,setup(){const o=y.useNamespace("cascader"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterCascader,e.mergeProps({class:o.b()},s),r)}}),ze=m.withInstall(Dt),Et=e.defineComponent({name:"SyCheckbox",inheritAttrs:!1,setup(){const o=y.useNamespace("checkbox"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterCheckbox,e.mergeProps({class:o.b()},s),r)}}),Lt=e.defineComponent({name:"SyCheckboxGroup",inheritAttrs:!1,setup(){const o=y.useNamespace("checkbox-group"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterCheckboxGroup,e.mergeProps({class:o.b()},s),r)}}),Oe=m.withInstall(Et),He=m.withInstall(Lt),Ft=e.defineComponent({name:"SyCheckboxButton",inheritAttrs:!1,setup(){const o=y.useNamespace("checkbox-button"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterCheckboxButton,e.mergeProps({class:o.b()},s),r)}}),zt=m.withInstall(Ft),Ot=e.defineComponent({name:"SyColorPicker",inheritAttrs:!1,setup(o,{expose:s}){const r=y.useNamespace("color-picker"),i=e.useAttrs(),c=e.useSlots(),l=e.ref();return s({show:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.show)==null?void 0:t.call(n)},hide:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.hide)==null?void 0:t.call(n)},focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)}}),()=>e.h(d.AdapterColorPicker,e.mergeProps({ref:l,class:r.b()},i),c)}}),Ht=m.withInstall(Ot),qt=e.defineComponent({name:"SyCollapse",inheritAttrs:!1,setup(){const o=y.useNamespace("collapse"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterCollapse,e.mergeProps({class:o.b()},s),r)}}),Ut=e.defineComponent({name:"SyCollapseItem",inheritAttrs:!1,setup(){const o=y.useNamespace("collapse-item"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterCollapseItem,e.mergeProps({class:o.b()},s),r)}}),jt=m.withInstall(qt),Kt=m.withInstall(Ut),Gt=new Set(["SyHeader","SyFooter","ElHeader","ElFooter"]);function Yt(o){return o.some(s=>{var i;const r=(i=s.type)==null?void 0:i.name;return!!r&&Gt.has(r)})}const Wt=e.defineComponent({name:"SyContainer",inheritAttrs:!1,setup(){const o=y.useNamespace("container"),s=e.useAttrs(),r=e.useSlots();return()=>{const i={class:o.b()};if(!("direction"in s)&&r.default){const c=r.default();Yt(c)&&(i.direction="vertical")}return e.h(d.AdapterContainer,e.mergeProps(i,s),r)}}}),Qt=e.defineComponent({name:"SyHeader",inheritAttrs:!1,setup(){const o=y.useNamespace("header"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterHeader,e.mergeProps({class:o.b()},s),r)}}),Jt=e.defineComponent({name:"SyAside",inheritAttrs:!1,setup(){const o=y.useNamespace("aside"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterAside,e.mergeProps({class:o.b()},s),r)}}),Zt=e.defineComponent({name:"SyMain",inheritAttrs:!1,setup(){const o=y.useNamespace("main"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterMain,e.mergeProps({class:o.b()},s),r)}}),Xt=e.defineComponent({name:"SyFooter",inheritAttrs:!1,setup(){const o=y.useNamespace("footer"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterFooter,e.mergeProps({class:o.b()},s),r)}}),vt=m.withInstall(Wt),en=m.withInstall(Qt),tn=m.withInstall(Jt),nn=m.withInstall(Zt),on=m.withInstall(Xt),sn=e.defineComponent({name:"SyConfigProvider",inheritAttrs:!1,setup(o,{expose:s}){const r=e.useAttrs(),i=e.useSlots(),c=e.ref();return s({}),()=>e.h(d.AdapterConfigProvider,e.mergeProps({ref:c},r),i)}}),rn=m.withInstall(sn),an=e.defineComponent({name:"SyDatePicker",inheritAttrs:!1,setup(o,{expose:s}){const r=y.useNamespace("date-picker"),i=e.useAttrs(),c=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)},handleOpen:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.handleOpen)==null?void 0:t.call(n)},handleClose:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.handleClose)==null?void 0:t.call(n)}}),()=>e.h(d.AdapterDatePicker,e.mergeProps({ref:l,class:r.b()},i),c)}}),qe=m.withInstall(an),ln=e.defineComponent({name:"SyDateTimePicker",inheritAttrs:!1,setup(o,{expose:s}){const r=y.useNamespace("date-time-picker"),i=e.useAttrs(),c=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)},handleOpen:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.handleOpen)==null?void 0:t.call(n)},handleClose:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.handleClose)==null?void 0:t.call(n)}}),()=>e.h(d.AdapterDatePicker,e.mergeProps({ref:l,class:r.b(),type:"datetime"},i),c)}}),cn=m.withInstall(ln),dn=e.defineComponent({name:"SyDescriptions",inheritAttrs:!1,setup(){const o=y.useNamespace("descriptions"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterDescriptions,e.mergeProps({class:o.b()},s),r)}}),pn=e.defineComponent({name:"ElDescriptionsItem",inheritAttrs:!1,setup(){const o=y.useNamespace("descriptions-item"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterDescriptionsItem,e.mergeProps({class:o.b()},s),r)}}),mn=m.withInstall(dn),fn=m.withInstall(pn,"SyDescriptionsItem"),un=e.defineComponent({name:"SyDialog",inheritAttrs:!1,setup(){const o=y.useNamespace("dialog"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterDialog,e.mergeProps({class:o.b()},s),r)}}),hn=m.withInstall(un),Sn=e.defineComponent({name:"SyDivider",inheritAttrs:!1,setup(){const o=y.useNamespace("divider"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterDivider,e.mergeProps({class:o.b()},s),r)}}),yn=m.withInstall(Sn),gn=e.defineComponent({name:"SyDrawer",inheritAttrs:!1,setup(){const o=y.useNamespace("drawer"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterDrawer,e.mergeProps({class:o.b()},s),r)}}),Ue=m.withInstall(gn),bn=e.defineComponent({name:"SyDropdown",inheritAttrs:!1,setup(){const o=y.useNamespace("dropdown"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterDropdown,e.mergeProps({class:o.b()},s),r)}}),Cn=e.defineComponent({name:"SyDropdownMenu",inheritAttrs:!1,setup(){const o=y.useNamespace("dropdown-menu"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterDropdownMenu,e.mergeProps({class:o.b()},s),r)}}),wn=e.defineComponent({name:"SyDropdownItem",inheritAttrs:!1,setup(){const o=y.useNamespace("dropdown-item"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterDropdownItem,e.mergeProps({class:o.b()},s),r)}}),An=m.withInstall(bn),kn=m.withInstall(Cn),Nn=m.withInstall(wn),Pn=e.defineComponent({name:"SyEmpty",inheritAttrs:!1,setup(){const o=y.useNamespace("empty"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterEmpty,e.mergeProps({class:o.b()},s),r)}}),je=m.withInstall(Pn),xn=e.defineComponent({name:"SyForm",inheritAttrs:!1,setup(o,{expose:s}){const r=y.useNamespace("form"),i=e.useAttrs(),c=e.useSlots(),l=e.ref();return s({validate:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.validate)==null?void 0:a.call(t,...n)},validateField:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.validateField)==null?void 0:a.call(t,...n)},resetFields:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.resetFields)==null?void 0:a.call(t,...n)},scrollToField:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.scrollToField)==null?void 0:a.call(t,...n)},clearValidate:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.clearValidate)==null?void 0:a.call(t,...n)}}),()=>e.h(d.AdapterForm,e.mergeProps({ref:l,class:r.b()},i),c)}}),Bn=e.defineComponent({name:"SyFormItem",inheritAttrs:!1,setup(o,{expose:s}){const r=y.useNamespace("form-item"),i=e.useAttrs(),c=e.useSlots(),l=e.ref();return s({resetField:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.resetField)==null?void 0:t.call(n)},clearValidate:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.clearValidate)==null?void 0:t.call(n)}}),()=>e.h(d.AdapterFormItem,e.mergeProps({ref:l,class:r.b()},i),c)}}),Ke=m.withInstall(xn),Ge=m.withInstall(Bn),Vn=e.defineComponent({name:"SyIcon",inheritAttrs:!1,setup(){const o=e.useAttrs(),s=e.useSlots();return()=>e.h(d.AdapterIcon,e.mergeProps(o),s)}}),he=m.withInstall(Vn),Tn=e.defineComponent({name:"SyImage",inheritAttrs:!1,setup(o,{expose:s}){const r=y.useNamespace("image"),i=e.useAttrs(),c=e.useSlots(),l=e.ref();return s({showPreview:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.showPreview)==null?void 0:t.call(n)}}),()=>e.h(d.AdapterImage,e.mergeProps({ref:l,class:r.b()},i),c)}}),In=m.withInstall(Tn),Rn=e.defineComponent({name:"SyInput",inheritAttrs:!1,setup(o,{expose:s}){const r=y.useNamespace("input"),i=e.useAttrs(),c=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)},clear:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.clear)==null?void 0:t.call(n)},select:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.select)==null?void 0:t.call(n)},resizeTextarea:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.resizeTextarea)==null?void 0:t.call(n)}}),()=>e.h(d.AdapterInput,e.mergeProps({ref:l,class:r.b()},i),c)}}),Re=m.withInstall(Rn),_n=e.defineComponent({name:"SyInputNumber",inheritAttrs:!1,setup(o,{expose:s}){const r=y.useNamespace("input-number"),i=e.useAttrs(),c=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)}}),()=>e.h(d.AdapterInputNumber,e.mergeProps({ref:l,class:r.b()},i),c)}}),Ye=m.withInstall(_n),$n=e.defineComponent({name:"SyRow",inheritAttrs:!1,setup(){const o=y.useNamespace("row"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterRow,e.mergeProps({class:o.b()},s),r)}}),Mn=e.defineComponent({name:"SyCol",inheritAttrs:!1,setup(){const o=y.useNamespace("col"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterCol,e.mergeProps({class:o.b()},s),r)}}),Dn=m.withInstall($n),En=m.withInstall(Mn),Ln=e.defineComponent({name:"SyLink",inheritAttrs:!1,setup(){const o=y.useNamespace("link"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterLink,e.mergeProps({class:o.b()},s),r)}}),Fn=m.withInstall(Ln),se="sy-loading",_e="element-loading-custom-class";function zn(o){return o!==null&&typeof o=="object"&&!Array.isArray(o)}function On(o){if(o==null||o==="")return se;const s=String(e.unref(o));return s.includes(se)?s:`${se} ${s}`}function Hn(o){if(o===void 0)return{customClass:se};const s=B({},o),r=s.customClass;return r===void 0?s.customClass=se:typeof r=="string"&&(s.customClass=`${se} ${r}`),s}function We(o,s){if(!s.value)return s;if(zn(s.value))return U(B({},s),{value:U(B({},s.value),{customClass:On(s.value.customClass)})});const r=o.getAttribute(_e);return r?r.includes(se)||o.setAttribute(_e,`${se} ${r}`):o.setAttribute(_e,se),s}const v=d.AdapterLoadingDirective,Ae=(o,s)=>d.AdapterLoading.service(Hn(o),s);Object.defineProperty(Ae,"_context",{get(){return d.AdapterLoading.service._context},set(o){d.AdapterLoading.service._context=o}});const ke={mounted(o,s,r,i){var c;(c=v.mounted)==null||c.call(v,o,We(o,s),r,i)},updated(o,s,r,i){var c;(c=v.updated)==null||c.call(v,o,We(o,s),r,i)},unmounted(o,s,r,i){var c;(c=v.unmounted)==null||c.call(v,o,s,r,i)},get _context(){return v._context},set _context(o){v._context=o}},qn={install(o){Ae._context=o._context,ke._context=o._context,o.directive("loading",ke),o.config.globalProperties.$loading=Ae},directive:ke,service:Ae},Un=e.defineComponent({name:"SyMenu",inheritAttrs:!1,setup(){const o=y.useNamespace("menu"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterMenu,e.mergeProps({class:o.b()},s),r)}}),jn=e.defineComponent({name:"SySubMenu",inheritAttrs:!1,setup(){const o=y.useNamespace("sub-menu"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterSubMenu,e.mergeProps({class:o.b()},s),r)}}),Kn=e.defineComponent({name:"SyMenuItem",inheritAttrs:!1,setup(){const o=y.useNamespace("menu-item"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterMenuItem,e.mergeProps({class:o.b()},s),r)}}),Gn=e.defineComponent({name:"SyMenuItemGroup",inheritAttrs:!1,setup(){const o=y.useNamespace("menu-item-group"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterMenuItemGroup,e.mergeProps({class:o.b()},s),r)}}),Yn=m.withInstall(Un),Wn=m.withInstall(jn),Qn=m.withInstall(Kn),Jn=m.withInstall(Gn),Ne="sy-message";function Se(o){if(o===void 0)return{customClass:Ne};if(typeof o!="object"||o.__v_isVNode===!0)return{message:o,customClass:Ne};const s=o;return U(B({},s),{customClass:s.customClass?`${Ne} ${s.customClass}`:Ne})}const $e=(o,s)=>d.AdapterMessage(Se(o),s);$e.closeAll=o=>d.AdapterMessage.closeAll(o),$e.closeAllByPlacement=o=>d.AdapterMessage.closeAllByPlacement(o);const pe=$e;pe.success=(o,s)=>d.AdapterMessage.success(Se(o),s),pe.warning=(o,s)=>d.AdapterMessage.warning(Se(o),s),pe.info=(o,s)=>d.AdapterMessage.info(Se(o),s),pe.error=(o,s)=>d.AdapterMessage.error(Se(o),s),Object.defineProperty(pe,"_context",{get(){return d.AdapterMessage._context},set(o){d.AdapterMessage._context=o}});const Me="sy-message-box";function Pe(o){return o?U(B({},o),{customClass:o.customClass?`${Me} ${o.customClass}`:Me}):{customClass:Me}}const ye=(o,s)=>d.AdapterMessageBox(Pe(o),s);ye.alert=(...o)=>{const[s,r,i,c]=o;return d.AdapterMessageBox.alert(s,r,Pe(i),c)},ye.confirm=(...o)=>{const[s,r,i,c]=o;return d.AdapterMessageBox.confirm(s,r,Pe(i),c)},ye.prompt=(...o)=>{const[s,r,i,c]=o;return d.AdapterMessageBox.prompt(s,r,Pe(i),c)},ye.close=()=>d.AdapterMessageBox.close();const Qe=ye;Object.defineProperty(Qe,"_context",{get(){return d.AdapterMessageBox._context},set(o){d.AdapterMessageBox._context=o}});const xe="sy-notification";function ge(o){if(o===void 0)return{customClass:xe};if(typeof o!="object"||o.__v_isVNode===!0)return{message:o,customClass:xe};const s=o;return U(B({},s),{customClass:s.customClass?`${xe} ${s.customClass}`:xe})}const me=(o,s)=>d.AdapterNotification(ge(o),s);me.success=(o,s)=>d.AdapterNotification.success(ge(o),s),me.warning=(o,s)=>d.AdapterNotification.warning(ge(o),s),me.info=(o,s)=>d.AdapterNotification.info(ge(o),s),me.error=(o,s)=>d.AdapterNotification.error(ge(o),s),me.closeAll=()=>d.AdapterNotification.closeAll();const Je=me;Object.defineProperty(Je,"_context",{get(){return d.AdapterNotification._context},set(o){d.AdapterNotification._context=o}});const Zn=e.defineComponent({name:"SyPagination",inheritAttrs:!1,setup(){const o=y.useNamespace("pagination"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterPagination,e.mergeProps({class:o.b()},s),r)}}),Ze=m.withInstall(Zn),Xn=e.defineComponent({name:"SyPopconfirm",inheritAttrs:!1,setup(){const o=y.useNamespace("popconfirm"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterPopconfirm,e.mergeProps({class:o.b()},s),r)}}),vn=m.withInstall(Xn);function eo(o,s){var n;const r=B({},o),i=r.class,c=(n=r.popperClass)!=null?n:r["popper-class"];delete r.class,delete r.popperClass,delete r["popper-class"];const l=[s,c,i].flat(10).filter(t=>typeof t=="string"&&t.length>0);return{rest:r,popperClass:l.length?l:[s]}}const to=e.defineComponent({name:"SyPopover",inheritAttrs:!1,setup(){const o=y.useNamespace("popover"),s=e.useAttrs(),r=e.useSlots();return()=>{const{rest:i,popperClass:c}=eo(s,o.b());return e.h(d.AdapterPopover,e.mergeProps(i,{popperClass:c}),r)}}}),no=m.withInstall(to),oo=e.defineComponent({name:"SyProgress",inheritAttrs:!1,setup(){const o=y.useNamespace("progress"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterProgress,e.mergeProps({class:o.b()},s),r)}}),so=m.withInstall(oo),ro=e.defineComponent({name:"SyRadio",inheritAttrs:!1,setup(){const o=y.useNamespace("radio"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterRadio,e.mergeProps({class:o.b()},s),r)}}),ao=e.defineComponent({name:"SyRadioGroup",inheritAttrs:!1,setup(){const o=y.useNamespace("radio-group"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterRadioGroup,e.mergeProps({class:o.b()},s),r)}}),De=m.withInstall(ro),Xe=m.withInstall(ao),lo=e.defineComponent({name:"SyRadioButton",inheritAttrs:!1,setup(){const o=y.useNamespace("radio-button"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterRadioButton,e.mergeProps({class:o.b()},s),r)}}),ve=m.withInstall(lo),co=e.defineComponent({name:"SyScrollbar",inheritAttrs:!1,setup(o,{expose:s}){const r=y.useNamespace("scrollbar"),i=e.useAttrs(),c=e.useSlots(),l=e.ref();return s({handleScroll:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.handleScroll)==null?void 0:t.call(n)},scrollTo:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.scrollTo)==null?void 0:a.call(t,...n)},setScrollTop:n=>{var t,a;return(a=(t=l.value)==null?void 0:t.setScrollTop)==null?void 0:a.call(t,n)},setScrollLeft:n=>{var t,a;return(a=(t=l.value)==null?void 0:t.setScrollLeft)==null?void 0:a.call(t,n)},update:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.update)==null?void 0:t.call(n)},wrapRef:()=>{var n;return(n=l.value)==null?void 0:n.wrapRef}}),()=>e.h(d.AdapterScrollbar,e.mergeProps({ref:l,class:r.b()},i),c)}}),io=m.withInstall(co),po=e.defineComponent({name:"SySelect",inheritAttrs:!1,setup(o,{expose:s}){const r=y.useNamespace("select"),i=e.useAttrs(),c=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)}}),()=>e.h(d.AdapterSelect,e.mergeProps({ref:l,class:r.b()},i),c)}}),mo=e.defineComponent({name:"SyOption",inheritAttrs:!1,setup(){const o=y.useNamespace("option"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterOption,e.mergeProps({class:o.b()},s),r)}}),et=m.withInstall(po),tt=m.withInstall(mo),fo=d.AdapterSelectV2,uo=e.defineComponent({name:"SySelectV2",inheritAttrs:!1,setup(o,{expose:s}){const r=y.useNamespace("select-v2"),i=e.useAttrs(),c=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)},scrollTo:n=>{var t,a;return(a=(t=l.value)==null?void 0:t.scrollTo)==null?void 0:a.call(t,n)},toggleMenu:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.toggleMenu)==null?void 0:t.call(n)}}),()=>e.h(fo,e.mergeProps({ref:l,class:r.b()},i),c)}}),ho=m.withInstall(uo),So=e.defineComponent({name:"SySkeleton",inheritAttrs:!1,setup(o,{expose:s}){const r=y.useNamespace("skeleton"),i=e.useAttrs(),c=e.useSlots(),l=e.ref();return s({get uiLoading(){var n;return(n=l.value)==null?void 0:n.uiLoading}}),()=>e.h(d.AdapterSkeleton,e.mergeProps({ref:l,class:r.b()},i),c)}}),yo=e.defineComponent({name:"SySkeletonItem",inheritAttrs:!1,setup(){const o=y.useNamespace("skeleton-item"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterSkeletonItem,e.mergeProps({class:o.b()},s),r)}}),go=m.withInstall(So),bo=m.withInstall(yo),Co=e.defineComponent({name:"SySlider",inheritAttrs:!1,setup(){const o=y.useNamespace("slider"),s=e.useAttrs(),r=e.useSlots(),i=e.ref();return()=>e.h(d.AdapterSlider,e.mergeProps({ref:i,class:o.b()},s),r)}}),wo=m.withInstall(Co),Ao=e.defineComponent({name:"SySpace",inheritAttrs:!1,setup(){const o=y.useNamespace("space"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterSpace,e.mergeProps({class:o.b()},s),r)}}),ko=m.withInstall(Ao),No=e.defineComponent({name:"SySteps",inheritAttrs:!1,setup(){const o=y.useNamespace("steps"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterSteps,e.mergeProps({class:o.b()},s),r)}}),Po=e.defineComponent({name:"SyStep",inheritAttrs:!1,setup(){const o=y.useNamespace("step"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterStep,e.mergeProps({class:o.b()},s),r)}}),xo=m.withInstall(No),Bo=m.withInstall(Po),Vo=e.defineComponent({name:"SySwitch",inheritAttrs:!1,setup(o,{expose:s}){const r=y.useNamespace("switch"),i=e.useAttrs(),c=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)}}),()=>e.h(d.AdapterSwitch,e.mergeProps({ref:l,class:r.b()},i),c)}}),Be=m.withInstall(Vo),To=e.defineComponent({name:"SyTable",inheritAttrs:!1,setup(o,{expose:s}){const r=y.useNamespace("table"),i=e.useAttrs(),c=e.useSlots(),l=e.ref();return s({clearSelection:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.clearSelection)==null?void 0:t.call(n)},getSelectionRows:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.getSelectionRows)==null?void 0:t.call(n)},toggleRowSelection:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.toggleRowSelection)==null?void 0:a.call(t,...n)},toggleAllSelection:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.toggleAllSelection)==null?void 0:t.call(n)},toggleRowExpansion:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.toggleRowExpansion)==null?void 0:a.call(t,...n)},setCurrentRow:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.setCurrentRow)==null?void 0:a.call(t,...n)},clearSort:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.clearSort)==null?void 0:t.call(n)},clearFilter:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.clearFilter)==null?void 0:a.call(t,...n)},doLayout:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.doLayout)==null?void 0:t.call(n)},sort:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.sort)==null?void 0:a.call(t,...n)},scrollTo:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.scrollTo)==null?void 0:a.call(t,...n)},setScrollTop:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.setScrollTop)==null?void 0:a.call(t,...n)},setScrollLeft:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.setScrollLeft)==null?void 0:a.call(t,...n)}}),()=>e.h(d.AdapterTable,e.mergeProps({ref:l,class:r.b()},i),c)}}),Io=e.defineComponent({name:"SyTableColumn",inheritAttrs:!1,setup(){const o=y.useNamespace("table-column"),s=e.useAttrs(),r=e.useSlots();return()=>{const i=r.default?U(B({},r),{default:(...c)=>{var l;return((l=r.default(...c))!=null?l:[]).map(n=>{var t;return((t=n==null?void 0:n.type)==null?void 0:t.name)==="SyTableColumn"?e.h(d.AdapterTableColumn,n.props,n.children):n})}}):r;return e.h(d.AdapterTableColumn,e.mergeProps({class:o.b()},s),i)}}}),Ee=m.withInstall(To),te=m.withInstall(Io),Ro=e.defineComponent({name:"SyTabs",inheritAttrs:!1,setup(o,{expose:s}){const r=y.useNamespace("tabs"),i=e.useAttrs(),c=e.useSlots(),l=e.ref();return s({get currentName(){var n;return(n=l.value)==null?void 0:n.currentName},get tabNavRef(){var n;return(n=l.value)==null?void 0:n.tabNavRef}}),()=>e.h(d.AdapterTabs,e.mergeProps({ref:l,class:r.b()},i),c)}}),_o=e.defineComponent({name:"SyTabPane",inheritAttrs:!1,setup(){const o=y.useNamespace("tab-pane"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterTabPane,e.mergeProps({class:o.b()},s),r)}}),$o=m.withInstall(Ro),Mo=m.withInstall(_o),Do=e.defineComponent({name:"SyTag",inheritAttrs:!1,setup(o,{expose:s}){const r=y.useNamespace("tag"),i=e.useAttrs(),c=e.useSlots(),l=e.ref();return s({ref:()=>l.value}),()=>e.h(d.AdapterTag,e.mergeProps({ref:l,class:r.b()},i),c)}}),Ve=m.withInstall(Do),Eo=e.defineComponent({name:"SyText",inheritAttrs:!1,setup(){const o=y.useNamespace("text"),s=e.useAttrs(),r=e.useSlots();return()=>e.h(d.AdapterText,e.mergeProps({class:o.b()},s),r)}}),Lo=m.withInstall(Eo),Fo=e.defineComponent({name:"SyTimePicker",inheritAttrs:!1,setup(o,{expose:s}){const r=y.useNamespace("time-picker"),i=e.useAttrs(),c=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)},handleOpen:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.handleOpen)==null?void 0:t.call(n)},handleClose:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.handleClose)==null?void 0:t.call(n)}}),()=>e.h(d.AdapterTimePicker,e.mergeProps({ref:l,class:r.b()},i),c)}}),nt=m.withInstall(Fo),zo=e.defineComponent({name:"SyTimeSelect",inheritAttrs:!1,setup(o,{expose:s}){const r=y.useNamespace("time-select"),i=e.useAttrs(),c=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)}}),()=>e.h(d.AdapterTimeSelect,e.mergeProps({ref:l,class:r.b()},i),c)}}),ot=m.withInstall(zo);function Oo(o,s){var n;const r=B({},o),i=r.class,c=(n=r.popperClass)!=null?n:r["popper-class"];delete r.class,delete r.popperClass,delete r["popper-class"];const l=[s,c,i].flat(10).filter(t=>typeof t=="string"&&t.length>0);return{rest:r,popperClass:l.length?l:[s]}}const Ho=e.defineComponent({name:"SyTooltip",inheritAttrs:!1,setup(){const o=y.useNamespace("tooltip"),s=e.useAttrs(),r=e.useSlots();return()=>{const{rest:i,popperClass:c}=Oo(s,o.b());return e.h(d.AdapterTooltip,e.mergeProps(i,{popperClass:c}),r)}}}),be=m.withInstall(Ho),qo=e.defineComponent({name:"SyTree",inheritAttrs:!1,setup(o,{expose:s}){const r=y.useNamespace("tree"),i=e.useAttrs(),c=e.useSlots(),l=e.ref();return s({filter:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.filter)==null?void 0:a.call(t,...n)},updateKeyChildren:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.updateKeyChildren)==null?void 0:a.call(t,...n)},getCheckedNodes:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.getCheckedNodes)==null?void 0:a.call(t,...n)},getCheckedKeys:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.getCheckedKeys)==null?void 0:a.call(t,...n)},setCheckedNodes:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.setCheckedNodes)==null?void 0:a.call(t,...n)},setCheckedKeys:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.setCheckedKeys)==null?void 0:a.call(t,...n)},setChecked:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.setChecked)==null?void 0:a.call(t,...n)},getHalfCheckedNodes:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.getHalfCheckedNodes)==null?void 0:a.call(t,...n)},getHalfCheckedKeys:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.getHalfCheckedKeys)==null?void 0:a.call(t,...n)},getCurrentKey:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.getCurrentKey)==null?void 0:a.call(t,...n)},getCurrentNode:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.getCurrentNode)==null?void 0:a.call(t,...n)},setCurrentKey:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.setCurrentKey)==null?void 0:a.call(t,...n)},setCurrentNode:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.setCurrentNode)==null?void 0:a.call(t,...n)},getNode:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.getNode)==null?void 0:a.call(t,...n)},remove:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.remove)==null?void 0:a.call(t,...n)},append:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.append)==null?void 0:a.call(t,...n)},insertBefore:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.insertBefore)==null?void 0:a.call(t,...n)},insertAfter:(...n)=>{var t,a;return(a=(t=l.value)==null?void 0:t.insertAfter)==null?void 0:a.call(t,...n)}}),()=>e.h(d.AdapterTree,e.mergeProps({ref:l,class:r.b()},i),c)}}),Uo=m.withInstall(qo),jo=e.defineComponent({name:"SyTreeSelect",inheritAttrs:!1,setup(o,{expose:s}){const r=y.useNamespace("tree-select"),i=e.useAttrs(),c=e.useSlots(),l=e.ref();return s({focus:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.focus)==null?void 0:t.call(n)},blur:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.blur)==null?void 0:t.call(n)},filter:n=>{var t,a;return(a=(t=l.value)==null?void 0:t.filter)==null?void 0:a.call(t,n)},updateKeyChildren:(n,t)=>{var a,b;return(b=(a=l.value)==null?void 0:a.updateKeyChildren)==null?void 0:b.call(a,n,t)}}),()=>e.h(d.AdapterTreeSelect,e.mergeProps({ref:l,class:r.b()},i),c)}}),Ko=m.withInstall(jo),Go=e.defineComponent({name:"SyUpload",inheritAttrs:!1,setup(o,{expose:s}){const r=y.useNamespace("upload"),i=e.useAttrs(),c=e.useSlots(),l=e.ref();return s({abort:n=>{var t,a;return(a=(t=l.value)==null?void 0:t.abort)==null?void 0:a.call(t,n)},submit:()=>{var n,t;return(t=(n=l.value)==null?void 0:n.submit)==null?void 0:t.call(n)},clearFiles:n=>{var t,a;return(a=(t=l.value)==null?void 0:t.clearFiles)==null?void 0:a.call(t,n)},handleStart:n=>{var t,a;return(a=(t=l.value)==null?void 0:t.handleStart)==null?void 0:a.call(t,n)},handleRemove:n=>{var t,a;return(a=(t=l.value)==null?void 0:t.handleRemove)==null?void 0:a.call(t,n)}}),()=>e.h(d.AdapterUpload,e.mergeProps({ref:l,class:r.b()},i),c)}}),Yo=m.withInstall(Go),Wo={input:Re,"input-number":Ye,"time-picker":nt,"time-select":ot,autocomplete:d.AdapterAutocomplete,switch:Be,slider:d.AdapterSlider,"color-picker":d.AdapterColorPicker},Le={input:o=>({placeholder:o.placeholder,clearable:o.clearable,style:"width: 100%"}),"input-number":o=>({placeholder:o.placeholder,style:"width: 100%"}),"time-picker":o=>({placeholder:o.placeholder,clearable:o.clearable,style:"width: 100%"}),"time-select":o=>({placeholder:o.placeholder,clearable:o.clearable,style:"width: 100%"}),autocomplete:o=>({placeholder:o.placeholder,clearable:o.clearable,style:"width: 100%"}),switch:()=>({}),slider:()=>({style:"width: 100%; padding: 0 6px"}),"color-picker":()=>({})};function Qo(o){return o?Object.fromEntries(Object.entries(o).map(([s,r])=>[s.startsWith("on")?s:`on${s[0].toUpperCase()}${s.slice(1)}`,r])):{}}const st=e.defineComponent({name:"ProFormItem",props:{schema:{type:Object,required:!0},model:{type:Object,required:!0},modelValue:{default:void 0}},emits:["update:modelValue"],setup(o,{emit:s}){const r=e.inject("proTableEnumMap",{value:new Map}),i=e.computed({get:()=>o.modelValue,set:h=>s("update:modelValue",h)}),c=e.computed(()=>{var h,f;return(f=(h=o.schema.fieldNames)==null?void 0:h.label)!=null?f:"label"}),l=e.computed(()=>{var h,f;return(f=(h=o.schema.fieldNames)==null?void 0:h.value)!=null?f:"value"}),n=e.computed(()=>{var h,f;return(f=(h=o.schema.fieldNames)==null?void 0:h.children)!=null?f:"children"}),t=e.computed(()=>{var h;return o.schema.options!=null?o.schema.options:(h=r.value.get(o.schema.field))!=null?h:[]}),a=e.computed(()=>{const{label:h,value:f}={label:c.value,value:l.value};return h==="label"&&f==="value"?t.value:t.value.map(S=>U(B({},S),{label:S[h],value:S[f]}))}),b=e.computed(()=>{const h=B({},o.schema.props),{label:f,value:S,children:A}={label:c.value,value:l.value,children:n.value};return U(B({},h),{props:U(B({},h.props),{label:f,children:A}),nodeKey:S})}),P=e.computed(()=>{const h=B({},o.schema.props),{label:f,value:S,children:A}={label:c.value,value:l.value,children:n.value};return U(B({},h),{props:U(B({},h.props),{label:f,value:S,children:A})})}),x=e.computed(()=>B({},o.schema.props)),V=e.computed(()=>{var f,S,A;const h=(S=(f=o.schema.props)==null?void 0:f.type)!=null?S:"";return["daterange","datetimerange","monthrange","yearrange"].includes(h)||!!((A=o.schema.props)!=null&&A.isRange)}),T=e.computed(()=>{var f,S;if(((f=o.schema.props)==null?void 0:f.placeholder)!=null)return o.schema.props.placeholder;const h=(S=o.schema.component)!=null?S:"input";return["input","input-number","autocomplete"].includes(h)?"请输入":"请选择"}),g=e.computed(()=>{var h;return((h=o.schema.props)==null?void 0:h.clearable)!=null?o.schema.props.clearable:o.schema.defaultValue==null}),k=e.computed(()=>{var f,S,A;const h=B({},o.schema.props);return V.value?U(B({},h),{rangeSeparator:(f=h.rangeSeparator)!=null?f:"至",startPlaceholder:(S=h.startPlaceholder)!=null?S:"开始时间",endPlaceholder:(A=h.endPlaceholder)!=null?A:"结束时间",clearable:g.value}):U(B({},h),{placeholder:T.value,clearable:g.value})});return()=>{var D,_,F,$,I,O,z,K;const{schema:h}=o,f=(D=h.component)!=null?D:"input",S=Qo(h.events),A={modelValue:i.value,"onUpdate:modelValue":E=>i.value=E};if(h.render)return h.render(o.model);if(f==="text")return e.h("span",{class:"sy-pro-form-item__text"},String((_=i.value)!=null?_:""));if(f==="select")return e.h(et,U(B(B(B({},A),x.value),S),{placeholder:T.value,clearable:g.value,style:"width: 100%"}),{default:e.withCtx(()=>t.value.map(E=>e.h(tt,{key:E[l.value],label:E[c.value],value:E[l.value]})))});if(f==="select-v2")return e.h(d.AdapterSelectV2,U(B(B(B({},A),x.value),S),{placeholder:T.value,clearable:g.value,options:a.value,style:"width: 100%"}));if(f==="tree-select"){const E=($=(F=o.schema.props)==null?void 0:F.data)!=null?$:t.value;return e.h(d.AdapterTreeSelect,U(B(B(B({},A),b.value),S),{placeholder:T.value,clearable:g.value,data:E,style:"width: 100%"}))}if(f==="cascader"){const E=(O=(I=o.schema.props)==null?void 0:I.options)!=null?O:t.value;return e.h(ze,U(B(B(B({},A),P.value),S),{placeholder:T.value,clearable:g.value,options:E,style:"width: 100%"}))}if(f==="radio"||f==="radio-button"){const E=f==="radio"?De:ve;return e.h(Xe,B(B(B({},A),x.value),S),{default:()=>t.value.map(G=>e.h(E,{key:G[l.value],value:G[l.value]},{default:()=>String(G[c.value])}))})}if(f==="checkbox")return e.h(He,B(B(B({},A),x.value),S),{default:()=>t.value.map(E=>e.h(Oe,{key:E[l.value],value:E[l.value]},{default:()=>String(E[c.value])}))});if(f==="date-picker")return e.h(qe,U(B(B(B({},A),k.value),S),{style:"width: 100%"}));const R=Wo[f];if(R){const E=(K=(z=Le[f])==null?void 0:z.call(Le,{placeholder:T.value,clearable:g.value}))!=null?K:{};return e.h(R,B(B(B(B({},A),x.value),S),E))}return e.h(Re,U(B(B(B({},A),x.value),S),{placeholder:T.value,clearable:g.value,style:"width: 100%"}))}}}),Jo=2,Zo=e.defineComponent({name:"SyProForm",__name:"ProForm",props:{model:{},schema:{},cols:{},labelWidth:{},labelPosition:{},disabled:{type:Boolean,default:!1},size:{},showQueryBtn:{type:Boolean,default:!0},showResetBtn:{type:Boolean,default:!0},queryBtnText:{default:"查询"},resetBtnText:{default:"重置"},loading:{type:Boolean,default:!1},collapsible:{type:[Boolean,Number],default:!1},defaultCollapsed:{type:Boolean,default:!0},buttonAlign:{default:"inline"}},emits:["search","reset"],setup(o,{expose:s,emit:r}){var ce,ie;const i=e.useSlots(),c=o,l=(ce=e.inject(m.SY_UI_CONFIG_KEY,{}).proForm)!=null?ce:{},n=(ie=m.getMasterConfig(m.detectMicroAppName()).proForm)!=null?ie:{},t=e.computed(()=>{var u,N,w;return(w=(N=(u=n.cols)!=null?u:c.cols)!=null?N:l.cols)!=null?w:4}),a=e.computed(()=>{var u,N,w;return(w=(N=(u=n.labelWidth)!=null?u:c.labelWidth)!=null?N:l.labelWidth)!=null?w:"auto"}),b=e.computed(()=>{var u,N,w;return(w=(N=(u=n.labelPosition)!=null?u:c.labelPosition)!=null?N:l.labelPosition)!=null?w:"right"}),P=e.computed(()=>{var u,N;return(N=(u=n.size)!=null?u:c.size)!=null?N:l.size}),x=r;y.useNamespace("pro-form");const V=e.ref(),T=e.ref(c.defaultCollapsed),g=e.ref("xl");function k(){const u=window.innerWidth;return u<768?"xs":u<992?"sm":u<1200?"md":u<1920?"lg":"xl"}function h(){g.value=k()}e.onMounted(()=>{g.value=k(),window.addEventListener("resize",h)}),e.onUnmounted(()=>{window.removeEventListener("resize",h)});const f=e.computed(()=>c.schema.filter(u=>typeof u.hidden=="function"?!u.hidden(c.model):!u.hidden).sort((u,N)=>{var w,L;return((w=u.order)!=null?w:0)-((L=N.order)!=null?L:0)}));function S(u){var w,L,H;const N=g.value;return(H=(L=(w=u[N])==null?void 0:w.span)!=null?L:u.span)!=null?H:1}function A(u){var w,L,H;const N=g.value;return(H=(L=(w=u[N])==null?void 0:w.offset)!=null?L:u.offset)!=null?H:0}const R=e.computed(()=>{var w,L,H,re,de,ae;const u=t.value;if(typeof u=="number")return u;const N=g.value;return(ae=(de=(re=(H=(L=(w=u==null?void 0:u[N])!=null?w:u==null?void 0:u.xl)!=null?L:u==null?void 0:u.lg)!=null?H:u==null?void 0:u.md)!=null?re:u==null?void 0:u.sm)!=null?de:u==null?void 0:u.xs)!=null?ae:4}),D=e.computed(()=>{const u=c.collapsible;return typeof u=="number"&&u>0?u:1}),_=e.computed(()=>{if(!c.collapsible)return-1;const u=c.buttonAlign==="inline"&&(c.showQueryBtn||c.showResetBtn||!!i["extra-buttons"]||!!i.buttons),N=R.value*D.value-(u?Jo:0);if(N<=0)return 0;let w=0;for(let L=0;L<f.value.length;L++){const H=f.value[L];if(w+=S(H)+A(H),w>N)return L}return-1}),F=e.computed(()=>_.value>=0),$=e.computed(()=>({display:"grid",gridTemplateColumns:`repeat(${R.value}, 1fr)`,gap:"0 16px"}));function I(u){const N=S(u),w=A(u),L={gridColumn:`span ${N}`};return w>0&&(L.marginLeft=`calc(${w/R.value*100}% + ${w*16}px)`),L}const O=e.computed(()=>{const u=R.value,N=f.value,w=c.collapsible&&T.value&&_.value>=0?_.value:N.length;let L=0;for(let H=0;H<w;H++){const re=S(N[H]),de=A(N[H]),ae=L+re+de;L=ae>=u?ae%u:ae}return L}),z=e.computed(()=>{const u=O.value;return{gridColumn:`${u===0?1:u+1} / -1`}}),K={left:"flex-start",center:"center",right:"flex-end"},E=e.computed(()=>{var N;const u={display:"flex",alignItems:"center",justifyContent:(N=K[c.buttonAlign])!=null?N:"flex-start",gap:"8px",marginTop:"4px",flexWrap:"wrap"};if(c.buttonAlign==="left"&&b.value!=="top"){const w=a.value;w&&w!=="auto"&&(u.paddingLeft=typeof w=="number"?`${w}px`:String(w))}return u}),G=e.computed(()=>c.showQueryBtn||c.showResetBtn||!!i["extra-buttons"]||!!i.buttons);function J(u,N){c.model[u]=N}function Z(){var u;(u=V.value)==null||u.validate(N=>{N&&x("search",c.model)})}function ne(){var u,N;for(const w of c.schema)J(w.field,(u=w.defaultValue)!=null?u:null);(N=V.value)==null||N.clearValidate(),x("reset",c.model)}return s({formRef:V,validate:u=>{var N;return(N=V.value)==null?void 0:N.validate(u)},validateField:(u,N)=>{var w;return(w=V.value)==null?void 0:w.validateField(u,N)},resetFields:ne,clearValidate:u=>{var N;return(N=V.value)==null?void 0:N.clearValidate(u)}}),(u,N)=>(e.openBlock(),e.createBlock(e.unref(Ke),{ref_key:"formRef",ref:V,class:"sy-pro-form",model:o.model,"label-width":a.value,"label-position":b.value,disabled:o.disabled,size:P.value,onSubmit:N[2]||(N[2]=e.withModifiers(()=>{},["prevent"]))},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"sy-pro-form__grid",style:e.normalizeStyle($.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(w,L)=>{var H;return e.openBlock(),e.createElementBlock(e.Fragment,{key:w.field},[!o.collapsible||!T.value||_.value<0||L<_.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"sy-pro-form__grid-item",style:e.normalizeStyle(I(w))},[e.createCommentVNode(" slot 类型:渲染具名插槽,用户自行提供完整的 sy-form-item 内容 "),w.component==="slot"?e.renderSlot(u.$slots,w.field,{key:0,item:w}):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createCommentVNode(" 内置组件类型:走原有渲染路径 "),e.createVNode(e.unref(Ge),e.mergeProps({prop:w.field,label:(H=w.label)!=null?H:""},{ref_for:!0},w.labelWidth!=null?{labelWidth:w.labelWidth}:{},{rules:w.rules}),e.createSlots({default:e.withCtx(()=>[e.createVNode(st,{"model-value":o.model[w.field],schema:w,model:o.model,"onUpdate:modelValue":re=>J(w.field,re)},null,8,["model-value","schema","model","onUpdate:modelValue"])]),_:2},[w.tooltip?{name:"label",fn:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(w.label),1),e.createVNode(e.unref(be),{content:w.tooltip,placement:"top"},{default:e.withCtx(()=>[e.createVNode(e.unref(he),{class:"sy-pro-form__tip-icon",style:{"margin-left":"4px","vertical-align":"middle",cursor:"pointer"}},{default:e.withCtx(()=>[e.createVNode(e.unref(X.InfoFilled))]),_:1})]),_:1},8,["content"])]),key:"0"}:void 0]),1040,["prop","label","rules"])],2112))],4)):e.createCommentVNode("v-if",!0)],64)}),128)),e.createCommentVNode(" 默认插槽:额外自定义字段 "),e.renderSlot(u.$slots,"default"),e.createCommentVNode(" 按钮区 —— inline 模式:在网格内贴右 "),o.buttonAlign==="inline"&&(G.value||o.collapsible&&F.value)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"sy-pro-form__grid-item sy-pro-form__buttons",style:e.normalizeStyle(z.value)},[e.renderSlot(u.$slots,"buttons",{},()=>[o.showQueryBtn?(e.openBlock(),e.createBlock(e.unref(W),{key:0,type:"primary",loading:o.loading,onClick:Z},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.queryBtnText),1)]),_:1},8,["loading"])):e.createCommentVNode("v-if",!0),o.showResetBtn?(e.openBlock(),e.createBlock(e.unref(W),{key:1,onClick:ne},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.resetBtnText),1)]),_:1})):e.createCommentVNode("v-if",!0),e.renderSlot(u.$slots,"extra-buttons")]),o.collapsible&&F.value?(e.openBlock(),e.createBlock(e.unref(W),{key:0,type:"primary",link:"",onClick:N[0]||(N[0]=w=>T.value=!T.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(T.value?"展开":"合并")+" ",1),e.createVNode(e.unref(he),{style:{"margin-left":"2px"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(T.value?e.unref(X.ArrowDown):e.unref(X.ArrowUp))))]),_:1})]),_:1})):e.createCommentVNode("v-if",!0)],4)):e.createCommentVNode("v-if",!0)],4),e.createCommentVNode(" 按钮区 —— 独立成行模式(left / center / right) "),o.buttonAlign!=="inline"&&(G.value||o.collapsible&&F.value)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"sy-pro-form__footer",style:e.normalizeStyle(E.value)},[e.renderSlot(u.$slots,"buttons",{},()=>[o.showQueryBtn?(e.openBlock(),e.createBlock(e.unref(W),{key:0,type:"primary",loading:o.loading,onClick:Z},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.queryBtnText),1)]),_:1},8,["loading"])):e.createCommentVNode("v-if",!0),o.showResetBtn?(e.openBlock(),e.createBlock(e.unref(W),{key:1,onClick:ne},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.resetBtnText),1)]),_:1})):e.createCommentVNode("v-if",!0),e.renderSlot(u.$slots,"extra-buttons")]),o.collapsible&&F.value?(e.openBlock(),e.createBlock(e.unref(W),{key:0,type:"primary",link:"",onClick:N[1]||(N[1]=w=>T.value=!T.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(T.value?"展开":"合并")+" ",1),e.createVNode(e.unref(he),{style:{"margin-left":"2px"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(T.value?e.unref(X.ArrowDown):e.unref(X.ArrowUp))))]),_:1})]),_:1})):e.createCommentVNode("v-if",!0)],4)):e.createCommentVNode("v-if",!0)]),_:3},8,["model","label-width","label-position","disabled","size"]))}}),rt=m.withInstall(Zo);function Xo(o="id"){const s=e.ref([]),r=e.computed(()=>s.value.length>0),i=e.computed(()=>s.value.map(n=>n[o]));function c(n){s.value=n}function l(){s.value=[]}return{selectedList:s,isSelected:r,selectedListIds:i,selectionChange:c,clearSelection:l}}function vo(o){const{request:s,params:r,searchParam:i,postData:c,requestError:l,pagination:n=!0,staticData:t,initialPageSize:a}=o,b=e.ref(!1),P=e.ref([]),x=e.reactive({pageNum:1,pageSize:a!=null?a:10,total:0}),V=e.reactive({}),T=e.reactive({}),g=e.computed(()=>{if(!(t!=null&&t.value))return P.value;if(!n)return t.value;const _=(x.pageNum-1)*x.pageSize;return t.value.slice(_,_+x.pageSize)});function k(_,F){for(const[$,I]of Object.entries(_))(I!=null&&I!==""||I===!1||I===0)&&(F[$]=I)}function h(){const _={};return k(T,_),i!=null&&i.value&&k(i.value,_),_}function f(){return Te(this,null,function*(){var _,F,$;if(t!=null&&t.value){x.total=t.value.length;return}if(s)try{b.value=!0;const I=h(),O=B(B(B({},V),I),(_=r==null?void 0:r.value)!=null?_:{});n&&(O.pageNum=x.pageNum,O.pageSize=x.pageSize);const z=yield s(O);if(!z.success){l==null||l(z);return}let K=(F=z.data)!=null?F:[];c&&(K=c(K)),P.value=K,n&&(x.total=($=z.total)!=null?$:0)}catch(I){l==null||l(I)}finally{b.value=!1}})}function S(){x.pageNum=1,f()}function A(){var _;x.pageNum=1;for(const F of Object.keys(T))T[F]=(_=V[F])!=null?_:null;f()}function R(_){x.pageSize=_,x.pageNum=1,f()}function D(_){x.pageNum=_,f()}return r&&e.watch(r,()=>f(),{deep:!0}),{loading:b,tableData:P,pageable:x,processTableData:g,searchParam:T,searchInitParam:V,getTableList:f,search:S,reset:A,handleSizeChange:R,handleCurrentChange:D}}function at(o){var r;const s=[];for(const i of o)(r=i.children)!=null&&r.length?s.push(i,...at(i.children)):s.push(i);return s}const lt={border:!1,stripe:!1,rowKey:"id",type:"classic",searchCols:4,pageSizes:[10,20,50,100],pageLayout:"total, sizes, prev, pager, next, jumper",autoHeight:!1};function es(o,s,r){var re,de,ae,ft;const c=(re=e.inject(m.SY_UI_CONFIG_KEY,{}).proTable)!=null?re:{},l=(de=m.getMasterConfig(m.detectMicroAppName()).proTable)!=null?de:{},n=new Proxy(o,{get(C,M,j){const Y=l[M];if(Y!==void 0)return Y;const Q=Reflect.get(C,M,j);if(Q!==void 0)return Q;const q=M;if(q in c&&c[q]!==void 0)return c[q];const ee=M;if(ee in lt)return lt[ee]}}),t=n,a=e.ref(),b=e.ref(),P=e.ref(),x=e.ref(t.type!=="unify"),V=e.ref(null),T=e.computed(()=>e.reactive(at(o.columns))),g=e.ref(new Map);function k(C){return Te(this,null,function*(){var j;if(!C.enum||!C.prop)return;const M=C.enum;if(typeof M=="function"){g.value.set(C.prop,[]);try{const Y=yield M();g.value.set(C.prop,Y)}catch(Y){}}else g.value.set(C.prop,Array.isArray(M)?M:(j=M.value)!=null?j:[])})}e.provide("proTableEnumMap",g),e.provide("proTableSlots",r);const h=e.computed(()=>T.value.filter(C=>{var M,j;return((M=C.search)==null?void 0:M.component)||((j=C.search)==null?void 0:j.render)}).sort((C,M)=>{var j,Y,Q,q;return((Y=(j=C.search)==null?void 0:j.order)!=null?Y:0)-((q=(Q=M.search)==null?void 0:Q.order)!=null?q:0)})),f=e.computed(()=>h.value.filter(C=>{var M;return!!((M=C.search)!=null&&M.quick)}).sort((C,M)=>{var Q,q,ee,le,Ce,we;const j=typeof((Q=C.search)==null?void 0:Q.quick)=="object"&&(ee=(q=C.search)==null?void 0:q.quick.order)!=null?ee:0,Y=typeof((le=M.search)==null?void 0:le.quick)=="object"&&(we=(Ce=M.search)==null?void 0:Ce.quick.order)!=null?we:0;return j-Y})),S=e.computed(()=>h.value.map(C=>{var M,j,Y,Q,q,ee,le,Ce,we,ut,ht,St,yt,gt,bt;return{field:(Y=(j=(M=C.search)==null?void 0:M.key)!=null?j:C.prop)!=null?Y:"",label:C.label,component:(Q=C.search)==null?void 0:Q.component,props:(q=C.search)==null?void 0:q.props,options:(()=>{var Ct,wt,At,kt,Nt,Pt,xt;if(((Ct=C.search)==null?void 0:Ct.options)!==void 0){const Fe=C.search.options;return Array.isArray(Fe)?Fe:(wt=e.unref(Fe))!=null?wt:void 0}if(!(!C.enum||(kt=(At=C.search)==null?void 0:At.component)!=null&&kt.includes("tree")))return typeof C.enum=="function"?(Pt=g.value.get((Nt=C.prop)!=null?Nt:""))!=null?Pt:void 0:Array.isArray(C.enum)?C.enum:(xt=e.unref(C.enum))!=null?xt:void 0})(),fieldNames:C.fieldNames,defaultValue:(ee=C.search)==null?void 0:ee.defaultValue,span:(le=C.search)==null?void 0:le.span,offset:(Ce=C.search)==null?void 0:Ce.offset,order:(we=C.search)==null?void 0:we.order,render:(ut=C.search)==null?void 0:ut.render,xs:(ht=C.search)==null?void 0:ht.xs,sm:(St=C.search)==null?void 0:St.sm,md:(yt=C.search)==null?void 0:yt.md,lg:(gt=C.search)==null?void 0:gt.lg,xl:(bt=C.search)==null?void 0:bt.xl}})),A=e.ref({}),R={};function D(){var C,M,j,Y,Q;for(const q of Object.keys(A.value))delete A.value[q];for(const q of Object.keys(R))delete R[q];for(const q of h.value){const ee=(j=(M=(C=q.search)==null?void 0:C.key)!=null?M:q.prop)!=null?j:"",le=(Q=(Y=q.search)==null?void 0:Y.defaultValue)!=null?Q:null;A.value[ee]=le,R[ee]=le}}const{loading:_,processTableData:F,pageable:$,getTableList:I,handleSizeChange:O,handleCurrentChange:z}=vo({request:o.request,params:e.toRef(o,"params"),searchParam:A,postData:o.postData,requestError:o.requestError,pagination:o.pagination,staticData:e.computed(()=>o.data),initialPageSize:(ft=(ae=t.pageSize)!=null?ae:c.pageSize)!=null?ft:10});function K(){Object.assign($,{pageNum:1}),I(),s("search")}function E(){D(),Object.assign($,{pageNum:1}),I(),s("reset")}const{selectedList:G,isSelected:J,selectedListIds:Z,selectionChange:ne,clearSelection:ce}=Xo(t.rowKey);function ie(C){var M;V.value=C[(M=t.rowKey)!=null?M:"id"]}function u(){var C,M;V.value=null,(M=(C=a.value)==null?void 0:C.setCurrentRow)==null||M.call(C,void 0)}function N(C){I()}function w(C){return t.toolButton===!0?!0:t.toolButton===!1?!1:t.toolButton.includes(C)}function L(){x.value=!x.value}function H(){var C,M;(M=(C=P.value)==null?void 0:C.open)==null||M.call(C)}return e.onMounted(()=>Te(this,null,function*(){for(const C of T.value)k(C);D(),o.manualRequest||I()})),{props:n,type:t.type,tableRef:a,formRef:b,colSettingRef:P,flatColumns:T,enumMap:g,searchColumns:h,quickSearchColumns:f,searchSchema:S,searchParam:A,searchInitParam:R,loading:_,tableData:F,pageable:$,selectedList:G,selectedListIds:Z,isSelected:J,radio:V,isShowSearch:x,getTableList:I,search:K,reset:E,clearSelection:ce,clearRadio:u,handleSizeChange:O,handleCurrentChange:z,onSortChange:N,onRadioChange:ie,selectionChange:ne,showToolBtn:w,toggleSearch:L,openColSetting:H}}const ts={key:1,style:{color:"var(--el-text-color-placeholder)"}},ns=e.defineComponent({__name:"ColSetting",props:{columns:{}},setup(o,{expose:s}){const r=o,i=e.ref(!1),c=e.computed(()=>r.columns.filter(a=>{if(a.type&&["selection","index","expand","radio","sort"].includes(a.type))return!1;const b=a.isSetting;return b===void 0||b===!0}));e.computed(()=>c.value.every(a=>a.isShow!==!1)),e.computed(()=>{const a=c.value.length,b=c.value.filter(P=>P.isShow!==!1).length;return b>0&&b<a});const l=new WeakMap;function n(){c.value.forEach(a=>{l.has(a)||l.set(a,{isShow:a.isShow!==!1,sortable:a.sortable})})}function t(){n(),i.value=!0}return s({open:t}),(a,b)=>(e.openBlock(),e.createBlock(e.unref(Ue),{modelValue:i.value,"onUpdate:modelValue":b[0]||(b[0]=P=>i.value=P),title:"列设置",size:"380px","append-to-body":!0,class:"sy-pro-table__col-setting"},{default:e.withCtx(()=>[e.createCommentVNode(" 全选 + 重置 "),e.createCommentVNode(` <div class="sy-pro-table__col-setting-toolbar">
5
5
  <sy-checkbox :model-value="checkAll" :indeterminate="isIndeterminate" @change="onCheckAll"> 全部显示 </sy-checkbox>
6
6
  <sy-button type="primary" link @click="onReset">重置</sy-button>
7
- </div> `),e.createCommentVNode(" 列配置表格 "),e.createVNode(e.unref(Ve),{data:i.value,"row-key":"prop",border:!0,"default-expand-all":"","tree-props":{children:"_children"}},{empty:e.withCtx(()=>[...g[1]||(g[1]=[e.createElementVNode("div",{style:{padding:"24px 0",color:"var(--el-text-color-secondary)","font-size":"13px"}},"暂无可配置列",-1)])]),default:e.withCtx(()=>[e.createVNode(e.unref(Y),{prop:"label",label:"列名",align:"left","min-width":"100"},{default:e.withCtx(({row:P})=>{var N,R;return[e.createTextVNode(e.toDisplayString((R=(N=P.label)!=null?N:P.prop)!=null?R:"—"),1)]}),_:1}),e.createVNode(e.unref(Y),{prop:"isShow",label:"显示",align:"center",width:"80"},{default:e.withCtx(({row:P})=>[e.createVNode(e.unref(Ce),{"model-value":P.isShow!==!1,"onUpdate:modelValue":N=>{P.isShow=N}},null,8,["model-value","onUpdate:modelValue"])]),_:1}),e.createVNode(e.unref(Y),{prop:"sortable",label:"排序",align:"center",width:"80"},{default:e.withCtx(({row:P})=>[typeof P.sortable=="boolean"?(e.openBlock(),e.createBlock(e.unref(Ce),{key:0,modelValue:P.sortable,"onUpdate:modelValue":N=>P.sortable=N},null,8,["modelValue","onUpdate:modelValue"])):(e.openBlock(),e.createElementBlock("span",Go,"—"))]),_:1})]),_:1},8,["data"])]),_:1},8,["modelValue"]))}}),ve=e.defineComponent({__name:"ProTableColSetting",props:{context:{}},setup(o,{expose:s}){const c=o.context.flatColumns,i=e.ref();function l(){var n,t;(t=(n=i.value)==null?void 0:n.open)==null||t.call(n)}return s({open:l}),(n,t)=>(e.openBlock(),e.createBlock(Wo,{ref_key:"innerRef",ref:i,columns:e.unref(c)},null,8,["columns"]))}}),Qo={key:0,class:"sy-pro-table__pagination"},et=e.defineComponent({__name:"ProTablePagination",props:{context:{}},setup(o){const s=o,r=s.context.props,c=s.context.pageable,i=s.context.handleSizeChange,l=s.context.handleCurrentChange;return(n,t)=>e.unref(r).pagination&&e.unref(c).total>0?(e.openBlock(),e.createElementBlock("div",Qo,[e.renderSlot(n.$slots,"pagination",{},()=>[e.createVNode(e.unref(je),{"current-page":e.unref(c).pageNum,"onUpdate:currentPage":t[0]||(t[0]=a=>e.unref(c).pageNum=a),"page-size":e.unref(c).pageSize,"onUpdate:pageSize":t[1]||(t[1]=a=>e.unref(c).pageSize=a),total:e.unref(c).total,"page-sizes":e.unref(r).pageSizes,layout:e.unref(r).pageLayout,background:"",onSizeChange:e.unref(i),onCurrentChange:e.unref(l)},null,8,["current-page","page-size","total","page-sizes","layout","onSizeChange","onCurrentChange"])])])):e.createCommentVNode("v-if",!0)}}),tt=e.defineComponent({__name:"ProTableSearchRenderer",props:{context:{},cols:{default:4},showQueryBtn:{type:Boolean,default:!0},showResetBtn:{type:Boolean,default:!0},collapsible:{type:Boolean,default:!0}},setup(o,{expose:s}){const r=o,c=r.context.searchParam,i=r.context.searchSchema,l=r.context.search,n=r.context.reset,t=e.ref();return s({validate:a=>{var g,P;return(P=(g=t.value)==null?void 0:g.validate)==null?void 0:P.call(g,a)},resetFields:()=>{var a,g;return(g=(a=t.value)==null?void 0:a.resetFields)==null?void 0:g.call(a)},clearValidate:a=>{var g,P;return(P=(g=t.value)==null?void 0:g.clearValidate)==null?void 0:P.call(g,a)},formRef:t}),(a,g)=>(e.openBlock(),e.createBlock(e.unref(Ze),{ref_key:"innerFormRef",ref:t,model:e.unref(c),schema:e.unref(i),cols:o.cols,"show-query-btn":o.showQueryBtn,"show-reset-btn":o.showResetBtn,collapsible:o.collapsible,onSearch:e.unref(l),onReset:e.unref(n)},null,8,["model","schema","cols","show-query-btn","show-reset-btn","collapsible","onSearch","onReset"]))}}),Yo=e.defineComponent({__name:"ProTableColumn",props:{column:{}},emits:["radioChange"],setup(o){const s=o,r=e.inject("proTableEnumMap",{value:new Map}),c=e.inject("proTableSlots",{}),i=e.computed(()=>{const C=s.column.isShow;return C===void 0?!0:e.unref(C)}),l=e.computed(()=>{var A,f,m,y;const C=s.column.enum;return typeof C=="function"?(f=r.value.get((A=s.column.prop)!=null?A:""))!=null?f:[]:C?e.unref(C):(y=r.value.get((m=s.column.prop)!=null?m:""))!=null?y:[]});function n(C){var x,V;const{fieldNames:A}=s.column,f=(x=A==null?void 0:A.label)!=null?x:"label",m=(V=A==null?void 0:A.value)!=null?V:"value",y=l.value.find(_=>_[m]===C);return y?y[f]:String(C!=null?C:"")}function t(C){var y;const{fieldNames:A}=s.column,f=(y=A==null?void 0:A.value)!=null?y:"value",m=l.value.find(x=>x[f]===C);return(m==null?void 0:m.tagType)||void 0}function a(C){return C.split(".").reduce((f,m,y)=>y===0?f+m:f+m.charAt(0).toUpperCase()+m.slice(1),"")}function g(C){var V;const{column:A}=s;if(A.render)return A.render(C);if(A.type==="expand"){const _="expand";return c[_]?c[_](C):null}const f=(V=A.prop)!=null?V:"",m=C.row[f],y=a(f);if(c[y])return c[y](C);if(A.isFilterEnum!==!1&&l.value.length>0){if(A.tag){const _=t(m);return e.h(be,_?{type:_}:{},()=>n(m))}return e.h("span",{},n(m))}return A.tag?e.h(be,{},()=>String(m!=null?m:"")):e.h("span",{},String(m!=null?m:""))}function P(C){var m,y;const{column:A}=s;if(A.headerRender)return A.headerRender(C);const f=`${a((m=A.prop)!=null?m:"")}Header`;return c[f]?c[f](C):(y=A.label)!=null?y:""}const N=e.defineComponent({name:"ProTableExpandRenderer",props:{scope:{type:Object,required:!0}},setup(C){return()=>c.expand?c.expand(C.scope):null}}),R=e.defineComponent({name:"ProTableHeaderRenderer",props:{scope:{type:Object,required:!0}},setup(C){return()=>P(C.scope)}}),I=e.defineComponent({name:"ProTableCellRenderer",props:{scope:{type:Object,required:!0}},setup(C){return()=>g(C.scope)}});return(C,A)=>{var m;const f=e.resolveComponent("ProTableColumn",!0);return i.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createCommentVNode(" 多级表头 "),(m=o.column.children)!=null&&m.length?(e.openBlock(),e.createBlock(e.unref(Y),{key:0,label:o.column.label,align:o.column.align},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.column.children,y=>{var x;return e.openBlock(),e.createBlock(f,{key:(x=y.prop)!=null?x:y.label,column:y},null,8,["column"])}),128))]),_:1},8,["label","align"])):o.column.type&&["selection","index"].includes(o.column.type)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createCommentVNode(" 特殊列:selection / index(自闭合,无需 slot) "),e.createVNode(e.unref(Y),e.normalizeProps(e.guardReactiveProps(o.column)),null,16)],2112)):o.column.type==="expand"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createCommentVNode(" expand 列:必须通过 #default slot 提供展开行内容 "),e.createVNode(e.unref(Y),e.normalizeProps(e.guardReactiveProps(o.column)),{default:e.withCtx(y=>[e.createVNode(e.unref(N),{scope:y},null,8,["scope"])]),_:1},16)],2112)):o.column.type==="radio"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createCommentVNode(" radio 列 "),e.createVNode(e.unref(Y),e.mergeProps(o.column,{width:"60",align:"center"}),{default:e.withCtx(y=>[e.createVNode(e.unref(xe),{modelValue:y.row.__radioSelected,"onUpdate:modelValue":x=>y.row.__radioSelected=x,value:!0,onChange:()=>C.$emit("radioChange",y.row)},null,8,["modelValue","onUpdate:modelValue","onChange"])]),_:1},16)],2112)):o.column.type==="sort"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createCommentVNode(" sort 列(拖拽手柄) "),e.createVNode(e.unref(Y),e.mergeProps(o.column,{width:"60",align:"center",label:"排序"}),{default:e.withCtx(()=>[e.createVNode(e.unref(be),{class:"move",style:{cursor:"move"}},{default:e.withCtx(()=>[e.createVNode(e.unref(le),null,{default:e.withCtx(()=>[e.createVNode(e.unref(G.DCaret))]),_:1})]),_:1})]),_:1},16)],2112)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[e.createCommentVNode(" 普通列 "),e.createVNode(e.unref(Y),e.normalizeProps(e.guardReactiveProps(o.column)),{header:e.withCtx(y=>[e.createVNode(e.unref(R),{scope:y},null,8,["scope"])]),default:e.withCtx(y=>[e.createVNode(e.unref(I),{scope:y},null,8,["scope"])]),_:1},16)],2112))],64)):e.createCommentVNode("v-if",!0)}}}),Jo={class:"sy-pro-table__table"},Zo={class:"sy-pro-table__empty"},nt=e.defineComponent({__name:"ProTableTable",props:{context:{},tableHeight:{},onDragSort:{type:Function}},setup(o){const s=o,r=s.context.props,c=e.computed(()=>s.tableHeight),i=s.context.tableRef,l=s.context.loading,n=s.context.tableData,t=s.context.flatColumns,a=s.context.selectionChange,g=s.context.onSortChange,P=s.context.onRadioChange;function N(I){i.value=I}function R(){var A;if(!r.columns.some(f=>f.type==="sort")||!i.value)return;const C=(A=i.value.$el)==null?void 0:A.querySelector("tbody");C&&Ae.create(C,{handle:".move",animation:150,onEnd({newIndex:f,oldIndex:m}){var V;if(f===m)return;const y=n.value,x=y.splice(m,1)[0];y.splice(f,0,x),(V=s.onDragSort)==null||V.call(s,{newIndex:f,oldIndex:m})}})}return e.onMounted(()=>{e.nextTick(()=>R())}),(I,C)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createCommentVNode(" wrapper 保证 querySelector 能找到 .sy-pro-table__table,height 直接传给 el-table "),e.createElementVNode("div",Jo,[e.withDirectives((e.openBlock(),e.createBlock(e.unref(Ve),{ref:N,height:c.value,data:e.unref(n),border:e.unref(r).border,stripe:e.unref(r).stripe,"row-key":e.unref(r).rowKey,size:e.unref(r).size,"highlight-current-row":e.unref(r).highlightCurrentRow,onSelectionChange:e.unref(a),onSortChange:e.unref(g)},{append:e.withCtx(()=>[e.renderSlot(I.$slots,"append")]),empty:e.withCtx(()=>[e.renderSlot(I.$slots,"empty",{},()=>[e.createElementVNode("div",Zo,[e.createVNode(e.unref(Ee),{description:"暂无数据"})])])]),default:e.withCtx(()=>[e.renderSlot(I.$slots,"default"),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t),A=>{var f,m;return e.openBlock(),e.createBlock(Yo,{key:(m=(f=A.prop)!=null?f:A.label)!=null?m:A.type,column:A,onRadioChange:e.unref(P)},null,8,["column","onRadioChange"])}),128))]),_:3},8,["height","data","border","stripe","row-key","size","highlight-current-row","onSelectionChange","onSortChange"])),[[e.unref(d.AdapterLoadingDirective),e.unref(l)]])])],2112))}}),Xo={key:0,class:"sy-pro-table__search"},vo={class:"sy-pro-table__main"},es={class:"sy-pro-table__header"},ts={class:"sy-pro-table__header-left"},ns={class:"sy-pro-table__header-right"},ot=e.defineComponent({__name:"ClassicLayout",props:{context:{},onDragSort:{type:Function}},setup(o){const s=o,r=s.context.props,c=s.context.isShowSearch,i=s.context.searchColumns,l=s.context.selectedList,n=s.context.selectedListIds,t=s.context.isSelected,a=s.context.getTableList,g=s.context.openColSetting,P=s.context.toggleSearch,N=s.context.showToolBtn,R=s.context.formRef,I=s.context.colSettingRef,C=e.ref(),A=e.ref(void 0);function f(){var z;if(r.height!==void 0){A.value=r.height;return}const V=C.value;if(!V)return;const _=V.querySelector(".sy-pro-table__table"),T=V.querySelector(".sy-pro-table__pagination");if(!_)return;const $=_.getBoundingClientRect().top,L=T?T.getBoundingClientRect().height:0,E=(z=r.heightOffset)!=null?z:0,q=Math.floor(window.innerHeight-$-L-E);q>80&&(A.value=q)}e.watch(c,()=>e.nextTick(f));let m=null;e.onMounted(()=>{e.nextTick(f),window.addEventListener("resize",f),C.value&&(m=new ResizeObserver(f),m.observe(C.value))}),e.onUnmounted(()=>{window.removeEventListener("resize",f),m==null||m.disconnect()});function y(V){R.value=V}function x(V){I.value=V}return(V,_)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"layoutRef",ref:C,class:"sy-pro-table sy-pro-table--classic"},[e.unref(r).showSearch&&e.unref(c)&&e.unref(i).length>0?(e.openBlock(),e.createElementBlock("div",Xo,[e.createVNode(tt,{ref:y,context:o.context,cols:e.unref(r).searchCols},null,8,["context","cols"])])):e.createCommentVNode("v-if",!0),e.createElementVNode("div",vo,[e.createElementVNode("div",es,[e.createElementVNode("div",ts,[e.renderSlot(V.$slots,"tableHeader",{selectedList:e.unref(l),selectedListIds:e.unref(n),isSelected:e.unref(t)})]),e.createElementVNode("div",ns,[e.renderSlot(V.$slots,"toolButton",{},()=>[e.unref(N)("refresh")?(e.openBlock(),e.createBlock(e.unref(pe),{key:0,content:"刷新",placement:"top"},{default:e.withCtx(()=>[e.createVNode(e.unref(U),{icon:e.unref(G.Refresh),circle:"",onClick:e.unref(a)},null,8,["icon","onClick"])]),_:1})):e.createCommentVNode("v-if",!0),e.unref(N)("setting")?(e.openBlock(),e.createBlock(e.unref(pe),{key:1,content:"列设置",placement:"top"},{default:e.withCtx(()=>[e.createVNode(e.unref(U),{icon:e.unref(G.Operation),circle:"",onClick:e.unref(g)},null,8,["icon","onClick"])]),_:1})):e.createCommentVNode("v-if",!0),e.unref(r).showSearch&&e.unref(N)("search")&&e.unref(i).length>0?(e.openBlock(),e.createBlock(e.unref(pe),{key:2,content:"搜索",placement:"top"},{default:e.withCtx(()=>[e.createVNode(e.unref(U),{icon:e.unref(G.Search),circle:"",onClick:e.unref(P)},null,8,["icon","onClick"])]),_:1})):e.createCommentVNode("v-if",!0)])])]),e.createVNode(nt,{context:o.context,"table-height":A.value,"on-drag-sort":o.onDragSort},{append:e.withCtx(()=>[e.renderSlot(V.$slots,"append")]),empty:e.withCtx(()=>[e.renderSlot(V.$slots,"empty")]),default:e.withCtx(()=>[e.renderSlot(V.$slots,"default")]),_:3},8,["context","table-height","on-drag-sort"]),e.createVNode(et,{context:o.context},{pagination:e.withCtx(()=>[e.renderSlot(V.$slots,"pagination")]),_:3},8,["context"])]),e.createVNode(ve,{ref:x,context:o.context},null,8,["context"])],512))}}),os=e.defineComponent({__name:"CustomLayout",props:{context:{},onDragSort:{type:Function}},setup(o){return(s,r)=>(e.openBlock(),e.createBlock(ot,{context:o.context,"on-drag-sort":o.onDragSort},{tableHeader:e.withCtx(c=>[e.renderSlot(s.$slots,"tableHeader",e.normalizeProps(e.guardReactiveProps(c)))]),toolButton:e.withCtx(()=>[e.renderSlot(s.$slots,"toolButton")]),append:e.withCtx(()=>[e.renderSlot(s.$slots,"append")]),empty:e.withCtx(()=>[e.renderSlot(s.$slots,"empty")]),pagination:e.withCtx(()=>[e.renderSlot(s.$slots,"pagination")]),default:e.withCtx(()=>[e.renderSlot(s.$slots,"default")]),_:3},8,["context","on-drag-sort"]))}}),ss=e.defineComponent({__name:"UnifyQuickSearch",props:{column:{},model:{},modelValue:{}},emits:["search","update:modelValue"],setup(o,{emit:s}){const r=o,c=s,i=e.inject("proTableEnumMap",{value:new Map}),l=e.computed(()=>{var P;const a=(P=r.column.search)==null?void 0:P.quick,g=typeof a=="object"&&(a==null?void 0:a.width)||220;return{width:typeof g=="number"?`${g}px`:g}}),n=e.computed(()=>{var P,N,R,I,C,A,f;const a=r.column,g=(()=>{var m,y,x,V,_,T,$;if(((m=a.search)==null?void 0:m.options)!==void 0){const L=a.search.options;return Array.isArray(L)?L:(y=e.unref(L))!=null?y:void 0}if(!(!a.enum||(V=(x=a.search)==null?void 0:x.component)!=null&&V.includes("tree")))return typeof a.enum=="function"?(T=i.value.get((_=a.prop)!=null?_:""))!=null?T:void 0:Array.isArray(a.enum)?a.enum:($=e.unref(a.enum))!=null?$:void 0})();return{field:(R=(N=(P=a.search)==null?void 0:P.key)!=null?N:a.prop)!=null?R:"",label:a.label,component:(I=a.search)==null?void 0:I.component,props:(C=a.search)==null?void 0:C.props,options:g,fieldNames:a.fieldNames,defaultValue:(A=a.search)==null?void 0:A.defaultValue,render:(f=a.search)==null?void 0:f.render}});function t(a){c("update:modelValue",a)}return(a,g)=>(e.openBlock(),e.createElementBlock("div",{class:"sy-pro-table__unify-quick",style:e.normalizeStyle(l.value),onKeyup:g[0]||(g[0]=e.withKeys(P=>c("search"),["enter"]))},[e.createVNode(Je,{schema:n.value,model:o.model,"model-value":o.modelValue,"onUpdate:modelValue":t},null,8,["schema","model","model-value"])],36))}}),rs={class:"sy-pro-table__unify-panel-inner"},as={class:"sy-pro-table__unify-panel-footer"},ls=e.defineComponent({__name:"UnifySearchPanel",props:{context:{},visible:{type:Boolean},excludeSelector:{default:""}},emits:["close"],setup(o,{emit:s}){const r=o,c=s,i=r.context.search,l=r.context.reset,n=r.context.formRef,t=e.ref();function a(N){n.value=N}let g=null;function P(N){var I;const R=N.target;R&&((I=t.value)!=null&&I.contains(R)||r.excludeSelector&&R.closest(r.excludeSelector)||R.closest(".el-popper")||R.closest(".el-overlay")||c("close"))}return e.watch(()=>r.visible,N=>{g==null||g(),g=null,N&&e.nextTick(()=>{document.addEventListener("mousedown",P,!0),g=()=>document.removeEventListener("mousedown",P,!0)})}),e.onBeforeUnmount(()=>g==null?void 0:g()),(N,R)=>(e.openBlock(),e.createBlock(e.Transition,{name:"sy-pro-table-panel",persisted:""},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"panelRootRef",ref:t,class:"sy-pro-table__unify-panel"},[e.createElementVNode("div",rs,[e.createVNode(tt,{ref:a,context:o.context,cols:1,"show-query-btn":!1,"show-reset-btn":!1,collapsible:!1},null,8,["context"]),e.createElementVNode("div",as,[e.createVNode(e.unref(U),{onClick:e.unref(l)},{default:e.withCtx(()=>[...R[0]||(R[0]=[e.createTextVNode("重置",-1)])]),_:1},8,["onClick"]),e.createVNode(e.unref(U),{type:"primary",onClick:e.unref(i)},{default:e.withCtx(()=>[...R[1]||(R[1]=[e.createTextVNode("查询",-1)])]),_:1},8,["onClick"])])])],512),[[e.vShow,o.visible]])]),_:1}))}}),cs={class:"sy-pro-table__main sy-pro-table__main--unify"},is={class:"sy-pro-table__header sy-pro-table__header--unify"},ds={class:"sy-pro-table__header-left"},ps={class:"sy-pro-table__header-right sy-pro-table__header-right--unify"},ms=e.defineComponent({__name:"UnifyLayout",props:{context:{},onDragSort:{type:Function}},setup(o){const s=o,r=s.context.props,c=s.context.isShowSearch,i=s.context.searchColumns,l=s.context.quickSearchColumns,n=s.context.searchParam,t=s.context.selectedList,a=s.context.selectedListIds,g=s.context.isSelected,P=s.context.search,N=s.context.toggleSearch,R=s.context.showToolBtn,I=s.context.colSettingRef,C=e.computed(()=>!!r.showSearch&&c.value&&i.value.length>0),A=e.ref(),f=e.ref(void 0);function m(){var u;if(r.height!==void 0){f.value=r.height;return}const _=A.value;if(!_)return;const T=_.querySelector(".sy-pro-table__table"),$=_.querySelector(".sy-pro-table__pagination");if(!T)return;const L=T.getBoundingClientRect().top,E=$?$.getBoundingClientRect().height:0,q=(u=r.heightOffset)!=null?u:0,z=Math.floor(window.innerHeight-L-E-q);z>80&&(f.value=z)}let y=null;e.onMounted(()=>{e.nextTick(m),window.addEventListener("resize",m),A.value&&(y=new ResizeObserver(m),y.observe(A.value))}),e.onUnmounted(()=>{window.removeEventListener("resize",m),y==null||y.disconnect()});function x(_){I.value=_}function V(){c.value&&N()}return(_,T)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"layoutRef",ref:A,class:"sy-pro-table sy-pro-table--unify"},[e.createElementVNode("div",cs,[e.createElementVNode("div",is,[e.createElementVNode("div",ds,[e.renderSlot(_.$slots,"tableHeader",{selectedList:e.unref(t),selectedListIds:e.unref(a),isSelected:e.unref(g)})]),e.createElementVNode("div",ps,[e.renderSlot(_.$slots,"toolButton",{},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l),$=>{var L,E,q,z,u;return e.openBlock(),e.createBlock(ss,{key:(E=(L=$.search)==null?void 0:L.key)!=null?E:$.prop,modelValue:e.unref(n)[(u=(z=(q=$.search)==null?void 0:q.key)!=null?z:$.prop)!=null?u:""],"onUpdate:modelValue":b=>{var k,M,F;return e.unref(n)[(F=(M=(k=$.search)==null?void 0:k.key)!=null?M:$.prop)!=null?F:""]=b},column:$,model:e.unref(n),onSearch:e.unref(P)},null,8,["modelValue","onUpdate:modelValue","column","model","onSearch"])}),128)),e.unref(l).length>0?(e.openBlock(),e.createBlock(e.unref(U),{key:0,type:"primary",onClick:e.unref(P)},{default:e.withCtx(()=>[...T[0]||(T[0]=[e.createTextVNode("查询",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("v-if",!0),e.unref(r).showSearch&&e.unref(R)("search")&&e.unref(i).length>0?(e.openBlock(),e.createBlock(e.unref(U),{key:1,class:"sy-pro-table__unify-advanced-btn",type:"primary",plain:"",onClick:e.unref(N)},{default:e.withCtx(()=>[...T[1]||(T[1]=[e.createTextVNode(" 高级筛选 ",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("v-if",!0)])])]),e.createVNode(ls,{context:o.context,visible:C.value,"exclude-selector":".sy-pro-table__unify-advanced-btn",onClose:V},null,8,["context","visible"]),e.createVNode(nt,{context:o.context,"table-height":f.value,"on-drag-sort":o.onDragSort},{append:e.withCtx(()=>[e.renderSlot(_.$slots,"append")]),empty:e.withCtx(()=>[e.renderSlot(_.$slots,"empty")]),default:e.withCtx(()=>[e.renderSlot(_.$slots,"default")]),_:3},8,["context","table-height","on-drag-sort"]),e.createVNode(et,{context:o.context},{pagination:e.withCtx(()=>[e.renderSlot(_.$slots,"pagination")]),_:3},8,["context"])]),e.createVNode(ve,{ref:x,context:o.context},null,8,["context"])],512))}}),fs=e.defineComponent({name:"SyProTable",inheritAttrs:!1,__name:"ProTable",props:{columns:{},data:{},request:{},params:{},postData:{},requestError:{},manualRequest:{type:Boolean,default:!1},pagination:{type:Boolean,default:!0},rowKey:{default:"id"},border:{type:Boolean,default:!1},stripe:{type:Boolean,default:!1},showSearch:{type:Boolean,default:!0},searchCols:{default:4},toolButton:{type:[Boolean,Array],default:!0},highlightCurrentRow:{type:Boolean,default:!1},size:{},pageSizes:{default:()=>[10,20,50,100]},pageSize:{default:10},pageLayout:{default:"total, sizes, prev, pager, next, jumper"},type:{default:"classic"},height:{},heightOffset:{default:0}},emits:["search","reset","dragSort"],setup(o,{expose:s,emit:r}){const c=o,i=r,l=e.useSlots(),n=Ko(c,i,l);function t(a){i("dragSort",a)}return s({tableRef:n.tableRef,formRef:n.formRef,tableData:n.tableData,enumMap:n.enumMap,pageable:n.pageable,searchParam:n.searchParam,searchInitParam:n.searchInitParam,isSelected:n.isSelected,selectedList:n.selectedList,selectedListIds:n.selectedListIds,radio:n.radio,getTableList:n.getTableList,search:n.search,reset:n.reset,clearSelection:n.clearSelection,clearRadio:n.clearRadio,handleSizeChange:n.handleSizeChange,handleCurrentChange:n.handleCurrentChange}),(a,g)=>c.type==="classic"?(e.openBlock(),e.createBlock(ot,{key:0,context:e.unref(n),"on-drag-sort":t},e.createSlots({tableHeader:e.withCtx(P=>[e.renderSlot(a.$slots,"tableHeader",e.normalizeProps(e.guardReactiveProps(P)))]),default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:2},[e.unref(l).toolButton?{name:"toolButton",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"toolButton")]),key:"0"}:void 0,e.unref(l).append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"append")]),key:"1"}:void 0,e.unref(l).empty?{name:"empty",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"empty")]),key:"2"}:void 0,e.unref(l).pagination?{name:"pagination",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"pagination")]),key:"3"}:void 0]),1032,["context"])):c.type==="unify"?(e.openBlock(),e.createBlock(ms,{key:1,context:e.unref(n),"on-drag-sort":t},e.createSlots({tableHeader:e.withCtx(P=>[e.renderSlot(a.$slots,"tableHeader",e.normalizeProps(e.guardReactiveProps(P)))]),default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:2},[e.unref(l).toolButton?{name:"toolButton",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"toolButton")]),key:"0"}:void 0,e.unref(l).append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"append")]),key:"1"}:void 0,e.unref(l).empty?{name:"empty",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"empty")]),key:"2"}:void 0,e.unref(l).pagination?{name:"pagination",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"pagination")]),key:"3"}:void 0]),1032,["context"])):(e.openBlock(),e.createBlock(os,{key:2,context:e.unref(n),"on-drag-sort":t},e.createSlots({tableHeader:e.withCtx(P=>[e.renderSlot(a.$slots,"tableHeader",e.normalizeProps(e.guardReactiveProps(P)))]),default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:2},[e.unref(l).toolButton?{name:"toolButton",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"toolButton")]),key:"0"}:void 0,e.unref(l).append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"append")]),key:"1"}:void 0,e.unref(l).empty?{name:"empty",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"empty")]),key:"2"}:void 0,e.unref(l).pagination?{name:"pagination",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"pagination")]),key:"3"}:void 0]),1032,["context"]))}}),us=S.withInstall(fs);p.SyAlert=bt,p.SyAside=Gt,p.SyAutocomplete=J,p.SyBacktop=At,p.SyButton=U,p.SyCard=Pt,p.SyCascader=Re,p.SyCheckbox=_e,p.SyCheckboxButton=It,p.SyCheckboxGroup=$e,p.SyCol=xn,p.SyCollapse=Mt,p.SyCollapseItem=Et,p.SyColorPicker=_t,p.SyConfigProvider=Jt,p.SyContainer=Ut,p.SyDatePicker=De,p.SyDateTimePicker=vt,p.SyDescriptions=nn,p.SyDescriptionsItem=on,p.SyDialog=rn,p.SyDivider=ln,p.SyDrawer=Me,p.SyDropdown=fn,p.SyDropdownItem=hn,p.SyDropdownMenu=un,p.SyEmpty=Ee,p.SyFooter=Qt,p.SyForm=Le,p.SyFormItem=Fe,p.SyHeader=Kt,p.SyIcon=le,p.SyImage=wn,p.SyInput=ke,p.SyInputNumber=ze,p.SyLink=Tn,p.SyLoading=$n,p.SyLoadingDirective=he,p.SyMain=Wt,p.SyMenu=Fn,p.SyMenuItem=On,p.SyMenuItemGroup=qn,p.SyMessage=ne,p.SyMessageBox=qe,p.SyNotification=He,p.SyOption=We,p.SyPagination=je,p.SyPopconfirm=Un,p.SyPopover=Wn,p.SyProForm=Ze,p.SyProTable=us,p.SyProgress=Yn,p.SyRadio=xe,p.SyRadioButton=Ke,p.SyRadioGroup=Ue,p.SyRow=Bn,p.SyScrollbar=eo,p.SySelect=Ge,p.SySelectV2=ro,p.SySkeleton=co,p.SySkeletonItem=io,p.SySlider=mo,p.SySpace=uo,p.SyStep=go,p.SySteps=So,p.SySubMenu=zn,p.SySwitch=Ce,p.SyTabPane=Po,p.SyTable=Ve,p.SyTableColumn=Y,p.SyTabs=No,p.SyTag=be,p.SyText=Vo,p.SyTimePicker=Qe,p.SyTimeSelect=Ye,p.SyTooltip=pe,p.SyTree=Do,p.SyTreeSelect=Eo,p.SyUpload=Fo,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})});
7
+ </div> `),e.createCommentVNode(" 列配置表格 "),e.createVNode(e.unref(Ee),{data:c.value,"row-key":"prop",border:!0,"default-expand-all":"","tree-props":{children:"_children"}},{empty:e.withCtx(()=>[...b[1]||(b[1]=[e.createElementVNode("div",{style:{padding:"24px 0",color:"var(--el-text-color-secondary)","font-size":"13px"}},"暂无可配置列",-1)])]),default:e.withCtx(()=>[e.createVNode(e.unref(te),{prop:"label",label:"列名",align:"left","min-width":"100"},{default:e.withCtx(({row:P})=>{var x,V;return[e.createTextVNode(e.toDisplayString((V=(x=P.label)!=null?x:P.prop)!=null?V:"—"),1)]}),_:1}),e.createVNode(e.unref(te),{prop:"isShow",label:"显示",align:"center",width:"80"},{default:e.withCtx(({row:P})=>[e.createVNode(e.unref(Be),{"model-value":P.isShow!==!1,"onUpdate:modelValue":x=>{P.isShow=x}},null,8,["model-value","onUpdate:modelValue"])]),_:1}),e.createVNode(e.unref(te),{prop:"sortable",label:"排序",align:"center",width:"80"},{default:e.withCtx(({row:P})=>[typeof P.sortable=="boolean"?(e.openBlock(),e.createBlock(e.unref(Be),{key:0,modelValue:P.sortable,"onUpdate:modelValue":x=>P.sortable=x},null,8,["modelValue","onUpdate:modelValue"])):(e.openBlock(),e.createElementBlock("span",ts,"—"))]),_:1})]),_:1},8,["data"])]),_:1},8,["modelValue"]))}}),ct=e.defineComponent({__name:"ProTableColSetting",props:{context:{}},setup(o,{expose:s}){const i=o.context.flatColumns,c=e.ref();function l(){var n,t;(t=(n=c.value)==null?void 0:n.open)==null||t.call(n)}return s({open:l}),(n,t)=>(e.openBlock(),e.createBlock(ns,{ref_key:"innerRef",ref:c,columns:e.unref(i)},null,8,["columns"]))}}),os={key:0,class:"sy-pro-table__pagination"},it=e.defineComponent({__name:"ProTablePagination",props:{context:{}},setup(o){const s=o,r=s.context.props,i=s.context.pageable,c=s.context.handleSizeChange,l=s.context.handleCurrentChange;return(n,t)=>e.unref(r).pagination&&e.unref(i).total>0?(e.openBlock(),e.createElementBlock("div",os,[e.renderSlot(n.$slots,"pagination",{},()=>[e.createVNode(e.unref(Ze),{"current-page":e.unref(i).pageNum,"onUpdate:currentPage":t[0]||(t[0]=a=>e.unref(i).pageNum=a),"page-size":e.unref(i).pageSize,"onUpdate:pageSize":t[1]||(t[1]=a=>e.unref(i).pageSize=a),total:e.unref(i).total,"page-sizes":e.unref(r).pageSizes,layout:e.unref(r).pageLayout,background:"",onSizeChange:e.unref(c),onCurrentChange:e.unref(l)},null,8,["current-page","page-size","total","page-sizes","layout","onSizeChange","onCurrentChange"])])])):e.createCommentVNode("v-if",!0)}}),dt=e.defineComponent({__name:"ProTableSearchRenderer",props:{context:{},cols:{default:4},showQueryBtn:{type:Boolean,default:!0},showResetBtn:{type:Boolean,default:!0},collapsible:{type:Boolean,default:!0}},setup(o,{expose:s}){const r=o,i=r.context.searchParam,c=r.context.searchSchema,l=r.context.search,n=r.context.reset,t=e.ref();return s({validate:a=>{var b,P;return(P=(b=t.value)==null?void 0:b.validate)==null?void 0:P.call(b,a)},resetFields:()=>{var a,b;return(b=(a=t.value)==null?void 0:a.resetFields)==null?void 0:b.call(a)},clearValidate:a=>{var b,P;return(P=(b=t.value)==null?void 0:b.clearValidate)==null?void 0:P.call(b,a)},formRef:t}),(a,b)=>(e.openBlock(),e.createBlock(e.unref(rt),{ref_key:"innerFormRef",ref:t,model:e.unref(i),schema:e.unref(c),cols:o.cols,"show-query-btn":o.showQueryBtn,"show-reset-btn":o.showResetBtn,collapsible:o.collapsible,onSearch:e.unref(l),onReset:e.unref(n)},null,8,["model","schema","cols","show-query-btn","show-reset-btn","collapsible","onSearch","onReset"]))}}),ss=e.defineComponent({__name:"ProTableColumn",props:{column:{}},emits:["radioChange"],setup(o){const s=o,r=e.inject("proTableEnumMap",{value:new Map}),i=e.inject("proTableSlots",{}),c=e.computed(()=>{const g=s.column.isShow;return g===void 0?!0:e.unref(g)}),l=e.computed(()=>{var k,h,f,S;const g=s.column.enum;return typeof g=="function"?(h=r.value.get((k=s.column.prop)!=null?k:""))!=null?h:[]:g?e.unref(g):(S=r.value.get((f=s.column.prop)!=null?f:""))!=null?S:[]});function n(g){var A,R;const{fieldNames:k}=s.column,h=(A=k==null?void 0:k.label)!=null?A:"label",f=(R=k==null?void 0:k.value)!=null?R:"value",S=l.value.find(D=>D[f]===g);return S?S[h]:String(g!=null?g:"")}function t(g){var S;const{fieldNames:k}=s.column,h=(S=k==null?void 0:k.value)!=null?S:"value",f=l.value.find(A=>A[h]===g);return(f==null?void 0:f.tagType)||void 0}function a(g){return g.split(".").reduce((h,f,S)=>S===0?h+f:h+f.charAt(0).toUpperCase()+f.slice(1),"")}function b(g){var R;const{column:k}=s;if(k.render)return k.render(g);if(k.type==="expand"){const D="expand";return i[D]?i[D](g):null}const h=(R=k.prop)!=null?R:"",f=g.row[h],S=a(h);if(i[S])return i[S](g);if(k.isFilterEnum!==!1&&l.value.length>0){if(k.tag){const D=t(f);return e.h(Ve,D?{type:D}:{},()=>n(f))}return e.h("span",{},n(f))}return k.tag?e.h(Ve,{},()=>String(f!=null?f:"")):e.h("span",{},String(f!=null?f:""))}function P(g){var f,S;const{column:k}=s;if(k.headerRender)return k.headerRender(g);const h=`${a((f=k.prop)!=null?f:"")}Header`;return i[h]?i[h](g):(S=k.label)!=null?S:""}const x=e.defineComponent({name:"ProTableExpandRenderer",props:{scope:{type:Object,required:!0}},setup(g){return()=>i.expand?i.expand(g.scope):null}}),V=e.defineComponent({name:"ProTableHeaderRenderer",props:{scope:{type:Object,required:!0}},setup(g){return()=>P(g.scope)}}),T=e.defineComponent({name:"ProTableCellRenderer",props:{scope:{type:Object,required:!0}},setup(g){return()=>b(g.scope)}});return(g,k)=>{var f;const h=e.resolveComponent("ProTableColumn",!0);return c.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createCommentVNode(" 多级表头 "),(f=o.column.children)!=null&&f.length?(e.openBlock(),e.createBlock(e.unref(te),{key:0,label:o.column.label,align:o.column.align},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.column.children,S=>{var A;return e.openBlock(),e.createBlock(h,{key:(A=S.prop)!=null?A:S.label,column:S},null,8,["column"])}),128))]),_:1},8,["label","align"])):o.column.type&&["selection","index"].includes(o.column.type)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createCommentVNode(" 特殊列:selection / index(自闭合,无需 slot) "),e.createVNode(e.unref(te),e.normalizeProps(e.guardReactiveProps(o.column)),null,16)],2112)):o.column.type==="expand"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createCommentVNode(" expand 列:必须通过 #default slot 提供展开行内容 "),e.createVNode(e.unref(te),e.normalizeProps(e.guardReactiveProps(o.column)),{default:e.withCtx(S=>[e.createVNode(e.unref(x),{scope:S},null,8,["scope"])]),_:1},16)],2112)):o.column.type==="radio"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createCommentVNode(" radio 列 "),e.createVNode(e.unref(te),e.mergeProps(o.column,{width:"60",align:"center"}),{default:e.withCtx(S=>[e.createVNode(e.unref(De),{modelValue:S.row.__radioSelected,"onUpdate:modelValue":A=>S.row.__radioSelected=A,value:!0,onChange:()=>g.$emit("radioChange",S.row)},null,8,["modelValue","onUpdate:modelValue","onChange"])]),_:1},16)],2112)):o.column.type==="sort"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createCommentVNode(" sort 列(拖拽手柄) "),e.createVNode(e.unref(te),e.mergeProps(o.column,{width:"60",align:"center",label:"排序"}),{default:e.withCtx(()=>[e.createVNode(e.unref(Ve),{class:"move",style:{cursor:"move"}},{default:e.withCtx(()=>[e.createVNode(e.unref(he),null,{default:e.withCtx(()=>[e.createVNode(e.unref(X.DCaret))]),_:1})]),_:1})]),_:1},16)],2112)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[e.createCommentVNode(" 普通列 "),e.createVNode(e.unref(te),e.normalizeProps(e.guardReactiveProps(o.column)),{header:e.withCtx(S=>[e.createVNode(e.unref(V),{scope:S},null,8,["scope"])]),default:e.withCtx(S=>[e.createVNode(e.unref(T),{scope:S},null,8,["scope"])]),_:1},16)],2112))],64)):e.createCommentVNode("v-if",!0)}}}),rs={class:"sy-pro-table__table"},as={class:"sy-pro-table__empty"},pt=e.defineComponent({__name:"ProTableTable",props:{context:{},tableHeight:{},tableMaxHeight:{},onDragSort:{type:Function}},setup(o){const s=o,r=s.context.props,i=e.computed(()=>s.tableHeight),c=e.computed(()=>s.tableMaxHeight),l=s.context.tableRef,n=s.context.loading,t=s.context.tableData,a=s.context.flatColumns,b=s.context.selectionChange,P=s.context.onSortChange,x=s.context.onRadioChange;function V(g){l.value=g}function T(){var h;if(!r.columns.some(f=>f.type==="sort")||!l.value)return;const k=(h=l.value.$el)==null?void 0:h.querySelector("tbody");k&&Ie.create(k,{handle:".move",animation:150,onEnd({newIndex:f,oldIndex:S}){var D;if(f===S)return;const A=t.value,R=A.splice(S,1)[0];A.splice(f,0,R),(D=s.onDragSort)==null||D.call(s,{newIndex:f,oldIndex:S})}})}return e.onMounted(()=>{e.nextTick(()=>T())}),(g,k)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createCommentVNode(" wrapper 保证 querySelector 能找到 .sy-pro-table__table,height 直接传给 el-table "),e.createElementVNode("div",rs,[e.withDirectives((e.openBlock(),e.createBlock(e.unref(Ee),{ref:V,height:i.value,"max-height":c.value,data:e.unref(t),border:e.unref(r).border,stripe:e.unref(r).stripe,"row-key":e.unref(r).rowKey,size:e.unref(r).size,"highlight-current-row":e.unref(r).highlightCurrentRow,onSelectionChange:e.unref(b),onSortChange:e.unref(P)},{append:e.withCtx(()=>[e.renderSlot(g.$slots,"append")]),empty:e.withCtx(()=>[e.renderSlot(g.$slots,"empty",{},()=>[e.createElementVNode("div",as,[e.createVNode(e.unref(je),{description:"暂无数据"})])])]),default:e.withCtx(()=>[e.renderSlot(g.$slots,"default"),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a),h=>{var f,S;return e.openBlock(),e.createBlock(ss,{key:(S=(f=h.prop)!=null?f:h.label)!=null?S:h.type,column:h,onRadioChange:e.unref(x)},null,8,["column","onRadioChange"])}),128))]),_:3},8,["height","max-height","data","border","stripe","row-key","size","highlight-current-row","onSelectionChange","onSortChange"])),[[e.unref(d.AdapterLoadingDirective),e.unref(n)]])])],2112))}}),ls={key:0,class:"sy-pro-table__search"},cs={class:"sy-pro-table__main"},is={class:"sy-pro-table__header"},ds={class:"sy-pro-table__header-left"},ps={class:"sy-pro-table__header-right"},mt=e.defineComponent({__name:"ClassicLayout",props:{context:{},onDragSort:{type:Function}},setup(o){var F;const s=o,r=s.context.props,i=s.context.isShowSearch,c=s.context.searchColumns,l=s.context.selectedList,n=s.context.selectedListIds,t=s.context.isSelected,a=s.context.getTableList,b=s.context.openColSetting,P=s.context.toggleSearch,x=s.context.showToolBtn,V=s.context.formRef,T=s.context.colSettingRef,g=e.ref(),k=e.ref(void 0),h=e.ref(void 0),f=(F=e.inject(m.SY_UI_CONFIG_KEY,{}).proTable)!=null?F:{};function S(){var J,Z;const $=g.value;if(!$)return;const I=$.querySelector(".sy-pro-table__table"),O=$.querySelector(".sy-pro-table__pagination");if(!I)return;const z=I.getBoundingClientRect().top,K=O?O.getBoundingClientRect().height:0,E=(Z=(J=r.heightOffset)!=null?J:f.heightOffset)!=null?Z:0,G=Math.floor(window.innerHeight-z-K-E);return G>80?G:void 0}function A(){if(r.height!==void 0){k.value=r.height,h.value=void 0;return}if(r.autoHeight===!0){k.value=S(),h.value=void 0;return}if(r.maxHeight!==void 0){k.value=void 0,h.value=r.maxHeight;return}k.value=void 0,h.value=S()}e.watch(i,()=>e.nextTick(A));let R=null;e.onMounted(()=>{e.nextTick(A),window.addEventListener("resize",A),g.value&&(R=new ResizeObserver(A),R.observe(g.value))}),e.onUnmounted(()=>{window.removeEventListener("resize",A),R==null||R.disconnect()});function D($){V.value=$}function _($){T.value=$}return($,I)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"layoutRef",ref:g,class:"sy-pro-table sy-pro-table--classic"},[e.unref(r).showSearch&&e.unref(i)&&e.unref(c).length>0?(e.openBlock(),e.createElementBlock("div",ls,[e.createVNode(dt,{ref:D,context:o.context,cols:e.unref(r).searchCols},null,8,["context","cols"])])):e.createCommentVNode("v-if",!0),e.createElementVNode("div",cs,[e.createElementVNode("div",is,[e.createElementVNode("div",ds,[e.renderSlot($.$slots,"tableHeader",{selectedList:e.unref(l),selectedListIds:e.unref(n),isSelected:e.unref(t)})]),e.createElementVNode("div",ps,[e.renderSlot($.$slots,"toolButton",{},()=>[e.unref(x)("refresh")?(e.openBlock(),e.createBlock(e.unref(be),{key:0,content:"刷新",placement:"top"},{default:e.withCtx(()=>[e.createVNode(e.unref(W),{icon:e.unref(X.Refresh),circle:"",onClick:e.unref(a)},null,8,["icon","onClick"])]),_:1})):e.createCommentVNode("v-if",!0),e.unref(x)("setting")?(e.openBlock(),e.createBlock(e.unref(be),{key:1,content:"列设置",placement:"top"},{default:e.withCtx(()=>[e.createVNode(e.unref(W),{icon:e.unref(X.Operation),circle:"",onClick:e.unref(b)},null,8,["icon","onClick"])]),_:1})):e.createCommentVNode("v-if",!0),e.unref(r).showSearch&&e.unref(x)("search")&&e.unref(c).length>0?(e.openBlock(),e.createBlock(e.unref(be),{key:2,content:"搜索",placement:"top"},{default:e.withCtx(()=>[e.createVNode(e.unref(W),{icon:e.unref(X.Search),circle:"",onClick:e.unref(P)},null,8,["icon","onClick"])]),_:1})):e.createCommentVNode("v-if",!0)])])]),e.createVNode(pt,{context:o.context,"table-height":k.value,"table-max-height":h.value,"on-drag-sort":o.onDragSort},{append:e.withCtx(()=>[e.renderSlot($.$slots,"append")]),empty:e.withCtx(()=>[e.renderSlot($.$slots,"empty")]),default:e.withCtx(()=>[e.renderSlot($.$slots,"default")]),_:3},8,["context","table-height","table-max-height","on-drag-sort"]),e.createVNode(it,{context:o.context},{pagination:e.withCtx(()=>[e.renderSlot($.$slots,"pagination")]),_:3},8,["context"])]),e.createVNode(ct,{ref:_,context:o.context},null,8,["context"])],512))}}),ms=e.defineComponent({__name:"CustomLayout",props:{context:{},onDragSort:{type:Function}},setup(o){return(s,r)=>(e.openBlock(),e.createBlock(mt,{context:o.context,"on-drag-sort":o.onDragSort},{tableHeader:e.withCtx(i=>[e.renderSlot(s.$slots,"tableHeader",e.normalizeProps(e.guardReactiveProps(i)))]),toolButton:e.withCtx(()=>[e.renderSlot(s.$slots,"toolButton")]),append:e.withCtx(()=>[e.renderSlot(s.$slots,"append")]),empty:e.withCtx(()=>[e.renderSlot(s.$slots,"empty")]),pagination:e.withCtx(()=>[e.renderSlot(s.$slots,"pagination")]),default:e.withCtx(()=>[e.renderSlot(s.$slots,"default")]),_:3},8,["context","on-drag-sort"]))}}),fs=e.defineComponent({__name:"UnifyQuickSearch",props:{column:{},model:{},modelValue:{}},emits:["search","update:modelValue"],setup(o,{emit:s}){const r=o,i=s,c=e.inject("proTableEnumMap",{value:new Map}),l=e.computed(()=>{var P;const a=(P=r.column.search)==null?void 0:P.quick,b=typeof a=="object"&&(a==null?void 0:a.width)||220;return{width:typeof b=="number"?`${b}px`:b}}),n=e.computed(()=>{var P,x,V,T,g,k,h;const a=r.column,b=(()=>{var f,S,A,R,D,_,F;if(((f=a.search)==null?void 0:f.options)!==void 0){const $=a.search.options;return Array.isArray($)?$:(S=e.unref($))!=null?S:void 0}if(!(!a.enum||(R=(A=a.search)==null?void 0:A.component)!=null&&R.includes("tree")))return typeof a.enum=="function"?(_=c.value.get((D=a.prop)!=null?D:""))!=null?_:void 0:Array.isArray(a.enum)?a.enum:(F=e.unref(a.enum))!=null?F:void 0})();return{field:(V=(x=(P=a.search)==null?void 0:P.key)!=null?x:a.prop)!=null?V:"",label:a.label,component:(T=a.search)==null?void 0:T.component,props:(g=a.search)==null?void 0:g.props,options:b,fieldNames:a.fieldNames,defaultValue:(k=a.search)==null?void 0:k.defaultValue,render:(h=a.search)==null?void 0:h.render}});function t(a){i("update:modelValue",a)}return(a,b)=>(e.openBlock(),e.createElementBlock("div",{class:"sy-pro-table__unify-quick",style:e.normalizeStyle(l.value),onKeyup:b[0]||(b[0]=e.withKeys(P=>i("search"),["enter"]))},[e.createVNode(st,{schema:n.value,model:o.model,"model-value":o.modelValue,"onUpdate:modelValue":t},null,8,["schema","model","model-value"])],36))}}),us={class:"sy-pro-table__unify-panel-inner"},hs={class:"sy-pro-table__unify-panel-footer"},Ss=e.defineComponent({__name:"UnifySearchPanel",props:{context:{},visible:{type:Boolean},excludeSelector:{default:""}},emits:["close"],setup(o,{emit:s}){const r=o,i=s,c=r.context.search,l=r.context.reset,n=r.context.formRef,t=e.ref();function a(x){n.value=x}let b=null;function P(x){var T;const V=x.target;V&&((T=t.value)!=null&&T.contains(V)||r.excludeSelector&&V.closest(r.excludeSelector)||V.closest(".el-popper")||V.closest(".el-overlay")||i("close"))}return e.watch(()=>r.visible,x=>{b==null||b(),b=null,x&&e.nextTick(()=>{document.addEventListener("mousedown",P,!0),b=()=>document.removeEventListener("mousedown",P,!0)})}),e.onBeforeUnmount(()=>b==null?void 0:b()),(x,V)=>(e.openBlock(),e.createBlock(e.Transition,{name:"sy-pro-table-panel",persisted:""},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"panelRootRef",ref:t,class:"sy-pro-table__unify-panel"},[e.createElementVNode("div",us,[e.createVNode(dt,{ref:a,context:o.context,cols:1,"show-query-btn":!1,"show-reset-btn":!1,collapsible:!1},null,8,["context"]),e.createElementVNode("div",hs,[e.createVNode(e.unref(W),{onClick:e.unref(l)},{default:e.withCtx(()=>[...V[0]||(V[0]=[e.createTextVNode("重置",-1)])]),_:1},8,["onClick"]),e.createVNode(e.unref(W),{type:"primary",onClick:e.unref(c)},{default:e.withCtx(()=>[...V[1]||(V[1]=[e.createTextVNode("查询",-1)])]),_:1},8,["onClick"])])])],512),[[e.vShow,o.visible]])]),_:1}))}}),ys={class:"sy-pro-table__main sy-pro-table__main--unify"},gs={class:"sy-pro-table__header sy-pro-table__header--unify"},bs={class:"sy-pro-table__header-left"},Cs={class:"sy-pro-table__header-right sy-pro-table__header-right--unify"},ws=e.defineComponent({__name:"UnifyLayout",props:{context:{},onDragSort:{type:Function}},setup(o){var $;const s=o,r=s.context.props,i=s.context.isShowSearch,c=s.context.searchColumns,l=s.context.quickSearchColumns,n=s.context.searchParam,t=s.context.selectedList,a=s.context.selectedListIds,b=s.context.isSelected,P=s.context.search,x=s.context.toggleSearch,V=s.context.showToolBtn,T=s.context.colSettingRef,g=e.computed(()=>!!r.showSearch&&i.value&&c.value.length>0),k=e.ref(),h=e.ref(void 0),f=e.ref(void 0),S=($=e.inject(m.SY_UI_CONFIG_KEY,{}).proTable)!=null?$:{};function A(){var Z,ne;const I=k.value;if(!I)return;const O=I.querySelector(".sy-pro-table__table"),z=I.querySelector(".sy-pro-table__pagination");if(!O)return;const K=O.getBoundingClientRect().top,E=z?z.getBoundingClientRect().height:0,G=(ne=(Z=r.heightOffset)!=null?Z:S.heightOffset)!=null?ne:0,J=Math.floor(window.innerHeight-K-E-G);return J>80?J:void 0}function R(){if(r.height!==void 0){h.value=r.height,f.value=void 0;return}if(r.autoHeight===!0){h.value=A(),f.value=void 0;return}if(r.maxHeight!==void 0){h.value=void 0,f.value=r.maxHeight;return}h.value=void 0,f.value=A()}let D=null;e.onMounted(()=>{e.nextTick(R),window.addEventListener("resize",R),k.value&&(D=new ResizeObserver(R),D.observe(k.value))}),e.onUnmounted(()=>{window.removeEventListener("resize",R),D==null||D.disconnect()});function _(I){T.value=I}function F(){i.value&&x()}return(I,O)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"layoutRef",ref:k,class:"sy-pro-table sy-pro-table--unify"},[e.createElementVNode("div",ys,[e.createElementVNode("div",gs,[e.createElementVNode("div",bs,[e.renderSlot(I.$slots,"tableHeader",{selectedList:e.unref(t),selectedListIds:e.unref(a),isSelected:e.unref(b)})]),e.createElementVNode("div",Cs,[e.renderSlot(I.$slots,"toolButton",{},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l),z=>{var K,E,G,J,Z;return e.openBlock(),e.createBlock(fs,{key:(E=(K=z.search)==null?void 0:K.key)!=null?E:z.prop,modelValue:e.unref(n)[(Z=(J=(G=z.search)==null?void 0:G.key)!=null?J:z.prop)!=null?Z:""],"onUpdate:modelValue":ne=>{var ce,ie,u;return e.unref(n)[(u=(ie=(ce=z.search)==null?void 0:ce.key)!=null?ie:z.prop)!=null?u:""]=ne},column:z,model:e.unref(n),onSearch:e.unref(P)},null,8,["modelValue","onUpdate:modelValue","column","model","onSearch"])}),128)),e.unref(l).length>0?(e.openBlock(),e.createBlock(e.unref(W),{key:0,type:"primary",onClick:e.unref(P)},{default:e.withCtx(()=>[...O[0]||(O[0]=[e.createTextVNode("查询",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("v-if",!0),e.unref(r).showSearch&&e.unref(V)("search")&&e.unref(c).length>0?(e.openBlock(),e.createBlock(e.unref(W),{key:1,class:"sy-pro-table__unify-advanced-btn",type:"primary",plain:"",onClick:e.unref(x)},{default:e.withCtx(()=>[...O[1]||(O[1]=[e.createTextVNode(" 高级筛选 ",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("v-if",!0)])])]),e.createVNode(Ss,{context:o.context,visible:g.value,"exclude-selector":".sy-pro-table__unify-advanced-btn",onClose:F},null,8,["context","visible"]),e.createVNode(pt,{context:o.context,"table-height":h.value,"table-max-height":f.value,"on-drag-sort":o.onDragSort},{append:e.withCtx(()=>[e.renderSlot(I.$slots,"append")]),empty:e.withCtx(()=>[e.renderSlot(I.$slots,"empty")]),default:e.withCtx(()=>[e.renderSlot(I.$slots,"default")]),_:3},8,["context","table-height","table-max-height","on-drag-sort"]),e.createVNode(it,{context:o.context},{pagination:e.withCtx(()=>[e.renderSlot(I.$slots,"pagination")]),_:3},8,["context"])]),e.createVNode(ct,{ref:_,context:o.context},null,8,["context"])],512))}}),As=e.defineComponent({name:"SyProTable",inheritAttrs:!1,__name:"ProTable",props:{columns:{},data:{},request:{},params:{},postData:{},requestError:{},manualRequest:{type:Boolean,default:!1},pagination:{type:Boolean,default:!0},rowKey:{},border:{type:Boolean},stripe:{type:Boolean},showSearch:{type:Boolean,default:!0},searchCols:{},toolButton:{type:[Boolean,Array],default:!0},highlightCurrentRow:{type:Boolean,default:!1},size:{},pageSizes:{},pageSize:{},pageLayout:{},type:{},height:{},maxHeight:{},autoHeight:{type:Boolean},heightOffset:{}},emits:["search","reset","dragSort"],setup(o,{expose:s,emit:r}){const i=o,c=r,l=e.useSlots(),n=es(i,c,l);function t(a){c("dragSort",a)}return s({tableRef:n.tableRef,formRef:n.formRef,tableData:n.tableData,enumMap:n.enumMap,pageable:n.pageable,searchParam:n.searchParam,searchInitParam:n.searchInitParam,isSelected:n.isSelected,selectedList:n.selectedList,selectedListIds:n.selectedListIds,radio:n.radio,getTableList:n.getTableList,search:n.search,reset:n.reset,clearSelection:n.clearSelection,clearRadio:n.clearRadio,handleSizeChange:n.handleSizeChange,handleCurrentChange:n.handleCurrentChange}),(a,b)=>e.unref(n).type==="classic"?(e.openBlock(),e.createBlock(mt,{key:0,context:e.unref(n),"on-drag-sort":t},e.createSlots({tableHeader:e.withCtx(P=>[e.renderSlot(a.$slots,"tableHeader",e.normalizeProps(e.guardReactiveProps(P)))]),default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:2},[e.unref(l).toolButton?{name:"toolButton",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"toolButton")]),key:"0"}:void 0,e.unref(l).append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"append")]),key:"1"}:void 0,e.unref(l).empty?{name:"empty",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"empty")]),key:"2"}:void 0,e.unref(l).pagination?{name:"pagination",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"pagination")]),key:"3"}:void 0]),1032,["context"])):e.unref(n).type==="unify"?(e.openBlock(),e.createBlock(ws,{key:1,context:e.unref(n),"on-drag-sort":t},e.createSlots({tableHeader:e.withCtx(P=>[e.renderSlot(a.$slots,"tableHeader",e.normalizeProps(e.guardReactiveProps(P)))]),default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:2},[e.unref(l).toolButton?{name:"toolButton",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"toolButton")]),key:"0"}:void 0,e.unref(l).append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"append")]),key:"1"}:void 0,e.unref(l).empty?{name:"empty",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"empty")]),key:"2"}:void 0,e.unref(l).pagination?{name:"pagination",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"pagination")]),key:"3"}:void 0]),1032,["context"])):(e.openBlock(),e.createBlock(ms,{key:2,context:e.unref(n),"on-drag-sort":t},e.createSlots({tableHeader:e.withCtx(P=>[e.renderSlot(a.$slots,"tableHeader",e.normalizeProps(e.guardReactiveProps(P)))]),default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:2},[e.unref(l).toolButton?{name:"toolButton",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"toolButton")]),key:"0"}:void 0,e.unref(l).append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"append")]),key:"1"}:void 0,e.unref(l).empty?{name:"empty",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"empty")]),key:"2"}:void 0,e.unref(l).pagination?{name:"pagination",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"pagination")]),key:"3"}:void 0]),1032,["context"]))}}),ks=m.withInstall(As);Object.defineProperty(p,"SY_UI_CONFIG_KEY",{enumerable:!0,get:()=>m.SY_UI_CONFIG_KEY}),p.SyAlert=Tt,p.SyAside=tn,p.SyAutocomplete=oe,p.SyBacktop=Rt,p.SyButton=W,p.SyCard=Mt,p.SyCascader=ze,p.SyCheckbox=Oe,p.SyCheckboxButton=zt,p.SyCheckboxGroup=He,p.SyCol=En,p.SyCollapse=jt,p.SyCollapseItem=Kt,p.SyColorPicker=Ht,p.SyConfigProvider=rn,p.SyContainer=vt,p.SyDatePicker=qe,p.SyDateTimePicker=cn,p.SyDescriptions=mn,p.SyDescriptionsItem=fn,p.SyDialog=hn,p.SyDivider=yn,p.SyDrawer=Ue,p.SyDropdown=An,p.SyDropdownItem=Nn,p.SyDropdownMenu=kn,p.SyEmpty=je,p.SyFooter=on,p.SyForm=Ke,p.SyFormItem=Ge,p.SyHeader=en,p.SyIcon=he,p.SyImage=In,p.SyInput=Re,p.SyInputNumber=Ye,p.SyLink=Fn,p.SyLoading=qn,p.SyLoadingDirective=ke,p.SyMain=nn,p.SyMenu=Yn,p.SyMenuItem=Qn,p.SyMenuItemGroup=Jn,p.SyMessage=pe,p.SyMessageBox=Qe,p.SyNotification=Je,p.SyOption=tt,p.SyPagination=Ze,p.SyPopconfirm=vn,p.SyPopover=no,p.SyProForm=rt,p.SyProTable=ks,p.SyProgress=so,p.SyRadio=De,p.SyRadioButton=ve,p.SyRadioGroup=Xe,p.SyRow=Dn,p.SyScrollbar=io,p.SySelect=et,p.SySelectV2=ho,p.SySkeleton=go,p.SySkeletonItem=bo,p.SySlider=wo,p.SySpace=ko,p.SyStep=Bo,p.SySteps=xo,p.SySubMenu=Wn,p.SySwitch=Be,p.SyTabPane=Mo,p.SyTable=Ee,p.SyTableColumn=te,p.SyTabs=$o,p.SyTag=Ve,p.SyText=Lo,p.SyTimePicker=nt,p.SyTimeSelect=ot,p.SyTooltip=be,p.SyTree=Uo,p.SyTreeSelect=Ko,p.SyUpload=Yo,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})});