sunyard-szyy-ui 0.7.15 → 0.7.17

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