@ufal-lccv/gpsub-ds 0.2.47 → 0.2.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{GenericAGGridTable-CizvYJ68.js → GenericAGGridTable-17IhgzCP.js} +16873 -16857
- package/dist/{GenericAGGridTable-DovNLp8U.cjs → GenericAGGridTable-D3Zq9BKB.cjs} +1301 -1301
- package/dist/RequiredLabel.view-CjUar9Xl.cjs +1 -0
- package/dist/{RequiredLabel.view-Dok2td06.js → RequiredLabel.view-DgeqyB7x.js} +56 -48
- package/dist/{Table.view-C2YVnS0p.js → Table.view-DWBklDlL.js} +261 -263
- package/dist/Table.view-MlcEvng9.cjs +1 -0
- package/dist/{Title.view-HRriFthI.cjs → Title.view-B7SvYLpi.cjs} +1 -1
- package/dist/{Title.view-C-MUN12v.js → Title.view-CoWuvoYM.js} +1 -1
- package/dist/components/atoms/index.cjs.js +1 -1
- package/dist/components/atoms/index.es.js +8 -8
- package/dist/components/index.cjs.js +1 -1
- package/dist/components/index.es.js +4 -4
- package/dist/components/molecules/Alert/showAlert.d.ts +1 -1
- package/dist/components/molecules/index.cjs.js +1 -1
- package/dist/components/molecules/index.es.js +2 -2
- package/dist/components/organisms/Autocomplete/Autocomplete.view.d.ts +2 -2
- package/dist/components/organisms/MenuSelect/MenuSelect.styles.d.ts +1 -0
- package/dist/components/organisms/MenuSelect/MenuSelect.view.d.ts +2 -3
- package/dist/components/organisms/SelectButton/SelectButton.view.d.ts +1 -1
- 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 +2 -2
- package/dist/RequiredLabel.view-DVy2yxXH.cjs +0 -1
- package/dist/Table.view-D0oH2-to.cjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("./GenericAGGridTable-D3Zq9BKB.cjs"),b=require("./index-CPP6SuZS.cjs"),m=require("react");require("sbwb-ds");let u=[];const p=[],F=r=>(p.push(r),()=>{const o=p.indexOf(r);o>=0&&p.splice(o,1)}),R=()=>p.forEach(r=>r()),I=r=>{u=[r,...u],R()},A=r=>{u=u.filter(o=>o.instanceId!==r),R()},y=()=>u,d={subscribe:F,add:I,remove:A,getAlerts:y},w=()=>{const[r,o]=m.useState(d.getAlerts());return m.useEffect(()=>d.subscribe(()=>o([...d.getAlerts()])),[]),e.jsxRuntimeExports.jsx(e.AlertStackContainer,{children:r.map(({instanceId:s,props:t,destroy:n})=>e.jsxRuntimeExports.jsx(e.AlertView,{...t,destroy:n},s))})};let g=!1;const S=({id:r,type:o,title:s,description:t,durationInMilliseconds:n=8e3,dataToCopy:l,offset:a={x:0,y:0}})=>{const c=r+Date.now()+Math.random(),x=()=>d.remove(c);if(d.add({instanceId:c,props:{id:r,type:o,title:s,description:t,durationInMilliseconds:o==="error"?void 0:n,dataToCopy:l,offset:a},destroy:x}),!g){g=!0;const j=b.dom.portal.add("alert-stack");e.clientExports.createRoot(j).render(e.jsxRuntimeExports.jsx(w,{}))}},v=({width:r="100%",height:o="fit-content",type:s,variant:t="small",title:n,message:l,margin:a,open:c=!0,onClose:x,canClose:j=!0})=>{var h,E;const[C,k]=m.useState(c),i={info:{backgroundColor:"#D5EBFD",borderColor:e.y.colors.feedbackColors.colorFeedbackInfo,icon:e.jsxRuntimeExports.jsx(e.InfoFill_default,{color:e.y.colors.feedbackColors.colorFeedbackInfo,height:"24px",width:"24px"})},success:{backgroundColor:"#DAF9DB",borderColor:e.y.colors.feedbackColors.colorFeedbackSuccess,icon:e.jsxRuntimeExports.jsx(e.CheckCircleFill_default,{color:e.y.colors.feedbackColors.colorFeedbackSuccess,height:"24px",width:"24px"})},warning:{backgroundColor:"#FEEECF",borderColor:e.y.colors.feedbackColors.colorFeedbackWarning},error:{backgroundColor:"#FFE1E1",borderColor:e.y.colors.feedbackColors.colorFeedbackError,icon:e.jsxRuntimeExports.jsx(e.ErrorFill_default,{color:e.y.colors.feedbackColors.colorFeedbackError,height:"24px",width:"24px"})}};function f(){k(!1),x==null||x()}return e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:C?e.jsxRuntimeExports.jsxs(e.Container,{width:r,height:o,direction:"horizontal",verticalAlign:n?"top":"center",gap:e.y.spacings.spacingInline.spacingInlineAnt,padding:t=="small"?`${e.y.spacings.spacingStack.spacingStackXs} ${e.y.spacings.spacingInline.spacingInlineAnt}`:e.y.spacings.spacingInline.spacingInlineSm,backgroundColor:(h=i==null?void 0:i[s])==null?void 0:h.backgroundColor,customStyles:{border:`1px solid ${(E=i==null?void 0:i[s])==null?void 0:E.borderColor}`,borderRadius:e.y.borders.borderRadius.borderRadiusSm,margin:a,position:"relative"},children:[s==="warning"?e.jsxRuntimeExports.jsx(e.ContainerWarning,{children:e.jsxRuntimeExports.jsx(e.WarningFill_default,{width:"24px",height:"24px"})}):e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:i==null?void 0:i[s].icon}),e.jsxRuntimeExports.jsxs(e.Container,{width:"100%",flex:"1",height:"100%",verticalAlign:"center",children:[b.valuable(n)&&e.jsxRuntimeExports.jsx(e.Title$1,{children:n}),b.valuable(l)&&e.jsxRuntimeExports.jsx(e.Message,{children:l})]}),j&&e.jsxRuntimeExports.jsx(e.Container,{children:e.jsxRuntimeExports.jsx(e.Close_default,{color:e.y.colors.neutralColors.colorNeutralCloudy,cursor:"pointer",onClick:f,height:"20px",width:"20px"})})]}):e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{})})},q=({label:r,labelRender:o,infoProps:s={},withInfo:t=!0,flex:n,width:l="100%",isRequired:a=!1})=>{const c={tooltipProps:{position:"top",...s==null?void 0:s.tooltipProps,size:"Small"}};return e.jsxRuntimeExports.jsxs(e.Container,{width:l,direction:"horizontal",gap:"4px",flex:n,children:[o??e.jsxRuntimeExports.jsxs(e.Label$1,{children:[r," ",a?e.jsxRuntimeExports.jsx(e.Required,{}):null]}),t&&e.jsxRuntimeExports.jsx(e.Info,{...c})]})},$=({width:r="100%",flex:o,label:s="Obrigatório",margin:t="0 0 16px 0"})=>e.jsxRuntimeExports.jsx(e.Container,{width:r,flex:o,customStyles:{margin:t},children:e.jsxRuntimeExports.jsx(e.Label$2,{children:`* ${s}`})});exports.AlertInline=v;exports.LabelField=q;exports.RequiredLabelView=$;exports.showAlert=S;
|
|
@@ -1,45 +1,53 @@
|
|
|
1
|
-
import { a0 as
|
|
1
|
+
import { a0 as r, ad as S, ae as w, af as v, ag as R, _ as a, ah as _, a7 as D, c as u, ai as L, aj as O, ak as $, al as z, a5 as y, am as M, e as W, I as q, an as B } from "./GenericAGGridTable-17IhgzCP.js";
|
|
2
2
|
import { d as V, v as j } from "./index-YF_5f0O1.js";
|
|
3
3
|
import { useState as C, useEffect as N } from "react";
|
|
4
4
|
import "sbwb-ds";
|
|
5
5
|
let b = [];
|
|
6
|
-
const h = [], T = (
|
|
7
|
-
const o = h.indexOf(
|
|
6
|
+
const h = [], T = (e) => (h.push(e), () => {
|
|
7
|
+
const o = h.indexOf(e);
|
|
8
8
|
o >= 0 && h.splice(o, 1);
|
|
9
|
-
}), F = () => h.forEach((
|
|
10
|
-
b = [
|
|
11
|
-
}, G = (
|
|
12
|
-
b = b.filter((o) => o.instanceId !==
|
|
9
|
+
}), F = () => h.forEach((e) => e()), X = (e) => {
|
|
10
|
+
b = [e, ...b], F();
|
|
11
|
+
}, G = (e) => {
|
|
12
|
+
b = b.filter((o) => o.instanceId !== e), F();
|
|
13
13
|
}, H = () => b, x = { subscribe: T, add: X, remove: G, getAlerts: H }, J = () => {
|
|
14
|
-
const [
|
|
15
|
-
return N(() => x.subscribe(() => o([...x.getAlerts()])), []), /* @__PURE__ */
|
|
14
|
+
const [e, o] = C(x.getAlerts());
|
|
15
|
+
return N(() => x.subscribe(() => o([...x.getAlerts()])), []), /* @__PURE__ */ r.jsx(S, { children: e.map(({ instanceId: s, props: l, destroy: t }) => /* @__PURE__ */ r.jsx(w, { ...l, destroy: t }, s)) });
|
|
16
16
|
};
|
|
17
17
|
let m = !1;
|
|
18
18
|
const Z = ({
|
|
19
|
-
id:
|
|
19
|
+
id: e,
|
|
20
20
|
type: o,
|
|
21
21
|
title: s,
|
|
22
|
-
description:
|
|
23
|
-
durationInMilliseconds:
|
|
22
|
+
description: l,
|
|
23
|
+
durationInMilliseconds: t = 8e3,
|
|
24
24
|
dataToCopy: c,
|
|
25
25
|
offset: d = { x: 0, y: 0 }
|
|
26
26
|
}) => {
|
|
27
|
-
const i =
|
|
27
|
+
const i = e + Date.now() + Math.random(), p = () => x.remove(i);
|
|
28
28
|
if (x.add({
|
|
29
29
|
instanceId: i,
|
|
30
|
-
props: {
|
|
30
|
+
props: {
|
|
31
|
+
id: e,
|
|
32
|
+
type: o,
|
|
33
|
+
title: s,
|
|
34
|
+
description: l,
|
|
35
|
+
durationInMilliseconds: o === "error" ? void 0 : t,
|
|
36
|
+
dataToCopy: c,
|
|
37
|
+
offset: d
|
|
38
|
+
},
|
|
31
39
|
destroy: p
|
|
32
40
|
}), !m) {
|
|
33
41
|
m = !0;
|
|
34
42
|
const g = V.portal.add("alert-stack");
|
|
35
|
-
|
|
43
|
+
v.createRoot(g).render(/* @__PURE__ */ r.jsx(J, {}));
|
|
36
44
|
}
|
|
37
45
|
}, P = ({
|
|
38
|
-
width:
|
|
46
|
+
width: e = "100%",
|
|
39
47
|
height: o = "fit-content",
|
|
40
48
|
type: s,
|
|
41
|
-
variant:
|
|
42
|
-
title:
|
|
49
|
+
variant: l = "small",
|
|
50
|
+
title: t,
|
|
43
51
|
message: c,
|
|
44
52
|
margin: d,
|
|
45
53
|
open: i = !0,
|
|
@@ -51,7 +59,7 @@ const Z = ({
|
|
|
51
59
|
info: {
|
|
52
60
|
backgroundColor: "#D5EBFD",
|
|
53
61
|
borderColor: a.colors.feedbackColors.colorFeedbackInfo,
|
|
54
|
-
icon: /* @__PURE__ */
|
|
62
|
+
icon: /* @__PURE__ */ r.jsx(
|
|
55
63
|
D,
|
|
56
64
|
{
|
|
57
65
|
color: a.colors.feedbackColors.colorFeedbackInfo,
|
|
@@ -63,7 +71,7 @@ const Z = ({
|
|
|
63
71
|
success: {
|
|
64
72
|
backgroundColor: "#DAF9DB",
|
|
65
73
|
borderColor: a.colors.feedbackColors.colorFeedbackSuccess,
|
|
66
|
-
icon: /* @__PURE__ */
|
|
74
|
+
icon: /* @__PURE__ */ r.jsx(
|
|
67
75
|
_,
|
|
68
76
|
{
|
|
69
77
|
color: a.colors.feedbackColors.colorFeedbackSuccess,
|
|
@@ -79,8 +87,8 @@ const Z = ({
|
|
|
79
87
|
error: {
|
|
80
88
|
backgroundColor: "#FFE1E1",
|
|
81
89
|
borderColor: a.colors.feedbackColors.colorFeedbackError,
|
|
82
|
-
icon: /* @__PURE__ */
|
|
83
|
-
|
|
90
|
+
icon: /* @__PURE__ */ r.jsx(
|
|
91
|
+
R,
|
|
84
92
|
{
|
|
85
93
|
color: a.colors.feedbackColors.colorFeedbackError,
|
|
86
94
|
height: "24px",
|
|
@@ -92,15 +100,15 @@ const Z = ({
|
|
|
92
100
|
function E() {
|
|
93
101
|
A(!1), p == null || p();
|
|
94
102
|
}
|
|
95
|
-
return /* @__PURE__ */
|
|
103
|
+
return /* @__PURE__ */ r.jsx(r.Fragment, { children: I ? /* @__PURE__ */ r.jsxs(
|
|
96
104
|
u,
|
|
97
105
|
{
|
|
98
|
-
width:
|
|
106
|
+
width: e,
|
|
99
107
|
height: o,
|
|
100
108
|
direction: "horizontal",
|
|
101
|
-
verticalAlign:
|
|
109
|
+
verticalAlign: t ? "top" : "center",
|
|
102
110
|
gap: a.spacings.spacingInline.spacingInlineAnt,
|
|
103
|
-
padding:
|
|
111
|
+
padding: l == "small" ? `${a.spacings.spacingStack.spacingStackXs} ${a.spacings.spacingInline.spacingInlineAnt}` : a.spacings.spacingInline.spacingInlineSm,
|
|
104
112
|
backgroundColor: (k = n == null ? void 0 : n[s]) == null ? void 0 : k.backgroundColor,
|
|
105
113
|
customStyles: {
|
|
106
114
|
border: `1px solid ${(f = n == null ? void 0 : n[s]) == null ? void 0 : f.borderColor}`,
|
|
@@ -109,13 +117,13 @@ const Z = ({
|
|
|
109
117
|
position: "relative"
|
|
110
118
|
},
|
|
111
119
|
children: [
|
|
112
|
-
s === "warning" ? /* @__PURE__ */
|
|
113
|
-
/* @__PURE__ */
|
|
114
|
-
j(
|
|
115
|
-
j(c) && /* @__PURE__ */
|
|
120
|
+
s === "warning" ? /* @__PURE__ */ r.jsx(L, { children: /* @__PURE__ */ r.jsx(O, { width: "24px", height: "24px" }) }) : /* @__PURE__ */ r.jsx(r.Fragment, { children: n == null ? void 0 : n[s].icon }),
|
|
121
|
+
/* @__PURE__ */ r.jsxs(u, { width: "100%", flex: "1", height: "100%", verticalAlign: "center", children: [
|
|
122
|
+
j(t) && /* @__PURE__ */ r.jsx($, { children: t }),
|
|
123
|
+
j(c) && /* @__PURE__ */ r.jsx(z, { children: c })
|
|
116
124
|
] }),
|
|
117
|
-
g && /* @__PURE__ */
|
|
118
|
-
|
|
125
|
+
g && /* @__PURE__ */ r.jsx(u, { children: /* @__PURE__ */ r.jsx(
|
|
126
|
+
y,
|
|
119
127
|
{
|
|
120
128
|
color: a.colors.neutralColors.colorNeutralCloudy,
|
|
121
129
|
cursor: "pointer",
|
|
@@ -126,13 +134,13 @@ const Z = ({
|
|
|
126
134
|
) })
|
|
127
135
|
]
|
|
128
136
|
}
|
|
129
|
-
) : /* @__PURE__ */
|
|
130
|
-
},
|
|
131
|
-
label:
|
|
137
|
+
) : /* @__PURE__ */ r.jsx(r.Fragment, {}) });
|
|
138
|
+
}, rr = ({
|
|
139
|
+
label: e,
|
|
132
140
|
labelRender: o,
|
|
133
141
|
infoProps: s = {},
|
|
134
|
-
withInfo:
|
|
135
|
-
flex:
|
|
142
|
+
withInfo: l = !0,
|
|
143
|
+
flex: t,
|
|
136
144
|
width: c = "100%",
|
|
137
145
|
isRequired: d = !1
|
|
138
146
|
}) => {
|
|
@@ -143,23 +151,23 @@ const Z = ({
|
|
|
143
151
|
size: "Small"
|
|
144
152
|
}
|
|
145
153
|
};
|
|
146
|
-
return /* @__PURE__ */
|
|
147
|
-
o ?? /* @__PURE__ */
|
|
148
|
-
|
|
154
|
+
return /* @__PURE__ */ r.jsxs(u, { width: c, direction: "horizontal", gap: "4px", flex: t, children: [
|
|
155
|
+
o ?? /* @__PURE__ */ r.jsxs(M, { children: [
|
|
156
|
+
e,
|
|
149
157
|
" ",
|
|
150
|
-
d ? /* @__PURE__ */
|
|
158
|
+
d ? /* @__PURE__ */ r.jsx(W, {}) : null
|
|
151
159
|
] }),
|
|
152
|
-
|
|
160
|
+
l && /* @__PURE__ */ r.jsx(q, { ...i })
|
|
153
161
|
] });
|
|
154
|
-
},
|
|
155
|
-
width:
|
|
162
|
+
}, er = ({
|
|
163
|
+
width: e = "100%",
|
|
156
164
|
flex: o,
|
|
157
165
|
label: s = "Obrigatório",
|
|
158
|
-
margin:
|
|
159
|
-
}) => /* @__PURE__ */
|
|
166
|
+
margin: l = "0 0 16px 0"
|
|
167
|
+
}) => /* @__PURE__ */ r.jsx(u, { width: e, flex: o, customStyles: { margin: l }, children: /* @__PURE__ */ r.jsx(B, { children: `* ${s}` }) });
|
|
160
168
|
export {
|
|
161
169
|
P as A,
|
|
162
|
-
|
|
163
|
-
|
|
170
|
+
rr as L,
|
|
171
|
+
er as R,
|
|
164
172
|
Z as s
|
|
165
173
|
};
|