@ufal-lccv/gpsub-ds 0.2.34 → 0.2.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,25 +1,25 @@
1
- import { a1 as t, c as q, t as ne, ap as K, C as ae, D as de, p as oe, Y as ce, $ as U, aq as he, ar as ue, as as fe, at as xe, W as pe, E as ie, au as ge, av as be, aw as je, ax as me, ay as Z, az as z, aA as we, aB as We, aC as Ie, aD as ye } from "./GenericAGGridTable-TGbLm6ra.js";
2
- import { useState as P, useEffect as Q, useMemo as Y, useRef as X, useLayoutEffect as Ae } from "react";
1
+ import { a1 as t, c as P, t as re, ap as K, C as ae, D as de, p as oe, Y as ce, $ as U, aq as he, ar as ue, as as fe, at as xe, W as ge, E as ie, au as pe, av as be, aw as me, ax as je, ay as Z, az as z, aA as we, aB as We, aC as Ie, aD as ye } from "./GenericAGGridTable-DDEgt2mb.js";
2
+ import { useState as J, useEffect as Q, useMemo as G, useRef as X, useLayoutEffect as Ae } from "react";
3
3
  import { Icon as te } from "sbwb-ds";
4
4
  import { Controller as B, useController as ke } from "react-hook-form";
5
- import { v as _, s as Re } from "./index-YF_5f0O1.js";
5
+ import { v as q, s as Re } from "./index-YF_5f0O1.js";
6
6
  import { p as se } from "./parseDate-ihxA2lUF.js";
7
- const le = 350, Le = ({
7
+ const le = 350, Fe = ({
8
8
  title: r,
9
- children: n,
10
- endAdornment: u = null,
9
+ children: a,
10
+ endAdornment: f = null,
11
11
  marginBottom: p = "16px",
12
12
  customStyles: o = {},
13
13
  wrapperCustomStyles: l = {},
14
14
  animationContainerCustomStyles: c = {},
15
- hideAdornmentOnCollapse: f = !1,
15
+ hideAdornmentOnCollapse: x = !1,
16
16
  maxHeight: k = "none",
17
17
  // Default to 'none' to allow full expansion
18
- height: D = "fit-content"
18
+ height: H = "fit-content"
19
19
  }) => {
20
- const [R, S] = P(!1), [g, I] = P(!0);
20
+ const [R, S] = J(!1), [b, I] = J(!0);
21
21
  Q(() => {
22
- if (f)
22
+ if (x)
23
23
  if (R) {
24
24
  const w = setTimeout(
25
25
  () => I(!1),
@@ -28,10 +28,10 @@ const le = 350, Le = ({
28
28
  return () => clearTimeout(w);
29
29
  } else
30
30
  I(!0);
31
- }, [R, f]);
32
- const N = f && !g ? null : u;
31
+ }, [R, x]);
32
+ const N = x && !b ? null : f;
33
33
  return /* @__PURE__ */ t.jsxs(
34
- q,
34
+ P,
35
35
  {
36
36
  width: "100%",
37
37
  flex: "1",
@@ -39,7 +39,7 @@ const le = 350, Le = ({
39
39
  customStyles: l,
40
40
  children: [
41
41
  /* @__PURE__ */ t.jsx(
42
- ne,
42
+ re,
43
43
  {
44
44
  title: r,
45
45
  divider: !0,
@@ -53,17 +53,17 @@ const le = 350, Le = ({
53
53
  }
54
54
  ),
55
55
  /* @__PURE__ */ t.jsx(
56
- q,
56
+ P,
57
57
  {
58
58
  gap: "8px",
59
59
  width: "100%",
60
- height: D,
60
+ height: H,
61
61
  customStyles: {
62
62
  ...c,
63
63
  maxHeight: R ? "0" : k,
64
64
  transition: `max-height ${le}ms ease-in-out`
65
65
  },
66
- children: n
66
+ children: a
67
67
  }
68
68
  )
69
69
  ]
@@ -72,55 +72,55 @@ const le = 350, Le = ({
72
72
  };
73
73
  function Oe({
74
74
  form: r,
75
- name: n,
76
- id: u = n,
75
+ name: a,
76
+ id: f = a,
77
77
  label: p,
78
78
  readonly: o = !1,
79
79
  disabled: l = !1,
80
80
  afterCheck: c,
81
- width: f = "100%",
81
+ width: x = "100%",
82
82
  formatter: k,
83
- parser: D,
83
+ parser: H,
84
84
  flex: R,
85
85
  size: S = "Medium",
86
- checkColor: g,
86
+ checkColor: b,
87
87
  triggerFormField: I = null,
88
88
  ...N
89
89
  }) {
90
90
  const { onChangeTrigger: w } = K({
91
91
  form: r,
92
- fieldName: n,
92
+ fieldName: a,
93
93
  triggerType: I,
94
94
  debounceTime: 0
95
- }), h = (b, $) => {
96
- $(b), c == null || c(b), w == null || w();
95
+ }), h = (m, C) => {
96
+ C(m), c == null || c(m), w == null || w();
97
97
  };
98
- return /* @__PURE__ */ t.jsx(q, { width: f, flex: R, children: /* @__PURE__ */ t.jsx(
98
+ return /* @__PURE__ */ t.jsx(P, { width: x, flex: R, children: /* @__PURE__ */ t.jsx(
99
99
  B,
100
100
  {
101
- name: n,
101
+ name: a,
102
102
  control: r.control,
103
103
  render: ({
104
- field: { onChange: b, value: $, onBlur: C },
104
+ field: { onChange: m, value: C, onBlur: $ },
105
105
  fieldState: { error: T = null }
106
106
  }) => {
107
107
  const M = T == null ? void 0 : T.message;
108
108
  return M && console.log("Error on checkbox!", M), /* @__PURE__ */ t.jsx(
109
109
  ae,
110
110
  {
111
- id: `form-checkbox-${u}`,
112
- checked: k ? k($) : !!$,
113
- name: n,
111
+ id: `form-checkbox-${f}`,
112
+ checked: k ? k(C) : !!C,
113
+ name: a,
114
114
  label: p,
115
115
  disabled: l || o,
116
- onChange: (x) => {
116
+ onChange: (g) => {
117
117
  h(
118
- (D == null ? void 0 : D(x.target.checked, $)) ?? x.target.checked,
119
- b
120
- ), C == null || C();
118
+ (H == null ? void 0 : H(g.target.checked, C)) ?? g.target.checked,
119
+ m
120
+ ), $ == null || $();
121
121
  },
122
122
  size: S,
123
- checkColor: g,
123
+ checkColor: b,
124
124
  ...N
125
125
  }
126
126
  );
@@ -130,58 +130,58 @@ function Oe({
130
130
  }
131
131
  const Ee = ({
132
132
  form: r,
133
- name: n,
134
- label: u,
133
+ name: a,
134
+ label: f,
135
135
  placeholder: p,
136
136
  readonly: o = !1,
137
137
  disabled: l = !1,
138
138
  width: c = "100%",
139
- flex: f,
139
+ flex: x,
140
140
  tooltipIsVisible: k,
141
- tooltipMaxWidth: D,
141
+ tooltipMaxWidth: H,
142
142
  tooltipPosition: R = "top",
143
143
  afterFormChange: S,
144
- openToDate: g,
144
+ openToDate: b,
145
145
  range: I = !1,
146
146
  openCalendarOnInputClick: N = !1,
147
147
  ...w
148
148
  }) => {
149
149
  let h = p;
150
- return !_(p) && !l && (h = o ? "Nenhuma data escolhida" : "Escolha uma data"), /* @__PURE__ */ t.jsx(q, { width: c, flex: f, children: /* @__PURE__ */ t.jsx(
150
+ return !q(p) && !l && (h = o ? "Nenhuma data escolhida" : "Escolha uma data"), /* @__PURE__ */ t.jsx(P, { width: c, flex: x, children: /* @__PURE__ */ t.jsx(
151
151
  B,
152
152
  {
153
- name: n,
153
+ name: a,
154
154
  control: r.control,
155
- render: ({ field: { value: b, onChange: $, ref: C } }) => {
155
+ render: ({ field: { value: m, onChange: C, ref: $ } }) => {
156
156
  let T;
157
- _(b) && (I ? T = Array.isArray(b) ? b.join(" - ") : b : T = new Date(Re(b.slice(0, 10))));
158
- const { error: M } = r.getFieldState(n, r.formState);
157
+ q(m) && (I ? T = Array.isArray(m) ? m.join(" - ") : m : T = new Date(Re(m.slice(0, 10))));
158
+ const { error: M } = r.getFieldState(a, r.formState);
159
159
  return /* @__PURE__ */ t.jsx(
160
160
  de,
161
161
  {
162
- ref: C,
163
- idCalendar: `${n}-calendar`,
164
- label: u,
162
+ ref: $,
163
+ idCalendar: `${a}-calendar`,
164
+ label: f,
165
165
  value: T,
166
166
  size: "Small",
167
167
  readonly: o,
168
168
  errorMessage: M == null ? void 0 : M.message,
169
169
  disabled: l,
170
170
  placeholder: h,
171
- onChangeHandleDate: (x) => {
172
- var a;
173
- $(
174
- I ? x ? x.split(" - ").map((F) => {
175
- var L;
176
- return ((L = se(F)) == null ? void 0 : L.slice(0, 10)) || null;
177
- }) : [null, null] : x && ((a = se(x)) == null ? void 0 : a.slice(0, 10)) || null
178
- ), S == null || S(x);
171
+ onChangeHandleDate: (g) => {
172
+ var n;
173
+ C(
174
+ I ? g ? g.split(" - ").map((D) => {
175
+ var O;
176
+ return ((O = se(D)) == null ? void 0 : O.slice(0, 10)) || null;
177
+ }) : [null, null] : g && ((n = se(g)) == null ? void 0 : n.slice(0, 10)) || null
178
+ ), S == null || S(g);
179
179
  },
180
- openToDate: g,
180
+ openToDate: b,
181
181
  selectsRange: I,
182
182
  openCalendarOnInputClick: N,
183
183
  width: c,
184
- flex: f,
184
+ flex: x,
185
185
  ...w
186
186
  }
187
187
  );
@@ -191,21 +191,21 @@ const Ee = ({
191
191
  };
192
192
  function Ve({
193
193
  form: r,
194
- name: n,
195
- label: u,
194
+ name: a,
195
+ label: f,
196
196
  slots: { field: p },
197
197
  slotsProps: o,
198
198
  triggerFormField: l = null,
199
199
  // Value
200
200
  value: c,
201
201
  // Flags
202
- bypassControllerOnChange: f = !1,
202
+ bypassControllerOnChange: x = !1,
203
203
  overrideOnBlur: k = !1,
204
- isRequired: D = !1,
204
+ isRequired: H = !1,
205
205
  readonly: R = !1,
206
206
  disabled: S = !1,
207
207
  // Tranformations
208
- parser: g,
208
+ parser: b,
209
209
  // Debounce
210
210
  debounce: I,
211
211
  // Change handlers
@@ -213,103 +213,103 @@ function Ve({
213
213
  onChange: w,
214
214
  afterChange: h,
215
215
  // Blur handlers
216
- beforeBlur: b,
217
- onBlur: $,
218
- afterBlur: C,
216
+ beforeBlur: m,
217
+ onBlur: C,
218
+ afterBlur: $,
219
219
  // Enter handlers
220
220
  onEnter: T
221
221
  }) {
222
222
  const {
223
- field: { value: M, onChange: x },
224
- fieldState: { error: a = null }
225
- } = ke({ name: n, control: r.control }), F = _(I), { onChangeTrigger: L, onBlurTrigger: d } = K({
223
+ field: { value: M, onChange: g },
224
+ fieldState: { error: n = null }
225
+ } = ke({ name: a, control: r.control }), D = q(I), { onChangeTrigger: O, onBlurTrigger: d } = K({
226
226
  form: r,
227
- fieldName: n,
227
+ fieldName: a,
228
228
  triggerType: l,
229
- debounceTime: F ? 0 : 500
229
+ debounceTime: D ? 0 : 500
230
230
  }), i = (e, j) => {
231
- var y, G;
232
- const E = ((y = e == null ? void 0 : e.target) == null ? void 0 : y.value) || ((G = e == null ? void 0 : e.target) == null ? void 0 : G.checked) || e || void 0, A = _(g) ? g(E) : E;
233
- N == null || N(A), f || j == null || j(A), w == null || w(e, j), h == null || h(e, j), L == null || L();
234
- }, W = Y(() => {
235
- if (!F) return i;
231
+ var A, _;
232
+ const F = ((A = e == null ? void 0 : e.target) == null ? void 0 : A.value) || ((_ = e == null ? void 0 : e.target) == null ? void 0 : _.checked) || e || void 0, y = q(b) ? b(F) : F;
233
+ N == null || N(y), x || j == null || j(y), w == null || w(e, j), h == null || h(e, j), O == null || O();
234
+ }, W = G(() => {
235
+ if (!D) return i;
236
236
  let e;
237
- return (E, A) => {
238
- clearTimeout(e), e = setTimeout(() => i(E, A), I);
237
+ return (F, y) => {
238
+ clearTimeout(e), e = setTimeout(() => i(F, y), I);
239
239
  };
240
- }, [F, I, i]), m = (e, j) => {
241
- var A, y;
242
- const E = ((A = e == null ? void 0 : e.target) == null ? void 0 : A.value) || ((y = e == null ? void 0 : e.target) == null ? void 0 : y.checked) || e || void 0;
243
- !k && f && (x == null || x(E)), b == null || b(e, j), $ == null || $(e, j), C == null || C(e, j), d == null || d();
244
- }, H = (e, j) => {
240
+ }, [D, I, i]), u = (e, j) => {
241
+ var y, A;
242
+ const F = ((y = e == null ? void 0 : e.target) == null ? void 0 : y.value) || ((A = e == null ? void 0 : e.target) == null ? void 0 : A.checked) || e || void 0;
243
+ !k && x && (g == null || g(F)), m == null || m(e, j), C == null || C(e, j), $ == null || $(e, j), d == null || d();
244
+ }, L = (e, j) => {
245
245
  T == null || T(e, j);
246
246
  };
247
- a != null && a.message && console.log(`Error on ${p.displayName}!`, a.message);
248
- const s = _(c) ? c == null ? void 0 : c(M) : { value: M };
249
- return /* @__PURE__ */ t.jsx(q, { ...o == null ? void 0 : o.container, children: /* @__PURE__ */ t.jsx(
247
+ n != null && n.message && console.log(`Error on ${p.displayName}!`, n.message);
248
+ const s = q(c) ? c == null ? void 0 : c(M) : { value: M };
249
+ return /* @__PURE__ */ t.jsx(P, { ...o == null ? void 0 : o.container, children: /* @__PURE__ */ t.jsx(
250
250
  p,
251
251
  {
252
252
  ...o == null ? void 0 : o.field,
253
253
  ...s,
254
- label: u,
255
- onChange: (e) => W == null ? void 0 : W(e, x),
256
- onBlur: (e) => m == null ? void 0 : m(e, x),
257
- onEnter: (e) => H == null ? void 0 : H(e, x),
258
- errorMessage: a == null ? void 0 : a.message
254
+ label: f,
255
+ onChange: (e) => W == null ? void 0 : W(e, g),
256
+ onBlur: (e) => u == null ? void 0 : u(e, g),
257
+ onEnter: (e) => L == null ? void 0 : L(e, g),
258
+ errorMessage: n == null ? void 0 : n.message
259
259
  }
260
260
  ) });
261
261
  }
262
262
  const Ue = ({
263
263
  form: r,
264
- name: n,
265
- label: u,
264
+ name: a,
265
+ label: f,
266
266
  options: p,
267
267
  readonly: o = !1,
268
268
  disabled: l = !1,
269
269
  width: c = "100%",
270
- flex: f,
270
+ flex: x,
271
271
  placeholder: k,
272
- iconName: D,
272
+ iconName: H,
273
273
  onSelect: R,
274
274
  hasSelectAll: S = !1,
275
- tags: g = !0,
275
+ tags: b = !0,
276
276
  sortOptions: I = !1,
277
277
  enableSearch: N = !1,
278
278
  valueAllOption: w,
279
279
  isRequired: h = !1,
280
- tooltipProps: b = {},
281
- infoProps: $ = {},
282
- triggerFormField: C = null,
280
+ tooltipProps: m = {},
281
+ infoProps: C = {},
282
+ triggerFormField: $ = null,
283
283
  ...T
284
284
  }) => {
285
285
  const { onChangeTrigger: M } = K({
286
286
  form: r,
287
- fieldName: n,
288
- triggerType: C,
287
+ fieldName: a,
288
+ triggerType: $,
289
289
  debounceTime: 0
290
290
  });
291
- return /* @__PURE__ */ t.jsx(q, { width: c, flex: f, children: /* @__PURE__ */ t.jsx(
291
+ return /* @__PURE__ */ t.jsx(P, { width: c, flex: x, children: /* @__PURE__ */ t.jsx(
292
292
  B,
293
293
  {
294
- name: n,
294
+ name: a,
295
295
  control: r.control,
296
- render: ({ field: { value: x, onChange: a } }) => {
297
- const { error: F } = r.getFieldState(n), L = _(x) ? x : [];
296
+ render: ({ field: { value: g, onChange: n } }) => {
297
+ const { error: D } = r.getFieldState(a), O = q(g) ? g : [];
298
298
  return /* @__PURE__ */ t.jsx(
299
299
  oe,
300
300
  {
301
- label: u,
301
+ label: f,
302
302
  size: "Small",
303
303
  disabled: l || o,
304
304
  onChange: (d) => {
305
- a(d), R == null || R(d), M == null || M();
305
+ n(d), R == null || R(d), M == null || M();
306
306
  },
307
- values: L,
308
- errorMessage: F == null ? void 0 : F.message,
307
+ values: O,
308
+ errorMessage: D == null ? void 0 : D.message,
309
309
  options: p,
310
- iconName: D,
310
+ iconName: H,
311
311
  hasSelectAll: S,
312
- tags: g,
312
+ tags: b,
313
313
  sortOptions: I,
314
314
  placeholder: k,
315
315
  enableSearch: N,
@@ -317,15 +317,15 @@ const Ue = ({
317
317
  isRequired: h,
318
318
  tooltipProps: {
319
319
  position: "top",
320
- ...b
320
+ ...m
321
321
  },
322
322
  infoProps: {
323
323
  tooltipProps: {
324
324
  position: "top",
325
325
  maxWidth: "300px",
326
- ...$.tooltipProps
326
+ ...C.tooltipProps
327
327
  },
328
- ...$
328
+ ...C
329
329
  },
330
330
  ...T
331
331
  }
@@ -335,36 +335,36 @@ const Ue = ({
335
335
  ) });
336
336
  }, _e = ({
337
337
  variant: r = "default",
338
- form: n,
339
- name: u,
338
+ form: a,
339
+ name: f,
340
340
  label: p,
341
341
  options: o,
342
342
  readonly: l = !1,
343
343
  disabled: c = !1,
344
- optionsMap: f,
344
+ optionsMap: x,
345
345
  width: k = "100%",
346
- flex: D,
346
+ flex: H,
347
347
  placeholder: R,
348
348
  onSelect: S,
349
- parser: g,
349
+ parser: b,
350
350
  onPaste: I,
351
351
  filter: N,
352
352
  tooltipProps: w = {},
353
353
  infoProps: h = {},
354
- maxHeightMenu: b,
355
- isRequired: $ = !1,
356
- onRemoveSelected: C,
354
+ maxHeightMenu: m,
355
+ isRequired: C = !1,
356
+ onRemoveSelected: $,
357
357
  triggerFormField: T = null,
358
358
  displayText: M,
359
- usePortal: x = !1,
360
- ...a
359
+ usePortal: g = !1,
360
+ ...n
361
361
  }) => {
362
- const { onChangeTrigger: F } = K({
363
- form: n,
364
- fieldName: u,
362
+ const { onChangeTrigger: D } = K({
363
+ form: a,
364
+ fieldName: f,
365
365
  triggerType: T,
366
366
  debounceTime: 0
367
- }), L = {
367
+ }), O = {
368
368
  position: "top",
369
369
  ...w
370
370
  }, d = {
@@ -374,20 +374,20 @@ const Ue = ({
374
374
  maxWidth: "300px",
375
375
  ...h == null ? void 0 : h.tooltipProps
376
376
  }
377
- }, i = (m, H) => {
378
- let s = m;
379
- g && (s = g == null ? void 0 : g(m)), H(s), S == null || S(s), F == null || F();
380
- }, W = Y(() => _(f) ? f : Object.fromEntries(o.map((m) => [m.value, m])), [o, f]);
381
- return /* @__PURE__ */ t.jsx(q, { width: k, flex: D, children: /* @__PURE__ */ t.jsx(
377
+ }, i = (u, L) => {
378
+ let s = u;
379
+ b && (s = b == null ? void 0 : b(u)), L(s), S == null || S(s), D == null || D();
380
+ }, W = G(() => q(x) ? x : Object.fromEntries(o.map((u) => [u.value, u])), [o, x]);
381
+ return /* @__PURE__ */ t.jsx(P, { width: k, flex: H, children: /* @__PURE__ */ t.jsx(
382
382
  B,
383
383
  {
384
- name: u,
385
- control: n.control,
384
+ name: f,
385
+ control: a.control,
386
386
  render: ({
387
- field: { onChange: m, value: H },
387
+ field: { onChange: u, value: L },
388
388
  fieldState: { error: s = null }
389
389
  }) => {
390
- let e = W[H];
390
+ let e = W[L];
391
391
  return /* @__PURE__ */ t.jsx(
392
392
  ce,
393
393
  {
@@ -402,59 +402,59 @@ const Ue = ({
402
402
  placeholder: R,
403
403
  value: e,
404
404
  handleOption: (j) => {
405
- i(j.value, m);
405
+ i(j.value, u);
406
406
  },
407
- tooltipProps: L,
407
+ tooltipProps: O,
408
408
  options: o,
409
- usePortal: x,
409
+ usePortal: g,
410
410
  infoProps: d,
411
- maxHeightMenu: b,
412
- isRequired: $,
413
- onRemoveSelected: C,
411
+ maxHeightMenu: m,
412
+ isRequired: C,
413
+ onRemoveSelected: $,
414
414
  displayText: M,
415
415
  onPaste: I,
416
- ...a
416
+ ...n
417
417
  }
418
418
  );
419
419
  }
420
420
  }
421
421
  ) });
422
422
  }, Se = (r) => {
423
- const [n, u] = P(!1), [p, o] = P(r), l = X(null);
423
+ const [a, f] = J(!1), [p, o] = J(r), l = X(null);
424
424
  return Q(() => {
425
425
  o(r);
426
426
  }, [r]), {
427
- setIsOpen: u,
428
- isOpen: n,
427
+ setIsOpen: f,
428
+ isOpen: a,
429
429
  setOptionsSelect: o,
430
430
  optionsSelect: p,
431
431
  selectContainerRef: l
432
432
  };
433
433
  }, Ne = 200, qe = ({
434
434
  name: r,
435
- variant: n = "primary",
436
- width: u = "100%",
435
+ variant: a = "primary",
436
+ width: f = "100%",
437
437
  size: p = "Medium",
438
438
  disabled: o = !1,
439
439
  isLoading: l = !1,
440
440
  onClick: c,
441
- options: f,
441
+ options: x,
442
442
  label: k,
443
- menuSelectProps: D = {},
443
+ menuSelectProps: H = {},
444
444
  iconName: R,
445
445
  optionsIconPosition: S
446
446
  }) => {
447
- const { isOpen: g, setIsOpen: I, selectContainerRef: N, optionsSelect: w } = Se(f);
447
+ const { isOpen: b, setIsOpen: I, selectContainerRef: N, optionsSelect: w } = Se(x);
448
448
  let h = U.colors.backgroundColors.colorBackgroundSnow;
449
- o ? h = U.colors.neutralColors.colorNeutralCloudy : n !== "primary" && (h = U.colors.neutralColors.colorNeutralDark);
450
- const b = {
451
- ...D
449
+ o ? h = U.colors.neutralColors.colorNeutralCloudy : a !== "primary" && (h = U.colors.neutralColors.colorNeutralDark);
450
+ const m = {
451
+ ...H
452
452
  };
453
453
  return /* @__PURE__ */ t.jsxs(
454
454
  he,
455
455
  {
456
456
  ref: N,
457
- width: u,
457
+ width: f,
458
458
  size: p,
459
459
  disabled: o,
460
460
  onBlur: () => setTimeout(() => I(!1), Ne),
@@ -466,13 +466,13 @@ const Ue = ({
466
466
  type: "button",
467
467
  size: p,
468
468
  disabled: o,
469
- variant: n,
469
+ variant: a,
470
470
  isLoading: l,
471
- onClick: () => !l && I(!g),
471
+ onClick: () => !l && I(!b),
472
472
  id: `button-component-${r}`,
473
473
  "data-cy": `button-component-${r}`,
474
474
  children: [
475
- l && /* @__PURE__ */ t.jsx(xe, { size: p, disabled: o, variant: n, children: /* @__PURE__ */ t.jsx(
475
+ l && /* @__PURE__ */ t.jsx(xe, { size: p, disabled: o, variant: a, children: /* @__PURE__ */ t.jsx(
476
476
  te,
477
477
  {
478
478
  iconName: `ProgressActivity${p === "Small" ? "Ant" : "Sm"}`,
@@ -481,7 +481,7 @@ const Ue = ({
481
481
  }
482
482
  ) }),
483
483
  !l && /* @__PURE__ */ t.jsx("p", { title: r, children: r }),
484
- !l && (g ? /* @__PURE__ */ t.jsx(
484
+ !l && (b ? /* @__PURE__ */ t.jsx(
485
485
  te,
486
486
  {
487
487
  iconName: `ExpandLess${p === "Small" ? "Ant" : "Sm"}`,
@@ -499,8 +499,8 @@ const Ue = ({
499
499
  ]
500
500
  }
501
501
  ),
502
- g && /* @__PURE__ */ t.jsx(
503
- pe,
502
+ b && /* @__PURE__ */ t.jsx(
503
+ ge,
504
504
  {
505
505
  selectContainerRef: N,
506
506
  value: null,
@@ -510,7 +510,7 @@ const Ue = ({
510
510
  inputValue: null,
511
511
  iconPosition: S,
512
512
  iconName: R,
513
- ...b
513
+ ...m
514
514
  }
515
515
  )
516
516
  ]
@@ -518,15 +518,15 @@ const Ue = ({
518
518
  );
519
519
  }, Pe = ({
520
520
  width: r = "100%",
521
- height: n = "fit-content",
522
- flex: u,
521
+ height: a = "fit-content",
522
+ flex: f,
523
523
  backgroundColor: p = U.colors.backgroundColors.colorBackgroundCarpet,
524
524
  upperComponent: o = void 0,
525
525
  options: l = [],
526
526
  lowerComponent: c = void 0,
527
- heightItems: f = "60px",
527
+ heightItems: x = "60px",
528
528
  widthItems: k = "155px",
529
- emptyProps: D = {
529
+ emptyProps: H = {
530
530
  title: "Nenhum dado a ser mostrado",
531
531
  body: null
532
532
  },
@@ -535,13 +535,13 @@ const Ue = ({
535
535
  borderRadius: "8px"
536
536
  },
537
537
  customItemStyles: S = {},
538
- selectedKey: g,
538
+ selectedKey: b,
539
539
  onSelect: I,
540
540
  selectedItemKey: N,
541
541
  setSelectedItemKey: w
542
542
  }) => {
543
- var L;
544
- const h = g !== void 0, b = !h && N !== void 0, [$, C] = P(((L = l[0]) == null ? void 0 : L.key) ?? null), T = X(null), M = X(null), x = h ? g : b ? N : $, a = Y(() => l.length ? x == null ? h ? null : l[0] : l.find((i) => i.key === x) ?? (h || b ? null : l[0]) : null, [l, x, h, b]);
543
+ var O;
544
+ const h = b !== void 0, m = !h && N !== void 0, [C, $] = J(((O = l[0]) == null ? void 0 : O.key) ?? null), T = X(null), M = X(null), g = h ? b : m ? N : C, n = G(() => l.length ? g == null ? h ? null : l[0] : l.find((i) => i.key === g) ?? (h || m ? null : l[0]) : null, [l, g, h, m]);
545
545
  Q(() => {
546
546
  const d = T.current, i = M.current, W = () => {
547
547
  d && i && (i.scrollTop = d.scrollTop);
@@ -550,31 +550,31 @@ const Ue = ({
550
550
  d == null || d.removeEventListener("scroll", W);
551
551
  };
552
552
  }, []), Q(() => {
553
- if (!(h || b)) {
553
+ if (!(h || m)) {
554
554
  if (!l.length) {
555
- C(null);
555
+ $(null);
556
556
  return;
557
557
  }
558
- C((d) => d != null && l.some((i) => i.key === d) ? d : l[0].key);
558
+ $((d) => d != null && l.some((i) => i.key === d) ? d : l[0].key);
559
559
  }
560
- }, [l, h, b]);
561
- const F = (d) => {
562
- I == null || I(d), w == null || w(d.key), !h && !b && C(d.key);
560
+ }, [l, h, m]);
561
+ const D = (d) => {
562
+ I == null || I(d), w == null || w(d.key), !h && !m && $(d.key);
563
563
  };
564
564
  return (l == null ? void 0 : l.length) === 0 ? /* @__PURE__ */ t.jsx(
565
565
  ie,
566
566
  {
567
- title: D.title,
568
- body: D.body,
567
+ title: H.title,
568
+ body: H.body,
569
569
  flex: "1",
570
570
  mode: "table"
571
571
  }
572
572
  ) : /* @__PURE__ */ t.jsxs(
573
- q,
573
+ P,
574
574
  {
575
575
  width: r,
576
- height: n,
577
- flex: u,
576
+ height: a,
577
+ flex: f,
578
578
  backgroundColor: p,
579
579
  direction: "horizontal",
580
580
  customStyles: {
@@ -584,42 +584,42 @@ const Ue = ({
584
584
  overflow: "hidden"
585
585
  },
586
586
  children: [
587
- /* @__PURE__ */ t.jsxs(ge, { ref: T, widthItems: k, children: [
587
+ /* @__PURE__ */ t.jsxs(pe, { ref: T, widthItems: k, children: [
588
588
  o && o,
589
589
  l == null ? void 0 : l.map((d) => /* @__PURE__ */ t.jsx(
590
590
  be,
591
591
  {
592
- selected: x === d.key,
593
- onClick: () => F(d),
592
+ selected: g === d.key,
593
+ onClick: () => D(d),
594
594
  withBorderRight: !0,
595
- heightItems: f,
595
+ heightItems: x,
596
596
  customStyles: S,
597
597
  children: d.item
598
598
  },
599
599
  d.key
600
600
  )),
601
601
  c && c,
602
- /* @__PURE__ */ t.jsx(je, {})
602
+ /* @__PURE__ */ t.jsx(me, {})
603
603
  ] }),
604
- /* @__PURE__ */ t.jsx(me, { children: a && (a == null ? void 0 : a.contentItem) })
604
+ /* @__PURE__ */ t.jsx(je, { children: n && (n == null ? void 0 : n.contentItem) })
605
605
  ]
606
606
  }
607
607
  );
608
608
  };
609
609
  function Te(r) {
610
- return (n) => typeof r == "string" ? n[r] : typeof r == "function" ? r(n) : (console.warn("Please, setup a rowKey for table."), JSON.stringify(n));
610
+ return (a) => typeof r == "string" ? a[r] : typeof r == "function" ? r(a) : (console.warn("Please, setup a rowKey for table."), JSON.stringify(a));
611
611
  }
612
612
  function Je({
613
613
  id: r,
614
- rowKey: n = "id",
615
- size: u = "Small",
614
+ rowKey: a = "id",
615
+ size: f = "Small",
616
616
  onRowClick: p,
617
617
  fit: o = !1,
618
618
  maxHeight: l = "40rem",
619
619
  columns: c,
620
- dataSource: f,
621
- columnsTextSize: k = u,
622
- emptyProps: D = {
620
+ dataSource: x,
621
+ columnsTextSize: k = f,
622
+ emptyProps: H = {
623
623
  width: "100%",
624
624
  height: "100%",
625
625
  title: "Nenhum dado a ser mostrado.",
@@ -629,63 +629,63 @@ function Je({
629
629
  },
630
630
  selectedRow: R = !1,
631
631
  hideHeader: S = !1,
632
- withBorder: g = !0,
632
+ withBorder: b = !0,
633
633
  withBorderRadius: I = !0,
634
634
  striped: N = !1,
635
635
  borderRadius: w = U.borders.borderRadius.borderRadiusSm,
636
636
  disableMaxHeight: h = !1,
637
- isVisible: b = !1
637
+ isVisible: m = !1
638
638
  }) {
639
- const $ = Y(() => Te(n), [n]), [C, T] = P(null), M = X(null), x = X(null), [a, F] = P(c);
639
+ const C = G(() => Te(a), [a]), [$, T] = J(null), M = X(null), g = X(null), [n, D] = J(c);
640
640
  Ae(() => {
641
- if (!x.current || c.length === 0) {
642
- F(c);
641
+ if (!g.current || c.length === 0) {
642
+ D(c);
643
643
  return;
644
644
  }
645
645
  const i = () => {
646
- var G;
647
- const m = ((G = x.current) == null ? void 0 : G.clientWidth) || 0;
648
- if (m === 0) return;
649
- let H = 0, s = 0;
646
+ var _;
647
+ const u = ((_ = g.current) == null ? void 0 : _.clientWidth) || 0;
648
+ if (u === 0) return;
649
+ let L = 0, s = 0;
650
650
  const e = [], j = [];
651
651
  c.forEach((V) => {
652
- const O = Number(V.flex);
653
- V.width ? H += parseInt(V.width, 10) || 0 : V.flex && O > 0 ? (s += O, e.push(V)) : j.push(V);
652
+ const E = Number(V.flex);
653
+ V.width ? L += parseInt(V.width, 10) || 0 : V.flex && E > 0 ? (s += E, e.push(V)) : j.push(V);
654
654
  });
655
- const E = m - H, A = "80";
656
- let y = [...c];
657
- if (E > 0) {
655
+ const F = u - L, y = "80";
656
+ let A = [...c];
657
+ if (F > 0) {
658
658
  if (e.length > 0) {
659
- const V = E / s;
660
- y = c.map((O) => {
661
- const J = Number(O.flex);
662
- if (J && J > 0) {
663
- const v = parseInt(O.minWidth || A, 10), ee = J * V, re = Math.max(ee, v);
664
- return { ...O, width: `${Math.floor(re)}px` };
659
+ const V = F / s;
660
+ A = c.map((E) => {
661
+ const Y = Number(E.flex);
662
+ if (Y && Y > 0) {
663
+ const v = parseInt(E.minWidth || y, 10), ee = Y * V, ne = Math.max(ee, v);
664
+ return { ...E, width: `${Math.floor(ne)}px` };
665
665
  }
666
- return !O.width && !J ? {
667
- ...O,
668
- width: O.minWidth || `${A}px`
669
- } : O;
666
+ return !E.width && !Y ? {
667
+ ...E,
668
+ width: E.minWidth || `${y}px`
669
+ } : E;
670
670
  });
671
671
  } else if (j.length > 0) {
672
- const V = E / j.length;
673
- y = c.map((O) => {
674
- const J = Number(O.flex);
675
- if (!O.width && !J) {
676
- const v = parseInt(O.minWidth || A, 10), ee = Math.max(V, v);
677
- return { ...O, width: `${Math.floor(ee)}px` };
672
+ const V = F / j.length;
673
+ A = c.map((E) => {
674
+ const Y = Number(E.flex);
675
+ if (!E.width && !Y) {
676
+ const v = parseInt(E.minWidth || y, 10), ee = Math.max(V, v);
677
+ return { ...E, width: `${Math.floor(ee)}px` };
678
678
  }
679
- return O;
679
+ return E;
680
680
  });
681
681
  }
682
682
  } else
683
- y = c.map((V) => V.width ? V : { ...V, width: V.minWidth || `${A}px` });
684
- F(y);
683
+ A = c.map((V) => V.width ? V : { ...V, width: V.minWidth || `${y}px` });
684
+ D(A);
685
685
  };
686
686
  i();
687
687
  const W = new ResizeObserver(i);
688
- return W.observe(x.current), () => W.disconnect();
688
+ return W.observe(g.current), () => W.disconnect();
689
689
  }, [c]), Q(() => {
690
690
  const i = (W) => {
691
691
  M.current && !M.current.contains(W.target) && T(null);
@@ -694,22 +694,22 @@ function Je({
694
694
  document.removeEventListener("mousedown", i);
695
695
  };
696
696
  }, []);
697
- const L = Y(() => a ? a.some(
697
+ const O = G(() => n ? n.some(
698
698
  (i) => i.mergeHeaderId && i.mergeHeaderLabel
699
- ) : !1, [a]), d = Y(() => {
700
- var H, s;
701
- if (S || !a || a.length === 0)
699
+ ) : !1, [n]), d = G(() => {
700
+ var L, s;
701
+ if (S || !n || n.length === 0)
702
702
  return null;
703
- if (!L)
703
+ if (!O)
704
704
  return /* @__PURE__ */ t.jsx(
705
705
  Z,
706
706
  {
707
707
  isHeader: !0,
708
- size: u,
708
+ size: f,
709
709
  numRows: 1,
710
710
  borderRadius: w,
711
- children: a.map((e) => {
712
- var j;
711
+ children: n.map((e, j) => {
712
+ var F;
713
713
  return /* @__PURE__ */ t.jsx(
714
714
  z,
715
715
  {
@@ -717,11 +717,12 @@ function Je({
717
717
  minWidth: e.minWidth,
718
718
  maxWidth: e.maxWidth,
719
719
  horizontalAlign: e.horizontalAlign,
720
- size: u,
720
+ size: f,
721
721
  columnsTextSize: k,
722
- withBorder: g,
722
+ withBorder: b,
723
723
  headerAlign: e.headerAlign,
724
- children: ((j = e.columnRender) == null ? void 0 : j.call(e, f)) || /* @__PURE__ */ t.jsx("span", { title: e.label, children: e.label })
724
+ isLastColumn: j === n.length - 1,
725
+ children: ((F = e.columnRender) == null ? void 0 : F.call(e, x)) || /* @__PURE__ */ t.jsx("span", { title: e.label, children: e.label })
725
726
  },
726
727
  e.dataIndex
727
728
  );
@@ -729,13 +730,13 @@ function Je({
729
730
  }
730
731
  );
731
732
  const i = [], W = [];
732
- let m = 0;
733
- for (; m < a.length; ) {
734
- const e = a[m];
733
+ let u = 0;
734
+ for (; u < n.length; ) {
735
+ const e = n[u];
735
736
  if (e.mergeHeaderId && e.mergeHeaderLabel) {
736
737
  let j = 0;
737
- const E = e.mergeHeaderId;
738
- for (let A = m; A < a.length && a[A].mergeHeaderId === E; A++)
738
+ const F = e.mergeHeaderId;
739
+ for (let y = u; y < n.length && n[y].mergeHeaderId === F; y++)
739
740
  j++;
740
741
  i.push(
741
742
  /* @__PURE__ */ t.jsx(
@@ -743,40 +744,42 @@ function Je({
743
744
  {
744
745
  colSpan: j,
745
746
  horizontalAlign: "center",
746
- size: u,
747
+ size: f,
747
748
  columnsTextSize: k,
748
- withBorder: g,
749
+ withBorder: b,
749
750
  width: e.width,
750
751
  minWidth: e.minWidth,
751
752
  maxWidth: e.maxWidth,
752
753
  headerAlign: e.headerAlign,
753
754
  isTopRow: !0,
755
+ isLastColumn: u + j - 1 === n.length - 1,
754
756
  children: /* @__PURE__ */ t.jsx("span", { title: e.mergeHeaderLabel, children: e.mergeHeaderLabel })
755
757
  },
756
758
  `${e.mergeHeaderId}-merged`
757
759
  )
758
760
  );
759
- for (let A = 0; A < j; A++) {
760
- const y = a[m + A];
761
+ for (let y = 0; y < j; y++) {
762
+ const A = n[u + y];
761
763
  W.push(
762
764
  /* @__PURE__ */ t.jsx(
763
765
  z,
764
766
  {
765
- width: y.width,
766
- minWidth: y.minWidth,
767
- maxWidth: y.maxWidth,
768
- horizontalAlign: y.horizontalAlign,
769
- size: u,
767
+ width: A.width,
768
+ minWidth: A.minWidth,
769
+ maxWidth: A.maxWidth,
770
+ horizontalAlign: A.horizontalAlign,
771
+ size: f,
770
772
  columnsTextSize: k,
771
- withBorder: g,
773
+ withBorder: b,
772
774
  headerAlign: e.headerAlign,
773
- children: ((H = y.columnRender) == null ? void 0 : H.call(y, f)) || /* @__PURE__ */ t.jsx("span", { title: y.label, children: y.label })
775
+ isLastColumn: u + y === n.length - 1,
776
+ children: ((L = A.columnRender) == null ? void 0 : L.call(A, x)) || /* @__PURE__ */ t.jsx("span", { title: A.label, children: A.label })
774
777
  },
775
- y.dataIndex + "-individual"
778
+ A.dataIndex + "-individual"
776
779
  )
777
780
  );
778
781
  }
779
- m += j;
782
+ u += j;
780
783
  } else
781
784
  i.push(
782
785
  /* @__PURE__ */ t.jsx(
@@ -787,23 +790,24 @@ function Je({
787
790
  minWidth: e.minWidth,
788
791
  maxWidth: e.maxWidth,
789
792
  horizontalAlign: e.horizontalAlign,
790
- size: u,
793
+ size: f,
791
794
  columnsTextSize: k,
792
- withBorder: g,
795
+ withBorder: b,
793
796
  headerAlign: e.headerAlign,
794
797
  isTopRow: !0,
795
- children: ((s = e.columnRender) == null ? void 0 : s.call(e, f)) || /* @__PURE__ */ t.jsx("span", { title: e.label, children: e.label })
798
+ isLastColumn: u === n.length - 1,
799
+ children: ((s = e.columnRender) == null ? void 0 : s.call(e, x)) || /* @__PURE__ */ t.jsx("span", { title: e.label, children: e.label })
796
800
  },
797
801
  e.dataIndex
798
802
  )
799
- ), m++;
803
+ ), u++;
800
804
  }
801
805
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
802
806
  /* @__PURE__ */ t.jsx(
803
807
  Z,
804
808
  {
805
809
  isHeader: !0,
806
- size: u,
810
+ size: f,
807
811
  numRows: 2,
808
812
  borderRadius: w,
809
813
  children: i
@@ -813,21 +817,21 @@ function Je({
813
817
  Z,
814
818
  {
815
819
  isHeader: !0,
816
- size: u,
820
+ size: f,
817
821
  numRows: 2,
818
822
  borderRadius: w,
819
823
  children: W
820
824
  }
821
825
  )
822
826
  ] });
823
- }, [a, S, u, k, L]);
824
- return !f || f.length === 0 ? /* @__PURE__ */ t.jsx(
827
+ }, [n, S, f, k, O]);
828
+ return !x || x.length === 0 ? /* @__PURE__ */ t.jsx(
825
829
  ie,
826
830
  {
827
831
  backgroundColor: U.colors.backgroundColors.colorBackgroundSnow,
828
832
  borders: !0,
829
833
  mode: "table",
830
- ...D
834
+ ...H
831
835
  }
832
836
  ) : /* @__PURE__ */ t.jsx(
833
837
  we,
@@ -835,84 +839,85 @@ function Je({
835
839
  maxHeight: l,
836
840
  disableMaxHeight: h,
837
841
  withBorderRadius: I,
838
- ref: x,
842
+ ref: g,
839
843
  borderRadius: w,
840
- isVisible: b,
844
+ isVisible: m,
841
845
  children: /* @__PURE__ */ t.jsxs(We, { id: r, ref: M, children: [
842
846
  /* @__PURE__ */ t.jsx("thead", { children: d }),
843
- /* @__PURE__ */ t.jsx("tbody", { style: { width: "100%" }, children: f == null ? void 0 : f.map((i, W, m) => {
844
- const H = $(i);
847
+ /* @__PURE__ */ t.jsx("tbody", { style: { width: "100%" }, children: x == null ? void 0 : x.map((i, W, u) => {
848
+ const L = C(i);
845
849
  return /* @__PURE__ */ t.jsx(
846
850
  Z,
847
851
  {
848
- isLast: W === m.length - 1,
852
+ isLast: W === u.length - 1,
849
853
  fit: o,
850
- size: u,
851
- withBorder: g,
852
- isSelected: H === C && R,
854
+ size: f,
855
+ withBorder: b,
856
+ isSelected: L === $ && R,
853
857
  striped: N && W % 2 !== 0,
854
858
  borderRadius: w,
855
- children: a.map((s) => {
856
- var e, j, E, A, y;
859
+ children: n.map((s, e) => {
860
+ var j, F, y, A, _;
857
861
  return /* @__PURE__ */ t.jsx(
858
862
  Ie,
859
863
  {
860
864
  width: s.width,
861
865
  minWidth: s.minWidth,
862
866
  maxWidth: s.maxWidth,
863
- size: u,
864
- isClickable: _(p),
867
+ size: f,
868
+ isClickable: q(p),
869
+ isLastColumn: e === n.length - 1,
865
870
  onClick: () => {
866
871
  p && p(i, s, W), R && T(
867
- C === H ? null : H
872
+ $ === L ? null : L
868
873
  );
869
874
  },
870
875
  horizontalAlign: s.horizontalAlign,
871
876
  verticalAlign: s.verticalAlign,
872
877
  rowPadding: s.rowPadding,
873
- withBorder: g,
874
- isLast: W === m.length - 1,
875
- disabled: (e = s.disable) == null ? void 0 : e.call(
878
+ withBorder: b,
879
+ isLast: W === u.length - 1,
880
+ disabled: (j = s.disable) == null ? void 0 : j.call(
876
881
  s,
877
882
  i[s.dataIndex],
878
883
  i,
879
884
  W,
880
- m
885
+ u
881
886
  ),
882
- hasError: (j = s.warn) == null ? void 0 : j.call(
887
+ hasError: (F = s.warn) == null ? void 0 : F.call(
883
888
  s,
884
889
  i[s.dataIndex],
885
890
  i,
886
891
  W,
887
- m
892
+ u
888
893
  ),
889
- backgroundColor: (E = s.paint) == null ? void 0 : E.call(
894
+ backgroundColor: (y = s.paint) == null ? void 0 : y.call(
890
895
  s,
891
896
  i[s.dataIndex],
892
897
  i,
893
898
  W,
894
- m
899
+ u
895
900
  ),
896
901
  children: ((A = s.render) == null ? void 0 : A.call(
897
902
  s,
898
903
  i[s.dataIndex],
899
904
  i,
900
905
  W,
901
- m
906
+ u
902
907
  )) || /* @__PURE__ */ t.jsx(
903
908
  ye,
904
909
  {
905
910
  title: i[s.dataIndex],
906
- style: (y = s.rowCss) == null ? void 0 : y.call(s, i),
911
+ style: (_ = s.rowCss) == null ? void 0 : _.call(s, i),
907
912
  children: i[s.dataIndex]
908
913
  }
909
914
  ) || ""
910
915
  },
911
- `${H}::${s.dataIndex}`
916
+ `${L}::${s.dataIndex}`
912
917
  );
913
918
  })
914
919
  },
915
- H
920
+ L
916
921
  );
917
922
  }) })
918
923
  ] })
@@ -920,7 +925,7 @@ function Je({
920
925
  );
921
926
  }
922
927
  export {
923
- Le as C,
928
+ Fe as C,
924
929
  Ee as D,
925
930
  Ve as F,
926
931
  Ue as M,