@ufal-lccv/gpsub-ds 0.2.34 → 0.2.36
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/{GenericAGGridTable-BkKlYm9W.cjs → GenericAGGridTable-BpCe0EpD.cjs} +6 -14
- package/dist/{GenericAGGridTable-TGbLm6ra.js → GenericAGGridTable-DDEgt2mb.js} +6 -14
- package/dist/RequiredLabel.view-BZ4X4sXl.cjs +1 -0
- package/dist/{RequiredLabel.view-D8yK7yMX.js → RequiredLabel.view-Cfc09oC7.js} +54 -54
- package/dist/Table.view-D8vf7Ql5.cjs +1 -0
- package/dist/{Table.view-9Q1g9jyS.js → Table.view-P74taYju.js} +297 -292
- package/dist/{Title.view-CEOS_2Kr.js → Title.view-CYn5Mmq6.js} +1 -1
- package/dist/{Title.view-Gt-LLz3O.cjs → Title.view-D8RSOVI4.cjs} +1 -1
- package/dist/components/atoms/index.cjs.js +1 -1
- package/dist/components/atoms/index.es.js +2 -2
- package/dist/components/index.cjs.js +1 -1
- package/dist/components/index.es.js +4 -4
- package/dist/components/molecules/index.cjs.js +1 -1
- package/dist/components/molecules/index.es.js +2 -2
- package/dist/components/organisms/index.cjs.js +1 -1
- package/dist/components/organisms/index.es.js +2 -2
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +4 -4
- package/package.json +1 -1
- package/dist/RequiredLabel.view-JYE_W93N.cjs +0 -1
- package/dist/Table.view-OMcadzNU.cjs +0 -1
|
@@ -9678,7 +9678,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
9678
9678
|
background-color: ${({disabled:e,readonly:t})=>e||t?C.colors.backgroundColors.colorBackgroundCarpet:C.colors.neutralColors.colorNeutralSnow};
|
|
9679
9679
|
color: ${C.colors.neutralColors.colorNeutralDark};
|
|
9680
9680
|
border: ${C.borders.borderWidth.borderWidthThinner} solid
|
|
9681
|
-
${C.colors.neutralColors.
|
|
9681
|
+
${C.colors.neutralColors.colorNeutralCleanest};
|
|
9682
9682
|
${({error:e,disabled:t,readonly:n})=>{if(e&&(!t||!n))return nt`
|
|
9683
9683
|
:focus-within {
|
|
9684
9684
|
border-color: ${C.colors.feedbackColors.colorFeedbackError};
|
|
@@ -9692,7 +9692,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
9692
9692
|
border-color: ${C.colors.feedbackColors.colorFeedbackError};
|
|
9693
9693
|
background-color: ${C.colors.brandColors.colorBrandSeSoft};
|
|
9694
9694
|
`;if(!e&&(!t||!n))return nt`
|
|
9695
|
-
border-color: ${C.colors.neutralColors.
|
|
9695
|
+
border-color: ${C.colors.neutralColors.colorNeutralCleanest};
|
|
9696
9696
|
background-color: ${C.colors.neutralColors.colorNeutralSnow};
|
|
9697
9697
|
`}}
|
|
9698
9698
|
|
|
@@ -12290,7 +12290,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
12290
12290
|
${({variant:e})=>e==="default"&&nt`
|
|
12291
12291
|
border: ${C.borders.borderWidth.borderWidthThinner} solid;
|
|
12292
12292
|
border-radius: ${C.borders.borderRadius.borderRadiusSm};
|
|
12293
|
-
border-color: ${({isOpen:t,hasError:n,readonly:r,disabled:o})=>n?C.colors.feedbackColors.colorFeedbackError:r||o?C.colors.neutralColors.colorNeutralClean:t?C.colors.neutralColors.colorNeutralCloudy:C.colors.neutralColors.
|
|
12293
|
+
border-color: ${({isOpen:t,hasError:n,readonly:r,disabled:o})=>n?C.colors.feedbackColors.colorFeedbackError:r||o?C.colors.neutralColors.colorNeutralClean:t?C.colors.neutralColors.colorNeutralCloudy:C.colors.neutralColors.colorNeutralCleanest};
|
|
12294
12294
|
`}
|
|
12295
12295
|
|
|
12296
12296
|
background-color: ${({variant:e})=>e==="default"?C.colors.backgroundColors.colorBackgroundSnow:"transparent"};
|
|
@@ -12697,7 +12697,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
12697
12697
|
padding: ${()=>`${C.spacings.spacingInline.spacingInlineXs} ${C.spacings.spacingInline.spacingInlineXs}`};
|
|
12698
12698
|
|
|
12699
12699
|
border-bottom: ${({withBorder:e})=>e?`${C.borders.borderWidth.borderWidthThinner} solid ${C.colors.neutralColors.colorNeutralSoft}`:"none"};
|
|
12700
|
-
border-right: ${({withBorder:e})=>e?`${C.borders.borderWidth.borderWidthThinner} solid ${C.colors.neutralColors.colorNeutralSoft}`:"none"};
|
|
12700
|
+
border-right: ${({withBorder:e,isLastColumn:t})=>e&&!t?`${C.borders.borderWidth.borderWidthThinner} solid ${C.colors.neutralColors.colorNeutralSoft}`:"none"};
|
|
12701
12701
|
|
|
12702
12702
|
font-family: ${C.fonts.fontFamily.fontFamilyPrimary};
|
|
12703
12703
|
font-size: ${({columnsTextSize:e})=>e==="Large"?C.fonts.fontSize.fontSizeBodyMd:C.fonts.fontSize.fontSizeBodySm};
|
|
@@ -12707,10 +12707,6 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
12707
12707
|
|
|
12708
12708
|
word-break: normal;
|
|
12709
12709
|
|
|
12710
|
-
&:last-child {
|
|
12711
|
-
border-right: none;
|
|
12712
|
-
}
|
|
12713
|
-
|
|
12714
12710
|
& > svg:not([color]):not([data-testid='icon']) {
|
|
12715
12711
|
path {
|
|
12716
12712
|
fill: ${C.colors.neutralColors.colorNeutralDarkest};
|
|
@@ -12744,14 +12740,14 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
12744
12740
|
word-break: normal;
|
|
12745
12741
|
|
|
12746
12742
|
border-bottom: ${({withBorder:e,isLast:t})=>e&&!t?`${C.borders.borderWidth.borderWidthThinner} solid ${C.colors.neutralColors.colorNeutralSoft}`:"none"};
|
|
12747
|
-
border-right: ${({withBorder:e})=>e?`${C.borders.borderWidth.borderWidthThinner} solid ${C.colors.neutralColors.colorNeutralSoft}`:"none"};
|
|
12743
|
+
border-right: ${({withBorder:e,isLastColumn:t})=>e&&!t?`${C.borders.borderWidth.borderWidthThinner} solid ${C.colors.neutralColors.colorNeutralSoft}`:"none"};
|
|
12748
12744
|
|
|
12749
12745
|
background-color: ${({backgroundColor:e})=>e||"transparent"};
|
|
12750
12746
|
|
|
12751
12747
|
${({disabled:e})=>e&&nt`
|
|
12752
12748
|
background-color: ${C.colors.brandColors.colorBrandSeSoft};
|
|
12753
12749
|
border-bottom: ${({withBorder:t,isLast:n})=>t&&!n?`${C.borders.borderWidth.borderWidthThinner} solid ${C.colors.neutralColors.colorNeutralClean}`:"none"};
|
|
12754
|
-
border-right: ${({withBorder:t})=>t?`${C.borders.borderWidth.borderWidthThinner} solid ${C.colors.neutralColors.colorNeutralClean}`:"none"};
|
|
12750
|
+
border-right: ${({withBorder:t,isLastColumn:n})=>t&&!n?`${C.borders.borderWidth.borderWidthThinner} solid ${C.colors.neutralColors.colorNeutralClean}`:"none"};
|
|
12755
12751
|
color: ${C.colors.neutralColors.colorNeutralCloudy};
|
|
12756
12752
|
`}
|
|
12757
12753
|
|
|
@@ -12760,10 +12756,6 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
12760
12756
|
border-bottom: ${({withBorder:t,isLast:n})=>t&&!n?`${C.borders.borderWidth.borderWidthThinner} solid ${C.colors.feedbackColors.colorFeedbackError}`:"none"};
|
|
12761
12757
|
`}
|
|
12762
12758
|
|
|
12763
|
-
&:last-child {
|
|
12764
|
-
border-right: none;
|
|
12765
|
-
}
|
|
12766
|
-
|
|
12767
12759
|
${mie}
|
|
12768
12760
|
|
|
12769
12761
|
&:hover {
|
|
@@ -97743,7 +97743,7 @@ const H5t = /* @__PURE__ */ Qh(D5t), T5t = (e, t, n, r, o, i, a) => {
|
|
|
97743
97743
|
background-color: ${({ disabled: e, readonly: t }) => e || t ? m.colors.backgroundColors.colorBackgroundCarpet : m.colors.neutralColors.colorNeutralSnow};
|
|
97744
97744
|
color: ${m.colors.neutralColors.colorNeutralDark};
|
|
97745
97745
|
border: ${m.borders.borderWidth.borderWidthThinner} solid
|
|
97746
|
-
${m.colors.neutralColors.
|
|
97746
|
+
${m.colors.neutralColors.colorNeutralCleanest};
|
|
97747
97747
|
${({ error: e, disabled: t, readonly: n }) => {
|
|
97748
97748
|
if (e && (!t || !n))
|
|
97749
97749
|
return ot`
|
|
@@ -97765,7 +97765,7 @@ const H5t = /* @__PURE__ */ Qh(D5t), T5t = (e, t, n, r, o, i, a) => {
|
|
|
97765
97765
|
`;
|
|
97766
97766
|
if (!e && (!t || !n))
|
|
97767
97767
|
return ot`
|
|
97768
|
-
border-color: ${m.colors.neutralColors.
|
|
97768
|
+
border-color: ${m.colors.neutralColors.colorNeutralCleanest};
|
|
97769
97769
|
background-color: ${m.colors.neutralColors.colorNeutralSnow};
|
|
97770
97770
|
`;
|
|
97771
97771
|
}}
|
|
@@ -105171,7 +105171,7 @@ const x4t = De.div`
|
|
|
105171
105171
|
${({ variant: e }) => e === "default" && ot`
|
|
105172
105172
|
border: ${m.borders.borderWidth.borderWidthThinner} solid;
|
|
105173
105173
|
border-radius: ${m.borders.borderRadius.borderRadiusSm};
|
|
105174
|
-
border-color: ${({ isOpen: t, hasError: n, readonly: r, disabled: o }) => n ? m.colors.feedbackColors.colorFeedbackError : r || o ? m.colors.neutralColors.colorNeutralClean : t ? m.colors.neutralColors.colorNeutralCloudy : m.colors.neutralColors.
|
|
105174
|
+
border-color: ${({ isOpen: t, hasError: n, readonly: r, disabled: o }) => n ? m.colors.feedbackColors.colorFeedbackError : r || o ? m.colors.neutralColors.colorNeutralClean : t ? m.colors.neutralColors.colorNeutralCloudy : m.colors.neutralColors.colorNeutralCleanest};
|
|
105175
105175
|
`}
|
|
105176
105176
|
|
|
105177
105177
|
background-color: ${({ variant: e }) => e === "default" ? m.colors.backgroundColors.colorBackgroundSnow : "transparent"};
|
|
@@ -105830,7 +105830,7 @@ const dVt = De.div`
|
|
|
105830
105830
|
padding: ${() => `${m.spacings.spacingInline.spacingInlineXs} ${m.spacings.spacingInline.spacingInlineXs}`};
|
|
105831
105831
|
|
|
105832
105832
|
border-bottom: ${({ withBorder: e }) => e ? `${m.borders.borderWidth.borderWidthThinner} solid ${m.colors.neutralColors.colorNeutralSoft}` : "none"};
|
|
105833
|
-
border-right: ${({ withBorder: e }) => e ? `${m.borders.borderWidth.borderWidthThinner} solid ${m.colors.neutralColors.colorNeutralSoft}` : "none"};
|
|
105833
|
+
border-right: ${({ withBorder: e, isLastColumn: t }) => e && !t ? `${m.borders.borderWidth.borderWidthThinner} solid ${m.colors.neutralColors.colorNeutralSoft}` : "none"};
|
|
105834
105834
|
|
|
105835
105835
|
font-family: ${m.fonts.fontFamily.fontFamilyPrimary};
|
|
105836
105836
|
font-size: ${({ columnsTextSize: e }) => e === "Large" ? m.fonts.fontSize.fontSizeBodyMd : m.fonts.fontSize.fontSizeBodySm};
|
|
@@ -105840,10 +105840,6 @@ const dVt = De.div`
|
|
|
105840
105840
|
|
|
105841
105841
|
word-break: normal;
|
|
105842
105842
|
|
|
105843
|
-
&:last-child {
|
|
105844
|
-
border-right: none;
|
|
105845
|
-
}
|
|
105846
|
-
|
|
105847
105843
|
& > svg:not([color]):not([data-testid='icon']) {
|
|
105848
105844
|
path {
|
|
105849
105845
|
fill: ${m.colors.neutralColors.colorNeutralDarkest};
|
|
@@ -105877,14 +105873,14 @@ const dVt = De.div`
|
|
|
105877
105873
|
word-break: normal;
|
|
105878
105874
|
|
|
105879
105875
|
border-bottom: ${({ withBorder: e, isLast: t }) => e && !t ? `${m.borders.borderWidth.borderWidthThinner} solid ${m.colors.neutralColors.colorNeutralSoft}` : "none"};
|
|
105880
|
-
border-right: ${({ withBorder: e }) => e ? `${m.borders.borderWidth.borderWidthThinner} solid ${m.colors.neutralColors.colorNeutralSoft}` : "none"};
|
|
105876
|
+
border-right: ${({ withBorder: e, isLastColumn: t }) => e && !t ? `${m.borders.borderWidth.borderWidthThinner} solid ${m.colors.neutralColors.colorNeutralSoft}` : "none"};
|
|
105881
105877
|
|
|
105882
105878
|
background-color: ${({ backgroundColor: e }) => e || "transparent"};
|
|
105883
105879
|
|
|
105884
105880
|
${({ disabled: e }) => e && ot`
|
|
105885
105881
|
background-color: ${m.colors.brandColors.colorBrandSeSoft};
|
|
105886
105882
|
border-bottom: ${({ withBorder: t, isLast: n }) => t && !n ? `${m.borders.borderWidth.borderWidthThinner} solid ${m.colors.neutralColors.colorNeutralClean}` : "none"};
|
|
105887
|
-
border-right: ${({ withBorder: t }) => t ? `${m.borders.borderWidth.borderWidthThinner} solid ${m.colors.neutralColors.colorNeutralClean}` : "none"};
|
|
105883
|
+
border-right: ${({ withBorder: t, isLastColumn: n }) => t && !n ? `${m.borders.borderWidth.borderWidthThinner} solid ${m.colors.neutralColors.colorNeutralClean}` : "none"};
|
|
105888
105884
|
color: ${m.colors.neutralColors.colorNeutralCloudy};
|
|
105889
105885
|
`}
|
|
105890
105886
|
|
|
@@ -105893,10 +105889,6 @@ const dVt = De.div`
|
|
|
105893
105889
|
border-bottom: ${({ withBorder: t, isLast: n }) => t && !n ? `${m.borders.borderWidth.borderWidthThinner} solid ${m.colors.feedbackColors.colorFeedbackError}` : "none"};
|
|
105894
105890
|
`}
|
|
105895
105891
|
|
|
105896
|
-
&:last-child {
|
|
105897
|
-
border-right: none;
|
|
105898
|
-
}
|
|
105899
|
-
|
|
105900
105892
|
${vie}
|
|
105901
105893
|
|
|
105902
105894
|
&:hover {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("./GenericAGGridTable-BpCe0EpD.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,53 +1,53 @@
|
|
|
1
|
-
import { a1 as e, ae as
|
|
2
|
-
import { d as
|
|
3
|
-
import { useState as
|
|
1
|
+
import { a1 as e, ae as S, af as w, ag as R, ah as v, $ as a, ai as $, a8 as D, c as u, aj as L, ak as O, al as _, am as y, a6 as z, an as W, e as q, I as B, ao as M } from "./GenericAGGridTable-DDEgt2mb.js";
|
|
2
|
+
import { d as V, v as j } from "./index-YF_5f0O1.js";
|
|
3
|
+
import { useState as C, useEffect as N } from "react";
|
|
4
4
|
import "sbwb-ds";
|
|
5
|
-
let
|
|
6
|
-
const
|
|
7
|
-
const o =
|
|
8
|
-
o >= 0 &&
|
|
9
|
-
}),
|
|
10
|
-
|
|
11
|
-
},
|
|
12
|
-
|
|
13
|
-
},
|
|
14
|
-
const [r, o] =
|
|
15
|
-
return
|
|
5
|
+
let b = [];
|
|
6
|
+
const h = [], T = (r) => (h.push(r), () => {
|
|
7
|
+
const o = h.indexOf(r);
|
|
8
|
+
o >= 0 && h.splice(o, 1);
|
|
9
|
+
}), F = () => h.forEach((r) => r()), X = (r) => {
|
|
10
|
+
b = [r, ...b], F();
|
|
11
|
+
}, G = (r) => {
|
|
12
|
+
b = b.filter((o) => o.instanceId !== r), F();
|
|
13
|
+
}, H = () => b, x = { subscribe: T, add: X, remove: G, getAlerts: H }, J = () => {
|
|
14
|
+
const [r, o] = C(x.getAlerts());
|
|
15
|
+
return N(() => x.subscribe(() => o([...x.getAlerts()])), []), /* @__PURE__ */ e.jsx(S, { children: r.map(({ instanceId: s, props: t, destroy: l }) => /* @__PURE__ */ e.jsx(w, { ...t, destroy: l }, s)) });
|
|
16
16
|
};
|
|
17
17
|
let m = !1;
|
|
18
|
-
const
|
|
18
|
+
const Z = ({
|
|
19
19
|
id: r,
|
|
20
20
|
type: o,
|
|
21
21
|
title: s,
|
|
22
22
|
description: t,
|
|
23
|
-
durationInMilliseconds:
|
|
24
|
-
dataToCopy:
|
|
23
|
+
durationInMilliseconds: l = 3e3,
|
|
24
|
+
dataToCopy: c,
|
|
25
25
|
offset: d = { x: 0, y: 0 }
|
|
26
26
|
}) => {
|
|
27
|
-
const
|
|
27
|
+
const i = r + Date.now() + Math.random(), p = () => x.remove(i);
|
|
28
28
|
if (x.add({
|
|
29
|
-
instanceId:
|
|
30
|
-
props: { id: r, type: o, title: s, description: t, durationInMilliseconds:
|
|
29
|
+
instanceId: i,
|
|
30
|
+
props: { id: r, type: o, title: s, description: t, durationInMilliseconds: l, dataToCopy: c, offset: d },
|
|
31
31
|
destroy: p
|
|
32
32
|
}), !m) {
|
|
33
33
|
m = !0;
|
|
34
|
-
const g =
|
|
35
|
-
|
|
34
|
+
const g = V.portal.add("alert-stack");
|
|
35
|
+
R.createRoot(g).render(/* @__PURE__ */ e.jsx(J, {}));
|
|
36
36
|
}
|
|
37
|
-
},
|
|
37
|
+
}, P = ({
|
|
38
38
|
width: r = "100%",
|
|
39
39
|
height: o = "fit-content",
|
|
40
40
|
type: s,
|
|
41
41
|
variant: t = "small",
|
|
42
|
-
title:
|
|
43
|
-
message:
|
|
42
|
+
title: l,
|
|
43
|
+
message: c,
|
|
44
44
|
margin: d,
|
|
45
|
-
open:
|
|
45
|
+
open: i = !0,
|
|
46
46
|
onClose: p,
|
|
47
47
|
canClose: g = !0
|
|
48
48
|
}) => {
|
|
49
49
|
var k, f;
|
|
50
|
-
const [
|
|
50
|
+
const [I, A] = C(i), n = {
|
|
51
51
|
info: {
|
|
52
52
|
backgroundColor: "#D5EBFD",
|
|
53
53
|
borderColor: a.colors.feedbackColors.colorFeedbackInfo,
|
|
@@ -80,7 +80,7 @@ const Y = ({
|
|
|
80
80
|
backgroundColor: "#FFE1E1",
|
|
81
81
|
borderColor: a.colors.feedbackColors.colorFeedbackError,
|
|
82
82
|
icon: /* @__PURE__ */ e.jsx(
|
|
83
|
-
|
|
83
|
+
v,
|
|
84
84
|
{
|
|
85
85
|
color: a.colors.feedbackColors.colorFeedbackError,
|
|
86
86
|
height: "24px",
|
|
@@ -89,37 +89,37 @@ const Y = ({
|
|
|
89
89
|
)
|
|
90
90
|
}
|
|
91
91
|
};
|
|
92
|
-
function
|
|
93
|
-
|
|
92
|
+
function E() {
|
|
93
|
+
A(!1), p == null || p();
|
|
94
94
|
}
|
|
95
|
-
return /* @__PURE__ */ e.jsx(e.Fragment, { children:
|
|
95
|
+
return /* @__PURE__ */ e.jsx(e.Fragment, { children: I ? /* @__PURE__ */ e.jsxs(
|
|
96
96
|
u,
|
|
97
97
|
{
|
|
98
98
|
width: r,
|
|
99
99
|
height: o,
|
|
100
100
|
direction: "horizontal",
|
|
101
|
-
verticalAlign:
|
|
101
|
+
verticalAlign: l ? "top" : "center",
|
|
102
102
|
gap: a.spacings.spacingInline.spacingInlineAnt,
|
|
103
103
|
padding: t == "small" ? `${a.spacings.spacingStack.spacingStackXs} ${a.spacings.spacingInline.spacingInlineAnt}` : a.spacings.spacingInline.spacingInlineSm,
|
|
104
|
-
backgroundColor: (k =
|
|
104
|
+
backgroundColor: (k = n == null ? void 0 : n[s]) == null ? void 0 : k.backgroundColor,
|
|
105
105
|
customStyles: {
|
|
106
|
-
border: `1px solid ${(f =
|
|
106
|
+
border: `1px solid ${(f = n == null ? void 0 : n[s]) == null ? void 0 : f.borderColor}`,
|
|
107
107
|
borderRadius: a.borders.borderRadius.borderRadiusSm,
|
|
108
108
|
margin: d,
|
|
109
109
|
position: "relative"
|
|
110
110
|
},
|
|
111
111
|
children: [
|
|
112
|
-
s === "warning" ? /* @__PURE__ */ e.jsx(L, { children: /* @__PURE__ */ e.jsx(O, { width: "24px", height: "24px" }) }) : /* @__PURE__ */ e.jsx(e.Fragment, { children:
|
|
113
|
-
/* @__PURE__ */ e.jsxs(u, { width: "100%", flex: "1", height: "100%", children: [
|
|
114
|
-
/* @__PURE__ */ e.jsx(_, { children:
|
|
115
|
-
/* @__PURE__ */ e.jsx(
|
|
112
|
+
s === "warning" ? /* @__PURE__ */ e.jsx(L, { children: /* @__PURE__ */ e.jsx(O, { width: "24px", height: "24px" }) }) : /* @__PURE__ */ e.jsx(e.Fragment, { children: n == null ? void 0 : n[s].icon }),
|
|
113
|
+
/* @__PURE__ */ e.jsxs(u, { width: "100%", flex: "1", height: "100%", verticalAlign: "center", children: [
|
|
114
|
+
j(l) && /* @__PURE__ */ e.jsx(_, { children: l }),
|
|
115
|
+
j(c) && /* @__PURE__ */ e.jsx(y, { children: c })
|
|
116
116
|
] }),
|
|
117
117
|
g && /* @__PURE__ */ e.jsx(u, { children: /* @__PURE__ */ e.jsx(
|
|
118
|
-
|
|
118
|
+
z,
|
|
119
119
|
{
|
|
120
120
|
color: a.colors.neutralColors.colorNeutralCloudy,
|
|
121
121
|
cursor: "pointer",
|
|
122
|
-
onClick:
|
|
122
|
+
onClick: E,
|
|
123
123
|
height: "20px",
|
|
124
124
|
width: "20px"
|
|
125
125
|
}
|
|
@@ -127,39 +127,39 @@ const Y = ({
|
|
|
127
127
|
]
|
|
128
128
|
}
|
|
129
129
|
) : /* @__PURE__ */ e.jsx(e.Fragment, {}) });
|
|
130
|
-
},
|
|
130
|
+
}, ee = ({
|
|
131
131
|
label: r,
|
|
132
132
|
labelRender: o,
|
|
133
133
|
infoProps: s = {},
|
|
134
134
|
withInfo: t = !0,
|
|
135
|
-
flex:
|
|
136
|
-
width:
|
|
135
|
+
flex: l,
|
|
136
|
+
width: c = "100%",
|
|
137
137
|
isRequired: d = !1
|
|
138
138
|
}) => {
|
|
139
|
-
const
|
|
139
|
+
const i = {
|
|
140
140
|
tooltipProps: {
|
|
141
141
|
position: "top",
|
|
142
142
|
...s == null ? void 0 : s.tooltipProps,
|
|
143
143
|
size: "Small"
|
|
144
144
|
}
|
|
145
145
|
};
|
|
146
|
-
return /* @__PURE__ */ e.jsxs(u, { width:
|
|
147
|
-
o ?? /* @__PURE__ */ e.jsxs(
|
|
146
|
+
return /* @__PURE__ */ e.jsxs(u, { width: c, direction: "horizontal", gap: "4px", flex: l, children: [
|
|
147
|
+
o ?? /* @__PURE__ */ e.jsxs(W, { children: [
|
|
148
148
|
r,
|
|
149
149
|
" ",
|
|
150
|
-
d ? /* @__PURE__ */ e.jsx(
|
|
150
|
+
d ? /* @__PURE__ */ e.jsx(q, {}) : null
|
|
151
151
|
] }),
|
|
152
|
-
t && /* @__PURE__ */ e.jsx(
|
|
152
|
+
t && /* @__PURE__ */ e.jsx(B, { ...i })
|
|
153
153
|
] });
|
|
154
|
-
},
|
|
154
|
+
}, re = ({
|
|
155
155
|
width: r = "100%",
|
|
156
156
|
flex: o,
|
|
157
157
|
label: s = "Obrigatório",
|
|
158
158
|
margin: t = "0 0 16px 0"
|
|
159
|
-
}) => /* @__PURE__ */ e.jsx(u, { width: r, flex: o, customStyles: { margin: t }, children: /* @__PURE__ */ e.jsx(
|
|
159
|
+
}) => /* @__PURE__ */ e.jsx(u, { width: r, flex: o, customStyles: { margin: t }, children: /* @__PURE__ */ e.jsx(M, { children: `* ${s}` }) });
|
|
160
160
|
export {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
161
|
+
P as A,
|
|
162
|
+
ee as L,
|
|
163
|
+
re as R,
|
|
164
|
+
Z as s
|
|
165
165
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("./GenericAGGridTable-BpCe0EpD.cjs"),I=require("react"),X=require("sbwb-ds"),P=require("react-hook-form"),q=require("./index-CPP6SuZS.cjs"),Y=require("./parseDate-w5bp6OXe.cjs"),Z=350,K=({title:r,children:o,endAdornment:h=null,marginBottom:m="16px",customStyles:a={},wrapperCustomStyles:l={},animationContainerCustomStyles:u={},hideAdornmentOnCollapse:f=!1,maxHeight:S="none",height:L="fit-content"})=>{const[C,k]=I.useState(!1),[j,w]=I.useState(!0);I.useEffect(()=>{if(f)if(C){const b=setTimeout(()=>w(!1),Z);return()=>clearTimeout(b)}else w(!0)},[C,f]);const A=f&&!j?null:h;return e.jsxRuntimeExports.jsxs(e.Container,{width:"100%",flex:"1",gap:"8px",customStyles:l,children:[e.jsxRuntimeExports.jsx(e.SectionTitle,{title:r,divider:!0,marginBottom:m,collapse:{collapsed:C,setCollapsed:k},endAdornment:A,customStyles:a}),e.jsxRuntimeExports.jsx(e.Container,{gap:"8px",width:"100%",height:L,customStyles:{...u,maxHeight:C?"0":S,transition:`max-height ${Z}ms ease-in-out`},children:o})]})};function v({form:r,name:o,id:h=o,label:m,readonly:a=!1,disabled:l=!1,afterCheck:u,width:f="100%",formatter:S,parser:L,flex:C,size:k="Medium",checkColor:j,triggerFormField:w=null,...A}){const{onChangeTrigger:b}=e.useTriggerFormField({form:r,fieldName:o,triggerType:w,debounceTime:0}),x=(R,F)=>{F(R),u==null||u(R),b==null||b()};return e.jsxRuntimeExports.jsx(e.Container,{width:f,flex:C,children:e.jsxRuntimeExports.jsx(P.Controller,{name:o,control:r.control,render:({field:{onChange:R,value:F,onBlur:N},fieldState:{error:T=null}})=>{const M=T==null?void 0:T.message;return M&&console.log("Error on checkbox!",M),e.jsxRuntimeExports.jsx(e.Checkbox,{id:`form-checkbox-${h}`,checked:S?S(F):!!F,name:o,label:m,disabled:l||a,onChange:p=>{x((L==null?void 0:L(p.target.checked,F))??p.target.checked,R),N==null||N()},size:k,checkColor:j,...A})}})})}const B=({form:r,name:o,label:h,placeholder:m,readonly:a=!1,disabled:l=!1,width:u="100%",flex:f,tooltipIsVisible:S,tooltipMaxWidth:L,tooltipPosition:C="top",afterFormChange:k,openToDate:j,range:w=!1,openCalendarOnInputClick:A=!1,...b})=>{let x=m;return!q.valuable(m)&&!l&&(x=a?"Nenhuma data escolhida":"Escolha uma data"),e.jsxRuntimeExports.jsx(e.Container,{width:u,flex:f,children:e.jsxRuntimeExports.jsx(P.Controller,{name:o,control:r.control,render:({field:{value:R,onChange:F,ref:N}})=>{let T;q.valuable(R)&&(w?T=Array.isArray(R)?R.join(" - "):R:T=new Date(q.stringToUtcDate(R.slice(0,10))));const{error:M}=r.getFieldState(o,r.formState);return e.jsxRuntimeExports.jsx(e.Datepicker,{ref:N,idCalendar:`${o}-calendar`,label:h,value:T,size:"Small",readonly:a,errorMessage:M==null?void 0:M.message,disabled:l,placeholder:x,onChangeHandleDate:p=>{var n;F(w?p?p.split(" - ").map(D=>{var O;return((O=Y.parseDate(D))==null?void 0:O.slice(0,10))||null}):[null,null]:p&&((n=Y.parseDate(p))==null?void 0:n.slice(0,10))||null),k==null||k(p)},openToDate:j,selectsRange:w,openCalendarOnInputClick:A,width:u,flex:f,...b})}})})};function ee({form:r,name:o,label:h,slots:{field:m},slotsProps:a,triggerFormField:l=null,value:u,bypassControllerOnChange:f=!1,overrideOnBlur:S=!1,isRequired:L=!1,readonly:C=!1,disabled:k=!1,parser:j,debounce:w,beforeChange:A,onChange:b,afterChange:x,beforeBlur:R,onBlur:F,afterBlur:N,onEnter:T}){const{field:{value:M,onChange:p},fieldState:{error:n=null}}=P.useController({name:o,control:r.control}),D=q.valuable(w),{onChangeTrigger:O,onBlurTrigger:d}=e.useTriggerFormField({form:r,fieldName:o,triggerType:l,debounceTime:D?0:500}),i=(t,g)=>{var W,_;const $=((W=t==null?void 0:t.target)==null?void 0:W.value)||((_=t==null?void 0:t.target)==null?void 0:_.checked)||t||void 0,y=q.valuable(j)?j($):$;A==null||A(y),f||g==null||g(y),b==null||b(t,g),x==null||x(t,g),O==null||O()},E=I.useMemo(()=>{if(!D)return i;let t;return($,y)=>{clearTimeout(t),t=setTimeout(()=>i($,y),w)}},[D,w,i]),c=(t,g)=>{var y,W;const $=((y=t==null?void 0:t.target)==null?void 0:y.value)||((W=t==null?void 0:t.target)==null?void 0:W.checked)||t||void 0;!S&&f&&(p==null||p($)),R==null||R(t,g),F==null||F(t,g),N==null||N(t,g),d==null||d()},H=(t,g)=>{T==null||T(t,g)};n!=null&&n.message&&console.log(`Error on ${m.displayName}!`,n.message);const s=q.valuable(u)?u==null?void 0:u(M):{value:M};return e.jsxRuntimeExports.jsx(e.Container,{...a==null?void 0:a.container,children:e.jsxRuntimeExports.jsx(m,{...a==null?void 0:a.field,...s,label:h,onChange:t=>E==null?void 0:E(t,p),onBlur:t=>c==null?void 0:c(t,p),onEnter:t=>H==null?void 0:H(t,p),errorMessage:n==null?void 0:n.message})})}const te=({form:r,name:o,label:h,options:m,readonly:a=!1,disabled:l=!1,width:u="100%",flex:f,placeholder:S,iconName:L,onSelect:C,hasSelectAll:k=!1,tags:j=!0,sortOptions:w=!1,enableSearch:A=!1,valueAllOption:b,isRequired:x=!1,tooltipProps:R={},infoProps:F={},triggerFormField:N=null,...T})=>{const{onChangeTrigger:M}=e.useTriggerFormField({form:r,fieldName:o,triggerType:N,debounceTime:0});return e.jsxRuntimeExports.jsx(e.Container,{width:u,flex:f,children:e.jsxRuntimeExports.jsx(P.Controller,{name:o,control:r.control,render:({field:{value:p,onChange:n}})=>{const{error:D}=r.getFieldState(o),O=q.valuable(p)?p:[];return e.jsxRuntimeExports.jsx(e.MultiSelect,{label:h,size:"Small",disabled:l||a,onChange:d=>{n(d),C==null||C(d),M==null||M()},values:O,errorMessage:D==null?void 0:D.message,options:m,iconName:L,hasSelectAll:k,tags:j,sortOptions:w,placeholder:S,enableSearch:A,valueAllOption:b,isRequired:x,tooltipProps:{position:"top",...R},infoProps:{tooltipProps:{position:"top",maxWidth:"300px",...F.tooltipProps},...F},...T})}})})},se=({variant:r="default",form:o,name:h,label:m,options:a,readonly:l=!1,disabled:u=!1,optionsMap:f,width:S="100%",flex:L,placeholder:C,onSelect:k,parser:j,onPaste:w,filter:A,tooltipProps:b={},infoProps:x={},maxHeightMenu:R,isRequired:F=!1,onRemoveSelected:N,triggerFormField:T=null,displayText:M,usePortal:p=!1,...n})=>{const{onChangeTrigger:D}=e.useTriggerFormField({form:o,fieldName:h,triggerType:T,debounceTime:0}),O={position:"top",...b},d={...x,tooltipProps:{position:"top",maxWidth:"300px",...x==null?void 0:x.tooltipProps}},i=(c,H)=>{let s=c;j&&(s=j==null?void 0:j(c)),H(s),k==null||k(s),D==null||D()},E=I.useMemo(()=>q.valuable(f)?f:Object.fromEntries(a.map(c=>[c.value,c])),[a,f]);return e.jsxRuntimeExports.jsx(e.Container,{width:S,flex:L,children:e.jsxRuntimeExports.jsx(P.Controller,{name:h,control:o.control,render:({field:{onChange:c,value:H},fieldState:{error:s=null}})=>{let t=E[H];return e.jsxRuntimeExports.jsx(e.Select,{label:m,width:"100%",size:"Small",variant:r,disabled:u,readonly:l,filter:A,errorMessage:s==null?void 0:s.message,placeholder:C,value:t,handleOption:g=>{i(g.value,c)},tooltipProps:O,options:a,usePortal:p,infoProps:d,maxHeightMenu:R,isRequired:F,onRemoveSelected:N,displayText:M,onPaste:w,...n})}})})},le=r=>{const[o,h]=I.useState(!1),[m,a]=I.useState(r),l=I.useRef(null);return I.useEffect(()=>{a(r)},[r]),{setIsOpen:h,isOpen:o,setOptionsSelect:a,optionsSelect:m,selectContainerRef:l}},ie=200,ne=({name:r,variant:o="primary",width:h="100%",size:m="Medium",disabled:a=!1,isLoading:l=!1,onClick:u,options:f,label:S,menuSelectProps:L={},iconName:C,optionsIconPosition:k})=>{const{isOpen:j,setIsOpen:w,selectContainerRef:A,optionsSelect:b}=le(f);let x=e.y.colors.backgroundColors.colorBackgroundSnow;a?x=e.y.colors.neutralColors.colorNeutralCloudy:o!=="primary"&&(x=e.y.colors.neutralColors.colorNeutralDark);const R={...L};return e.jsxRuntimeExports.jsxs(e.SelectContainer,{ref:A,width:h,size:m,disabled:a,onBlur:()=>setTimeout(()=>w(!1),ie),children:[S&&e.jsxRuntimeExports.jsx(e.Label$3,{children:S}),e.jsxRuntimeExports.jsxs(e.Button$1,{type:"button",size:m,disabled:a,variant:o,isLoading:l,onClick:()=>!l&&w(!j),id:`button-component-${r}`,"data-cy":`button-component-${r}`,children:[l&&e.jsxRuntimeExports.jsx(e.WrapperIcon,{size:m,disabled:a,variant:o,children:e.jsxRuntimeExports.jsx(X.Icon,{iconName:`ProgressActivity${m==="Small"?"Ant":"Sm"}`,color:x,"data-testid":"icon-loading"})}),!l&&e.jsxRuntimeExports.jsx("p",{title:r,children:r}),!l&&(j?e.jsxRuntimeExports.jsx(X.Icon,{iconName:`ExpandLess${m==="Small"?"Ant":"Sm"}`,color:x,"data-testid":"icon-button-less"}):e.jsxRuntimeExports.jsx(X.Icon,{iconName:`ExpandMore${m==="Small"?"Ant":"Sm"}`,color:x,"data-testid":"icon-button-more"}))]}),j&&e.jsxRuntimeExports.jsx(e.MenuSelect,{selectContainerRef:A,value:null,optionsSelect:b,selectOption:u,size:m,inputValue:null,iconPosition:k,iconName:C,...R})]})},re=({width:r="100%",height:o="fit-content",flex:h,backgroundColor:m=e.y.colors.backgroundColors.colorBackgroundCarpet,upperComponent:a=void 0,options:l=[],lowerComponent:u=void 0,heightItems:f="60px",widthItems:S="155px",emptyProps:L={title:"Nenhum dado a ser mostrado",body:null},customWrapperStyles:C={border:`1px solid ${e.y.colors.neutralColors.colorNeutralSoft}`,borderRadius:"8px"},customItemStyles:k={},selectedKey:j,onSelect:w,selectedItemKey:A,setSelectedItemKey:b})=>{var O;const x=j!==void 0,R=!x&&A!==void 0,[F,N]=I.useState(((O=l[0])==null?void 0:O.key)??null),T=I.useRef(null),M=I.useRef(null),p=x?j:R?A:F,n=I.useMemo(()=>l.length?p==null?x?null:l[0]:l.find(i=>i.key===p)??(x||R?null:l[0]):null,[l,p,x,R]);I.useEffect(()=>{const d=T.current,i=M.current,E=()=>{d&&i&&(i.scrollTop=d.scrollTop)};return d==null||d.addEventListener("scroll",E),()=>{d==null||d.removeEventListener("scroll",E)}},[]),I.useEffect(()=>{if(!(x||R)){if(!l.length){N(null);return}N(d=>d!=null&&l.some(i=>i.key===d)?d:l[0].key)}},[l,x,R]);const D=d=>{w==null||w(d),b==null||b(d.key),!x&&!R&&N(d.key)};return(l==null?void 0:l.length)===0?e.jsxRuntimeExports.jsx(e.Empty,{title:L.title,body:L.body,flex:"1",mode:"table"}):e.jsxRuntimeExports.jsxs(e.Container,{width:r,height:o,flex:h,backgroundColor:m,direction:"horizontal",customStyles:{border:`1px solid ${e.y.colors.neutralColors.colorNeutralSoft}`,borderRadius:e.y.borders.borderRadius.borderRadiusSm,...C,overflow:"hidden"},children:[e.jsxRuntimeExports.jsxs(e.Container$2,{ref:T,widthItems:S,children:[a&&a,l==null?void 0:l.map(d=>e.jsxRuntimeExports.jsx(e.ContainerItem,{selected:p===d.key,onClick:()=>D(d),withBorderRight:!0,heightItems:f,customStyles:k,children:d.item},d.key)),u&&u,e.jsxRuntimeExports.jsx(e.LastSpace,{})]}),e.jsxRuntimeExports.jsx(e.ContainerContent,{children:n&&(n==null?void 0:n.contentItem)})]})};function oe(r){return o=>typeof r=="string"?o[r]:typeof r=="function"?r(o):(console.warn("Please, setup a rowKey for table."),JSON.stringify(o))}function de({id:r,rowKey:o="id",size:h="Small",onRowClick:m,fit:a=!1,maxHeight:l="40rem",columns:u,dataSource:f,columnsTextSize:S=h,emptyProps:L={width:"100%",height:"100%",title:"Nenhum dado a ser mostrado.",mode:"table",borders:!0,backgroundColor:e.y.colors.backgroundColors.colorBackgroundSnow},selectedRow:C=!1,hideHeader:k=!1,withBorder:j=!0,withBorderRadius:w=!0,striped:A=!1,borderRadius:b=e.y.borders.borderRadius.borderRadiusSm,disableMaxHeight:x=!1,isVisible:R=!1}){const F=I.useMemo(()=>oe(o),[o]),[N,T]=I.useState(null),M=I.useRef(null),p=I.useRef(null),[n,D]=I.useState(u);I.useLayoutEffect(()=>{if(!p.current||u.length===0){D(u);return}const i=()=>{var _;const c=((_=p.current)==null?void 0:_.clientWidth)||0;if(c===0)return;let H=0,s=0;const t=[],g=[];u.forEach(U=>{const V=Number(U.flex);U.width?H+=parseInt(U.width,10)||0:U.flex&&V>0?(s+=V,t.push(U)):g.push(U)});const $=c-H,y="80";let W=[...u];if($>0){if(t.length>0){const U=$/s;W=u.map(V=>{const G=Number(V.flex);if(G&&G>0){const J=parseInt(V.minWidth||y,10),Q=G*U,z=Math.max(Q,J);return{...V,width:`${Math.floor(z)}px`}}return!V.width&&!G?{...V,width:V.minWidth||`${y}px`}:V})}else if(g.length>0){const U=$/g.length;W=u.map(V=>{const G=Number(V.flex);if(!V.width&&!G){const J=parseInt(V.minWidth||y,10),Q=Math.max(U,J);return{...V,width:`${Math.floor(Q)}px`}}return V})}}else W=u.map(U=>U.width?U:{...U,width:U.minWidth||`${y}px`});D(W)};i();const E=new ResizeObserver(i);return E.observe(p.current),()=>E.disconnect()},[u]),I.useEffect(()=>{const i=E=>{M.current&&!M.current.contains(E.target)&&T(null)};return document.addEventListener("mousedown",i),()=>{document.removeEventListener("mousedown",i)}},[]);const O=I.useMemo(()=>n?n.some(i=>i.mergeHeaderId&&i.mergeHeaderLabel):!1,[n]),d=I.useMemo(()=>{var H,s;if(k||!n||n.length===0)return null;if(!O)return e.jsxRuntimeExports.jsx(e.TableRow,{isHeader:!0,size:h,numRows:1,borderRadius:b,children:n.map((t,g)=>{var $;return e.jsxRuntimeExports.jsx(e.HeaderCell,{width:t.width,minWidth:t.minWidth,maxWidth:t.maxWidth,horizontalAlign:t.horizontalAlign,size:h,columnsTextSize:S,withBorder:j,headerAlign:t.headerAlign,isLastColumn:g===n.length-1,children:(($=t.columnRender)==null?void 0:$.call(t,f))||e.jsxRuntimeExports.jsx("span",{title:t.label,children:t.label})},t.dataIndex)})});const i=[],E=[];let c=0;for(;c<n.length;){const t=n[c];if(t.mergeHeaderId&&t.mergeHeaderLabel){let g=0;const $=t.mergeHeaderId;for(let y=c;y<n.length&&n[y].mergeHeaderId===$;y++)g++;i.push(e.jsxRuntimeExports.jsx(e.HeaderCell,{colSpan:g,horizontalAlign:"center",size:h,columnsTextSize:S,withBorder:j,width:t.width,minWidth:t.minWidth,maxWidth:t.maxWidth,headerAlign:t.headerAlign,isTopRow:!0,isLastColumn:c+g-1===n.length-1,children:e.jsxRuntimeExports.jsx("span",{title:t.mergeHeaderLabel,children:t.mergeHeaderLabel})},`${t.mergeHeaderId}-merged`));for(let y=0;y<g;y++){const W=n[c+y];E.push(e.jsxRuntimeExports.jsx(e.HeaderCell,{width:W.width,minWidth:W.minWidth,maxWidth:W.maxWidth,horizontalAlign:W.horizontalAlign,size:h,columnsTextSize:S,withBorder:j,headerAlign:t.headerAlign,isLastColumn:c+y===n.length-1,children:((H=W.columnRender)==null?void 0:H.call(W,f))||e.jsxRuntimeExports.jsx("span",{title:W.label,children:W.label})},W.dataIndex+"-individual"))}c+=g}else i.push(e.jsxRuntimeExports.jsx(e.HeaderCell,{rowSpan:2,width:t.width,minWidth:t.minWidth,maxWidth:t.maxWidth,horizontalAlign:t.horizontalAlign,size:h,columnsTextSize:S,withBorder:j,headerAlign:t.headerAlign,isTopRow:!0,isLastColumn:c===n.length-1,children:((s=t.columnRender)==null?void 0:s.call(t,f))||e.jsxRuntimeExports.jsx("span",{title:t.label,children:t.label})},t.dataIndex)),c++}return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(e.TableRow,{isHeader:!0,size:h,numRows:2,borderRadius:b,children:i}),E.length>0&&e.jsxRuntimeExports.jsx(e.TableRow,{isHeader:!0,size:h,numRows:2,borderRadius:b,children:E})]})},[n,k,h,S,O]);return!f||f.length===0?e.jsxRuntimeExports.jsx(e.Empty,{backgroundColor:e.y.colors.backgroundColors.colorBackgroundSnow,borders:!0,mode:"table",...L}):e.jsxRuntimeExports.jsx(e.ContainerTable,{maxHeight:l,disableMaxHeight:x,withBorderRadius:w,ref:p,borderRadius:b,isVisible:R,children:e.jsxRuntimeExports.jsxs(e.Table,{id:r,ref:M,children:[e.jsxRuntimeExports.jsx("thead",{children:d}),e.jsxRuntimeExports.jsx("tbody",{style:{width:"100%"},children:f==null?void 0:f.map((i,E,c)=>{const H=F(i);return e.jsxRuntimeExports.jsx(e.TableRow,{isLast:E===c.length-1,fit:a,size:h,withBorder:j,isSelected:H===N&&C,striped:A&&E%2!==0,borderRadius:b,children:n.map((s,t)=>{var g,$,y,W,_;return e.jsxRuntimeExports.jsx(e.RowCell,{width:s.width,minWidth:s.minWidth,maxWidth:s.maxWidth,size:h,isClickable:q.valuable(m),isLastColumn:t===n.length-1,onClick:()=>{m&&m(i,s,E),C&&T(N===H?null:H)},horizontalAlign:s.horizontalAlign,verticalAlign:s.verticalAlign,rowPadding:s.rowPadding,withBorder:j,isLast:E===c.length-1,disabled:(g=s.disable)==null?void 0:g.call(s,i[s.dataIndex],i,E,c),hasError:($=s.warn)==null?void 0:$.call(s,i[s.dataIndex],i,E,c),backgroundColor:(y=s.paint)==null?void 0:y.call(s,i[s.dataIndex],i,E,c),children:((W=s.render)==null?void 0:W.call(s,i[s.dataIndex],i,E,c))||e.jsxRuntimeExports.jsx(e.CellText,{title:i[s.dataIndex],style:(_=s.rowCss)==null?void 0:_.call(s,i),children:i[s.dataIndex]})||""},`${H}::${s.dataIndex}`)})},H)})})]})})}exports.CheckboxField=v;exports.CollapseSection=K;exports.DateField=B;exports.FormFieldView=ee;exports.MultiSelectField=te;exports.SelectButton=ne;exports.SelectField=se;exports.TabInfo=re;exports.Table=de;
|