@ufal-lccv/gpsub-ds 0.1.26 → 0.1.28
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/{RequiredLabel.view-CaiRCElc.js → RequiredLabel.view-_H-iAMCy.js} +1 -1
- package/dist/{RequiredLabel.view-Cwt36mIO.cjs → RequiredLabel.view-nxkII9jI.cjs} +1 -1
- package/dist/{Table.styles-C-2_39kp.cjs → Table.styles-C98MPCK6.cjs} +4 -4
- package/dist/{Table.styles-CP7xaO_I.js → Table.styles-CR8lsfaa.js} +4 -3
- package/dist/{Table.view-CqFhMvxr.js → Table.view-98eZB0OI.js} +167 -167
- package/dist/Table.view-BRTxocAL.cjs +1 -0
- package/dist/{Title.view-D8pnFIcC.js → Title.view-BdibiY7Y.js} +1 -1
- package/dist/{Title.view-UMz6MIbV.cjs → Title.view-dbuUShPb.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/Form/CheckboxField.view.d.ts +1 -1
- package/dist/components/organisms/Form/SelectField.view.d.ts +2 -2
- package/dist/components/organisms/Form/TextareaField.view.d.ts +2 -2
- package/dist/components/organisms/Form/types.d.ts +3 -3
- 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/Table.view-BvP3uT__.cjs +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as o, Q as C, U as j, V as F, K as r, W as f, X as I, b as x, Y as w, Z as E, _ as S, $ as R, a0 as A, a1 as _, d as $, I as D, a2 as L } from "./Table.styles-
|
|
1
|
+
import { P as o, Q as C, U as j, V as F, K as r, W as f, X as I, b as x, Y as w, Z as E, _ as S, $ as R, a0 as A, a1 as _, d as $, I as D, a2 as L } from "./Table.styles-CR8lsfaa.js";
|
|
2
2
|
import { d as v } from "./index-D6fddFQP.js";
|
|
3
3
|
import { createPortal as y } from "react-dom";
|
|
4
4
|
import { useState as O } from "react";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("./Table.styles-
|
|
1
|
+
"use strict";const e=require("./Table.styles-C98MPCK6.cjs"),b=require("./index-D-c93rfC.cjs"),E=require("react-dom"),g=require("react"),R=({id:s,type:t,title:r,description:n,durationInMilliseconds:l=3e3,dataToCopy:c,offset:a={x:0,y:0}})=>{const i=b.dom.portal.add(s+Date.now()+Math.random()),x=()=>{try{i.remove()}catch{console.error("Remoção indevida de alert.")}},d=E.createPortal(e.jsxRuntimeExports.jsx(e.AlertView,{id:s,type:t,title:r,description:n,durationInMilliseconds:l,destroy:x,dataToCopy:c,offset:a}),i);e.clientExports.createRoot(i).render(d)},C=({width:s="100%",height:t="fit-content",type:r,variant:n="small",title:l,message:c,margin:a,open:i=!0,onClose:x,canClose:d=!0})=>{var p,j;const[u,m]=g.useState(i),o={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 h(){m(!1),x==null||x()}return e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:u?e.jsxRuntimeExports.jsxs(e.Container,{width:s,height:t,direction:"horizontal",verticalAlign:l?"top":"center",gap:e.y.spacings.spacingInline.spacingInlineAnt,padding:n=="small"?`${e.y.spacings.spacingStack.spacingStackXs} ${e.y.spacings.spacingInline.spacingInlineAnt}`:e.y.spacings.spacingInline.spacingInlineSm,backgroundColor:(p=o==null?void 0:o[r])==null?void 0:p.backgroundColor,customStyles:{border:`1px solid ${(j=o==null?void 0:o[r])==null?void 0:j.borderColor}`,borderRadius:e.y.borders.borderRadius.borderRadiusSm,margin:a,position:"relative"},children:[r==="warning"?e.jsxRuntimeExports.jsx(e.ContainerWarning,{children:e.jsxRuntimeExports.jsx(e.WarningFill_default,{width:"24px",height:"24px"})}):e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:o==null?void 0:o[r].icon}),e.jsxRuntimeExports.jsxs(e.Container,{width:"100%",flex:"1",height:"100%",children:[e.jsxRuntimeExports.jsx(e.Title,{children:l}),e.jsxRuntimeExports.jsx(e.Message,{children:c})]}),d&&e.jsxRuntimeExports.jsx(e.Container,{children:e.jsxRuntimeExports.jsx(e.Close_default,{color:e.y.colors.neutralColors.colorNeutralCloudy,cursor:"pointer",onClick:h,height:"20px",width:"20px"})})]}):e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{})})},k=({label:s,labelRender:t,infoProps:r={},withInfo:n=!0,flex:l,width:c="100%",isRequired:a=!1})=>{const i={tooltipProps:{position:"top",...r==null?void 0:r.tooltipProps,size:"Small"}};return e.jsxRuntimeExports.jsxs(e.Container,{width:c,direction:"horizontal",gap:"4px",flex:l,children:[t??e.jsxRuntimeExports.jsxs(e.Label$1,{children:[s," ",a?e.jsxRuntimeExports.jsx(e.Required,{}):null]}),n&&e.jsxRuntimeExports.jsx(e.Info,{...i})]})},F=({width:s="100%",flex:t,label:r="Obrigatório",margin:n="0 0 16px 0"})=>e.jsxRuntimeExports.jsx(e.Container,{width:s,flex:t,customStyles:{margin:n},children:e.jsxRuntimeExports.jsx(e.Label$2,{children:`* ${r}`})});exports.AlertInline=C;exports.LabelField=k;exports.RequiredLabelView=F;exports.showAlert=R;
|
|
@@ -8157,9 +8157,9 @@ See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]
|
|
|
8157
8157
|
display: none;
|
|
8158
8158
|
`,XKe=De.label`
|
|
8159
8159
|
font-family: ${g.fonts.fontFamily.fontFamilyPrimary};
|
|
8160
|
-
font-size: ${({size:e})=>e==="Small"?g.fonts.fontSize.
|
|
8160
|
+
font-size: ${({size:e})=>e==="Small"?g.fonts.fontSize.fontSizeBodySm:g.fonts.fontSize.fontSizeBodyMd};
|
|
8161
8161
|
font-weight: ${g.fonts.fontWeight.fontWeightRegular};
|
|
8162
|
-
line-height: ${({size:e})=>e==="Small"?g.fonts.lineHeight.lineHeightSm(g.fonts.fontSize.
|
|
8162
|
+
line-height: ${({size:e})=>e==="Small"?g.fonts.lineHeight.lineHeightSm(g.fonts.fontSize.fontSizeBodySm):g.fonts.lineHeight.lineHeightMd(g.fonts.fontSize.fontSizeBodyMd)};
|
|
8163
8163
|
color: ${({disabled:e})=>e?g.colors.neutralColors.colorNeutralCloudy:g.colors.neutralColors.colorNeutralDark};
|
|
8164
8164
|
margin-left: ${({size:e})=>e==="Small"?"1.55rem":"2.3rem"};
|
|
8165
8165
|
|
|
@@ -8209,10 +8209,10 @@ See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]
|
|
|
8209
8209
|
height: ${({size:e})=>e==="Small"?g.icons.iconSizeSm:g.icons.iconSizeMd};
|
|
8210
8210
|
|
|
8211
8211
|
path {
|
|
8212
|
-
fill: ${({disabled:e})=>e?g.colors.neutralColors.colorNeutralClean:g.colors.neutralColors.colorNeutralDark};
|
|
8212
|
+
fill: ${({disabled:e,checkColor:t})=>e?g.colors.neutralColors.colorNeutralClean:t||g.colors.neutralColors.colorNeutralDark};
|
|
8213
8213
|
}
|
|
8214
8214
|
}
|
|
8215
|
-
`,W0=ie.forwardRef(({id:e,label:t,size:n="Medium",value:r,name:o,disabled:i=!1,width:a="100%",variant:l="Selected",onChange:s,gridRow:c,gridColumn:u,checked:d,checkColor:p,...h},m)=>{const v=ie.useRef(null);return ae.jsx(qKe,{width:a,size:n,disabled:i,children:ae.jsxs(XKe,{htmlFor:`Checkbox-${t||e}`,disabled:i,size:n,"data-testid":"checkbox-label",children:[ae.jsx(lu,{type:"checkbox",disabled:i,id:`Checkbox-${t||e}`,"data-cy":`Checkbox-${t||e}`,size:n,"data-testid":"checkbox",value:r,checked:d,name:o,onChange:s,gridRow:c,gridColumn:u,...h,ref:C=>{v.current=C,typeof m=="function"?m(C):m&&(m.current=C)}}),ae.jsx(KKe,{size:n,disabled:i,checkColor:p,id:`Checkbox-ContainerCheck-${t||e}`,"data-cy":`Checkbox-ContainerCheck-${t||e}`,children:l==="Selected"?ae.jsx(et.Icon,{iconName:`CheckBoxFill1${n==="Small"?"Ant":"Sm"}`}):ae.jsx(et.Icon,{iconName:`CheckboxLess${n==="Small"?"Ant":"Sm"}`})}),ae.jsx(QKe,{size:n,disabled:i,id:`Checkbox-ContainerUnCheck-${t||e}`,"data-cy":`Checkbox-ContainerUnCheck-${t||e}`,children:ae.jsx(et.Icon,{iconName:`CheckBoxOutlineBlankFill0${n==="Small"?"Ant":"Sm"}`})}),t]})})});W0.displayName="Checkbox";const JKe={left:"flex-start",center:"center",right:"flex-end"},eQe={top:"flex-start",center:"center",bottom:"flex-end"},tQe={vertical:"column",horizontal:"row"},nQe=De.div`
|
|
8215
|
+
`,W0=ie.forwardRef(({id:e,label:t,size:n="Medium",value:r,name:o,disabled:i=!1,width:a="100%",variant:l="Selected",onChange:s,gridRow:c,gridColumn:u,checked:d,checkColor:p,...h},m)=>{const v=ie.useRef(null);return ae.jsx(qKe,{width:a,size:n,disabled:i,children:ae.jsxs(XKe,{htmlFor:`Checkbox-${t||e}`,disabled:i,size:n,"data-testid":"checkbox-label",children:[ae.jsx(lu,{type:"checkbox",disabled:i,id:`Checkbox-${t||e}`,"data-cy":`Checkbox-${t||e}`,size:n,"data-testid":"checkbox",value:r,checked:d,name:o,onChange:s,gridRow:c,gridColumn:u,...h,ref:C=>{v.current=C,typeof m=="function"?m(C):m&&(m.current=C)}}),ae.jsx(KKe,{size:n,disabled:i,checkColor:p,id:`Checkbox-ContainerCheck-${t||e}`,"data-cy":`Checkbox-ContainerCheck-${t||e}`,children:l==="Selected"?ae.jsx(et.Icon,{iconName:`CheckBoxFill1${n==="Small"?"Ant":"Sm"}`}):ae.jsx(et.Icon,{iconName:`CheckboxLess${n==="Small"?"Ant":"Sm"}`})}),ae.jsx(QKe,{size:n,disabled:i,checkColor:p,id:`Checkbox-ContainerUnCheck-${t||e}`,"data-cy":`Checkbox-ContainerUnCheck-${t||e}`,children:ae.jsx(et.Icon,{iconName:`CheckBoxOutlineBlankFill0${n==="Small"?"Ant":"Sm"}`})}),t]})})});W0.displayName="Checkbox";const JKe={left:"flex-start",center:"center",right:"flex-end"},eQe={top:"flex-start",center:"center",bottom:"flex-end"},tQe={vertical:"column",horizontal:"row"},nQe=De.div`
|
|
8216
8216
|
display: flex;
|
|
8217
8217
|
|
|
8218
8218
|
background-color: ${e=>g.colors.backgroundColors[`colorBackground${ht.capitalizeFirstLetter(e.backgroundColor)}`]??e.backgroundColor??"transparent"};
|
|
@@ -87591,9 +87591,9 @@ const tQe = De.div`
|
|
|
87591
87591
|
display: none;
|
|
87592
87592
|
`, nQe = De.label`
|
|
87593
87593
|
font-family: ${f.fonts.fontFamily.fontFamilyPrimary};
|
|
87594
|
-
font-size: ${({ size: e }) => e === "Small" ? f.fonts.fontSize.
|
|
87594
|
+
font-size: ${({ size: e }) => e === "Small" ? f.fonts.fontSize.fontSizeBodySm : f.fonts.fontSize.fontSizeBodyMd};
|
|
87595
87595
|
font-weight: ${f.fonts.fontWeight.fontWeightRegular};
|
|
87596
|
-
line-height: ${({ size: e }) => e === "Small" ? f.fonts.lineHeight.lineHeightSm(f.fonts.fontSize.
|
|
87596
|
+
line-height: ${({ size: e }) => e === "Small" ? f.fonts.lineHeight.lineHeightSm(f.fonts.fontSize.fontSizeBodySm) : f.fonts.lineHeight.lineHeightMd(f.fonts.fontSize.fontSizeBodyMd)};
|
|
87597
87597
|
color: ${({ disabled: e }) => e ? f.colors.neutralColors.colorNeutralCloudy : f.colors.neutralColors.colorNeutralDark};
|
|
87598
87598
|
margin-left: ${({ size: e }) => e === "Small" ? "1.55rem" : "2.3rem"};
|
|
87599
87599
|
|
|
@@ -87643,7 +87643,7 @@ const tQe = De.div`
|
|
|
87643
87643
|
height: ${({ size: e }) => e === "Small" ? f.icons.iconSizeSm : f.icons.iconSizeMd};
|
|
87644
87644
|
|
|
87645
87645
|
path {
|
|
87646
|
-
fill: ${({ disabled: e }) => e ? f.colors.neutralColors.colorNeutralClean : f.colors.neutralColors.colorNeutralDark};
|
|
87646
|
+
fill: ${({ disabled: e, checkColor: t }) => e ? f.colors.neutralColors.colorNeutralClean : t || f.colors.neutralColors.colorNeutralDark};
|
|
87647
87647
|
}
|
|
87648
87648
|
}
|
|
87649
87649
|
`, P7 = x1(
|
|
@@ -87719,6 +87719,7 @@ const tQe = De.div`
|
|
|
87719
87719
|
{
|
|
87720
87720
|
size: n,
|
|
87721
87721
|
disabled: i,
|
|
87722
|
+
checkColor: p,
|
|
87722
87723
|
id: `Checkbox-ContainerUnCheck-${t || e}`,
|
|
87723
87724
|
"data-cy": `Checkbox-ContainerUnCheck-${t || e}`,
|
|
87724
87725
|
children: /* @__PURE__ */ ie.jsx(
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as e, b as _, o as ie, ad as Z, C as ne, D as re, l as ae, J as de, K as E, ae as oe, af as ce, ag as he, ah as ue, G as xe, E as le, ai as fe, aj as me, ak as pe, al as ge, am as X, an as Y, ao as je, ap as be, aq as we, ar as We } from "./Table.styles-
|
|
1
|
+
import { P as e, b as _, o as ie, ad as Z, C as ne, D as re, l as ae, J as de, K as E, ae as oe, af as ce, ag as he, ah as ue, G as xe, E as le, ai as fe, aj as me, ak as pe, al as ge, am as X, an as Y, ao as je, ap as be, aq as we, ar as We } from "./Table.styles-CR8lsfaa.js";
|
|
2
2
|
import { useState as P, useEffect as G, useMemo as J, useRef as Q, useLayoutEffect as Ie } from "react";
|
|
3
3
|
import "react-dom";
|
|
4
4
|
import { Controller as K, useController as Se } from "react-hook-form";
|
|
@@ -11,24 +11,24 @@ const te = 350, Ce = ({
|
|
|
11
11
|
endAdornment: c = null,
|
|
12
12
|
marginBottom: x = "16px",
|
|
13
13
|
customStyles: l = {},
|
|
14
|
-
wrapperCustomStyles:
|
|
14
|
+
wrapperCustomStyles: W = {},
|
|
15
15
|
animationContainerCustomStyles: h = {},
|
|
16
16
|
hideAdornmentOnCollapse: u = !1,
|
|
17
|
-
maxHeight:
|
|
17
|
+
maxHeight: R = "none",
|
|
18
18
|
// Default to 'none' to allow full expansion
|
|
19
19
|
height: F = "fit-content"
|
|
20
20
|
}) => {
|
|
21
|
-
const [p,
|
|
21
|
+
const [p, y] = P(!1), [f, S] = P(!0);
|
|
22
22
|
G(() => {
|
|
23
23
|
if (u)
|
|
24
24
|
if (p) {
|
|
25
25
|
const o = setTimeout(
|
|
26
|
-
() =>
|
|
26
|
+
() => S(!1),
|
|
27
27
|
te
|
|
28
28
|
);
|
|
29
29
|
return () => clearTimeout(o);
|
|
30
30
|
} else
|
|
31
|
-
|
|
31
|
+
S(!0);
|
|
32
32
|
}, [p, u]);
|
|
33
33
|
const d = u && !f ? null : c;
|
|
34
34
|
return /* @__PURE__ */ e.jsxs(
|
|
@@ -37,7 +37,7 @@ const te = 350, Ce = ({
|
|
|
37
37
|
width: "100%",
|
|
38
38
|
flex: "1",
|
|
39
39
|
gap: "8px",
|
|
40
|
-
customStyles:
|
|
40
|
+
customStyles: W,
|
|
41
41
|
children: [
|
|
42
42
|
/* @__PURE__ */ e.jsx(
|
|
43
43
|
ie,
|
|
@@ -47,7 +47,7 @@ const te = 350, Ce = ({
|
|
|
47
47
|
marginBottom: x,
|
|
48
48
|
collapse: {
|
|
49
49
|
collapsed: p,
|
|
50
|
-
setCollapsed:
|
|
50
|
+
setCollapsed: y
|
|
51
51
|
},
|
|
52
52
|
endAdornment: d,
|
|
53
53
|
customStyles: l
|
|
@@ -61,7 +61,7 @@ const te = 350, Ce = ({
|
|
|
61
61
|
height: F,
|
|
62
62
|
customStyles: {
|
|
63
63
|
...h,
|
|
64
|
-
maxHeight: p ? "0" :
|
|
64
|
+
maxHeight: p ? "0" : R,
|
|
65
65
|
transition: `max-height ${te}ms ease-in-out`
|
|
66
66
|
},
|
|
67
67
|
children: r
|
|
@@ -77,24 +77,24 @@ function Le({
|
|
|
77
77
|
id: c = r,
|
|
78
78
|
label: x,
|
|
79
79
|
readonly: l = !1,
|
|
80
|
-
disabled:
|
|
80
|
+
disabled: W = !1,
|
|
81
81
|
afterCheck: h,
|
|
82
82
|
width: u = "100%",
|
|
83
|
-
formatter:
|
|
83
|
+
formatter: R,
|
|
84
84
|
parser: F,
|
|
85
85
|
flex: p,
|
|
86
|
-
size:
|
|
86
|
+
size: y = "Medium",
|
|
87
87
|
checkColor: f,
|
|
88
|
-
triggerFormField:
|
|
88
|
+
triggerFormField: S = null,
|
|
89
89
|
...d
|
|
90
90
|
}) {
|
|
91
91
|
const { onChangeTrigger: o } = Z({
|
|
92
92
|
form: n,
|
|
93
93
|
fieldName: r,
|
|
94
|
-
triggerType:
|
|
94
|
+
triggerType: S,
|
|
95
95
|
debounceTime: 0
|
|
96
|
-
}),
|
|
97
|
-
|
|
96
|
+
}), I = (A, M) => {
|
|
97
|
+
M(A), h == null || h(A), o == null || o();
|
|
98
98
|
};
|
|
99
99
|
return /* @__PURE__ */ e.jsx(_, { width: u, flex: p, children: /* @__PURE__ */ e.jsx(
|
|
100
100
|
K,
|
|
@@ -102,25 +102,25 @@ function Le({
|
|
|
102
102
|
name: r,
|
|
103
103
|
control: n.control,
|
|
104
104
|
render: ({
|
|
105
|
-
field: { onChange:
|
|
106
|
-
fieldState: { error:
|
|
105
|
+
field: { onChange: A, value: M, onBlur: C },
|
|
106
|
+
fieldState: { error: T = null }
|
|
107
107
|
}) => {
|
|
108
|
-
const
|
|
109
|
-
return
|
|
108
|
+
const m = T == null ? void 0 : T.message;
|
|
109
|
+
return m && console.log("Error on checkbox!", m), /* @__PURE__ */ e.jsx(
|
|
110
110
|
ne,
|
|
111
111
|
{
|
|
112
112
|
id: `form-checkbox-${c}`,
|
|
113
|
-
checked:
|
|
113
|
+
checked: R ? R(M) : !!M,
|
|
114
114
|
name: r,
|
|
115
115
|
label: x,
|
|
116
|
-
disabled:
|
|
117
|
-
onChange: (
|
|
118
|
-
|
|
119
|
-
(F == null ? void 0 : F(
|
|
120
|
-
|
|
121
|
-
);
|
|
116
|
+
disabled: W || l,
|
|
117
|
+
onChange: (b) => {
|
|
118
|
+
I(
|
|
119
|
+
(F == null ? void 0 : F(b.target.checked, M)) ?? b.target.checked,
|
|
120
|
+
A
|
|
121
|
+
), C == null || C();
|
|
122
122
|
},
|
|
123
|
-
size:
|
|
123
|
+
size: y,
|
|
124
124
|
checkColor: f,
|
|
125
125
|
...d
|
|
126
126
|
}
|
|
@@ -135,27 +135,27 @@ const Oe = ({
|
|
|
135
135
|
label: c,
|
|
136
136
|
placeholder: x,
|
|
137
137
|
readonly: l = !1,
|
|
138
|
-
disabled:
|
|
138
|
+
disabled: W = !1,
|
|
139
139
|
width: h = "100%",
|
|
140
140
|
flex: u,
|
|
141
|
-
tooltipIsVisible:
|
|
141
|
+
tooltipIsVisible: R,
|
|
142
142
|
tooltipMaxWidth: F,
|
|
143
143
|
tooltipPosition: p = "top",
|
|
144
|
-
afterFormChange:
|
|
144
|
+
afterFormChange: y,
|
|
145
145
|
openToDate: f,
|
|
146
|
-
range:
|
|
146
|
+
range: S = !1,
|
|
147
147
|
openCalendarOnInputClick: d = !1,
|
|
148
148
|
...o
|
|
149
149
|
}) => {
|
|
150
|
-
let
|
|
151
|
-
return !U(x) && !
|
|
150
|
+
let I = x;
|
|
151
|
+
return !U(x) && !W && (I = l ? "Nenhuma data escolhida" : "Escolha uma data"), /* @__PURE__ */ e.jsx(_, { width: h, flex: u, children: /* @__PURE__ */ e.jsx(
|
|
152
152
|
K,
|
|
153
153
|
{
|
|
154
154
|
name: r,
|
|
155
155
|
control: n.control,
|
|
156
|
-
render: ({ field: { value:
|
|
157
|
-
let
|
|
158
|
-
U(
|
|
156
|
+
render: ({ field: { value: A, onChange: M, ref: C } }) => {
|
|
157
|
+
let T;
|
|
158
|
+
U(A) && (S ? T = Array.isArray(A) ? A.join(" - ") : A : T = new Date(Ae(A.slice(0, 10))));
|
|
159
159
|
const { error: m } = n.getFieldState(r, n.formState);
|
|
160
160
|
return /* @__PURE__ */ e.jsx(
|
|
161
161
|
re,
|
|
@@ -163,23 +163,23 @@ const Oe = ({
|
|
|
163
163
|
ref: C,
|
|
164
164
|
idCalendar: `${r}-calendar`,
|
|
165
165
|
label: c,
|
|
166
|
-
value:
|
|
166
|
+
value: T,
|
|
167
167
|
size: "Small",
|
|
168
168
|
readonly: l,
|
|
169
169
|
errorMessage: m == null ? void 0 : m.message,
|
|
170
|
-
disabled:
|
|
171
|
-
placeholder:
|
|
172
|
-
onChangeHandleDate: (
|
|
170
|
+
disabled: W,
|
|
171
|
+
placeholder: I,
|
|
172
|
+
onChangeHandleDate: (b) => {
|
|
173
173
|
var L, O;
|
|
174
|
-
|
|
175
|
-
|
|
174
|
+
M(
|
|
175
|
+
S ? (L = b.split) == null ? void 0 : L.call(b, " - ").map((a) => {
|
|
176
176
|
var g;
|
|
177
177
|
return ((g = ee(a)) == null ? void 0 : g.slice(0, 10)) || null;
|
|
178
|
-
}) : ((O = ee(
|
|
179
|
-
),
|
|
178
|
+
}) : ((O = ee(b)) == null ? void 0 : O.slice(0, 10)) || null
|
|
179
|
+
), y == null || y(b);
|
|
180
180
|
},
|
|
181
181
|
openToDate: f,
|
|
182
|
-
selectsRange:
|
|
182
|
+
selectsRange: S,
|
|
183
183
|
openCalendarOnInputClick: d,
|
|
184
184
|
...o
|
|
185
185
|
}
|
|
@@ -194,54 +194,54 @@ function Ve({
|
|
|
194
194
|
label: c,
|
|
195
195
|
slots: { field: x },
|
|
196
196
|
slotsProps: l,
|
|
197
|
-
triggerFormField:
|
|
197
|
+
triggerFormField: W = null,
|
|
198
198
|
// Value
|
|
199
199
|
value: h,
|
|
200
200
|
// Flags
|
|
201
201
|
bypassControllerOnChange: u = !1,
|
|
202
|
-
overrideOnBlur:
|
|
202
|
+
overrideOnBlur: R = !1,
|
|
203
203
|
isRequired: F = !1,
|
|
204
204
|
readonly: p = !1,
|
|
205
|
-
disabled:
|
|
205
|
+
disabled: y = !1,
|
|
206
206
|
// Tranformations
|
|
207
207
|
parser: f,
|
|
208
208
|
// Debounce
|
|
209
|
-
debounce:
|
|
209
|
+
debounce: S,
|
|
210
210
|
// Change handlers
|
|
211
211
|
beforeChange: d,
|
|
212
212
|
onChange: o,
|
|
213
|
-
afterChange:
|
|
213
|
+
afterChange: I,
|
|
214
214
|
// Blur handlers
|
|
215
|
-
beforeBlur:
|
|
216
|
-
onBlur:
|
|
215
|
+
beforeBlur: A,
|
|
216
|
+
onBlur: M,
|
|
217
217
|
afterBlur: C,
|
|
218
218
|
// Enter handlers
|
|
219
|
-
onEnter:
|
|
219
|
+
onEnter: T
|
|
220
220
|
}) {
|
|
221
221
|
const {
|
|
222
|
-
field: { value: m, onChange:
|
|
222
|
+
field: { value: m, onChange: b },
|
|
223
223
|
fieldState: { error: L = null }
|
|
224
|
-
} = Se({ name: r, control: n.control }), O = U(
|
|
224
|
+
} = Se({ name: r, control: n.control }), O = U(S), { onChangeTrigger: a, onBlurTrigger: g } = Z({
|
|
225
225
|
form: n,
|
|
226
226
|
fieldName: r,
|
|
227
|
-
triggerType:
|
|
227
|
+
triggerType: W,
|
|
228
228
|
debounceTime: O ? 0 : 500
|
|
229
|
-
}), j = (s,
|
|
229
|
+
}), j = (s, w) => {
|
|
230
230
|
var k, H;
|
|
231
231
|
const N = ((k = s == null ? void 0 : s.target) == null ? void 0 : k.value) || ((H = s == null ? void 0 : s.target) == null ? void 0 : H.checked) || s || void 0, V = U(f) ? f(N) : N;
|
|
232
|
-
d == null || d(V), u ||
|
|
232
|
+
d == null || d(V), u || w == null || w(V), o == null || o(s, w), I == null || I(s, w), a == null || a();
|
|
233
233
|
}, $ = J(() => {
|
|
234
234
|
if (!O) return j;
|
|
235
235
|
let s;
|
|
236
236
|
return (N, V) => {
|
|
237
|
-
clearTimeout(s), s = setTimeout(() => j(N, V),
|
|
237
|
+
clearTimeout(s), s = setTimeout(() => j(N, V), S);
|
|
238
238
|
};
|
|
239
|
-
}, [O,
|
|
239
|
+
}, [O, S, j]), i = (s, w) => {
|
|
240
240
|
var V, k;
|
|
241
241
|
const N = ((V = s == null ? void 0 : s.target) == null ? void 0 : V.value) || ((k = s == null ? void 0 : s.target) == null ? void 0 : k.checked) || s || void 0;
|
|
242
|
-
!
|
|
243
|
-
}, t = (s,
|
|
244
|
-
|
|
242
|
+
!R && u && (b == null || b(N)), A == null || A(s, w), M == null || M(s, w), C == null || C(s, w), g == null || g();
|
|
243
|
+
}, t = (s, w) => {
|
|
244
|
+
T == null || T(s, w);
|
|
245
245
|
};
|
|
246
246
|
L != null && L.message && console.log(`Error on ${x.displayName}!`, L.message);
|
|
247
247
|
const D = U(h) ? h == null ? void 0 : h(m) : { value: m };
|
|
@@ -251,9 +251,9 @@ function Ve({
|
|
|
251
251
|
...l == null ? void 0 : l.field,
|
|
252
252
|
...D,
|
|
253
253
|
label: c,
|
|
254
|
-
onChange: (s) => $ == null ? void 0 : $(s,
|
|
255
|
-
onBlur: (s) => i == null ? void 0 : i(s,
|
|
256
|
-
onEnter: (s) => t == null ? void 0 : t(s,
|
|
254
|
+
onChange: (s) => $ == null ? void 0 : $(s, b),
|
|
255
|
+
onBlur: (s) => i == null ? void 0 : i(s, b),
|
|
256
|
+
onEnter: (s) => t == null ? void 0 : t(s, b),
|
|
257
257
|
errorMessage: L == null ? void 0 : L.message
|
|
258
258
|
}
|
|
259
259
|
) });
|
|
@@ -264,22 +264,22 @@ const Ee = ({
|
|
|
264
264
|
label: c,
|
|
265
265
|
options: x,
|
|
266
266
|
readonly: l = !1,
|
|
267
|
-
disabled:
|
|
267
|
+
disabled: W = !1,
|
|
268
268
|
width: h = "100%",
|
|
269
269
|
flex: u,
|
|
270
|
-
placeholder:
|
|
270
|
+
placeholder: R,
|
|
271
271
|
iconName: F,
|
|
272
272
|
onSelect: p,
|
|
273
|
-
hasSelectAll:
|
|
273
|
+
hasSelectAll: y = !1,
|
|
274
274
|
tags: f = !0,
|
|
275
|
-
sortOptions:
|
|
275
|
+
sortOptions: S = !1,
|
|
276
276
|
enableSearch: d = !1,
|
|
277
277
|
valueAllOption: o,
|
|
278
|
-
isRequired:
|
|
279
|
-
tooltipProps:
|
|
280
|
-
infoProps:
|
|
278
|
+
isRequired: I = !1,
|
|
279
|
+
tooltipProps: A = {},
|
|
280
|
+
infoProps: M = {},
|
|
281
281
|
triggerFormField: C = null,
|
|
282
|
-
...
|
|
282
|
+
...T
|
|
283
283
|
}) => {
|
|
284
284
|
const { onChangeTrigger: m } = Z({
|
|
285
285
|
form: n,
|
|
@@ -292,14 +292,14 @@ const Ee = ({
|
|
|
292
292
|
{
|
|
293
293
|
name: r,
|
|
294
294
|
control: n.control,
|
|
295
|
-
render: ({ field: { value:
|
|
296
|
-
const { error: O } = n.getFieldState(r), a = U(
|
|
295
|
+
render: ({ field: { value: b, onChange: L } }) => {
|
|
296
|
+
const { error: O } = n.getFieldState(r), a = U(b) ? b : [];
|
|
297
297
|
return /* @__PURE__ */ e.jsx(
|
|
298
298
|
ae,
|
|
299
299
|
{
|
|
300
300
|
label: c,
|
|
301
301
|
size: "Small",
|
|
302
|
-
disabled:
|
|
302
|
+
disabled: W || l,
|
|
303
303
|
onChange: (g) => {
|
|
304
304
|
L(g), p == null || p(g), m == null || m();
|
|
305
305
|
},
|
|
@@ -307,26 +307,26 @@ const Ee = ({
|
|
|
307
307
|
errorMessage: O == null ? void 0 : O.message,
|
|
308
308
|
options: x,
|
|
309
309
|
iconName: F,
|
|
310
|
-
hasSelectAll:
|
|
310
|
+
hasSelectAll: y,
|
|
311
311
|
tags: f,
|
|
312
|
-
sortOptions:
|
|
313
|
-
placeholder:
|
|
312
|
+
sortOptions: S,
|
|
313
|
+
placeholder: R,
|
|
314
314
|
enableSearch: d,
|
|
315
315
|
valueAllOption: o,
|
|
316
|
-
isRequired:
|
|
316
|
+
isRequired: I,
|
|
317
317
|
tooltipProps: {
|
|
318
318
|
position: "top",
|
|
319
|
-
...
|
|
319
|
+
...A
|
|
320
320
|
},
|
|
321
321
|
infoProps: {
|
|
322
322
|
tooltipProps: {
|
|
323
323
|
position: "top",
|
|
324
324
|
maxWidth: "300px",
|
|
325
|
-
...
|
|
325
|
+
...M.tooltipProps
|
|
326
326
|
},
|
|
327
|
-
...
|
|
327
|
+
...M
|
|
328
328
|
},
|
|
329
|
-
...
|
|
329
|
+
...T
|
|
330
330
|
}
|
|
331
331
|
);
|
|
332
332
|
}
|
|
@@ -338,25 +338,25 @@ const Ee = ({
|
|
|
338
338
|
name: c,
|
|
339
339
|
label: x,
|
|
340
340
|
options: l,
|
|
341
|
-
readonly:
|
|
341
|
+
readonly: W = !1,
|
|
342
342
|
disabled: h = !1,
|
|
343
343
|
optionsMap: u,
|
|
344
|
-
width:
|
|
344
|
+
width: R = "100%",
|
|
345
345
|
flex: F,
|
|
346
346
|
placeholder: p,
|
|
347
|
-
onSelect:
|
|
347
|
+
onSelect: y,
|
|
348
348
|
parser: f,
|
|
349
|
-
filter:
|
|
349
|
+
filter: S,
|
|
350
350
|
tooltipProps: d = {},
|
|
351
351
|
infoProps: o = {},
|
|
352
|
-
maxHeigthMenu:
|
|
353
|
-
isRequired:
|
|
354
|
-
onRemoveSelected:
|
|
352
|
+
maxHeigthMenu: I,
|
|
353
|
+
isRequired: A = !1,
|
|
354
|
+
onRemoveSelected: M,
|
|
355
355
|
triggerFormField: C = null,
|
|
356
|
-
displayText:
|
|
356
|
+
displayText: T,
|
|
357
357
|
...m
|
|
358
358
|
}) => {
|
|
359
|
-
const { onChangeTrigger:
|
|
359
|
+
const { onChangeTrigger: b } = Z({
|
|
360
360
|
form: r,
|
|
361
361
|
fieldName: c,
|
|
362
362
|
triggerType: C,
|
|
@@ -373,9 +373,9 @@ const Ee = ({
|
|
|
373
373
|
}
|
|
374
374
|
}, a = (j, $) => {
|
|
375
375
|
let i = j;
|
|
376
|
-
f && (i = f == null ? void 0 : f(j)), $(i),
|
|
376
|
+
f && (i = f == null ? void 0 : f(j)), $(i), y == null || y(i), b == null || b();
|
|
377
377
|
}, g = J(() => U(u) ? u : Object.fromEntries(l.map((j) => [j.value, j])), [l, u]);
|
|
378
|
-
return /* @__PURE__ */ e.jsx(_, { width:
|
|
378
|
+
return /* @__PURE__ */ e.jsx(_, { width: R, flex: F, children: /* @__PURE__ */ e.jsx(
|
|
379
379
|
K,
|
|
380
380
|
{
|
|
381
381
|
name: c,
|
|
@@ -393,8 +393,8 @@ const Ee = ({
|
|
|
393
393
|
size: "Small",
|
|
394
394
|
variant: n,
|
|
395
395
|
disabled: h,
|
|
396
|
-
readonly:
|
|
397
|
-
filter:
|
|
396
|
+
readonly: W,
|
|
397
|
+
filter: S,
|
|
398
398
|
errorMessage: i == null ? void 0 : i.message,
|
|
399
399
|
placeholder: p,
|
|
400
400
|
value: t,
|
|
@@ -403,12 +403,12 @@ const Ee = ({
|
|
|
403
403
|
},
|
|
404
404
|
tooltipProps: L,
|
|
405
405
|
options: l,
|
|
406
|
-
maxHeigthMenu:
|
|
406
|
+
maxHeigthMenu: I,
|
|
407
407
|
infoProps: O,
|
|
408
|
-
maxHeightMenu:
|
|
409
|
-
isRequired:
|
|
410
|
-
onRemoveSelected:
|
|
411
|
-
displayText:
|
|
408
|
+
maxHeightMenu: I,
|
|
409
|
+
isRequired: A,
|
|
410
|
+
onRemoveSelected: M,
|
|
411
|
+
displayText: T,
|
|
412
412
|
...m
|
|
413
413
|
}
|
|
414
414
|
);
|
|
@@ -416,7 +416,7 @@ const Ee = ({
|
|
|
416
416
|
}
|
|
417
417
|
) });
|
|
418
418
|
}, Re = (n) => {
|
|
419
|
-
const [r, c] = P(!1), [x, l] = P(n),
|
|
419
|
+
const [r, c] = P(!1), [x, l] = P(n), W = Q(null);
|
|
420
420
|
return G(() => {
|
|
421
421
|
l(n);
|
|
422
422
|
}, [n]), {
|
|
@@ -424,7 +424,7 @@ const Ee = ({
|
|
|
424
424
|
isOpen: r,
|
|
425
425
|
setOptionsSelect: l,
|
|
426
426
|
optionsSelect: x,
|
|
427
|
-
selectContainerRef:
|
|
427
|
+
selectContainerRef: W
|
|
428
428
|
};
|
|
429
429
|
}, ye = 200, _e = ({
|
|
430
430
|
name: n,
|
|
@@ -432,18 +432,18 @@ const Ee = ({
|
|
|
432
432
|
width: c = "100%",
|
|
433
433
|
size: x = "Medium",
|
|
434
434
|
disabled: l = !1,
|
|
435
|
-
isLoading:
|
|
435
|
+
isLoading: W = !1,
|
|
436
436
|
onClick: h,
|
|
437
437
|
options: u,
|
|
438
|
-
label:
|
|
438
|
+
label: R,
|
|
439
439
|
menuSelectProps: F = {},
|
|
440
440
|
iconName: p,
|
|
441
|
-
optionsIconPosition:
|
|
441
|
+
optionsIconPosition: y
|
|
442
442
|
}) => {
|
|
443
|
-
const { isOpen: f, setIsOpen:
|
|
444
|
-
let
|
|
445
|
-
l ?
|
|
446
|
-
const
|
|
443
|
+
const { isOpen: f, setIsOpen: S, selectContainerRef: d, optionsSelect: o } = Re(u);
|
|
444
|
+
let I = E.colors.backgroundColors.colorBackgroundSnow;
|
|
445
|
+
l ? I = E.colors.neutralColors.colorNeutralCloudy : r !== "primary" && (I = E.colors.neutralColors.colorNeutralDark);
|
|
446
|
+
const A = {
|
|
447
447
|
...F
|
|
448
448
|
};
|
|
449
449
|
return /* @__PURE__ */ e.jsxs(
|
|
@@ -453,9 +453,9 @@ const Ee = ({
|
|
|
453
453
|
width: c,
|
|
454
454
|
size: x,
|
|
455
455
|
disabled: l,
|
|
456
|
-
onBlur: () => setTimeout(() =>
|
|
456
|
+
onBlur: () => setTimeout(() => S(!1), ye),
|
|
457
457
|
children: [
|
|
458
|
-
|
|
458
|
+
R && /* @__PURE__ */ e.jsx(ce, { children: R }),
|
|
459
459
|
/* @__PURE__ */ e.jsxs(
|
|
460
460
|
he,
|
|
461
461
|
{
|
|
@@ -463,32 +463,32 @@ const Ee = ({
|
|
|
463
463
|
size: x,
|
|
464
464
|
disabled: l,
|
|
465
465
|
variant: r,
|
|
466
|
-
isLoading:
|
|
467
|
-
onClick: () => !
|
|
466
|
+
isLoading: W,
|
|
467
|
+
onClick: () => !W && S(!f),
|
|
468
468
|
id: `button-component-${n}`,
|
|
469
469
|
"data-cy": `button-component-${n}`,
|
|
470
470
|
children: [
|
|
471
|
-
|
|
471
|
+
W && /* @__PURE__ */ e.jsx(ue, { size: x, disabled: l, variant: r, children: /* @__PURE__ */ e.jsx(
|
|
472
472
|
v,
|
|
473
473
|
{
|
|
474
474
|
iconName: `ProgressActivity${x === "Small" ? "Ant" : "Sm"}`,
|
|
475
|
-
color:
|
|
475
|
+
color: I,
|
|
476
476
|
"data-testid": "icon-loading"
|
|
477
477
|
}
|
|
478
478
|
) }),
|
|
479
|
-
!
|
|
480
|
-
!
|
|
479
|
+
!W && /* @__PURE__ */ e.jsx("p", { title: n, children: n }),
|
|
480
|
+
!W && (f ? /* @__PURE__ */ e.jsx(
|
|
481
481
|
v,
|
|
482
482
|
{
|
|
483
483
|
iconName: `ExpandLess${x === "Small" ? "Ant" : "Sm"}`,
|
|
484
|
-
color:
|
|
484
|
+
color: I,
|
|
485
485
|
"data-testid": "icon-button-less"
|
|
486
486
|
}
|
|
487
487
|
) : /* @__PURE__ */ e.jsx(
|
|
488
488
|
v,
|
|
489
489
|
{
|
|
490
490
|
iconName: `ExpandMore${x === "Small" ? "Ant" : "Sm"}`,
|
|
491
|
-
color:
|
|
491
|
+
color: I,
|
|
492
492
|
"data-testid": "icon-button-more"
|
|
493
493
|
}
|
|
494
494
|
))
|
|
@@ -504,9 +504,9 @@ const Ee = ({
|
|
|
504
504
|
selectOption: h,
|
|
505
505
|
size: x,
|
|
506
506
|
inputValue: null,
|
|
507
|
-
iconPosition:
|
|
507
|
+
iconPosition: y,
|
|
508
508
|
iconName: p,
|
|
509
|
-
...
|
|
509
|
+
...A
|
|
510
510
|
}
|
|
511
511
|
)
|
|
512
512
|
]
|
|
@@ -518,25 +518,25 @@ const Ee = ({
|
|
|
518
518
|
flex: c,
|
|
519
519
|
backgroundColor: x = "white",
|
|
520
520
|
options: l = [],
|
|
521
|
-
heightItems:
|
|
521
|
+
heightItems: W = "60px",
|
|
522
522
|
widthItems: h = "155px",
|
|
523
523
|
emptyProps: u = {
|
|
524
524
|
title: "Nenhum dado a ser mostrado",
|
|
525
525
|
body: null
|
|
526
526
|
},
|
|
527
|
-
customWrapperStyles:
|
|
527
|
+
customWrapperStyles: R = {},
|
|
528
528
|
customItemStyles: F = {}
|
|
529
529
|
}) => {
|
|
530
|
-
const [p,
|
|
530
|
+
const [p, y] = P(l[0] || null), f = Q(null), S = Q(null);
|
|
531
531
|
return G(() => {
|
|
532
|
-
const d = f.current, o =
|
|
532
|
+
const d = f.current, o = S.current, I = () => {
|
|
533
533
|
d && o && (o.scrollTop = d.scrollTop);
|
|
534
534
|
};
|
|
535
|
-
return d == null || d.addEventListener("scroll",
|
|
536
|
-
d == null || d.removeEventListener("scroll",
|
|
535
|
+
return d == null || d.addEventListener("scroll", I), () => {
|
|
536
|
+
d == null || d.removeEventListener("scroll", I);
|
|
537
537
|
};
|
|
538
538
|
}, []), G(() => {
|
|
539
|
-
|
|
539
|
+
y(l[(l == null ? void 0 : l.length) - 1] || null);
|
|
540
540
|
}, [l == null ? void 0 : l.length]), (l == null ? void 0 : l.length) === 0 ? /* @__PURE__ */ e.jsx(
|
|
541
541
|
le,
|
|
542
542
|
{
|
|
@@ -556,7 +556,7 @@ const Ee = ({
|
|
|
556
556
|
customStyles: {
|
|
557
557
|
border: `1px solid ${E.colors.neutralColors.colorNeutralSoft}`,
|
|
558
558
|
borderRadius: E.borders.borderRadius.borderRadiusSm,
|
|
559
|
-
...
|
|
559
|
+
...R
|
|
560
560
|
},
|
|
561
561
|
children: [
|
|
562
562
|
/* @__PURE__ */ e.jsxs(fe, { ref: f, widthItems: h, children: [
|
|
@@ -564,9 +564,9 @@ const Ee = ({
|
|
|
564
564
|
me,
|
|
565
565
|
{
|
|
566
566
|
selected: (p == null ? void 0 : p.key) === d.key,
|
|
567
|
-
onClick: () =>
|
|
567
|
+
onClick: () => y(d),
|
|
568
568
|
withBorderRight: !0,
|
|
569
|
-
heightItems:
|
|
569
|
+
heightItems: W,
|
|
570
570
|
customStyles: F,
|
|
571
571
|
children: d.item
|
|
572
572
|
},
|
|
@@ -588,10 +588,10 @@ function qe({
|
|
|
588
588
|
size: c = "Small",
|
|
589
589
|
onRowClick: x,
|
|
590
590
|
fit: l = !1,
|
|
591
|
-
maxHeight:
|
|
591
|
+
maxHeight: W = "40rem",
|
|
592
592
|
columns: h,
|
|
593
593
|
dataSource: u,
|
|
594
|
-
columnsTextSize:
|
|
594
|
+
columnsTextSize: R = c,
|
|
595
595
|
emptyProps: F = {
|
|
596
596
|
width: "100%",
|
|
597
597
|
height: "100%",
|
|
@@ -601,21 +601,21 @@ function qe({
|
|
|
601
601
|
backgroundColor: E.colors.backgroundColors.colorBackgroundSnow
|
|
602
602
|
},
|
|
603
603
|
selectedRow: p = !1,
|
|
604
|
-
hideHeader:
|
|
604
|
+
hideHeader: y = !1,
|
|
605
605
|
withBorder: f = !0,
|
|
606
|
-
withBorderRadius:
|
|
606
|
+
withBorderRadius: S = !0,
|
|
607
607
|
striped: d = !1,
|
|
608
608
|
borderRadius: o = E.borders.borderRadius.borderRadiusSm
|
|
609
609
|
}) {
|
|
610
|
-
const
|
|
610
|
+
const I = J(() => Ne(r), [r]), [A, M] = P(null), C = Q(null), T = Q(null), [m, b] = P(h);
|
|
611
611
|
Ie(() => {
|
|
612
|
-
if (!
|
|
613
|
-
|
|
612
|
+
if (!T.current || h.length === 0) {
|
|
613
|
+
b(h);
|
|
614
614
|
return;
|
|
615
615
|
}
|
|
616
616
|
const a = () => {
|
|
617
617
|
var V;
|
|
618
|
-
const j = ((V =
|
|
618
|
+
const j = ((V = T.current) == null ? void 0 : V.clientWidth) || 0;
|
|
619
619
|
if (j === 0) return;
|
|
620
620
|
let $ = 0, i = 0;
|
|
621
621
|
const t = [], D = [];
|
|
@@ -623,7 +623,7 @@ function qe({
|
|
|
623
623
|
const H = Number(k.flex);
|
|
624
624
|
k.width ? $ += parseInt(k.width, 10) || 0 : k.flex && H > 0 ? (i += H, t.push(k)) : D.push(k);
|
|
625
625
|
});
|
|
626
|
-
const s = j - $,
|
|
626
|
+
const s = j - $, w = "80";
|
|
627
627
|
let N = [...h];
|
|
628
628
|
if (s > 0) {
|
|
629
629
|
if (t.length > 0) {
|
|
@@ -631,12 +631,12 @@ function qe({
|
|
|
631
631
|
N = h.map((H) => {
|
|
632
632
|
const q = Number(H.flex);
|
|
633
633
|
if (q && q > 0) {
|
|
634
|
-
const z = parseInt(H.minWidth ||
|
|
634
|
+
const z = parseInt(H.minWidth || w, 10), B = q * k, se = Math.max(B, z);
|
|
635
635
|
return { ...H, width: `${Math.floor(se)}px` };
|
|
636
636
|
}
|
|
637
637
|
return !H.width && !q ? {
|
|
638
638
|
...H,
|
|
639
|
-
width: H.minWidth || `${
|
|
639
|
+
width: H.minWidth || `${w}px`
|
|
640
640
|
} : H;
|
|
641
641
|
});
|
|
642
642
|
} else if (D.length > 0) {
|
|
@@ -644,22 +644,22 @@ function qe({
|
|
|
644
644
|
N = h.map((H) => {
|
|
645
645
|
const q = Number(H.flex);
|
|
646
646
|
if (!H.width && !q) {
|
|
647
|
-
const z = parseInt(H.minWidth ||
|
|
647
|
+
const z = parseInt(H.minWidth || w, 10), B = Math.max(k, z);
|
|
648
648
|
return { ...H, width: `${Math.floor(B)}px` };
|
|
649
649
|
}
|
|
650
650
|
return H;
|
|
651
651
|
});
|
|
652
652
|
}
|
|
653
653
|
} else
|
|
654
|
-
N = h.map((k) => k.width ? k : { ...k, width: k.minWidth || `${
|
|
655
|
-
|
|
654
|
+
N = h.map((k) => k.width ? k : { ...k, width: k.minWidth || `${w}px` });
|
|
655
|
+
b(N);
|
|
656
656
|
};
|
|
657
657
|
a();
|
|
658
658
|
const g = new ResizeObserver(a);
|
|
659
|
-
return g.observe(
|
|
659
|
+
return g.observe(T.current), () => g.disconnect();
|
|
660
660
|
}, [h]), G(() => {
|
|
661
661
|
const a = (g) => {
|
|
662
|
-
C.current && !C.current.contains(g.target) &&
|
|
662
|
+
C.current && !C.current.contains(g.target) && M(null);
|
|
663
663
|
};
|
|
664
664
|
return document.addEventListener("mousedown", a), () => {
|
|
665
665
|
document.removeEventListener("mousedown", a);
|
|
@@ -669,7 +669,7 @@ function qe({
|
|
|
669
669
|
(a) => a.mergeHeaderId && a.mergeHeaderLabel
|
|
670
670
|
) : !1, [m]), O = J(() => {
|
|
671
671
|
var $, i;
|
|
672
|
-
if (
|
|
672
|
+
if (y || !m || m.length === 0)
|
|
673
673
|
return null;
|
|
674
674
|
if (!L)
|
|
675
675
|
return /* @__PURE__ */ e.jsx(
|
|
@@ -689,7 +689,7 @@ function qe({
|
|
|
689
689
|
maxWidth: t.maxWidth,
|
|
690
690
|
horizontalAlign: t.horizontalAlign,
|
|
691
691
|
size: c,
|
|
692
|
-
columnsTextSize:
|
|
692
|
+
columnsTextSize: R,
|
|
693
693
|
withBorder: f,
|
|
694
694
|
headerAlign: t.headerAlign,
|
|
695
695
|
children: ((D = t.columnRender) == null ? void 0 : D.call(t, u)) || /* @__PURE__ */ e.jsx("span", { title: t.label, children: t.label })
|
|
@@ -706,7 +706,7 @@ function qe({
|
|
|
706
706
|
if (t.mergeHeaderId && t.mergeHeaderLabel) {
|
|
707
707
|
let D = 0;
|
|
708
708
|
const s = t.mergeHeaderId;
|
|
709
|
-
for (let
|
|
709
|
+
for (let w = j; w < m.length && m[w].mergeHeaderId === s; w++)
|
|
710
710
|
D++;
|
|
711
711
|
a.push(
|
|
712
712
|
/* @__PURE__ */ e.jsx(
|
|
@@ -715,7 +715,7 @@ function qe({
|
|
|
715
715
|
colSpan: D,
|
|
716
716
|
horizontalAlign: "center",
|
|
717
717
|
size: c,
|
|
718
|
-
columnsTextSize:
|
|
718
|
+
columnsTextSize: R,
|
|
719
719
|
withBorder: f,
|
|
720
720
|
width: t.width,
|
|
721
721
|
minWidth: t.minWidth,
|
|
@@ -727,8 +727,8 @@ function qe({
|
|
|
727
727
|
`${t.mergeHeaderId}-merged`
|
|
728
728
|
)
|
|
729
729
|
);
|
|
730
|
-
for (let
|
|
731
|
-
const N = m[j +
|
|
730
|
+
for (let w = 0; w < D; w++) {
|
|
731
|
+
const N = m[j + w];
|
|
732
732
|
g.push(
|
|
733
733
|
/* @__PURE__ */ e.jsx(
|
|
734
734
|
Y,
|
|
@@ -738,7 +738,7 @@ function qe({
|
|
|
738
738
|
maxWidth: N.maxWidth,
|
|
739
739
|
horizontalAlign: N.horizontalAlign,
|
|
740
740
|
size: c,
|
|
741
|
-
columnsTextSize:
|
|
741
|
+
columnsTextSize: R,
|
|
742
742
|
withBorder: f,
|
|
743
743
|
headerAlign: t.headerAlign,
|
|
744
744
|
children: (($ = N.columnRender) == null ? void 0 : $.call(N, u)) || /* @__PURE__ */ e.jsx("span", { title: N.label, children: N.label })
|
|
@@ -759,7 +759,7 @@ function qe({
|
|
|
759
759
|
maxWidth: t.maxWidth,
|
|
760
760
|
horizontalAlign: t.horizontalAlign,
|
|
761
761
|
size: c,
|
|
762
|
-
columnsTextSize:
|
|
762
|
+
columnsTextSize: R,
|
|
763
763
|
withBorder: f,
|
|
764
764
|
headerAlign: t.headerAlign,
|
|
765
765
|
isTopRow: !0,
|
|
@@ -791,7 +791,7 @@ function qe({
|
|
|
791
791
|
}
|
|
792
792
|
)
|
|
793
793
|
] });
|
|
794
|
-
}, [m,
|
|
794
|
+
}, [m, y, c, R, L]);
|
|
795
795
|
return !u || u.length === 0 ? /* @__PURE__ */ e.jsx(
|
|
796
796
|
le,
|
|
797
797
|
{
|
|
@@ -803,14 +803,14 @@ function qe({
|
|
|
803
803
|
) : /* @__PURE__ */ e.jsx(
|
|
804
804
|
je,
|
|
805
805
|
{
|
|
806
|
-
maxHeight:
|
|
807
|
-
withBorderRadius:
|
|
808
|
-
ref:
|
|
806
|
+
maxHeight: W,
|
|
807
|
+
withBorderRadius: S,
|
|
808
|
+
ref: T,
|
|
809
809
|
borderRadius: o,
|
|
810
810
|
children: /* @__PURE__ */ e.jsxs(be, { id: n, ref: C, children: [
|
|
811
811
|
/* @__PURE__ */ e.jsx("thead", { children: O }),
|
|
812
812
|
/* @__PURE__ */ e.jsx("tbody", { style: { width: "100%" }, children: u == null ? void 0 : u.map((a, g, j) => {
|
|
813
|
-
const $ =
|
|
813
|
+
const $ = I(a);
|
|
814
814
|
return /* @__PURE__ */ e.jsx(
|
|
815
815
|
X,
|
|
816
816
|
{
|
|
@@ -818,7 +818,7 @@ function qe({
|
|
|
818
818
|
fit: l,
|
|
819
819
|
size: c,
|
|
820
820
|
withBorder: f,
|
|
821
|
-
isSelected: $ ===
|
|
821
|
+
isSelected: $ === A && p,
|
|
822
822
|
striped: d && g % 2 !== 0,
|
|
823
823
|
borderRadius: o,
|
|
824
824
|
children: m.map((i) => {
|
|
@@ -832,8 +832,8 @@ function qe({
|
|
|
832
832
|
size: c,
|
|
833
833
|
isClickable: U(x),
|
|
834
834
|
onClick: () => {
|
|
835
|
-
x && x(a, i, g), p &&
|
|
836
|
-
|
|
835
|
+
x && x(a, i, g), p && M(
|
|
836
|
+
A === $ ? null : $
|
|
837
837
|
);
|
|
838
838
|
},
|
|
839
839
|
horizontalAlign: i.horizontalAlign,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("./Table.styles-C98MPCK6.cjs"),I=require("react");require("react-dom");const _=require("react-hook-form"),G=require("sbwb-ds"),q=require("./index-D-c93rfC.cjs"),Q=require("./parseDate-w5bp6OXe.cjs"),X=350,Z=({title:n,children:r,endAdornment:u=null,marginBottom:h="16px",customStyles:s={},wrapperCustomStyles:E={},animationContainerCustomStyles:x={},hideAdornmentOnCollapse:c=!1,maxHeight:y="none",height:D="fit-content"})=>{const[j,T]=I.useState(!1),[m,S]=I.useState(!0);I.useEffect(()=>{if(c)if(j){const a=setTimeout(()=>S(!1),X);return()=>clearTimeout(a)}else S(!0)},[j,c]);const d=c&&!m?null:u;return e.jsxRuntimeExports.jsxs(e.Container,{width:"100%",flex:"1",gap:"8px",customStyles:E,children:[e.jsxRuntimeExports.jsx(e.SectionTitle,{title:n,divider:!0,marginBottom:h,collapse:{collapsed:j,setCollapsed:T},endAdornment:d,customStyles:s}),e.jsxRuntimeExports.jsx(e.Container,{gap:"8px",width:"100%",height:D,customStyles:{...x,maxHeight:j?"0":y,transition:`max-height ${X}ms ease-in-out`},children:r})]})};function K({form:n,name:r,id:u=r,label:h,readonly:s=!1,disabled:E=!1,afterCheck:x,width:c="100%",formatter:y,parser:D,flex:j,size:T="Medium",checkColor:m,triggerFormField:S=null,...d}){const{onChangeTrigger:a}=e.useTriggerFormField({form:n,fieldName:r,triggerType:S,debounceTime:0}),w=(W,F)=>{F(W),x==null||x(W),a==null||a()};return e.jsxRuntimeExports.jsx(e.Container,{width:c,flex:j,children:e.jsxRuntimeExports.jsx(_.Controller,{name:r,control:n.control,render:({field:{onChange:W,value:F,onBlur:$},fieldState:{error:C=null}})=>{const p=C==null?void 0:C.message;return p&&console.log("Error on checkbox!",p),e.jsxRuntimeExports.jsx(e.Checkbox,{id:`form-checkbox-${u}`,checked:y?y(F):!!F,name:r,label:h,disabled:E||s,onChange:g=>{w((D==null?void 0:D(g.target.checked,F))??g.target.checked,W),$==null||$()},size:T,checkColor:m,...d})}})})}const z=({form:n,name:r,label:u,placeholder:h,readonly:s=!1,disabled:E=!1,width:x="100%",flex:c,tooltipIsVisible:y,tooltipMaxWidth:D,tooltipPosition:j="top",afterFormChange:T,openToDate:m,range:S=!1,openCalendarOnInputClick:d=!1,...a})=>{let w=h;return!q.valuable(h)&&!E&&(w=s?"Nenhuma data escolhida":"Escolha uma data"),e.jsxRuntimeExports.jsx(e.Container,{width:x,flex:c,children:e.jsxRuntimeExports.jsx(_.Controller,{name:r,control:n.control,render:({field:{value:W,onChange:F,ref:$}})=>{let C;q.valuable(W)&&(S?C=Array.isArray(W)?W.join(" - "):W:C=new Date(q.stringToUtcDate(W.slice(0,10))));const{error:p}=n.getFieldState(r,n.formState);return e.jsxRuntimeExports.jsx(e.Datepicker,{ref:$,idCalendar:`${r}-calendar`,label:u,value:C,size:"Small",readonly:s,errorMessage:p==null?void 0:p.message,disabled:E,placeholder:w,onChangeHandleDate:g=>{var L,O;F(S?(L=g.split)==null?void 0:L.call(g," - ").map(o=>{var f;return((f=Q.parseDate(o))==null?void 0:f.slice(0,10))||null}):((O=Q.parseDate(g))==null?void 0:O.slice(0,10))||null),T==null||T(g)},openToDate:m,selectsRange:S,openCalendarOnInputClick:d,...a})}})})};function v({form:n,name:r,label:u,slots:{field:h},slotsProps:s,triggerFormField:E=null,value:x,bypassControllerOnChange:c=!1,overrideOnBlur:y=!1,isRequired:D=!1,readonly:j=!1,disabled:T=!1,parser:m,debounce:S,beforeChange:d,onChange:a,afterChange:w,beforeBlur:W,onBlur:F,afterBlur:$,onEnter:C}){const{field:{value:p,onChange:g},fieldState:{error:L=null}}=_.useController({name:r,control:n.control}),O=q.valuable(S),{onChangeTrigger:o,onBlurTrigger:f}=e.useTriggerFormField({form:n,fieldName:r,triggerType:E,debounceTime:O?0:500}),R=(l,b)=>{var M,N;const A=((M=l==null?void 0:l.target)==null?void 0:M.value)||((N=l==null?void 0:l.target)==null?void 0:N.checked)||l||void 0,V=q.valuable(m)?m(A):A;d==null||d(V),c||b==null||b(V),a==null||a(l,b),w==null||w(l,b),o==null||o()},k=I.useMemo(()=>{if(!O)return R;let l;return(A,V)=>{clearTimeout(l),l=setTimeout(()=>R(A,V),S)}},[O,S,R]),i=(l,b)=>{var V,M;const A=((V=l==null?void 0:l.target)==null?void 0:V.value)||((M=l==null?void 0:l.target)==null?void 0:M.checked)||l||void 0;!y&&c&&(g==null||g(A)),W==null||W(l,b),F==null||F(l,b),$==null||$(l,b),f==null||f()},t=(l,b)=>{C==null||C(l,b)};L!=null&&L.message&&console.log(`Error on ${h.displayName}!`,L.message);const H=q.valuable(x)?x==null?void 0:x(p):{value:p};return e.jsxRuntimeExports.jsx(e.Container,{...s==null?void 0:s.container,children:e.jsxRuntimeExports.jsx(h,{...s==null?void 0:s.field,...H,label:u,onChange:l=>k==null?void 0:k(l,g),onBlur:l=>i==null?void 0:i(l,g),onEnter:l=>t==null?void 0:t(l,g),errorMessage:L==null?void 0:L.message})})}const B=({form:n,name:r,label:u,options:h,readonly:s=!1,disabled:E=!1,width:x="100%",flex:c,placeholder:y,iconName:D,onSelect:j,hasSelectAll:T=!1,tags:m=!0,sortOptions:S=!1,enableSearch:d=!1,valueAllOption:a,isRequired:w=!1,tooltipProps:W={},infoProps:F={},triggerFormField:$=null,...C})=>{const{onChangeTrigger:p}=e.useTriggerFormField({form:n,fieldName:r,triggerType:$,debounceTime:0});return e.jsxRuntimeExports.jsx(e.Container,{width:x,flex:c,children:e.jsxRuntimeExports.jsx(_.Controller,{name:r,control:n.control,render:({field:{value:g,onChange:L}})=>{const{error:O}=n.getFieldState(r),o=q.valuable(g)?g:[];return e.jsxRuntimeExports.jsx(e.MultiSelect,{label:u,size:"Small",disabled:E||s,onChange:f=>{L(f),j==null||j(f),p==null||p()},values:o,errorMessage:O==null?void 0:O.message,options:h,iconName:D,hasSelectAll:T,tags:m,sortOptions:S,placeholder:y,enableSearch:d,valueAllOption:a,isRequired:w,tooltipProps:{position:"top",...W},infoProps:{tooltipProps:{position:"top",maxWidth:"300px",...F.tooltipProps},...F},...C})}})})},ee=({variant:n="default",form:r,name:u,label:h,options:s,readonly:E=!1,disabled:x=!1,optionsMap:c,width:y="100%",flex:D,placeholder:j,onSelect:T,parser:m,filter:S,tooltipProps:d={},infoProps:a={},maxHeigthMenu:w,isRequired:W=!1,onRemoveSelected:F,triggerFormField:$=null,displayText:C,...p})=>{const{onChangeTrigger:g}=e.useTriggerFormField({form:r,fieldName:u,triggerType:$,debounceTime:0}),L={position:"top",...d},O={...a,tooltipProps:{position:"top",maxWidth:"300px",...a==null?void 0:a.tooltipProps}},o=(R,k)=>{let i=R;m&&(i=m==null?void 0:m(R)),k(i),T==null||T(i),g==null||g()},f=I.useMemo(()=>q.valuable(c)?c:Object.fromEntries(s.map(R=>[R.value,R])),[s,c]);return e.jsxRuntimeExports.jsx(e.Container,{width:y,flex:D,children:e.jsxRuntimeExports.jsx(_.Controller,{name:u,control:r.control,render:({field:{onChange:R,value:k},fieldState:{error:i=null}})=>{let t=f[k];return e.jsxRuntimeExports.jsx(e.Select,{label:h,width:"100%",size:"Small",variant:n,disabled:x,readonly:E,filter:S,errorMessage:i==null?void 0:i.message,placeholder:j,value:t,handleOption:H=>{o(H.value,R)},tooltipProps:L,options:s,maxHeigthMenu:w,infoProps:O,maxHeightMenu:w,isRequired:W,onRemoveSelected:F,displayText:C,...p})}})})},te=n=>{const[r,u]=I.useState(!1),[h,s]=I.useState(n),E=I.useRef(null);return I.useEffect(()=>{s(n)},[n]),{setIsOpen:u,isOpen:r,setOptionsSelect:s,optionsSelect:h,selectContainerRef:E}},se=200,le=({name:n,variant:r="primary",width:u="100%",size:h="Medium",disabled:s=!1,isLoading:E=!1,onClick:x,options:c,label:y,menuSelectProps:D={},iconName:j,optionsIconPosition:T})=>{const{isOpen:m,setIsOpen:S,selectContainerRef:d,optionsSelect:a}=te(c);let w=e.y.colors.backgroundColors.colorBackgroundSnow;s?w=e.y.colors.neutralColors.colorNeutralCloudy:r!=="primary"&&(w=e.y.colors.neutralColors.colorNeutralDark);const W={...D};return e.jsxRuntimeExports.jsxs(e.SelectContainer,{ref:d,width:u,size:h,disabled:s,onBlur:()=>setTimeout(()=>S(!1),se),children:[y&&e.jsxRuntimeExports.jsx(e.Label$3,{children:y}),e.jsxRuntimeExports.jsxs(e.Button$1,{type:"button",size:h,disabled:s,variant:r,isLoading:E,onClick:()=>!E&&S(!m),id:`button-component-${n}`,"data-cy":`button-component-${n}`,children:[E&&e.jsxRuntimeExports.jsx(e.WrapperIcon,{size:h,disabled:s,variant:r,children:e.jsxRuntimeExports.jsx(G.Icon,{iconName:`ProgressActivity${h==="Small"?"Ant":"Sm"}`,color:w,"data-testid":"icon-loading"})}),!E&&e.jsxRuntimeExports.jsx("p",{title:n,children:n}),!E&&(m?e.jsxRuntimeExports.jsx(G.Icon,{iconName:`ExpandLess${h==="Small"?"Ant":"Sm"}`,color:w,"data-testid":"icon-button-less"}):e.jsxRuntimeExports.jsx(G.Icon,{iconName:`ExpandMore${h==="Small"?"Ant":"Sm"}`,color:w,"data-testid":"icon-button-more"}))]}),m&&e.jsxRuntimeExports.jsx(e.MenuSelect,{selectContainerRef:d,value:null,optionsSelect:a,selectOption:x,size:h,inputValue:null,iconPosition:T,iconName:j,...W})]})},ie=({width:n="100%",height:r="fit-content",flex:u,backgroundColor:h="white",options:s=[],heightItems:E="60px",widthItems:x="155px",emptyProps:c={title:"Nenhum dado a ser mostrado",body:null},customWrapperStyles:y={},customItemStyles:D={}})=>{const[j,T]=I.useState(s[0]||null),m=I.useRef(null),S=I.useRef(null);return I.useEffect(()=>{const d=m.current,a=S.current,w=()=>{d&&a&&(a.scrollTop=d.scrollTop)};return d==null||d.addEventListener("scroll",w),()=>{d==null||d.removeEventListener("scroll",w)}},[]),I.useEffect(()=>{T(s[(s==null?void 0:s.length)-1]||null)},[s==null?void 0:s.length]),(s==null?void 0:s.length)===0?e.jsxRuntimeExports.jsx(e.Empty,{title:c.title,body:c.body,flex:"1",mode:"table"}):e.jsxRuntimeExports.jsxs(e.Container,{width:n,height:r,flex:u,backgroundColor:h,direction:"horizontal",customStyles:{border:`1px solid ${e.y.colors.neutralColors.colorNeutralSoft}`,borderRadius:e.y.borders.borderRadius.borderRadiusSm,...y},children:[e.jsxRuntimeExports.jsxs(e.Container$2,{ref:m,widthItems:x,children:[s==null?void 0:s.map((d,a)=>e.jsxRuntimeExports.jsx(e.ContainerItem,{selected:(j==null?void 0:j.key)===d.key,onClick:()=>T(d),withBorderRight:!0,heightItems:E,customStyles:D,children:d.item},a)),e.jsxRuntimeExports.jsx(e.LastSpace,{})]}),e.jsxRuntimeExports.jsx(e.ContainerContent,{children:j&&(j==null?void 0:j.contentItem)})]})};function ne(n){return r=>typeof n=="string"?r[n]:typeof n=="function"?n(r):(console.warn("Please, setup a rowKey for table."),JSON.stringify(r))}function re({id:n,rowKey:r="id",size:u="Small",onRowClick:h,fit:s=!1,maxHeight:E="40rem",columns:x,dataSource:c,columnsTextSize:y=u,emptyProps:D={width:"100%",height:"100%",title:"Nenhum dado a ser mostrado.",mode:"table",borders:!0,backgroundColor:e.y.colors.backgroundColors.colorBackgroundSnow},selectedRow:j=!1,hideHeader:T=!1,withBorder:m=!0,withBorderRadius:S=!0,striped:d=!1,borderRadius:a=e.y.borders.borderRadius.borderRadiusSm}){const w=I.useMemo(()=>ne(r),[r]),[W,F]=I.useState(null),$=I.useRef(null),C=I.useRef(null),[p,g]=I.useState(x);I.useLayoutEffect(()=>{if(!C.current||x.length===0){g(x);return}const o=()=>{var V;const R=((V=C.current)==null?void 0:V.clientWidth)||0;if(R===0)return;let k=0,i=0;const t=[],H=[];x.forEach(M=>{const N=Number(M.flex);M.width?k+=parseInt(M.width,10)||0:M.flex&&N>0?(i+=N,t.push(M)):H.push(M)});const l=R-k,b="80";let A=[...x];if(l>0){if(t.length>0){const M=l/i;A=x.map(N=>{const U=Number(N.flex);if(U&&U>0){const P=parseInt(N.minWidth||b,10),J=U*M,Y=Math.max(J,P);return{...N,width:`${Math.floor(Y)}px`}}return!N.width&&!U?{...N,width:N.minWidth||`${b}px`}:N})}else if(H.length>0){const M=l/H.length;A=x.map(N=>{const U=Number(N.flex);if(!N.width&&!U){const P=parseInt(N.minWidth||b,10),J=Math.max(M,P);return{...N,width:`${Math.floor(J)}px`}}return N})}}else A=x.map(M=>M.width?M:{...M,width:M.minWidth||`${b}px`});g(A)};o();const f=new ResizeObserver(o);return f.observe(C.current),()=>f.disconnect()},[x]),I.useEffect(()=>{const o=f=>{$.current&&!$.current.contains(f.target)&&F(null)};return document.addEventListener("mousedown",o),()=>{document.removeEventListener("mousedown",o)}},[]);const L=I.useMemo(()=>p?p.some(o=>o.mergeHeaderId&&o.mergeHeaderLabel):!1,[p]),O=I.useMemo(()=>{var k,i;if(T||!p||p.length===0)return null;if(!L)return e.jsxRuntimeExports.jsx(e.TableRow,{isHeader:!0,size:u,numRows:1,borderRadius:a,children:p.map(t=>{var H;return e.jsxRuntimeExports.jsx(e.HeaderCell,{width:t.width,minWidth:t.minWidth,maxWidth:t.maxWidth,horizontalAlign:t.horizontalAlign,size:u,columnsTextSize:y,withBorder:m,headerAlign:t.headerAlign,children:((H=t.columnRender)==null?void 0:H.call(t,c))||e.jsxRuntimeExports.jsx("span",{title:t.label,children:t.label})},t.dataIndex)})});const o=[],f=[];let R=0;for(;R<p.length;){const t=p[R];if(t.mergeHeaderId&&t.mergeHeaderLabel){let H=0;const l=t.mergeHeaderId;for(let b=R;b<p.length&&p[b].mergeHeaderId===l;b++)H++;o.push(e.jsxRuntimeExports.jsx(e.HeaderCell,{colSpan:H,horizontalAlign:"center",size:u,columnsTextSize:y,withBorder:m,width:t.width,minWidth:t.minWidth,maxWidth:t.maxWidth,headerAlign:t.headerAlign,isTopRow:!0,children:e.jsxRuntimeExports.jsx("span",{title:t.mergeHeaderLabel,children:t.mergeHeaderLabel})},`${t.mergeHeaderId}-merged`));for(let b=0;b<H;b++){const A=p[R+b];f.push(e.jsxRuntimeExports.jsx(e.HeaderCell,{width:A.width,minWidth:A.minWidth,maxWidth:A.maxWidth,horizontalAlign:A.horizontalAlign,size:u,columnsTextSize:y,withBorder:m,headerAlign:t.headerAlign,children:((k=A.columnRender)==null?void 0:k.call(A,c))||e.jsxRuntimeExports.jsx("span",{title:A.label,children:A.label})},A.dataIndex+"-individual"))}R+=H}else o.push(e.jsxRuntimeExports.jsx(e.HeaderCell,{rowSpan:2,width:t.width,minWidth:t.minWidth,maxWidth:t.maxWidth,horizontalAlign:t.horizontalAlign,size:u,columnsTextSize:y,withBorder:m,headerAlign:t.headerAlign,isTopRow:!0,children:((i=t.columnRender)==null?void 0:i.call(t,c))||e.jsxRuntimeExports.jsx("span",{title:t.label,children:t.label})},t.dataIndex)),R++}return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(e.TableRow,{isHeader:!0,size:u,numRows:2,borderRadius:a,children:o}),f.length>0&&e.jsxRuntimeExports.jsx(e.TableRow,{isHeader:!0,size:u,numRows:2,borderRadius:a,children:f})]})},[p,T,u,y,L]);return!c||c.length===0?e.jsxRuntimeExports.jsx(e.Empty,{backgroundColor:e.y.colors.backgroundColors.colorBackgroundSnow,borders:!0,mode:"table",...D}):e.jsxRuntimeExports.jsx(e.ContainerTable,{maxHeight:E,withBorderRadius:S,ref:C,borderRadius:a,children:e.jsxRuntimeExports.jsxs(e.Table,{id:n,ref:$,children:[e.jsxRuntimeExports.jsx("thead",{children:O}),e.jsxRuntimeExports.jsx("tbody",{style:{width:"100%"},children:c==null?void 0:c.map((o,f,R)=>{const k=w(o);return e.jsxRuntimeExports.jsx(e.TableRow,{isLast:f===R.length-1,fit:s,size:u,withBorder:m,isSelected:k===W&&j,striped:d&&f%2!==0,borderRadius:a,children:p.map(i=>{var t,H,l;return e.jsxRuntimeExports.jsx(e.RowCell,{width:i.width,minWidth:i.minWidth,maxWidth:i.maxWidth,size:u,isClickable:q.valuable(h),onClick:()=>{h&&h(o,i,f),j&&F(W===k?null:k)},horizontalAlign:i.horizontalAlign,verticalAlign:i.verticalAlign,rowPadding:i.rowPadding,withBorder:m,isLast:f===R.length-1,backgroundColor:(t=i.paint)==null?void 0:t.call(i,o[i.dataIndex],o,f,R),children:((H=i.render)==null?void 0:H.call(i,o[i.dataIndex],o,f,R))||e.jsxRuntimeExports.jsx(e.CellText,{title:o[i.dataIndex],style:(l=i.rowCss)==null?void 0:l.call(i,o),children:o[i.dataIndex]})||""},`${k}::${i.dataIndex}`)})},k)})})]})})}exports.CheckboxField=K;exports.CollapseSection=Z;exports.DateField=z;exports.FormFieldView=v;exports.MultiSelectField=B;exports.SelectButton=le;exports.SelectField=ee;exports.TabInfo=ie;exports.Table=re;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as C, a3 as n, a4 as t, a5 as i, a6 as l, b as o, a0 as c, a7 as d, X as h, K as V, a8 as x, a9 as H, aa as L, ab as g, ac as j } from "./Table.styles-
|
|
1
|
+
import { P as C, a3 as n, a4 as t, a5 as i, a6 as l, b as o, a0 as c, a7 as d, X as h, K as V, a8 as x, a9 as H, aa as L, ab as g, ac as j } from "./Table.styles-CR8lsfaa.js";
|
|
2
2
|
import * as s from "react";
|
|
3
3
|
const p = (e) => /* @__PURE__ */ s.createElement("svg", { width: 145, height: 29, viewBox: "0 0 145 29", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ s.createElement("path", { d: "M143.505 15.5289C143.119 15.1091 142.658 14.7441 142.136 14.4397C141.614 14.1353 141.548 13.3879 142.038 13.0056C142.4 12.72 142.725 12.3939 143.008 12.0246C143.878 10.8935 144.321 9.50559 144.321 7.91716C144.321 5.55832 143.536 3.81552 141.987 2.7407C140.491 1.70772 138.175 1.17969 135.111 1.17969H127.93V27.8627H136.058C137.785 27.8627 139.334 27.5828 140.662 27.0317C142.022 26.4705 143.099 25.6019 143.857 24.4391C144.616 23.2893 145.001 21.8134 145.001 20.0706C145.001 18.1359 144.498 16.6037 143.509 15.5203V15.5289H143.505ZM135.108 3.95547C137.349 3.95547 138.981 4.29162 139.956 4.95094C140.892 5.58573 141.345 6.62882 141.345 8.13789C141.345 9.64697 140.921 10.6929 140.041 11.423C139.147 12.1659 137.636 12.5396 135.546 12.5396H130.835V3.94681H135.108V3.95547ZM135.884 25.1302H130.834V15.2764H135.578C137.814 15.2764 139.47 15.6689 140.501 16.4306C141.503 17.1736 141.988 18.3321 141.988 19.9681C141.988 23.4393 139.993 25.1258 135.884 25.1258V25.1302Z", fill: "white" }), /* @__PURE__ */ s.createElement("path", { d: "M126.354 1.2708V4.42025H113.883L111.624 4.4289C108.3 4.30339 106.668 4.97569 106.334 6.3405C105.911 8.03713 106.221 10.3209 106.556 12.7375C107.159 17.1479 107.841 22.1151 104.382 25.7306C103.064 27.1084 101.384 27.8701 99.6571 27.8701C98.0375 27.8701 96.499 27.2252 95.1955 26.0105C92.9365 23.894 92.7437 18.7781 92.5407 13.3622V13.2828C92.4508 11.0538 92.2492 5.83122 91.5663 5.18056C91.1328 4.95116 90.5354 5.29309 90.531 5.29742C89.4479 5.98415 89.2696 11.3063 89.1666 14.4832C88.9926 19.5803 88.823 24.3643 86.5262 26.1735C84.5398 27.7388 81.4441 27.8788 79.1605 26.5053C74.0349 23.4222 74.5438 15.6749 74.9106 10.0122L74.9208 9.86216C75.0382 8.05877 75.1557 2.91982 74.973 2.05997C74.9309 1.85943 74.8932 1.64014 74.8932 1.64014C74.8845 1.58387 74.87 1.5377 74.8599 1.50452C74.8512 1.47711 74.8411 1.44393 74.8222 1.39776C74.8034 1.36025 74.7845 1.33717 74.7657 1.29966C74.7091 1.21021 74.667 1.16404 74.625 1.13086H78.1455L78.1977 1.40209C78.4804 2.72939 78.3485 7.96211 78.202 10.2286C77.8874 15.0502 77.4582 21.6621 80.87 23.7122C81.9763 24.3759 83.5669 24.334 84.4847 23.6098C85.5852 22.7456 85.765 17.5316 85.8738 14.4154V14.3504C86.0623 8.884 86.2218 4.16056 88.7824 2.53029C89.3464 2.1422 91.2763 1.32418 93.154 2.31966C95.3565 3.47815 95.5972 7.0431 95.8364 13.2381C95.9727 16.9098 96.1844 22.4383 97.4604 23.6343C98.8871 24.9703 100.623 24.914 101.993 23.4843C104.369 20.9985 103.824 17.0324 103.292 13.2006C102.921 10.4623 102.563 7.8741 103.133 5.56143C103.881 2.54328 106.766 1.10345 111.716 1.27225H126.358L126.354 1.2708Z", fill: "white" }), /* @__PURE__ */ s.createElement("path", { d: "M125.696 25.3138V27.7347C125.696 27.8097 125.635 27.8703 125.56 27.8703H111.601C111.526 27.8703 111.465 27.8097 111.465 27.7347V8.29703C111.465 7.69831 111.634 7.10102 112.02 6.64368C112.5 6.07381 113.179 5.76074 113.902 5.76074H114.372V13.3393C114.372 13.4143 114.433 13.4749 114.508 13.4749H124.915C124.99 13.4749 125.051 13.5355 125.051 13.6105V15.9939C125.051 16.0689 124.99 16.1295 124.915 16.1295H114.508C114.433 16.1295 114.372 16.1901 114.372 16.2651V25.0542C114.372 25.1292 114.433 25.1898 114.508 25.1898H125.558C125.634 25.1898 125.695 25.2504 125.695 25.3254V25.3167L125.696 25.3138Z", fill: "white" }), /* @__PURE__ */ s.createElement("path", { d: "M19.9601 16.6532C20.427 17.6357 20.6604 18.7048 20.6604 19.8604C20.6604 21.4676 20.266 22.9218 19.4787 24.2232C18.7044 25.5115 17.5372 26.5344 15.9756 27.2904C14.414 28.0334 12.4653 28.4056 10.1294 28.4056C8.51414 28.4056 6.79305 28.1531 4.96465 27.6482C3.13626 27.1302 1.48186 26.393 0 25.4365C0.0797476 24.5333 0.361039 23.6504 0.840975 22.7877C1.32091 21.9105 1.86899 21.2079 2.48233 20.6755C3.60314 21.3392 4.87765 21.9437 6.30586 22.4876C7.73407 23.0185 9.16228 23.2839 10.5905 23.2839C11.7519 23.2839 12.5856 23.0055 13.0931 22.4472C13.6006 21.8888 13.8543 21.2916 13.8543 20.6539C13.8543 20.2283 13.7137 19.7435 13.4338 19.1996C13.154 18.6413 12.4522 18.1306 11.3314 17.666L6.50595 15.6736C4.85155 14.9826 3.4828 14.0607 2.40258 12.9051C1.32091 11.7495 0.781527 10.2231 0.781527 8.32301C0.781527 6.66245 1.21506 5.2082 2.08214 3.96025C2.94921 2.7123 4.11788 1.7428 5.58523 1.05174C7.06709 0.352022 8.71569 0 10.531 0C12.3464 0 14.2009 0.245261 15.8567 0.737226C17.5256 1.22919 18.8799 1.74713 19.921 2.29103C19.8673 3.20715 19.6469 4.09009 19.2598 4.93985C18.8857 5.77662 18.3854 6.48067 17.7576 7.05198C16.7426 6.57444 15.5551 6.13586 14.1936 5.73767C12.8321 5.3265 11.6113 5.12019 10.5296 5.12019C9.38122 5.12019 8.56054 5.37844 8.06756 5.89637C7.58762 6.4143 7.34693 6.93945 7.34693 7.47037C7.34693 8.00129 7.51367 8.42689 7.84716 8.82508C8.1937 9.22327 8.80849 9.60847 9.68861 9.98069L14.6141 11.9933C15.9089 12.5242 17.0036 13.1878 17.8968 13.9857C18.8045 14.7691 19.4918 15.6592 19.9586 16.6547L19.9601 16.6532ZM42.6461 0.493408C42.2155 0.493408 41.7007 0.507835 41.1034 0.535247C40.519 0.562658 39.9492 0.631908 39.3939 0.742997V17.6905C39.3939 19.5098 39.0662 20.8847 38.4108 21.8138C37.7554 22.7299 36.6332 23.1887 35.0469 23.1887C33.4606 23.1887 32.3587 22.7299 31.7033 21.8138C31.0479 20.8847 30.7202 19.5098 30.7202 17.6905V4.22282C30.7202 2.80175 30.3983 1.77887 29.756 1.15561C29.1137 0.517934 28.1886 0.199094 26.9822 0.199094H24.6609L24.3796 0.458783V17.63C24.3796 19.8748 24.8001 21.7936 25.6425 23.3864C26.4849 24.9662 27.7145 26.1751 29.3312 27.0119C30.9479 27.8487 32.9126 28.2671 35.2238 28.2671C37.535 28.2671 39.5128 27.8487 41.1164 27.0119C42.7331 26.1751 43.9627 24.9662 44.8051 23.3864C45.6475 21.7922 46.068 19.8734 46.068 17.63V0.741555C45.5402 0.630466 44.9356 0.561215 44.2541 0.533804C43.5871 0.506392 43.0521 0.491965 42.649 0.491965L42.6461 0.493408ZM71.899 19.6209C71.899 21.4806 71.4858 23.0069 70.6578 24.203C69.8444 25.3845 68.6888 26.2617 67.1939 26.833C65.699 27.4043 63.93 27.69 61.8885 27.69C60.3399 27.69 58.7319 27.6698 57.063 27.6308C55.4086 27.6049 53.7267 27.5717 52.0186 27.5313L51.7388 27.2529V0.438585L52.0186 0.160141C53.6208 0.119745 55.2013 0.0865628 56.7629 0.060594C58.3376 0.020198 59.8325 0.00144271 61.2476 0.00144271C63.1166 0.00144271 64.7507 0.261131 66.1528 0.777622C67.5549 1.28257 68.6482 2.07174 69.4355 3.148C70.2228 4.20984 70.6172 5.57753 70.6172 7.25108C70.6172 8.22058 70.391 9.12949 69.9372 9.98069C69.4964 10.8304 68.9092 11.5345 68.1755 12.0928C67.8449 12.3453 67.4955 12.5516 67.1315 12.7074C67.6985 12.8935 68.2393 13.172 68.7569 13.5471C69.7052 14.2237 70.465 15.1009 71.0392 16.1771C71.6133 17.239 71.9004 18.3888 71.9004 19.6238L71.899 19.6209ZM58.078 10.8232H60.9214C61.816 10.8232 62.5076 10.666 62.9948 10.3515C63.482 10.024 63.8242 9.61713 64.0214 9.13382C64.2186 8.64907 64.3172 8.15133 64.3172 7.64061C64.3172 7.12989 64.2186 6.61917 64.0214 6.1474C63.8242 5.67563 63.4747 5.28899 62.9745 4.98746C62.4873 4.67295 61.8029 4.51569 60.9199 4.51569H59.6164C59.0901 4.50271 58.5768 4.48972 58.0766 4.47674V10.8247L58.078 10.8232ZM65.5047 19.3958C65.5047 18.8115 65.3843 18.22 65.1436 17.6227C64.9174 17.0125 64.5028 16.5003 63.9025 16.0891C63.3152 15.678 62.4873 15.4717 61.4202 15.4717H58.0766V23.2609C58.7305 23.2479 59.3511 23.2407 59.9383 23.2407C60.5255 23.2277 61.033 23.2205 61.4593 23.2205C62.554 23.2205 63.3877 23.0214 63.9619 22.6232C64.5492 22.212 64.9493 21.7128 65.1625 21.1285C65.3887 20.5313 65.5032 19.9527 65.5032 19.3958H65.5047Z", fill: "white" })), m = ({ labelTab: e, appIcon: a }) => /* @__PURE__ */ C.jsxs(n, { children: [
|
|
4
4
|
/* @__PURE__ */ C.jsx(t, { children: /* @__PURE__ */ C.jsx(p, {}) }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const C=require("./Table.styles-
|
|
1
|
+
"use strict";const C=require("./Table.styles-C98MPCK6.cjs"),i=require("react");function o(e){if(e&&typeof e=="object"&&"default"in e)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const n=o(i),l=e=>n.createElement("svg",{width:145,height:29,viewBox:"0 0 145 29",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("path",{d:"M143.505 15.5289C143.119 15.1091 142.658 14.7441 142.136 14.4397C141.614 14.1353 141.548 13.3879 142.038 13.0056C142.4 12.72 142.725 12.3939 143.008 12.0246C143.878 10.8935 144.321 9.50559 144.321 7.91716C144.321 5.55832 143.536 3.81552 141.987 2.7407C140.491 1.70772 138.175 1.17969 135.111 1.17969H127.93V27.8627H136.058C137.785 27.8627 139.334 27.5828 140.662 27.0317C142.022 26.4705 143.099 25.6019 143.857 24.4391C144.616 23.2893 145.001 21.8134 145.001 20.0706C145.001 18.1359 144.498 16.6037 143.509 15.5203V15.5289H143.505ZM135.108 3.95547C137.349 3.95547 138.981 4.29162 139.956 4.95094C140.892 5.58573 141.345 6.62882 141.345 8.13789C141.345 9.64697 140.921 10.6929 140.041 11.423C139.147 12.1659 137.636 12.5396 135.546 12.5396H130.835V3.94681H135.108V3.95547ZM135.884 25.1302H130.834V15.2764H135.578C137.814 15.2764 139.47 15.6689 140.501 16.4306C141.503 17.1736 141.988 18.3321 141.988 19.9681C141.988 23.4393 139.993 25.1258 135.884 25.1258V25.1302Z",fill:"white"}),n.createElement("path",{d:"M126.354 1.2708V4.42025H113.883L111.624 4.4289C108.3 4.30339 106.668 4.97569 106.334 6.3405C105.911 8.03713 106.221 10.3209 106.556 12.7375C107.159 17.1479 107.841 22.1151 104.382 25.7306C103.064 27.1084 101.384 27.8701 99.6571 27.8701C98.0375 27.8701 96.499 27.2252 95.1955 26.0105C92.9365 23.894 92.7437 18.7781 92.5407 13.3622V13.2828C92.4508 11.0538 92.2492 5.83122 91.5663 5.18056C91.1328 4.95116 90.5354 5.29309 90.531 5.29742C89.4479 5.98415 89.2696 11.3063 89.1666 14.4832C88.9926 19.5803 88.823 24.3643 86.5262 26.1735C84.5398 27.7388 81.4441 27.8788 79.1605 26.5053C74.0349 23.4222 74.5438 15.6749 74.9106 10.0122L74.9208 9.86216C75.0382 8.05877 75.1557 2.91982 74.973 2.05997C74.9309 1.85943 74.8932 1.64014 74.8932 1.64014C74.8845 1.58387 74.87 1.5377 74.8599 1.50452C74.8512 1.47711 74.8411 1.44393 74.8222 1.39776C74.8034 1.36025 74.7845 1.33717 74.7657 1.29966C74.7091 1.21021 74.667 1.16404 74.625 1.13086H78.1455L78.1977 1.40209C78.4804 2.72939 78.3485 7.96211 78.202 10.2286C77.8874 15.0502 77.4582 21.6621 80.87 23.7122C81.9763 24.3759 83.5669 24.334 84.4847 23.6098C85.5852 22.7456 85.765 17.5316 85.8738 14.4154V14.3504C86.0623 8.884 86.2218 4.16056 88.7824 2.53029C89.3464 2.1422 91.2763 1.32418 93.154 2.31966C95.3565 3.47815 95.5972 7.0431 95.8364 13.2381C95.9727 16.9098 96.1844 22.4383 97.4604 23.6343C98.8871 24.9703 100.623 24.914 101.993 23.4843C104.369 20.9985 103.824 17.0324 103.292 13.2006C102.921 10.4623 102.563 7.8741 103.133 5.56143C103.881 2.54328 106.766 1.10345 111.716 1.27225H126.358L126.354 1.2708Z",fill:"white"}),n.createElement("path",{d:"M125.696 25.3138V27.7347C125.696 27.8097 125.635 27.8703 125.56 27.8703H111.601C111.526 27.8703 111.465 27.8097 111.465 27.7347V8.29703C111.465 7.69831 111.634 7.10102 112.02 6.64368C112.5 6.07381 113.179 5.76074 113.902 5.76074H114.372V13.3393C114.372 13.4143 114.433 13.4749 114.508 13.4749H124.915C124.99 13.4749 125.051 13.5355 125.051 13.6105V15.9939C125.051 16.0689 124.99 16.1295 124.915 16.1295H114.508C114.433 16.1295 114.372 16.1901 114.372 16.2651V25.0542C114.372 25.1292 114.433 25.1898 114.508 25.1898H125.558C125.634 25.1898 125.695 25.2504 125.695 25.3254V25.3167L125.696 25.3138Z",fill:"white"}),n.createElement("path",{d:"M19.9601 16.6532C20.427 17.6357 20.6604 18.7048 20.6604 19.8604C20.6604 21.4676 20.266 22.9218 19.4787 24.2232C18.7044 25.5115 17.5372 26.5344 15.9756 27.2904C14.414 28.0334 12.4653 28.4056 10.1294 28.4056C8.51414 28.4056 6.79305 28.1531 4.96465 27.6482C3.13626 27.1302 1.48186 26.393 0 25.4365C0.0797476 24.5333 0.361039 23.6504 0.840975 22.7877C1.32091 21.9105 1.86899 21.2079 2.48233 20.6755C3.60314 21.3392 4.87765 21.9437 6.30586 22.4876C7.73407 23.0185 9.16228 23.2839 10.5905 23.2839C11.7519 23.2839 12.5856 23.0055 13.0931 22.4472C13.6006 21.8888 13.8543 21.2916 13.8543 20.6539C13.8543 20.2283 13.7137 19.7435 13.4338 19.1996C13.154 18.6413 12.4522 18.1306 11.3314 17.666L6.50595 15.6736C4.85155 14.9826 3.4828 14.0607 2.40258 12.9051C1.32091 11.7495 0.781527 10.2231 0.781527 8.32301C0.781527 6.66245 1.21506 5.2082 2.08214 3.96025C2.94921 2.7123 4.11788 1.7428 5.58523 1.05174C7.06709 0.352022 8.71569 0 10.531 0C12.3464 0 14.2009 0.245261 15.8567 0.737226C17.5256 1.22919 18.8799 1.74713 19.921 2.29103C19.8673 3.20715 19.6469 4.09009 19.2598 4.93985C18.8857 5.77662 18.3854 6.48067 17.7576 7.05198C16.7426 6.57444 15.5551 6.13586 14.1936 5.73767C12.8321 5.3265 11.6113 5.12019 10.5296 5.12019C9.38122 5.12019 8.56054 5.37844 8.06756 5.89637C7.58762 6.4143 7.34693 6.93945 7.34693 7.47037C7.34693 8.00129 7.51367 8.42689 7.84716 8.82508C8.1937 9.22327 8.80849 9.60847 9.68861 9.98069L14.6141 11.9933C15.9089 12.5242 17.0036 13.1878 17.8968 13.9857C18.8045 14.7691 19.4918 15.6592 19.9586 16.6547L19.9601 16.6532ZM42.6461 0.493408C42.2155 0.493408 41.7007 0.507835 41.1034 0.535247C40.519 0.562658 39.9492 0.631908 39.3939 0.742997V17.6905C39.3939 19.5098 39.0662 20.8847 38.4108 21.8138C37.7554 22.7299 36.6332 23.1887 35.0469 23.1887C33.4606 23.1887 32.3587 22.7299 31.7033 21.8138C31.0479 20.8847 30.7202 19.5098 30.7202 17.6905V4.22282C30.7202 2.80175 30.3983 1.77887 29.756 1.15561C29.1137 0.517934 28.1886 0.199094 26.9822 0.199094H24.6609L24.3796 0.458783V17.63C24.3796 19.8748 24.8001 21.7936 25.6425 23.3864C26.4849 24.9662 27.7145 26.1751 29.3312 27.0119C30.9479 27.8487 32.9126 28.2671 35.2238 28.2671C37.535 28.2671 39.5128 27.8487 41.1164 27.0119C42.7331 26.1751 43.9627 24.9662 44.8051 23.3864C45.6475 21.7922 46.068 19.8734 46.068 17.63V0.741555C45.5402 0.630466 44.9356 0.561215 44.2541 0.533804C43.5871 0.506392 43.0521 0.491965 42.649 0.491965L42.6461 0.493408ZM71.899 19.6209C71.899 21.4806 71.4858 23.0069 70.6578 24.203C69.8444 25.3845 68.6888 26.2617 67.1939 26.833C65.699 27.4043 63.93 27.69 61.8885 27.69C60.3399 27.69 58.7319 27.6698 57.063 27.6308C55.4086 27.6049 53.7267 27.5717 52.0186 27.5313L51.7388 27.2529V0.438585L52.0186 0.160141C53.6208 0.119745 55.2013 0.0865628 56.7629 0.060594C58.3376 0.020198 59.8325 0.00144271 61.2476 0.00144271C63.1166 0.00144271 64.7507 0.261131 66.1528 0.777622C67.5549 1.28257 68.6482 2.07174 69.4355 3.148C70.2228 4.20984 70.6172 5.57753 70.6172 7.25108C70.6172 8.22058 70.391 9.12949 69.9372 9.98069C69.4964 10.8304 68.9092 11.5345 68.1755 12.0928C67.8449 12.3453 67.4955 12.5516 67.1315 12.7074C67.6985 12.8935 68.2393 13.172 68.7569 13.5471C69.7052 14.2237 70.465 15.1009 71.0392 16.1771C71.6133 17.239 71.9004 18.3888 71.9004 19.6238L71.899 19.6209ZM58.078 10.8232H60.9214C61.816 10.8232 62.5076 10.666 62.9948 10.3515C63.482 10.024 63.8242 9.61713 64.0214 9.13382C64.2186 8.64907 64.3172 8.15133 64.3172 7.64061C64.3172 7.12989 64.2186 6.61917 64.0214 6.1474C63.8242 5.67563 63.4747 5.28899 62.9745 4.98746C62.4873 4.67295 61.8029 4.51569 60.9199 4.51569H59.6164C59.0901 4.50271 58.5768 4.48972 58.0766 4.47674V10.8247L58.078 10.8232ZM65.5047 19.3958C65.5047 18.8115 65.3843 18.22 65.1436 17.6227C64.9174 17.0125 64.5028 16.5003 63.9025 16.0891C63.3152 15.678 62.4873 15.4717 61.4202 15.4717H58.0766V23.2609C58.7305 23.2479 59.3511 23.2407 59.9383 23.2407C60.5255 23.2277 61.033 23.2205 61.4593 23.2205C62.554 23.2205 63.3877 23.0214 63.9619 22.6232C64.5492 22.212 64.9493 21.7128 65.1625 21.1285C65.3887 20.5313 65.5032 19.9527 65.5032 19.3958H65.5047Z",fill:"white"})),a=({labelTab:e,appIcon:t})=>C.jsxRuntimeExports.jsxs(C.ContainerDevNav,{children:[C.jsxRuntimeExports.jsx(C.DevBrandLogo,{children:C.jsxRuntimeExports.jsx(l,{})}),C.jsxRuntimeExports.jsx(C.DevNavOptions,{children:C.jsxRuntimeExports.jsxs(C.DevNavOption,{children:[C.jsxRuntimeExports.jsxs(C.Container,{direction:"horizontal",verticalAlign:"center",gap:"4px",children:[t,C.jsxRuntimeExports.jsx("span",{children:e})]}),C.jsxRuntimeExports.jsx(C.Close_default,{size:16})]})})]}),x=({message:e})=>C.jsxRuntimeExports.jsxs(C.ErrorMessage,{children:[C.jsxRuntimeExports.jsx(C.InfoFill_default,{color:C.y.colors.feedbackColors.colorFeedbackError}),e]}),c=({width:e,text:t,fontSize:r})=>C.jsxRuntimeExports.jsxs(C.Container$1,{width:e,children:[C.jsxRuntimeExports.jsx(C.loadingContainer,{width:e,children:C.jsxRuntimeExports.jsx(C.loadingLine,{"data-testid":"loading-line",className:"loading-line"})}),t&&C.jsxRuntimeExports.jsx(C.Text,{fontSize:r,children:t})]}),d=({text:e,color:t})=>C.jsxRuntimeExports.jsx(C.Title$1,{color:t,children:e});exports.DevHeader=a;exports.ErrorMessage=x;exports.LoadingBar=c;exports.Title=d;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../Table.styles-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../Table.styles-C98MPCK6.cjs"),r=require("../../Title.view-dbuUShPb.cjs");exports.Badge=e.Badge;exports.Button=e.Button;exports.Checkbox=e.Checkbox;exports.Container=e.Container;exports.Datepicker=e.Datepicker;exports.Label=e.Label;exports.LibraryCard=e.LibraryCard;exports.Radio=e.Radio;exports.Required=e.Required;exports.Spacer=e.Spacer;exports.Switch=e.Switch;exports.Tag=e.x$;exports.Tooltip=e.Tooltip;exports.DevHeader=r.DevHeader;exports.ErrorMessage=r.ErrorMessage;exports.LoadingBar=r.LoadingBar;exports.Title=r.Title;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as e, a as r, C as o, b as i, D as t, L as d, c, R as p, d as L, S as T, e as b, x as g, T as n } from "../../Table.styles-
|
|
2
|
-
import { D as B, E as C, L as D, T as l } from "../../Title.view-
|
|
1
|
+
import { B as e, a as r, C as o, b as i, D as t, L as d, c, R as p, d as L, S as T, e as b, x as g, T as n } from "../../Table.styles-CR8lsfaa.js";
|
|
2
|
+
import { D as B, E as C, L as D, T as l } from "../../Title.view-BdibiY7Y.js";
|
|
3
3
|
export {
|
|
4
4
|
e as Badge,
|
|
5
5
|
r as Button,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Table.styles-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Table.styles-C98MPCK6.cjs"),i=require("../Title.view-dbuUShPb.cjs"),l=require("../RequiredLabel.view-nxkII9jI.cjs"),t=require("../Table.view-BRTxocAL.cjs");exports.ActionButton=e.ActionButton;exports.AutoComplete=e.AutoComplete;exports.AutoCompleteField=e.AutoCompleteField;exports.Badge=e.Badge;exports.Button=e.Button;exports.Checkbox=e.Checkbox;exports.Confirm=e.ConfirmModal;exports.ConfirmButton=e.ConfirmButton;exports.ConfirmModal=e.ConfirmModal;exports.Container=e.Container;exports.Datepicker=e.Datepicker;exports.Empty=e.Empty;exports.Frame=e.FrameView;exports.FrameView=e.FrameView;exports.Info=e.Info;exports.Input=e.Input;exports.Label=e.Label;exports.LibraryCard=e.LibraryCard;exports.ListMultiSelect=e.ListMultiSelect;exports.Loading=e.Loading;exports.MenuMultiSelect=e.MenuMultiSelect;exports.MenuSelect=e.MenuSelect;exports.Modal=e.Modal;exports.MultiInput=e.MultiInput;exports.MultiNumberField=e.MultiNumberField;exports.MultiSelect=e.MultiSelect;exports.NumberField=e.NumberField;exports.Radio=e.Radio;exports.RadioField=e.RadioField;exports.Required=e.Required;exports.Section=e.Section;exports.SectionTitle=e.SectionTitle;exports.SegmentedButton=e.kXe;exports.Select=e.Select;exports.Spacer=e.Spacer;exports.Switch=e.Switch;exports.SwitchField=e.SwitchField;exports.Tag=e.x$;exports.TextField=e.TextField;exports.Textarea=e.Textarea;exports.TextareaField=e.TextareaField;exports.Tooltip=e.Tooltip;exports.showConfirm=e.showConfirm;exports.showModal=e.showModal;exports.DevHeader=i.DevHeader;exports.ErrorMessage=i.ErrorMessage;exports.LoadingBar=i.LoadingBar;exports.Title=i.Title;exports.AlertInline=l.AlertInline;exports.LabelField=l.LabelField;exports.RequiredLabelView=l.RequiredLabelView;exports.showAlert=l.showAlert;exports.CheckboxField=t.CheckboxField;exports.CollapseSection=t.CollapseSection;exports.DateField=t.DateField;exports.FormFieldView=t.FormFieldView;exports.MultiSelectField=t.MultiSelectField;exports.SelectButton=t.SelectButton;exports.SelectField=t.SelectField;exports.TabInfo=t.TabInfo;exports.Table=t.Table;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { A as s, r as t, t as i, B as o, a as l, C as r, g as d, f as n, g as u, b as c, D as F, E as m, F as S, F as p, I as M, h as C, L as b, c as T, n as f, i as x, m as L, G as w, M as g, k as h, u as B, l as A, N as D, R as I, v as R, d as k, H as E, o as q, p as y, J as N, S as V, e as v, w as H, x as j, z, q as G, y as J, T as K, s as O, j as P } from "../Table.styles-
|
|
2
|
-
import { D as U, E as W, L as X, T as Y } from "../Title.view-
|
|
3
|
-
import { A as _, L as $, R as aa, s as ea } from "../RequiredLabel.view-
|
|
4
|
-
import { a as ta, C as ia, D as oa, F as la, M as ra, b as da, S as na, T as ua, c as ca } from "../Table.view-
|
|
1
|
+
import { A as s, r as t, t as i, B as o, a as l, C as r, g as d, f as n, g as u, b as c, D as F, E as m, F as S, F as p, I as M, h as C, L as b, c as T, n as f, i as x, m as L, G as w, M as g, k as h, u as B, l as A, N as D, R as I, v as R, d as k, H as E, o as q, p as y, J as N, S as V, e as v, w as H, x as j, z, q as G, y as J, T as K, s as O, j as P } from "../Table.styles-CR8lsfaa.js";
|
|
2
|
+
import { D as U, E as W, L as X, T as Y } from "../Title.view-BdibiY7Y.js";
|
|
3
|
+
import { A as _, L as $, R as aa, s as ea } from "../RequiredLabel.view-_H-iAMCy.js";
|
|
4
|
+
import { a as ta, C as ia, D as oa, F as la, M as ra, b as da, S as na, T as ua, c as ca } from "../Table.view-98eZB0OI.js";
|
|
5
5
|
export {
|
|
6
6
|
s as ActionButton,
|
|
7
7
|
_ as AlertInline,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../Table.styles-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../Table.styles-C98MPCK6.cjs"),t=require("../../RequiredLabel.view-nxkII9jI.cjs");exports.ActionButton=e.ActionButton;exports.Confirm=e.ConfirmModal;exports.ConfirmButton=e.ConfirmButton;exports.ConfirmModal=e.ConfirmModal;exports.Empty=e.Empty;exports.Frame=e.FrameView;exports.FrameView=e.FrameView;exports.Info=e.Info;exports.Input=e.Input;exports.ListMultiSelect=e.ListMultiSelect;exports.Loading=e.Loading;exports.MenuMultiSelect=e.MenuMultiSelect;exports.Modal=e.Modal;exports.MultiInput=e.MultiInput;exports.MultiSelect=e.MultiSelect;exports.SectionTitle=e.SectionTitle;exports.SegmentedButton=e.kXe;exports.Textarea=e.Textarea;exports.showConfirm=e.showConfirm;exports.showModal=e.showModal;exports.AlertInline=t.AlertInline;exports.LabelField=t.LabelField;exports.RequiredLabelView=t.RequiredLabelView;exports.showAlert=t.showAlert;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as e, g as t, f as o, g as i, E as l, F as n, F as r, I as m, h as u, n as M, i as f, m as d, M as p, k as c, l as w, o as A, p as F, q as I, s as L, j as S } from "../../Table.styles-
|
|
2
|
-
import { A as h, L as C, R as x, s as B } from "../../RequiredLabel.view-
|
|
1
|
+
import { A as e, g as t, f as o, g as i, E as l, F as n, F as r, I as m, h as u, n as M, i as f, m as d, M as p, k as c, l as w, o as A, p as F, q as I, s as L, j as S } from "../../Table.styles-CR8lsfaa.js";
|
|
2
|
+
import { A as h, L as C, R as x, s as B } from "../../RequiredLabel.view-_H-iAMCy.js";
|
|
3
3
|
export {
|
|
4
4
|
e as ActionButton,
|
|
5
5
|
h as AlertInline,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FormFieldBaseProps } from './types';
|
|
2
|
-
export interface CheckboxFieldProps<
|
|
2
|
+
export interface CheckboxFieldProps<FormType = unknown> extends FormFieldBaseProps<FormType> {
|
|
3
3
|
id?: string;
|
|
4
4
|
label?: string;
|
|
5
5
|
readonly?: boolean;
|
|
@@ -2,7 +2,7 @@ import { TooltipProps } from '../../atoms';
|
|
|
2
2
|
import { InfoViewProps } from '../../molecules';
|
|
3
3
|
import { SelectOption } from '../../../types/selectOption';
|
|
4
4
|
import { FormFieldBaseProps } from './types';
|
|
5
|
-
export interface SelectFieldProps extends FormFieldBaseProps {
|
|
5
|
+
export interface SelectFieldProps<T extends Record<string, any> = Record<string, any>> extends FormFieldBaseProps<T> {
|
|
6
6
|
variant?: 'default' | 'table';
|
|
7
7
|
label?: string;
|
|
8
8
|
options: SelectOption[];
|
|
@@ -25,4 +25,4 @@ export interface SelectFieldProps extends FormFieldBaseProps {
|
|
|
25
25
|
infoProps?: InfoViewProps;
|
|
26
26
|
displayText?: string;
|
|
27
27
|
}
|
|
28
|
-
export declare const SelectField: ({ variant, form, name, label, options, readonly, disabled, optionsMap: informedOptionsMap, width, flex, placeholder, onSelect, parser, filter, tooltipProps, infoProps, maxHeigthMenu, isRequired, onRemoveSelected, triggerFormField, displayText, ...props }: SelectFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export declare const SelectField: <T extends Record<string, any> = Record<string, any>>({ variant, form, name, label, options, readonly, disabled, optionsMap: informedOptionsMap, width, flex, placeholder, onSelect, parser, filter, tooltipProps, infoProps, maxHeigthMenu, isRequired, onRemoveSelected, triggerFormField, displayText, ...props }: SelectFieldProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FormFieldBaseProps } from './types';
|
|
2
|
-
export interface TextareaFieldProps extends FormFieldBaseProps {
|
|
2
|
+
export interface TextareaFieldProps<T extends Record<string, any> = Record<string, any>> extends FormFieldBaseProps<T> {
|
|
3
3
|
label?: string;
|
|
4
4
|
readonly?: boolean;
|
|
5
5
|
disabled?: boolean;
|
|
@@ -15,6 +15,6 @@ export interface TextareaFieldProps extends FormFieldBaseProps {
|
|
|
15
15
|
maxHeight?: string;
|
|
16
16
|
}
|
|
17
17
|
export declare const TextareaField: {
|
|
18
|
-
({ form, name, label, readonly, disabled, width, height, flex, placeholder, charactersCounter, maxlength, resize, triggerFormField, minHeight, maxHeight, ...props }: TextareaFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
<T extends Record<string, any> = Record<string, any>>({ form, name, label, readonly, disabled, width, height, flex, placeholder, charactersCounter, maxlength, resize, triggerFormField, minHeight, maxHeight, ...props }: TextareaFieldProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
19
19
|
displayName: string;
|
|
20
20
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export type FormType<T extends
|
|
3
|
-
export interface FormFieldBaseProps<T extends
|
|
1
|
+
import { Path, UseFormReturn } from 'react-hook-form';
|
|
2
|
+
export type FormType<T extends Record<string, any> = Record<string, any>> = UseFormReturn<T>;
|
|
3
|
+
export interface FormFieldBaseProps<T extends Record<string, any> = Record<string, any>> {
|
|
4
4
|
form: FormType<T>;
|
|
5
5
|
name: Path<T>;
|
|
6
6
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../Table.styles-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../Table.styles-C98MPCK6.cjs"),l=require("../../Table.view-BRTxocAL.cjs");exports.AutoComplete=e.AutoComplete;exports.AutoCompleteField=e.AutoCompleteField;exports.MenuSelect=e.MenuSelect;exports.MultiNumberField=e.MultiNumberField;exports.NumberField=e.NumberField;exports.RadioField=e.RadioField;exports.Section=e.Section;exports.Select=e.Select;exports.SwitchField=e.SwitchField;exports.TextField=e.TextField;exports.TextareaField=e.TextareaField;exports.CheckboxField=l.CheckboxField;exports.CollapseSection=l.CollapseSection;exports.DateField=l.DateField;exports.FormFieldView=l.FormFieldView;exports.MultiSelectField=l.MultiSelectField;exports.SelectButton=l.SelectButton;exports.SelectField=l.SelectField;exports.TabInfo=l.TabInfo;exports.Table=l.Table;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as l, t, G as s, u as i, N as o, v as F, H as d, J as c, w as r, z as u, y as S } from "../../Table.styles-
|
|
2
|
-
import { a as b, C as n, D as p, F as x, M as C, b as T, S as M, T as f, c as w } from "../../Table.view-
|
|
1
|
+
import { r as l, t, G as s, u as i, N as o, v as F, H as d, J as c, w as r, z as u, y as S } from "../../Table.styles-CR8lsfaa.js";
|
|
2
|
+
import { a as b, C as n, D as p, F as x, M as C, b as T, S as M, T as f, c as w } from "../../Table.view-98eZB0OI.js";
|
|
3
3
|
export {
|
|
4
4
|
l as AutoComplete,
|
|
5
5
|
t as AutoCompleteField,
|
package/dist/index.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./Table.styles-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./Table.styles-C98MPCK6.cjs"),l=require("./Title.view-dbuUShPb.cjs"),a=require("./RequiredLabel.view-nxkII9jI.cjs"),i=require("./Table.view-BRTxocAL.cjs"),t=require("./index-D-c93rfC.cjs"),r=require("./hash-BcdkiN5J.cjs"),o=require("./parseDate-w5bp6OXe.cjs");exports.ActionButton=e.ActionButton;exports.AutoComplete=e.AutoComplete;exports.AutoCompleteField=e.AutoCompleteField;exports.Badge=e.Badge;exports.Button=e.Button;exports.Checkbox=e.Checkbox;exports.Confirm=e.ConfirmModal;exports.ConfirmButton=e.ConfirmButton;exports.ConfirmModal=e.ConfirmModal;exports.Container=e.Container;exports.Datepicker=e.Datepicker;exports.Empty=e.Empty;exports.Frame=e.FrameView;exports.FrameView=e.FrameView;exports.IconSize=e.IconSize;exports.Info=e.Info;exports.Input=e.Input;exports.Label=e.Label;exports.LibraryCard=e.LibraryCard;exports.ListMultiSelect=e.ListMultiSelect;exports.Loading=e.Loading;exports.MenuMultiSelect=e.MenuMultiSelect;exports.MenuSelect=e.MenuSelect;exports.Modal=e.Modal;exports.MultiInput=e.MultiInput;exports.MultiNumberField=e.MultiNumberField;exports.MultiSelect=e.MultiSelect;exports.NumberField=e.NumberField;exports.Radio=e.Radio;exports.RadioField=e.RadioField;exports.Required=e.Required;exports.Section=e.Section;exports.SectionTitle=e.SectionTitle;exports.SegmentedButton=e.kXe;exports.Select=e.Select;exports.Spacer=e.Spacer;exports.Switch=e.Switch;exports.SwitchField=e.SwitchField;exports.Tag=e.x$;exports.TextField=e.TextField;exports.Textarea=e.Textarea;exports.TextareaField=e.TextareaField;exports.Tooltip=e.Tooltip;exports.sg=e.y;exports.showConfirm=e.showConfirm;exports.showModal=e.showModal;exports.DevHeader=l.DevHeader;exports.ErrorMessage=l.ErrorMessage;exports.LoadingBar=l.LoadingBar;exports.Title=l.Title;exports.AlertInline=a.AlertInline;exports.LabelField=a.LabelField;exports.RequiredLabelView=a.RequiredLabelView;exports.showAlert=a.showAlert;exports.CheckboxField=i.CheckboxField;exports.CollapseSection=i.CollapseSection;exports.DateField=i.DateField;exports.FormFieldView=i.FormFieldView;exports.MultiSelectField=i.MultiSelectField;exports.SelectButton=i.SelectButton;exports.SelectField=i.SelectField;exports.TabInfo=i.TabInfo;exports.Table=i.Table;exports.applyOpacityToHex=t.applyOpacityToHex;exports.capitalizeAllFirstLetters=t.capitalizeAllFirstLetters;exports.capitalizeFirstLetter=t.capitalizeFirstLetter;exports.convertHexToRGB=t.convertHexToRGB;exports.dom=t.dom;exports.formatNumber=t.formatNumber;exports.parseNumberField=t.parseNumberField;exports.parseScientificMaybe=t.parseScientificMaybe;exports.resetStyles=t.resetStyles;exports.stringToUtcDate=t.stringToUtcDate;exports.valuable=t.valuable;exports.getLabelText=r.getLabelText;exports.multiplyRemValues=r.multiplyRemValues;exports.stableStringify=r.stableStringify;exports.parseDate=o.parseDate;
|
package/dist/index.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { A as s, r as t, t as i, B as l, a as o, C as r, g as n, f as d, g as c, b as m, D as p, E as u, F, F as S, O as b, I as f, h as x, L as T, c as M, n as g, i as C, m as L, G as w, M as y, k as B, u as h, l as A, N as D, R, v as I, d as v, H as N, o as k, p as z, J as E, S as H, e as V, w as q, x as G, z as O, q as j, y as J, T as K, K as U, s as P, j as Q } from "./Table.styles-
|
|
2
|
-
import { D as X, E as Y, L as Z, T as _ } from "./Title.view-
|
|
3
|
-
import { A as aa, L as ea, R as sa, s as ta } from "./RequiredLabel.view-
|
|
4
|
-
import { a as la, C as oa, D as ra, F as na, M as da, b as ca, S as ma, T as pa, c as ua } from "./Table.view-
|
|
1
|
+
import { A as s, r as t, t as i, B as l, a as o, C as r, g as n, f as d, g as c, b as m, D as p, E as u, F, F as S, O as b, I as f, h as x, L as T, c as M, n as g, i as C, m as L, G as w, M as y, k as B, u as h, l as A, N as D, R, v as I, d as v, H as N, o as k, p as z, J as E, S as H, e as V, w as q, x as G, z as O, q as j, y as J, T as K, K as U, s as P, j as Q } from "./Table.styles-CR8lsfaa.js";
|
|
2
|
+
import { D as X, E as Y, L as Z, T as _ } from "./Title.view-BdibiY7Y.js";
|
|
3
|
+
import { A as aa, L as ea, R as sa, s as ta } from "./RequiredLabel.view-_H-iAMCy.js";
|
|
4
|
+
import { a as la, C as oa, D as ra, F as na, M as da, b as ca, S as ma, T as pa, c as ua } from "./Table.view-98eZB0OI.js";
|
|
5
5
|
import { g as Sa, b as ba, c as fa, e as xa, d as Ta, f as Ma, p as ga, a as Ca, r as La, s as wa, v as ya } from "./index-D6fddFQP.js";
|
|
6
6
|
import { g as ha, m as Aa, s as Da } from "./hash-BJHL2fP_.js";
|
|
7
7
|
import { p as Ia } from "./parseDate-ihxA2lUF.js";
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("./Table.styles-C-2_39kp.cjs"),W=require("react");require("react-dom");const _=require("react-hook-form"),G=require("sbwb-ds"),q=require("./index-D-c93rfC.cjs"),Q=require("./parseDate-w5bp6OXe.cjs"),X=350,Z=({title:n,children:r,endAdornment:u=null,marginBottom:h="16px",customStyles:s={},wrapperCustomStyles:b={},animationContainerCustomStyles:x={},hideAdornmentOnCollapse:c=!1,maxHeight:I="none",height:D="fit-content"})=>{const[j,y]=W.useState(!1),[m,w]=W.useState(!0);W.useEffect(()=>{if(c)if(j){const a=setTimeout(()=>w(!1),X);return()=>clearTimeout(a)}else w(!0)},[j,c]);const d=c&&!m?null:u;return e.jsxRuntimeExports.jsxs(e.Container,{width:"100%",flex:"1",gap:"8px",customStyles:b,children:[e.jsxRuntimeExports.jsx(e.SectionTitle,{title:n,divider:!0,marginBottom:h,collapse:{collapsed:j,setCollapsed:y},endAdornment:d,customStyles:s}),e.jsxRuntimeExports.jsx(e.Container,{gap:"8px",width:"100%",height:D,customStyles:{...x,maxHeight:j?"0":I,transition:`max-height ${X}ms ease-in-out`},children:r})]})};function K({form:n,name:r,id:u=r,label:h,readonly:s=!1,disabled:b=!1,afterCheck:x,width:c="100%",formatter:I,parser:D,flex:j,size:y="Medium",checkColor:m,triggerFormField:w=null,...d}){const{onChangeTrigger:a}=e.useTriggerFormField({form:n,fieldName:r,triggerType:w,debounceTime:0}),E=(S,C)=>{C(S),x==null||x(S),a==null||a()};return e.jsxRuntimeExports.jsx(e.Container,{width:c,flex:j,children:e.jsxRuntimeExports.jsx(_.Controller,{name:r,control:n.control,render:({field:{onChange:S,value:C},fieldState:{error:$=null}})=>{const F=$==null?void 0:$.message;return F&&console.log("Error on checkbox!",F),e.jsxRuntimeExports.jsx(e.Checkbox,{id:`form-checkbox-${u}`,checked:I?I(C):!!C,name:r,label:h,disabled:b||s,onChange:p=>{E((D==null?void 0:D(p.target.checked,C))??p.target.checked,S)},size:y,checkColor:m,...d})}})})}const z=({form:n,name:r,label:u,placeholder:h,readonly:s=!1,disabled:b=!1,width:x="100%",flex:c,tooltipIsVisible:I,tooltipMaxWidth:D,tooltipPosition:j="top",afterFormChange:y,openToDate:m,range:w=!1,openCalendarOnInputClick:d=!1,...a})=>{let E=h;return!q.valuable(h)&&!b&&(E=s?"Nenhuma data escolhida":"Escolha uma data"),e.jsxRuntimeExports.jsx(e.Container,{width:x,flex:c,children:e.jsxRuntimeExports.jsx(_.Controller,{name:r,control:n.control,render:({field:{value:S,onChange:C,ref:$}})=>{let F;q.valuable(S)&&(w?F=Array.isArray(S)?S.join(" - "):S:F=new Date(q.stringToUtcDate(S.slice(0,10))));const{error:p}=n.getFieldState(r,n.formState);return e.jsxRuntimeExports.jsx(e.Datepicker,{ref:$,idCalendar:`${r}-calendar`,label:u,value:F,size:"Small",readonly:s,errorMessage:p==null?void 0:p.message,disabled:b,placeholder:E,onChangeHandleDate:T=>{var L,O;C(w?(L=T.split)==null?void 0:L.call(T," - ").map(o=>{var f;return((f=Q.parseDate(o))==null?void 0:f.slice(0,10))||null}):((O=Q.parseDate(T))==null?void 0:O.slice(0,10))||null),y==null||y(T)},openToDate:m,selectsRange:w,openCalendarOnInputClick:d,...a})}})})};function B({form:n,name:r,label:u,slots:{field:h},slotsProps:s,triggerFormField:b=null,value:x,bypassControllerOnChange:c=!1,overrideOnBlur:I=!1,isRequired:D=!1,readonly:j=!1,disabled:y=!1,parser:m,debounce:w,beforeChange:d,onChange:a,afterChange:E,beforeBlur:S,onBlur:C,afterBlur:$,onEnter:F}){const{field:{value:p,onChange:T},fieldState:{error:L=null}}=_.useController({name:r,control:n.control}),O=q.valuable(w),{onChangeTrigger:o,onBlurTrigger:f}=e.useTriggerFormField({form:n,fieldName:r,triggerType:b,debounceTime:O?0:500}),R=(l,g)=>{var M,N;const A=((M=l==null?void 0:l.target)==null?void 0:M.value)||((N=l==null?void 0:l.target)==null?void 0:N.checked)||l||void 0,V=q.valuable(m)?m(A):A;d==null||d(V),c||g==null||g(V),a==null||a(l,g),E==null||E(l,g),o==null||o()},k=W.useMemo(()=>{if(!O)return R;let l;return(A,V)=>{clearTimeout(l),l=setTimeout(()=>R(A,V),w)}},[O,w,R]),i=(l,g)=>{var V,M;const A=((V=l==null?void 0:l.target)==null?void 0:V.value)||((M=l==null?void 0:l.target)==null?void 0:M.checked)||l||void 0;!I&&c&&(T==null||T(A)),S==null||S(l,g),C==null||C(l,g),$==null||$(l,g),f==null||f()},t=(l,g)=>{F==null||F(l,g)};L!=null&&L.message&&console.log(`Error on ${h.displayName}!`,L.message);const H=q.valuable(x)?x==null?void 0:x(p):{value:p};return e.jsxRuntimeExports.jsx(e.Container,{...s==null?void 0:s.container,children:e.jsxRuntimeExports.jsx(h,{...s==null?void 0:s.field,...H,label:u,onChange:l=>k==null?void 0:k(l,T),onBlur:l=>i==null?void 0:i(l,T),onEnter:l=>t==null?void 0:t(l,T),errorMessage:L==null?void 0:L.message})})}const v=({form:n,name:r,label:u,options:h,readonly:s=!1,disabled:b=!1,width:x="100%",flex:c,placeholder:I,iconName:D,onSelect:j,hasSelectAll:y=!1,tags:m=!0,sortOptions:w=!1,enableSearch:d=!1,valueAllOption:a,isRequired:E=!1,tooltipProps:S={},infoProps:C={},triggerFormField:$=null,...F})=>{const{onChangeTrigger:p}=e.useTriggerFormField({form:n,fieldName:r,triggerType:$,debounceTime:0});return e.jsxRuntimeExports.jsx(e.Container,{width:x,flex:c,children:e.jsxRuntimeExports.jsx(_.Controller,{name:r,control:n.control,render:({field:{value:T,onChange:L}})=>{const{error:O}=n.getFieldState(r),o=q.valuable(T)?T:[];return e.jsxRuntimeExports.jsx(e.MultiSelect,{label:u,size:"Small",disabled:b||s,onChange:f=>{L(f),j==null||j(f),p==null||p()},values:o,errorMessage:O==null?void 0:O.message,options:h,iconName:D,hasSelectAll:y,tags:m,sortOptions:w,placeholder:I,enableSearch:d,valueAllOption:a,isRequired:E,tooltipProps:{position:"top",...S},infoProps:{tooltipProps:{position:"top",maxWidth:"300px",...C.tooltipProps},...C},...F})}})})},ee=({variant:n="default",form:r,name:u,label:h,options:s,readonly:b=!1,disabled:x=!1,optionsMap:c,width:I="100%",flex:D,placeholder:j,onSelect:y,parser:m,filter:w,tooltipProps:d={},infoProps:a={},maxHeigthMenu:E,isRequired:S=!1,onRemoveSelected:C,triggerFormField:$=null,displayText:F,...p})=>{const{onChangeTrigger:T}=e.useTriggerFormField({form:r,fieldName:u,triggerType:$,debounceTime:0}),L={position:"top",...d},O={...a,tooltipProps:{position:"top",maxWidth:"300px",...a==null?void 0:a.tooltipProps}},o=(R,k)=>{let i=R;m&&(i=m==null?void 0:m(R)),k(i),y==null||y(i),T==null||T()},f=W.useMemo(()=>q.valuable(c)?c:Object.fromEntries(s.map(R=>[R.value,R])),[s,c]);return e.jsxRuntimeExports.jsx(e.Container,{width:I,flex:D,children:e.jsxRuntimeExports.jsx(_.Controller,{name:u,control:r.control,render:({field:{onChange:R,value:k},fieldState:{error:i=null}})=>{let t=f[k];return e.jsxRuntimeExports.jsx(e.Select,{label:h,width:"100%",size:"Small",variant:n,disabled:x,readonly:b,filter:w,errorMessage:i==null?void 0:i.message,placeholder:j,value:t,handleOption:H=>{o(H.value,R)},tooltipProps:L,options:s,maxHeigthMenu:E,infoProps:O,maxHeightMenu:E,isRequired:S,onRemoveSelected:C,displayText:F,...p})}})})},te=n=>{const[r,u]=W.useState(!1),[h,s]=W.useState(n),b=W.useRef(null);return W.useEffect(()=>{s(n)},[n]),{setIsOpen:u,isOpen:r,setOptionsSelect:s,optionsSelect:h,selectContainerRef:b}},se=200,le=({name:n,variant:r="primary",width:u="100%",size:h="Medium",disabled:s=!1,isLoading:b=!1,onClick:x,options:c,label:I,menuSelectProps:D={},iconName:j,optionsIconPosition:y})=>{const{isOpen:m,setIsOpen:w,selectContainerRef:d,optionsSelect:a}=te(c);let E=e.y.colors.backgroundColors.colorBackgroundSnow;s?E=e.y.colors.neutralColors.colorNeutralCloudy:r!=="primary"&&(E=e.y.colors.neutralColors.colorNeutralDark);const S={...D};return e.jsxRuntimeExports.jsxs(e.SelectContainer,{ref:d,width:u,size:h,disabled:s,onBlur:()=>setTimeout(()=>w(!1),se),children:[I&&e.jsxRuntimeExports.jsx(e.Label$3,{children:I}),e.jsxRuntimeExports.jsxs(e.Button$1,{type:"button",size:h,disabled:s,variant:r,isLoading:b,onClick:()=>!b&&w(!m),id:`button-component-${n}`,"data-cy":`button-component-${n}`,children:[b&&e.jsxRuntimeExports.jsx(e.WrapperIcon,{size:h,disabled:s,variant:r,children:e.jsxRuntimeExports.jsx(G.Icon,{iconName:`ProgressActivity${h==="Small"?"Ant":"Sm"}`,color:E,"data-testid":"icon-loading"})}),!b&&e.jsxRuntimeExports.jsx("p",{title:n,children:n}),!b&&(m?e.jsxRuntimeExports.jsx(G.Icon,{iconName:`ExpandLess${h==="Small"?"Ant":"Sm"}`,color:E,"data-testid":"icon-button-less"}):e.jsxRuntimeExports.jsx(G.Icon,{iconName:`ExpandMore${h==="Small"?"Ant":"Sm"}`,color:E,"data-testid":"icon-button-more"}))]}),m&&e.jsxRuntimeExports.jsx(e.MenuSelect,{selectContainerRef:d,value:null,optionsSelect:a,selectOption:x,size:h,inputValue:null,iconPosition:y,iconName:j,...S})]})},ie=({width:n="100%",height:r="fit-content",flex:u,backgroundColor:h="white",options:s=[],heightItems:b="60px",widthItems:x="155px",emptyProps:c={title:"Nenhum dado a ser mostrado",body:null},customWrapperStyles:I={},customItemStyles:D={}})=>{const[j,y]=W.useState(s[0]||null),m=W.useRef(null),w=W.useRef(null);return W.useEffect(()=>{const d=m.current,a=w.current,E=()=>{d&&a&&(a.scrollTop=d.scrollTop)};return d==null||d.addEventListener("scroll",E),()=>{d==null||d.removeEventListener("scroll",E)}},[]),W.useEffect(()=>{y(s[(s==null?void 0:s.length)-1]||null)},[s==null?void 0:s.length]),(s==null?void 0:s.length)===0?e.jsxRuntimeExports.jsx(e.Empty,{title:c.title,body:c.body,flex:"1",mode:"table"}):e.jsxRuntimeExports.jsxs(e.Container,{width:n,height:r,flex:u,backgroundColor:h,direction:"horizontal",customStyles:{border:`1px solid ${e.y.colors.neutralColors.colorNeutralSoft}`,borderRadius:e.y.borders.borderRadius.borderRadiusSm,...I},children:[e.jsxRuntimeExports.jsxs(e.Container$2,{ref:m,widthItems:x,children:[s==null?void 0:s.map((d,a)=>e.jsxRuntimeExports.jsx(e.ContainerItem,{selected:(j==null?void 0:j.key)===d.key,onClick:()=>y(d),withBorderRight:!0,heightItems:b,customStyles:D,children:d.item},a)),e.jsxRuntimeExports.jsx(e.LastSpace,{})]}),e.jsxRuntimeExports.jsx(e.ContainerContent,{children:j&&(j==null?void 0:j.contentItem)})]})};function ne(n){return r=>typeof n=="string"?r[n]:typeof n=="function"?n(r):(console.warn("Please, setup a rowKey for table."),JSON.stringify(r))}function re({id:n,rowKey:r="id",size:u="Small",onRowClick:h,fit:s=!1,maxHeight:b="40rem",columns:x,dataSource:c,columnsTextSize:I=u,emptyProps:D={width:"100%",height:"100%",title:"Nenhum dado a ser mostrado.",mode:"table",borders:!0,backgroundColor:e.y.colors.backgroundColors.colorBackgroundSnow},selectedRow:j=!1,hideHeader:y=!1,withBorder:m=!0,withBorderRadius:w=!0,striped:d=!1,borderRadius:a=e.y.borders.borderRadius.borderRadiusSm}){const E=W.useMemo(()=>ne(r),[r]),[S,C]=W.useState(null),$=W.useRef(null),F=W.useRef(null),[p,T]=W.useState(x);W.useLayoutEffect(()=>{if(!F.current||x.length===0){T(x);return}const o=()=>{var V;const R=((V=F.current)==null?void 0:V.clientWidth)||0;if(R===0)return;let k=0,i=0;const t=[],H=[];x.forEach(M=>{const N=Number(M.flex);M.width?k+=parseInt(M.width,10)||0:M.flex&&N>0?(i+=N,t.push(M)):H.push(M)});const l=R-k,g="80";let A=[...x];if(l>0){if(t.length>0){const M=l/i;A=x.map(N=>{const U=Number(N.flex);if(U&&U>0){const P=parseInt(N.minWidth||g,10),J=U*M,Y=Math.max(J,P);return{...N,width:`${Math.floor(Y)}px`}}return!N.width&&!U?{...N,width:N.minWidth||`${g}px`}:N})}else if(H.length>0){const M=l/H.length;A=x.map(N=>{const U=Number(N.flex);if(!N.width&&!U){const P=parseInt(N.minWidth||g,10),J=Math.max(M,P);return{...N,width:`${Math.floor(J)}px`}}return N})}}else A=x.map(M=>M.width?M:{...M,width:M.minWidth||`${g}px`});T(A)};o();const f=new ResizeObserver(o);return f.observe(F.current),()=>f.disconnect()},[x]),W.useEffect(()=>{const o=f=>{$.current&&!$.current.contains(f.target)&&C(null)};return document.addEventListener("mousedown",o),()=>{document.removeEventListener("mousedown",o)}},[]);const L=W.useMemo(()=>p?p.some(o=>o.mergeHeaderId&&o.mergeHeaderLabel):!1,[p]),O=W.useMemo(()=>{var k,i;if(y||!p||p.length===0)return null;if(!L)return e.jsxRuntimeExports.jsx(e.TableRow,{isHeader:!0,size:u,numRows:1,borderRadius:a,children:p.map(t=>{var H;return e.jsxRuntimeExports.jsx(e.HeaderCell,{width:t.width,minWidth:t.minWidth,maxWidth:t.maxWidth,horizontalAlign:t.horizontalAlign,size:u,columnsTextSize:I,withBorder:m,headerAlign:t.headerAlign,children:((H=t.columnRender)==null?void 0:H.call(t,c))||e.jsxRuntimeExports.jsx("span",{title:t.label,children:t.label})},t.dataIndex)})});const o=[],f=[];let R=0;for(;R<p.length;){const t=p[R];if(t.mergeHeaderId&&t.mergeHeaderLabel){let H=0;const l=t.mergeHeaderId;for(let g=R;g<p.length&&p[g].mergeHeaderId===l;g++)H++;o.push(e.jsxRuntimeExports.jsx(e.HeaderCell,{colSpan:H,horizontalAlign:"center",size:u,columnsTextSize:I,withBorder:m,width:t.width,minWidth:t.minWidth,maxWidth:t.maxWidth,headerAlign:t.headerAlign,isTopRow:!0,children:e.jsxRuntimeExports.jsx("span",{title:t.mergeHeaderLabel,children:t.mergeHeaderLabel})},`${t.mergeHeaderId}-merged`));for(let g=0;g<H;g++){const A=p[R+g];f.push(e.jsxRuntimeExports.jsx(e.HeaderCell,{width:A.width,minWidth:A.minWidth,maxWidth:A.maxWidth,horizontalAlign:A.horizontalAlign,size:u,columnsTextSize:I,withBorder:m,headerAlign:t.headerAlign,children:((k=A.columnRender)==null?void 0:k.call(A,c))||e.jsxRuntimeExports.jsx("span",{title:A.label,children:A.label})},A.dataIndex+"-individual"))}R+=H}else o.push(e.jsxRuntimeExports.jsx(e.HeaderCell,{rowSpan:2,width:t.width,minWidth:t.minWidth,maxWidth:t.maxWidth,horizontalAlign:t.horizontalAlign,size:u,columnsTextSize:I,withBorder:m,headerAlign:t.headerAlign,isTopRow:!0,children:((i=t.columnRender)==null?void 0:i.call(t,c))||e.jsxRuntimeExports.jsx("span",{title:t.label,children:t.label})},t.dataIndex)),R++}return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(e.TableRow,{isHeader:!0,size:u,numRows:2,borderRadius:a,children:o}),f.length>0&&e.jsxRuntimeExports.jsx(e.TableRow,{isHeader:!0,size:u,numRows:2,borderRadius:a,children:f})]})},[p,y,u,I,L]);return!c||c.length===0?e.jsxRuntimeExports.jsx(e.Empty,{backgroundColor:e.y.colors.backgroundColors.colorBackgroundSnow,borders:!0,mode:"table",...D}):e.jsxRuntimeExports.jsx(e.ContainerTable,{maxHeight:b,withBorderRadius:w,ref:F,borderRadius:a,children:e.jsxRuntimeExports.jsxs(e.Table,{id:n,ref:$,children:[e.jsxRuntimeExports.jsx("thead",{children:O}),e.jsxRuntimeExports.jsx("tbody",{style:{width:"100%"},children:c==null?void 0:c.map((o,f,R)=>{const k=E(o);return e.jsxRuntimeExports.jsx(e.TableRow,{isLast:f===R.length-1,fit:s,size:u,withBorder:m,isSelected:k===S&&j,striped:d&&f%2!==0,borderRadius:a,children:p.map(i=>{var t,H,l;return e.jsxRuntimeExports.jsx(e.RowCell,{width:i.width,minWidth:i.minWidth,maxWidth:i.maxWidth,size:u,isClickable:q.valuable(h),onClick:()=>{h&&h(o,i,f),j&&C(S===k?null:k)},horizontalAlign:i.horizontalAlign,verticalAlign:i.verticalAlign,rowPadding:i.rowPadding,withBorder:m,isLast:f===R.length-1,backgroundColor:(t=i.paint)==null?void 0:t.call(i,o[i.dataIndex],o,f,R),children:((H=i.render)==null?void 0:H.call(i,o[i.dataIndex],o,f,R))||e.jsxRuntimeExports.jsx(e.CellText,{title:o[i.dataIndex],style:(l=i.rowCss)==null?void 0:l.call(i,o),children:o[i.dataIndex]})||""},`${k}::${i.dataIndex}`)})},k)})})]})})}exports.CheckboxField=K;exports.CollapseSection=Z;exports.DateField=z;exports.FormFieldView=B;exports.MultiSelectField=v;exports.SelectButton=le;exports.SelectField=ee;exports.TabInfo=ie;exports.Table=re;
|