ucol-ui 0.1.46 → 0.1.47

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ucol-ui.js CHANGED
@@ -20,7 +20,7 @@ return re.jsxs(re.Fragment,{children:[
20
20
  /* @__PURE__ */re.jsx("span",{className:"tw-hidden sm:tw-inline",children:"Carga masiva"}),
21
21
  /* @__PURE__ */re.jsx("span",{className:"sm:tw-hidden",children:"Carga masiva"})]}),s&&/* @__PURE__ */re.jsx(g,{type:"primary",className:"tw-flex-1 xs:tw-flex-initial tw-flex tw-items-center tw-justify-center tw-gap-2 hover:tw-opacity-90 tw-transition-all tw-duration-200 tw-shadow-xs hover:tw-shadow-md tw-px-3 tw-h-8 tw-text-sm tw-font-medium dark:tw-bg-blue-600 dark:hover:tw-bg-blue-700 dark:tw-text-white",icon:t.cloneElement(y)||/* @__PURE__ */re.jsx(We,{}),onClick:u,children:/* @__PURE__ */re.jsx("span",{children:m})})]})]})]}),
22
22
  /* @__PURE__ */re.jsx("div",{className:"tw-overflow-x-auto",children:/* @__PURE__ */re.jsx($,{columns:(e=>{const n=e.filter(e=>!e.isHidden).map(e=>({...e,title:e.icon?/* @__PURE__ */re.jsxs("div",{className:"tw-flex tw-items-center tw-gap-2",children:[t.isValidElement(e.icon)?t.cloneElement(e.icon):e.icon,
23
- /* @__PURE__ */re.jsx("span",{className:"tw-font-medium",children:e.title})]}):/* @__PURE__ */re.jsx("span",{className:"tw-font-medium",children:e.title}),className:"py-4 px-6",sorter:e.sorter?(t,n)=>Me(e.key)(t,n):void 0,filters:e.filters,onFilter:e.onFilter,render:e.render||(e.key&&String(e.key).includes(".")?(t,n)=>{const r=Re(n,String(e.key));return null!=r?String(r):""}:void 0)})),r=e=>("function"==typeof C.showEdit?C.showEdit(e):C.showEdit)?/* @__PURE__ */re.jsx(L,{title:"Editar",children:/* @__PURE__ */re.jsx(g,{type:"warning",className:`${X} ${G} ${Y}`,icon:C.customIcons?.edit||/* @__PURE__ */re.jsx(Ve,{className:"tw-text-white"}),onClick:()=>ie(e)})}):null,o=e=>{if(!("function"==typeof C.showDelete?C.showDelete(e):C.showDelete))return null;const n=/* @__PURE__ */re.jsx(L,{title:"Eliminar",children:/* @__PURE__ */re.jsx(g,{danger:!0,type:"danger",className:`${X} ${G} ${K}`,icon:C.customIcons?.delete?.type?t.createElement(C.customIcons.delete.type):/* @__PURE__ */re.jsx(Ue,{className:"tw-text-white"}),onClick:!1===C.useDefaultDeleteConfirm?()=>le(e):void 0})});return!1===C.useDefaultDeleteConfirm?n:/* @__PURE__ */re.jsx(F,{title:"¿Estás seguro de que deseas eliminar este registro?",onConfirm:()=>le(e),okText:"Eliminar",cancelText:"Cancelar",children:n})},a=e=>{if(!f)return null;return("function"==typeof C.showView?C.showView(e):C.showView)?/* @__PURE__ */re.jsx(L,{title:"Ver",children:/* @__PURE__ */re.jsx(g,{type:"view",className:`${X} ${G} ${C.customActionsColor?.view||Z}`,icon:C.customIcons?.view||/* @__PURE__ */re.jsx(qe,{className:"tw-text-white"}),onClick:()=>se(e)})}):null};let i=n;if(D&&U){i=j&&j.length>0?n.filter(e=>j.some(t=>t.key===e.key)):n.slice(0,2);const e={title:/* @__PURE__ */re.jsx("span",{className:"tw-font-medium",children:"Detalles"}),key:"details",width:100,className:"py-4 px-6",render:(e,t)=>/* @__PURE__ */re.jsx(L,{title:"Ver detalles",children:/* @__PURE__ */re.jsx(g,{type:"default",className:`${X} ${G} ${J}`,icon:/* @__PURE__ */re.jsx(Xe,{className:"tw-text-white"}),onClick:()=>(e=>{W(e),H(!0)})(t)})})};return[...i,e]}const l={title:/* @__PURE__ */re.jsx("span",{className:"tw-font-medium",children:"Acciones"}),key:"actions",width:O||"auto",className:"py-4 px-6",render:(e,n)=>(e=>/* @__PURE__ */re.jsxs("div",{className:"tw-flex tw-items-center tw-gap-3 "+(O?"tw-flex-wrap":"tw-flex-nowrap"),style:O?{maxWidth:`${O}px`,width:"100%"}:void 0,children:[k?.map(n=>!("function"==typeof n.hidden&&n.hidden(e))&&/* @__PURE__ */re.jsx(L,{title:n.tooltip,children:/* @__PURE__ */re.jsx(g,{type:"button",className:n.className||`${X} tw-flex-shrink-0 !tw-bg-slate-500 hover:!tw-bg-slate-700 dark:!tw-bg-slate-600 dark:hover:!tw-bg-slate-800 !tw-text-white !tw-border-none`,style:n.style,icon:t.isValidElement(n.icon)?t.cloneElement(n.icon):n.icon,onClick:()=>n.onClick(e),children:n.label})},n.key)),C.showDefaultActions&&/* @__PURE__ */re.jsxs(re.Fragment,{children:[r(e),o(e),a(e)]})]}))(n)};return C.showDefaultActions||k&&k.length>0||!1===P?[...n,l]:n})(b),dataSource:ne,loading:w,pagination:ae,className:"dynamic-table !tw-mt-4",scroll:{x:"max-content"}})})]}),
23
+ /* @__PURE__ */re.jsx("span",{className:"tw-font-medium",children:e.title})]}):/* @__PURE__ */re.jsx("span",{className:"tw-font-medium",children:e.title}),className:"py-4 px-6",sorter:e.sorter?(t,n)=>Me(e.key)(t,n):void 0,filters:e.filters,onFilter:e.onFilter,render:e.render||(e.key&&String(e.key).includes(".")?(t,n)=>{const r=Re(n,String(e.key));return null!=r?String(r):""}:void 0)})),r=e=>("function"==typeof C.showEdit?C.showEdit(e):C.showEdit)?/* @__PURE__ */re.jsx(L,{title:"Editar",children:/* @__PURE__ */re.jsx(g,{type:"warning",className:`${X} ${G} ${Y}`,icon:C.customIcons?.edit||/* @__PURE__ */re.jsx(Ve,{className:"tw-text-white"}),onClick:()=>ie(e)})}):null,o=e=>{if(!("function"==typeof C.showDelete?C.showDelete(e):C.showDelete))return null;const n=/* @__PURE__ */re.jsx(L,{title:"Eliminar",children:/* @__PURE__ */re.jsx(g,{danger:!0,type:"danger",className:`${X} ${G} ${K}`,icon:C.customIcons?.delete?.type?t.createElement(C.customIcons.delete.type):/* @__PURE__ */re.jsx(Ue,{className:"tw-text-white"}),onClick:!1===C.useDefaultDeleteConfirm?()=>le(e):void 0})});return!1===C.useDefaultDeleteConfirm?n:/* @__PURE__ */re.jsx(F,{title:"¿Estás seguro de que deseas eliminar este registro?",onConfirm:()=>le(e),okText:"Eliminar",cancelText:"Cancelar",children:n})},a=e=>{if(!f)return null;return("function"==typeof C.showView?C.showView(e):C.showView)?/* @__PURE__ */re.jsx(L,{title:"Ver",children:/* @__PURE__ */re.jsx(g,{type:"view",className:`${X} ${G} ${C.customActionsColor?.view||Z}`,icon:C.customIcons?.view||/* @__PURE__ */re.jsx(qe,{className:"tw-text-white"}),onClick:()=>se(e)})}):null};let i=n;if(D&&U){i=j&&j.length>0?n.filter(e=>j.some(t=>"string"==typeof t?e.key===t||e.dataIndex===t:t.key===e.key)):n.slice(0,2);const e={title:/* @__PURE__ */re.jsx("span",{className:"tw-font-medium",children:"Detalles"}),key:"details",width:100,className:"py-4 px-6",render:(e,t)=>/* @__PURE__ */re.jsx(L,{title:"Ver detalles",children:/* @__PURE__ */re.jsx(g,{type:"default",className:`${X} ${G} ${J}`,icon:/* @__PURE__ */re.jsx(Xe,{className:"tw-text-white"}),onClick:()=>(e=>{W(e),H(!0)})(t)})})};return[...i,e]}const l={title:/* @__PURE__ */re.jsx("span",{className:"tw-font-medium",children:"Acciones"}),key:"actions",width:O||"auto",className:"py-4 px-6",render:(e,n)=>(e=>/* @__PURE__ */re.jsxs("div",{className:"tw-flex tw-items-center tw-gap-3 "+(O?"tw-flex-wrap":"tw-flex-nowrap"),style:O?{maxWidth:`${O}px`,width:"100%"}:void 0,children:[k?.map(n=>!("function"==typeof n.hidden&&n.hidden(e))&&/* @__PURE__ */re.jsx(L,{title:n.tooltip,children:/* @__PURE__ */re.jsx(g,{type:"button",className:n.className||`${X} tw-flex-shrink-0 !tw-bg-slate-500 hover:!tw-bg-slate-700 dark:!tw-bg-slate-600 dark:hover:!tw-bg-slate-800 !tw-text-white !tw-border-none`,style:n.style,icon:t.isValidElement(n.icon)?t.cloneElement(n.icon):n.icon,onClick:()=>n.onClick(e),children:n.label})},n.key)),C.showDefaultActions&&/* @__PURE__ */re.jsxs(re.Fragment,{children:[r(e),o(e),a(e)]})]}))(n)};return C.showDefaultActions||k&&k.length>0||!1===P?[...n,l]:n})(b),dataSource:ne,loading:w,pagination:ae,className:"dynamic-table !tw-mt-4",scroll:{x:"max-content"}})})]}),
24
24
  /* @__PURE__ */re.jsx(_,{title:"Detalles del registro",placement:"right",onClose:ue,open:I,size:400,className:"dark:tw-bg-ucol_gray_dark-200",children:(()=>{if(!V)return null;/* @__PURE__ */
25
25
  return re.jsxs("div",{className:"tw-space-y-6",children:[
26
26
  /* @__PURE__ */re.jsxs("div",{children:[