@ufal-lccv/gpsub-ds 0.2.47 → 0.2.48

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.
@@ -1,4 +1,4 @@
1
- import { a0 as e, ad as S, ae as w, af as R, ag as v, _ as a, ah as _, a7 as D, c as u, ai as L, aj as O, ak as $, al as y, a5 as z, am as W, e as q, I as B, an as M } from "./GenericAGGridTable-CizvYJ68.js";
1
+ import { a0 as e, ad as S, ae as w, af as R, ag as v, _ as a, ah as _, a7 as D, c as u, ai as L, aj as O, ak as $, al as y, a5 as z, am as W, e as q, I as B, an as M } from "./GenericAGGridTable-17IhgzCP.js";
2
2
  import { d as V, v as j } from "./index-YF_5f0O1.js";
3
3
  import { useState as C, useEffect as N } from "react";
4
4
  import "sbwb-ds";
@@ -1 +1 @@
1
- "use strict";const e=require("./GenericAGGridTable-DovNLp8U.cjs"),b=require("./index-CPP6SuZS.cjs"),m=require("react");require("sbwb-ds");let u=[];const p=[],F=r=>(p.push(r),()=>{const o=p.indexOf(r);o>=0&&p.splice(o,1)}),R=()=>p.forEach(r=>r()),A=r=>{u=[r,...u],R()},I=r=>{u=u.filter(o=>o.instanceId!==r),R()},y=()=>u,d={subscribe:F,add:A,remove:I,getAlerts:y},w=()=>{const[r,o]=m.useState(d.getAlerts());return m.useEffect(()=>d.subscribe(()=>o([...d.getAlerts()])),[]),e.jsxRuntimeExports.jsx(e.AlertStackContainer,{children:r.map(({instanceId:s,props:t,destroy:n})=>e.jsxRuntimeExports.jsx(e.AlertView,{...t,destroy:n},s))})};let g=!1;const S=({id:r,type:o,title:s,description:t,durationInMilliseconds:n=3e3,dataToCopy:l,offset:a={x:0,y:0}})=>{const c=r+Date.now()+Math.random(),x=()=>d.remove(c);if(d.add({instanceId:c,props:{id:r,type:o,title:s,description:t,durationInMilliseconds:n,dataToCopy:l,offset:a},destroy:x}),!g){g=!0;const j=b.dom.portal.add("alert-stack");e.clientExports.createRoot(j).render(e.jsxRuntimeExports.jsx(w,{}))}},q=({width:r="100%",height:o="fit-content",type:s,variant:t="small",title:n,message:l,margin:a,open:c=!0,onClose:x,canClose:j=!0})=>{var h,E;const[C,k]=m.useState(c),i={info:{backgroundColor:"#D5EBFD",borderColor:e.y.colors.feedbackColors.colorFeedbackInfo,icon:e.jsxRuntimeExports.jsx(e.InfoFill_default,{color:e.y.colors.feedbackColors.colorFeedbackInfo,height:"24px",width:"24px"})},success:{backgroundColor:"#DAF9DB",borderColor:e.y.colors.feedbackColors.colorFeedbackSuccess,icon:e.jsxRuntimeExports.jsx(e.CheckCircleFill_default,{color:e.y.colors.feedbackColors.colorFeedbackSuccess,height:"24px",width:"24px"})},warning:{backgroundColor:"#FEEECF",borderColor:e.y.colors.feedbackColors.colorFeedbackWarning},error:{backgroundColor:"#FFE1E1",borderColor:e.y.colors.feedbackColors.colorFeedbackError,icon:e.jsxRuntimeExports.jsx(e.ErrorFill_default,{color:e.y.colors.feedbackColors.colorFeedbackError,height:"24px",width:"24px"})}};function f(){k(!1),x==null||x()}return e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:C?e.jsxRuntimeExports.jsxs(e.Container,{width:r,height:o,direction:"horizontal",verticalAlign:n?"top":"center",gap:e.y.spacings.spacingInline.spacingInlineAnt,padding:t=="small"?`${e.y.spacings.spacingStack.spacingStackXs} ${e.y.spacings.spacingInline.spacingInlineAnt}`:e.y.spacings.spacingInline.spacingInlineSm,backgroundColor:(h=i==null?void 0:i[s])==null?void 0:h.backgroundColor,customStyles:{border:`1px solid ${(E=i==null?void 0:i[s])==null?void 0:E.borderColor}`,borderRadius:e.y.borders.borderRadius.borderRadiusSm,margin:a,position:"relative"},children:[s==="warning"?e.jsxRuntimeExports.jsx(e.ContainerWarning,{children:e.jsxRuntimeExports.jsx(e.WarningFill_default,{width:"24px",height:"24px"})}):e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:i==null?void 0:i[s].icon}),e.jsxRuntimeExports.jsxs(e.Container,{width:"100%",flex:"1",height:"100%",verticalAlign:"center",children:[b.valuable(n)&&e.jsxRuntimeExports.jsx(e.Title$1,{children:n}),b.valuable(l)&&e.jsxRuntimeExports.jsx(e.Message,{children:l})]}),j&&e.jsxRuntimeExports.jsx(e.Container,{children:e.jsxRuntimeExports.jsx(e.Close_default,{color:e.y.colors.neutralColors.colorNeutralCloudy,cursor:"pointer",onClick:f,height:"20px",width:"20px"})})]}):e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{})})},v=({label:r,labelRender:o,infoProps:s={},withInfo:t=!0,flex:n,width:l="100%",isRequired:a=!1})=>{const c={tooltipProps:{position:"top",...s==null?void 0:s.tooltipProps,size:"Small"}};return e.jsxRuntimeExports.jsxs(e.Container,{width:l,direction:"horizontal",gap:"4px",flex:n,children:[o??e.jsxRuntimeExports.jsxs(e.Label$1,{children:[r," ",a?e.jsxRuntimeExports.jsx(e.Required,{}):null]}),t&&e.jsxRuntimeExports.jsx(e.Info,{...c})]})},$=({width:r="100%",flex:o,label:s="Obrigatório",margin:t="0 0 16px 0"})=>e.jsxRuntimeExports.jsx(e.Container,{width:r,flex:o,customStyles:{margin:t},children:e.jsxRuntimeExports.jsx(e.Label$2,{children:`* ${s}`})});exports.AlertInline=q;exports.LabelField=v;exports.RequiredLabelView=$;exports.showAlert=S;
1
+ "use strict";const e=require("./GenericAGGridTable-D3Zq9BKB.cjs"),b=require("./index-CPP6SuZS.cjs"),m=require("react");require("sbwb-ds");let u=[];const p=[],F=r=>(p.push(r),()=>{const o=p.indexOf(r);o>=0&&p.splice(o,1)}),R=()=>p.forEach(r=>r()),A=r=>{u=[r,...u],R()},I=r=>{u=u.filter(o=>o.instanceId!==r),R()},y=()=>u,d={subscribe:F,add:A,remove:I,getAlerts:y},w=()=>{const[r,o]=m.useState(d.getAlerts());return m.useEffect(()=>d.subscribe(()=>o([...d.getAlerts()])),[]),e.jsxRuntimeExports.jsx(e.AlertStackContainer,{children:r.map(({instanceId:s,props:t,destroy:n})=>e.jsxRuntimeExports.jsx(e.AlertView,{...t,destroy:n},s))})};let g=!1;const S=({id:r,type:o,title:s,description:t,durationInMilliseconds:n=3e3,dataToCopy:l,offset:a={x:0,y:0}})=>{const c=r+Date.now()+Math.random(),x=()=>d.remove(c);if(d.add({instanceId:c,props:{id:r,type:o,title:s,description:t,durationInMilliseconds:n,dataToCopy:l,offset:a},destroy:x}),!g){g=!0;const j=b.dom.portal.add("alert-stack");e.clientExports.createRoot(j).render(e.jsxRuntimeExports.jsx(w,{}))}},q=({width:r="100%",height:o="fit-content",type:s,variant:t="small",title:n,message:l,margin:a,open:c=!0,onClose:x,canClose:j=!0})=>{var h,E;const[C,k]=m.useState(c),i={info:{backgroundColor:"#D5EBFD",borderColor:e.y.colors.feedbackColors.colorFeedbackInfo,icon:e.jsxRuntimeExports.jsx(e.InfoFill_default,{color:e.y.colors.feedbackColors.colorFeedbackInfo,height:"24px",width:"24px"})},success:{backgroundColor:"#DAF9DB",borderColor:e.y.colors.feedbackColors.colorFeedbackSuccess,icon:e.jsxRuntimeExports.jsx(e.CheckCircleFill_default,{color:e.y.colors.feedbackColors.colorFeedbackSuccess,height:"24px",width:"24px"})},warning:{backgroundColor:"#FEEECF",borderColor:e.y.colors.feedbackColors.colorFeedbackWarning},error:{backgroundColor:"#FFE1E1",borderColor:e.y.colors.feedbackColors.colorFeedbackError,icon:e.jsxRuntimeExports.jsx(e.ErrorFill_default,{color:e.y.colors.feedbackColors.colorFeedbackError,height:"24px",width:"24px"})}};function f(){k(!1),x==null||x()}return e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:C?e.jsxRuntimeExports.jsxs(e.Container,{width:r,height:o,direction:"horizontal",verticalAlign:n?"top":"center",gap:e.y.spacings.spacingInline.spacingInlineAnt,padding:t=="small"?`${e.y.spacings.spacingStack.spacingStackXs} ${e.y.spacings.spacingInline.spacingInlineAnt}`:e.y.spacings.spacingInline.spacingInlineSm,backgroundColor:(h=i==null?void 0:i[s])==null?void 0:h.backgroundColor,customStyles:{border:`1px solid ${(E=i==null?void 0:i[s])==null?void 0:E.borderColor}`,borderRadius:e.y.borders.borderRadius.borderRadiusSm,margin:a,position:"relative"},children:[s==="warning"?e.jsxRuntimeExports.jsx(e.ContainerWarning,{children:e.jsxRuntimeExports.jsx(e.WarningFill_default,{width:"24px",height:"24px"})}):e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:i==null?void 0:i[s].icon}),e.jsxRuntimeExports.jsxs(e.Container,{width:"100%",flex:"1",height:"100%",verticalAlign:"center",children:[b.valuable(n)&&e.jsxRuntimeExports.jsx(e.Title$1,{children:n}),b.valuable(l)&&e.jsxRuntimeExports.jsx(e.Message,{children:l})]}),j&&e.jsxRuntimeExports.jsx(e.Container,{children:e.jsxRuntimeExports.jsx(e.Close_default,{color:e.y.colors.neutralColors.colorNeutralCloudy,cursor:"pointer",onClick:f,height:"20px",width:"20px"})})]}):e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{})})},v=({label:r,labelRender:o,infoProps:s={},withInfo:t=!0,flex:n,width:l="100%",isRequired:a=!1})=>{const c={tooltipProps:{position:"top",...s==null?void 0:s.tooltipProps,size:"Small"}};return e.jsxRuntimeExports.jsxs(e.Container,{width:l,direction:"horizontal",gap:"4px",flex:n,children:[o??e.jsxRuntimeExports.jsxs(e.Label$1,{children:[r," ",a?e.jsxRuntimeExports.jsx(e.Required,{}):null]}),t&&e.jsxRuntimeExports.jsx(e.Info,{...c})]})},$=({width:r="100%",flex:o,label:s="Obrigatório",margin:t="0 0 16px 0"})=>e.jsxRuntimeExports.jsx(e.Container,{width:r,flex:o,customStyles:{margin:t},children:e.jsxRuntimeExports.jsx(e.Label$2,{children:`* ${s}`})});exports.AlertInline=q;exports.LabelField=v;exports.RequiredLabelView=$;exports.showAlert=S;