nectiasw 0.0.76 → 0.0.77
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/components/Stepper/styles.d.ts +5 -0
- package/dist/index.es.js +20 -6
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -1364,5 +1364,5 @@ function ST(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.lengt
|
|
|
1364
1364
|
border-radius: 1.25rem;
|
|
1365
1365
|
padding: 0.25rem 0.75rem;
|
|
1366
1366
|
background-color: ${({backgroundColor:e})=>e};
|
|
1367
|
-
`,GB=e=>I.jsx("svg",{fill:"none",stroke:"currentColor",strokeWidth:1.5,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",className:"h-6 w-6 text-primary",...e,children:I.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 16.5V9.75m0 0l3 3m-3-3l-3 3M6.75 19.5a4.5 4.5 0 01-1.41-8.775 5.25 5.25 0 0110.233-2.33 3 3 0 013.758 3.848A3.752 3.752 0 0118 19.5H6.75z"})}),XB=e=>I.jsx("svg",{fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",className:"h-6 w-6 text-red-700",...e,children:I.jsx("path",{clipRule:"evenodd",fillRule:"evenodd",d:"M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495zM10 5a.75.75 0 01.75.75v3.5a.75.75 0 01-1.5 0v-3.5A.75.75 0 0110 5zm0 9a1 1 0 100-2 1 1 0 000 2z"})}),ZB=e=>I.jsx("svg",{fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",className:"h-6 w-6 text-white",...e,children:I.jsx("path",{clipRule:"evenodd",fillRule:"evenodd",d:"M4.5 2A1.5 1.5 0 003 3.5v13A1.5 1.5 0 004.5 18h11a1.5 1.5 0 001.5-1.5V7.621a1.5 1.5 0 00-.44-1.06l-4.12-4.122A1.5 1.5 0 0011.378 2H4.5zm2.25 8.5a.75.75 0 000 1.5h6.5a.75.75 0 000-1.5h-6.5zm0 3a.75.75 0 000 1.5h6.5a.75.75 0 000-1.5h-6.5z"})}),UB=e=>I.jsx("svg",{fill:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",className:"h-6 w-6 text-primary",...e,children:I.jsx("path",{clipRule:"evenodd",fillRule:"evenodd",d:"M4.755 10.059a7.5 7.5 0 0112.548-3.364l1.903 1.903h-3.183a.75.75 0 100 1.5h4.992a.75.75 0 00.75-.75V4.356a.75.75 0 00-1.5 0v3.18l-1.9-1.9A9 9 0 003.306 9.67a.75.75 0 101.45.388zm15.408 3.352a.75.75 0 00-.919.53 7.5 7.5 0 01-12.548 3.364l-1.902-1.903h3.183a.75.75 0 000-1.5H2.984a.75.75 0 00-.75.75v4.992a.75.75 0 001.5 0v-3.18l1.9 1.9a9 9 0 0015.059-4.035.75.75 0 00-.53-.918z"})}),$B=t.memo((({status:e=HB.DragActive,filename:n="",wrongColor:r,maxFileSize:o=5242880,successColor:i,onFileUpload:a,renderContent:s,onStatusChange:l,acceptedFileType:c,renderBelowFilename:u,statusMessages:d,statusColors:h,statusBorder:p,statusIcons:f={[HB.DragActive]:GB,[HB.InvalidType]:XB,[HB.WithError]:XB,[HB.Reload]:UB},...m})=>{const g={[HB.DragActive]:["Mensaje personalizado 1","Mensaje personalizado 2"]},v={[HB.WithError]:"red"},b={[HB.DragActive]:"green"},y=t.useCallback((e=>{const t=e[0];null==a||a(t)}),[a]),{getRootProps:w,getInputProps:x,isDragActive:C,fileRejections:k}=LB({accept:c,maxSize:o,maxFiles:1,onDrop:y,onDropRejected:()=>{if(k.length>0){const{code:e}=k[0].errors[0];switch(e){case"file-too-large":null==l||l(HB.FileTooBig);break;case"file-invalid-type":null==l||l(HB.InvalidType)}}}}),_=e||HB.DragActive,S=(null==f?void 0:f[_])||GB;e=e||HB.DragActive;const E=(null==h?void 0:h[e])??v[e]??[],A=(null==p?void 0:p[e])??b[e]??[],D=(null==d?void 0:d[e])??g[e]??[];return I.jsxs(WB,{...w(),isDragActive:C,borderColor:A,wrongColor:r,successColor:i,...m,children:[S&&I.jsx(M,{marginTop:2,children:I.jsx(S,{})}),e&&[HB.WithError,HB.Reload].includes(e)&&n&&I.jsxs(zB,{backgroundColor:E,children:[I.jsx(ZB,{})," ",I.jsxs("p",{children:["Archivo cargado:",n," "]})]}),u&&u,I.jsxs(VB,{children:[D.filter(Boolean).map((e=>I.jsx("p",{children:e},e))),s&&s]}),I.jsx(YB,{...x()})]})})),JB="flex items-center w-[562px] text-xs text-gray-900 font-medium sm:text-base",QB="flex w-full relative text-gray-900",qB=" flex w-full relative text-gray-900 after:content-[''] after:w-full after:h-[6px] after:bg-primary after:inline-block after:absolute lg:after:top-6 after:top-3 after:left-4",KB="flex w-full relative after:w-full after:h-[6px] after:bg-primary/30 after:inline-block after:absolute lg:after:top-6 after:top-3 after:left-4",eH="absolute right-8 w-[107px] h-[38px] text-center",tH={index:"block z-10"},nH=t.memo((({steps:e,canProceed:t,currentStep:n,onStepChange:r})=>I.jsx("ol",{className:JB,children:e.map(((o,i)=>I.jsx("li",{className:i===e.length-1?QB:t[i]?qB:KB,children:I.jsxs("div",{className:tH.index,children:[I.jsx("button",{disabled:!t[i],onClick:()=>r(o.id),className:`step-button-root ${n===o.id?"step-button-selected":t[i]?"step-button-normal":"step-button-disabled"} `,children:I.jsx("span",{className:"step-button-position",children:o.id})}),I.jsx($_,{className:eH,size:"lg",color:t[i]?"primary":"opaque",font:"bold",children:o.label})]})},o.id)))})));e.$channels=JO,e.$events=$O,e.$observers={},e.AlertTitle=({title:e,Icon:t})=>I.jsxs("div",{className:dA.rule,children:[I.jsx("div",{className:dA.icon,children:t&&I.jsx(t,{})}),I.jsx("div",{}),I.jsx("h1",{className:dA.alert,children:e})]}),e.Badge=hI,e.BadgeStatus=dI,e.Box=M,e.Button=wI,e.Card=({requirement:e,description:t,Icon:n})=>I.jsx("div",{className:uA.size,children:I.jsx("div",{className:uA.style,children:I.jsxs("div",{className:uA.separator,children:[I.jsxs("div",{children:[I.jsxs("h1",{className:uA.title,children:[" ",e," "]}),I.jsx("h2",{className:uA.body,children:t})]}),I.jsxs("div",{className:uA.icon,children:[n&&I.jsx(n,{})," "]})]})})}),e.Chart=ji,e.CheckTitle=({title:e,Icon:t})=>I.jsxs("div",{className:dA.rule,children:[I.jsx("div",{className:dA.icon,children:t&&I.jsx(t,{})}),I.jsx("div",{}),I.jsx("h1",{className:dA.pass,children:e})]}),e.Checkbox=ec,e.Collapse=lI,e.Color=Pi,e.Colspan=ES,e.Container=({className:e,children:t,start:n=2,cols:r=10})=>I.jsx("div",{className:A(`col-start-${n} col-span-${r}`,e&&e),children:t}),e.Counter=({passedDays:e,remainingDays:t,message:n,color:r})=>{const o=A({"text-4xl":t&&Math.abs(t)<100,"text-3xl":t&&Math.abs(t)>=100});return I.jsxs("div",{className:AS,children:[I.jsxs(RS,{className:DS,color:r,children:[I.jsx("div",{className:A(OS,o),children:t}),I.jsx("div",{className:MS,children:"días"})]}),I.jsxs("div",{className:NS,children:[I.jsx("div",{className:TS,children:n}),I.jsxs(jS,{color:r,children:[e," días"]}),I.jsx("div",{className:PS,children:"transcurridos"})]})]})},e.DangerTitle=({title:e,Icon:t})=>I.jsxs("div",{className:dA.rule,children:[I.jsx("div",{className:dA.icon,children:t&&I.jsx(t,{})}),I.jsx("div",{}),I.jsxs("h1",{className:dA.danger,children:[" ",e]})]}),e.Datepicker=W_,e.Description=({content:e,children:t})=>I.jsx("h3",{className:A(G_.description,e&&G_.content),children:t}),e.Detail=DF,e.Dragarea=$B,e.Dropdown=oc,e.Empty=LS,e.Error=e=>{const n=t.useRef(!0);return t.useEffect((()=>{if(null==e?void 0:e.onDismiss)return null==window||window.setTimeout((()=>{var t;n.current&&(null==(t=null==e?void 0:e.onDismiss)||t.call(e))}),q_),()=>{n.current=!1}}),[null==e?void 0:e.onDismiss]),I.jsx("span",{className:A(U_.confirmation,(null==e?void 0:e.className)&&e.className,(null==e?void 0:e.confirmation)?U_.show:U_.hide),children:(null==e?void 0:e.confirmation)&&e.children})},e.EventMap=KO,e.Flex=lc,e.FlexItem=({children:e,...t})=>{const n=ac(t);return I.jsx("div",{className:n,children:e})},e.Footer=OI,e.GrantSystem=kL,e.Grid=IS,e.HttpClient=GO,e.IN_Grants=TI,e.Input=pS,e.InputMode=CS,e.InputTable=wS,e.Layout=fE,e.Little=({children:e})=>I.jsx("h2",{className:X_.title,children:e}),e.Loading=FS,e.LocalStorageKeys=xA,e.LogColors=xL,e.LogLevel=wL,e.Logger=CL,e.Method=ZO,e.MicrofrontHost=yL,e.Modal=({modal:e,isOpen:t,children:n,onClose:r=()=>{}})=>I.jsx(El,{modal:e,onHide:r,visible:t,maskStyle:Al.dialog.mask.style,headerClassName:Al.dialog.header.className,contentClassName:Al.dialog.content.className,children:n&&n}),e.Navbar=qI,e.Pagination=cA,e.Permissions=NI,e.Private=_L,e.RadioButton=Y_,e.Row=({children:e,...t})=>I.jsx(N,{...t,children:e}),e.SP_Grants=PI,e.ScrollSearch=rA,e.Search=ZE,e.Select=Zf,e.Sidebar=GI,e.SignalContext=SI,e.SingleDeadlineChart=({workLine:e})=>e?(e.stages.forEach((e=>{const t=[];e.deadlines=e.deadlines.sort(((e,t)=>t.since-e.since)),e.deadlines.forEach(((n,r)=>{0===r?n.since<e.maxDuration&&t.push({id:0,name:"1",criticalLevel:"",color:"#e5e7eb",since:e.maxDuration,until:n.since+1}):(n.since<e.deadlines[r-1].until-1&&t.push({id:0,name:"2",criticalLevel:"",color:"#e5e7eb",since:e.deadlines[r-1].until-1,until:n.since+1}),r===e.deadlines.length-1&&n.until>e.minDuration&&t.push({id:0,name:"3",criticalLevel:"",color:"#e5e7eb",since:n.until-1,until:e.minDuration})),t.push(n)})),e.deadlines=t.sort(((e,t)=>t.since-e.since))})),I.jsx(zS,{children:I.jsxs(GS,{children:[I.jsx(XS,{children:I.jsxs(ZS,{children:["Plazos de ",e.name]})}),I.jsx(US,{children:e.stages.map((e=>I.jsx($S,{className:2===e.id?WS:HS,children:I.jsxs(JS,{children:[I.jsxs(QS,{children:[I.jsx(qS,{children:e.deadlines.map((t=>{const n=t.since/e.maxDuration*100;return I.jsx(iI,{widthPercent:n,children:I.jsx(KS,{children:t.since})},t.id)}))}),I.jsx(eI,{children:e.deadlines.map(((t,n)=>{const r=t.since/e.maxDuration*100;let o=VS;const i=VS;return t.color&&n!==e.deadlines.length-1&&(o=YS),I.jsx(oI,{className:`${o} ${i}`,bgColor:t.color,widthPercent:r},t.id)}))})]}),I.jsxs(tI,{children:[I.jsxs(nI,{children:[" Etapa de ",e.name]}),e.deadlines.map((e=>I.jsx(rI,{children:"#E55257"===e.color&&e.until>=0?e.until:null},e.id)))]})]})},e.id)))})]},e.id)})):I.jsx("div",{children:"No se encuentra el Plazo Solicitado."}),e.Stepper=nH,e.Subtitle=Q_,e.Success=e=>{const n=t.useRef(!0);return t.useEffect((()=>{if(null==e?void 0:e.onDismiss)return null==window||window.setTimeout((()=>{var t;n.current&&(null==(t=null==e?void 0:e.onDismiss)||t.call(e))}),q_),()=>{n.current=!1}}),[null==e?void 0:e.onDismiss]),I.jsx("span",{className:A(Z_.confirmation,(null==e?void 0:e.className)&&e.className,(null==e?void 0:e.confirmation)?Z_.show:Z_.hide),children:e.children})},e.Switch=({children:e,color:t,backgroundColor:n,onChange:r,checked:o,disabled:i})=>I.jsxs(Qf,{children:[e&&I.jsx(qf,{color:t,children:e}),I.jsx(Kf,{children:I.jsxs(em,{children:[I.jsx(tm,{checked:o,onChange:()=>{!i&&(null==r||r(!o))}}),I.jsx(nm,{backgroundColor:n,disabled:i})]})})]}),e.Table=jE,e.TableData=LE,e.TableInput=kS,e.TableRow=({align:e,children:t,disabled:n=!1})=>I.jsx(AE,{align:e,disabled:n,children:t}),e.TableWrapper=({children:e})=>I.jsx("div",{className:wE.container,children:e}),e.Text=$_,e.TextArea=({name:e,rows:t=4,value:n,onChange:r,textColor:o,borderColor:i,maxLength:a,...s})=>I.jsx(SS,{name:e,value:n,rows:t,textColor:o,borderColor:i,onChange:e=>{null==r||r(e)},onKeyDown:e=>{var t;null==(t=s.onKeyDown)||t.call(s,e)},maxLength:a,...s}),e.Timeline=RF,e.Title=J_,e.Tooltip=by,e.TotalHours=({hours:e,inputs:t,pending:n,borderColor:r,hoursTitle:o,inputsTitle:i,pendingTitle:a,hoursColor:s,inputColor:l,pendingColor:c,hoursTitleColor:u,inputsTitleColor:d,pendingTitleColor:h})=>I.jsxs(pA,{children:[I.jsx(hA,{title:o,value:e,color:s,titleColor:u,as:bA}),I.jsx(hA,{title:i,value:t,color:l,titleColor:d,as:yA,borderColor:r}),I.jsx(hA,{title:a,value:n,color:c,titleColor:h,as:wA})]}),e.UrlSSOParams=CA,e.Wait=BS,e.authorization=({user:e,allow:t,system:n=MI})=>{var r,o;const i=null==(r=null==e?void 0:e.systems)?void 0:r.find((e=>e.name===n)),a=null==(o=null==i?void 0:i.functions)?void 0:o.filter((e=>{const n=e.key;return null==t?void 0:t.includes(n)}));return(null==a?void 0:a.length)===(null==t?void 0:t.length)},e.bearer=XO,e.broadcast=qO,e.capitalize=function(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()},e.checkSystems=({user:e,passport:t,systems:n})=>{var r;const o=null==(r=null==e?void 0:e.systems)?void 0:r.filter((e=>null==n?void 0:n.includes(e.name)));return!!t&&(null==o?void 0:o.length)===(null==n?void 0:n.length)},e.createHalfTimeSlots=function(e,t){return Array.from({length:2*(t??24)},((t,n)=>{const r=n%2*30,o=Math.floor(n/2).toString().padStart(2,"0"),i=0===r?"00":r.toString();return{[e??"hour"]:`${o}:${i}`}}))},e.createObserver=function(e){const t=new c.Subject,n=window;try{n[e]=t}catch(Ph){}return t},e.createRef=e=>{if(void 0===e)return xM;const t=xM(e),n=t.getState();return _T.push((()=>{t.setState(n,!0)})),t},e.createSignal=function(e,t){var n;JO[e]?null==(n=JO[e])||n.postMessage(t):JO[e]=new window.BroadcastChannel(e)},e.createTimeSlots=function(e,t){return Array.from({length:t??24},((t,n)=>({[e??"hour"]:n.toString().padStart(2,"0")+":00"})))},e.defaultCacheQueryOptions=fF,e.defaultConfig=pF,e.destroy=function(e){const t=window;if(t[e]){return t[e].unsubscribe()}throw new Error("Cannot find subscription")},e.destroySignal=function(e){var t;null==(t=JO[e])||t.close(),delete JO[e]},e.dispatch=function(e,t){const n=new CustomEvent(e,{detail:t});window.dispatchEvent(n)},e.download=function(e,t,n){const r=null==window?void 0:window.atob(t),o=new Array(r.length);for(let c=0;c<r.length;c++)o[c]=r.charCodeAt(c);const i=new Uint8Array(o),a=new Blob([i],{type:e}),s=document.createElement("a");document.body.appendChild(s);const l=window.URL||window.webkitURL;Object.assign(s,{download:n,style:"display:none",href:l.createObjectURL(a)}),s.click(),l.revokeObjectURL(s.href),s.remove()},e.formatHourTime=cc,e.initialState=CT,e.isAmount=function(e){const t=+e;return!isNaN(t)&&t>0},e.mapping=function(e,t){return l.map(e,(e=>({to:t.valueAsHref?e[t.valueAsHref]:null,key:e[t.idAsKey],label:e[t.labelAsKey],value:e[t.valueAsKey]})))},e.observe=QO,e.removeHourFormat=uc,e.resetAllStores=()=>{for(const e of _T)e()},e.revert=function(e){return!e},e.signalHttps=function(e,t,n,r){return async()=>{const o={},i=(null==n?void 0:n.params)??[];(null==e?void 0:e.token)&&(o.Authorization=XO(e.token)),(null==e?void 0:e.refreshToken)&&(o["X-Access-Token"]=e.refreshToken);const a=i.length>0?i.join("/"):null,s=new GO({baseURL:t.baseURL,headers:o});switch(t.method){case"GET":if(t.normalize){const e=await s.get({provide:a?t.endpoint.concat("/",a):t.endpoint,query:null==n?void 0:n.query});return null==e?void 0:e.data}const e=await s.get({provide:a?t.endpoint.concat("/",a):t.endpoint,query:null==n?void 0:n.query});return null==e?void 0:e.data;case"DELETE":if(t.normalize){const e=await s.delete({provide:a?t.endpoint.concat("/",a):t.endpoint,query:null==n?void 0:n.query});return null==e?void 0:e.data}const o=await s.delete({provide:a?t.endpoint.concat("/",a):t.endpoint,query:null==n?void 0:n.query});return null==o?void 0:o.data;case"POST":const i=await s.post({provide:a?t.endpoint.concat("/",a):t.endpoint,query:null==n?void 0:n.query},r);return null==i?void 0:i.data;case"PUT":const l=await s.put({provide:a?t.endpoint.concat("/",a):t.endpoint,query:null==n?void 0:n.query},r);return null==l?void 0:l.data;case"PATCH":const c=await s.patch({provide:a?t.endpoint.concat("/",a):t.endpoint,query:null==n?void 0:n.query},r);return null==c?void 0:c.data;default:const{data:u}=await s.get({provide:a?t.endpoint.concat("/",a):t.endpoint,query:null==n?void 0:n.query});return u}}},e.sort=function(e,t){const n=new Map;return n.set("DEFAULT","ASC"),n.set("ASC","DESC"),n.set("DESC","DEFAULT"),t.map((t=>e===t.title&&t.sort?{...t,sort:n.get(t.sort)}:Object.assign(t,{sort:"DEFAULT"})))},e.stack=function(e,t,n=","){if(0!==e.length)return e.every((e=>"object"==typeof e))?e.map((e=>e[t])).join(n):e.join(n)},e.takeSignal=function(e,t){JO[e].onmessage=e=>{t(e.data)}},e.unsubscribeEvent=function(e){var t;$O[e]&&(null==(t=$O[e])||t.unsubscribe(),delete $O[e])},e.useBroadcaster=UO,e.useCache=function({defaultValue:e,sequence:n,cacheKey:r}){const o=pF.useQueryClient??tF,i=(pF.useQuery??hF)({enabled:!1,cacheTime:1/0,refetchOnMount:!1,refetchOnWindowFocus:!1,queryFn:e=>e,queryKey:r}),a=o(),s=Boolean(i.data),l=e=>{a.setQueryData(r,e)};return t.useEffect((()=>{e&&l(e)}),[]),{cache:i,defaultValue:e,isStored:s,store:l,purge:e=>{n?r.forEach((e=>{e&&a.resetQueries()})):s&&a.resetQueries(r??e)}}},e.useCheckbox=function(e){const[n,r]=t.useState([]),[o,i]=t.useState(!1);return t.useEffect((()=>{const e=null==n?void 0:n.length,t=null==n?void 0:n.some((e=>!1===e.checked));if(0===e||t)return void i(!1);(null==n?void 0:n.every((e=>!0===e.checked)))&&i(!0)}),[n,e]),{checkboxList:n,checkboxHead:o,setCheckboxList:r,setCheckboxHead:i,handleChangeCheckbox:(t,n)=>{if(e)return r((r=>r.map((r=>r[e]===n?{...r,checked:t}:r))))},handleChangeCheckboxHead:e=>{const t=n.map((t=>({...t,checked:e})));r(t)}}},e.useObserver=function(e,n){const[r,o]=t.useState(!1);return t.useEffect((()=>{const{unsubscribe:t}=QO(e,n);return()=>{t()}}),[]),{status:r,pause:t.useCallback((()=>o(!0)),[]),resume:t.useCallback((()=>o(!1)),[])}},e.useSessionStore=kT,e.useSignal=II,e.useToggle=function(e=!1){const[n,r]=t.useState(e),o=t.useCallback((()=>{r((e=>!e))}),[]);return{forceTo:t.useCallback((e=>{r(e)}),[]),isToggled:n,handleToggle:o}},Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}));
|
|
1367
|
+
`,GB=e=>I.jsx("svg",{fill:"none",stroke:"currentColor",strokeWidth:1.5,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",className:"h-6 w-6 text-primary",...e,children:I.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 16.5V9.75m0 0l3 3m-3-3l-3 3M6.75 19.5a4.5 4.5 0 01-1.41-8.775 5.25 5.25 0 0110.233-2.33 3 3 0 013.758 3.848A3.752 3.752 0 0118 19.5H6.75z"})}),XB=e=>I.jsx("svg",{fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",className:"h-6 w-6 text-red-700",...e,children:I.jsx("path",{clipRule:"evenodd",fillRule:"evenodd",d:"M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495zM10 5a.75.75 0 01.75.75v3.5a.75.75 0 01-1.5 0v-3.5A.75.75 0 0110 5zm0 9a1 1 0 100-2 1 1 0 000 2z"})}),ZB=e=>I.jsx("svg",{fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",className:"h-6 w-6 text-white",...e,children:I.jsx("path",{clipRule:"evenodd",fillRule:"evenodd",d:"M4.5 2A1.5 1.5 0 003 3.5v13A1.5 1.5 0 004.5 18h11a1.5 1.5 0 001.5-1.5V7.621a1.5 1.5 0 00-.44-1.06l-4.12-4.122A1.5 1.5 0 0011.378 2H4.5zm2.25 8.5a.75.75 0 000 1.5h6.5a.75.75 0 000-1.5h-6.5zm0 3a.75.75 0 000 1.5h6.5a.75.75 0 000-1.5h-6.5z"})}),UB=e=>I.jsx("svg",{fill:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",className:"h-6 w-6 text-primary",...e,children:I.jsx("path",{clipRule:"evenodd",fillRule:"evenodd",d:"M4.755 10.059a7.5 7.5 0 0112.548-3.364l1.903 1.903h-3.183a.75.75 0 100 1.5h4.992a.75.75 0 00.75-.75V4.356a.75.75 0 00-1.5 0v3.18l-1.9-1.9A9 9 0 003.306 9.67a.75.75 0 101.45.388zm15.408 3.352a.75.75 0 00-.919.53 7.5 7.5 0 01-12.548 3.364l-1.902-1.903h3.183a.75.75 0 000-1.5H2.984a.75.75 0 00-.75.75v4.992a.75.75 0 001.5 0v-3.18l1.9 1.9a9 9 0 0015.059-4.035.75.75 0 00-.53-.918z"})}),$B=t.memo((({status:e=HB.DragActive,filename:n="",wrongColor:r,maxFileSize:o=5242880,successColor:i,onFileUpload:a,renderContent:s,onStatusChange:l,acceptedFileType:c,renderBelowFilename:u,statusMessages:d,statusColors:h,statusBorder:p,statusIcons:f={[HB.DragActive]:GB,[HB.InvalidType]:XB,[HB.WithError]:XB,[HB.Reload]:UB},...m})=>{const g={[HB.DragActive]:["Mensaje personalizado 1","Mensaje personalizado 2"]},v={[HB.WithError]:"red"},b={[HB.DragActive]:"green"},y=t.useCallback((e=>{const t=e[0];null==a||a(t)}),[a]),{getRootProps:w,getInputProps:x,isDragActive:C,fileRejections:k}=LB({accept:c,maxSize:o,maxFiles:1,onDrop:y,onDropRejected:()=>{if(k.length>0){const{code:e}=k[0].errors[0];switch(e){case"file-too-large":null==l||l(HB.FileTooBig);break;case"file-invalid-type":null==l||l(HB.InvalidType)}}}}),_=e||HB.DragActive,S=(null==f?void 0:f[_])||GB;e=e||HB.DragActive;const E=(null==h?void 0:h[e])??v[e]??[],A=(null==p?void 0:p[e])??b[e]??[],D=(null==d?void 0:d[e])??g[e]??[];return I.jsxs(WB,{...w(),isDragActive:C,borderColor:A,wrongColor:r,successColor:i,...m,children:[S&&I.jsx(M,{marginTop:2,children:I.jsx(S,{})}),e&&[HB.WithError,HB.Reload].includes(e)&&n&&I.jsxs(zB,{backgroundColor:E,children:[I.jsx(ZB,{})," ",I.jsxs("p",{children:["Archivo cargado:",n," "]})]}),u&&u,I.jsxs(VB,{children:[D.filter(Boolean).map((e=>I.jsx("p",{children:e},e))),s&&s]}),I.jsx(YB,{...x()})]})})),JB="flex items-center w-[562px] text-xs text-gray-900 font-medium sm:text-base",QB="flex w-full relative text-gray-900",qB="flex w-full relative text-gray-900 after:content-[''] after:w-full after:h-[6px] after:bg-primary after:inline-block after:absolute lg:after:top-6 after:top-3 after:left-4",KB="flex w-full relative after:w-full after:h-[6px] after:bg-primary/30 after:inline-block after:absolute lg:after:top-6 after:top-3 after:left-4",eH="absolute right-8 w-[107px] h-[38px] text-center",tH={index:"block z-10",root:"size-14 text-primary rounded-full flex justify-center items-center mx-auto mb-3 text-sm",selected:"bg-white border-4 border-primary",disabled:"bg-opaque border-4 border-primary/20 text-white/70 hover:bg-white hover:border-primary hover:text-primary pointer-events-none",normal:"bg-primary border-4 border-transparent text-white hover:bg-white hover:border-primary hover:text-primary",position:"font-bold text-2xl"},nH=t.memo((({steps:e,canProceed:t,currentStep:n,onStepChange:r})=>{const o=(t,n)=>t===e.length-1?QB:n?qB:KB;return I.jsx("ol",{className:JB,children:e.map(((e,i)=>{return I.jsx("li",{className:o(i,t[i]),children:I.jsxs("div",{className:tH.index,children:[I.jsx("button",{disabled:!t[i],onClick:()=>r(e.id),className:(a=e.id,s=t[i],n===a?`${tH.root} ${tH.selected}`:s?`${tH.root} ${tH.normal}`:`${tH.root} ${tH.disabled}`),children:I.jsx("span",{className:tH.position,children:e.id})}),I.jsx($_,{className:eH,size:"lg",color:t[i]?"primary":"opaque",font:"bold",children:e.label})]})},e.id);var a,s}))})}));e.$channels=JO,e.$events=$O,e.$observers={},e.AlertTitle=({title:e,Icon:t})=>I.jsxs("div",{className:dA.rule,children:[I.jsx("div",{className:dA.icon,children:t&&I.jsx(t,{})}),I.jsx("div",{}),I.jsx("h1",{className:dA.alert,children:e})]}),e.Badge=hI,e.BadgeStatus=dI,e.Box=M,e.Button=wI,e.Card=({requirement:e,description:t,Icon:n})=>I.jsx("div",{className:uA.size,children:I.jsx("div",{className:uA.style,children:I.jsxs("div",{className:uA.separator,children:[I.jsxs("div",{children:[I.jsxs("h1",{className:uA.title,children:[" ",e," "]}),I.jsx("h2",{className:uA.body,children:t})]}),I.jsxs("div",{className:uA.icon,children:[n&&I.jsx(n,{})," "]})]})})}),e.Chart=ji,e.CheckTitle=({title:e,Icon:t})=>I.jsxs("div",{className:dA.rule,children:[I.jsx("div",{className:dA.icon,children:t&&I.jsx(t,{})}),I.jsx("div",{}),I.jsx("h1",{className:dA.pass,children:e})]}),e.Checkbox=ec,e.Collapse=lI,e.Color=Pi,e.Colspan=ES,e.Container=({className:e,children:t,start:n=2,cols:r=10})=>I.jsx("div",{className:A(`col-start-${n} col-span-${r}`,e&&e),children:t}),e.Counter=({passedDays:e,remainingDays:t,message:n,color:r})=>{const o=A({"text-4xl":t&&Math.abs(t)<100,"text-3xl":t&&Math.abs(t)>=100});return I.jsxs("div",{className:AS,children:[I.jsxs(RS,{className:DS,color:r,children:[I.jsx("div",{className:A(OS,o),children:t}),I.jsx("div",{className:MS,children:"días"})]}),I.jsxs("div",{className:NS,children:[I.jsx("div",{className:TS,children:n}),I.jsxs(jS,{color:r,children:[e," días"]}),I.jsx("div",{className:PS,children:"transcurridos"})]})]})},e.DangerTitle=({title:e,Icon:t})=>I.jsxs("div",{className:dA.rule,children:[I.jsx("div",{className:dA.icon,children:t&&I.jsx(t,{})}),I.jsx("div",{}),I.jsxs("h1",{className:dA.danger,children:[" ",e]})]}),e.Datepicker=W_,e.Description=({content:e,children:t})=>I.jsx("h3",{className:A(G_.description,e&&G_.content),children:t}),e.Detail=DF,e.Dragarea=$B,e.Dropdown=oc,e.Empty=LS,e.Error=e=>{const n=t.useRef(!0);return t.useEffect((()=>{if(null==e?void 0:e.onDismiss)return null==window||window.setTimeout((()=>{var t;n.current&&(null==(t=null==e?void 0:e.onDismiss)||t.call(e))}),q_),()=>{n.current=!1}}),[null==e?void 0:e.onDismiss]),I.jsx("span",{className:A(U_.confirmation,(null==e?void 0:e.className)&&e.className,(null==e?void 0:e.confirmation)?U_.show:U_.hide),children:(null==e?void 0:e.confirmation)&&e.children})},e.EventMap=KO,e.Flex=lc,e.FlexItem=({children:e,...t})=>{const n=ac(t);return I.jsx("div",{className:n,children:e})},e.Footer=OI,e.GrantSystem=kL,e.Grid=IS,e.HttpClient=GO,e.IN_Grants=TI,e.Input=pS,e.InputMode=CS,e.InputTable=wS,e.Layout=fE,e.Little=({children:e})=>I.jsx("h2",{className:X_.title,children:e}),e.Loading=FS,e.LocalStorageKeys=xA,e.LogColors=xL,e.LogLevel=wL,e.Logger=CL,e.Method=ZO,e.MicrofrontHost=yL,e.Modal=({modal:e,isOpen:t,children:n,onClose:r=()=>{}})=>I.jsx(El,{modal:e,onHide:r,visible:t,maskStyle:Al.dialog.mask.style,headerClassName:Al.dialog.header.className,contentClassName:Al.dialog.content.className,children:n&&n}),e.Navbar=qI,e.Pagination=cA,e.Permissions=NI,e.Private=_L,e.RadioButton=Y_,e.Row=({children:e,...t})=>I.jsx(N,{...t,children:e}),e.SP_Grants=PI,e.ScrollSearch=rA,e.Search=ZE,e.Select=Zf,e.Sidebar=GI,e.SignalContext=SI,e.SingleDeadlineChart=({workLine:e})=>e?(e.stages.forEach((e=>{const t=[];e.deadlines=e.deadlines.sort(((e,t)=>t.since-e.since)),e.deadlines.forEach(((n,r)=>{0===r?n.since<e.maxDuration&&t.push({id:0,name:"1",criticalLevel:"",color:"#e5e7eb",since:e.maxDuration,until:n.since+1}):(n.since<e.deadlines[r-1].until-1&&t.push({id:0,name:"2",criticalLevel:"",color:"#e5e7eb",since:e.deadlines[r-1].until-1,until:n.since+1}),r===e.deadlines.length-1&&n.until>e.minDuration&&t.push({id:0,name:"3",criticalLevel:"",color:"#e5e7eb",since:n.until-1,until:e.minDuration})),t.push(n)})),e.deadlines=t.sort(((e,t)=>t.since-e.since))})),I.jsx(zS,{children:I.jsxs(GS,{children:[I.jsx(XS,{children:I.jsxs(ZS,{children:["Plazos de ",e.name]})}),I.jsx(US,{children:e.stages.map((e=>I.jsx($S,{className:2===e.id?WS:HS,children:I.jsxs(JS,{children:[I.jsxs(QS,{children:[I.jsx(qS,{children:e.deadlines.map((t=>{const n=t.since/e.maxDuration*100;return I.jsx(iI,{widthPercent:n,children:I.jsx(KS,{children:t.since})},t.id)}))}),I.jsx(eI,{children:e.deadlines.map(((t,n)=>{const r=t.since/e.maxDuration*100;let o=VS;const i=VS;return t.color&&n!==e.deadlines.length-1&&(o=YS),I.jsx(oI,{className:`${o} ${i}`,bgColor:t.color,widthPercent:r},t.id)}))})]}),I.jsxs(tI,{children:[I.jsxs(nI,{children:[" Etapa de ",e.name]}),e.deadlines.map((e=>I.jsx(rI,{children:"#E55257"===e.color&&e.until>=0?e.until:null},e.id)))]})]})},e.id)))})]},e.id)})):I.jsx("div",{children:"No se encuentra el Plazo Solicitado."}),e.Stepper=nH,e.Subtitle=Q_,e.Success=e=>{const n=t.useRef(!0);return t.useEffect((()=>{if(null==e?void 0:e.onDismiss)return null==window||window.setTimeout((()=>{var t;n.current&&(null==(t=null==e?void 0:e.onDismiss)||t.call(e))}),q_),()=>{n.current=!1}}),[null==e?void 0:e.onDismiss]),I.jsx("span",{className:A(Z_.confirmation,(null==e?void 0:e.className)&&e.className,(null==e?void 0:e.confirmation)?Z_.show:Z_.hide),children:e.children})},e.Switch=({children:e,color:t,backgroundColor:n,onChange:r,checked:o,disabled:i})=>I.jsxs(Qf,{children:[e&&I.jsx(qf,{color:t,children:e}),I.jsx(Kf,{children:I.jsxs(em,{children:[I.jsx(tm,{checked:o,onChange:()=>{!i&&(null==r||r(!o))}}),I.jsx(nm,{backgroundColor:n,disabled:i})]})})]}),e.Table=jE,e.TableData=LE,e.TableInput=kS,e.TableRow=({align:e,children:t,disabled:n=!1})=>I.jsx(AE,{align:e,disabled:n,children:t}),e.TableWrapper=({children:e})=>I.jsx("div",{className:wE.container,children:e}),e.Text=$_,e.TextArea=({name:e,rows:t=4,value:n,onChange:r,textColor:o,borderColor:i,maxLength:a,...s})=>I.jsx(SS,{name:e,value:n,rows:t,textColor:o,borderColor:i,onChange:e=>{null==r||r(e)},onKeyDown:e=>{var t;null==(t=s.onKeyDown)||t.call(s,e)},maxLength:a,...s}),e.Timeline=RF,e.Title=J_,e.Tooltip=by,e.TotalHours=({hours:e,inputs:t,pending:n,borderColor:r,hoursTitle:o,inputsTitle:i,pendingTitle:a,hoursColor:s,inputColor:l,pendingColor:c,hoursTitleColor:u,inputsTitleColor:d,pendingTitleColor:h})=>I.jsxs(pA,{children:[I.jsx(hA,{title:o,value:e,color:s,titleColor:u,as:bA}),I.jsx(hA,{title:i,value:t,color:l,titleColor:d,as:yA,borderColor:r}),I.jsx(hA,{title:a,value:n,color:c,titleColor:h,as:wA})]}),e.UrlSSOParams=CA,e.Wait=BS,e.authorization=({user:e,allow:t,system:n=MI})=>{var r,o;const i=null==(r=null==e?void 0:e.systems)?void 0:r.find((e=>e.name===n)),a=null==(o=null==i?void 0:i.functions)?void 0:o.filter((e=>{const n=e.key;return null==t?void 0:t.includes(n)}));return(null==a?void 0:a.length)===(null==t?void 0:t.length)},e.bearer=XO,e.broadcast=qO,e.capitalize=function(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()},e.checkSystems=({user:e,passport:t,systems:n})=>{var r;const o=null==(r=null==e?void 0:e.systems)?void 0:r.filter((e=>null==n?void 0:n.includes(e.name)));return!!t&&(null==o?void 0:o.length)===(null==n?void 0:n.length)},e.createHalfTimeSlots=function(e,t){return Array.from({length:2*(t??24)},((t,n)=>{const r=n%2*30,o=Math.floor(n/2).toString().padStart(2,"0"),i=0===r?"00":r.toString();return{[e??"hour"]:`${o}:${i}`}}))},e.createObserver=function(e){const t=new c.Subject,n=window;try{n[e]=t}catch(Ph){}return t},e.createRef=e=>{if(void 0===e)return xM;const t=xM(e),n=t.getState();return _T.push((()=>{t.setState(n,!0)})),t},e.createSignal=function(e,t){var n;JO[e]?null==(n=JO[e])||n.postMessage(t):JO[e]=new window.BroadcastChannel(e)},e.createTimeSlots=function(e,t){return Array.from({length:t??24},((t,n)=>({[e??"hour"]:n.toString().padStart(2,"0")+":00"})))},e.defaultCacheQueryOptions=fF,e.defaultConfig=pF,e.destroy=function(e){const t=window;if(t[e]){return t[e].unsubscribe()}throw new Error("Cannot find subscription")},e.destroySignal=function(e){var t;null==(t=JO[e])||t.close(),delete JO[e]},e.dispatch=function(e,t){const n=new CustomEvent(e,{detail:t});window.dispatchEvent(n)},e.download=function(e,t,n){const r=null==window?void 0:window.atob(t),o=new Array(r.length);for(let c=0;c<r.length;c++)o[c]=r.charCodeAt(c);const i=new Uint8Array(o),a=new Blob([i],{type:e}),s=document.createElement("a");document.body.appendChild(s);const l=window.URL||window.webkitURL;Object.assign(s,{download:n,style:"display:none",href:l.createObjectURL(a)}),s.click(),l.revokeObjectURL(s.href),s.remove()},e.formatHourTime=cc,e.initialState=CT,e.isAmount=function(e){const t=+e;return!isNaN(t)&&t>0},e.mapping=function(e,t){return l.map(e,(e=>({to:t.valueAsHref?e[t.valueAsHref]:null,key:e[t.idAsKey],label:e[t.labelAsKey],value:e[t.valueAsKey]})))},e.observe=QO,e.removeHourFormat=uc,e.resetAllStores=()=>{for(const e of _T)e()},e.revert=function(e){return!e},e.signalHttps=function(e,t,n,r){return async()=>{const o={},i=(null==n?void 0:n.params)??[];(null==e?void 0:e.token)&&(o.Authorization=XO(e.token)),(null==e?void 0:e.refreshToken)&&(o["X-Access-Token"]=e.refreshToken);const a=i.length>0?i.join("/"):null,s=new GO({baseURL:t.baseURL,headers:o});switch(t.method){case"GET":if(t.normalize){const e=await s.get({provide:a?t.endpoint.concat("/",a):t.endpoint,query:null==n?void 0:n.query});return null==e?void 0:e.data}const e=await s.get({provide:a?t.endpoint.concat("/",a):t.endpoint,query:null==n?void 0:n.query});return null==e?void 0:e.data;case"DELETE":if(t.normalize){const e=await s.delete({provide:a?t.endpoint.concat("/",a):t.endpoint,query:null==n?void 0:n.query});return null==e?void 0:e.data}const o=await s.delete({provide:a?t.endpoint.concat("/",a):t.endpoint,query:null==n?void 0:n.query});return null==o?void 0:o.data;case"POST":const i=await s.post({provide:a?t.endpoint.concat("/",a):t.endpoint,query:null==n?void 0:n.query},r);return null==i?void 0:i.data;case"PUT":const l=await s.put({provide:a?t.endpoint.concat("/",a):t.endpoint,query:null==n?void 0:n.query},r);return null==l?void 0:l.data;case"PATCH":const c=await s.patch({provide:a?t.endpoint.concat("/",a):t.endpoint,query:null==n?void 0:n.query},r);return null==c?void 0:c.data;default:const{data:u}=await s.get({provide:a?t.endpoint.concat("/",a):t.endpoint,query:null==n?void 0:n.query});return u}}},e.sort=function(e,t){const n=new Map;return n.set("DEFAULT","ASC"),n.set("ASC","DESC"),n.set("DESC","DEFAULT"),t.map((t=>e===t.title&&t.sort?{...t,sort:n.get(t.sort)}:Object.assign(t,{sort:"DEFAULT"})))},e.stack=function(e,t,n=","){if(0!==e.length)return e.every((e=>"object"==typeof e))?e.map((e=>e[t])).join(n):e.join(n)},e.takeSignal=function(e,t){JO[e].onmessage=e=>{t(e.data)}},e.unsubscribeEvent=function(e){var t;$O[e]&&(null==(t=$O[e])||t.unsubscribe(),delete $O[e])},e.useBroadcaster=UO,e.useCache=function({defaultValue:e,sequence:n,cacheKey:r}){const o=pF.useQueryClient??tF,i=(pF.useQuery??hF)({enabled:!1,cacheTime:1/0,refetchOnMount:!1,refetchOnWindowFocus:!1,queryFn:e=>e,queryKey:r}),a=o(),s=Boolean(i.data),l=e=>{a.setQueryData(r,e)};return t.useEffect((()=>{e&&l(e)}),[]),{cache:i,defaultValue:e,isStored:s,store:l,purge:e=>{n?r.forEach((e=>{e&&a.resetQueries()})):s&&a.resetQueries(r??e)}}},e.useCheckbox=function(e){const[n,r]=t.useState([]),[o,i]=t.useState(!1);return t.useEffect((()=>{const e=null==n?void 0:n.length,t=null==n?void 0:n.some((e=>!1===e.checked));if(0===e||t)return void i(!1);(null==n?void 0:n.every((e=>!0===e.checked)))&&i(!0)}),[n,e]),{checkboxList:n,checkboxHead:o,setCheckboxList:r,setCheckboxHead:i,handleChangeCheckbox:(t,n)=>{if(e)return r((r=>r.map((r=>r[e]===n?{...r,checked:t}:r))))},handleChangeCheckboxHead:e=>{const t=n.map((t=>({...t,checked:e})));r(t)}}},e.useObserver=function(e,n){const[r,o]=t.useState(!1);return t.useEffect((()=>{const{unsubscribe:t}=QO(e,n);return()=>{t()}}),[]),{status:r,pause:t.useCallback((()=>o(!0)),[]),resume:t.useCallback((()=>o(!1)),[])}},e.useSessionStore=kT,e.useSignal=II,e.useToggle=function(e=!1){const[n,r]=t.useState(e),o=t.useCallback((()=>{r((e=>!e))}),[]);return{forceTo:t.useCallback((e=>{r(e)}),[]),isToggled:n,handleToggle:o}},Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}));
|
|
1368
1368
|
//# sourceMappingURL=index.umd.js.map
|