@archbase/components 3.0.12 → 3.0.13
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/index.js +475 -475
- package/package.json +4 -4
- package/src/datagrid/main/archbase-data-grid.tsx +5 -5
package/dist/index.js
CHANGED
|
@@ -3,8 +3,8 @@ import { useMantineTheme as Mt, useMantineColorScheme as Lt, TextInput as st, To
|
|
|
3
3
|
import { ActionIcon as tm, Badge as rm, Breadcrumbs as nm, Button as im, Fieldset as om, Loader as sm, Alert as am, Image as lm, NavLink as cm, Notification as dm, Pagination as um, Progress as hm, Text as fm, Title as pm } from "@mantine/core";
|
|
4
4
|
import { useForceUpdate as nt, useUncontrolled as on, useDidUpdate as da, useDebouncedValue as si, useDebouncedState as ua, useId as ha, useMediaQuery as Oi, useElementSize as Fo, useHotkeys as fa, useDisclosure as pa, useLocalStorage as Bo } from "@mantine/hooks";
|
|
5
5
|
import * as _i from "react";
|
|
6
|
-
import He, { useState as k, useRef as ue, useEffect as
|
|
7
|
-
import { DataSourceEventNames as
|
|
6
|
+
import He, { useState as k, useRef as ue, useEffect as U, useCallback as T, forwardRef as ai, useContext as _t, memo as xr, useMemo as Ge, Fragment as ma, useLayoutEffect as ga, Component as ya, Children as qn, isValidElement as Yn, useImperativeHandle as ba } from "react";
|
|
7
|
+
import { DataSourceEventNames as q, useArchbaseDidUpdate as at, useArchbaseV1V2Compatibility as Ze, ArchbaseDataSource as an, useArchbaseDataSourceListener as Oo } from "@archbase/data";
|
|
8
8
|
import { useValidationErrors as it, convertISOStringToDate as ln, useArchbaseTranslation as Xe, useArchbaseTheme as Zt, processErrorMessage as wa, isBase64 as Vr, formatStr as ar, ArchbaseObjectHelper as Bt, ArchbaseError as cn, isBase64Validate as Ca, useArchbaseSize as va, isLastElementOfArray as xa, useArchbaseBool as Ea, archbaseI18next as Xt, getPathDepthLevel as _o, setNestedObjectValue as ka, emit as tr, builder as Qt, EQ as jo, NEQ as Ho, GT as Qn, LT as Xn, GE as Wo, LE as Uo, OUT as Aa, IN as Sa, BT as ji, ArchbaseMasker as Da, useArchbaseAppContext as Ta } from "@archbase/core";
|
|
9
9
|
import { pickCalendarProps as za, useDatesContext as Ia, Calendar as $a, HiddenDatesInput as Ra, DateTimePicker as Pa, DatePickerInput as Hi, TimeInput as jr } from "@mantine/dates";
|
|
10
10
|
import vt from "dayjs";
|
|
@@ -72,8 +72,8 @@ function pf({
|
|
|
72
72
|
minLength: _,
|
|
73
73
|
maxLength: W
|
|
74
74
|
}) {
|
|
75
|
-
const [z, S] = k(p || ""), $ = ue(null),
|
|
76
|
-
|
|
75
|
+
const [z, S] = k(p || ""), $ = ue(null), G = Mt(), { colorScheme: v } = Lt(), [P, M] = k(c), O = nt(), I = it(), x = `${t}`, j = I?.getError(x), A = e && ("appendToFieldArray" in e || "updateFieldArrayItem" in e), [F, L] = k(""), [C, H] = k(0);
|
|
76
|
+
U(() => {
|
|
77
77
|
c !== void 0 && c !== P && M(c);
|
|
78
78
|
}, [c]);
|
|
79
79
|
const J = () => {
|
|
@@ -82,15 +82,15 @@ function pf({
|
|
|
82
82
|
}, ee = T(() => {
|
|
83
83
|
J();
|
|
84
84
|
}, []), ke = T((ne) => {
|
|
85
|
-
e && t && ((ne.type ===
|
|
85
|
+
e && t && ((ne.type === q.dataChanged || ne.type === q.recordChanged || ne.type === q.afterScroll || ne.type === q.afterCancel || ne.type === q.afterEdit) && (J(), A || O()), ne.type === q.onFieldError && ne.fieldName === t && (M(ne.error), I?.setError(x, ne.error), A || O()));
|
|
86
86
|
}, [A, e, t, J, O, I, x]), de = ue(ke);
|
|
87
|
-
|
|
87
|
+
U(() => {
|
|
88
88
|
de.current = ke;
|
|
89
89
|
}, [ke]);
|
|
90
90
|
const oe = T((ne) => {
|
|
91
91
|
de.current(ne);
|
|
92
92
|
}, []);
|
|
93
|
-
|
|
93
|
+
U(() => {
|
|
94
94
|
if (J(), e && t) {
|
|
95
95
|
const ne = typeof e.addFieldChangeListener == "function";
|
|
96
96
|
return e.addListener(oe), ne && e.addFieldChangeListener(t, ee), () => {
|
|
@@ -141,7 +141,7 @@ function pf({
|
|
|
141
141
|
Se,
|
|
142
142
|
{
|
|
143
143
|
style: {
|
|
144
|
-
backgroundColor: X === "filled" ? v === "dark" ?
|
|
144
|
+
backgroundColor: X === "filled" ? v === "dark" ? G.colors[G.primaryColor][5] : G.colors[G.primaryColor][6] : void 0
|
|
145
145
|
},
|
|
146
146
|
tabIndex: -1,
|
|
147
147
|
variant: X,
|
|
@@ -183,8 +183,8 @@ function mf({
|
|
|
183
183
|
a
|
|
184
184
|
);
|
|
185
185
|
process.env.NODE_ENV;
|
|
186
|
-
const B = it(), V = `${t}`, X = B?.getError(V), [_, W] = k(c), z = ue(null), [S, $] = k(f),
|
|
187
|
-
|
|
186
|
+
const B = it(), V = `${t}`, X = B?.getError(V), [_, W] = k(c), z = ue(null), [S, $] = k(f), G = nt();
|
|
187
|
+
U(() => {
|
|
188
188
|
f !== void 0 && f !== S && $(f);
|
|
189
189
|
}, [f]);
|
|
190
190
|
const v = () => {
|
|
@@ -197,15 +197,15 @@ function mf({
|
|
|
197
197
|
}, P = T(() => {
|
|
198
198
|
v();
|
|
199
199
|
}, []), M = T((C) => {
|
|
200
|
-
e && t && ((C.type ===
|
|
200
|
+
e && t && ((C.type === q.dataChanged || C.type === q.recordChanged || C.type === q.afterScroll || C.type === q.afterCancel || C.type === q.afterEdit) && (v(), D.isDataSourceV2 || G()), C.type === q.onFieldError && C.fieldName === t && ($(C.error), B?.setError(V, C.error)));
|
|
201
201
|
}, [D.isDataSourceV2, B, V]), O = ue(M);
|
|
202
|
-
|
|
202
|
+
U(() => {
|
|
203
203
|
O.current = M;
|
|
204
204
|
}, [M]);
|
|
205
205
|
const I = T((C) => {
|
|
206
206
|
O.current(C);
|
|
207
207
|
}, []);
|
|
208
|
-
|
|
208
|
+
U(() => {
|
|
209
209
|
if (v(), e && t) {
|
|
210
210
|
const C = typeof e.addFieldChangeListener == "function";
|
|
211
211
|
return e.addListener(I), C && e.addFieldChangeListener(t, P), () => {
|
|
@@ -370,7 +370,7 @@ function ti(e) {
|
|
|
370
370
|
unstyled: z,
|
|
371
371
|
classNames: S,
|
|
372
372
|
styles: $,
|
|
373
|
-
allowDeselect:
|
|
373
|
+
allowDeselect: G,
|
|
374
374
|
preserveTime: v,
|
|
375
375
|
date: P,
|
|
376
376
|
defaultDate: M,
|
|
@@ -423,10 +423,10 @@ function ti(e) {
|
|
|
423
423
|
}, Re = () => {
|
|
424
424
|
let pe = V;
|
|
425
425
|
return A && !V && (pe = V || we.isReadOnly), pe;
|
|
426
|
-
}, Ne = f || $e, he = a ||
|
|
426
|
+
}, Ne = f || $e, he = a || G, Ue = T(() => {
|
|
427
427
|
Ye();
|
|
428
428
|
}, []), Pe = T((pe) => {
|
|
429
|
-
A && F && ((pe.type ===
|
|
429
|
+
A && F && ((pe.type === q.dataChanged || pe.type === q.recordChanged || pe.type === q.afterScroll || pe.type === q.afterCancel || pe.type === q.afterEdit) && (Ye(), we.isDataSourceV2 || ve()), pe.type === q.onFieldError && pe.fieldName === F && (le(pe.error), ze?.setError(Ce, pe.error)));
|
|
430
430
|
}, [we.isDataSourceV2, ze, Ce]), Ye = T(() => {
|
|
431
431
|
if (A && F) {
|
|
432
432
|
const pe = A.getFieldValue(F);
|
|
@@ -452,13 +452,13 @@ function ti(e) {
|
|
|
452
452
|
pe && typeof pe != "string" && (Fe = xe(pe)), we.handleValueChange(Fe);
|
|
453
453
|
}
|
|
454
454
|
}, [we.handleValueChange, j]), N = ue(Pe);
|
|
455
|
-
|
|
455
|
+
U(() => {
|
|
456
456
|
N.current = Pe;
|
|
457
457
|
}, [Pe]);
|
|
458
458
|
const ae = T((pe) => {
|
|
459
459
|
N.current(pe);
|
|
460
460
|
}, []);
|
|
461
|
-
|
|
461
|
+
U(() => {
|
|
462
462
|
if (Ye(), A && F) {
|
|
463
463
|
const pe = typeof A.addFieldChangeListener == "function";
|
|
464
464
|
return A.addListener(ae), pe && A.addFieldChangeListener(F, Ue), () => {
|
|
@@ -467,11 +467,11 @@ function ti(e) {
|
|
|
467
467
|
}
|
|
468
468
|
}, [A, F, ae, Ue]), at(() => {
|
|
469
469
|
Ye();
|
|
470
|
-
}, []),
|
|
470
|
+
}, []), U(() => {
|
|
471
471
|
e.error !== void 0 && e.error !== ie && le(e.error);
|
|
472
|
-
}, [e.error]),
|
|
472
|
+
}, [e.error]), U(() => {
|
|
473
473
|
Q && ne && R(ne.toISOString().split("T")[0]);
|
|
474
|
-
}, [Q, ne]),
|
|
474
|
+
}, [Q, ne]), U(() => {
|
|
475
475
|
se(xe(ne));
|
|
476
476
|
}, [oe.locale]);
|
|
477
477
|
const [fe, Te] = k(!1), qe = (pe) => {
|
|
@@ -516,7 +516,7 @@ function ti(e) {
|
|
|
516
516
|
}
|
|
517
517
|
}
|
|
518
518
|
};
|
|
519
|
-
},
|
|
519
|
+
}, Y = W || (a && ne && !Re() ? /* @__PURE__ */ n(
|
|
520
520
|
Ur,
|
|
521
521
|
{
|
|
522
522
|
variant: "transparent",
|
|
@@ -553,7 +553,7 @@ function ti(e) {
|
|
|
553
553
|
autoComplete: "off",
|
|
554
554
|
ref: de,
|
|
555
555
|
component: Go,
|
|
556
|
-
rightSection:
|
|
556
|
+
rightSection: Y,
|
|
557
557
|
lazy: !I,
|
|
558
558
|
placeholderChar: x,
|
|
559
559
|
mask: rr[j].mask,
|
|
@@ -668,7 +668,7 @@ function gf({
|
|
|
668
668
|
defaultValue: z,
|
|
669
669
|
filter: S,
|
|
670
670
|
size: $,
|
|
671
|
-
style:
|
|
671
|
+
style: G,
|
|
672
672
|
width: v,
|
|
673
673
|
initiallyOpened: P,
|
|
674
674
|
itemComponent: M = Ol,
|
|
@@ -701,27 +701,27 @@ function gf({
|
|
|
701
701
|
}, ae = T(() => {
|
|
702
702
|
N();
|
|
703
703
|
}, []), fe = T((Ae) => {
|
|
704
|
-
r && i && ((Ae.type ===
|
|
704
|
+
r && i && ((Ae.type === q.dataChanged || Ae.type === q.recordChanged || Ae.type === q.afterScroll || Ae.type === q.afterCancel) && (N(), de.isDataSourceV2 || ke()), Ae.type === q.beforeClose && te([]), Ae.type === q.onFieldError && Ae.fieldName === i && (ge(Ae.error), oe?.setError(we, Ae.error)));
|
|
705
705
|
}, [de.isDataSourceV2, oe, we]), Te = ue(fe);
|
|
706
|
-
|
|
706
|
+
U(() => {
|
|
707
707
|
Te.current = fe;
|
|
708
708
|
}, [fe]);
|
|
709
709
|
const qe = T((Ae) => {
|
|
710
710
|
Te.current(Ae);
|
|
711
711
|
}, []);
|
|
712
|
-
|
|
712
|
+
U(() => {
|
|
713
713
|
if (N(), r && i) {
|
|
714
714
|
const Ae = typeof r.addFieldChangeListener == "function";
|
|
715
715
|
return r.addListener(qe), Ae && r.addFieldChangeListener(i, ae), () => {
|
|
716
716
|
r.removeListener(qe), Ae && r.removeFieldChangeListener(i, ae);
|
|
717
717
|
};
|
|
718
718
|
}
|
|
719
|
-
}, [r, i, qe, ae]),
|
|
719
|
+
}, [r, i, qe, ae]), U(() => {
|
|
720
720
|
H && H(be), be && be.length >= l && (xe(!0), De(0, !1));
|
|
721
|
-
}, [be]),
|
|
721
|
+
}, [be]), U(() => {
|
|
722
722
|
}, [ce, $e]), at(() => {
|
|
723
723
|
N();
|
|
724
|
-
}, []),
|
|
724
|
+
}, []), U(() => {
|
|
725
725
|
p !== void 0 && p !== Ye && ge(p);
|
|
726
726
|
}, [p]);
|
|
727
727
|
const Ke = (Ae) => J && Ae ? J(Ae) : Ae, Je = (Ae) => {
|
|
@@ -744,7 +744,7 @@ function gf({
|
|
|
744
744
|
V && V(Ae);
|
|
745
745
|
}, Ve = () => {
|
|
746
746
|
be && be.length >= l && ce < $e - 1 && (xe(!0), De(ce + 1, !0));
|
|
747
|
-
},
|
|
747
|
+
}, Y = (Ae) => {
|
|
748
748
|
ne || ve(Ae), Ae && Ae.length >= l && Ce.openDropdown();
|
|
749
749
|
}, De = async (Ae, lt = !1) => {
|
|
750
750
|
B(Ae, be).then(
|
|
@@ -794,7 +794,7 @@ function gf({
|
|
|
794
794
|
description: f,
|
|
795
795
|
error: Ye || ze,
|
|
796
796
|
required: m,
|
|
797
|
-
style:
|
|
797
|
+
style: G,
|
|
798
798
|
onClick: () => Ce.openDropdown(),
|
|
799
799
|
rightSection: /* @__PURE__ */ b(ot, { children: [
|
|
800
800
|
R && /* @__PURE__ */ n(sn, { size: "xs" }),
|
|
@@ -819,7 +819,7 @@ function gf({
|
|
|
819
819
|
readOnly: pe(),
|
|
820
820
|
value: le,
|
|
821
821
|
onChange: (Ae) => {
|
|
822
|
-
ve(Ae.currentTarget.value), tt.length > 0 && Ce.openDropdown(), Ce.updateSelectedOptionIndex(),
|
|
822
|
+
ve(Ae.currentTarget.value), tt.length > 0 && Ce.openDropdown(), Ce.updateSelectedOptionIndex(), Y(Ae.currentTarget.value);
|
|
823
823
|
},
|
|
824
824
|
onBlur: (Ae) => {
|
|
825
825
|
Ct(Ae);
|
|
@@ -906,7 +906,7 @@ function yf({
|
|
|
906
906
|
defaultValue: z,
|
|
907
907
|
filter: S,
|
|
908
908
|
size: $,
|
|
909
|
-
style:
|
|
909
|
+
style: G,
|
|
910
910
|
width: v,
|
|
911
911
|
initiallyOpened: P,
|
|
912
912
|
itemComponent: M,
|
|
@@ -941,27 +941,27 @@ function yf({
|
|
|
941
941
|
}, ae = T(() => {
|
|
942
942
|
N();
|
|
943
943
|
}, []), fe = T((Ee) => {
|
|
944
|
-
r && i && ((Ee.type ===
|
|
944
|
+
r && i && ((Ee.type === q.dataChanged || Ee.type === q.recordChanged || Ee.type === q.afterScroll || Ee.type === q.afterCancel) && (N(), de.isDataSourceV2 || ke()), Ee.type === q.beforeClose && te([]), Ee.type === q.onFieldError && Ee.fieldName === i && (ge(Ee.error), oe?.setError(we, Ee.error)));
|
|
945
945
|
}, [de.isDataSourceV2, oe, we]), Te = ue(fe);
|
|
946
|
-
|
|
946
|
+
U(() => {
|
|
947
947
|
Te.current = fe;
|
|
948
948
|
}, [fe]);
|
|
949
949
|
const qe = T((Ee) => {
|
|
950
950
|
Te.current(Ee);
|
|
951
951
|
}, []);
|
|
952
|
-
|
|
952
|
+
U(() => {
|
|
953
953
|
if (N(), r && i) {
|
|
954
954
|
const Ee = typeof r.addFieldChangeListener == "function";
|
|
955
955
|
return r.addListener(qe), Ee && r.addFieldChangeListener(i, ae), () => {
|
|
956
956
|
r.removeListener(qe), Ee && r.removeFieldChangeListener(i, ae);
|
|
957
957
|
};
|
|
958
958
|
}
|
|
959
|
-
}, [r, i, qe, ae]),
|
|
960
|
-
H && H(be), be && be.length >= l && be !== w(ne) && (xe(!0),
|
|
961
|
-
}, [be]),
|
|
959
|
+
}, [r, i, qe, ae]), U(() => {
|
|
960
|
+
H && H(be), be && be.length >= l && be !== w(ne) && (xe(!0), Y(0, !1));
|
|
961
|
+
}, [be]), U(() => {
|
|
962
962
|
}, [ce, $e]), at(() => {
|
|
963
963
|
N();
|
|
964
|
-
}, []),
|
|
964
|
+
}, []), U(() => {
|
|
965
965
|
p !== void 0 && p !== Ye && ge(p);
|
|
966
966
|
}, [p]);
|
|
967
967
|
const Ke = (Ee) => J && Ee ? J(Ee) : Ee, Je = (Ee) => {
|
|
@@ -975,10 +975,10 @@ function yf({
|
|
|
975
975
|
}, Ct = (Ee) => {
|
|
976
976
|
V && V(Ee);
|
|
977
977
|
}, ut = () => {
|
|
978
|
-
be && be.length >= l && ce < $e - 1 && (xe(!0),
|
|
978
|
+
be && be.length >= l && ce < $e - 1 && (xe(!0), Y(ce + 1, !0));
|
|
979
979
|
}, Ve = (Ee) => {
|
|
980
980
|
ne || ve(Ee), Ee && w(ne) !== Ee && Ee.length >= l && Ce.openDropdown();
|
|
981
|
-
},
|
|
981
|
+
}, Y = async (Ee, xt = !1) => {
|
|
982
982
|
B(Ee, be).then(
|
|
983
983
|
(lt) => {
|
|
984
984
|
xe(!1), (lt === void 0 || lt == null) && L && L("Response incorreto.");
|
|
@@ -1012,7 +1012,7 @@ function yf({
|
|
|
1012
1012
|
{
|
|
1013
1013
|
disabled: o,
|
|
1014
1014
|
readOnly: De(),
|
|
1015
|
-
style:
|
|
1015
|
+
style: G,
|
|
1016
1016
|
w: v,
|
|
1017
1017
|
required: m,
|
|
1018
1018
|
leftSection: g,
|
|
@@ -1106,10 +1106,10 @@ function bf({
|
|
|
1106
1106
|
), D = it(), B = `${t}`, V = D?.getError(B);
|
|
1107
1107
|
process.env.NODE_ENV;
|
|
1108
1108
|
const [X, _] = k(!!c), W = w || ue(null), [z, S] = k(p), $ = nt();
|
|
1109
|
-
|
|
1109
|
+
U(() => {
|
|
1110
1110
|
p !== void 0 && p !== z && S(p);
|
|
1111
1111
|
}, [p]);
|
|
1112
|
-
const
|
|
1112
|
+
const G = () => {
|
|
1113
1113
|
let F = X;
|
|
1114
1114
|
if (e && t) {
|
|
1115
1115
|
const L = e.getFieldValue(t);
|
|
@@ -1117,25 +1117,25 @@ function bf({
|
|
|
1117
1117
|
}
|
|
1118
1118
|
_(F);
|
|
1119
1119
|
}, v = T(() => {
|
|
1120
|
-
|
|
1120
|
+
G();
|
|
1121
1121
|
}, []), P = T((F) => {
|
|
1122
|
-
e && t && ((F.type ===
|
|
1122
|
+
e && t && ((F.type === q.dataChanged || F.type === q.recordChanged || F.type === q.afterScroll || F.type === q.afterCancel || F.type === q.afterEdit) && (G(), E.isDataSourceV2 || $()), F.type === q.onFieldError && F.fieldName === t && (S(F.error), D?.setError(B, F.error)));
|
|
1123
1123
|
}, [E.isDataSourceV2, D, B]), M = ue(P);
|
|
1124
|
-
|
|
1124
|
+
U(() => {
|
|
1125
1125
|
M.current = P;
|
|
1126
1126
|
}, [P]);
|
|
1127
1127
|
const O = T((F) => {
|
|
1128
1128
|
M.current(F);
|
|
1129
1129
|
}, []);
|
|
1130
|
-
|
|
1131
|
-
if (
|
|
1130
|
+
U(() => {
|
|
1131
|
+
if (G(), e && t) {
|
|
1132
1132
|
const F = typeof e.addFieldChangeListener == "function";
|
|
1133
1133
|
return e.addListener(O), F && e.addFieldChangeListener(t, v), () => {
|
|
1134
1134
|
e.removeListener(O), F && e.removeFieldChangeListener(t, v);
|
|
1135
1135
|
};
|
|
1136
1136
|
}
|
|
1137
1137
|
}, [e, t, O, v]), at(() => {
|
|
1138
|
-
|
|
1138
|
+
G();
|
|
1139
1139
|
}, []);
|
|
1140
1140
|
const I = (F) => {
|
|
1141
1141
|
(z || V) && (S(void 0), D?.clearError(B));
|
|
@@ -1202,8 +1202,8 @@ function wf({
|
|
|
1202
1202
|
process.env.NODE_ENV;
|
|
1203
1203
|
const [X, _] = k(
|
|
1204
1204
|
jl(u, d, i, o)
|
|
1205
|
-
), [W, z] = k(p ? [] : a), [S, $] = k(g),
|
|
1206
|
-
|
|
1205
|
+
), [W, z] = k(p ? [] : a), [S, $] = k(g), G = nt();
|
|
1206
|
+
U(() => {
|
|
1207
1207
|
g !== void 0 && g !== S && $(g);
|
|
1208
1208
|
}, [g]);
|
|
1209
1209
|
const v = () => {
|
|
@@ -1222,15 +1222,15 @@ function wf({
|
|
|
1222
1222
|
}, P = T(() => {
|
|
1223
1223
|
v();
|
|
1224
1224
|
}, []), M = T((A) => {
|
|
1225
|
-
e && t && ((A.type ===
|
|
1225
|
+
e && t && ((A.type === q.dataChanged || A.type === q.recordChanged || A.type === q.afterScroll || A.type === q.afterCancel || A.type === q.afterEdit) && (v(), E.isDataSourceV2 || G()), A.type === q.onFieldError && A.fieldName === t && ($(A.error), D?.setError(B, A.error)));
|
|
1226
1226
|
}, [E.isDataSourceV2, D, B]), O = ue(M);
|
|
1227
|
-
|
|
1227
|
+
U(() => {
|
|
1228
1228
|
O.current = M;
|
|
1229
1229
|
}, [M]);
|
|
1230
1230
|
const I = T((A) => {
|
|
1231
1231
|
O.current(A);
|
|
1232
1232
|
}, []);
|
|
1233
|
-
|
|
1233
|
+
U(() => {
|
|
1234
1234
|
if (v(), e && t) {
|
|
1235
1235
|
const A = typeof e.addFieldChangeListener == "function";
|
|
1236
1236
|
return e.addListener(I), A && e.addFieldChangeListener(t, P), () => {
|
|
@@ -1280,7 +1280,7 @@ function vf({
|
|
|
1280
1280
|
error: h
|
|
1281
1281
|
}) {
|
|
1282
1282
|
const [f, p] = k(), [g, y] = k(), [m, w] = k(h), E = it(), D = e || "date-picker-range", B = E?.getError(D);
|
|
1283
|
-
|
|
1283
|
+
U(() => {
|
|
1284
1284
|
h !== void 0 && h !== m && w(h);
|
|
1285
1285
|
}, [h]);
|
|
1286
1286
|
const V = (_, W) => {
|
|
@@ -1355,7 +1355,7 @@ function Wl({
|
|
|
1355
1355
|
t,
|
|
1356
1356
|
null
|
|
1357
1357
|
), V = it(), X = `${t}`, _ = V?.getError(X);
|
|
1358
|
-
process.env.NODE_ENV,
|
|
1358
|
+
process.env.NODE_ENV, U(() => {
|
|
1359
1359
|
f !== void 0 && f !== w && E(f);
|
|
1360
1360
|
}, [f]);
|
|
1361
1361
|
const W = () => {
|
|
@@ -1376,22 +1376,22 @@ function Wl({
|
|
|
1376
1376
|
}, z = T(() => {
|
|
1377
1377
|
W();
|
|
1378
1378
|
}, []), S = T((x) => {
|
|
1379
|
-
e && t && ((x.type ===
|
|
1379
|
+
e && t && ((x.type === q.dataChanged || x.type === q.recordChanged || x.type === q.afterScroll || x.type === q.afterCancel || x.type === q.afterEdit) && (W(), B.isDataSourceV2 || D()), x.type === q.onFieldError && x.fieldName === t && (E(x.error), V?.setError(X, x.error)));
|
|
1380
1380
|
}, [B.isDataSourceV2, V, X]), $ = ue(S);
|
|
1381
|
-
|
|
1381
|
+
U(() => {
|
|
1382
1382
|
$.current = S;
|
|
1383
1383
|
}, [S]);
|
|
1384
|
-
const
|
|
1384
|
+
const G = T((x) => {
|
|
1385
1385
|
$.current(x);
|
|
1386
1386
|
}, []);
|
|
1387
|
-
|
|
1387
|
+
U(() => {
|
|
1388
1388
|
if (W(), e && t) {
|
|
1389
1389
|
const x = typeof e.addFieldChangeListener == "function";
|
|
1390
|
-
return e.addListener(
|
|
1391
|
-
e.removeListener(
|
|
1390
|
+
return e.addListener(G), x && e.addFieldChangeListener(t, z), () => {
|
|
1391
|
+
e.removeListener(G), x && e.removeFieldChangeListener(t, z);
|
|
1392
1392
|
};
|
|
1393
1393
|
}
|
|
1394
|
-
}, [e, t,
|
|
1394
|
+
}, [e, t, G, z]), at(() => {
|
|
1395
1395
|
W();
|
|
1396
1396
|
}, []);
|
|
1397
1397
|
const v = (x) => {
|
|
@@ -1451,22 +1451,22 @@ function Ul({
|
|
|
1451
1451
|
clearButtonProps: B,
|
|
1452
1452
|
required: V = !1
|
|
1453
1453
|
}) {
|
|
1454
|
-
const [X, _] = k(y?.[0] || null), [W, z] = k(y?.[1] || null), [S, $] = k(g),
|
|
1455
|
-
|
|
1454
|
+
const [X, _] = k(y?.[0] || null), [W, z] = k(y?.[1] || null), [S, $] = k(g), G = it(), v = t && r ? `${t}-${r}` : i || "datetime-picker-range", P = G?.getError(v);
|
|
1455
|
+
U(() => {
|
|
1456
1456
|
g !== void 0 && g !== S && $(g);
|
|
1457
|
-
}, [g]),
|
|
1457
|
+
}, [g]), U(() => {
|
|
1458
1458
|
y && (_(y[0]), z(y[1]));
|
|
1459
1459
|
}, [y]);
|
|
1460
1460
|
const M = (j) => {
|
|
1461
|
-
(S || P) && ($(void 0),
|
|
1461
|
+
(S || P) && ($(void 0), G?.clearError(v)), _(j), d && d([j, W]);
|
|
1462
1462
|
}, O = (j) => {
|
|
1463
|
-
(S || P) && ($(void 0),
|
|
1463
|
+
(S || P) && ($(void 0), G?.clearError(v)), z(j), d && d([X, j]);
|
|
1464
1464
|
}, I = (j, A) => {
|
|
1465
1465
|
if (j && A && j > A) {
|
|
1466
1466
|
const F = "Data inicial não pode ser maior que a data final";
|
|
1467
|
-
return $(F),
|
|
1467
|
+
return $(F), G?.setError(v, F), !1;
|
|
1468
1468
|
}
|
|
1469
|
-
return $(void 0),
|
|
1469
|
+
return $(void 0), G?.clearError(v), !0;
|
|
1470
1470
|
}, x = S || P;
|
|
1471
1471
|
return /* @__PURE__ */ n(
|
|
1472
1472
|
rt.Wrapper,
|
|
@@ -1591,7 +1591,7 @@ const Gl = 25, ss = (e, t = !1, r, i) => {
|
|
|
1591
1591
|
basicFilters: e.basicFilters
|
|
1592
1592
|
}, JSON.parse(JSON.stringify(e))), Ft = xr((e) => {
|
|
1593
1593
|
const { onInputChangedEnd: t, onChangedDelayed: r, onChangedValue: i, delayMs: o, ...s } = e, [l, a] = k(e.value), c = ue(null), u = ue(!0);
|
|
1594
|
-
ue(!1),
|
|
1594
|
+
ue(!1), U(() => {
|
|
1595
1595
|
if (r) {
|
|
1596
1596
|
if (u.current) {
|
|
1597
1597
|
u.current = !1;
|
|
@@ -1646,7 +1646,7 @@ const Gl = 25, ss = (e, t = !1, r, i) => {
|
|
|
1646
1646
|
}, ql = xr(({ color: e, initialState: t = Zi, changeFilter: r = () => {
|
|
1647
1647
|
} }) => {
|
|
1648
1648
|
const [i, o] = k(t), { t: s } = Xe();
|
|
1649
|
-
|
|
1649
|
+
U(() => {
|
|
1650
1650
|
o(t ? JSON.parse(JSON.stringify({ ...i, ...t })) : Zi);
|
|
1651
1651
|
}, [t]);
|
|
1652
1652
|
function l(f) {
|
|
@@ -2511,11 +2511,11 @@ class Xl extends mi {
|
|
|
2511
2511
|
}
|
|
2512
2512
|
const Kl = xr(({ src: e, size: t, croppUpdate: r }) => {
|
|
2513
2513
|
const [i, o] = k(), [s, l] = k({ width: 150, height: 150 }), a = ue(null), c = ue(null);
|
|
2514
|
-
return
|
|
2514
|
+
return U(() => {
|
|
2515
2515
|
t && (l({ ...t }), a.current && a.current.resizeTo(t.width, t.height));
|
|
2516
|
-
}, [t]),
|
|
2516
|
+
}, [t]), U(() => {
|
|
2517
2517
|
e && o(e);
|
|
2518
|
-
}, [e]),
|
|
2518
|
+
}, [e]), U(() => (c.current && i && (a.current = new Xl("#croppr", {
|
|
2519
2519
|
minSize: [32, 32, "px"],
|
|
2520
2520
|
startSize: [s.width, s.height, "px"],
|
|
2521
2521
|
onInitialize: (u) => {
|
|
@@ -2539,19 +2539,19 @@ const Kl = xr(({ src: e, size: t, croppUpdate: r }) => {
|
|
|
2539
2539
|
lazy: u = !1
|
|
2540
2540
|
}) => {
|
|
2541
2541
|
const [d, h] = k([]), [f, p] = k(e), g = ue(null);
|
|
2542
|
-
|
|
2542
|
+
U(() => {
|
|
2543
2543
|
const w = t instanceof Array ? t : [t];
|
|
2544
2544
|
y(w);
|
|
2545
2545
|
const E = w.map((D) => ({ label: D.props.name, icon: D.props.icon, disabled: D.props.disabled }));
|
|
2546
2546
|
if (e > E.length - 1 || e < 0)
|
|
2547
2547
|
throw new Error(`Intervalo inválido para activeIndex ${e}`);
|
|
2548
2548
|
h(E);
|
|
2549
|
-
}, [t]),
|
|
2549
|
+
}, [t]), U(() => {
|
|
2550
2550
|
const w = t instanceof Array ? t : [t];
|
|
2551
2551
|
if (e > w.length - 1 || e < 0)
|
|
2552
2552
|
throw new Error(`Intervalo inválido para activeIndex ${e}`);
|
|
2553
2553
|
p(w[e]?.props?.disabled ? 0 : e);
|
|
2554
|
-
}, [e]),
|
|
2554
|
+
}, [e]), U(() => {
|
|
2555
2555
|
d && d.length && s(f);
|
|
2556
2556
|
}, [f]);
|
|
2557
2557
|
function y(w) {
|
|
@@ -2620,11 +2620,11 @@ const Kl = xr(({ src: e, size: t, croppUpdate: r }) => {
|
|
|
2620
2620
|
({ image: e = "", color: t = "#1e88e5", initialState: r = Zl, saveUpdates: i = () => {
|
|
2621
2621
|
} }) => {
|
|
2622
2622
|
const [o, s] = k(r), [l, a] = k(""), [c, u] = k(!1), [d, h] = k({ width: 150, height: 150 }), [f, p] = k(), g = ue(!1), y = ["webp", "jpeg", "png"], { t: m } = Xe();
|
|
2623
|
-
|
|
2623
|
+
U(() => {
|
|
2624
2624
|
g.current = window.innerWidth < 800, s(JSON.parse(JSON.stringify({ ...o, ...r })));
|
|
2625
|
-
}, [r]),
|
|
2625
|
+
}, [r]), U(() => {
|
|
2626
2626
|
a(e);
|
|
2627
|
-
}, [e]),
|
|
2627
|
+
}, [e]), U(() => {
|
|
2628
2628
|
c || h({ width: 150, height: 150 });
|
|
2629
2629
|
}, [c]);
|
|
2630
2630
|
async function w(v, P = !1) {
|
|
@@ -2679,7 +2679,7 @@ const Kl = xr(({ src: e, size: t, croppUpdate: r }) => {
|
|
|
2679
2679
|
v && (s({ ...o, cropWidth: v }), h({ ...d, width: v })), P && (s({ ...o, cropHeight: P }), h({ ...d, height: P }));
|
|
2680
2680
|
}
|
|
2681
2681
|
function X() {
|
|
2682
|
-
let v =
|
|
2682
|
+
let v = G(o);
|
|
2683
2683
|
const P = document.createElement("canvas");
|
|
2684
2684
|
return new Promise((M, O) => {
|
|
2685
2685
|
const I = P.getContext("2d"), x = new Image();
|
|
@@ -2713,7 +2713,7 @@ const Kl = xr(({ src: e, size: t, croppUpdate: r }) => {
|
|
|
2713
2713
|
}
|
|
2714
2714
|
async function z() {
|
|
2715
2715
|
try {
|
|
2716
|
-
let v =
|
|
2716
|
+
let v = G(o);
|
|
2717
2717
|
if (v.arrayCopiedImages.length > 1) {
|
|
2718
2718
|
v.arrayCopiedImages.pop();
|
|
2719
2719
|
const P = v.arrayCopiedImages[v.arrayCopiedImages.length - 1];
|
|
@@ -2734,14 +2734,14 @@ const Kl = xr(({ src: e, size: t, croppUpdate: r }) => {
|
|
|
2734
2734
|
}
|
|
2735
2735
|
async function S(v) {
|
|
2736
2736
|
try {
|
|
2737
|
-
const P =
|
|
2737
|
+
const P = G(o);
|
|
2738
2738
|
P.basicFilters ? P.basicFilters = { ...P.basicFilters, ...v } : P.basicFilters = v, await w(P, !1);
|
|
2739
2739
|
} catch (P) {
|
|
2740
2740
|
console.log("🚀 ~ file: EditImage.tsx ~ line 259 ~ onChangeFilters ~ e", P);
|
|
2741
2741
|
}
|
|
2742
2742
|
}
|
|
2743
2743
|
const $ = Ge(() => l && l.length ? Math.ceil(3 / 4 * l.length / 1024) : "", [l]);
|
|
2744
|
-
function
|
|
2744
|
+
function G(v) {
|
|
2745
2745
|
return JSON.parse(JSON.stringify(v));
|
|
2746
2746
|
}
|
|
2747
2747
|
return /* @__PURE__ */ n("div", { className: "ArchbaseEditImage", children: /* @__PURE__ */ b("div", { id: "popup", className: "popup", children: [
|
|
@@ -3013,9 +3013,9 @@ const Kl = xr(({ src: e, size: t, croppUpdate: r }) => {
|
|
|
3013
3013
|
const s = Zt(), { colorScheme: l } = Lt(), { t: a } = Xe(), [c, u] = k({
|
|
3014
3014
|
...to
|
|
3015
3015
|
}), [d, h] = k(""), [f, p] = k(!1), [g, y] = k(!1), [m, w] = k(tc), E = ue(null), D = ue(""), B = ue(""), V = Date.now().toString(20), X = ue("download");
|
|
3016
|
-
ue(!1),
|
|
3016
|
+
ue(!1), U(() => {
|
|
3017
3017
|
W();
|
|
3018
|
-
}, [e]),
|
|
3018
|
+
}, [e]), U(() => {
|
|
3019
3019
|
_();
|
|
3020
3020
|
}, [t]);
|
|
3021
3021
|
async function _() {
|
|
@@ -3036,7 +3036,7 @@ const Kl = xr(({ src: e, size: t, croppUpdate: r }) => {
|
|
|
3036
3036
|
I.originImageSrc = null, I.arrayCopiedImages = [], p(!1), h(null), u(I);
|
|
3037
3037
|
}
|
|
3038
3038
|
}
|
|
3039
|
-
|
|
3039
|
+
U(() => {
|
|
3040
3040
|
i(d);
|
|
3041
3041
|
}, [d]);
|
|
3042
3042
|
function W() {
|
|
@@ -3087,7 +3087,7 @@ const Kl = xr(({ src: e, size: t, croppUpdate: r }) => {
|
|
|
3087
3087
|
};
|
|
3088
3088
|
}
|
|
3089
3089
|
}
|
|
3090
|
-
const
|
|
3090
|
+
const G = Ge(() => d && d.length ? Math.ceil(3 / 4 * d.length / 1024) : "", [d]);
|
|
3091
3091
|
function v(I) {
|
|
3092
3092
|
let x = { ...c }, j;
|
|
3093
3093
|
if (I.startsWith("data:image/")) {
|
|
@@ -3204,15 +3204,15 @@ const Kl = xr(({ src: e, size: t, croppUpdate: r }) => {
|
|
|
3204
3204
|
]
|
|
3205
3205
|
}
|
|
3206
3206
|
),
|
|
3207
|
-
|
|
3207
|
+
G && m.showImageSize && /* @__PURE__ */ n(
|
|
3208
3208
|
"div",
|
|
3209
3209
|
{
|
|
3210
3210
|
className: "caption image-caption",
|
|
3211
3211
|
style: {
|
|
3212
|
-
color:
|
|
3213
|
-
fontWeight:
|
|
3212
|
+
color: G > 120 ? "#f44336" : "unset",
|
|
3213
|
+
fontWeight: G > 120 ? "500" : "unset"
|
|
3214
3214
|
},
|
|
3215
|
-
children: /* @__PURE__ */ n(K, { children: `${a("archbase:size")}: ${
|
|
3215
|
+
children: /* @__PURE__ */ n(K, { children: `${a("archbase:size")}: ${G}Kb ${c.format}` })
|
|
3216
3216
|
}
|
|
3217
3217
|
),
|
|
3218
3218
|
/* @__PURE__ */ b(
|
|
@@ -3270,7 +3270,7 @@ const Kl = xr(({ src: e, size: t, croppUpdate: r }) => {
|
|
|
3270
3270
|
return i;
|
|
3271
3271
|
}, Ef = ({ token: e, email: t, ...r }) => {
|
|
3272
3272
|
const [i, o] = k(null);
|
|
3273
|
-
return
|
|
3273
|
+
return U(() => {
|
|
3274
3274
|
o(null), e && t && oc(`/users/${t}/photo/$value`, e, { responseType: "Blob" }).then((s) => {
|
|
3275
3275
|
s.blob().then((l) => {
|
|
3276
3276
|
const a = URL.createObjectURL(l);
|
|
@@ -3609,9 +3609,9 @@ function Af({
|
|
|
3609
3609
|
void 0
|
|
3610
3610
|
), X = it(), _ = `${i}`, W = X?.getError(_);
|
|
3611
3611
|
process.env.NODE_ENV;
|
|
3612
|
-
const [z, S] = k(void 0), $ = ue(null), [
|
|
3613
|
-
|
|
3614
|
-
u !== void 0 && u !==
|
|
3612
|
+
const [z, S] = k(void 0), $ = ue(null), [G, v] = k(u), P = nt();
|
|
3613
|
+
U(() => {
|
|
3614
|
+
u !== void 0 && u !== G && v(u);
|
|
3615
3615
|
}, [u]);
|
|
3616
3616
|
const M = () => {
|
|
3617
3617
|
let C = z;
|
|
@@ -3619,15 +3619,15 @@ function Af({
|
|
|
3619
3619
|
}, O = T(() => {
|
|
3620
3620
|
M();
|
|
3621
3621
|
}, []), I = T((C) => {
|
|
3622
|
-
r && i && ((C.type ===
|
|
3622
|
+
r && i && ((C.type === q.dataChanged || C.type === q.recordChanged || C.type === q.afterScroll || C.type === q.afterCancel || C.type === q.afterEdit) && (M(), V.isDataSourceV2 || P()), C.type === q.onFieldError && C.fieldName === i && (v(C.error), X?.setError(_, C.error)));
|
|
3623
3623
|
}, [V.isDataSourceV2, X, _]), x = ue(I);
|
|
3624
|
-
|
|
3624
|
+
U(() => {
|
|
3625
3625
|
x.current = I;
|
|
3626
3626
|
}, [I]);
|
|
3627
3627
|
const j = T((C) => {
|
|
3628
3628
|
x.current(C);
|
|
3629
3629
|
}, []);
|
|
3630
|
-
|
|
3630
|
+
U(() => {
|
|
3631
3631
|
if (M(), r && i) {
|
|
3632
3632
|
const C = typeof r.addFieldChangeListener == "function";
|
|
3633
3633
|
return r.addListener(j), C && r.addFieldChangeListener(i, O), () => {
|
|
@@ -3638,14 +3638,14 @@ function Af({
|
|
|
3638
3638
|
M();
|
|
3639
3639
|
}, []);
|
|
3640
3640
|
const A = (C) => {
|
|
3641
|
-
(
|
|
3641
|
+
(G || W) && (v(void 0), X?.clearError(_));
|
|
3642
3642
|
const J = C;
|
|
3643
3643
|
if (S((ee) => J), r && !r.isBrowsing() && i && r.getFieldValue(i) !== J) {
|
|
3644
3644
|
let ee;
|
|
3645
3645
|
J ? ee = m ? J : btoa(J) : ee = void 0, V.handleValueChange(ee);
|
|
3646
3646
|
}
|
|
3647
3647
|
y && y(C);
|
|
3648
|
-
}, F = () => s || V.isReadOnly, L =
|
|
3648
|
+
}, F = () => s || V.isReadOnly, L = G || W;
|
|
3649
3649
|
return /* @__PURE__ */ n("div", { style: { position: "relative", display: "inline-block" }, children: /* @__PURE__ */ n(
|
|
3650
3650
|
rt.Wrapper,
|
|
3651
3651
|
{
|
|
@@ -3709,8 +3709,8 @@ function Sf({
|
|
|
3709
3709
|
""
|
|
3710
3710
|
);
|
|
3711
3711
|
process.env.NODE_ENV;
|
|
3712
|
-
const B = it(), V = `${t}`, X = B?.getError(V), [_, W] = k(""), z = E || ue(null), [S, $] = k(c),
|
|
3713
|
-
|
|
3712
|
+
const B = it(), V = `${t}`, X = B?.getError(V), [_, W] = k(""), z = E || ue(null), [S, $] = k(c), G = nt();
|
|
3713
|
+
U(() => {
|
|
3714
3714
|
c !== void 0 && c !== S && $(c);
|
|
3715
3715
|
}, [c]);
|
|
3716
3716
|
const v = () => {
|
|
@@ -3719,15 +3719,15 @@ function Sf({
|
|
|
3719
3719
|
}, P = T(() => {
|
|
3720
3720
|
v();
|
|
3721
3721
|
}, []), M = T((C) => {
|
|
3722
|
-
e && t && ((C.type ===
|
|
3722
|
+
e && t && ((C.type === q.dataChanged || C.type === q.recordChanged || C.type === q.afterScroll || C.type === q.afterCancel || C.type === q.afterEdit) && (v(), D.isDataSourceV2 || G()), C.type === q.onFieldError && C.fieldName === t && ($(C.error), B?.setError(V, C.error)));
|
|
3723
3723
|
}, [D.isDataSourceV2, B, V]), O = ue(M);
|
|
3724
|
-
|
|
3724
|
+
U(() => {
|
|
3725
3725
|
O.current = M;
|
|
3726
3726
|
}, [M]);
|
|
3727
3727
|
const I = T((C) => {
|
|
3728
3728
|
O.current(C);
|
|
3729
3729
|
}, []);
|
|
3730
|
-
|
|
3730
|
+
U(() => {
|
|
3731
3731
|
if (v(), e && t) {
|
|
3732
3732
|
const C = typeof e.addFieldChangeListener == "function";
|
|
3733
3733
|
return e.addListener(I), C && e.addFieldChangeListener(t, P), () => {
|
|
@@ -3810,8 +3810,8 @@ function Df({
|
|
|
3810
3810
|
null
|
|
3811
3811
|
);
|
|
3812
3812
|
process.env.NODE_ENV;
|
|
3813
|
-
const $ = it(),
|
|
3814
|
-
|
|
3813
|
+
const $ = it(), G = `${t}`, v = $?.getError(G), P = Mt(), { colorScheme: M } = Lt(), [O, I] = k(""), x = W || ue(null), [j, A] = k(d);
|
|
3814
|
+
U(() => {
|
|
3815
3815
|
d !== void 0 && d !== j && A(d);
|
|
3816
3816
|
}, [d]);
|
|
3817
3817
|
const F = () => {
|
|
@@ -3820,15 +3820,15 @@ function Df({
|
|
|
3820
3820
|
}, L = T(() => {
|
|
3821
3821
|
F();
|
|
3822
3822
|
}, []), C = T((re) => {
|
|
3823
|
-
e && t && ((re.type ===
|
|
3824
|
-
}, [S.isDataSourceV2, $,
|
|
3825
|
-
|
|
3823
|
+
e && t && ((re.type === q.dataChanged || re.type === q.recordChanged || re.type === q.afterScroll || re.type === q.afterCancel) && (F(), S.isDataSourceV2 || z()), re.type === q.onFieldError && re.fieldName === t && (A(re.error), $?.setError(G, re.error)));
|
|
3824
|
+
}, [S.isDataSourceV2, $, G]), H = ue(C);
|
|
3825
|
+
U(() => {
|
|
3826
3826
|
H.current = C;
|
|
3827
3827
|
}, [C]);
|
|
3828
3828
|
const J = T((re) => {
|
|
3829
3829
|
H.current(re);
|
|
3830
3830
|
}, []);
|
|
3831
|
-
|
|
3831
|
+
U(() => {
|
|
3832
3832
|
if (F(), e && r) {
|
|
3833
3833
|
const re = typeof e.addFieldChangeListener == "function";
|
|
3834
3834
|
return e.addListener(J), re && e.addFieldChangeListener(r, L), () => {
|
|
@@ -3839,7 +3839,7 @@ function Df({
|
|
|
3839
3839
|
F();
|
|
3840
3840
|
}, []);
|
|
3841
3841
|
const ee = (re) => {
|
|
3842
|
-
(j || v) && (A(void 0), $?.clearError(
|
|
3842
|
+
(j || v) && (A(void 0), $?.clearError(G)), re.preventDefault();
|
|
3843
3843
|
const ne = re.target.value;
|
|
3844
3844
|
re.persist(), I((Z) => ne), X && X(re, ne);
|
|
3845
3845
|
}, ke = () => {
|
|
@@ -3848,7 +3848,7 @@ function Df({
|
|
|
3848
3848
|
}).catch((te) => {
|
|
3849
3849
|
if (S.handleValueChange(void 0), x.current?.focus(), w) {
|
|
3850
3850
|
const ne = ar(w, O);
|
|
3851
|
-
A(ne), $?.setError(
|
|
3851
|
+
A(ne), $?.setError(G, ne);
|
|
3852
3852
|
}
|
|
3853
3853
|
y && y(te);
|
|
3854
3854
|
})) : O && O != null && g(O).then((te) => {
|
|
@@ -3858,7 +3858,7 @@ function Df({
|
|
|
3858
3858
|
}).catch((te) => {
|
|
3859
3859
|
if (I(void 0), w) {
|
|
3860
3860
|
const ne = ar(w, O);
|
|
3861
|
-
A(ne), $?.setError(
|
|
3861
|
+
A(ne), $?.setError(G, ne);
|
|
3862
3862
|
}
|
|
3863
3863
|
x.current?.focus(), y && y(te);
|
|
3864
3864
|
});
|
|
@@ -3905,7 +3905,7 @@ function Df({
|
|
|
3905
3905
|
}
|
|
3906
3906
|
function sc(e) {
|
|
3907
3907
|
const t = ue(void 0);
|
|
3908
|
-
return
|
|
3908
|
+
return U(() => {
|
|
3909
3909
|
t.current = e;
|
|
3910
3910
|
}, [e]), t.current;
|
|
3911
3911
|
}
|
|
@@ -3963,7 +3963,7 @@ function gi({
|
|
|
3963
3963
|
size: z,
|
|
3964
3964
|
error: S,
|
|
3965
3965
|
innerRef: $,
|
|
3966
|
-
onClear:
|
|
3966
|
+
onClear: G,
|
|
3967
3967
|
minValue: v = Number.MIN_SAFE_INTEGER,
|
|
3968
3968
|
maxValue: P = Number.MAX_SAFE_INTEGER,
|
|
3969
3969
|
...M
|
|
@@ -3978,7 +3978,7 @@ function gi({
|
|
|
3978
3978
|
const [I, x] = k(""), [j, A] = k(0);
|
|
3979
3979
|
sc(I);
|
|
3980
3980
|
const F = $ || ue(null), [L, C] = k(S), H = nt(), J = it(), ee = `${t}`, ke = J?.getError(ee);
|
|
3981
|
-
|
|
3981
|
+
U(() => {
|
|
3982
3982
|
S !== void 0 && S !== L && C(S);
|
|
3983
3983
|
}, [S]);
|
|
3984
3984
|
const de = T(() => {
|
|
@@ -4005,15 +4005,15 @@ function gi({
|
|
|
4005
4005
|
}, [e, t, de]), we = T(() => {
|
|
4006
4006
|
oe();
|
|
4007
4007
|
}, [oe]), ze = T((R) => {
|
|
4008
|
-
e && t && ((R.type ===
|
|
4008
|
+
e && t && ((R.type === q.dataChanged || R.type === q.recordChanged || R.type === q.afterScroll || R.type === q.afterCancel || R.type === q.afterEdit || R.type === q.afterSave) && (oe(), O.isDataSourceV2 || H()), R.type === q.onFieldError && R.fieldName === t && (C(R.error), J?.setError(ee, R.error)));
|
|
4009
4009
|
}, [e, t, oe, H, O.isDataSourceV2, J, ee]), Ce = ue(ze);
|
|
4010
|
-
|
|
4010
|
+
U(() => {
|
|
4011
4011
|
Ce.current = ze;
|
|
4012
4012
|
}, [ze]);
|
|
4013
4013
|
const re = T((R) => {
|
|
4014
4014
|
Ce.current(R);
|
|
4015
4015
|
}, []);
|
|
4016
|
-
|
|
4016
|
+
U(() => {
|
|
4017
4017
|
const R = de();
|
|
4018
4018
|
if (x(R.maskedValue), A(R.value), e && t) {
|
|
4019
4019
|
const xe = typeof e.addFieldChangeListener == "function";
|
|
@@ -4079,7 +4079,7 @@ function gi({
|
|
|
4079
4079
|
v,
|
|
4080
4080
|
P
|
|
4081
4081
|
);
|
|
4082
|
-
x(R.maskedValue), A(R.value), e && !e.isBrowsing() && t && O.handleValueChange(g ? null : 0),
|
|
4082
|
+
x(R.maskedValue), A(R.value), e && !e.isBrowsing() && t && O.handleValueChange(g ? null : 0), G && G();
|
|
4083
4083
|
}, ie = (R) => {
|
|
4084
4084
|
const xe = R.currentTarget, ce = xe.selectionStart || 0, se = xe.selectionEnd || 0, $e = xe.value;
|
|
4085
4085
|
if (R.key === "-") {
|
|
@@ -4217,7 +4217,7 @@ function Tf({
|
|
|
4217
4217
|
innerRef: z,
|
|
4218
4218
|
decimalSeparator: S,
|
|
4219
4219
|
thousandSeparator: $,
|
|
4220
|
-
precision:
|
|
4220
|
+
precision: G = 0,
|
|
4221
4221
|
allowNegative: v = !1,
|
|
4222
4222
|
allowEmpty: P = !0
|
|
4223
4223
|
}) {
|
|
@@ -4231,7 +4231,7 @@ function Tf({
|
|
|
4231
4231
|
const I = it(), x = `${t}`, j = I?.getError(x), A = Mt(), { colorScheme: F } = Lt(), [L, C] = k(
|
|
4232
4232
|
ro(g, e, r)
|
|
4233
4233
|
), H = z || ue(null), [J, ee] = k(d);
|
|
4234
|
-
|
|
4234
|
+
U(() => {
|
|
4235
4235
|
d !== void 0 && d !== J && ee(d);
|
|
4236
4236
|
}, [d]);
|
|
4237
4237
|
const ke = () => {
|
|
@@ -4240,15 +4240,15 @@ function Tf({
|
|
|
4240
4240
|
}, de = T(() => {
|
|
4241
4241
|
ke();
|
|
4242
4242
|
}, []), oe = T((le) => {
|
|
4243
|
-
e && t && ((le.type ===
|
|
4243
|
+
e && t && ((le.type === q.dataChanged || le.type === q.recordChanged || le.type === q.afterScroll || le.type === q.afterCancel) && (ke(), O.isDataSourceV2 || M()), le.type === q.onFieldError && le.fieldName === t && (ee(le.error), I?.setError(x, le.error)));
|
|
4244
4244
|
}, [O.isDataSourceV2, I, x]), we = ue(oe);
|
|
4245
|
-
|
|
4245
|
+
U(() => {
|
|
4246
4246
|
we.current = oe;
|
|
4247
4247
|
}, [oe]);
|
|
4248
4248
|
const ze = T((le) => {
|
|
4249
4249
|
we.current(le);
|
|
4250
4250
|
}, []);
|
|
4251
|
-
|
|
4251
|
+
U(() => {
|
|
4252
4252
|
if (ke(), e && r) {
|
|
4253
4253
|
const le = typeof e.addFieldChangeListener == "function";
|
|
4254
4254
|
return e.addListener(ze), le && e.addFieldChangeListener(r, de), () => {
|
|
@@ -4305,7 +4305,7 @@ function Tf({
|
|
|
4305
4305
|
width: p,
|
|
4306
4306
|
decimalSeparator: S,
|
|
4307
4307
|
thousandSeparator: $,
|
|
4308
|
-
precision:
|
|
4308
|
+
precision: G,
|
|
4309
4309
|
allowNegative: v,
|
|
4310
4310
|
allowEmpty: P,
|
|
4311
4311
|
rightSection: /* @__PURE__ */ n(je, { withinPortal: !0, withArrow: !0, label: D, children: /* @__PURE__ */ n(
|
|
@@ -4398,7 +4398,7 @@ function ls({
|
|
|
4398
4398
|
defaultValue: z,
|
|
4399
4399
|
filter: S,
|
|
4400
4400
|
size: $,
|
|
4401
|
-
initiallyOpened:
|
|
4401
|
+
initiallyOpened: G,
|
|
4402
4402
|
itemComponent: v,
|
|
4403
4403
|
dropdownOpened: P,
|
|
4404
4404
|
onDropdownOpen: M,
|
|
@@ -4440,26 +4440,26 @@ function ls({
|
|
|
4440
4440
|
w,
|
|
4441
4441
|
E,
|
|
4442
4442
|
D
|
|
4443
|
-
]), he = (Ve) => oe && Ve ? oe(Ve) : Ve, Ue = (Ve,
|
|
4444
|
-
const De =
|
|
4443
|
+
]), he = (Ve) => oe && Ve ? oe(Ve) : Ve, Ue = (Ve, Y) => {
|
|
4444
|
+
const De = Y && Y.origin ? Y.origin : Ve;
|
|
4445
4445
|
if ((ie || Re) && (le(void 0), se?.clearError($e)), ne((Fe) => De), r && i) {
|
|
4446
4446
|
const Fe = he(De);
|
|
4447
4447
|
ee ? ee(Fe) : Ce.handleValueChange(Fe);
|
|
4448
4448
|
}
|
|
4449
|
-
X && X(De,
|
|
4449
|
+
X && X(De, Y ? Y.origin : void 0);
|
|
4450
4450
|
}, Pe = (Ve) => {
|
|
4451
4451
|
V && V(Ve);
|
|
4452
4452
|
}, Ye = (Ve) => {
|
|
4453
4453
|
B && B(Ve);
|
|
4454
4454
|
}, ge = (Ve) => {
|
|
4455
|
-
R && R.current && R.current.scrollTop === R.current.scrollHeight - R.current.offsetHeight && I !== 1 / 0 && ce((
|
|
4456
|
-
}, N = ({ option: Ve, checked:
|
|
4455
|
+
R && R.current && R.current.scrollTop === R.current.scrollHeight - R.current.offsetHeight && I !== 1 / 0 && ce((Y) => Y + I);
|
|
4456
|
+
}, N = ({ option: Ve, checked: Y }) => {
|
|
4457
4457
|
if (v)
|
|
4458
|
-
return /* @__PURE__ */ n(v, { ...Ve, checked:
|
|
4458
|
+
return /* @__PURE__ */ n(v, { ...Ve, checked: Y });
|
|
4459
4459
|
}, ae = v ? {
|
|
4460
|
-
renderOption: ({ option: Ve, checked:
|
|
4460
|
+
renderOption: ({ option: Ve, checked: Y }) => N({ option: Ve, checked: Y })
|
|
4461
4461
|
} : {};
|
|
4462
|
-
|
|
4462
|
+
U(() => {
|
|
4463
4463
|
f !== void 0 && f !== ie && le(f);
|
|
4464
4464
|
}, [f]);
|
|
4465
4465
|
const fe = async () => {
|
|
@@ -4468,17 +4468,17 @@ function ls({
|
|
|
4468
4468
|
}, Te = T(() => {
|
|
4469
4469
|
fe();
|
|
4470
4470
|
}, []), qe = T((Ve) => {
|
|
4471
|
-
r && i && ((Ve.type ===
|
|
4471
|
+
r && i && ((Ve.type === q.dataChanged || Ve.type === q.recordChanged || Ve.type === q.afterScroll || Ve.type === q.afterCancel) && (fe(), Ce.isDataSourceV2 || ze()), Ve.type === q.onFieldError && Ve.fieldName === i && (le(Ve.error), se?.setError($e, Ve.error), be((Y) => Y + 1), Ce.isDataSourceV2 || ze()));
|
|
4472
4472
|
}, [Ce.isDataSourceV2, r, i, fe, ze, se, $e]), Ke = T((Ve) => {
|
|
4473
|
-
r && i && Ve.type ===
|
|
4473
|
+
r && i && Ve.type === q.dataChanged && be((Y) => Y + 1);
|
|
4474
4474
|
}, []), Je = ue(qe);
|
|
4475
|
-
|
|
4475
|
+
U(() => {
|
|
4476
4476
|
Je.current = qe;
|
|
4477
4477
|
}, [qe]);
|
|
4478
4478
|
const ct = T((Ve) => {
|
|
4479
4479
|
Je.current(Ve);
|
|
4480
4480
|
}, []);
|
|
4481
|
-
return
|
|
4481
|
+
return U(() => {
|
|
4482
4482
|
if (fe(), r && i) {
|
|
4483
4483
|
const Ve = typeof r.addFieldChangeListener == "function";
|
|
4484
4484
|
r.addListener(ct), Ve && r.addFieldChangeListener(i, Te);
|
|
@@ -4490,7 +4490,7 @@ function ls({
|
|
|
4490
4490
|
}
|
|
4491
4491
|
H && H instanceof an && H.removeListener(Ke);
|
|
4492
4492
|
};
|
|
4493
|
-
}, [r, i, ct, Te]),
|
|
4493
|
+
}, [r, i, ct, Te]), U(() => {
|
|
4494
4494
|
W !== void 0 && ne(W);
|
|
4495
4495
|
}, [W]), at(() => {
|
|
4496
4496
|
fe();
|
|
@@ -4517,7 +4517,7 @@ function ls({
|
|
|
4517
4517
|
leftSectionWidth: g,
|
|
4518
4518
|
readOnly: l || Ce.isReadOnly,
|
|
4519
4519
|
required: y,
|
|
4520
|
-
onChange: (Ve,
|
|
4520
|
+
onChange: (Ve, Y) => Ue(Ve, Y),
|
|
4521
4521
|
onClick: _,
|
|
4522
4522
|
onBlur: Pe,
|
|
4523
4523
|
onFocus: Ye,
|
|
@@ -4525,7 +4525,7 @@ function ls({
|
|
|
4525
4525
|
onSearchChange: Q,
|
|
4526
4526
|
searchValue: te && w ? w(te) : Z,
|
|
4527
4527
|
defaultValue: te && w ? w(te) : z || "",
|
|
4528
|
-
defaultDropdownOpened:
|
|
4528
|
+
defaultDropdownOpened: G,
|
|
4529
4529
|
dropdownOpened: P,
|
|
4530
4530
|
onDropdownOpen: M,
|
|
4531
4531
|
onDropdownClose: O,
|
|
@@ -4582,11 +4582,11 @@ function zf({
|
|
|
4582
4582
|
const p = it(), g = `${l}`, y = p?.getError(g), [m, w] = k(
|
|
4583
4583
|
() => Jr(e, t, r)
|
|
4584
4584
|
), [E, D] = k(c);
|
|
4585
|
-
|
|
4585
|
+
U(() => {
|
|
4586
4586
|
c !== void 0 && c !== E && D(c);
|
|
4587
4587
|
}, [c]);
|
|
4588
4588
|
const B = T(($) => {
|
|
4589
|
-
e && (($.type ===
|
|
4589
|
+
e && (($.type === q.dataChanged || $.type === q.fieldChanged || $.type === q.recordChanged || $.type === q.afterScroll || $.type === q.afterCancel) && (e && w(Jr(e, t, r)), f.isDataSourceV2 || h()), $.type === q.onFieldError && $.fieldName === l && (D($.error), p?.setError(g, $.error)));
|
|
4590
4590
|
}, [f.isDataSourceV2, e, t, r, l, p, g]), V = () => {
|
|
4591
4591
|
let $ = "";
|
|
4592
4592
|
return s && l && ($ = s.getFieldValue(l), $ && !i ? typeof t == "function" ? $ = t(s.getCurrentRecord()) : $ = Bt.getNestedProperty($, r) : $ || ($ = "")), $;
|
|
@@ -4595,19 +4595,19 @@ function zf({
|
|
|
4595
4595
|
if (e && r && e.locate({
|
|
4596
4596
|
[r]: Bt.getNestedProperty($, r)
|
|
4597
4597
|
}) && s && l) {
|
|
4598
|
-
const
|
|
4599
|
-
f.handleValueChange(
|
|
4598
|
+
const G = i ? u($) : e.getCurrentRecord();
|
|
4599
|
+
f.handleValueChange(G);
|
|
4600
4600
|
}
|
|
4601
4601
|
} else
|
|
4602
4602
|
s && l && f.handleValueChange(null);
|
|
4603
4603
|
}, _ = ue(B);
|
|
4604
|
-
|
|
4604
|
+
U(() => {
|
|
4605
4605
|
_.current = B;
|
|
4606
4606
|
}, [B]);
|
|
4607
4607
|
const W = T(($) => {
|
|
4608
4608
|
_.current($);
|
|
4609
4609
|
}, []);
|
|
4610
|
-
return
|
|
4610
|
+
return U(() => {
|
|
4611
4611
|
if (w(Jr(e, t, r)), e)
|
|
4612
4612
|
return e.addListener(W), () => {
|
|
4613
4613
|
e.removeListener(W);
|
|
@@ -4666,10 +4666,10 @@ function uc(e) {
|
|
|
4666
4666
|
""
|
|
4667
4667
|
);
|
|
4668
4668
|
process.env.NODE_ENV === "development" && e.dataSource;
|
|
4669
|
-
const m = u || ue(null), [w, E] = k(""), D = nt(), { dataSource: B, dataField: V, onChangeValue: X, onFocusEnter: _, onFocusExit: W, saveWithMask: z, error: S } = e, [$,
|
|
4670
|
-
|
|
4671
|
-
S !== void 0 && S !== $ &&
|
|
4672
|
-
}, [S]),
|
|
4669
|
+
const m = u || ue(null), [w, E] = k(""), D = nt(), { dataSource: B, dataField: V, onChangeValue: X, onFocusEnter: _, onFocusExit: W, saveWithMask: z, error: S } = e, [$, G] = k(S), v = ue(0), { t: P } = Xe(), M = it(), O = `${V}`, I = M?.getError(O);
|
|
4670
|
+
U(() => {
|
|
4671
|
+
S !== void 0 && S !== $ && G(S);
|
|
4672
|
+
}, [S]), U(() => {
|
|
4673
4673
|
h && h($);
|
|
4674
4674
|
}, [$]);
|
|
4675
4675
|
const x = () => {
|
|
@@ -4678,15 +4678,15 @@ function uc(e) {
|
|
|
4678
4678
|
}, j = T(() => {
|
|
4679
4679
|
x();
|
|
4680
4680
|
}, []), A = T((Z) => {
|
|
4681
|
-
B && V && ((Z.type ===
|
|
4681
|
+
B && V && ((Z.type === q.dataChanged || Z.type === q.recordChanged || Z.type === q.afterScroll || Z.type === q.afterCancel || Z.type === q.afterEdit) && (x(), y.isDataSourceV2 || D()), Z.type === q.onFieldError && Z.fieldName === V && (G(Z.error), M?.setError(O, Z.error)));
|
|
4682
4682
|
}, [y.isDataSourceV2, M, O]), F = ue(A);
|
|
4683
|
-
|
|
4683
|
+
U(() => {
|
|
4684
4684
|
F.current = A;
|
|
4685
4685
|
}, [A]);
|
|
4686
4686
|
const L = T((Z) => {
|
|
4687
4687
|
F.current(Z);
|
|
4688
4688
|
}, []);
|
|
4689
|
-
|
|
4689
|
+
U(() => {
|
|
4690
4690
|
if (x(), B && V) {
|
|
4691
4691
|
const Z = typeof B.addFieldChangeListener == "function";
|
|
4692
4692
|
return B.addListener(L), Z && B.addFieldChangeListener(V, j), () => {
|
|
@@ -4697,16 +4697,16 @@ function uc(e) {
|
|
|
4697
4697
|
x();
|
|
4698
4698
|
}, []);
|
|
4699
4699
|
const C = (Z, Q) => {
|
|
4700
|
-
($ || I) && (
|
|
4700
|
+
($ || I) && (G(void 0), M?.clearError(O));
|
|
4701
4701
|
const le = Q.value.replaceAll("_", "");
|
|
4702
4702
|
v.current = le.length - Q.unmaskedValue.length, !(le.length !== i?.length && Q.unmaskedValue.length !== 0) && (E((ve) => Z), B && !B.isBrowsing() && V && B.getFieldValue(V) !== Z && y.handleValueChange(Z), X && X(Z, Q.value));
|
|
4703
4703
|
}, H = (Z) => {
|
|
4704
4704
|
const Q = Z.target.value.replaceAll("_", "");
|
|
4705
4705
|
if (v.current, Q.length < i?.length && Q.length - v.current !== 0) {
|
|
4706
4706
|
const ie = f ?? `${P("archbase:O campo está incompleto")}`;
|
|
4707
|
-
|
|
4707
|
+
G(ie), M?.setError(O, ie);
|
|
4708
4708
|
} else
|
|
4709
|
-
|
|
4709
|
+
G(""), M?.clearError(O);
|
|
4710
4710
|
W && W(Z);
|
|
4711
4711
|
}, J = (Z) => {
|
|
4712
4712
|
_ && _(Z);
|
|
@@ -4774,9 +4774,9 @@ function If({
|
|
|
4774
4774
|
process.env.NODE_ENV;
|
|
4775
4775
|
const V = it(), X = `${t}`, _ = V?.getError(X), [W, z] = k(p || ""), S = ue(null);
|
|
4776
4776
|
Mt();
|
|
4777
|
-
const [$,
|
|
4778
|
-
|
|
4779
|
-
c !== void 0 && c !== $ &&
|
|
4777
|
+
const [$, G] = k(c), v = nt();
|
|
4778
|
+
U(() => {
|
|
4779
|
+
c !== void 0 && c !== $ && G(c);
|
|
4780
4780
|
}, [c]);
|
|
4781
4781
|
const P = () => {
|
|
4782
4782
|
let H = W;
|
|
@@ -4784,15 +4784,15 @@ function If({
|
|
|
4784
4784
|
}, M = T(() => {
|
|
4785
4785
|
P();
|
|
4786
4786
|
}, []), O = T((H) => {
|
|
4787
|
-
e && t && ((H.type ===
|
|
4787
|
+
e && t && ((H.type === q.dataChanged || H.type === q.recordChanged || H.type === q.afterScroll || H.type === q.afterCancel || H.type === q.afterEdit) && (P(), B.isDataSourceV2 || v()), H.type === q.onFieldError && H.fieldName === t && (G(H.error), V?.setError(X, H.error)));
|
|
4788
4788
|
}, [B.isDataSourceV2, V, X]), I = ue(O);
|
|
4789
|
-
|
|
4789
|
+
U(() => {
|
|
4790
4790
|
I.current = O;
|
|
4791
4791
|
}, [O]);
|
|
4792
4792
|
const x = T((H) => {
|
|
4793
4793
|
I.current(H);
|
|
4794
4794
|
}, []);
|
|
4795
|
-
|
|
4795
|
+
U(() => {
|
|
4796
4796
|
if (P(), e && t) {
|
|
4797
4797
|
const H = typeof e.addFieldChangeListener == "function";
|
|
4798
4798
|
return e.addListener(x), H && e.addFieldChangeListener(t, M), () => {
|
|
@@ -4805,7 +4805,7 @@ function If({
|
|
|
4805
4805
|
const j = (H) => {
|
|
4806
4806
|
H.preventDefault();
|
|
4807
4807
|
const J = H.target.value;
|
|
4808
|
-
H.persist(), ($ || _) && (
|
|
4808
|
+
H.persist(), ($ || _) && (G(void 0), V?.clearError(X)), z((ke) => J), e && !e.isBrowsing() && t && e.getFieldValue(t) !== J && B.handleValueChange(J), E && E(H, J);
|
|
4809
4809
|
}, A = (H) => {
|
|
4810
4810
|
m && m(H);
|
|
4811
4811
|
}, F = (H) => {
|
|
@@ -4876,9 +4876,9 @@ function $f({
|
|
|
4876
4876
|
process.env.NODE_ENV;
|
|
4877
4877
|
const B = it(), V = `${t}`, X = B?.getError(V), [_, W] = k(
|
|
4878
4878
|
hc(m, w, h, f)
|
|
4879
|
-
), [z, S] = k(g), [$,
|
|
4880
|
-
|
|
4881
|
-
a !== void 0 && a !== $ &&
|
|
4879
|
+
), [z, S] = k(g), [$, G] = k(a), v = nt();
|
|
4880
|
+
U(() => {
|
|
4881
|
+
a !== void 0 && a !== $ && G(a);
|
|
4882
4882
|
}, [a]);
|
|
4883
4883
|
const P = () => {
|
|
4884
4884
|
let C = g;
|
|
@@ -4886,15 +4886,15 @@ function $f({
|
|
|
4886
4886
|
}, M = T(() => {
|
|
4887
4887
|
P();
|
|
4888
4888
|
}, []), O = T((C) => {
|
|
4889
|
-
e && t && ((C.type ===
|
|
4889
|
+
e && t && ((C.type === q.dataChanged || C.type === q.recordChanged || C.type === q.afterScroll || C.type === q.afterCancel || C.type === q.afterEdit) && (P(), D.isDataSourceV2 || v()), C.type === q.onFieldError && C.fieldName === t && (G(C.error), B?.setError(V, C.error)));
|
|
4890
4890
|
}, [D.isDataSourceV2, B, V]), I = ue(O);
|
|
4891
|
-
|
|
4891
|
+
U(() => {
|
|
4892
4892
|
I.current = O;
|
|
4893
4893
|
}, [O]);
|
|
4894
4894
|
const x = T((C) => {
|
|
4895
4895
|
I.current(C);
|
|
4896
4896
|
}, []);
|
|
4897
|
-
|
|
4897
|
+
U(() => {
|
|
4898
4898
|
if (P(), e && t) {
|
|
4899
4899
|
const C = typeof e.addFieldChangeListener == "function";
|
|
4900
4900
|
return e.addListener(x), C && e.addFieldChangeListener(t, M), () => {
|
|
@@ -4905,7 +4905,7 @@ function $f({
|
|
|
4905
4905
|
P();
|
|
4906
4906
|
}, []);
|
|
4907
4907
|
const j = (C) => {
|
|
4908
|
-
($ || X) && (
|
|
4908
|
+
($ || X) && (G(void 0), B?.clearError(V)), S((ee) => C);
|
|
4909
4909
|
let J = C;
|
|
4910
4910
|
p && (J = p(C)), e && !e.isBrowsing() && t && e.getFieldValue(t) !== J && D.handleValueChange(J), d && d(J);
|
|
4911
4911
|
}, A = (C) => {
|
|
@@ -4973,7 +4973,7 @@ function Rf({
|
|
|
4973
4973
|
), y = it(), m = `${t}`, w = y?.getError(m);
|
|
4974
4974
|
process.env.NODE_ENV;
|
|
4975
4975
|
const [E, D] = k(l), B = s || ue(null), [V, X] = k(h), _ = nt();
|
|
4976
|
-
|
|
4976
|
+
U(() => {
|
|
4977
4977
|
h !== void 0 && h !== V && X(h);
|
|
4978
4978
|
}, [h]);
|
|
4979
4979
|
const W = () => {
|
|
@@ -4982,22 +4982,22 @@ function Rf({
|
|
|
4982
4982
|
}, z = T(() => {
|
|
4983
4983
|
W();
|
|
4984
4984
|
}, []), S = T((x) => {
|
|
4985
|
-
e && t && ((x.type ===
|
|
4985
|
+
e && t && ((x.type === q.dataChanged || x.type === q.recordChanged || x.type === q.afterScroll || x.type === q.afterCancel || x.type === q.afterEdit) && (W(), g.isDataSourceV2 || _()), x.type === q.onFieldError && x.fieldName === t && (X(x.error), y?.setError(m, x.error)));
|
|
4986
4986
|
}, [g.isDataSourceV2, y, m]), $ = ue(S);
|
|
4987
|
-
|
|
4987
|
+
U(() => {
|
|
4988
4988
|
$.current = S;
|
|
4989
4989
|
}, [S]);
|
|
4990
|
-
const
|
|
4990
|
+
const G = T((x) => {
|
|
4991
4991
|
$.current(x);
|
|
4992
4992
|
}, []);
|
|
4993
|
-
|
|
4993
|
+
U(() => {
|
|
4994
4994
|
if (W(), e && t) {
|
|
4995
4995
|
const x = typeof e.addFieldChangeListener == "function";
|
|
4996
|
-
return e.addListener(
|
|
4997
|
-
e.removeListener(
|
|
4996
|
+
return e.addListener(G), x && e.addFieldChangeListener(t, z), () => {
|
|
4997
|
+
e.removeListener(G), x && e.removeFieldChangeListener(t, z);
|
|
4998
4998
|
};
|
|
4999
4999
|
}
|
|
5000
|
-
}, [e, t,
|
|
5000
|
+
}, [e, t, G, z]), at(() => {
|
|
5001
5001
|
W();
|
|
5002
5002
|
}, []);
|
|
5003
5003
|
const v = (x) => {
|
|
@@ -5073,7 +5073,7 @@ function Pf({
|
|
|
5073
5073
|
onSave: z,
|
|
5074
5074
|
onSetToolbarButtons: S,
|
|
5075
5075
|
onLoad: $,
|
|
5076
|
-
onDrop:
|
|
5076
|
+
onDrop: G,
|
|
5077
5077
|
onPaste: v,
|
|
5078
5078
|
onImageUpload: P,
|
|
5079
5079
|
onVideoUpload: M,
|
|
@@ -5100,7 +5100,7 @@ function Pf({
|
|
|
5100
5100
|
const oe = it(), we = `${r}`, ze = oe?.getError(we), { i18n: Ce } = Xe(), [re, te] = k(
|
|
5101
5101
|
mc(p, t, r, g)
|
|
5102
5102
|
), [ne, Z] = k(c), Q = nt();
|
|
5103
|
-
|
|
5103
|
+
U(() => {
|
|
5104
5104
|
c !== void 0 && c !== ne && Z(c);
|
|
5105
5105
|
}, [c]);
|
|
5106
5106
|
const ie = () => {
|
|
@@ -5109,15 +5109,15 @@ function Pf({
|
|
|
5109
5109
|
}, le = T(() => {
|
|
5110
5110
|
ie();
|
|
5111
5111
|
}, []), ve = T((N) => {
|
|
5112
|
-
t && r && ((N.type ===
|
|
5112
|
+
t && r && ((N.type === q.dataChanged || N.type === q.recordChanged || N.type === q.afterScroll || N.type === q.afterCancel || N.type === q.afterEdit) && (ie(), de.isDataSourceV2 || Q()), N.type === q.onFieldError && N.fieldName === r && (Z(N.error), oe?.setError(we, N.error)));
|
|
5113
5113
|
}, [de.isDataSourceV2, oe, we]), be = ue(ve);
|
|
5114
|
-
|
|
5114
|
+
U(() => {
|
|
5115
5115
|
be.current = ve;
|
|
5116
5116
|
}, [ve]);
|
|
5117
5117
|
const R = T((N) => {
|
|
5118
5118
|
be.current(N);
|
|
5119
5119
|
}, []);
|
|
5120
|
-
|
|
5120
|
+
U(() => {
|
|
5121
5121
|
if (ie(), t && r) {
|
|
5122
5122
|
const N = typeof t.addFieldChangeListener == "function";
|
|
5123
5123
|
return t.addListener(R), N && t.addFieldChangeListener(r, le), () => {
|
|
@@ -5136,7 +5136,7 @@ function Pf({
|
|
|
5136
5136
|
}, ce = (N, ae) => {
|
|
5137
5137
|
y && y(N);
|
|
5138
5138
|
}, se = () => o || de.isReadOnly, $e = ne || ze, [Re, Ne] = k(!1), [, he] = k({});
|
|
5139
|
-
if (
|
|
5139
|
+
if (U(() => {
|
|
5140
5140
|
typeof window > "u" || pc().then(() => {
|
|
5141
5141
|
Ne(!0), he({});
|
|
5142
5142
|
});
|
|
@@ -5168,7 +5168,7 @@ function Pf({
|
|
|
5168
5168
|
onSave: z,
|
|
5169
5169
|
onSetToolbarButtons: S,
|
|
5170
5170
|
onLoad: $,
|
|
5171
|
-
onDrop:
|
|
5171
|
+
onDrop: G,
|
|
5172
5172
|
onPaste: v,
|
|
5173
5173
|
onImageUpload: P,
|
|
5174
5174
|
onVideoUpload: M,
|
|
@@ -5230,27 +5230,27 @@ function Nf({
|
|
|
5230
5230
|
t,
|
|
5231
5231
|
r,
|
|
5232
5232
|
""
|
|
5233
|
-
), W = it(), z = `${r}`, S = W?.getError(z), [$,
|
|
5233
|
+
), W = it(), z = `${r}`, S = W?.getError(z), [$, G] = k(
|
|
5234
5234
|
yc(V, t, r)
|
|
5235
5235
|
), [v, P] = k(c), M = nt();
|
|
5236
|
-
|
|
5236
|
+
U(() => {
|
|
5237
5237
|
c !== void 0 && c !== v && P(c);
|
|
5238
5238
|
}, [c]);
|
|
5239
5239
|
const O = () => {
|
|
5240
5240
|
let te = V;
|
|
5241
|
-
t && r && (te = t.getFieldValue(r), te || (te = "")),
|
|
5241
|
+
t && r && (te = t.getFieldValue(r), te || (te = "")), G(te);
|
|
5242
5242
|
}, I = T(() => {
|
|
5243
5243
|
O();
|
|
5244
5244
|
}, []), x = T((te) => {
|
|
5245
|
-
t && r && ((te.type ===
|
|
5245
|
+
t && r && ((te.type === q.dataChanged || te.type === q.recordChanged || te.type === q.afterScroll || te.type === q.afterCancel || te.type === q.afterEdit) && (O(), _.isDataSourceV2 || M()), te.type === q.onFieldError && te.fieldName === r && (P(te.error), W?.setError(z, te.error)));
|
|
5246
5246
|
}, [_.isDataSourceV2, W, z]), j = ue(x);
|
|
5247
|
-
|
|
5247
|
+
U(() => {
|
|
5248
5248
|
j.current = x;
|
|
5249
5249
|
}, [x]);
|
|
5250
5250
|
const A = T((te) => {
|
|
5251
5251
|
j.current(te);
|
|
5252
5252
|
}, []);
|
|
5253
|
-
|
|
5253
|
+
U(() => {
|
|
5254
5254
|
if (O(), t && r) {
|
|
5255
5255
|
const te = typeof t.addFieldChangeListener == "function";
|
|
5256
5256
|
return t.addListener(A), te && t.addFieldChangeListener(r, I), () => {
|
|
@@ -5261,7 +5261,7 @@ function Nf({
|
|
|
5261
5261
|
O();
|
|
5262
5262
|
}, []);
|
|
5263
5263
|
const F = (te) => {
|
|
5264
|
-
(v || S) && (P(void 0), W?.clearError(z)),
|
|
5264
|
+
(v || S) && (P(void 0), W?.clearError(z)), G(te), t && !t.isBrowsing() && r && t.getFieldValue(r) !== te && _.handleValueChange(te), y && y(te);
|
|
5265
5265
|
}, L = (te) => {
|
|
5266
5266
|
E && E(te);
|
|
5267
5267
|
}, C = (te) => {
|
|
@@ -5269,7 +5269,7 @@ function Nf({
|
|
|
5269
5269
|
}, H = (te) => {
|
|
5270
5270
|
D && D(te);
|
|
5271
5271
|
}, J = () => o || _.isReadOnly || B, ee = v || S, [ke, de] = k(!1), [, oe] = k({});
|
|
5272
|
-
if (
|
|
5272
|
+
if (U(() => {
|
|
5273
5273
|
typeof window > "u" || gc().then(() => {
|
|
5274
5274
|
de(!0), oe({});
|
|
5275
5275
|
});
|
|
@@ -5341,8 +5341,8 @@ function Vf({
|
|
|
5341
5341
|
a
|
|
5342
5342
|
);
|
|
5343
5343
|
process.env.NODE_ENV;
|
|
5344
|
-
const _ = it(), W = `${t}`, z = _?.getError(W), [S, $] = k(c),
|
|
5345
|
-
|
|
5344
|
+
const _ = it(), W = `${t}`, z = _?.getError(W), [S, $] = k(c), G = ue(null), [v, P] = k(f), M = nt();
|
|
5345
|
+
U(() => {
|
|
5346
5346
|
f !== void 0 && f !== v && P(f);
|
|
5347
5347
|
}, [f]);
|
|
5348
5348
|
const O = () => {
|
|
@@ -5355,15 +5355,15 @@ function Vf({
|
|
|
5355
5355
|
}, I = T(() => {
|
|
5356
5356
|
O();
|
|
5357
5357
|
}, []), x = T((ee) => {
|
|
5358
|
-
e && t && ((ee.type ===
|
|
5358
|
+
e && t && ((ee.type === q.dataChanged || ee.type === q.recordChanged || ee.type === q.afterScroll || ee.type === q.afterCancel || ee.type === q.afterEdit) && (O(), X.isDataSourceV2 || M()), ee.type === q.onFieldError && ee.fieldName === t && (P(ee.error), _?.setError(W, ee.error)));
|
|
5359
5359
|
}, [X.isDataSourceV2, _, W]), j = ue(x);
|
|
5360
|
-
|
|
5360
|
+
U(() => {
|
|
5361
5361
|
j.current = x;
|
|
5362
5362
|
}, [x]);
|
|
5363
5363
|
const A = T((ee) => {
|
|
5364
5364
|
j.current(ee);
|
|
5365
5365
|
}, []);
|
|
5366
|
-
|
|
5366
|
+
U(() => {
|
|
5367
5367
|
if (O(), e && t) {
|
|
5368
5368
|
const ee = typeof e.addFieldChangeListener == "function";
|
|
5369
5369
|
return e.addListener(A), ee && e.addFieldChangeListener(t, I), () => {
|
|
@@ -5392,7 +5392,7 @@ function Vf({
|
|
|
5392
5392
|
required: o,
|
|
5393
5393
|
style: { ...s, width: u },
|
|
5394
5394
|
checked: S,
|
|
5395
|
-
ref: V ||
|
|
5395
|
+
ref: V || G,
|
|
5396
5396
|
value: S ? l : a,
|
|
5397
5397
|
onChange: (ee) => F(ee, H()),
|
|
5398
5398
|
onBlur: L,
|
|
@@ -5434,7 +5434,7 @@ function Mf({
|
|
|
5434
5434
|
Oo({
|
|
5435
5435
|
dataSource: e,
|
|
5436
5436
|
listener: d
|
|
5437
|
-
}),
|
|
5437
|
+
}), U(() => {
|
|
5438
5438
|
h();
|
|
5439
5439
|
}, [h]);
|
|
5440
5440
|
const p = T((g) => {
|
|
@@ -5480,32 +5480,32 @@ function Lf({
|
|
|
5480
5480
|
);
|
|
5481
5481
|
process.env.NODE_ENV;
|
|
5482
5482
|
const [D, B] = k(""), V = ue(null), [X, _] = k(c), W = nt(), z = it(), S = `${t}`, $ = z?.getError(S);
|
|
5483
|
-
|
|
5483
|
+
U(() => {
|
|
5484
5484
|
c !== void 0 && c !== X && _(c);
|
|
5485
5485
|
}, [c]);
|
|
5486
|
-
const
|
|
5486
|
+
const G = () => {
|
|
5487
5487
|
let L = D;
|
|
5488
5488
|
e && t && (L = e.getFieldValue(t), L || (L = "")), Ca(L) && !m && (L = atob(L)), B(L);
|
|
5489
5489
|
}, v = T(() => {
|
|
5490
|
-
|
|
5490
|
+
G();
|
|
5491
5491
|
}, []), P = T((L) => {
|
|
5492
|
-
e && t && ((L.type ===
|
|
5493
|
-
}, [E.isDataSourceV2, e, t,
|
|
5494
|
-
|
|
5492
|
+
e && t && ((L.type === q.dataChanged || L.type === q.recordChanged || L.type === q.afterScroll || L.type === q.afterCancel || L.type === q.afterEdit) && (G(), E.isDataSourceV2 || W()), L.type === q.onFieldError && L.fieldName === t && (_(L.error), z?.setError(S, L.error), E.isDataSourceV2 || W()));
|
|
5493
|
+
}, [E.isDataSourceV2, e, t, G, W, z, S]), M = ue(P);
|
|
5494
|
+
U(() => {
|
|
5495
5495
|
M.current = P;
|
|
5496
5496
|
}, [P]);
|
|
5497
5497
|
const O = T((L) => {
|
|
5498
5498
|
M.current(L);
|
|
5499
5499
|
}, []);
|
|
5500
|
-
|
|
5501
|
-
if (
|
|
5500
|
+
U(() => {
|
|
5501
|
+
if (G(), e && t) {
|
|
5502
5502
|
const L = typeof e.addFieldChangeListener == "function";
|
|
5503
5503
|
return e.addListener(O), L && e.addFieldChangeListener(t, v), () => {
|
|
5504
5504
|
e.removeListener(O), L && e.removeFieldChangeListener(t, v);
|
|
5505
5505
|
};
|
|
5506
5506
|
}
|
|
5507
5507
|
}, [e, t, O, v]), at(() => {
|
|
5508
|
-
|
|
5508
|
+
G();
|
|
5509
5509
|
}, []);
|
|
5510
5510
|
const I = (L) => {
|
|
5511
5511
|
L.preventDefault();
|
|
@@ -5557,7 +5557,7 @@ function vc({ label: e, initialValue: t, onChange: r, readOnly: i = !1, error: o
|
|
|
5557
5557
|
month: "*",
|
|
5558
5558
|
dayOfWeek: "*"
|
|
5559
5559
|
});
|
|
5560
|
-
|
|
5560
|
+
U(() => {
|
|
5561
5561
|
const u = t ? t.split(" ") : [];
|
|
5562
5562
|
u.length === 6 ? l({
|
|
5563
5563
|
seconds: u[0],
|
|
@@ -5665,10 +5665,10 @@ function Bf({
|
|
|
5665
5665
|
value: $
|
|
5666
5666
|
};
|
|
5667
5667
|
}) : [], [m, w] = k(y(e));
|
|
5668
|
-
|
|
5668
|
+
U(() => {
|
|
5669
5669
|
const W = y(e);
|
|
5670
5670
|
JSON.stringify(W) !== JSON.stringify(m) && w(W);
|
|
5671
|
-
}, [e, s, l, a]),
|
|
5671
|
+
}, [e, s, l, a]), U(() => {
|
|
5672
5672
|
if (o) {
|
|
5673
5673
|
const z = m.filter((S) => S.key && S.value).map((S) => `${a ? `{${S.key}}` : S.key}${l}${S.value}`).join(s);
|
|
5674
5674
|
z !== e && o(z);
|
|
@@ -5681,10 +5681,10 @@ function Bf({
|
|
|
5681
5681
|
const z = m.filter((S, $) => $ !== W);
|
|
5682
5682
|
w(z);
|
|
5683
5683
|
}, B = (W, z) => {
|
|
5684
|
-
const S = m.map(($,
|
|
5684
|
+
const S = m.map(($, G) => G === W ? { ...$, key: z } : $);
|
|
5685
5685
|
w(S);
|
|
5686
5686
|
}, V = (W, z) => {
|
|
5687
|
-
const S = m.map(($,
|
|
5687
|
+
const S = m.map(($, G) => G === W ? { ...$, value: z } : $);
|
|
5688
5688
|
w(S);
|
|
5689
5689
|
}, X = m.some((W) => !W.key || !W.value), _ = p === "horizontal" ? Ie : We;
|
|
5690
5690
|
return /* @__PURE__ */ n(rt.Wrapper, { label: u, error: d, children: /* @__PURE__ */ b(ye, { children: [
|
|
@@ -5785,7 +5785,7 @@ Até: ${i}`;
|
|
|
5785
5785
|
const z = t.find((S) => S.value === d);
|
|
5786
5786
|
return z && d !== "custom" ? z.label : xc(g.start, g.end);
|
|
5787
5787
|
}, [d, g, t]);
|
|
5788
|
-
|
|
5788
|
+
U(() => {
|
|
5789
5789
|
B.current = {
|
|
5790
5790
|
updateCurrentRange: () => {
|
|
5791
5791
|
if (d && d !== "custom") {
|
|
@@ -5802,14 +5802,14 @@ Até: ${i}`;
|
|
|
5802
5802
|
range: g
|
|
5803
5803
|
})
|
|
5804
5804
|
};
|
|
5805
|
-
}, [d, t, r, g]),
|
|
5805
|
+
}, [d, t, r, g]), U(() => {
|
|
5806
5806
|
u && (u.current = B.current);
|
|
5807
|
-
}, [u, B.current]),
|
|
5807
|
+
}, [u, B.current]), U(() => {
|
|
5808
5808
|
o && o.start && o.end && y({
|
|
5809
5809
|
start: new Date(o.start.getTime()),
|
|
5810
5810
|
end: new Date(o.end.getTime())
|
|
5811
5811
|
});
|
|
5812
|
-
}, []),
|
|
5812
|
+
}, []), U(() => {
|
|
5813
5813
|
if (i !== void 0)
|
|
5814
5814
|
if (h(i), i && i !== "custom") {
|
|
5815
5815
|
const z = t.find((S) => S.value === i);
|
|
@@ -5847,8 +5847,8 @@ Até: ${i}`;
|
|
|
5847
5847
|
end: new Date(g.end.getTime())
|
|
5848
5848
|
});
|
|
5849
5849
|
}, W = (z, S) => {
|
|
5850
|
-
const [$,
|
|
5851
|
-
v.setHours($,
|
|
5850
|
+
const [$, G] = z.split(":").map(Number), v = new Date((S ? f.start : f.end) || /* @__PURE__ */ new Date());
|
|
5851
|
+
v.setHours($, G), p((P) => ({
|
|
5852
5852
|
...P,
|
|
5853
5853
|
[S ? "start" : "end"]: new Date(v)
|
|
5854
5854
|
}));
|
|
@@ -5993,7 +5993,7 @@ function mn({
|
|
|
5993
5993
|
spacing: w = "md"
|
|
5994
5994
|
}) {
|
|
5995
5995
|
const E = _t(yi), D = ue(null);
|
|
5996
|
-
|
|
5996
|
+
U(() => {
|
|
5997
5997
|
D.current && e && D.current.focus();
|
|
5998
5998
|
}, [e]);
|
|
5999
5999
|
const B = (S) => {
|
|
@@ -6068,7 +6068,7 @@ function Ac(e) {
|
|
|
6068
6068
|
children: z,
|
|
6069
6069
|
withPadding: S = !1,
|
|
6070
6070
|
listStyleType: $ = "",
|
|
6071
|
-
center:
|
|
6071
|
+
center: G = !1,
|
|
6072
6072
|
spacing: v = "md",
|
|
6073
6073
|
type: P = "none",
|
|
6074
6074
|
icon: M,
|
|
@@ -6100,11 +6100,11 @@ function Ac(e) {
|
|
|
6100
6100
|
"ArchbaseList",
|
|
6101
6101
|
V
|
|
6102
6102
|
), ne = nt();
|
|
6103
|
-
|
|
6103
|
+
U(() => {
|
|
6104
6104
|
m !== void 0 && J(m);
|
|
6105
|
-
}, [m]),
|
|
6105
|
+
}, [m]), U(() => {
|
|
6106
6106
|
const he = (Ue) => {
|
|
6107
|
-
if (Ue.type ===
|
|
6107
|
+
if (Ue.type === q.afterScroll || Ue.type === q.fieldChanged || Ue.type === q.dataChanged || Ue.type === q.afterRemove || Ue.type === q.recordChanged) {
|
|
6108
6108
|
const Pe = V.getCurrentIndex();
|
|
6109
6109
|
H !== Pe ? (J(Pe), d && d(Pe, V?.getCurrentRecord())) : (ke((Ye) => Ye + 1), te.isDataSourceV2 || ne());
|
|
6110
6110
|
}
|
|
@@ -6112,13 +6112,13 @@ function Ac(e) {
|
|
|
6112
6112
|
return V && V.addListener(he), () => {
|
|
6113
6113
|
V && V.removeListener(he);
|
|
6114
6114
|
};
|
|
6115
|
-
}, [V, H, d, ne, te.isDataSourceV2]),
|
|
6115
|
+
}, [V, H, d, ne, te.isDataSourceV2]), U(() => {
|
|
6116
6116
|
Ce(X);
|
|
6117
6117
|
}, [X]);
|
|
6118
6118
|
const Z = (he, Ue) => {
|
|
6119
6119
|
m === void 0 && J(he), d && d(he, Ue);
|
|
6120
6120
|
};
|
|
6121
|
-
|
|
6121
|
+
U(() => {
|
|
6122
6122
|
V && V instanceof an && H >= 0 && V.getCurrentIndex() !== H && !V.isEmpty() && V.gotoRecord(H);
|
|
6123
6123
|
}, [H]);
|
|
6124
6124
|
const Q = (he) => {
|
|
@@ -6260,7 +6260,7 @@ function Ac(e) {
|
|
|
6260
6260
|
he.id
|
|
6261
6261
|
);
|
|
6262
6262
|
});
|
|
6263
|
-
return
|
|
6263
|
+
return U(() => {
|
|
6264
6264
|
if (V) {
|
|
6265
6265
|
const he = $e(V);
|
|
6266
6266
|
oe(he), te.isDataSourceV2 || ne();
|
|
@@ -6327,47 +6327,47 @@ const us = ({
|
|
|
6327
6327
|
update: p
|
|
6328
6328
|
}) => {
|
|
6329
6329
|
const [g, y] = k(!1), [m, w] = k(!1), E = nt(), D = T(
|
|
6330
|
-
(
|
|
6330
|
+
(G) => {
|
|
6331
6331
|
const v = !g;
|
|
6332
|
-
y(v), o(e.id, v),
|
|
6332
|
+
y(v), o(e.id, v), G.stopPropagation();
|
|
6333
6333
|
},
|
|
6334
6334
|
[g, e.id, o, e.state.expanded]
|
|
6335
6335
|
);
|
|
6336
|
-
|
|
6336
|
+
U(() => {
|
|
6337
6337
|
e.state && y(e.state.expanded), e.state && w(e.state.selected);
|
|
6338
6338
|
}, [e.state.expanded, e.state.selected]);
|
|
6339
6339
|
const B = T(
|
|
6340
|
-
(
|
|
6340
|
+
(G) => {
|
|
6341
6341
|
const v = !m;
|
|
6342
|
-
w(v), i(e.id, v),
|
|
6342
|
+
w(v), i(e.id, v), G.stopPropagation(), E();
|
|
6343
6343
|
},
|
|
6344
6344
|
[m, e.id, i, e.state.selected]
|
|
6345
6345
|
), V = T(
|
|
6346
|
-
(
|
|
6347
|
-
s(e.id), E(),
|
|
6346
|
+
(G) => {
|
|
6347
|
+
s(e.id), E(), G.stopPropagation();
|
|
6348
6348
|
},
|
|
6349
6349
|
[e.id, s]
|
|
6350
6350
|
), X = T(
|
|
6351
|
-
(
|
|
6352
|
-
a(e.id, m),
|
|
6351
|
+
(G) => {
|
|
6352
|
+
a(e.id, m), G.stopPropagation();
|
|
6353
6353
|
},
|
|
6354
6354
|
[e.id, m, a]
|
|
6355
6355
|
), _ = Ge(() => {
|
|
6356
|
-
const
|
|
6357
|
-
return t.highlightSelected && m ? (
|
|
6356
|
+
const G = {};
|
|
6357
|
+
return t.highlightSelected && m ? (G.color = t.selectedColor, G.backgroundColor = t.selectedBackgroundColor) : (G.color = e.color || t.color, G.backgroundColor = e.backgroundColor || t.backgroundColor), G;
|
|
6358
6358
|
}, [m, e, t]), W = Ge(() => {
|
|
6359
6359
|
if (t.selectable)
|
|
6360
6360
|
return m ? /* @__PURE__ */ n(Se, { onClick: B, variant: "transparent", children: /* @__PURE__ */ n(Fa, { size: "1.2rem", style: _ }) }) : /* @__PURE__ */ n(Se, { onClick: B, variant: "transparent", children: /* @__PURE__ */ n(Ba, { size: "1.2rem", style: _ }) });
|
|
6361
6361
|
}, [t.selectable, m, _, B]), z = Ge(() => g ? e.state?.loading === !0 ? /* @__PURE__ */ n("i", { style: { ..._, width: "1rem" }, className: "svg-inline--fa fa-spinner fa-w-16 fa-spin fa-lg" }) : /* @__PURE__ */ n(Se, { onClick: D, variant: "transparent", children: /* @__PURE__ */ n(dn, { size: "1.2rem", style: { ..._ } }) }) : /* @__PURE__ */ n(Se, { onClick: D, variant: "transparent", children: /* @__PURE__ */ n(Gr, { size: "1.2rem", style: { ..._ } }) }), [g, m, e, _, D, B]), S = Ge(() => {
|
|
6362
|
-
const
|
|
6363
|
-
return
|
|
6362
|
+
const G = l();
|
|
6363
|
+
return G && G.id === e.id ? {
|
|
6364
6364
|
color: t.focusedColor,
|
|
6365
6365
|
backgroundColor: t.focusedBackgroundColor
|
|
6366
6366
|
} : {};
|
|
6367
6367
|
}, [e.id, l, t.focusedColor, t.focusedBackgroundColor, g, m]), $ = Ge(() => {
|
|
6368
|
-
const
|
|
6368
|
+
const G = [];
|
|
6369
6369
|
return e.nodes && e.state.expanded && e.nodes.forEach((v) => {
|
|
6370
|
-
|
|
6370
|
+
G.push(
|
|
6371
6371
|
/* @__PURE__ */ n(
|
|
6372
6372
|
us,
|
|
6373
6373
|
{
|
|
@@ -6389,7 +6389,7 @@ const us = ({
|
|
|
6389
6389
|
v.id
|
|
6390
6390
|
)
|
|
6391
6391
|
);
|
|
6392
|
-
}),
|
|
6392
|
+
}), G;
|
|
6393
6393
|
}, [
|
|
6394
6394
|
e.nodes,
|
|
6395
6395
|
e.state,
|
|
@@ -6448,7 +6448,7 @@ const us = ({
|
|
|
6448
6448
|
onLoadDataSource: z,
|
|
6449
6449
|
onAddedNode: S,
|
|
6450
6450
|
onExpandedNode: $,
|
|
6451
|
-
onCollapsedNode:
|
|
6451
|
+
onCollapsedNode: G,
|
|
6452
6452
|
onChangedDataSource: v,
|
|
6453
6453
|
dataSource: P,
|
|
6454
6454
|
style: M,
|
|
@@ -6543,7 +6543,7 @@ const us = ({
|
|
|
6543
6543
|
},
|
|
6544
6544
|
[C, v, X, _, Q, w, E, ie]
|
|
6545
6545
|
);
|
|
6546
|
-
|
|
6546
|
+
U(() => {
|
|
6547
6547
|
we((ge) => ge + 1), ze();
|
|
6548
6548
|
}, [C]);
|
|
6549
6549
|
const xe = T(
|
|
@@ -6569,10 +6569,10 @@ const us = ({
|
|
|
6569
6569
|
const ae = [...C], fe = [], Te = re(ae, ge);
|
|
6570
6570
|
if (Te && Te.state) {
|
|
6571
6571
|
let qe = !Te.nodes && !Te.isleaf;
|
|
6572
|
-
!z && qe && (qe = !1), Te.state.expanded = N, Te.state.loading = qe, fe.push(Te), H(ae), v && v(ae), N === !0 ? $ && $(ae, fe) :
|
|
6572
|
+
!z && qe && (qe = !1), Te.state.expanded = N, Te.state.loading = qe, fe.push(Te), H(ae), v && v(ae), N === !0 ? $ && $(ae, fe) : G && G(ae, fe), qe && xe(Te.id);
|
|
6573
6573
|
}
|
|
6574
6574
|
},
|
|
6575
|
-
[C, v, z, xe, $,
|
|
6575
|
+
[C, v, z, xe, $, G]
|
|
6576
6576
|
), se = T(
|
|
6577
6577
|
(ge) => {
|
|
6578
6578
|
V && J && V(J);
|
|
@@ -6696,7 +6696,7 @@ const us = ({
|
|
|
6696
6696
|
ce
|
|
6697
6697
|
]
|
|
6698
6698
|
);
|
|
6699
|
-
|
|
6699
|
+
U(() => {
|
|
6700
6700
|
ke.current = [], H(Ce(Wi.clone({ nodes: P })));
|
|
6701
6701
|
}, [P, Ce]);
|
|
6702
6702
|
const Pe = Ge(() => ({
|
|
@@ -6830,7 +6830,7 @@ const us = ({
|
|
|
6830
6830
|
onFocusExit: z,
|
|
6831
6831
|
onDropdownOpen: S,
|
|
6832
6832
|
onDropdownClose: $
|
|
6833
|
-
},
|
|
6833
|
+
}, G) => {
|
|
6834
6834
|
const v = Zt(), [P, M] = k(a), [O, I] = k(!1), [x, j] = k(w);
|
|
6835
6835
|
Ze(
|
|
6836
6836
|
"ArchbaseTreeSelect",
|
|
@@ -6839,7 +6839,7 @@ const us = ({
|
|
|
6839
6839
|
l !== void 0 ? l : P
|
|
6840
6840
|
);
|
|
6841
6841
|
const A = it(), F = `${t}`, L = A?.getError(F);
|
|
6842
|
-
|
|
6842
|
+
U(() => {
|
|
6843
6843
|
w !== void 0 && w !== x && j(w);
|
|
6844
6844
|
}, [w]);
|
|
6845
6845
|
const C = l !== void 0, H = C ? l : e && t ? e.getFieldValue(t) : P, J = Ge(() => {
|
|
@@ -6860,17 +6860,17 @@ const us = ({
|
|
|
6860
6860
|
I(Q), Q && S ? S() : !Q && $ && $();
|
|
6861
6861
|
}, [r, i, O, S, $]), we = T(
|
|
6862
6862
|
(Q) => {
|
|
6863
|
-
Q.type ===
|
|
6863
|
+
Q.type === q.onFieldError && Q.fieldName === t && (j(Q.error), A?.setError(F, Q.error));
|
|
6864
6864
|
},
|
|
6865
6865
|
[t, A, F]
|
|
6866
6866
|
), ze = ue(we);
|
|
6867
|
-
|
|
6867
|
+
U(() => {
|
|
6868
6868
|
ze.current = we;
|
|
6869
6869
|
}, [we]);
|
|
6870
6870
|
const Ce = T((Q) => {
|
|
6871
6871
|
ze.current(Q);
|
|
6872
6872
|
}, []);
|
|
6873
|
-
|
|
6873
|
+
U(() => {
|
|
6874
6874
|
if (e)
|
|
6875
6875
|
return e.addListener(Ce), () => {
|
|
6876
6876
|
e.removeListener(Ce);
|
|
@@ -6905,7 +6905,7 @@ const us = ({
|
|
|
6905
6905
|
children: /* @__PURE__ */ n(
|
|
6906
6906
|
ta,
|
|
6907
6907
|
{
|
|
6908
|
-
ref:
|
|
6908
|
+
ref: G,
|
|
6909
6909
|
disabled: te,
|
|
6910
6910
|
onClick: oe,
|
|
6911
6911
|
onFocus: W,
|
|
@@ -7034,9 +7034,9 @@ function jf({
|
|
|
7034
7034
|
error: o
|
|
7035
7035
|
}) {
|
|
7036
7036
|
const [s, l] = k([]), [a, c] = k({ start: null, end: null }), [u, d] = k([]);
|
|
7037
|
-
|
|
7037
|
+
U(() => {
|
|
7038
7038
|
t && d(Ic(t));
|
|
7039
|
-
}, [t]),
|
|
7039
|
+
}, [t]), U(() => {
|
|
7040
7040
|
r(Pc(u));
|
|
7041
7041
|
}, [u, r]);
|
|
7042
7042
|
const h = (g, y) => {
|
|
@@ -7136,7 +7136,7 @@ const Hf = ({ targetDate: e, color: t }) => {
|
|
|
7136
7136
|
minutes: vt.duration(d).minutes()
|
|
7137
7137
|
};
|
|
7138
7138
|
}, [o, s] = k(i());
|
|
7139
|
-
|
|
7139
|
+
U(() => {
|
|
7140
7140
|
const c = setInterval(() => {
|
|
7141
7141
|
s(i());
|
|
7142
7142
|
}, 1e3);
|
|
@@ -7157,7 +7157,7 @@ const Hf = ({ targetDate: e, color: t }) => {
|
|
|
7157
7157
|
width: l = "100%"
|
|
7158
7158
|
}) => {
|
|
7159
7159
|
const [a, c] = k(null), u = Zt(), { t: d } = Xe();
|
|
7160
|
-
|
|
7160
|
+
U(() => {
|
|
7161
7161
|
const y = (m) => {
|
|
7162
7162
|
a !== null && (m.key === "ArrowRight" ? c(
|
|
7163
7163
|
(w) => w !== null && w < e.length - 1 ? w + 1 : w
|
|
@@ -7392,25 +7392,25 @@ function Gf({
|
|
|
7392
7392
|
""
|
|
7393
7393
|
);
|
|
7394
7394
|
process.env.NODE_ENV;
|
|
7395
|
-
const z = it(), S = `${t}`, $ = z?.getError(S), [
|
|
7396
|
-
|
|
7395
|
+
const z = it(), S = `${t}`, $ = z?.getError(S), [G, v] = k(p || ""), P = ue(null), M = Mt(), { colorScheme: O } = Lt(), [I, x] = k(c), j = nt();
|
|
7396
|
+
U(() => {
|
|
7397
7397
|
c !== void 0 && c !== I && x(c);
|
|
7398
7398
|
}, [c]);
|
|
7399
7399
|
const A = () => {
|
|
7400
|
-
let re =
|
|
7400
|
+
let re = G;
|
|
7401
7401
|
e && t && (re = e.getFieldValue(t), re || (re = "")), v(re);
|
|
7402
7402
|
}, F = T(() => {
|
|
7403
7403
|
A();
|
|
7404
7404
|
}, []), L = T((re) => {
|
|
7405
|
-
e && t && ((re.type ===
|
|
7405
|
+
e && t && ((re.type === q.dataChanged || re.type === q.recordChanged || re.type === q.afterScroll || re.type === q.afterCancel || re.type === q.afterEdit) && (A(), W.isDataSourceV2 || j()), re.type === q.onFieldError && re.fieldName === t && (x(re.error), z?.setError(S, re.error)));
|
|
7406
7406
|
}, [W.isDataSourceV2, z, S]), C = ue(L);
|
|
7407
|
-
|
|
7407
|
+
U(() => {
|
|
7408
7408
|
C.current = L;
|
|
7409
7409
|
}, [L]);
|
|
7410
7410
|
const H = T((re) => {
|
|
7411
7411
|
C.current(re);
|
|
7412
7412
|
}, []);
|
|
7413
|
-
|
|
7413
|
+
U(() => {
|
|
7414
7414
|
if (A(), e && t) {
|
|
7415
7415
|
const re = typeof e.addFieldChangeListener == "function";
|
|
7416
7416
|
return e.addListener(H), re && e.addFieldChangeListener(t, F), () => {
|
|
@@ -7460,7 +7460,7 @@ function Gf({
|
|
|
7460
7460
|
width: h,
|
|
7461
7461
|
...o
|
|
7462
7462
|
},
|
|
7463
|
-
value:
|
|
7463
|
+
value: G,
|
|
7464
7464
|
ref: f || P,
|
|
7465
7465
|
required: u,
|
|
7466
7466
|
onChange: J,
|
|
@@ -7500,13 +7500,13 @@ function qf({
|
|
|
7500
7500
|
imageQuality: D = 0.95,
|
|
7501
7501
|
...B
|
|
7502
7502
|
}) {
|
|
7503
|
-
const [V, X] = k(void 0), [_, W] = k(void 0), [z, S] = k(void 0), [$,
|
|
7503
|
+
const [V, X] = k(void 0), [_, W] = k(void 0), [z, S] = k(void 0), [$, G] = k(!1), [v, P] = k({ x: 0, y: 0 }), [M, O] = k(f), [I, x] = k(0), [j, A] = k(null), F = ue(null), L = ue(null), C = ue(null), [H, J] = k(u), [ee, ke] = k(""), de = nt(), oe = Zt(), [we, ze] = k(!1), { t: Ce } = Xe(), re = Ze(
|
|
7504
7504
|
"ArchbaseAvatarEdit",
|
|
7505
7505
|
r,
|
|
7506
7506
|
i,
|
|
7507
7507
|
void 0
|
|
7508
7508
|
), te = it(), ne = `${i}`, Z = te?.getError(ne);
|
|
7509
|
-
process.env.NODE_ENV,
|
|
7509
|
+
process.env.NODE_ENV, U(() => {
|
|
7510
7510
|
u !== void 0 && u !== H && J(u);
|
|
7511
7511
|
}, [u]);
|
|
7512
7512
|
const Q = () => {
|
|
@@ -7515,15 +7515,15 @@ function qf({
|
|
|
7515
7515
|
}, ie = T(() => {
|
|
7516
7516
|
Q();
|
|
7517
7517
|
}, []), le = T((N) => {
|
|
7518
|
-
r && i && ((N.type ===
|
|
7518
|
+
r && i && ((N.type === q.dataChanged || N.type === q.recordChanged || N.type === q.afterScroll || N.type === q.afterCancel || N.type === q.afterEdit) && (Q(), re.isDataSourceV2 || de()), N.type === q.onFieldError && N.fieldName === i && (J(N.error), te?.setError(ne, N.error)));
|
|
7519
7519
|
}, [re.isDataSourceV2, te, ne]), ve = ue(le);
|
|
7520
|
-
|
|
7520
|
+
U(() => {
|
|
7521
7521
|
ve.current = le;
|
|
7522
7522
|
}, [le]);
|
|
7523
7523
|
const be = T((N) => {
|
|
7524
7524
|
ve.current(N);
|
|
7525
7525
|
}, []);
|
|
7526
|
-
|
|
7526
|
+
U(() => {
|
|
7527
7527
|
if (Q(), r && i) {
|
|
7528
7528
|
const N = typeof r.addFieldChangeListener == "function";
|
|
7529
7529
|
return r.addListener(be), N && r.addFieldChangeListener(i, ie), () => {
|
|
@@ -7547,7 +7547,7 @@ function qf({
|
|
|
7547
7547
|
if (N.target.files && N.target.files.length > 0) {
|
|
7548
7548
|
const ae = N.target.files[0], fe = new FileReader();
|
|
7549
7549
|
fe.onload = () => {
|
|
7550
|
-
S(_), W(fe.result),
|
|
7550
|
+
S(_), W(fe.result), G(!0), P({ x: 0, y: 0 }), O(f), x(0);
|
|
7551
7551
|
}, fe.readAsDataURL(ae), N.target.value = "";
|
|
7552
7552
|
}
|
|
7553
7553
|
}, $e = () => {
|
|
@@ -7557,7 +7557,7 @@ function qf({
|
|
|
7557
7557
|
}, Re = (N, ae) => {
|
|
7558
7558
|
A(ae);
|
|
7559
7559
|
}, Ne = () => {
|
|
7560
|
-
|
|
7560
|
+
G(!1), W(z);
|
|
7561
7561
|
}, he = (N) => new Promise((ae, fe) => {
|
|
7562
7562
|
const Te = new Image();
|
|
7563
7563
|
Te.addEventListener("load", () => ae(Te)), Te.addEventListener("error", (qe) => fe(qe)), Te.setAttribute("crossOrigin", "anonymous"), Te.src = N;
|
|
@@ -7589,14 +7589,14 @@ function qf({
|
|
|
7589
7589
|
const Ke = qe.split(",")[1];
|
|
7590
7590
|
return window.atob(Ke).length / 1024;
|
|
7591
7591
|
}, fe = await (async (qe, Ke, Je, ct, Ct = D) => {
|
|
7592
|
-
let ut = Ct, Ve = await Ue(qe, Ke, Je, ut),
|
|
7593
|
-
if (ct <= 0 ||
|
|
7592
|
+
let ut = Ct, Ve = await Ue(qe, Ke, Je, ut), Y = N(Ve);
|
|
7593
|
+
if (ct <= 0 || Y <= ct)
|
|
7594
7594
|
return Ve;
|
|
7595
7595
|
let De = 0;
|
|
7596
7596
|
const pe = 10;
|
|
7597
|
-
for (;
|
|
7598
|
-
const Fe = Math.min(ct /
|
|
7599
|
-
ut = ut * Fe, ut < 0.1 && (ut = 0.1), Ve = await Ue(qe, Ke, Je, ut),
|
|
7597
|
+
for (; Y > ct && De < pe; ) {
|
|
7598
|
+
const Fe = Math.min(ct / Y, 0.9);
|
|
7599
|
+
ut = ut * Fe, ut < 0.1 && (ut = 0.1), Ve = await Ue(qe, Ke, Je, ut), Y = N(Ve), De++;
|
|
7600
7600
|
}
|
|
7601
7601
|
return Ve;
|
|
7602
7602
|
})(_, j, I, E), Te = N(fe);
|
|
@@ -7607,7 +7607,7 @@ function qf({
|
|
|
7607
7607
|
})}`);
|
|
7608
7608
|
return;
|
|
7609
7609
|
}
|
|
7610
|
-
R(fe),
|
|
7610
|
+
R(fe), G(!1), S(void 0), ke("");
|
|
7611
7611
|
} catch (N) {
|
|
7612
7612
|
ke(`Error cropping the image: ${N}`);
|
|
7613
7613
|
}
|
|
@@ -7923,7 +7923,7 @@ function Yf({ actions: e, variant: t, customComponents: r, options: i }) {
|
|
|
7923
7923
|
function $(v) {
|
|
7924
7924
|
v.enabled && v.executeAction();
|
|
7925
7925
|
}
|
|
7926
|
-
function
|
|
7926
|
+
function G() {
|
|
7927
7927
|
return s.current = null, d.length > 0 && /* @__PURE__ */ b(ot, { children: [
|
|
7928
7928
|
c !== 0 && W === "right" ? /* @__PURE__ */ n(br, { w: _ }) : void 0,
|
|
7929
7929
|
/* @__PURE__ */ n("div", { ref: s, children: /* @__PURE__ */ b(
|
|
@@ -7975,7 +7975,7 @@ function Yf({ actions: e, variant: t, customComponents: r, options: i }) {
|
|
|
7975
7975
|
},
|
|
7976
7976
|
ref: f,
|
|
7977
7977
|
children: [
|
|
7978
|
-
W === "left" ?
|
|
7978
|
+
W === "left" ? G() : void 0,
|
|
7979
7979
|
e.map((v, P) => {
|
|
7980
7980
|
const M = He.createRef();
|
|
7981
7981
|
if (o.current = [...o.current, M], !(P >= c))
|
|
@@ -7994,7 +7994,7 @@ function Yf({ actions: e, variant: t, customComponents: r, options: i }) {
|
|
|
7994
7994
|
c === P + 1 ? void 0 : /* @__PURE__ */ n(br, { w: _ }, P)
|
|
7995
7995
|
] });
|
|
7996
7996
|
}),
|
|
7997
|
-
W === "right" ?
|
|
7997
|
+
W === "right" ? G() : void 0
|
|
7998
7998
|
]
|
|
7999
7999
|
}
|
|
8000
8000
|
);
|
|
@@ -8017,7 +8017,7 @@ function Qf({
|
|
|
8017
8017
|
verticalLineStrokeWidth: g = 2,
|
|
8018
8018
|
verticalLineStrokeOpacity: y = 1
|
|
8019
8019
|
}) {
|
|
8020
|
-
const { colorScheme: m } = Lt(), w = Mt(), [E, D] = k({}), [B, V] = k(0), [X, _] = k(0), [W, z] = k(0), [S, $] = k(/* @__PURE__ */ new Date()), [
|
|
8020
|
+
const { colorScheme: m } = Lt(), w = Mt(), [E, D] = k({}), [B, V] = k(0), [X, _] = k(0), [W, z] = k(0), [S, $] = k(/* @__PURE__ */ new Date()), [G, v] = k(/* @__PURE__ */ new Date()), [P, M] = k(""), O = { top: 20, right: 20, bottom: 30, left: 150 }, { ref: I, width: x, height: j } = Fo();
|
|
8021
8021
|
function A() {
|
|
8022
8022
|
const de = "0123456789ABCDEF";
|
|
8023
8023
|
let oe = "#";
|
|
@@ -8039,7 +8039,7 @@ function Qf({
|
|
|
8039
8039
|
new Date(Math.ceil(re.getTime() / 1e3) * 1e3)
|
|
8040
8040
|
]).range([0, we > 0 ? we : 0]), ne = yt.scaleBand().rangeRound([0, ze]).padding(0.1).domain(de.map((R) => R.type));
|
|
8041
8041
|
V(ne.domain().length), $(te.domain()[0]), v(te.domain()[1]);
|
|
8042
|
-
const Z = oe.append("g").attr("transform", `translate(${O.left},${O.top})`), Q = (
|
|
8042
|
+
const Z = oe.append("g").attr("transform", `translate(${O.left},${O.top})`), Q = (G.getTime() - S.getTime()) / 1e3 * c;
|
|
8043
8043
|
Z.append("g").attr("class", "axis axis--x").call(yt.axisTop(te).tickFormat(ee).ticks(Q)).selectAll("text").attr("transform", function(R) {
|
|
8044
8044
|
return `rotate(${f})`;
|
|
8045
8045
|
}), d && H(Z, te, ze, Q), Z.append("g").attr("class", "axis axis--y").call(yt.axisLeft(ne)), Z.selectAll(".bar").data(de).enter().append("rect").attr("class", "bar").attr("x", (R) => te(R.startTime)).attr("y", (R) => ne(R.type)).attr("width", (R) => te(R.endTime) - te(R.startTime)).attr("height", ne.bandwidth()).style("fill", (R) => F(R.type)).style("z-index", 800).on("mouseover", function(R, xe) {
|
|
@@ -8074,9 +8074,9 @@ function Qf({
|
|
|
8074
8074
|
function ke(de) {
|
|
8075
8075
|
return yt.timeFormat("%Y-%m-%d %H:%M:%S")(de);
|
|
8076
8076
|
}
|
|
8077
|
-
return
|
|
8077
|
+
return U(() => {
|
|
8078
8078
|
P || M(Dt("timeline"));
|
|
8079
|
-
}, []),
|
|
8079
|
+
}, []), U(() => {
|
|
8080
8080
|
if (e.length > 0) {
|
|
8081
8081
|
let de = e;
|
|
8082
8082
|
if (t)
|
|
@@ -8097,7 +8097,7 @@ function Qf({
|
|
|
8097
8097
|
"svg",
|
|
8098
8098
|
{
|
|
8099
8099
|
id: `timeline-chart-${P}`,
|
|
8100
|
-
width: X + (
|
|
8100
|
+
width: X + (G.getTime() - S.getTime()) / 1e3 * 10 ** s * o,
|
|
8101
8101
|
height: W + L()
|
|
8102
8102
|
}
|
|
8103
8103
|
),
|
|
@@ -8226,7 +8226,7 @@ function Uc({
|
|
|
8226
8226
|
disabled: z = !1,
|
|
8227
8227
|
loading: S,
|
|
8228
8228
|
error: $,
|
|
8229
|
-
noData:
|
|
8229
|
+
noData: G,
|
|
8230
8230
|
onLoad: v,
|
|
8231
8231
|
onError: P,
|
|
8232
8232
|
on: M,
|
|
@@ -8272,7 +8272,7 @@ function Uc({
|
|
|
8272
8272
|
return Q.setDate(Q.getDate() - 1), ie.setDate(ie.getDate() + 1), [Q, ie];
|
|
8273
8273
|
}
|
|
8274
8274
|
}, [s, i, o, oe]);
|
|
8275
|
-
|
|
8275
|
+
U(() => {
|
|
8276
8276
|
let Z = !0;
|
|
8277
8277
|
return (async () => {
|
|
8278
8278
|
if (!(!A.current || z))
|
|
@@ -8304,12 +8304,12 @@ function Uc({
|
|
|
8304
8304
|
})(), () => {
|
|
8305
8305
|
Z = !1, F.current && (F.current.destroy(), F.current = null);
|
|
8306
8306
|
};
|
|
8307
|
-
}, []),
|
|
8307
|
+
}, []), U(() => {
|
|
8308
8308
|
if (F.current && L) {
|
|
8309
8309
|
const Z = F.current.itemsData;
|
|
8310
8310
|
Z && (Z.clear(), Z.add(oe));
|
|
8311
8311
|
}
|
|
8312
|
-
}, [oe, L]),
|
|
8312
|
+
}, [oe, L]), U(() => {
|
|
8313
8313
|
F.current && L && we && F.current.setGroups(we);
|
|
8314
8314
|
}, [we, L]);
|
|
8315
8315
|
const Ce = () => {
|
|
@@ -8357,14 +8357,14 @@ function Uc({
|
|
|
8357
8357
|
className: V,
|
|
8358
8358
|
children: /* @__PURE__ */ n(mt, { h: "100%", children: /* @__PURE__ */ n(vr, { icon: /* @__PURE__ */ n(cr, { size: 16 }), color: "red", title: "Error", children: typeof $ == "string" ? $ : "Failed to load timeline" }) })
|
|
8359
8359
|
}
|
|
8360
|
-
) : e.length === 0 &&
|
|
8360
|
+
) : e.length === 0 && G ? /* @__PURE__ */ n(
|
|
8361
8361
|
Qe,
|
|
8362
8362
|
{
|
|
8363
8363
|
withBorder: !0,
|
|
8364
8364
|
p: "xl",
|
|
8365
8365
|
style: { width: l, height: a, minHeight: c },
|
|
8366
8366
|
className: V,
|
|
8367
|
-
children: /* @__PURE__ */ n(mt, { h: "100%", children: /* @__PURE__ */ n(K, { c: "dimmed", children: typeof
|
|
8367
|
+
children: /* @__PURE__ */ n(mt, { h: "100%", children: /* @__PURE__ */ n(K, { c: "dimmed", children: typeof G == "string" ? G : j("No items to display") }) })
|
|
8368
8368
|
}
|
|
8369
8369
|
) : /* @__PURE__ */ b(
|
|
8370
8370
|
Qe,
|
|
@@ -8797,7 +8797,7 @@ const Or = () => {
|
|
|
8797
8797
|
e
|
|
8798
8798
|
);
|
|
8799
8799
|
t.id || (t.id = Date.now().toString()), Object.freeze(t);
|
|
8800
|
-
const [r, i] = He.useState(t.height), [o, s] = He.useState(t.width), [l, a] = He.useState(t.top || 0), [c, u] = He.useState(t.left || 0), [d, h] = He.useState(0), [f, p] = He.useState(0), [g, y] = He.useState(!1), [m, w] = He.useState(!1), [E, D] = He.useState("▁"), [B, V] = He.useState("□"), [X, _] = He.useState(""), [W, z] = He.useState(Or()), [S, $] = He.useState(1), { ref:
|
|
8800
|
+
const [r, i] = He.useState(t.height), [o, s] = He.useState(t.width), [l, a] = He.useState(t.top || 0), [c, u] = He.useState(t.left || 0), [d, h] = He.useState(0), [f, p] = He.useState(0), [g, y] = He.useState(!1), [m, w] = He.useState(!1), [E, D] = He.useState("▁"), [B, V] = He.useState("□"), [X, _] = He.useState(""), [W, z] = He.useState(Or()), [S, $] = He.useState(1), { ref: G, width: v, height: P } = Fo(), M = He.useRef(null), O = ue(r), I = ue(o), x = ue(l), j = ue(c), A = 500, F = (ee) => {
|
|
8801
8801
|
p(ee.clientY - l), h(ee.clientX - c), z(Or()), $(0.5);
|
|
8802
8802
|
}, L = (ee) => {
|
|
8803
8803
|
u((ee.clientX || ee.screenX || c + d) - d), a((ee.clientY || ee.screenY || l + f) - f);
|
|
@@ -8823,7 +8823,7 @@ const Or = () => {
|
|
|
8823
8823
|
const ee = document.getElementById(t.id)?.parentElement;
|
|
8824
8824
|
m ? (O.current = r, I.current = o, a(x.current || 0), u(j.current || 0), w(!1), V("□"), y(!1), D("▁")) : (O.current = ee?.clientHeight || window.innerHeight, I.current = ee?.clientWidth || window.innerWidth, g || (j.current = c, x.current = l), a(ee?.offsetTop || 0), u(ee?.offsetLeft || 0), w(!0), V("❐"), y(!1), D("▁")), z(Or()), setTimeout(_, A + 1, "");
|
|
8825
8825
|
};
|
|
8826
|
-
return
|
|
8826
|
+
return U(() => {
|
|
8827
8827
|
!m && !g && (s(v), i(P));
|
|
8828
8828
|
}, [v, P, m, g]), /* @__PURE__ */ b(
|
|
8829
8829
|
"div",
|
|
@@ -8840,7 +8840,7 @@ const Or = () => {
|
|
|
8840
8840
|
zIndex: W,
|
|
8841
8841
|
opacity: S
|
|
8842
8842
|
},
|
|
8843
|
-
ref:
|
|
8843
|
+
ref: G,
|
|
8844
8844
|
onClick: () => {
|
|
8845
8845
|
z(Or());
|
|
8846
8846
|
},
|
|
@@ -9904,7 +9904,7 @@ function ep({
|
|
|
9904
9904
|
}
|
|
9905
9905
|
);
|
|
9906
9906
|
}
|
|
9907
|
-
const Sd = He.createContext({}), tp = Sd.Provider, Dd = 1, bs = typeof window < "u" ?
|
|
9907
|
+
const Sd = He.createContext({}), tp = Sd.Provider, Dd = 1, bs = typeof window < "u" ? U : U, Td = () => {
|
|
9908
9908
|
const [e, t] = k(!1);
|
|
9909
9909
|
return bs(() => {
|
|
9910
9910
|
t(!0);
|
|
@@ -10048,7 +10048,7 @@ function op(e) {
|
|
|
10048
10048
|
titleColor: f,
|
|
10049
10049
|
autoClose: p = 0
|
|
10050
10050
|
} = ra("ArchbaseAlert", Id, e), [g] = k(!1);
|
|
10051
|
-
return
|
|
10051
|
+
return U(() => {
|
|
10052
10052
|
p > 0 && !g && setTimeout(() => c ? c() : null, p);
|
|
10053
10053
|
}, [p]), /* @__PURE__ */ n(
|
|
10054
10054
|
vr,
|
|
@@ -10248,7 +10248,7 @@ function lp({
|
|
|
10248
10248
|
children: l
|
|
10249
10249
|
}) {
|
|
10250
10250
|
const [a, c] = k(!1);
|
|
10251
|
-
|
|
10251
|
+
U(() => {
|
|
10252
10252
|
o && c(!0);
|
|
10253
10253
|
}, [o]);
|
|
10254
10254
|
const u = e.map((d) => ({
|
|
@@ -10470,7 +10470,7 @@ function $d({
|
|
|
10470
10470
|
type: "highlight",
|
|
10471
10471
|
rect: p
|
|
10472
10472
|
}), X(po.highlight), m(!0)), d(!1), f(null), g(null);
|
|
10473
|
-
}, [u, p, t]),
|
|
10473
|
+
}, [u, p, t]), G = T(() => {
|
|
10474
10474
|
if (!w || !t)
|
|
10475
10475
|
return;
|
|
10476
10476
|
const M = {
|
|
@@ -10630,7 +10630,7 @@ function $d({
|
|
|
10630
10630
|
),
|
|
10631
10631
|
/* @__PURE__ */ b(Ie, { justify: "flex-end", children: [
|
|
10632
10632
|
/* @__PURE__ */ n(_e, { variant: "light", onClick: () => m(!1), children: String(c("Cancel")) }),
|
|
10633
|
-
/* @__PURE__ */ n(_e, { onClick:
|
|
10633
|
+
/* @__PURE__ */ n(_e, { onClick: G, children: String(c("Add")) })
|
|
10634
10634
|
] })
|
|
10635
10635
|
] })
|
|
10636
10636
|
}
|
|
@@ -10733,7 +10733,7 @@ function dp({
|
|
|
10733
10733
|
style: z,
|
|
10734
10734
|
className: S
|
|
10735
10735
|
}) {
|
|
10736
|
-
const { t: $ } = Xe(), [
|
|
10736
|
+
const { t: $ } = Xe(), [G, v] = k({ width: 0, height: 0 }), P = ue(null), {
|
|
10737
10737
|
currentValue: M,
|
|
10738
10738
|
loadDataSourceFieldValue: O,
|
|
10739
10739
|
isReadOnly: I
|
|
@@ -10743,7 +10743,7 @@ function dp({
|
|
|
10743
10743
|
t,
|
|
10744
10744
|
r
|
|
10745
10745
|
);
|
|
10746
|
-
|
|
10746
|
+
U(() => {
|
|
10747
10747
|
e && t && O();
|
|
10748
10748
|
}, [e, t, O]);
|
|
10749
10749
|
const x = T((Ne) => {
|
|
@@ -10850,7 +10850,7 @@ function dp({
|
|
|
10850
10850
|
onRenderSuccess: te
|
|
10851
10851
|
}
|
|
10852
10852
|
),
|
|
10853
|
-
B &&
|
|
10853
|
+
B && G.width > 0 && /* @__PURE__ */ n(
|
|
10854
10854
|
$d,
|
|
10855
10855
|
{
|
|
10856
10856
|
annotations: m,
|
|
@@ -10859,8 +10859,8 @@ function dp({
|
|
|
10859
10859
|
onAnnotationUpdate: D,
|
|
10860
10860
|
disabled: Re,
|
|
10861
10861
|
pageIndex: F - 1,
|
|
10862
|
-
pageWidth:
|
|
10863
|
-
pageHeight:
|
|
10862
|
+
pageWidth: G.width,
|
|
10863
|
+
pageHeight: G.height
|
|
10864
10864
|
}
|
|
10865
10865
|
)
|
|
10866
10866
|
] })
|
|
@@ -11148,7 +11148,7 @@ function vn(e) {
|
|
|
11148
11148
|
}
|
|
11149
11149
|
function Ld({ file: e, width: t, height: r, onLoad: i, onError: o }) {
|
|
11150
11150
|
const [s, l] = k(null);
|
|
11151
|
-
return
|
|
11151
|
+
return U(() => ((async () => {
|
|
11152
11152
|
try {
|
|
11153
11153
|
const c = await qr(e);
|
|
11154
11154
|
l(c), i?.();
|
|
@@ -11176,7 +11176,7 @@ function Ld({ file: e, width: t, height: r, onLoad: i, onError: o }) {
|
|
|
11176
11176
|
}
|
|
11177
11177
|
function Fd({ file: e, width: t, height: r, onLoad: i, onError: o, style: s, className: l }) {
|
|
11178
11178
|
const [a, c] = k(null), [u, d] = k(!1);
|
|
11179
|
-
return
|
|
11179
|
+
return U(() => ((async () => {
|
|
11180
11180
|
try {
|
|
11181
11181
|
const f = await qr(e);
|
|
11182
11182
|
c(f), i?.();
|
|
@@ -11213,7 +11213,7 @@ function Fd({ file: e, width: t, height: r, onLoad: i, onError: o, style: s, cla
|
|
|
11213
11213
|
}
|
|
11214
11214
|
function Bd({ file: e, width: t, height: r, onLoad: i, onError: o }) {
|
|
11215
11215
|
const [s, l] = k(null);
|
|
11216
|
-
return
|
|
11216
|
+
return U(() => ((async () => {
|
|
11217
11217
|
try {
|
|
11218
11218
|
const c = await qr(e);
|
|
11219
11219
|
l(c), i?.();
|
|
@@ -11242,7 +11242,7 @@ function Bd({ file: e, width: t, height: r, onLoad: i, onError: o }) {
|
|
|
11242
11242
|
}
|
|
11243
11243
|
function Od({ file: e, onLoad: t, onError: r }) {
|
|
11244
11244
|
const [i, o] = k(null);
|
|
11245
|
-
return
|
|
11245
|
+
return U(() => ((async () => {
|
|
11246
11246
|
try {
|
|
11247
11247
|
const l = await qr(e);
|
|
11248
11248
|
o(l), t?.();
|
|
@@ -11259,7 +11259,7 @@ function Od({ file: e, onLoad: t, onError: r }) {
|
|
|
11259
11259
|
}
|
|
11260
11260
|
function _d({ file: e, width: t, height: r, onLoad: i, onError: o, className: s }) {
|
|
11261
11261
|
const [l, a] = k(null), [c, u] = k(!1);
|
|
11262
|
-
return
|
|
11262
|
+
return U(() => {
|
|
11263
11263
|
(async () => {
|
|
11264
11264
|
try {
|
|
11265
11265
|
let h = "";
|
|
@@ -11345,7 +11345,7 @@ function jd({
|
|
|
11345
11345
|
onLoadEnd: z,
|
|
11346
11346
|
onError: S,
|
|
11347
11347
|
onDownload: $,
|
|
11348
|
-
onPrint:
|
|
11348
|
+
onPrint: G,
|
|
11349
11349
|
onZoomChange: v,
|
|
11350
11350
|
onPageChange: P,
|
|
11351
11351
|
onRotate: M,
|
|
@@ -11357,7 +11357,7 @@ function jd({
|
|
|
11357
11357
|
mimeType: F
|
|
11358
11358
|
}) {
|
|
11359
11359
|
const { t: L } = Xe(), C = ue(null), [H, J] = k("unknown"), [ee, ke] = k("idle"), [de, oe] = k(null), [we, ze] = k(u), [Ce, re] = k(d), [te, ne] = k(!1);
|
|
11360
|
-
|
|
11360
|
+
U(() => {
|
|
11361
11361
|
(async () => {
|
|
11362
11362
|
if (t) {
|
|
11363
11363
|
J(t);
|
|
@@ -11392,8 +11392,8 @@ function jd({
|
|
|
11392
11392
|
`<html><head><title>${A || "Print"}</title></head><body>${C.current.innerHTML}</body></html>`
|
|
11393
11393
|
), ce.document.close(), ce.print());
|
|
11394
11394
|
}
|
|
11395
|
-
|
|
11396
|
-
}, [A,
|
|
11395
|
+
G?.();
|
|
11396
|
+
}, [A, G]);
|
|
11397
11397
|
const Q = T(() => {
|
|
11398
11398
|
ze((ce) => {
|
|
11399
11399
|
const se = Math.min(ce + 0.25, 3);
|
|
@@ -11840,8 +11840,8 @@ function Kd({
|
|
|
11840
11840
|
onFilterRemove: w,
|
|
11841
11841
|
onFiltersCleared: E
|
|
11842
11842
|
}) {
|
|
11843
|
-
const { t: D } = Xe(), B = ue(null), [V, X] = k([]), _ = t !== void 0 ? t : V, [W, z] = k("field"), [S, $] = k(null), [
|
|
11844
|
-
|
|
11843
|
+
const { t: D } = Xe(), B = ue(null), [V, X] = k([]), _ = t !== void 0 ? t : V, [W, z] = k("field"), [S, $] = k(null), [G, v] = k(null), [P, M] = k(""), [O, { close: I, toggle: x }] = pa(!1);
|
|
11844
|
+
U(() => {
|
|
11845
11845
|
if (i === "uncontrolled" && o) {
|
|
11846
11846
|
const ie = _.length > 0 ? _.map((le) => {
|
|
11847
11847
|
const { key: ve, operator: be, value: R, type: xe } = le;
|
|
@@ -11864,7 +11864,7 @@ function Kd({
|
|
|
11864
11864
|
), [L, P, W]), H = T(() => {
|
|
11865
11865
|
z("field"), $(null), v(null), M("");
|
|
11866
11866
|
}, []), J = T(() => {
|
|
11867
|
-
if (!S || !
|
|
11867
|
+
if (!S || !G)
|
|
11868
11868
|
return;
|
|
11869
11869
|
let ie = P;
|
|
11870
11870
|
switch (S.type) {
|
|
@@ -11888,13 +11888,13 @@ function Kd({
|
|
|
11888
11888
|
key: S.key,
|
|
11889
11889
|
label: S.label,
|
|
11890
11890
|
type: S.type,
|
|
11891
|
-
operator:
|
|
11891
|
+
operator: G,
|
|
11892
11892
|
value: ie,
|
|
11893
|
-
displayValue: vi(ie, S.type,
|
|
11893
|
+
displayValue: vi(ie, S.type, G, S.options),
|
|
11894
11894
|
icon: S.icon
|
|
11895
11895
|
}, ve = [..._, le];
|
|
11896
11896
|
de(ve), m?.(le), H(), I(), B.current && B.current.focus();
|
|
11897
|
-
}, [S,
|
|
11897
|
+
}, [S, G, P, _, H, I, m]), ee = T((ie) => {
|
|
11898
11898
|
const le = _.filter((ve) => ve.id !== ie);
|
|
11899
11899
|
de(le), w?.(ie);
|
|
11900
11900
|
}, [_, w]), ke = T(() => {
|
|
@@ -12363,7 +12363,7 @@ function mp(e, t = {}) {
|
|
|
12363
12363
|
key: r,
|
|
12364
12364
|
defaultValue: []
|
|
12365
12365
|
});
|
|
12366
|
-
|
|
12366
|
+
U(() => {
|
|
12367
12367
|
if (!o || e.length === 0)
|
|
12368
12368
|
return;
|
|
12369
12369
|
const h = {
|
|
@@ -12643,7 +12643,7 @@ function au({
|
|
|
12643
12643
|
const [V, X] = k(!1), [_, W] = k(!1), [z, S] = k(null), $ = {
|
|
12644
12644
|
showLineNumbers: !0,
|
|
12645
12645
|
...t
|
|
12646
|
-
},
|
|
12646
|
+
}, G = {
|
|
12647
12647
|
openExternalInNewTab: !0,
|
|
12648
12648
|
...r
|
|
12649
12649
|
}, v = {
|
|
@@ -12840,7 +12840,7 @@ function au({
|
|
|
12840
12840
|
ou,
|
|
12841
12841
|
{
|
|
12842
12842
|
href: x,
|
|
12843
|
-
openExternalInNewTab:
|
|
12843
|
+
openExternalInNewTab: G.openExternalInNewTab,
|
|
12844
12844
|
onClick: E,
|
|
12845
12845
|
...A,
|
|
12846
12846
|
children: j
|
|
@@ -12882,7 +12882,7 @@ function au({
|
|
|
12882
12882
|
// Del/Strikethrough
|
|
12883
12883
|
del: ({ node: I, children: x, ...j }) => /* @__PURE__ */ n(K, { span: !0, td: "line-through", c: "dimmed", ...j, children: x })
|
|
12884
12884
|
};
|
|
12885
|
-
return
|
|
12885
|
+
return U(() => {
|
|
12886
12886
|
if (!d) {
|
|
12887
12887
|
X(!0), W(!1), S(null), y?.();
|
|
12888
12888
|
try {
|
|
@@ -12932,7 +12932,7 @@ function lu({
|
|
|
12932
12932
|
defaultSubtitles: c = !1,
|
|
12933
12933
|
preload: u = "metadata"
|
|
12934
12934
|
}) {
|
|
12935
|
-
const d = ue(null), h = ue(null), [f, p] = k("idle"), [g, y] = k(!1), [m, w] = k(s), [E, D] = k(0), [B, V] = k([]), [X, _] = k({ volume: o, muted: i }), [W, z] = k(1), [S, $] = k(!1), [
|
|
12935
|
+
const d = ue(null), h = ue(null), [f, p] = k("idle"), [g, y] = k(!1), [m, w] = k(s), [E, D] = k(0), [B, V] = k([]), [X, _] = k({ volume: o, muted: i }), [W, z] = k(1), [S, $] = k(!1), [G, v] = k(!1), [P, M] = k(
|
|
12936
12936
|
l?.[0]?.label
|
|
12937
12937
|
), [O, I] = k(c), x = cu(e), j = T(() => {
|
|
12938
12938
|
p("loading");
|
|
@@ -13018,16 +13018,16 @@ function lu({
|
|
|
13018
13018
|
console.warn("Exit PiP error", R);
|
|
13019
13019
|
}
|
|
13020
13020
|
}, []), be = T(() => {
|
|
13021
|
-
|
|
13022
|
-
}, [
|
|
13023
|
-
return
|
|
13021
|
+
G ? ve() : le();
|
|
13022
|
+
}, [G, le, ve]);
|
|
13023
|
+
return U(() => {
|
|
13024
13024
|
const R = () => {
|
|
13025
13025
|
$(!!document.fullscreenElement);
|
|
13026
13026
|
};
|
|
13027
13027
|
return document.addEventListener("fullscreenchange", R), () => {
|
|
13028
13028
|
document.removeEventListener("fullscreenchange", R);
|
|
13029
13029
|
};
|
|
13030
|
-
}, []),
|
|
13030
|
+
}, []), U(() => {
|
|
13031
13031
|
const R = () => {
|
|
13032
13032
|
v(!!document.pictureInPictureElement);
|
|
13033
13033
|
};
|
|
@@ -13046,7 +13046,7 @@ function lu({
|
|
|
13046
13046
|
muted: X.muted,
|
|
13047
13047
|
playbackRate: W,
|
|
13048
13048
|
isFullscreen: S,
|
|
13049
|
-
isPiP:
|
|
13049
|
+
isPiP: G,
|
|
13050
13050
|
selectedQuality: P,
|
|
13051
13051
|
subtitlesEnabled: O,
|
|
13052
13052
|
sources: x,
|
|
@@ -13316,7 +13316,7 @@ function hu({
|
|
|
13316
13316
|
loading: z,
|
|
13317
13317
|
error: S,
|
|
13318
13318
|
noData: $,
|
|
13319
|
-
onLoadStart:
|
|
13319
|
+
onLoadStart: G,
|
|
13320
13320
|
onLoadedMetadata: v,
|
|
13321
13321
|
onCanPlay: P,
|
|
13322
13322
|
onPlay: M,
|
|
@@ -13353,7 +13353,7 @@ function hu({
|
|
|
13353
13353
|
defaultSubtitles: u,
|
|
13354
13354
|
preload: te
|
|
13355
13355
|
}), [ie, le] = k(!0), [ve, be] = k(!1);
|
|
13356
|
-
|
|
13356
|
+
U(() => {
|
|
13357
13357
|
if (!p || f)
|
|
13358
13358
|
return;
|
|
13359
13359
|
let se;
|
|
@@ -13363,7 +13363,7 @@ function hu({
|
|
|
13363
13363
|
return Re && (Re.addEventListener("mousemove", $e), Re.addEventListener("click", $e), Re.addEventListener("touchstart", $e)), Q.isPlaying && (se = setTimeout(() => be(!0), g)), () => {
|
|
13364
13364
|
clearTimeout(se), Re && (Re.removeEventListener("mousemove", $e), Re.removeEventListener("click", $e), Re.removeEventListener("touchstart", $e));
|
|
13365
13365
|
};
|
|
13366
|
-
}, [p, f, g, Q.isPlaying]),
|
|
13366
|
+
}, [p, f, g, Q.isPlaying]), U(() => {
|
|
13367
13367
|
if (re)
|
|
13368
13368
|
return;
|
|
13369
13369
|
const se = ($e) => {
|
|
@@ -13395,9 +13395,9 @@ function hu({
|
|
|
13395
13395
|
}
|
|
13396
13396
|
};
|
|
13397
13397
|
return document.addEventListener("keydown", se), () => document.removeEventListener("keydown", se);
|
|
13398
|
-
}, [re, Q]),
|
|
13399
|
-
Q.playerState === "loading" &&
|
|
13400
|
-
}, [Q.playerState,
|
|
13398
|
+
}, [re, Q]), U(() => {
|
|
13399
|
+
Q.playerState === "loading" && G?.();
|
|
13400
|
+
}, [Q.playerState, G]), U(() => {
|
|
13401
13401
|
if (Q.duration > 0) {
|
|
13402
13402
|
const se = Q.videoRef.current;
|
|
13403
13403
|
v?.({
|
|
@@ -13406,21 +13406,21 @@ function hu({
|
|
|
13406
13406
|
height: se?.videoHeight || 0
|
|
13407
13407
|
});
|
|
13408
13408
|
}
|
|
13409
|
-
}, [Q.duration, v]),
|
|
13409
|
+
}, [Q.duration, v]), U(() => {
|
|
13410
13410
|
Q.playerState === "ready" && P?.();
|
|
13411
|
-
}, [Q.playerState, P]),
|
|
13411
|
+
}, [Q.playerState, P]), U(() => {
|
|
13412
13412
|
Q.isPlaying ? M?.() : O?.();
|
|
13413
|
-
}, [Q.isPlaying, M, O]),
|
|
13413
|
+
}, [Q.isPlaying, M, O]), U(() => {
|
|
13414
13414
|
Q.playerState === "ended" && I?.();
|
|
13415
|
-
}, [Q.playerState, I]),
|
|
13415
|
+
}, [Q.playerState, I]), U(() => {
|
|
13416
13416
|
x?.(Q.currentTime, Q.duration), j?.(Q.buffered);
|
|
13417
|
-
}, [Q.currentTime, Q.buffered, x, j]),
|
|
13417
|
+
}, [Q.currentTime, Q.buffered, x, j]), U(() => {
|
|
13418
13418
|
A?.(Q.volume, Q.muted);
|
|
13419
|
-
}, [Q.volume, Q.muted, A]),
|
|
13419
|
+
}, [Q.volume, Q.muted, A]), U(() => {
|
|
13420
13420
|
C?.(Q.playbackRate);
|
|
13421
|
-
}, [Q.playbackRate, C]),
|
|
13421
|
+
}, [Q.playbackRate, C]), U(() => {
|
|
13422
13422
|
ee?.(Q.isFullscreen);
|
|
13423
|
-
}, [Q.isFullscreen, ee]),
|
|
13423
|
+
}, [Q.isFullscreen, ee]), U(() => {
|
|
13424
13424
|
ke?.(Q.isPiP);
|
|
13425
13425
|
}, [Q.isPiP, ke]);
|
|
13426
13426
|
const R = () => {
|
|
@@ -13962,10 +13962,10 @@ function Eu({
|
|
|
13962
13962
|
const P = new Blob([z], { type: "application/octet-stream" }), M = URL.createObjectURL(P), O = document.createElement("a");
|
|
13963
13963
|
O.href = M, O.download = `receipt_${Date.now()}.bin`, document.body.appendChild(O), O.click(), document.body.removeChild(O), URL.revokeObjectURL(M);
|
|
13964
13964
|
}, [z]);
|
|
13965
|
-
|
|
13965
|
+
U(() => {
|
|
13966
13966
|
i && !a && z && S();
|
|
13967
13967
|
}, [i, a, z]);
|
|
13968
|
-
const
|
|
13968
|
+
const G = () => {
|
|
13969
13969
|
switch (D) {
|
|
13970
13970
|
case "printing":
|
|
13971
13971
|
return /* @__PURE__ */ n(Ot, {});
|
|
@@ -14017,7 +14017,7 @@ function Eu({
|
|
|
14017
14017
|
/* @__PURE__ */ n(
|
|
14018
14018
|
_e,
|
|
14019
14019
|
{
|
|
14020
|
-
leftSection:
|
|
14020
|
+
leftSection: G(),
|
|
14021
14021
|
onClick: S,
|
|
14022
14022
|
disabled: D === "printing" || !z,
|
|
14023
14023
|
loading: D === "printing",
|
|
@@ -14602,7 +14602,7 @@ function Vu({
|
|
|
14602
14602
|
header: _,
|
|
14603
14603
|
footer: W
|
|
14604
14604
|
}) {
|
|
14605
|
-
const { t: z } = Xe(), S = Mt(), [$,
|
|
14605
|
+
const { t: z } = Xe(), S = Mt(), [$, G] = k(o), [v, P] = k(() => {
|
|
14606
14606
|
const H = Hn(S, e);
|
|
14607
14607
|
return s ? Hn(H, Eo(s)) : H;
|
|
14608
14608
|
}), [M, O] = k(v.primaryColor || "blue"), [I, x] = k(!1), j = T((H) => {
|
|
@@ -14714,7 +14714,7 @@ function Vu({
|
|
|
14714
14714
|
{
|
|
14715
14715
|
orientation: "vertical",
|
|
14716
14716
|
value: $,
|
|
14717
|
-
onChange: (H) =>
|
|
14717
|
+
onChange: (H) => G(H),
|
|
14718
14718
|
variant: "pills",
|
|
14719
14719
|
children: /* @__PURE__ */ n(Rn.List, { children: C.map((H) => {
|
|
14720
14720
|
const J = H.icon;
|
|
@@ -15960,7 +15960,7 @@ const nr = (e, t) => {
|
|
|
15960
15960
|
borderRadius: W
|
|
15961
15961
|
}) => {
|
|
15962
15962
|
const [z, S] = k(t.quickFilterValues?.[0] || "");
|
|
15963
|
-
|
|
15963
|
+
U(() => {
|
|
15964
15964
|
S(t.quickFilterValues?.[0] || "");
|
|
15965
15965
|
}, [t.quickFilterValues]);
|
|
15966
15966
|
const $ = T((O) => {
|
|
@@ -15971,13 +15971,13 @@ const nr = (e, t) => {
|
|
|
15971
15971
|
quickFilterValues: I ? [I] : []
|
|
15972
15972
|
};
|
|
15973
15973
|
console.log("[Toolbar] Chamando onFilterModelChange com:", x), h(x);
|
|
15974
|
-
}, [t, h]),
|
|
15974
|
+
}, [t, h]), G = Ge(
|
|
15975
15975
|
() => rs((O) => $(O), 300),
|
|
15976
15976
|
[$]
|
|
15977
15977
|
);
|
|
15978
|
-
|
|
15979
|
-
|
|
15980
|
-
}, [
|
|
15978
|
+
U(() => () => {
|
|
15979
|
+
G.cancel();
|
|
15980
|
+
}, [G]);
|
|
15981
15981
|
const v = T(() => {
|
|
15982
15982
|
console.log("[Toolbar] handleRefresh chamado - executando apenas onRefresh"), f();
|
|
15983
15983
|
}, [f]);
|
|
@@ -16023,7 +16023,7 @@ const nr = (e, t) => {
|
|
|
16023
16023
|
{
|
|
16024
16024
|
value: z,
|
|
16025
16025
|
onChange: (O) => {
|
|
16026
|
-
S(O || ""),
|
|
16026
|
+
S(O || ""), G(O);
|
|
16027
16027
|
},
|
|
16028
16028
|
onClear: () => {
|
|
16029
16029
|
S(""), $(null);
|
|
@@ -16392,7 +16392,7 @@ function yh({
|
|
|
16392
16392
|
return e && p.forEach((y) => g.add(y)), p.has(f) || (g.add(f), t && t(Array.from(g))), g;
|
|
16393
16393
|
});
|
|
16394
16394
|
}, [e, t]);
|
|
16395
|
-
return
|
|
16395
|
+
return U(() => {
|
|
16396
16396
|
setTimeout(() => {
|
|
16397
16397
|
if (i.size === 0) {
|
|
16398
16398
|
l(0);
|
|
@@ -16405,7 +16405,7 @@ function yh({
|
|
|
16405
16405
|
} else
|
|
16406
16406
|
l(r);
|
|
16407
16407
|
}, 0);
|
|
16408
|
-
}, [i, r]),
|
|
16408
|
+
}, [i, r]), U(() => {
|
|
16409
16409
|
const f = () => {
|
|
16410
16410
|
i.size > 0 && d();
|
|
16411
16411
|
};
|
|
@@ -16429,7 +16429,7 @@ function bh({
|
|
|
16429
16429
|
detailPanelRefs: r,
|
|
16430
16430
|
closeAllDetailPanels: i
|
|
16431
16431
|
}) {
|
|
16432
|
-
|
|
16432
|
+
U(() => {
|
|
16433
16433
|
if (t.size === 0)
|
|
16434
16434
|
return;
|
|
16435
16435
|
const o = (s) => {
|
|
@@ -16477,7 +16477,7 @@ function wh({
|
|
|
16477
16477
|
detailPanelMinHeight: s = 200
|
|
16478
16478
|
}) {
|
|
16479
16479
|
const [l, a] = k(!1);
|
|
16480
|
-
return
|
|
16480
|
+
return U(() => {
|
|
16481
16481
|
const c = () => {
|
|
16482
16482
|
if (!e.current) {
|
|
16483
16483
|
a(!0);
|
|
@@ -16523,7 +16523,7 @@ function Rp(e) {
|
|
|
16523
16523
|
renderToolbarActions: z,
|
|
16524
16524
|
renderToolbarInternalActions: S,
|
|
16525
16525
|
allowColumnFilters: $ = !0,
|
|
16526
|
-
allowExportData:
|
|
16526
|
+
allowExportData: G = !0,
|
|
16527
16527
|
allowPrintData: v = !0,
|
|
16528
16528
|
withBorder: P = !0,
|
|
16529
16529
|
withColumnBorders: M = !0,
|
|
@@ -16581,14 +16581,14 @@ function Rp(e) {
|
|
|
16581
16581
|
withPaginationBorder: Ct = !0,
|
|
16582
16582
|
toolbarPadding: ut,
|
|
16583
16583
|
paginationPadding: Ve
|
|
16584
|
-
} = e,
|
|
16584
|
+
} = e, Y = Zt(), { colorScheme: De } = Lt(), pe = Tl(), Fe = Ta(), Ee = ((me) => {
|
|
16585
16585
|
const [Me, Le] = k({
|
|
16586
16586
|
isAvailable: !1,
|
|
16587
16587
|
hasPermission: (Be) => !0,
|
|
16588
16588
|
registerAction: (Be, Oe) => {
|
|
16589
16589
|
}
|
|
16590
16590
|
});
|
|
16591
|
-
return
|
|
16591
|
+
return U(() => {
|
|
16592
16592
|
if (me)
|
|
16593
16593
|
try {
|
|
16594
16594
|
console.debug(`Grid solicitou segurança para '${me}', mas integração ainda em desenvolvimento.`), Le({
|
|
@@ -16642,9 +16642,9 @@ function Rp(e) {
|
|
|
16642
16642
|
rowHeight: de,
|
|
16643
16643
|
detailPanelMinHeight: ce
|
|
16644
16644
|
}), Pt = ue(!1), $i = ue(null), zn = ue(!1);
|
|
16645
|
-
|
|
16645
|
+
U(() => () => {
|
|
16646
16646
|
$i.current && clearTimeout($i.current);
|
|
16647
|
-
}, []),
|
|
16647
|
+
}, []), U(() => {
|
|
16648
16648
|
const me = (Le) => {
|
|
16649
16649
|
if (Pt.current || zn.current) {
|
|
16650
16650
|
zn.current = !1;
|
|
@@ -16794,7 +16794,7 @@ function Rp(e) {
|
|
|
16794
16794
|
Le.filter = void 0, Le.originFilter = [], kt(!0), t.refreshData?.(Le), gt();
|
|
16795
16795
|
}
|
|
16796
16796
|
}, [qe, Ke, lt, t, Ht.pageSize]);
|
|
16797
|
-
|
|
16797
|
+
U(() => {
|
|
16798
16798
|
we && we(In), ze && ze($n);
|
|
16799
16799
|
}, [we, ze]), ba(
|
|
16800
16800
|
be,
|
|
@@ -16819,12 +16819,12 @@ function Rp(e) {
|
|
|
16819
16819
|
root: {
|
|
16820
16820
|
height: "100%",
|
|
16821
16821
|
// Garante que o DataGrid ocupe toda a altura do container
|
|
16822
|
-
border: P ? `1px solid ${
|
|
16823
|
-
borderRadius:
|
|
16822
|
+
border: P ? `1px solid ${Y.colors.gray[De === "dark" ? 8 : 3]}` : "0",
|
|
16823
|
+
borderRadius: Y.radius.sm,
|
|
16824
16824
|
overflow: "hidden",
|
|
16825
16825
|
// Garante que o conteúdo respeite o border-radius
|
|
16826
|
-
backgroundColor: De === "dark" ?
|
|
16827
|
-
color: De === "dark" ?
|
|
16826
|
+
backgroundColor: De === "dark" ? Y.colors.dark[6] : Y.white,
|
|
16827
|
+
color: De === "dark" ? Y.colors.gray[0] : Y.colors.dark[9],
|
|
16828
16828
|
// Scrollbar customizada do MUI DataGrid - estilo Mantine (mais fina e elegante)
|
|
16829
16829
|
"& .MuiDataGrid-scrollbar": {
|
|
16830
16830
|
"&.MuiDataGrid-scrollbar--horizontal": {
|
|
@@ -16833,7 +16833,7 @@ function Rp(e) {
|
|
|
16833
16833
|
"&.MuiDataGrid-scrollbar--vertical": {
|
|
16834
16834
|
width: "8px !important"
|
|
16835
16835
|
},
|
|
16836
|
-
backgroundColor: De === "dark" ?
|
|
16836
|
+
backgroundColor: De === "dark" ? Y.colors.dark[6] : Y.colors.gray[1],
|
|
16837
16837
|
borderRadius: "4px",
|
|
16838
16838
|
"& .MuiDataGrid-scrollbarContent": {
|
|
16839
16839
|
borderRadius: "4px"
|
|
@@ -16846,216 +16846,216 @@ function Rp(e) {
|
|
|
16846
16846
|
height: "8px"
|
|
16847
16847
|
},
|
|
16848
16848
|
"&::-webkit-scrollbar-track": {
|
|
16849
|
-
backgroundColor: De === "dark" ?
|
|
16849
|
+
backgroundColor: De === "dark" ? Y.colors.dark[6] : Y.colors.gray[1],
|
|
16850
16850
|
borderRadius: "4px"
|
|
16851
16851
|
},
|
|
16852
16852
|
"&::-webkit-scrollbar-thumb": {
|
|
16853
|
-
backgroundColor: De === "dark" ?
|
|
16853
|
+
backgroundColor: De === "dark" ? Y.colors.dark[3] : Y.colors.gray[4],
|
|
16854
16854
|
borderRadius: "4px",
|
|
16855
16855
|
"&:hover": {
|
|
16856
|
-
backgroundColor: De === "dark" ?
|
|
16856
|
+
backgroundColor: De === "dark" ? Y.colors.dark[2] : Y.colors.gray[5]
|
|
16857
16857
|
}
|
|
16858
16858
|
},
|
|
16859
16859
|
// Firefox
|
|
16860
16860
|
scrollbarWidth: "thin",
|
|
16861
|
-
scrollbarColor: De === "dark" ? `${
|
|
16861
|
+
scrollbarColor: De === "dark" ? `${Y.colors.dark[3]} ${Y.colors.dark[6]}` : `${Y.colors.gray[4]} ${Y.colors.gray[1]}`
|
|
16862
16862
|
},
|
|
16863
|
-
fontSize: typeof Z == "string" && ["xs", "sm", "md", "lg", "xl"].includes(Z) ?
|
|
16863
|
+
fontSize: typeof Z == "string" && ["xs", "sm", "md", "lg", "xl"].includes(Z) ? Y.fontSizes[Z] : Y.fontSizes.sm,
|
|
16864
16864
|
// Estilos dos cabeçalhos - com !important para sobrescrever MUI
|
|
16865
16865
|
"& .MuiDataGrid-columnHeaders": {
|
|
16866
|
-
backgroundColor: `${De === "dark" ?
|
|
16867
|
-
color: `${De === "dark" ?
|
|
16866
|
+
backgroundColor: `${De === "dark" ? Y.colors.dark[7] : Y.white} !important`,
|
|
16867
|
+
color: `${De === "dark" ? Y.colors.gray[0] : Y.colors.dark[9]} !important`,
|
|
16868
16868
|
fontWeight: 600,
|
|
16869
|
-
borderBottom: `1px solid ${De === "dark" ?
|
|
16869
|
+
borderBottom: `1px solid ${De === "dark" ? Y.colors.dark[4] : Y.colors.gray[3]} !important`
|
|
16870
16870
|
},
|
|
16871
16871
|
"& .MuiDataGrid-columnHeader": {
|
|
16872
|
-
backgroundColor: `${De === "dark" ?
|
|
16873
|
-
color: `${De === "dark" ?
|
|
16872
|
+
backgroundColor: `${De === "dark" ? Y.colors.dark[7] : Y.white} !important`,
|
|
16873
|
+
color: `${De === "dark" ? Y.colors.gray[0] : Y.colors.dark[9]} !important`,
|
|
16874
16874
|
"&:focus, &:focus-within": {
|
|
16875
16875
|
outline: "none !important"
|
|
16876
16876
|
}
|
|
16877
16877
|
},
|
|
16878
16878
|
"& .MuiDataGrid-columnHeaderRow": {
|
|
16879
|
-
backgroundColor: `${De === "dark" ?
|
|
16879
|
+
backgroundColor: `${De === "dark" ? Y.colors.dark[7] : Y.white} !important`
|
|
16880
16880
|
},
|
|
16881
16881
|
"& .MuiDataGrid-columnHeaderTitle": {
|
|
16882
|
-
color: `${De === "dark" ?
|
|
16882
|
+
color: `${De === "dark" ? Y.colors.gray[0] : Y.colors.dark[9]} !important`,
|
|
16883
16883
|
fontWeight: "600 !important"
|
|
16884
16884
|
},
|
|
16885
16885
|
"& .MuiDataGrid-columnHeaderTitleContainer": {
|
|
16886
|
-
color: `${De === "dark" ?
|
|
16886
|
+
color: `${De === "dark" ? Y.colors.gray[0] : Y.colors.dark[9]} !important`
|
|
16887
16887
|
},
|
|
16888
16888
|
"& .MuiDataGrid-columnHeaderTitleContainerContent": {
|
|
16889
|
-
color: `${De === "dark" ?
|
|
16889
|
+
color: `${De === "dark" ? Y.colors.gray[0] : Y.colors.dark[9]} !important`
|
|
16890
16890
|
},
|
|
16891
16891
|
// Container geral do header
|
|
16892
16892
|
"& .MuiDataGrid-columnHeadersInner": {
|
|
16893
|
-
backgroundColor: `${De === "dark" ?
|
|
16893
|
+
backgroundColor: `${De === "dark" ? Y.colors.dark[7] : Y.white} !important`
|
|
16894
16894
|
},
|
|
16895
16895
|
"& .MuiDataGrid-pinnedColumnHeaders": {
|
|
16896
|
-
backgroundColor: `${De === "dark" ?
|
|
16896
|
+
backgroundColor: `${De === "dark" ? Y.colors.dark[7] : Y.white} !important`
|
|
16897
16897
|
},
|
|
16898
16898
|
"& .MuiDataGrid-columnSeparator": {
|
|
16899
|
-
color: `${De === "dark" ?
|
|
16899
|
+
color: `${De === "dark" ? Y.colors.dark[4] : Y.colors.gray[3]} !important`
|
|
16900
16900
|
},
|
|
16901
16901
|
"& .MuiDataGrid-menuIcon": {
|
|
16902
|
-
color: `${De === "dark" ?
|
|
16902
|
+
color: `${De === "dark" ? Y.colors.gray[4] : Y.colors.dark[5]} !important`
|
|
16903
16903
|
},
|
|
16904
16904
|
"& .MuiDataGrid-sortIcon": {
|
|
16905
|
-
color: `${De === "dark" ?
|
|
16905
|
+
color: `${De === "dark" ? Y.colors.gray[4] : Y.colors.dark[5]} !important`
|
|
16906
16906
|
},
|
|
16907
16907
|
"& .MuiDataGrid-iconButtonContainer": {
|
|
16908
|
-
color: `${De === "dark" ?
|
|
16908
|
+
color: `${De === "dark" ? Y.colors.gray[4] : Y.colors.dark[5]} !important`
|
|
16909
16909
|
},
|
|
16910
16910
|
// Checkbox do header
|
|
16911
16911
|
"& .MuiDataGrid-columnHeader .MuiCheckbox-root": {
|
|
16912
|
-
color: `${De === "dark" ?
|
|
16912
|
+
color: `${De === "dark" ? Y.colors.gray[3] : Y.colors.dark[6]} !important`
|
|
16913
16913
|
},
|
|
16914
16914
|
// Estilos das células
|
|
16915
16915
|
"& .MuiDataGrid-cell": {
|
|
16916
|
-
borderRight: M ? `1px solid ${
|
|
16916
|
+
borderRight: M ? `1px solid ${Y.colors.gray[De === "dark" ? 7 : 3]}` : "none",
|
|
16917
16917
|
padding: typeof Q == "number" ? `${Q}px` : Q || "4px",
|
|
16918
|
-
color: De === "dark" ?
|
|
16918
|
+
color: De === "dark" ? Y.colors.gray[0] : Y.colors.dark[9]
|
|
16919
16919
|
},
|
|
16920
16920
|
// Estilos das linhas
|
|
16921
16921
|
"& .MuiDataGrid-row": {
|
|
16922
|
-
backgroundColor: De === "dark" ?
|
|
16923
|
-
color: De === "dark" ?
|
|
16922
|
+
backgroundColor: De === "dark" ? Y.colors.dark[6] : Y.white,
|
|
16923
|
+
color: De === "dark" ? Y.colors.gray[0] : Y.colors.dark[9],
|
|
16924
16924
|
"&:hover": {
|
|
16925
|
-
backgroundColor: O ? De === "dark" ?
|
|
16925
|
+
backgroundColor: O ? De === "dark" ? Y.colors.dark[5] : Y.colors.gray[1] : "inherit"
|
|
16926
16926
|
},
|
|
16927
16927
|
"&.Mui-selected": {
|
|
16928
16928
|
backgroundColor: `rgba(${So(
|
|
16929
|
-
|
|
16929
|
+
Y.colors[Y.primaryColor][De === "dark" ? 9 : 1]
|
|
16930
16930
|
)}, ${De === "dark" ? 0.8 : 0.1})`,
|
|
16931
16931
|
"&:hover": {
|
|
16932
16932
|
backgroundColor: `rgba(${So(
|
|
16933
|
-
|
|
16933
|
+
Y.colors[Y.primaryColor][De === "dark" ? 8 : 2]
|
|
16934
16934
|
)}, ${De === "dark" ? 0.4 : 0.15})`
|
|
16935
16935
|
}
|
|
16936
16936
|
},
|
|
16937
16937
|
"&:nth-of-type(even)": {
|
|
16938
|
-
backgroundColor: I ? De === "dark" ?
|
|
16938
|
+
backgroundColor: I ? De === "dark" ? Y.colors.dark[5] : Y.colors.gray[0] : "inherit"
|
|
16939
16939
|
}
|
|
16940
16940
|
},
|
|
16941
16941
|
// Melhorando a visibilidade do checkbox
|
|
16942
16942
|
"& .MuiCheckbox-root": {
|
|
16943
|
-
color: De === "dark" ?
|
|
16943
|
+
color: De === "dark" ? Y.colors.gray[3] : Y.colors.dark[6],
|
|
16944
16944
|
"&.Mui-checked": {
|
|
16945
|
-
color: De === "dark" ?
|
|
16945
|
+
color: De === "dark" ? Y.colors[Y.primaryColor][5] : Y.colors[Y.primaryColor][7]
|
|
16946
16946
|
}
|
|
16947
16947
|
},
|
|
16948
16948
|
// Células selecionadas (diferente da célula com foco)
|
|
16949
16949
|
"& .MuiDataGrid-cell.MuiDataGrid-cell--selected": {
|
|
16950
16950
|
backgroundColor: "transparent",
|
|
16951
16951
|
// Remover destaque padrão do MUI
|
|
16952
|
-
color: De === "dark" ?
|
|
16952
|
+
color: De === "dark" ? Y.colors.gray[0] : Y.colors.dark[9],
|
|
16953
16953
|
outline: "none"
|
|
16954
16954
|
},
|
|
16955
16955
|
"& .MuiDataGrid-cell:focus": {
|
|
16956
|
-
backgroundColor:
|
|
16957
|
-
color:
|
|
16956
|
+
backgroundColor: Y.colors[Y.primaryColor][6],
|
|
16957
|
+
color: Y.white
|
|
16958
16958
|
},
|
|
16959
16959
|
// Estilos específicos para o painel de detalhes
|
|
16960
16960
|
"& .detail-panel-container": {
|
|
16961
|
-
borderTop: `1px solid ${
|
|
16962
|
-
backgroundColor: De === "dark" ?
|
|
16963
|
-
padding:
|
|
16961
|
+
borderTop: `1px solid ${Y.colors.gray[De === "dark" ? 7 : 3]}`,
|
|
16962
|
+
backgroundColor: De === "dark" ? Y.colors.dark[5] : Y.colors.gray[0],
|
|
16963
|
+
padding: Y.spacing.md,
|
|
16964
16964
|
width: "100%"
|
|
16965
16965
|
},
|
|
16966
16966
|
"& .MuiDataGrid-virtualScroller": {
|
|
16967
16967
|
paddingBottom: "0px !important",
|
|
16968
16968
|
display: "flex",
|
|
16969
16969
|
flexDirection: "column",
|
|
16970
|
-
backgroundColor: `${De === "dark" ?
|
|
16970
|
+
backgroundColor: `${De === "dark" ? Y.colors.dark[6] : Y.white} !important`
|
|
16971
16971
|
},
|
|
16972
16972
|
"& .MuiDataGrid-virtualScrollerContent": {
|
|
16973
16973
|
flexBasis: "auto !important",
|
|
16974
16974
|
flexGrow: "1 !important",
|
|
16975
16975
|
flexShrink: "0 !important",
|
|
16976
|
-
backgroundColor: `${De === "dark" ?
|
|
16976
|
+
backgroundColor: `${De === "dark" ? Y.colors.dark[6] : Y.white} !important`
|
|
16977
16977
|
},
|
|
16978
16978
|
"& .MuiDataGrid-virtualScrollerRenderZone": {
|
|
16979
|
-
backgroundColor: `${De === "dark" ?
|
|
16979
|
+
backgroundColor: `${De === "dark" ? Y.colors.dark[6] : Y.white} !important`
|
|
16980
16980
|
},
|
|
16981
16981
|
"& .MuiDataGrid-main": {
|
|
16982
|
-
backgroundColor: `${De === "dark" ?
|
|
16982
|
+
backgroundColor: `${De === "dark" ? Y.colors.dark[6] : Y.white} !important`
|
|
16983
16983
|
},
|
|
16984
16984
|
"& .MuiDataGrid-overlayWrapper": {
|
|
16985
|
-
backgroundColor: `${De === "dark" ?
|
|
16985
|
+
backgroundColor: `${De === "dark" ? Y.colors.dark[6] : Y.white} !important`
|
|
16986
16986
|
},
|
|
16987
16987
|
"& .MuiDataGrid-overlayWrapperInner": {
|
|
16988
|
-
backgroundColor: `${De === "dark" ?
|
|
16988
|
+
backgroundColor: `${De === "dark" ? Y.colors.dark[6] : Y.white} !important`
|
|
16989
16989
|
},
|
|
16990
16990
|
"& .MuiDataGrid-filler": {
|
|
16991
16991
|
display: "none !important"
|
|
16992
16992
|
},
|
|
16993
16993
|
// Área de preenchimento do header (filler column)
|
|
16994
16994
|
"& .MuiDataGrid-filler--pinnedRight": {
|
|
16995
|
-
backgroundColor: `${De === "dark" ?
|
|
16995
|
+
backgroundColor: `${De === "dark" ? Y.colors.dark[7] : Y.white} !important`
|
|
16996
16996
|
},
|
|
16997
16997
|
"& .MuiDataGrid-filler--pinnedLeft": {
|
|
16998
|
-
backgroundColor: `${De === "dark" ?
|
|
16998
|
+
backgroundColor: `${De === "dark" ? Y.colors.dark[7] : Y.white} !important`
|
|
16999
16999
|
},
|
|
17000
17000
|
"& .MuiDataGrid-columnHeadersInner--scrollable": {
|
|
17001
|
-
backgroundColor: `${De === "dark" ?
|
|
17001
|
+
backgroundColor: `${De === "dark" ? Y.colors.dark[7] : Y.white} !important`
|
|
17002
17002
|
},
|
|
17003
17003
|
// Footer container
|
|
17004
17004
|
"& .MuiDataGrid-footerContainer": {
|
|
17005
|
-
backgroundColor: `${De === "dark" ?
|
|
17006
|
-
borderTop: `1px solid ${De === "dark" ?
|
|
17005
|
+
backgroundColor: `${De === "dark" ? Y.colors.dark[7] : Y.white} !important`,
|
|
17006
|
+
borderTop: `1px solid ${De === "dark" ? Y.colors.dark[4] : Y.colors.gray[3]} !important`
|
|
17007
17007
|
},
|
|
17008
17008
|
// Scrollbar container area
|
|
17009
17009
|
"& .MuiDataGrid-scrollArea": {
|
|
17010
|
-
backgroundColor: `${De === "dark" ?
|
|
17010
|
+
backgroundColor: `${De === "dark" ? Y.colors.dark[6] : Y.white} !important`
|
|
17011
17011
|
},
|
|
17012
17012
|
"& .MuiDataGrid-scrollArea--right": {
|
|
17013
|
-
backgroundColor: `${De === "dark" ?
|
|
17013
|
+
backgroundColor: `${De === "dark" ? Y.colors.dark[6] : Y.white} !important`
|
|
17014
17014
|
},
|
|
17015
17015
|
"& .MuiDataGrid-scrollArea--left": {
|
|
17016
|
-
backgroundColor: `${De === "dark" ?
|
|
17016
|
+
backgroundColor: `${De === "dark" ? Y.colors.dark[6] : Y.white} !important`
|
|
17017
17017
|
},
|
|
17018
17018
|
// Top and bottom containers
|
|
17019
17019
|
"& .MuiDataGrid-topContainer": {
|
|
17020
|
-
backgroundColor: `${De === "dark" ?
|
|
17020
|
+
backgroundColor: `${De === "dark" ? Y.colors.dark[7] : Y.white} !important`
|
|
17021
17021
|
},
|
|
17022
17022
|
"& .MuiDataGrid-bottomContainer": {
|
|
17023
|
-
backgroundColor: `${De === "dark" ?
|
|
17023
|
+
backgroundColor: `${De === "dark" ? Y.colors.dark[7] : Y.white} !important`
|
|
17024
17024
|
},
|
|
17025
17025
|
// Área de pinned columns
|
|
17026
17026
|
"& .MuiDataGrid-pinnedColumns": {
|
|
17027
|
-
backgroundColor: `${De === "dark" ?
|
|
17027
|
+
backgroundColor: `${De === "dark" ? Y.colors.dark[6] : Y.white} !important`
|
|
17028
17028
|
},
|
|
17029
17029
|
"& .MuiDataGrid-pinnedColumns--right": {
|
|
17030
|
-
backgroundColor: `${De === "dark" ?
|
|
17030
|
+
backgroundColor: `${De === "dark" ? Y.colors.dark[6] : Y.white} !important`
|
|
17031
17031
|
},
|
|
17032
17032
|
"& .MuiDataGrid-pinnedColumns--left": {
|
|
17033
|
-
backgroundColor: `${De === "dark" ?
|
|
17033
|
+
backgroundColor: `${De === "dark" ? Y.colors.dark[6] : Y.white} !important`
|
|
17034
17034
|
},
|
|
17035
17035
|
// Área de scroll além do conteúdo (corner filler)
|
|
17036
17036
|
"& .MuiDataGrid-scrollbarFiller": {
|
|
17037
|
-
backgroundColor: `${De === "dark" ?
|
|
17037
|
+
backgroundColor: `${De === "dark" ? Y.colors.dark[7] : Y.white} !important`
|
|
17038
17038
|
},
|
|
17039
17039
|
"& .MuiDataGrid-scrollbarFiller--header": {
|
|
17040
|
-
backgroundColor: `${De === "dark" ?
|
|
17040
|
+
backgroundColor: `${De === "dark" ? Y.colors.dark[7] : Y.white} !important`
|
|
17041
17041
|
},
|
|
17042
17042
|
"& .MuiDataGrid-scrollbarFiller--borderTop": {
|
|
17043
|
-
backgroundColor: `${De === "dark" ?
|
|
17043
|
+
backgroundColor: `${De === "dark" ? Y.colors.dark[7] : Y.white} !important`
|
|
17044
17044
|
},
|
|
17045
17045
|
// Container wrapper
|
|
17046
17046
|
"& .MuiDataGrid-container--top": {
|
|
17047
|
-
backgroundColor: `${De === "dark" ?
|
|
17047
|
+
backgroundColor: `${De === "dark" ? Y.colors.dark[7] : Y.white} !important`
|
|
17048
17048
|
},
|
|
17049
17049
|
"& .MuiDataGrid-container--bottom": {
|
|
17050
|
-
backgroundColor: `${De === "dark" ?
|
|
17050
|
+
backgroundColor: `${De === "dark" ? Y.colors.dark[7] : Y.white} !important`
|
|
17051
17051
|
},
|
|
17052
17052
|
// Área de detalhes vazios / empty state
|
|
17053
17053
|
"& .MuiDataGrid-overlay": {
|
|
17054
|
-
backgroundColor: `${De === "dark" ?
|
|
17054
|
+
backgroundColor: `${De === "dark" ? Y.colors.dark[6] : Y.white} !important`
|
|
17055
17055
|
},
|
|
17056
17056
|
// Catch-all para qualquer div interno com fundo branco
|
|
17057
17057
|
"& > div": {
|
|
17058
|
-
backgroundColor: `${De === "dark" ?
|
|
17058
|
+
backgroundColor: `${De === "dark" ? Y.colors.dark[6] : Y.white} !important`
|
|
17059
17059
|
}
|
|
17060
17060
|
}
|
|
17061
17061
|
}), Os = Ge(() => typeof m == "string" ? m : Math.max(m, m + Si), [m, Si]), zt = Ge(() => {
|
|
@@ -17169,9 +17169,9 @@ function Rp(e) {
|
|
|
17169
17169
|
excludeColumns: ["actions", "id"],
|
|
17170
17170
|
onlyFilterable: !0
|
|
17171
17171
|
}), [zt, Te]);
|
|
17172
|
-
|
|
17172
|
+
U(() => {
|
|
17173
17173
|
const me = (Me) => {
|
|
17174
|
-
if (Me.type ===
|
|
17174
|
+
if (Me.type === q.refreshData) {
|
|
17175
17175
|
ft(Wn(t));
|
|
17176
17176
|
const Le = Number.isFinite(zr(t)) ? zr(t) : 0, Be = Number.isFinite(t.getPageSize?.()) ? Math.min(Math.max(1, t.getPageSize()), rn) : 10;
|
|
17177
17177
|
Er({
|
|
@@ -17180,7 +17180,7 @@ function Rp(e) {
|
|
|
17180
17180
|
});
|
|
17181
17181
|
const Oe = Number.isFinite(t.getGrandTotalRecords?.()) ? Math.max(0, t.getGrandTotalRecords()) : 0;
|
|
17182
17182
|
Ai(Oe), kt(!1), gt();
|
|
17183
|
-
} else if (Me.type ===
|
|
17183
|
+
} else if (Me.type === q.dataChanged || Me.type === q.afterRemove || Me.type === q.afterSave || Me.type === q.afterAppend || Me.type === q.afterCancel) {
|
|
17184
17184
|
ft(Wn(t));
|
|
17185
17185
|
const Le = Number.isFinite(zr(t)) ? zr(t) : 0, Be = Number.isFinite(t.getPageSize?.()) ? Math.min(Math.max(1, t.getPageSize()), rn) : 10;
|
|
17186
17186
|
Er({
|
|
@@ -17189,7 +17189,7 @@ function Rp(e) {
|
|
|
17189
17189
|
});
|
|
17190
17190
|
const Oe = Number.isFinite(t.getGrandTotalRecords?.()) ? Math.max(0, t.getGrandTotalRecords()) : 0;
|
|
17191
17191
|
Ai(Oe), kt(!1), gt();
|
|
17192
|
-
} else if (Me.type ===
|
|
17192
|
+
} else if (Me.type === q.afterScroll) {
|
|
17193
17193
|
if (Pt.current)
|
|
17194
17194
|
return;
|
|
17195
17195
|
const Le = t.getCurrentRecord();
|
|
@@ -17249,7 +17249,7 @@ function Rp(e) {
|
|
|
17249
17249
|
},
|
|
17250
17250
|
style: {
|
|
17251
17251
|
width: "100%",
|
|
17252
|
-
borderBottom: `1px solid ${
|
|
17252
|
+
borderBottom: `1px solid ${Y.colors.gray[De === "dark" ? 7 : 3]}`,
|
|
17253
17253
|
marginBottom: "8px",
|
|
17254
17254
|
zIndex: 2
|
|
17255
17255
|
},
|
|
@@ -17259,8 +17259,8 @@ function Rp(e) {
|
|
|
17259
17259
|
className: `detail-panel-container ${$e || ""}`,
|
|
17260
17260
|
style: {
|
|
17261
17261
|
padding: 8,
|
|
17262
|
-
backgroundColor: De === "dark" ?
|
|
17263
|
-
borderTop: `1px solid ${
|
|
17262
|
+
backgroundColor: De === "dark" ? Y.colors.dark[5] : Y.colors.gray[0],
|
|
17263
|
+
borderTop: `1px solid ${Y.colors.gray[De === "dark" ? 7 : 3]}`,
|
|
17264
17264
|
width: "100%",
|
|
17265
17265
|
...se || {}
|
|
17266
17266
|
},
|
|
@@ -17288,7 +17288,7 @@ function Rp(e) {
|
|
|
17288
17288
|
rowData: Me,
|
|
17289
17289
|
renderDetailPanel: R,
|
|
17290
17290
|
onClose: kr,
|
|
17291
|
-
theme:
|
|
17291
|
+
theme: Y,
|
|
17292
17292
|
className: $e,
|
|
17293
17293
|
style: se,
|
|
17294
17294
|
opened: Rt.has(me),
|
|
@@ -17302,7 +17302,7 @@ function Rp(e) {
|
|
|
17302
17302
|
rowData: Me,
|
|
17303
17303
|
renderDetailPanel: R,
|
|
17304
17304
|
onClose: kr,
|
|
17305
|
-
theme:
|
|
17305
|
+
theme: Y,
|
|
17306
17306
|
className: $e,
|
|
17307
17307
|
style: se,
|
|
17308
17308
|
opened: Rt.has(me),
|
|
@@ -17318,7 +17318,7 @@ function Rp(e) {
|
|
|
17318
17318
|
rowData: Me,
|
|
17319
17319
|
renderDetailPanel: R,
|
|
17320
17320
|
onClose: kr,
|
|
17321
|
-
theme:
|
|
17321
|
+
theme: Y,
|
|
17322
17322
|
className: $e,
|
|
17323
17323
|
style: se,
|
|
17324
17324
|
opened: Rt.has(me),
|
|
@@ -17336,7 +17336,7 @@ function Rp(e) {
|
|
|
17336
17336
|
height: Os,
|
|
17337
17337
|
width: w,
|
|
17338
17338
|
position: "relative",
|
|
17339
|
-
color: De === "dark" ?
|
|
17339
|
+
color: De === "dark" ? Y.colors.gray[0] : Y.colors.dark[9],
|
|
17340
17340
|
display: "flex",
|
|
17341
17341
|
flexDirection: "column",
|
|
17342
17342
|
overflow: "hidden"
|
|
@@ -17349,13 +17349,13 @@ function Rp(e) {
|
|
|
17349
17349
|
filterModel: At,
|
|
17350
17350
|
enableGlobalFilter: a,
|
|
17351
17351
|
enableTopToolbarActions: u,
|
|
17352
|
-
allowExportData:
|
|
17352
|
+
allowExportData: G,
|
|
17353
17353
|
allowPrintData: v,
|
|
17354
17354
|
toolbarAlignment: C,
|
|
17355
17355
|
toolbarLeftContent: ee,
|
|
17356
17356
|
renderToolbarActions: z,
|
|
17357
17357
|
renderToolbarInternalActions: S,
|
|
17358
|
-
theme:
|
|
17358
|
+
theme: Y,
|
|
17359
17359
|
onFilterModelChange: Ni,
|
|
17360
17360
|
onRefresh: Ri,
|
|
17361
17361
|
onExport: In,
|
|
@@ -17421,7 +17421,7 @@ function Rp(e) {
|
|
|
17421
17421
|
onPaginationModelChange: Pi,
|
|
17422
17422
|
paginationLabels: oe,
|
|
17423
17423
|
bottomToolbarMinHeight: ve,
|
|
17424
|
-
theme:
|
|
17424
|
+
theme: Y,
|
|
17425
17425
|
withBorder: Ct,
|
|
17426
17426
|
padding: Ve
|
|
17427
17427
|
}
|
|
@@ -17473,7 +17473,7 @@ function Pp({
|
|
|
17473
17473
|
maxHeight: d = 600
|
|
17474
17474
|
}) {
|
|
17475
17475
|
const h = ue(null), [f, p] = k(0);
|
|
17476
|
-
|
|
17476
|
+
U(() => {
|
|
17477
17477
|
h.current && a && p(h.current.scrollHeight);
|
|
17478
17478
|
}, [a, t]);
|
|
17479
17479
|
const g = r({ row: t });
|
|
@@ -17754,8 +17754,8 @@ function Lp({
|
|
|
17754
17754
|
};
|
|
17755
17755
|
}), [E, D] = k([]), [B, V] = k([]), [X, _] = k(() => e.getGrandTotalRecords()), [W, z] = k(
|
|
17756
17756
|
() => Math.ceil(e.getGrandTotalRecords() / (e.getPageSize() || t))
|
|
17757
|
-
), S = ue(!1), $ = ue(!1),
|
|
17758
|
-
|
|
17757
|
+
), S = ue(!1), $ = ue(!1), G = ue(!0), v = ue(null);
|
|
17758
|
+
U(() => {
|
|
17759
17759
|
a.current = e;
|
|
17760
17760
|
}, [e]);
|
|
17761
17761
|
const P = T((A) => {
|
|
@@ -17828,11 +17828,11 @@ function Lp({
|
|
|
17828
17828
|
}, [c, E, i]), j = T(() => {
|
|
17829
17829
|
S.current = !0, h(!0), a.current.refreshData?.(), s || l();
|
|
17830
17830
|
}, [l, s]);
|
|
17831
|
-
return
|
|
17831
|
+
return U(() => {
|
|
17832
17832
|
console.log("Setting up DataSource event listener in useGridData");
|
|
17833
17833
|
const A = (L) => {
|
|
17834
|
-
if (!
|
|
17835
|
-
if (L.type ===
|
|
17834
|
+
if (!G.current && !($.current && L.type === q.afterScroll)) {
|
|
17835
|
+
if (L.type === q.refreshData) {
|
|
17836
17836
|
u(a.current.browseRecords()), p({
|
|
17837
17837
|
page: a.current.getCurrentPage(),
|
|
17838
17838
|
pageSize: a.current.getPageSize()
|
|
@@ -17847,12 +17847,12 @@ function Lp({
|
|
|
17847
17847
|
}
|
|
17848
17848
|
else
|
|
17849
17849
|
D([]), V([]);
|
|
17850
|
-
} else if (L.type ===
|
|
17850
|
+
} else if (L.type === q.dataChanged || L.type === q.afterRemove || L.type === q.afterSave || L.type === q.afterAppend || L.type === q.afterCancel)
|
|
17851
17851
|
u(a.current.browseRecords()), p({
|
|
17852
17852
|
page: a.current.getCurrentPage(),
|
|
17853
17853
|
pageSize: a.current.getPageSize()
|
|
17854
17854
|
}), _(a.current.getGrandTotalRecords()), z(Math.ceil(a.current.getGrandTotalRecords() / a.current.getPageSize())), h(!1), S.current = !1, s || l();
|
|
17855
|
-
else if (L.type ===
|
|
17855
|
+
else if (L.type === q.afterScroll) {
|
|
17856
17856
|
if ($.current)
|
|
17857
17857
|
return;
|
|
17858
17858
|
const C = a.current.getCurrentRecord();
|
|
@@ -17870,7 +17870,7 @@ function Lp({
|
|
|
17870
17870
|
}
|
|
17871
17871
|
}
|
|
17872
17872
|
};
|
|
17873
|
-
v.current = A, e.addListener(A),
|
|
17873
|
+
v.current = A, e.addListener(A), G.current = !1, u(e.browseRecords()), _(e.getGrandTotalRecords()), z(Math.ceil(e.getGrandTotalRecords() / (e.getPageSize() || t)));
|
|
17874
17874
|
const F = e.getCurrentRecord();
|
|
17875
17875
|
if (F)
|
|
17876
17876
|
try {
|
|
@@ -17932,19 +17932,19 @@ function Fp({
|
|
|
17932
17932
|
delete window[E];
|
|
17933
17933
|
}, t * 2);
|
|
17934
17934
|
};
|
|
17935
|
-
return
|
|
17935
|
+
return U(() => {
|
|
17936
17936
|
const m = (D) => {
|
|
17937
17937
|
if ([
|
|
17938
|
-
|
|
17939
|
-
|
|
17940
|
-
|
|
17941
|
-
|
|
17942
|
-
|
|
17943
|
-
|
|
17938
|
+
q.refreshData,
|
|
17939
|
+
q.dataChanged,
|
|
17940
|
+
q.afterRemove,
|
|
17941
|
+
q.afterSave,
|
|
17942
|
+
q.afterAppend,
|
|
17943
|
+
q.afterCancel
|
|
17944
17944
|
].includes(D.type)) {
|
|
17945
17945
|
const V = Date.now(), X = p.current.get(D.type) || 0;
|
|
17946
17946
|
if (V - X < t) {
|
|
17947
|
-
console.log(`Ignorando evento ${
|
|
17947
|
+
console.log(`Ignorando evento ${q[D.type]} próximo demais ao anterior`);
|
|
17948
17948
|
return;
|
|
17949
17949
|
}
|
|
17950
17950
|
if (p.current.set(D.type, V), document.activeElement && ["INPUT", "TEXTAREA", "SELECT"].includes(document.activeElement.tagName)) {
|
|
@@ -18165,7 +18165,7 @@ const kh = {
|
|
|
18165
18165
|
s(u.intersectionRatio);
|
|
18166
18166
|
});
|
|
18167
18167
|
}, []);
|
|
18168
|
-
return
|
|
18168
|
+
return U(() => {
|
|
18169
18169
|
i.current || r.current && (i.current = new IntersectionObserver(a, {
|
|
18170
18170
|
...kh,
|
|
18171
18171
|
...t
|
|
@@ -18182,7 +18182,7 @@ const kh = {
|
|
|
18182
18182
|
};
|
|
18183
18183
|
}, Kp = (e) => {
|
|
18184
18184
|
const [t, r] = k({ width: 0, height: 0 });
|
|
18185
|
-
return
|
|
18185
|
+
return U(() => {
|
|
18186
18186
|
const i = () => ({
|
|
18187
18187
|
width: e.current.offsetWidth,
|
|
18188
18188
|
height: e.current.offsetHeight
|