@ufal-lccv/gpsub-ds 0.2.35 → 0.2.37
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-D37ouiXm.js → GenericAGGridTable-_FOU2vUj.js} +1887 -1895
- package/dist/{GenericAGGridTable-Bb_Dmfya.cjs → GenericAGGridTable-z2D_k8k2.cjs} +131 -139
- package/dist/RequiredLabel.view-BIuNb2kX.cjs +1 -0
- package/dist/{RequiredLabel.view-DF5F_8k-.js → RequiredLabel.view-C3-1JW-p.js} +54 -54
- package/dist/{Table.view-BS8ov7iW.js → Table.view-CSYJ_Pzc.js} +297 -292
- package/dist/Table.view-DkRKfJUo.cjs +1 -0
- package/dist/{Title.view-B4ufmr2T.cjs → Title.view-CYK64zfu.cjs} +1 -1
- package/dist/{Title.view-CfDq6PLA.js → Title.view-DEsz6WF_.js} +1 -1
- package/dist/components/atoms/ButtonLatest/ButtonLatest.view.d.ts +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/Confirm/ConfirmButton.view.d.ts +2 -2
- package/dist/components/molecules/index.cjs.js +1 -1
- package/dist/components/molecules/index.es.js +2 -2
- package/dist/components/organisms/index.cjs.js +1 -1
- package/dist/components/organisms/index.es.js +2 -2
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +4 -4
- package/package.json +1 -1
- package/dist/RequiredLabel.view-BGaPet3H.cjs +0 -1
- package/dist/Table.view-CBpA7UBJ.cjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("./GenericAGGridTable-z2D_k8k2.cjs"),b=require("./index-CPP6SuZS.cjs"),m=require("react");require("sbwb-ds");let u=[];const p=[],F=r=>(p.push(r),()=>{const o=p.indexOf(r);o>=0&&p.splice(o,1)}),R=()=>p.forEach(r=>r()),A=r=>{u=[r,...u],R()},I=r=>{u=u.filter(o=>o.instanceId!==r),R()},y=()=>u,d={subscribe:F,add:A,remove:I,getAlerts:y},w=()=>{const[r,o]=m.useState(d.getAlerts());return m.useEffect(()=>d.subscribe(()=>o([...d.getAlerts()])),[]),e.jsxRuntimeExports.jsx(e.AlertStackContainer,{children:r.map(({instanceId:s,props:t,destroy:n})=>e.jsxRuntimeExports.jsx(e.AlertView,{...t,destroy:n},s))})};let g=!1;const S=({id:r,type:o,title:s,description:t,durationInMilliseconds:n=3e3,dataToCopy:l,offset:a={x:0,y:0}})=>{const c=r+Date.now()+Math.random(),x=()=>d.remove(c);if(d.add({instanceId:c,props:{id:r,type:o,title:s,description:t,durationInMilliseconds:n,dataToCopy:l,offset:a},destroy:x}),!g){g=!0;const j=b.dom.portal.add("alert-stack");e.clientExports.createRoot(j).render(e.jsxRuntimeExports.jsx(w,{}))}},q=({width:r="100%",height:o="fit-content",type:s,variant:t="small",title:n,message:l,margin:a,open:c=!0,onClose:x,canClose:j=!0})=>{var h,E;const[C,k]=m.useState(c),i={info:{backgroundColor:"#D5EBFD",borderColor:e.y.colors.feedbackColors.colorFeedbackInfo,icon:e.jsxRuntimeExports.jsx(e.InfoFill_default,{color:e.y.colors.feedbackColors.colorFeedbackInfo,height:"24px",width:"24px"})},success:{backgroundColor:"#DAF9DB",borderColor:e.y.colors.feedbackColors.colorFeedbackSuccess,icon:e.jsxRuntimeExports.jsx(e.CheckCircleFill_default,{color:e.y.colors.feedbackColors.colorFeedbackSuccess,height:"24px",width:"24px"})},warning:{backgroundColor:"#FEEECF",borderColor:e.y.colors.feedbackColors.colorFeedbackWarning},error:{backgroundColor:"#FFE1E1",borderColor:e.y.colors.feedbackColors.colorFeedbackError,icon:e.jsxRuntimeExports.jsx(e.ErrorFill_default,{color:e.y.colors.feedbackColors.colorFeedbackError,height:"24px",width:"24px"})}};function f(){k(!1),x==null||x()}return e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:C?e.jsxRuntimeExports.jsxs(e.Container,{width:r,height:o,direction:"horizontal",verticalAlign:n?"top":"center",gap:e.y.spacings.spacingInline.spacingInlineAnt,padding:t=="small"?`${e.y.spacings.spacingStack.spacingStackXs} ${e.y.spacings.spacingInline.spacingInlineAnt}`:e.y.spacings.spacingInline.spacingInlineSm,backgroundColor:(h=i==null?void 0:i[s])==null?void 0:h.backgroundColor,customStyles:{border:`1px solid ${(E=i==null?void 0:i[s])==null?void 0:E.borderColor}`,borderRadius:e.y.borders.borderRadius.borderRadiusSm,margin:a,position:"relative"},children:[s==="warning"?e.jsxRuntimeExports.jsx(e.ContainerWarning,{children:e.jsxRuntimeExports.jsx(e.WarningFill_default,{width:"24px",height:"24px"})}):e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:i==null?void 0:i[s].icon}),e.jsxRuntimeExports.jsxs(e.Container,{width:"100%",flex:"1",height:"100%",verticalAlign:"center",children:[b.valuable(n)&&e.jsxRuntimeExports.jsx(e.Title$1,{children:n}),b.valuable(l)&&e.jsxRuntimeExports.jsx(e.Message,{children:l})]}),j&&e.jsxRuntimeExports.jsx(e.Container,{children:e.jsxRuntimeExports.jsx(e.Close_default,{color:e.y.colors.neutralColors.colorNeutralCloudy,cursor:"pointer",onClick:f,height:"20px",width:"20px"})})]}):e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{})})},v=({label:r,labelRender:o,infoProps:s={},withInfo:t=!0,flex:n,width:l="100%",isRequired:a=!1})=>{const c={tooltipProps:{position:"top",...s==null?void 0:s.tooltipProps,size:"Small"}};return e.jsxRuntimeExports.jsxs(e.Container,{width:l,direction:"horizontal",gap:"4px",flex:n,children:[o??e.jsxRuntimeExports.jsxs(e.Label$1,{children:[r," ",a?e.jsxRuntimeExports.jsx(e.Required,{}):null]}),t&&e.jsxRuntimeExports.jsx(e.Info,{...c})]})},$=({width:r="100%",flex:o,label:s="Obrigatório",margin:t="0 0 16px 0"})=>e.jsxRuntimeExports.jsx(e.Container,{width:r,flex:o,customStyles:{margin:t},children:e.jsxRuntimeExports.jsx(e.Label$2,{children:`* ${s}`})});exports.AlertInline=q;exports.LabelField=v;exports.RequiredLabelView=$;exports.showAlert=S;
|
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
import { a1 as e, ae as
|
|
2
|
-
import { d as
|
|
3
|
-
import { useState as
|
|
1
|
+
import { a1 as e, ae as S, af as w, ag as R, ah as v, $ as a, ai as $, a8 as D, c as u, aj as L, ak as O, al as _, am as y, a6 as z, an as W, e as q, I as B, ao as M } from "./GenericAGGridTable-_FOU2vUj.js";
|
|
2
|
+
import { d as V, v as j } from "./index-YF_5f0O1.js";
|
|
3
|
+
import { useState as C, useEffect as N } from "react";
|
|
4
4
|
import "sbwb-ds";
|
|
5
|
-
let
|
|
6
|
-
const
|
|
7
|
-
const o =
|
|
8
|
-
o >= 0 &&
|
|
9
|
-
}),
|
|
10
|
-
|
|
11
|
-
},
|
|
12
|
-
|
|
13
|
-
},
|
|
14
|
-
const [r, o] =
|
|
15
|
-
return
|
|
5
|
+
let b = [];
|
|
6
|
+
const h = [], T = (r) => (h.push(r), () => {
|
|
7
|
+
const o = h.indexOf(r);
|
|
8
|
+
o >= 0 && h.splice(o, 1);
|
|
9
|
+
}), F = () => h.forEach((r) => r()), X = (r) => {
|
|
10
|
+
b = [r, ...b], F();
|
|
11
|
+
}, G = (r) => {
|
|
12
|
+
b = b.filter((o) => o.instanceId !== r), F();
|
|
13
|
+
}, H = () => b, x = { subscribe: T, add: X, remove: G, getAlerts: H }, J = () => {
|
|
14
|
+
const [r, o] = C(x.getAlerts());
|
|
15
|
+
return N(() => x.subscribe(() => o([...x.getAlerts()])), []), /* @__PURE__ */ e.jsx(S, { children: r.map(({ instanceId: s, props: t, destroy: l }) => /* @__PURE__ */ e.jsx(w, { ...t, destroy: l }, s)) });
|
|
16
16
|
};
|
|
17
17
|
let m = !1;
|
|
18
|
-
const
|
|
18
|
+
const Z = ({
|
|
19
19
|
id: r,
|
|
20
20
|
type: o,
|
|
21
21
|
title: s,
|
|
22
22
|
description: t,
|
|
23
|
-
durationInMilliseconds:
|
|
24
|
-
dataToCopy:
|
|
23
|
+
durationInMilliseconds: l = 3e3,
|
|
24
|
+
dataToCopy: c,
|
|
25
25
|
offset: d = { x: 0, y: 0 }
|
|
26
26
|
}) => {
|
|
27
|
-
const
|
|
27
|
+
const i = r + Date.now() + Math.random(), p = () => x.remove(i);
|
|
28
28
|
if (x.add({
|
|
29
|
-
instanceId:
|
|
30
|
-
props: { id: r, type: o, title: s, description: t, durationInMilliseconds:
|
|
29
|
+
instanceId: i,
|
|
30
|
+
props: { id: r, type: o, title: s, description: t, durationInMilliseconds: l, dataToCopy: c, offset: d },
|
|
31
31
|
destroy: p
|
|
32
32
|
}), !m) {
|
|
33
33
|
m = !0;
|
|
34
|
-
const g =
|
|
35
|
-
|
|
34
|
+
const g = V.portal.add("alert-stack");
|
|
35
|
+
R.createRoot(g).render(/* @__PURE__ */ e.jsx(J, {}));
|
|
36
36
|
}
|
|
37
|
-
},
|
|
37
|
+
}, P = ({
|
|
38
38
|
width: r = "100%",
|
|
39
39
|
height: o = "fit-content",
|
|
40
40
|
type: s,
|
|
41
41
|
variant: t = "small",
|
|
42
|
-
title:
|
|
43
|
-
message:
|
|
42
|
+
title: l,
|
|
43
|
+
message: c,
|
|
44
44
|
margin: d,
|
|
45
|
-
open:
|
|
45
|
+
open: i = !0,
|
|
46
46
|
onClose: p,
|
|
47
47
|
canClose: g = !0
|
|
48
48
|
}) => {
|
|
49
49
|
var k, f;
|
|
50
|
-
const [
|
|
50
|
+
const [I, A] = C(i), n = {
|
|
51
51
|
info: {
|
|
52
52
|
backgroundColor: "#D5EBFD",
|
|
53
53
|
borderColor: a.colors.feedbackColors.colorFeedbackInfo,
|
|
@@ -80,7 +80,7 @@ const Y = ({
|
|
|
80
80
|
backgroundColor: "#FFE1E1",
|
|
81
81
|
borderColor: a.colors.feedbackColors.colorFeedbackError,
|
|
82
82
|
icon: /* @__PURE__ */ e.jsx(
|
|
83
|
-
|
|
83
|
+
v,
|
|
84
84
|
{
|
|
85
85
|
color: a.colors.feedbackColors.colorFeedbackError,
|
|
86
86
|
height: "24px",
|
|
@@ -89,37 +89,37 @@ const Y = ({
|
|
|
89
89
|
)
|
|
90
90
|
}
|
|
91
91
|
};
|
|
92
|
-
function
|
|
93
|
-
|
|
92
|
+
function E() {
|
|
93
|
+
A(!1), p == null || p();
|
|
94
94
|
}
|
|
95
|
-
return /* @__PURE__ */ e.jsx(e.Fragment, { children:
|
|
95
|
+
return /* @__PURE__ */ e.jsx(e.Fragment, { children: I ? /* @__PURE__ */ e.jsxs(
|
|
96
96
|
u,
|
|
97
97
|
{
|
|
98
98
|
width: r,
|
|
99
99
|
height: o,
|
|
100
100
|
direction: "horizontal",
|
|
101
|
-
verticalAlign:
|
|
101
|
+
verticalAlign: l ? "top" : "center",
|
|
102
102
|
gap: a.spacings.spacingInline.spacingInlineAnt,
|
|
103
103
|
padding: t == "small" ? `${a.spacings.spacingStack.spacingStackXs} ${a.spacings.spacingInline.spacingInlineAnt}` : a.spacings.spacingInline.spacingInlineSm,
|
|
104
|
-
backgroundColor: (k =
|
|
104
|
+
backgroundColor: (k = n == null ? void 0 : n[s]) == null ? void 0 : k.backgroundColor,
|
|
105
105
|
customStyles: {
|
|
106
|
-
border: `1px solid ${(f =
|
|
106
|
+
border: `1px solid ${(f = n == null ? void 0 : n[s]) == null ? void 0 : f.borderColor}`,
|
|
107
107
|
borderRadius: a.borders.borderRadius.borderRadiusSm,
|
|
108
108
|
margin: d,
|
|
109
109
|
position: "relative"
|
|
110
110
|
},
|
|
111
111
|
children: [
|
|
112
|
-
s === "warning" ? /* @__PURE__ */ e.jsx(L, { children: /* @__PURE__ */ e.jsx(O, { width: "24px", height: "24px" }) }) : /* @__PURE__ */ e.jsx(e.Fragment, { children:
|
|
113
|
-
/* @__PURE__ */ e.jsxs(u, { width: "100%", flex: "1", height: "100%", children: [
|
|
114
|
-
/* @__PURE__ */ e.jsx(_, { children:
|
|
115
|
-
/* @__PURE__ */ e.jsx(
|
|
112
|
+
s === "warning" ? /* @__PURE__ */ e.jsx(L, { children: /* @__PURE__ */ e.jsx(O, { width: "24px", height: "24px" }) }) : /* @__PURE__ */ e.jsx(e.Fragment, { children: n == null ? void 0 : n[s].icon }),
|
|
113
|
+
/* @__PURE__ */ e.jsxs(u, { width: "100%", flex: "1", height: "100%", verticalAlign: "center", children: [
|
|
114
|
+
j(l) && /* @__PURE__ */ e.jsx(_, { children: l }),
|
|
115
|
+
j(c) && /* @__PURE__ */ e.jsx(y, { children: c })
|
|
116
116
|
] }),
|
|
117
117
|
g && /* @__PURE__ */ e.jsx(u, { children: /* @__PURE__ */ e.jsx(
|
|
118
|
-
|
|
118
|
+
z,
|
|
119
119
|
{
|
|
120
120
|
color: a.colors.neutralColors.colorNeutralCloudy,
|
|
121
121
|
cursor: "pointer",
|
|
122
|
-
onClick:
|
|
122
|
+
onClick: E,
|
|
123
123
|
height: "20px",
|
|
124
124
|
width: "20px"
|
|
125
125
|
}
|
|
@@ -127,39 +127,39 @@ const Y = ({
|
|
|
127
127
|
]
|
|
128
128
|
}
|
|
129
129
|
) : /* @__PURE__ */ e.jsx(e.Fragment, {}) });
|
|
130
|
-
},
|
|
130
|
+
}, ee = ({
|
|
131
131
|
label: r,
|
|
132
132
|
labelRender: o,
|
|
133
133
|
infoProps: s = {},
|
|
134
134
|
withInfo: t = !0,
|
|
135
|
-
flex:
|
|
136
|
-
width:
|
|
135
|
+
flex: l,
|
|
136
|
+
width: c = "100%",
|
|
137
137
|
isRequired: d = !1
|
|
138
138
|
}) => {
|
|
139
|
-
const
|
|
139
|
+
const i = {
|
|
140
140
|
tooltipProps: {
|
|
141
141
|
position: "top",
|
|
142
142
|
...s == null ? void 0 : s.tooltipProps,
|
|
143
143
|
size: "Small"
|
|
144
144
|
}
|
|
145
145
|
};
|
|
146
|
-
return /* @__PURE__ */ e.jsxs(u, { width:
|
|
147
|
-
o ?? /* @__PURE__ */ e.jsxs(
|
|
146
|
+
return /* @__PURE__ */ e.jsxs(u, { width: c, direction: "horizontal", gap: "4px", flex: l, children: [
|
|
147
|
+
o ?? /* @__PURE__ */ e.jsxs(W, { children: [
|
|
148
148
|
r,
|
|
149
149
|
" ",
|
|
150
|
-
d ? /* @__PURE__ */ e.jsx(
|
|
150
|
+
d ? /* @__PURE__ */ e.jsx(q, {}) : null
|
|
151
151
|
] }),
|
|
152
|
-
t && /* @__PURE__ */ e.jsx(
|
|
152
|
+
t && /* @__PURE__ */ e.jsx(B, { ...i })
|
|
153
153
|
] });
|
|
154
|
-
},
|
|
154
|
+
}, re = ({
|
|
155
155
|
width: r = "100%",
|
|
156
156
|
flex: o,
|
|
157
157
|
label: s = "Obrigatório",
|
|
158
158
|
margin: t = "0 0 16px 0"
|
|
159
|
-
}) => /* @__PURE__ */ e.jsx(u, { width: r, flex: o, customStyles: { margin: t }, children: /* @__PURE__ */ e.jsx(
|
|
159
|
+
}) => /* @__PURE__ */ e.jsx(u, { width: r, flex: o, customStyles: { margin: t }, children: /* @__PURE__ */ e.jsx(M, { children: `* ${s}` }) });
|
|
160
160
|
export {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
161
|
+
P as A,
|
|
162
|
+
ee as L,
|
|
163
|
+
re as R,
|
|
164
|
+
Z as s
|
|
165
165
|
};
|