@archbase/components 3.0.21 → 3.0.23
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
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { jsx as n, Fragment as ot, jsxs as b } from "react/jsx-runtime";
|
|
2
|
-
import { useMantineTheme as Mt, useMantineColorScheme as Lt, TextInput as at, Tooltip as je, ActionIcon as Ae, Checkbox as At, useInputProps as zo, CloseButton as Ur, Input as rt, Popover as Ct, ScrollArea as
|
|
2
|
+
import { useMantineTheme as Mt, useMantineColorScheme as Lt, TextInput as at, Tooltip as je, ActionIcon as Ae, Checkbox as At, useInputProps as zo, CloseButton as Ur, Input as rt, Popover as Ct, ScrollArea as Rt, useCombobox as Io, Combobox as or, ComboboxTarget as Ro, PillsInput as Li, Pill as $o, Loader as on, ComboboxDropdown as Po, Group as Ie, Image as ii, Text as K, CheckIcon as qs, InputBase as Ys, Chip as Wn, Flex as dt, Rating as No, Button as _e, rem as Ut, Avatar as Qs, JsonInput as Xs, Select as Tt, PasswordInput as Ks, Radio as Fi, Skeleton as Vo, Switch as Js, Card as Zs, ColorPicker as ea, Textarea as gn, MultiSelect as Mo, Stack as We, Box as ye, Paper as Qe, Space as br, UnstyledButton as ta, Progress as nn, Modal as Jt, Slider as Un, px as Ir, Menu as pt, Center as mt, LoadingOverlay as Ot, Alert as vr, Accordion as sr, NumberInput as _r, useProps as ra, ColorInput as na, Badge as oi, Code as Lo, Anchor as ia, Tabs as Rn, MantineProvider as oa, SegmentedControl as sa, ColorSwatch as Bi, CopyButton as aa, Pagination as la, Title as Nr, Drawer as ca, HoverCard as $n } from "@mantine/core";
|
|
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
|
-
import { useForceUpdate as nt, useUncontrolled as
|
|
4
|
+
import { useForceUpdate as nt, useUncontrolled as Gn, 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
6
|
import He, { useState as k, useRef as ue, useEffect as G, 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 lt, useArchbaseV1V2Compatibility as Ze, ArchbaseDataSource as
|
|
8
|
-
import { useValidationErrors as it, convertISOStringToDate as
|
|
9
|
-
import { pickCalendarProps as za, useDatesContext as Ia, Calendar as
|
|
7
|
+
import { DataSourceEventNames as q, useArchbaseDidUpdate as lt, useArchbaseV1V2Compatibility as Ze, ArchbaseDataSource as sn, useArchbaseDataSourceListener as Oo } from "@archbase/data";
|
|
8
|
+
import { useValidationErrors as it, convertISOStringToDate as an, useArchbaseTranslation as Xe, useArchbaseTheme as Zt, processErrorMessage as wa, isBase64 as Vr, formatStr as ar, ArchbaseObjectHelper as Bt, ArchbaseError as ln, 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 Sa, IN as Aa, BT as ji, ArchbaseMasker as Da, useArchbaseAppContext as Ta } from "@archbase/core";
|
|
9
|
+
import { pickCalendarProps as za, useDatesContext as Ia, Calendar as Ra, HiddenDatesInput as $a, DateTimePicker as Pa, DatePickerInput as Hi, TimeInput as jr } from "@mantine/dates";
|
|
10
10
|
import xt from "dayjs";
|
|
11
11
|
import { IMaskInput as Go } from "react-imask";
|
|
12
12
|
import Wi, { uniqueId as Dt } from "lodash";
|
|
13
|
-
import { IconCalendar as Hr, IconArrowRight as qo, IconX as Gt, IconCrop as Na, IconCheck as li, IconCloudUpload as
|
|
13
|
+
import { IconCalendar as Hr, IconArrowRight as qo, IconX as Gt, IconCrop as Na, IconCheck as li, IconCloudUpload as Pn, IconPhotoEdit as Va, IconCloudDownload as Ma, IconTrash as qt, IconSearch as ci, IconPlus as La, IconClock as wr, IconSquareCheck as Fa, IconSquare as Ba, IconChevronRight as Gr, IconChevronDown as cn, IconUpload as Oa, IconPhoto as _a, IconFileText as Ui, IconFileSpreadsheet as ja, IconFile as di, IconEdit as Yo, IconCameraPlus as Ha, IconZoomIn as yn, IconRotate as ui, IconMenu2 as Gi, IconAlertCircle as cr, IconZoomOut as hi, IconRefresh as Kn, IconArrowBigRightFilled as Wa, IconCirclePlus as bn, IconSettings as Qo, IconBug as fi, IconCircleCheck as Ua, IconInfoCircleFilled as Ga, IconAlertTriangleFilled as qa, IconCircleCheckFilled as Ya, IconChevronsLeft as Qa, IconChevronLeft as Xo, IconChevronsRight as Xa, IconDownload as Mr, IconPrinter as wn, IconHighlight as Jn, IconMessage2 as Zn, IconBookmark as ei, IconMaximize as Ko, IconFilter as Ka, IconBolt as Ja, IconHistory as Za, IconStar as el, IconExternalLink as tl, IconPlayerPlay as Jo, IconPlayerPause as rl, IconPlayerSkipBack as nl, IconPlayerSkipForward as il, IconVolume3 as ol, IconVolume as sl, IconSubmarine as al, IconPictureInPicture as ll, IconMinimize as cl, IconEye as Zo, IconPalette as qi, IconTypography as dl, IconRuler as ul, IconBorderAll as hl, IconCopy as es } from "@tabler/icons-react";
|
|
14
14
|
import fl from "dayjs/plugin/duration";
|
|
15
|
-
import { MIME_TYPES as
|
|
15
|
+
import { MIME_TYPES as Nn, Dropzone as Yr } from "@mantine/dropzone";
|
|
16
16
|
import pl from "react-easy-crop";
|
|
17
17
|
import * as bt from "d3";
|
|
18
18
|
import ml from "@rehooks/component-size";
|
|
@@ -33,12 +33,12 @@ import Dl from "rehype-external-links";
|
|
|
33
33
|
import { useGridApiRef as Tl, DataGrid as zl } from "@mui/x-data-grid";
|
|
34
34
|
import { ptBR as Il } from "@mui/x-data-grid/locales";
|
|
35
35
|
import { saveAs as ts } from "file-saver";
|
|
36
|
-
import { utils as Br, write as
|
|
36
|
+
import { utils as Br, write as Rl } from "xlsx";
|
|
37
37
|
import { format as wt } from "date-fns";
|
|
38
38
|
import { jsPDF as Qi } from "jspdf";
|
|
39
39
|
import "jspdf-autotable";
|
|
40
40
|
import rs from "lodash/debounce";
|
|
41
|
-
import { t as
|
|
41
|
+
import { t as $l } from "i18next";
|
|
42
42
|
import { useNavigate as Pl } from "react-router";
|
|
43
43
|
import { createSearchParams as Nl } from "react-router-dom";
|
|
44
44
|
import { useEventListener as Vl, useIsomorphicLayoutEffect as Ml } from "usehooks-ts";
|
|
@@ -72,7 +72,7 @@ function pf({
|
|
|
72
72
|
minLength: H,
|
|
73
73
|
maxLength: W
|
|
74
74
|
}) {
|
|
75
|
-
const [z, A] = k(p || ""),
|
|
75
|
+
const [z, A] = k(p || ""), R = ue(null), U = Mt(), { colorScheme: v } = Lt(), [P, M] = k(c), O = nt(), I = it(), x = `${t}`, _ = I?.getError(x), S = e && ("appendToFieldArray" in e || "updateFieldArrayItem" in e), [F, L] = k(""), [C, j] = k(0);
|
|
76
76
|
G(() => {
|
|
77
77
|
c !== void 0 && c !== P && M(c);
|
|
78
78
|
}, [c]);
|
|
@@ -124,7 +124,7 @@ function pf({
|
|
|
124
124
|
...o
|
|
125
125
|
},
|
|
126
126
|
value: S ? F : z,
|
|
127
|
-
ref: f ||
|
|
127
|
+
ref: f || R,
|
|
128
128
|
required: u,
|
|
129
129
|
onChange: we,
|
|
130
130
|
onBlur: ze,
|
|
@@ -183,9 +183,9 @@ function mf({
|
|
|
183
183
|
a
|
|
184
184
|
);
|
|
185
185
|
process.env.NODE_ENV;
|
|
186
|
-
const B = it(), V = `${t}`, X = B?.getError(V), [H, W] = k(c), z = ue(null), [A,
|
|
186
|
+
const B = it(), V = `${t}`, X = B?.getError(V), [H, W] = k(c), z = ue(null), [A, R] = k(f), U = nt();
|
|
187
187
|
G(() => {
|
|
188
|
-
f !== void 0 && f !== A &&
|
|
188
|
+
f !== void 0 && f !== A && R(f);
|
|
189
189
|
}, [f]);
|
|
190
190
|
const v = () => {
|
|
191
191
|
let C = H;
|
|
@@ -197,7 +197,7 @@ function mf({
|
|
|
197
197
|
}, P = T(() => {
|
|
198
198
|
v();
|
|
199
199
|
}, []), M = T((C) => {
|
|
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 || U()), C.type === q.onFieldError && C.fieldName === t && (
|
|
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 || U()), C.type === q.onFieldError && C.fieldName === t && (R(C.error), B?.setError(V, C.error)));
|
|
201
201
|
}, [D.isDataSourceV2, B, V]), O = ue(M);
|
|
202
202
|
G(() => {
|
|
203
203
|
O.current = M;
|
|
@@ -218,7 +218,7 @@ function mf({
|
|
|
218
218
|
const x = (C, j) => {
|
|
219
219
|
if (j)
|
|
220
220
|
return;
|
|
221
|
-
(A || X) && (
|
|
221
|
+
(A || X) && (R(void 0), B?.clearError(V));
|
|
222
222
|
const ee = C.target.checked, Se = ee ? l : a;
|
|
223
223
|
W(ee), e && !e.isBrowsing() && t && e.getFieldValue(t) !== Se && D.handleValueChange(Se), w && w(Se, C);
|
|
224
224
|
}, _ = (C) => {
|
|
@@ -369,7 +369,7 @@ function ti(e) {
|
|
|
369
369
|
rightSection: W,
|
|
370
370
|
unstyled: z,
|
|
371
371
|
classNames: A,
|
|
372
|
-
styles:
|
|
372
|
+
styles: R,
|
|
373
373
|
allowDeselect: U,
|
|
374
374
|
preserveTime: v,
|
|
375
375
|
date: P,
|
|
@@ -399,31 +399,29 @@ function ti(e) {
|
|
|
399
399
|
return rr[_].parse(pe);
|
|
400
400
|
} catch {
|
|
401
401
|
try {
|
|
402
|
-
return
|
|
402
|
+
return an(pe);
|
|
403
403
|
} catch {
|
|
404
404
|
return null;
|
|
405
405
|
}
|
|
406
406
|
}
|
|
407
407
|
return pe;
|
|
408
|
-
}, [ne, Z, Q] =
|
|
408
|
+
}, [ne, Z, Q] = Gn({
|
|
409
409
|
value: te(i),
|
|
410
410
|
defaultValue: te(o),
|
|
411
411
|
finalValue: null,
|
|
412
412
|
onChange: s
|
|
413
|
-
}), [ie, le] = k(e.error), Ce = nt(), [be,
|
|
413
|
+
}), [ie, le] = k(e.error), Ce = nt(), [be, $] = Gn({
|
|
414
414
|
value: P ? typeof P == "string" ? P : P.toISOString().split("T")[0] : null,
|
|
415
415
|
defaultValue: ne ? ne.toISOString().split("T")[0] : M ? typeof M == "string" ? M : M.toISOString().split("T")[0] : null,
|
|
416
416
|
finalValue: null,
|
|
417
417
|
onChange: O
|
|
418
|
-
}), xe = (pe) => pe ? rr[_].format(pe) : "", [ce, se] =
|
|
419
|
-
value: xe(ne)
|
|
420
|
-
}), $e = (pe) => {
|
|
418
|
+
}), xe = (pe) => pe ? rr[_].format(pe) : "", [ce, se] = k(xe(ne)), Re = (pe) => {
|
|
421
419
|
const Fe = rr[_].parse(pe);
|
|
422
420
|
return Number.isNaN(Fe.getTime()) ? Ll(pe) : Fe;
|
|
423
|
-
},
|
|
421
|
+
}, $e = () => {
|
|
424
422
|
let pe = V;
|
|
425
423
|
return S && !V && (pe = V || we.isReadOnly), pe;
|
|
426
|
-
}, Ne = f ||
|
|
424
|
+
}, Ne = f || Re, he = a || U, Ue = T(() => {
|
|
427
425
|
Ye();
|
|
428
426
|
}, []), Pe = T((pe) => {
|
|
429
427
|
S && F && ((pe.type === q.dataChanged || pe.type === q.recordChanged || pe.type === q.afterScroll || pe.type === q.afterCancel || pe.type === q.afterEdit) && (Ye(), we.isDataSourceV2 || Ce()), pe.type === q.onFieldError && pe.fieldName === F && (le(pe.error), ze?.setError(ve, pe.error)));
|
|
@@ -438,13 +436,13 @@ function ti(e) {
|
|
|
438
436
|
throw new Error("Invalid date");
|
|
439
437
|
tt = pe;
|
|
440
438
|
} catch {
|
|
441
|
-
Fe =
|
|
439
|
+
Fe = an(pe), tt = rr[_].format(Fe);
|
|
442
440
|
}
|
|
443
441
|
else
|
|
444
442
|
Fe = pe instanceof Date ? pe : new Date(pe), tt = rr[_].format(Fe);
|
|
445
|
-
tt !== ce && (se(tt),
|
|
443
|
+
tt !== ce && (se(tt), $(Fe.toISOString().split("T")[0]), Z(Fe));
|
|
446
444
|
} else
|
|
447
|
-
se(""),
|
|
445
|
+
se(""), $(null), Z(null);
|
|
448
446
|
}
|
|
449
447
|
}, [F, S, _, ce]), ge = T((pe) => {
|
|
450
448
|
if (S && F) {
|
|
@@ -470,44 +468,44 @@ function ti(e) {
|
|
|
470
468
|
}, []), G(() => {
|
|
471
469
|
e.error !== void 0 && e.error !== ie && le(e.error);
|
|
472
470
|
}, [e.error]), G(() => {
|
|
473
|
-
Q && ne &&
|
|
471
|
+
Q && ne && $(ne.toISOString().split("T")[0]);
|
|
474
472
|
}, [Q, ne]), G(() => {
|
|
475
473
|
se(xe(ne));
|
|
476
|
-
}, [oe.locale]);
|
|
474
|
+
}, [oe.locale, ne]);
|
|
477
475
|
const [fe, Te] = k(!1), qe = (pe) => {
|
|
478
|
-
if (
|
|
476
|
+
if (!$e()) {
|
|
479
477
|
const Fe = pe.currentTarget.value;
|
|
480
478
|
if (se(Fe), (ie || re) && (le(void 0), ze?.clearError(ve)), Fe.trim() === "" && he)
|
|
481
479
|
Z(null), ge(""), l?.(null, pe);
|
|
482
480
|
else {
|
|
483
481
|
const Ee = Ne(Fe), gt = p ? typeof p == "string" ? new Date(p) : p : void 0, ke = g ? typeof g == "string" ? new Date(g) : g : void 0;
|
|
484
|
-
Xi({ date: Ee, minDate: gt, maxDate: ke }) && (Z(Ee),
|
|
482
|
+
Xi({ date: Ee, minDate: gt, maxDate: ke }) && (Z(Ee), $(Ee ? typeof Ee == "string" ? Ee : Ee.toISOString().split("T")[0] : null), ge(Fe), l?.(Fe, pe));
|
|
485
483
|
}
|
|
486
484
|
}
|
|
487
485
|
}, Ke = (pe) => {
|
|
488
|
-
if (
|
|
486
|
+
if (!$e()) {
|
|
489
487
|
if ((ie || re) && (le(void 0), ze?.clearError(ve)), pe.trim() === "" && he)
|
|
490
488
|
Z(null), ge(""), l?.(null, { target: { value: pe } });
|
|
491
489
|
else if (pe && pe.length === 10) {
|
|
492
490
|
const tt = rr[_].parse(pe), Ee = p ? typeof p == "string" ? new Date(p) : p : void 0, gt = g ? typeof g == "string" ? new Date(g) : g : void 0;
|
|
493
|
-
Xi({ date: tt, minDate: Ee, maxDate: gt }) && (Z(tt),
|
|
491
|
+
Xi({ date: tt, minDate: Ee, maxDate: gt }) && (Z(tt), $(tt ? typeof tt == "string" ? tt : tt.toISOString().split("T")[0] : null), se(xe(tt)), ge(pe), l?.(pe, { target: { value: pe } }));
|
|
494
492
|
}
|
|
495
493
|
}
|
|
496
494
|
}, Je = (pe, Fe) => {
|
|
497
|
-
|
|
495
|
+
$e() || Fe.masked.rawInputValue === "" && he && ((ie || re) && (le(void 0), ze?.clearError(ve)), Z(null), $(null), ge(""), se(""), l?.("", { target: { value: "" } }));
|
|
498
496
|
}, ct = (pe) => {
|
|
499
|
-
D?.(pe), E?.(pe), Te(!1),
|
|
497
|
+
D?.(pe), E?.(pe), Te(!1), $e() || y && se(xe(ne));
|
|
500
498
|
}, vt = (pe) => {
|
|
501
|
-
|
|
499
|
+
$e() || (m?.(pe), w?.(pe), Te(!0));
|
|
502
500
|
}, ut = (pe) => {
|
|
503
|
-
|
|
501
|
+
$e() || (B?.(pe), Te(!0));
|
|
504
502
|
}, Le = (pe) => {
|
|
505
503
|
const Fe = new Date(pe);
|
|
506
504
|
return {
|
|
507
505
|
...d?.(pe),
|
|
508
506
|
selected: xt(ne).isSame(Fe, "day"),
|
|
509
507
|
onClick: () => {
|
|
510
|
-
if (
|
|
508
|
+
if (!$e()) {
|
|
511
509
|
(ie || re) && (le(void 0), ze?.clearError(ve));
|
|
512
510
|
const Ee = v ? Fl(ne, Fe) : Fe, gt = he && xt(ne).isSame(Fe, "day") ? null : Ee;
|
|
513
511
|
Z(gt);
|
|
@@ -516,7 +514,7 @@ function ti(e) {
|
|
|
516
514
|
}
|
|
517
515
|
}
|
|
518
516
|
};
|
|
519
|
-
}, Y = W || (a && ne &&
|
|
517
|
+
}, Y = W || (a && ne && !$e() ? /* @__PURE__ */ n(
|
|
520
518
|
Ur,
|
|
521
519
|
{
|
|
522
520
|
variant: "transparent",
|
|
@@ -540,7 +538,7 @@ function ti(e) {
|
|
|
540
538
|
opened: fe,
|
|
541
539
|
trapFocus: !1,
|
|
542
540
|
position: "bottom-start",
|
|
543
|
-
disabled:
|
|
541
|
+
disabled: $e(),
|
|
544
542
|
withinPortal: !0,
|
|
545
543
|
withRoles: !1,
|
|
546
544
|
...u,
|
|
@@ -563,7 +561,7 @@ function ti(e) {
|
|
|
563
561
|
onComplete: Ke,
|
|
564
562
|
onChange: qe,
|
|
565
563
|
onAccept: Je,
|
|
566
|
-
readOnly:
|
|
564
|
+
readOnly: $e(),
|
|
567
565
|
value: ce,
|
|
568
566
|
style: {
|
|
569
567
|
width: L,
|
|
@@ -584,12 +582,12 @@ function ti(e) {
|
|
|
584
582
|
}
|
|
585
583
|
) }) }),
|
|
586
584
|
/* @__PURE__ */ n(Ct.Dropdown, { onMouseDown: (pe) => pe.preventDefault(), "data-dates-dropdown": !0, children: /* @__PURE__ */ n(
|
|
587
|
-
|
|
585
|
+
Ra,
|
|
588
586
|
{
|
|
589
587
|
__staticSelector: "ArchbaseDatePickerEdit",
|
|
590
588
|
...ee,
|
|
591
589
|
classNames: A,
|
|
592
|
-
styles:
|
|
590
|
+
styles: R,
|
|
593
591
|
unstyled: z,
|
|
594
592
|
__preventFocus: !0,
|
|
595
593
|
minDate: p,
|
|
@@ -598,13 +596,13 @@ function ti(e) {
|
|
|
598
596
|
getDayProps: Le,
|
|
599
597
|
size: t.size,
|
|
600
598
|
date: be || void 0,
|
|
601
|
-
onDateChange:
|
|
599
|
+
onDateChange: $
|
|
602
600
|
}
|
|
603
601
|
) })
|
|
604
602
|
]
|
|
605
603
|
}
|
|
606
604
|
),
|
|
607
|
-
/* @__PURE__ */ n(
|
|
605
|
+
/* @__PURE__ */ n($a, { name: X || "", form: H || "", value: ne, type: "default" })
|
|
608
606
|
] }) });
|
|
609
607
|
}
|
|
610
608
|
ti.displayName = "ArchbaseDatePickerEdit";
|
|
@@ -631,7 +629,7 @@ const Ol = ({ image: e, label: t, description: r, values: i, value: o, ...s }) =
|
|
|
631
629
|
] }),
|
|
632
630
|
i.includes(o) ? /* @__PURE__ */ n(qs, { size: 12 }) : null
|
|
633
631
|
] }) }), _l = ({ item: e, value: t, onRemove: r, label: i }) => /* @__PURE__ */ n(
|
|
634
|
-
|
|
632
|
+
$o,
|
|
635
633
|
{
|
|
636
634
|
withRemoveButton: !0,
|
|
637
635
|
onRemove: () => r(),
|
|
@@ -667,7 +665,7 @@ function gf({
|
|
|
667
665
|
value: W,
|
|
668
666
|
defaultValue: z,
|
|
669
667
|
filter: A,
|
|
670
|
-
size:
|
|
668
|
+
size: R,
|
|
671
669
|
style: U,
|
|
672
670
|
width: v,
|
|
673
671
|
initiallyOpened: P,
|
|
@@ -695,7 +693,7 @@ function gf({
|
|
|
695
693
|
onDropdownClose: () => ve.resetSelectedOption()
|
|
696
694
|
}), [re, te] = k(
|
|
697
695
|
Ki(u.options, w, E, D)
|
|
698
|
-
), [ne, Z] = k([]), [Q, ie] = k(0), [le, Ce] = k(""), [be] = si(le, s), [
|
|
696
|
+
), [ne, Z] = k([]), [Q, ie] = k(0), [le, Ce] = k(""), [be] = si(le, s), [$, xe] = k(!1), [ce, se] = k(u.page), [Re, $e] = k(u.totalPages), [Ne, he] = k(ce === Re - 1), [Ue, Pe] = k(u.options), [Ye, ge] = k(p), N = async () => {
|
|
699
697
|
let ke = W;
|
|
700
698
|
r && i && (ke = r.getFieldValue(i), ke || (ke = [])), ee && J && ke && (ke = await ee(ke)), Z(ke ?? []), Ce(w(ke) || "");
|
|
701
699
|
}, ae = T(() => {
|
|
@@ -719,7 +717,7 @@ function gf({
|
|
|
719
717
|
}, [r, i, qe, ae]), G(() => {
|
|
720
718
|
j && j(be), be && be.length >= l && (xe(!0), De(0, !1));
|
|
721
719
|
}, [be]), G(() => {
|
|
722
|
-
}, [ce,
|
|
720
|
+
}, [ce, Re]), lt(() => {
|
|
723
721
|
N();
|
|
724
722
|
}, []), G(() => {
|
|
725
723
|
p !== void 0 && p !== Ye && ge(p);
|
|
@@ -743,7 +741,7 @@ function gf({
|
|
|
743
741
|
}, ut = (ke) => {
|
|
744
742
|
V && V(ke);
|
|
745
743
|
}, Le = () => {
|
|
746
|
-
be && be.length >= l && ce <
|
|
744
|
+
be && be.length >= l && ce < Re - 1 && (xe(!0), De(ce + 1, !0));
|
|
747
745
|
}, Y = (ke) => {
|
|
748
746
|
ne || Ce(ke), ke && ke.length >= l && ve.openDropdown();
|
|
749
747
|
}, De = async (ke, st = !1) => {
|
|
@@ -751,7 +749,7 @@ function gf({
|
|
|
751
749
|
(ft) => {
|
|
752
750
|
xe(!1), (ft === void 0 || ft == null) && C && C("Response incorreto.");
|
|
753
751
|
const jt = st ? Ue.concat(ft.options) : ft.options;
|
|
754
|
-
Pe(jt), te(Ki(jt, w, E, D)), se(ft.page),
|
|
752
|
+
Pe(jt), te(Ki(jt, w, E, D)), se(ft.page), $e(ft.totalPages), he(ft.page === ft.totalPages - 1), ie((Yt) => Yt + 1);
|
|
755
753
|
},
|
|
756
754
|
(ft) => {
|
|
757
755
|
xe(!1), C && C(ft);
|
|
@@ -783,7 +781,7 @@ function gf({
|
|
|
783
781
|
ct(ke);
|
|
784
782
|
},
|
|
785
783
|
children: [
|
|
786
|
-
/* @__PURE__ */ n(
|
|
784
|
+
/* @__PURE__ */ n(Ro, { children: /* @__PURE__ */ n(
|
|
787
785
|
Li,
|
|
788
786
|
{
|
|
789
787
|
disabled: o,
|
|
@@ -797,8 +795,8 @@ function gf({
|
|
|
797
795
|
style: U,
|
|
798
796
|
onClick: () => ve.openDropdown(),
|
|
799
797
|
rightSection: /* @__PURE__ */ b(ot, { children: [
|
|
800
|
-
|
|
801
|
-
|
|
798
|
+
$ && /* @__PURE__ */ n(on, { size: "xs" }),
|
|
799
|
+
!$ && ne !== null && t && !o && !pe() ? /* @__PURE__ */ n(
|
|
802
800
|
Ur,
|
|
803
801
|
{
|
|
804
802
|
size: "sm",
|
|
@@ -811,7 +809,7 @@ function gf({
|
|
|
811
809
|
) : /* @__PURE__ */ n(or.Chevron, {})
|
|
812
810
|
] }),
|
|
813
811
|
rightSectionPointerEvents: ne === null ? "none" : "all",
|
|
814
|
-
children: /* @__PURE__ */ b(
|
|
812
|
+
children: /* @__PURE__ */ b($o.Group, { children: [
|
|
815
813
|
Ee,
|
|
816
814
|
/* @__PURE__ */ n(
|
|
817
815
|
Li.Field,
|
|
@@ -850,7 +848,7 @@ const is = ai(
|
|
|
850
848
|
i && i.current && i.current.scrollTop === i.current.scrollHeight - i.current.offsetHeight && o.handleDropdownScrollEnded();
|
|
851
849
|
};
|
|
852
850
|
return /* @__PURE__ */ n(
|
|
853
|
-
|
|
851
|
+
Rt.Autosize,
|
|
854
852
|
{
|
|
855
853
|
...t,
|
|
856
854
|
style: { width: "100%", ...e },
|
|
@@ -905,7 +903,7 @@ function yf({
|
|
|
905
903
|
value: W,
|
|
906
904
|
defaultValue: z,
|
|
907
905
|
filter: A,
|
|
908
|
-
size:
|
|
906
|
+
size: R,
|
|
909
907
|
style: U,
|
|
910
908
|
width: v,
|
|
911
909
|
initiallyOpened: P,
|
|
@@ -933,7 +931,7 @@ function yf({
|
|
|
933
931
|
onDropdownClose: () => ve.resetSelectedOption()
|
|
934
932
|
}), [re, te] = k(
|
|
935
933
|
Ji(u.options, w, E, D)
|
|
936
|
-
), [ne, Z] = k(), [Q, ie] = k(0), [le, Ce] = k(""), [be] = si(le, s), [
|
|
934
|
+
), [ne, Z] = k(), [Q, ie] = k(0), [le, Ce] = k(""), [be] = si(le, s), [$, xe] = k(!1), [ce, se] = k(u.page), [Re, $e] = k(u.totalPages), [Ne, he] = k(ce === Re - 1), [Ue, Pe] = k(u.options);
|
|
937
935
|
C || ue(null);
|
|
938
936
|
const [Ye, ge] = k(p), N = async () => {
|
|
939
937
|
let Ee = W;
|
|
@@ -959,7 +957,7 @@ function yf({
|
|
|
959
957
|
}, [r, i, qe, ae]), G(() => {
|
|
960
958
|
j && j(be), be && be.length >= l && be !== w(ne) && (xe(!0), Y(0, !1));
|
|
961
959
|
}, [be]), G(() => {
|
|
962
|
-
}, [ce,
|
|
960
|
+
}, [ce, Re]), lt(() => {
|
|
963
961
|
N();
|
|
964
962
|
}, []), G(() => {
|
|
965
963
|
p !== void 0 && p !== Ye && ge(p);
|
|
@@ -975,7 +973,7 @@ function yf({
|
|
|
975
973
|
}, vt = (Ee) => {
|
|
976
974
|
V && V(Ee);
|
|
977
975
|
}, ut = () => {
|
|
978
|
-
be && be.length >= l && ce <
|
|
976
|
+
be && be.length >= l && ce < Re - 1 && (xe(!0), Y(ce + 1, !0));
|
|
979
977
|
}, Le = (Ee) => {
|
|
980
978
|
ne || Ce(Ee), Ee && w(ne) !== Ee && Ee.length >= l && ve.openDropdown();
|
|
981
979
|
}, Y = async (Ee, gt = !1) => {
|
|
@@ -983,7 +981,7 @@ function yf({
|
|
|
983
981
|
(st) => {
|
|
984
982
|
xe(!1), (st === void 0 || st == null) && L && L("Response incorreto.");
|
|
985
983
|
const ht = gt ? Ue.concat(st.options) : st.options;
|
|
986
|
-
Pe(ht), te(Ji(ht, w, E, D)), se(st.page),
|
|
984
|
+
Pe(ht), te(Ji(ht, w, E, D)), se(st.page), $e(st.totalPages), he(st.page === st.totalPages - 1), ie((ft) => ft + 1);
|
|
987
985
|
},
|
|
988
986
|
(st) => {
|
|
989
987
|
xe(!1), L && L(st);
|
|
@@ -1008,7 +1006,7 @@ function yf({
|
|
|
1008
1006
|
Je(ke), Ce(gt?.label || ""), ve.closeDropdown();
|
|
1009
1007
|
},
|
|
1010
1008
|
children: [
|
|
1011
|
-
/* @__PURE__ */ n(
|
|
1009
|
+
/* @__PURE__ */ n(Ro, { children: /* @__PURE__ */ n(
|
|
1012
1010
|
Ys,
|
|
1013
1011
|
{
|
|
1014
1012
|
disabled: o,
|
|
@@ -1029,7 +1027,7 @@ function yf({
|
|
|
1029
1027
|
ct(Ee), Le(w(ne) || "");
|
|
1030
1028
|
},
|
|
1031
1029
|
onFocus: (Ee) => vt(Ee),
|
|
1032
|
-
rightSection:
|
|
1030
|
+
rightSection: $ ? /* @__PURE__ */ n(on, { size: "xs" }) : ne !== null && t && !o && !De() ? /* @__PURE__ */ n(
|
|
1033
1031
|
Ur,
|
|
1034
1032
|
{
|
|
1035
1033
|
size: "sm",
|
|
@@ -1063,7 +1061,7 @@ const os = ai(
|
|
|
1063
1061
|
i && i.current && i.current.scrollTop === i.current.scrollHeight - i.current.offsetHeight && o.handleDropdownScrollEnded();
|
|
1064
1062
|
};
|
|
1065
1063
|
return /* @__PURE__ */ n(
|
|
1066
|
-
|
|
1064
|
+
Rt.Autosize,
|
|
1067
1065
|
{
|
|
1068
1066
|
...t,
|
|
1069
1067
|
style: { width: "100%", ...e },
|
|
@@ -1106,7 +1104,7 @@ function bf({
|
|
|
1106
1104
|
a
|
|
1107
1105
|
), D = it(), B = `${t}`, V = D?.getError(B);
|
|
1108
1106
|
process.env.NODE_ENV;
|
|
1109
|
-
const [X, H] = k(!!c), W = w || ue(null), [z, A] = k(p),
|
|
1107
|
+
const [X, H] = k(!!c), W = w || ue(null), [z, A] = k(p), R = nt();
|
|
1110
1108
|
G(() => {
|
|
1111
1109
|
p !== void 0 && p !== z && A(p);
|
|
1112
1110
|
}, [p]);
|
|
@@ -1120,7 +1118,7 @@ function bf({
|
|
|
1120
1118
|
}, v = T(() => {
|
|
1121
1119
|
U();
|
|
1122
1120
|
}, []), P = T((F) => {
|
|
1123
|
-
e && t && ((F.type === q.dataChanged || F.type === q.recordChanged || F.type === q.afterScroll || F.type === q.afterCancel || F.type === q.afterEdit) && (U(), E.isDataSourceV2 ||
|
|
1121
|
+
e && t && ((F.type === q.dataChanged || F.type === q.recordChanged || F.type === q.afterScroll || F.type === q.afterCancel || F.type === q.afterEdit) && (U(), E.isDataSourceV2 || R()), F.type === q.onFieldError && F.fieldName === t && (A(F.error), D?.setError(B, F.error)));
|
|
1124
1122
|
}, [E.isDataSourceV2, D, B]), M = ue(P);
|
|
1125
1123
|
G(() => {
|
|
1126
1124
|
M.current = P;
|
|
@@ -1148,7 +1146,7 @@ function bf({
|
|
|
1148
1146
|
y && y(F);
|
|
1149
1147
|
};
|
|
1150
1148
|
return /* @__PURE__ */ n(
|
|
1151
|
-
|
|
1149
|
+
Wn,
|
|
1152
1150
|
{
|
|
1153
1151
|
disabled: r,
|
|
1154
1152
|
readOnly: i || E.isReadOnly,
|
|
@@ -1203,9 +1201,9 @@ function wf({
|
|
|
1203
1201
|
process.env.NODE_ENV;
|
|
1204
1202
|
const [X, H] = k(
|
|
1205
1203
|
jl(u, d, i, o)
|
|
1206
|
-
), [W, z] = k(p ? [] : a), [A,
|
|
1204
|
+
), [W, z] = k(p ? [] : a), [A, R] = k(g), U = nt();
|
|
1207
1205
|
G(() => {
|
|
1208
|
-
g !== void 0 && g !== A &&
|
|
1206
|
+
g !== void 0 && g !== A && R(g);
|
|
1209
1207
|
}, [g]);
|
|
1210
1208
|
const v = () => {
|
|
1211
1209
|
let S = p ? [] : a;
|
|
@@ -1223,7 +1221,7 @@ function wf({
|
|
|
1223
1221
|
}, P = T(() => {
|
|
1224
1222
|
v();
|
|
1225
1223
|
}, []), M = T((S) => {
|
|
1226
|
-
e && t && ((S.type === q.dataChanged || S.type === q.recordChanged || S.type === q.afterScroll || S.type === q.afterCancel || S.type === q.afterEdit) && (v(), E.isDataSourceV2 || U()), S.type === q.onFieldError && S.fieldName === t && (
|
|
1224
|
+
e && t && ((S.type === q.dataChanged || S.type === q.recordChanged || S.type === q.afterScroll || S.type === q.afterCancel || S.type === q.afterEdit) && (v(), E.isDataSourceV2 || U()), S.type === q.onFieldError && S.fieldName === t && (R(S.error), D?.setError(B, S.error)));
|
|
1227
1225
|
}, [E.isDataSourceV2, D, B]), O = ue(M);
|
|
1228
1226
|
G(() => {
|
|
1229
1227
|
O.current = M;
|
|
@@ -1242,20 +1240,20 @@ function wf({
|
|
|
1242
1240
|
v();
|
|
1243
1241
|
}, []);
|
|
1244
1242
|
const x = (S) => {
|
|
1245
|
-
(A || V) && (
|
|
1243
|
+
(A || V) && (R(void 0), D?.clearError(B));
|
|
1246
1244
|
const L = p ? Array.isArray(S) ? S : S ? [S] : [] : S;
|
|
1247
1245
|
z((j) => L);
|
|
1248
1246
|
let C = L;
|
|
1249
1247
|
l && (C = l(L)), e && !e.isBrowsing() && t && e.getFieldValue(t) !== C && E.handleValueChange(C), r && r(C);
|
|
1250
1248
|
}, _ = A || V;
|
|
1251
1249
|
return /* @__PURE__ */ n(rt.Wrapper, { label: m, error: _, description: w, children: /* @__PURE__ */ n(
|
|
1252
|
-
|
|
1250
|
+
Wn.Group,
|
|
1253
1251
|
{
|
|
1254
1252
|
defaultValue: void 0,
|
|
1255
1253
|
value: W,
|
|
1256
1254
|
onChange: x,
|
|
1257
1255
|
multiple: p,
|
|
1258
|
-
children: /* @__PURE__ */ n(dt, { gap: "sm", wrap: "wrap", justify: "flex-start", align: "center", children: X.map((S) => /* @__PURE__ */ n(
|
|
1256
|
+
children: /* @__PURE__ */ n(dt, { gap: "sm", wrap: "wrap", justify: "flex-start", align: "center", children: X.map((S) => /* @__PURE__ */ n(Wn, { style: y, value: S.value, variant: h, type: f, children: S.label }, S.key)) })
|
|
1259
1257
|
}
|
|
1260
1258
|
) });
|
|
1261
1259
|
}
|
|
@@ -1378,12 +1376,12 @@ function Wl({
|
|
|
1378
1376
|
W();
|
|
1379
1377
|
}, []), A = T((x) => {
|
|
1380
1378
|
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)));
|
|
1381
|
-
}, [B.isDataSourceV2, V, X]),
|
|
1379
|
+
}, [B.isDataSourceV2, V, X]), R = ue(A);
|
|
1382
1380
|
G(() => {
|
|
1383
|
-
|
|
1381
|
+
R.current = A;
|
|
1384
1382
|
}, [A]);
|
|
1385
1383
|
const U = T((x) => {
|
|
1386
|
-
|
|
1384
|
+
R.current(x);
|
|
1387
1385
|
}, []);
|
|
1388
1386
|
G(() => {
|
|
1389
1387
|
if (W(), e && t) {
|
|
@@ -1452,22 +1450,22 @@ function Ul({
|
|
|
1452
1450
|
clearButtonProps: B,
|
|
1453
1451
|
required: V = !1
|
|
1454
1452
|
}) {
|
|
1455
|
-
const [X, H] = k(y?.[0] || null), [W, z] = k(y?.[1] || null), [A,
|
|
1453
|
+
const [X, H] = k(y?.[0] || null), [W, z] = k(y?.[1] || null), [A, R] = k(g), U = it(), v = t && r ? `${t}-${r}` : i || "datetime-picker-range", P = U?.getError(v);
|
|
1456
1454
|
G(() => {
|
|
1457
|
-
g !== void 0 && g !== A &&
|
|
1455
|
+
g !== void 0 && g !== A && R(g);
|
|
1458
1456
|
}, [g]), G(() => {
|
|
1459
1457
|
y && (H(y[0]), z(y[1]));
|
|
1460
1458
|
}, [y]);
|
|
1461
1459
|
const M = (_) => {
|
|
1462
|
-
(A || P) && (
|
|
1460
|
+
(A || P) && (R(void 0), U?.clearError(v)), H(_), d && d([_, W]);
|
|
1463
1461
|
}, O = (_) => {
|
|
1464
|
-
(A || P) && (
|
|
1462
|
+
(A || P) && (R(void 0), U?.clearError(v)), z(_), d && d([X, _]);
|
|
1465
1463
|
}, I = (_, S) => {
|
|
1466
1464
|
if (_ && S && _ > S) {
|
|
1467
1465
|
const F = "Data inicial não pode ser maior que a data final";
|
|
1468
|
-
return
|
|
1466
|
+
return R(F), U?.setError(v, F), !1;
|
|
1469
1467
|
}
|
|
1470
|
-
return
|
|
1468
|
+
return R(void 0), U?.clearError(v), !0;
|
|
1471
1469
|
}, x = A || P;
|
|
1472
1470
|
return /* @__PURE__ */ n(
|
|
1473
1471
|
rt.Wrapper,
|
|
@@ -1860,7 +1858,7 @@ class Yl {
|
|
|
1860
1858
|
}
|
|
1861
1859
|
}
|
|
1862
1860
|
}
|
|
1863
|
-
class
|
|
1861
|
+
class Vn {
|
|
1864
1862
|
/**
|
|
1865
1863
|
* Creates a new Box instance.
|
|
1866
1864
|
* @constructor
|
|
@@ -2042,9 +2040,9 @@ class Mn {
|
|
|
2042
2040
|
}
|
|
2043
2041
|
}
|
|
2044
2042
|
function Ql(e) {
|
|
2045
|
-
e.addEventListener("touchstart",
|
|
2043
|
+
e.addEventListener("touchstart", Mn), e.addEventListener("touchend", Mn), e.addEventListener("touchmove", Mn);
|
|
2046
2044
|
}
|
|
2047
|
-
function
|
|
2045
|
+
function Mn(e) {
|
|
2048
2046
|
e.preventDefault();
|
|
2049
2047
|
const t = e.changedTouches[0], r = {
|
|
2050
2048
|
touchstart: "mousedown",
|
|
@@ -2146,7 +2144,7 @@ class mi {
|
|
|
2146
2144
|
*/
|
|
2147
2145
|
initializeBox(t) {
|
|
2148
2146
|
const r = t.startSize.width, i = t.startSize.height;
|
|
2149
|
-
let o = new
|
|
2147
|
+
let o = new Vn(0, 0, r, i);
|
|
2150
2148
|
o.constrainToRatio(t.aspectRatio, [0.5, 0.5]);
|
|
2151
2149
|
const s = t.minSize, l = t.maxSize;
|
|
2152
2150
|
o.constrainToSize(
|
|
@@ -2227,7 +2225,7 @@ class mi {
|
|
|
2227
2225
|
function o(a) {
|
|
2228
2226
|
a.stopPropagation(), document.addEventListener("mouseup", l), document.addEventListener("mousemove", s);
|
|
2229
2227
|
const c = r.cropperEl.getBoundingClientRect(), u = a.clientX - c.left, d = a.clientY - c.top;
|
|
2230
|
-
i = r.box, r.box = new
|
|
2228
|
+
i = r.box, r.box = new Vn(u, d, u + 1, d + 1), r.eventBus.dispatchEvent(
|
|
2231
2229
|
new CustomEvent("handlestart", {
|
|
2232
2230
|
detail: { handle: r.handles[4] }
|
|
2233
2231
|
})
|
|
@@ -2282,13 +2280,13 @@ class mi {
|
|
|
2282
2280
|
const z = m;
|
|
2283
2281
|
m = w, w = z, s[1] = 1 - s[1];
|
|
2284
2282
|
}
|
|
2285
|
-
let B = new
|
|
2283
|
+
let B = new Vn(g, m, y, w);
|
|
2286
2284
|
if (this.options.aspectRatio) {
|
|
2287
2285
|
const z = this.options.aspectRatio;
|
|
2288
2286
|
let A = !1;
|
|
2289
2287
|
p ? A = i > B.y1 + z * B.width() || i < B.y2 - z * B.width() : (u || h) && (A = !0);
|
|
2290
|
-
const
|
|
2291
|
-
B.constrainToRatio(z, s,
|
|
2288
|
+
const R = A ? "width" : "height";
|
|
2289
|
+
B.constrainToRatio(z, s, R);
|
|
2292
2290
|
}
|
|
2293
2291
|
const V = this.options.minSize, X = this.options.maxSize;
|
|
2294
2292
|
B.constrainToSize(
|
|
@@ -2741,7 +2739,7 @@ const Kl = xr(({ src: e, size: t, croppUpdate: r }) => {
|
|
|
2741
2739
|
console.log("🚀 ~ file: EditImage.tsx ~ line 259 ~ onChangeFilters ~ e", P);
|
|
2742
2740
|
}
|
|
2743
2741
|
}
|
|
2744
|
-
const
|
|
2742
|
+
const R = Ge(() => l && l.length ? Math.ceil(3 / 4 * l.length / 1024) : "", [l]);
|
|
2745
2743
|
function U(v) {
|
|
2746
2744
|
return JSON.parse(JSON.stringify(v));
|
|
2747
2745
|
}
|
|
@@ -2966,15 +2964,15 @@ const Kl = xr(({ src: e, size: t, croppUpdate: r }) => {
|
|
|
2966
2964
|
children: `${m("archbase:Apply")}`
|
|
2967
2965
|
}
|
|
2968
2966
|
),
|
|
2969
|
-
|
|
2967
|
+
R && /* @__PURE__ */ n(
|
|
2970
2968
|
"p",
|
|
2971
2969
|
{
|
|
2972
2970
|
className: "caption image-caption",
|
|
2973
2971
|
style: {
|
|
2974
|
-
color:
|
|
2975
|
-
fontWeight:
|
|
2972
|
+
color: R > 120 ? "#f44336" : "unset",
|
|
2973
|
+
fontWeight: R > 120 ? "500" : "unset"
|
|
2976
2974
|
},
|
|
2977
|
-
children: /* @__PURE__ */ n(K, { children: `${m("archbase:size")}: ${
|
|
2975
|
+
children: /* @__PURE__ */ n(K, { children: `${m("archbase:size")}: ${R}Kb ${o.format}` })
|
|
2978
2976
|
}
|
|
2979
2977
|
)
|
|
2980
2978
|
]
|
|
@@ -3055,11 +3053,11 @@ const Kl = xr(({ src: e, size: t, croppUpdate: r }) => {
|
|
|
3055
3053
|
return;
|
|
3056
3054
|
if (B.current = `data:${_.type};base64,`, _) {
|
|
3057
3055
|
const S = new FileReader();
|
|
3058
|
-
S.onload =
|
|
3056
|
+
S.onload = R.bind(this), S.readAsBinaryString(_);
|
|
3059
3057
|
}
|
|
3060
3058
|
}
|
|
3061
3059
|
}
|
|
3062
|
-
async function
|
|
3060
|
+
async function R(I) {
|
|
3063
3061
|
const x = I.target.result, _ = btoa(x);
|
|
3064
3062
|
let S = { ...c };
|
|
3065
3063
|
const F = B.current + _;
|
|
@@ -3148,7 +3146,7 @@ const Kl = xr(({ src: e, size: t, croppUpdate: r }) => {
|
|
|
3148
3146
|
border: `${Ut(1)} solid ${l === "dark" ? s.colors.dark[4] : s.colors.gray[3]}`
|
|
3149
3147
|
},
|
|
3150
3148
|
children: [
|
|
3151
|
-
/* @__PURE__ */ n(je, { withinPortal: !0, withArrow: !0, label: `${a("archbase:Upload a image")}`, children: /* @__PURE__ */ n(Ae, { component: "button", color: "blue", variant: o, className: "icon-btn image-upload-btn", onClick: z, children: /* @__PURE__ */ n(
|
|
3149
|
+
/* @__PURE__ */ n(je, { withinPortal: !0, withArrow: !0, label: `${a("archbase:Upload a image")}`, children: /* @__PURE__ */ n(Ae, { component: "button", color: "blue", variant: o, className: "icon-btn image-upload-btn", onClick: z, children: /* @__PURE__ */ n(Pn, { color: "purple" }) }) }),
|
|
3152
3150
|
/* @__PURE__ */ n(
|
|
3153
3151
|
"input",
|
|
3154
3152
|
{
|
|
@@ -3190,7 +3188,7 @@ const Kl = xr(({ src: e, size: t, croppUpdate: r }) => {
|
|
|
3190
3188
|
}
|
|
3191
3189
|
),
|
|
3192
3190
|
!m.hideEditBtn && /* @__PURE__ */ b(ma, { children: [
|
|
3193
|
-
/* @__PURE__ */ n("div", { className: "curtain", onClick: z, children: /* @__PURE__ */ n(je, { withinPortal: !0, withArrow: !0, label: `${a("archbase:Upload a image")}`, children: /* @__PURE__ */ n(Ae, { component: "button", color: "blue", variant: o, children: /* @__PURE__ */ n(
|
|
3191
|
+
/* @__PURE__ */ n("div", { className: "curtain", onClick: z, children: /* @__PURE__ */ n(je, { withinPortal: !0, withArrow: !0, label: `${a("archbase:Upload a image")}`, children: /* @__PURE__ */ n(Ae, { component: "button", color: "blue", variant: o, children: /* @__PURE__ */ n(Pn, { color: "white" }) }) }) }),
|
|
3194
3192
|
/* @__PURE__ */ n(
|
|
3195
3193
|
"input",
|
|
3196
3194
|
{
|
|
@@ -3228,7 +3226,7 @@ const Kl = xr(({ src: e, size: t, croppUpdate: r }) => {
|
|
|
3228
3226
|
},
|
|
3229
3227
|
className: "editing-bar-btn",
|
|
3230
3228
|
children: [
|
|
3231
|
-
!m.hideAddBtn && /* @__PURE__ */ n(je, { withinPortal: !0, withArrow: !0, label: `${a("archbase:Upload a image")}`, children: /* @__PURE__ */ n(Ae, { id: "upload-img", color: "blue", variant: o, onClick: z, children: /* @__PURE__ */ n(
|
|
3229
|
+
!m.hideAddBtn && /* @__PURE__ */ n(je, { withinPortal: !0, withArrow: !0, label: `${a("archbase:Upload a image")}`, children: /* @__PURE__ */ n(Ae, { id: "upload-img", color: "blue", variant: o, onClick: z, children: /* @__PURE__ */ n(Pn, { color: "purple" }) }) }),
|
|
3232
3230
|
!m.hideEditBtn && /* @__PURE__ */ n(je, { withinPortal: !0, withArrow: !0, label: `${a("archbase:Open the editor panel")}`, children: /* @__PURE__ */ n(Ae, { id: "edit-img", color: "blue", variant: o, onClick: P, children: /* @__PURE__ */ n(Va, { color: "teal" }) }) }),
|
|
3233
3231
|
!m.hideDownloadBtn && /* @__PURE__ */ n(je, { withinPortal: !0, withArrow: !0, label: `${a("archbase:Download the image")}`, children: /* @__PURE__ */ n(
|
|
3234
3232
|
Ae,
|
|
@@ -3610,7 +3608,7 @@ function Sf({
|
|
|
3610
3608
|
void 0
|
|
3611
3609
|
), X = it(), H = `${i}`, W = X?.getError(H);
|
|
3612
3610
|
process.env.NODE_ENV;
|
|
3613
|
-
const [z, A] = k(void 0),
|
|
3611
|
+
const [z, A] = k(void 0), R = ue(null), [U, v] = k(u), P = nt();
|
|
3614
3612
|
G(() => {
|
|
3615
3613
|
u !== void 0 && u !== U && v(u);
|
|
3616
3614
|
}, [u]);
|
|
@@ -3654,7 +3652,7 @@ function Sf({
|
|
|
3654
3652
|
label: a,
|
|
3655
3653
|
description: c,
|
|
3656
3654
|
error: L,
|
|
3657
|
-
ref: w ||
|
|
3655
|
+
ref: w || R,
|
|
3658
3656
|
children: /* @__PURE__ */ n(
|
|
3659
3657
|
rc,
|
|
3660
3658
|
{
|
|
@@ -3710,9 +3708,9 @@ function Af({
|
|
|
3710
3708
|
""
|
|
3711
3709
|
);
|
|
3712
3710
|
process.env.NODE_ENV;
|
|
3713
|
-
const B = it(), V = `${t}`, X = B?.getError(V), [H, W] = k(""), z = E || ue(null), [A,
|
|
3711
|
+
const B = it(), V = `${t}`, X = B?.getError(V), [H, W] = k(""), z = E || ue(null), [A, R] = k(c), U = nt();
|
|
3714
3712
|
G(() => {
|
|
3715
|
-
c !== void 0 && c !== A &&
|
|
3713
|
+
c !== void 0 && c !== A && R(c);
|
|
3716
3714
|
}, [c]);
|
|
3717
3715
|
const v = () => {
|
|
3718
3716
|
let C = H;
|
|
@@ -3720,7 +3718,7 @@ function Af({
|
|
|
3720
3718
|
}, P = T(() => {
|
|
3721
3719
|
v();
|
|
3722
3720
|
}, []), M = T((C) => {
|
|
3723
|
-
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 || U()), C.type === q.onFieldError && C.fieldName === t && (
|
|
3721
|
+
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 || U()), C.type === q.onFieldError && C.fieldName === t && (R(C.error), B?.setError(V, C.error)));
|
|
3724
3722
|
}, [D.isDataSourceV2, B, V]), O = ue(M);
|
|
3725
3723
|
G(() => {
|
|
3726
3724
|
O.current = M;
|
|
@@ -3739,7 +3737,7 @@ function Af({
|
|
|
3739
3737
|
v();
|
|
3740
3738
|
}, []);
|
|
3741
3739
|
const x = (C) => {
|
|
3742
|
-
if ((A || X) && (
|
|
3740
|
+
if ((A || X) && (R(void 0), B?.clearError(V)), W((J) => C), e && !e.isBrowsing() && t && e.getFieldValue(t) !== C) {
|
|
3743
3741
|
const J = w ? C : btoa(C);
|
|
3744
3742
|
D.handleValueChange(J);
|
|
3745
3743
|
}
|
|
@@ -3811,7 +3809,7 @@ function Df({
|
|
|
3811
3809
|
null
|
|
3812
3810
|
);
|
|
3813
3811
|
process.env.NODE_ENV;
|
|
3814
|
-
const
|
|
3812
|
+
const R = it(), U = `${t}`, v = R?.getError(U), P = Mt(), { colorScheme: M } = Lt(), [O, I] = k(""), x = W || ue(null), [_, S] = k(d);
|
|
3815
3813
|
G(() => {
|
|
3816
3814
|
d !== void 0 && d !== _ && S(d);
|
|
3817
3815
|
}, [d]);
|
|
@@ -3821,8 +3819,8 @@ function Df({
|
|
|
3821
3819
|
}, L = T(() => {
|
|
3822
3820
|
F();
|
|
3823
3821
|
}, []), C = T((re) => {
|
|
3824
|
-
e && t && ((re.type === q.dataChanged || re.type === q.recordChanged || re.type === q.afterScroll || re.type === q.afterCancel) && (F(), A.isDataSourceV2 || z()), re.type === q.onFieldError && re.fieldName === t && (S(re.error),
|
|
3825
|
-
}, [A.isDataSourceV2,
|
|
3822
|
+
e && t && ((re.type === q.dataChanged || re.type === q.recordChanged || re.type === q.afterScroll || re.type === q.afterCancel) && (F(), A.isDataSourceV2 || z()), re.type === q.onFieldError && re.fieldName === t && (S(re.error), R?.setError(U, re.error)));
|
|
3823
|
+
}, [A.isDataSourceV2, R, U]), j = ue(C);
|
|
3826
3824
|
G(() => {
|
|
3827
3825
|
j.current = C;
|
|
3828
3826
|
}, [C]);
|
|
@@ -3840,7 +3838,7 @@ function Df({
|
|
|
3840
3838
|
F();
|
|
3841
3839
|
}, []);
|
|
3842
3840
|
const ee = (re) => {
|
|
3843
|
-
(_ || v) && (S(void 0),
|
|
3841
|
+
(_ || v) && (S(void 0), R?.clearError(U)), re.preventDefault();
|
|
3844
3842
|
const ne = re.target.value;
|
|
3845
3843
|
re.persist(), I((Z) => ne), X && X(re, ne);
|
|
3846
3844
|
}, Se = () => {
|
|
@@ -3849,7 +3847,7 @@ function Df({
|
|
|
3849
3847
|
}).catch((te) => {
|
|
3850
3848
|
if (A.handleValueChange(void 0), x.current?.focus(), w) {
|
|
3851
3849
|
const ne = ar(w, O);
|
|
3852
|
-
S(ne),
|
|
3850
|
+
S(ne), R?.setError(U, ne);
|
|
3853
3851
|
}
|
|
3854
3852
|
y && y(te);
|
|
3855
3853
|
})) : O && O != null && g(O).then((te) => {
|
|
@@ -3859,7 +3857,7 @@ function Df({
|
|
|
3859
3857
|
}).catch((te) => {
|
|
3860
3858
|
if (I(void 0), w) {
|
|
3861
3859
|
const ne = ar(w, O);
|
|
3862
|
-
S(ne),
|
|
3860
|
+
S(ne), R?.setError(U, ne);
|
|
3863
3861
|
}
|
|
3864
3862
|
x.current?.focus(), y && y(te);
|
|
3865
3863
|
});
|
|
@@ -3963,7 +3961,7 @@ function gi({
|
|
|
3963
3961
|
width: W,
|
|
3964
3962
|
size: z,
|
|
3965
3963
|
error: A,
|
|
3966
|
-
innerRef:
|
|
3964
|
+
innerRef: R,
|
|
3967
3965
|
onClear: U,
|
|
3968
3966
|
minValue: v = Number.MIN_SAFE_INTEGER,
|
|
3969
3967
|
maxValue: P = Number.MAX_SAFE_INTEGER,
|
|
@@ -3978,17 +3976,17 @@ function gi({
|
|
|
3978
3976
|
process.env.NODE_ENV;
|
|
3979
3977
|
const [I, x] = k(""), [_, S] = k(0);
|
|
3980
3978
|
sc(I);
|
|
3981
|
-
const F =
|
|
3979
|
+
const F = R || ue(null), [L, C] = k(A), j = nt(), J = it(), ee = `${t}`, Se = J?.getError(ee);
|
|
3982
3980
|
G(() => {
|
|
3983
3981
|
A !== void 0 && A !== L && C(A);
|
|
3984
3982
|
}, [A]);
|
|
3985
3983
|
const de = T(() => {
|
|
3986
|
-
let
|
|
3987
|
-
return e && t && (
|
|
3984
|
+
let $ = u;
|
|
3985
|
+
return e && t && ($ = e.getFieldValue(t)), !$ && $ !== 0 ? {
|
|
3988
3986
|
maskedValue: "",
|
|
3989
3987
|
value: g ? null : 0
|
|
3990
|
-
} : (typeof
|
|
3991
|
-
|
|
3988
|
+
} : (typeof $ == "string" && ($ = $.replace(new RegExp(`\\${h}`, "g"), "").replace(d, ".").replace(/[^0-9-.]/g, ""), $ = Number.parseFloat($)), E && (f = 0), Dr(
|
|
3989
|
+
$,
|
|
3992
3990
|
f,
|
|
3993
3991
|
d,
|
|
3994
3992
|
h,
|
|
@@ -4000,35 +3998,35 @@ function gi({
|
|
|
4000
3998
|
));
|
|
4001
3999
|
}, [u, e, t, f, d, h, p, m, w, v, P, E, g]), oe = T(() => {
|
|
4002
4000
|
if (e && t) {
|
|
4003
|
-
const
|
|
4004
|
-
x(
|
|
4001
|
+
const $ = de();
|
|
4002
|
+
x($.maskedValue), S($.value);
|
|
4005
4003
|
}
|
|
4006
4004
|
}, [e, t, de]), we = T(() => {
|
|
4007
4005
|
oe();
|
|
4008
|
-
}, [oe]), ze = T((
|
|
4009
|
-
e && t && ((
|
|
4006
|
+
}, [oe]), ze = T(($) => {
|
|
4007
|
+
e && t && (($.type === q.dataChanged || $.type === q.recordChanged || $.type === q.afterScroll || $.type === q.afterCancel || $.type === q.afterEdit || $.type === q.afterSave) && (oe(), O.isDataSourceV2 || j()), $.type === q.onFieldError && $.fieldName === t && (C($.error), J?.setError(ee, $.error)));
|
|
4010
4008
|
}, [e, t, oe, j, O.isDataSourceV2, J, ee]), ve = ue(ze);
|
|
4011
4009
|
G(() => {
|
|
4012
4010
|
ve.current = ze;
|
|
4013
4011
|
}, [ze]);
|
|
4014
|
-
const re = T((
|
|
4015
|
-
ve.current(
|
|
4012
|
+
const re = T(($) => {
|
|
4013
|
+
ve.current($);
|
|
4016
4014
|
}, []);
|
|
4017
4015
|
G(() => {
|
|
4018
|
-
const
|
|
4019
|
-
if (x(
|
|
4016
|
+
const $ = de();
|
|
4017
|
+
if (x($.maskedValue), S($.value), e && t) {
|
|
4020
4018
|
const xe = typeof e.addFieldChangeListener == "function";
|
|
4021
4019
|
return e.addListener(re), xe && e.addFieldChangeListener(t, we), () => {
|
|
4022
4020
|
e.removeListener(re), xe && e.removeFieldChangeListener(t, we);
|
|
4023
4021
|
};
|
|
4024
4022
|
}
|
|
4025
4023
|
}, [e, t, re, we]), lt(() => {
|
|
4026
|
-
const
|
|
4027
|
-
x(
|
|
4024
|
+
const $ = de();
|
|
4025
|
+
x($.maskedValue), S($.value);
|
|
4028
4026
|
}, [u]);
|
|
4029
|
-
const te = (
|
|
4030
|
-
|
|
4031
|
-
let ce =
|
|
4027
|
+
const te = ($) => {
|
|
4028
|
+
$.preventDefault(), (L || Se) && (C(void 0), J?.clearError(ee));
|
|
4029
|
+
let ce = $.target.value;
|
|
4032
4030
|
const se = I;
|
|
4033
4031
|
if (!p && ce.includes("-"))
|
|
4034
4032
|
ce = se;
|
|
@@ -4036,7 +4034,7 @@ function gi({
|
|
|
4036
4034
|
const Ne = ce.includes("-"), he = ce.replace(/-/g, "");
|
|
4037
4035
|
Ne ? ce = "-" + he : ce = he;
|
|
4038
4036
|
}
|
|
4039
|
-
const { maskedValue:
|
|
4037
|
+
const { maskedValue: Re, value: $e } = Dr(
|
|
4040
4038
|
ce,
|
|
4041
4039
|
f,
|
|
4042
4040
|
d,
|
|
@@ -4048,14 +4046,14 @@ function gi({
|
|
|
4048
4046
|
P,
|
|
4049
4047
|
!0
|
|
4050
4048
|
);
|
|
4051
|
-
x(
|
|
4052
|
-
}, ne = (
|
|
4049
|
+
x(Re), S($e), e && !e.isBrowsing() && t && O.handleValueChange($e), c && c(Re, $e, $);
|
|
4050
|
+
}, ne = ($) => {
|
|
4053
4051
|
if (F.current) {
|
|
4054
4052
|
const xe = F.current.value, ce = m.length, se = xe.length - w.length;
|
|
4055
4053
|
F.current.setSelectionRange(ce, se);
|
|
4056
4054
|
}
|
|
4057
|
-
a && a(
|
|
4058
|
-
}, Z = (
|
|
4055
|
+
a && a($);
|
|
4056
|
+
}, Z = ($) => {
|
|
4059
4057
|
const xe = Dr(
|
|
4060
4058
|
I,
|
|
4061
4059
|
f,
|
|
@@ -4067,9 +4065,9 @@ function gi({
|
|
|
4067
4065
|
v,
|
|
4068
4066
|
P
|
|
4069
4067
|
);
|
|
4070
|
-
x(xe.maskedValue), S(xe.value), l && l(
|
|
4068
|
+
x(xe.maskedValue), S(xe.value), l && l($);
|
|
4071
4069
|
}, Q = () => {
|
|
4072
|
-
const
|
|
4070
|
+
const $ = Dr(
|
|
4073
4071
|
"",
|
|
4074
4072
|
f,
|
|
4075
4073
|
d,
|
|
@@ -4080,14 +4078,14 @@ function gi({
|
|
|
4080
4078
|
v,
|
|
4081
4079
|
P
|
|
4082
4080
|
);
|
|
4083
|
-
x(
|
|
4084
|
-
}, ie = (
|
|
4085
|
-
const xe =
|
|
4086
|
-
if (
|
|
4087
|
-
if (
|
|
4081
|
+
x($.maskedValue), S($.value), e && !e.isBrowsing() && t && O.handleValueChange(g ? null : 0), U && U();
|
|
4082
|
+
}, ie = ($) => {
|
|
4083
|
+
const xe = $.currentTarget, ce = xe.selectionStart || 0, se = xe.selectionEnd || 0, Re = xe.value;
|
|
4084
|
+
if ($.key === "-") {
|
|
4085
|
+
if ($.preventDefault(), !p)
|
|
4088
4086
|
return;
|
|
4089
|
-
let
|
|
4090
|
-
const Ne =
|
|
4087
|
+
let $e = Re.replace(m, "").replace(w, "").replace(/-/g, "");
|
|
4088
|
+
const Ne = $e === "0" || $e === "" ? "-0" : "-" + $e, { maskedValue: he, value: Ue } = Dr(
|
|
4091
4089
|
Ne,
|
|
4092
4090
|
f,
|
|
4093
4091
|
d,
|
|
@@ -4099,18 +4097,18 @@ function gi({
|
|
|
4099
4097
|
P,
|
|
4100
4098
|
!0
|
|
4101
4099
|
);
|
|
4102
|
-
x(he), S(Ue), e && !e.isBrowsing() && t && O.handleValueChange(Ue), c && c(he, Ue,
|
|
4100
|
+
x(he), S(Ue), e && !e.isBrowsing() && t && O.handleValueChange(Ue), c && c(he, Ue, $), setTimeout(() => {
|
|
4103
4101
|
const Pe = ce;
|
|
4104
4102
|
xe.setSelectionRange(Pe, Pe);
|
|
4105
4103
|
}, 0);
|
|
4106
4104
|
return;
|
|
4107
4105
|
}
|
|
4108
|
-
if (
|
|
4109
|
-
const
|
|
4106
|
+
if ($.key === "Backspace" && w) {
|
|
4107
|
+
const $e = Re.slice(0, -w.length);
|
|
4110
4108
|
if (ce !== se)
|
|
4111
4109
|
return;
|
|
4112
|
-
|
|
4113
|
-
const Ne =
|
|
4110
|
+
$.preventDefault();
|
|
4111
|
+
const Ne = Re.length - ce, he = Math.min(ce, $e.length), Ue = $e.slice(0, he - 1), Pe = $e.slice(he), Ye = Ue + Pe, { maskedValue: ge, value: N } = Dr(
|
|
4114
4112
|
Ye,
|
|
4115
4113
|
f,
|
|
4116
4114
|
d,
|
|
@@ -4122,8 +4120,8 @@ function gi({
|
|
|
4122
4120
|
P,
|
|
4123
4121
|
!0
|
|
4124
4122
|
);
|
|
4125
|
-
x(ge), S(N), e && !e.isBrowsing() && t && O.handleValueChange(N), c && c(ge, N,
|
|
4126
|
-
const ae = ce >
|
|
4123
|
+
x(ge), S(N), e && !e.isBrowsing() && t && O.handleValueChange(N), c && c(ge, N, $), setTimeout(() => {
|
|
4124
|
+
const ae = ce > $e.length ? ge.length - Ne : Math.max(m.length, ce - 1);
|
|
4127
4125
|
xe.setSelectionRange(ae, ae);
|
|
4128
4126
|
}, 0);
|
|
4129
4127
|
}
|
|
@@ -4131,7 +4129,7 @@ function gi({
|
|
|
4131
4129
|
Ur,
|
|
4132
4130
|
{
|
|
4133
4131
|
variant: "transparent",
|
|
4134
|
-
onMouseDown: (
|
|
4132
|
+
onMouseDown: ($) => $.preventDefault(),
|
|
4135
4133
|
tabIndex: -1,
|
|
4136
4134
|
onClick: Q,
|
|
4137
4135
|
unstyled: X,
|
|
@@ -4217,7 +4215,7 @@ function Tf({
|
|
|
4217
4215
|
},
|
|
4218
4216
|
innerRef: z,
|
|
4219
4217
|
decimalSeparator: A,
|
|
4220
|
-
thousandSeparator:
|
|
4218
|
+
thousandSeparator: R,
|
|
4221
4219
|
precision: U = 0,
|
|
4222
4220
|
allowNegative: v = !1,
|
|
4223
4221
|
allowEmpty: P = !0
|
|
@@ -4305,7 +4303,7 @@ function Tf({
|
|
|
4305
4303
|
size: f,
|
|
4306
4304
|
width: p,
|
|
4307
4305
|
decimalSeparator: A,
|
|
4308
|
-
thousandSeparator:
|
|
4306
|
+
thousandSeparator: R,
|
|
4309
4307
|
precision: U,
|
|
4310
4308
|
allowNegative: v,
|
|
4311
4309
|
allowEmpty: P,
|
|
@@ -4341,7 +4339,7 @@ function ac(e) {
|
|
|
4341
4339
|
function lc(e, t, r, i, o, s) {
|
|
4342
4340
|
if (!t && !r && !e)
|
|
4343
4341
|
return [];
|
|
4344
|
-
if (e && e instanceof
|
|
4342
|
+
if (e && e instanceof sn && i && o && s) {
|
|
4345
4343
|
const l = e;
|
|
4346
4344
|
l.first();
|
|
4347
4345
|
const a = [];
|
|
@@ -4398,7 +4396,7 @@ function ls({
|
|
|
4398
4396
|
value: W,
|
|
4399
4397
|
defaultValue: z,
|
|
4400
4398
|
filter: A,
|
|
4401
|
-
size:
|
|
4399
|
+
size: R,
|
|
4402
4400
|
initiallyOpened: U,
|
|
4403
4401
|
itemComponent: v,
|
|
4404
4402
|
dropdownOpened: P,
|
|
@@ -4426,7 +4424,7 @@ function ls({
|
|
|
4426
4424
|
null
|
|
4427
4425
|
);
|
|
4428
4426
|
process.env.NODE_ENV;
|
|
4429
|
-
const re = ue(null), [te, ne] = k(W), [Z, Q] = ua("", s), [ie, le] = k(f), [Ce, be] = k(0),
|
|
4427
|
+
const re = ue(null), [te, ne] = k(W), [Z, Q] = ua("", s), [ie, le] = k(f), [Ce, be] = k(0), $ = ue(null), [xe, ce] = k(I), se = it(), Re = `${i}`, $e = se?.getError(Re), Ne = Ge(() => lc(
|
|
4430
4428
|
j,
|
|
4431
4429
|
c,
|
|
4432
4430
|
L,
|
|
@@ -4443,7 +4441,7 @@ function ls({
|
|
|
4443
4441
|
D
|
|
4444
4442
|
]), he = (Le) => oe && Le ? oe(Le) : Le, Ue = (Le, Y) => {
|
|
4445
4443
|
const De = Y && Y.origin ? Y.origin : Le;
|
|
4446
|
-
if ((ie ||
|
|
4444
|
+
if ((ie || $e) && (le(void 0), se?.clearError(Re)), ne((Fe) => De), r && i) {
|
|
4447
4445
|
const Fe = he(De);
|
|
4448
4446
|
ee ? ee(Fe) : ve.handleValueChange(Fe);
|
|
4449
4447
|
}
|
|
@@ -4453,7 +4451,7 @@ function ls({
|
|
|
4453
4451
|
}, Ye = (Le) => {
|
|
4454
4452
|
B && B(Le);
|
|
4455
4453
|
}, ge = (Le) => {
|
|
4456
|
-
|
|
4454
|
+
$ && $.current && $.current.scrollTop === $.current.scrollHeight - $.current.offsetHeight && I !== 1 / 0 && ce((Y) => Y + I);
|
|
4457
4455
|
}, N = ({ option: Le, checked: Y }) => {
|
|
4458
4456
|
if (v)
|
|
4459
4457
|
return /* @__PURE__ */ n(v, { ...Le, checked: Y });
|
|
@@ -4469,8 +4467,8 @@ function ls({
|
|
|
4469
4467
|
}, Te = T(() => {
|
|
4470
4468
|
fe();
|
|
4471
4469
|
}, []), qe = T((Le) => {
|
|
4472
|
-
r && i && ((Le.type === q.dataChanged || Le.type === q.recordChanged || Le.type === q.afterScroll || Le.type === q.afterCancel) && (fe(), ve.isDataSourceV2 || ze()), Le.type === q.onFieldError && Le.fieldName === i && (le(Le.error), se?.setError(
|
|
4473
|
-
}, [ve.isDataSourceV2, r, i, fe, ze, se,
|
|
4470
|
+
r && i && ((Le.type === q.dataChanged || Le.type === q.recordChanged || Le.type === q.afterScroll || Le.type === q.afterCancel) && (fe(), ve.isDataSourceV2 || ze()), Le.type === q.onFieldError && Le.fieldName === i && (le(Le.error), se?.setError(Re, Le.error), be((Y) => Y + 1), ve.isDataSourceV2 || ze()));
|
|
4471
|
+
}, [ve.isDataSourceV2, r, i, fe, ze, se, Re]), Ke = T((Le) => {
|
|
4474
4472
|
r && i && Le.type === q.dataChanged && be((Y) => Y + 1);
|
|
4475
4473
|
}, []), Je = ue(qe);
|
|
4476
4474
|
G(() => {
|
|
@@ -4484,12 +4482,12 @@ function ls({
|
|
|
4484
4482
|
const Le = typeof r.addFieldChangeListener == "function";
|
|
4485
4483
|
r.addListener(ct), Le && r.addFieldChangeListener(i, Te);
|
|
4486
4484
|
}
|
|
4487
|
-
return j && j instanceof
|
|
4485
|
+
return j && j instanceof sn && j.addListener(Ke), () => {
|
|
4488
4486
|
if (r && i) {
|
|
4489
4487
|
const Le = typeof r.addFieldChangeListener == "function";
|
|
4490
4488
|
r.removeListener(ct), Le && r.removeFieldChangeListener(i, Te);
|
|
4491
4489
|
}
|
|
4492
|
-
j && j instanceof
|
|
4490
|
+
j && j instanceof sn && j.removeListener(Ke);
|
|
4493
4491
|
};
|
|
4494
4492
|
}, [r, i, ct, Te]), G(() => {
|
|
4495
4493
|
W !== void 0 && ne(W);
|
|
@@ -4510,9 +4508,9 @@ function ls({
|
|
|
4510
4508
|
maxDropdownHeight: 280,
|
|
4511
4509
|
ref: C || re,
|
|
4512
4510
|
label: d,
|
|
4513
|
-
error: ie ||
|
|
4511
|
+
error: ie || $e,
|
|
4514
4512
|
data: Ne,
|
|
4515
|
-
size:
|
|
4513
|
+
size: R,
|
|
4516
4514
|
leftSection: p,
|
|
4517
4515
|
width: m,
|
|
4518
4516
|
leftSectionWidth: g,
|
|
@@ -4534,7 +4532,7 @@ function ls({
|
|
|
4534
4532
|
nothingFoundMessage: x,
|
|
4535
4533
|
scrollAreaProps: {
|
|
4536
4534
|
viewportProps: { tabIndex: -1 },
|
|
4537
|
-
viewportRef:
|
|
4535
|
+
viewportRef: $,
|
|
4538
4536
|
onScrollPositionChange: ge
|
|
4539
4537
|
},
|
|
4540
4538
|
...ae
|
|
@@ -4548,9 +4546,9 @@ function Jr(e, t, r) {
|
|
|
4548
4546
|
return e && e.getTotalRecords() > 0 && e.browseRecords().map((o) => {
|
|
4549
4547
|
if (r && !r.includes(".")) {
|
|
4550
4548
|
if (!o.hasOwnProperty(r) || !o[r])
|
|
4551
|
-
throw new
|
|
4549
|
+
throw new ln("Foi encontrado um registro sem ID no dataSource passado para o Select.");
|
|
4552
4550
|
if (typeof t != "function" && (!o.hasOwnProperty(t) || !o[t]))
|
|
4553
|
-
throw new
|
|
4551
|
+
throw new ln("Foi encontrado um registro sem o texto no dataSource passado para a Select.");
|
|
4554
4552
|
}
|
|
4555
4553
|
i.push({
|
|
4556
4554
|
label: o.label ? o.label : cs(t, o),
|
|
@@ -4586,17 +4584,17 @@ function zf({
|
|
|
4586
4584
|
G(() => {
|
|
4587
4585
|
c !== void 0 && c !== E && D(c);
|
|
4588
4586
|
}, [c]);
|
|
4589
|
-
const B = T((
|
|
4590
|
-
e && ((
|
|
4587
|
+
const B = T((R) => {
|
|
4588
|
+
e && ((R.type === q.dataChanged || R.type === q.fieldChanged || R.type === q.recordChanged || R.type === q.afterScroll || R.type === q.afterCancel) && (e && w(Jr(e, t, r)), f.isDataSourceV2 || h()), R.type === q.onFieldError && R.fieldName === l && (D(R.error), p?.setError(g, R.error)));
|
|
4591
4589
|
}, [f.isDataSourceV2, e, t, r, l, p, g]), V = () => {
|
|
4592
|
-
let
|
|
4593
|
-
return s && l && (
|
|
4594
|
-
}, X = (
|
|
4595
|
-
if (
|
|
4590
|
+
let R = "";
|
|
4591
|
+
return s && l && (R = s.getFieldValue(l), R && !i ? typeof t == "function" ? R = t(s.getCurrentRecord()) : R = Bt.getNestedProperty(R, r) : R || (R = "")), R;
|
|
4592
|
+
}, X = (R) => {
|
|
4593
|
+
if (R !== void 0 && R !== "" && R !== null) {
|
|
4596
4594
|
if (e && r && e.locate({
|
|
4597
|
-
[r]: Bt.getNestedProperty(
|
|
4595
|
+
[r]: Bt.getNestedProperty(R, r)
|
|
4598
4596
|
}) && s && l) {
|
|
4599
|
-
const U = i ? u(
|
|
4597
|
+
const U = i ? u(R) : e.getCurrentRecord();
|
|
4600
4598
|
f.handleValueChange(U);
|
|
4601
4599
|
}
|
|
4602
4600
|
} else
|
|
@@ -4605,8 +4603,8 @@ function zf({
|
|
|
4605
4603
|
G(() => {
|
|
4606
4604
|
H.current = B;
|
|
4607
4605
|
}, [B]);
|
|
4608
|
-
const W = T((
|
|
4609
|
-
H.current(
|
|
4606
|
+
const W = T((R) => {
|
|
4607
|
+
H.current(R);
|
|
4610
4608
|
}, []);
|
|
4611
4609
|
return G(() => {
|
|
4612
4610
|
if (w(Jr(e, t, r)), e)
|
|
@@ -4619,7 +4617,7 @@ function zf({
|
|
|
4619
4617
|
ls,
|
|
4620
4618
|
{
|
|
4621
4619
|
...d,
|
|
4622
|
-
getOptionLabel: (
|
|
4620
|
+
getOptionLabel: (R) => R.label ? R.label : cs(t, R),
|
|
4623
4621
|
getOptionValue: u,
|
|
4624
4622
|
dataSource: s,
|
|
4625
4623
|
dataField: l,
|
|
@@ -4667,12 +4665,12 @@ function uc(e) {
|
|
|
4667
4665
|
""
|
|
4668
4666
|
);
|
|
4669
4667
|
process.env.NODE_ENV === "development" && e.dataSource;
|
|
4670
|
-
const m = u || ue(null), [w, E] = k(""), D = nt(), { dataSource: B, dataField: V, onChangeValue: X, onFocusEnter: H, onFocusExit: W, saveWithMask: z, error: A } = e, [
|
|
4668
|
+
const m = u || ue(null), [w, E] = k(""), D = nt(), { dataSource: B, dataField: V, onChangeValue: X, onFocusEnter: H, onFocusExit: W, saveWithMask: z, error: A } = e, [R, U] = k(A), v = ue(0), { t: P } = Xe(), M = it(), O = `${V}`, I = M?.getError(O);
|
|
4671
4669
|
G(() => {
|
|
4672
|
-
A !== void 0 && A !==
|
|
4670
|
+
A !== void 0 && A !== R && U(A);
|
|
4673
4671
|
}, [A]), G(() => {
|
|
4674
|
-
h && h(
|
|
4675
|
-
}, [
|
|
4672
|
+
h && h(R);
|
|
4673
|
+
}, [R]);
|
|
4676
4674
|
const x = () => {
|
|
4677
4675
|
let Z = w;
|
|
4678
4676
|
B && V && (Z = B.getFieldValue(V), Z || (Z = "")), E(Z);
|
|
@@ -4698,7 +4696,7 @@ function uc(e) {
|
|
|
4698
4696
|
x();
|
|
4699
4697
|
}, []);
|
|
4700
4698
|
const C = (Z, Q) => {
|
|
4701
|
-
(
|
|
4699
|
+
(R || I) && (U(void 0), M?.clearError(O));
|
|
4702
4700
|
const le = Q.value.replaceAll("_", "");
|
|
4703
4701
|
v.current = le.length - Q.unmaskedValue.length, !(le.length !== i?.length && Q.unmaskedValue.length !== 0) && (E((Ce) => Z), B && !B.isBrowsing() && V && B.getFieldValue(V) !== Z && y.handleValueChange(Z), X && X(Z, Q.value));
|
|
4704
4702
|
}, j = (Z) => {
|
|
@@ -4711,7 +4709,7 @@ function uc(e) {
|
|
|
4711
4709
|
W && W(Z);
|
|
4712
4710
|
}, J = (Z) => {
|
|
4713
4711
|
H && H(Z);
|
|
4714
|
-
}, ee = () => l || y.isReadOnly, { dataSource: Se, dataField: de, showMask: oe, saveWithMask: we, onChangeValue: ze, onFocusEnter: ve, onFocusExit: re, ...te } = p, ne =
|
|
4712
|
+
}, ee = () => l || y.isReadOnly, { dataSource: Se, dataField: de, showMask: oe, saveWithMask: we, onChangeValue: ze, onFocusEnter: ve, onFocusExit: re, ...te } = p, ne = R || I;
|
|
4715
4713
|
return /* @__PURE__ */ n(rt.Wrapper, { ...r, label: d || e.label, error: ne, children: /* @__PURE__ */ n(
|
|
4716
4714
|
rt,
|
|
4717
4715
|
{
|
|
@@ -4775,9 +4773,9 @@ function If({
|
|
|
4775
4773
|
process.env.NODE_ENV;
|
|
4776
4774
|
const V = it(), X = `${t}`, H = V?.getError(X), [W, z] = k(p || ""), A = ue(null);
|
|
4777
4775
|
Mt();
|
|
4778
|
-
const [
|
|
4776
|
+
const [R, U] = k(c), v = nt();
|
|
4779
4777
|
G(() => {
|
|
4780
|
-
c !== void 0 && c !==
|
|
4778
|
+
c !== void 0 && c !== R && U(c);
|
|
4781
4779
|
}, [c]);
|
|
4782
4780
|
const P = () => {
|
|
4783
4781
|
let j = W;
|
|
@@ -4806,12 +4804,12 @@ function If({
|
|
|
4806
4804
|
const _ = (j) => {
|
|
4807
4805
|
j.preventDefault();
|
|
4808
4806
|
const J = j.target.value;
|
|
4809
|
-
j.persist(), (
|
|
4807
|
+
j.persist(), (R || H) && (U(void 0), V?.clearError(X)), z((Se) => J), e && !e.isBrowsing() && t && e.getFieldValue(t) !== J && B.handleValueChange(J), E && E(j, J);
|
|
4810
4808
|
}, S = (j) => {
|
|
4811
4809
|
m && m(j);
|
|
4812
4810
|
}, F = (j) => {
|
|
4813
4811
|
w && w(j);
|
|
4814
|
-
}, L = () => i || B.isReadOnly, C =
|
|
4812
|
+
}, L = () => i || B.isReadOnly, C = R || H;
|
|
4815
4813
|
return /* @__PURE__ */ n(
|
|
4816
4814
|
Ks,
|
|
4817
4815
|
{
|
|
@@ -4844,7 +4842,7 @@ function hc(e, t, r, i) {
|
|
|
4844
4842
|
key: Dt("radio")
|
|
4845
4843
|
}));
|
|
4846
4844
|
}
|
|
4847
|
-
function
|
|
4845
|
+
function Rf({
|
|
4848
4846
|
dataSource: e,
|
|
4849
4847
|
dataField: t,
|
|
4850
4848
|
style: r,
|
|
@@ -4877,9 +4875,9 @@ function $f({
|
|
|
4877
4875
|
process.env.NODE_ENV;
|
|
4878
4876
|
const B = it(), V = `${t}`, X = B?.getError(V), [H, W] = k(
|
|
4879
4877
|
hc(m, w, h, f)
|
|
4880
|
-
), [z, A] = k(g), [
|
|
4878
|
+
), [z, A] = k(g), [R, U] = k(a), v = nt();
|
|
4881
4879
|
G(() => {
|
|
4882
|
-
a !== void 0 && a !==
|
|
4880
|
+
a !== void 0 && a !== R && U(a);
|
|
4883
4881
|
}, [a]);
|
|
4884
4882
|
const P = () => {
|
|
4885
4883
|
let C = g;
|
|
@@ -4906,14 +4904,14 @@ function $f({
|
|
|
4906
4904
|
P();
|
|
4907
4905
|
}, []);
|
|
4908
4906
|
const _ = (C) => {
|
|
4909
|
-
(
|
|
4907
|
+
(R || X) && (U(void 0), B?.clearError(V)), A((ee) => C);
|
|
4910
4908
|
let J = C;
|
|
4911
4909
|
p && (J = p(C)), e && !e.isBrowsing() && t && e.getFieldValue(t) !== J && D.handleValueChange(J), d && d(J);
|
|
4912
4910
|
}, S = (C) => {
|
|
4913
4911
|
c && c(C);
|
|
4914
4912
|
}, F = (C) => {
|
|
4915
4913
|
u && u(C);
|
|
4916
|
-
}, L =
|
|
4914
|
+
}, L = R || X;
|
|
4917
4915
|
return /* @__PURE__ */ n(
|
|
4918
4916
|
Fi.Group,
|
|
4919
4917
|
{
|
|
@@ -4947,7 +4945,7 @@ function fc(e) {
|
|
|
4947
4945
|
return null;
|
|
4948
4946
|
}
|
|
4949
4947
|
fc.displayName = "ArchbaseRadioItem";
|
|
4950
|
-
function
|
|
4948
|
+
function $f({
|
|
4951
4949
|
dataSource: e,
|
|
4952
4950
|
dataField: t,
|
|
4953
4951
|
readOnly: r = !1,
|
|
@@ -4984,12 +4982,12 @@ function Rf({
|
|
|
4984
4982
|
W();
|
|
4985
4983
|
}, []), A = T((x) => {
|
|
4986
4984
|
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 || H()), x.type === q.onFieldError && x.fieldName === t && (X(x.error), y?.setError(m, x.error)));
|
|
4987
|
-
}, [g.isDataSourceV2, y, m]),
|
|
4985
|
+
}, [g.isDataSourceV2, y, m]), R = ue(A);
|
|
4988
4986
|
G(() => {
|
|
4989
|
-
|
|
4987
|
+
R.current = A;
|
|
4990
4988
|
}, [A]);
|
|
4991
4989
|
const U = T((x) => {
|
|
4992
|
-
|
|
4990
|
+
R.current(x);
|
|
4993
4991
|
}, []);
|
|
4994
4992
|
G(() => {
|
|
4995
4993
|
if (W(), e && t) {
|
|
@@ -5023,9 +5021,9 @@ function Rf({
|
|
|
5023
5021
|
}
|
|
5024
5022
|
) });
|
|
5025
5023
|
}
|
|
5026
|
-
let
|
|
5024
|
+
let dn = null, ds = { en: {}, es: {}, ptBR: {} }, Zr = null;
|
|
5027
5025
|
async function pc() {
|
|
5028
|
-
return Zr || (
|
|
5026
|
+
return Zr || (dn ? Promise.resolve() : (Zr = (async () => {
|
|
5029
5027
|
const [e, t, r, i, o] = await Promise.all([
|
|
5030
5028
|
import("suneditor-react"),
|
|
5031
5029
|
// @ts-ignore - CSS import
|
|
@@ -5034,7 +5032,7 @@ async function pc() {
|
|
|
5034
5032
|
import("suneditor/src/lang/es"),
|
|
5035
5033
|
import("suneditor/src/lang/pt_br")
|
|
5036
5034
|
]);
|
|
5037
|
-
|
|
5035
|
+
dn = e.default, ds = {
|
|
5038
5036
|
en: r.default,
|
|
5039
5037
|
es: i.default,
|
|
5040
5038
|
ptBR: o.default
|
|
@@ -5073,7 +5071,7 @@ function Pf({
|
|
|
5073
5071
|
onKeyDown: W,
|
|
5074
5072
|
onSave: z,
|
|
5075
5073
|
onSetToolbarButtons: A,
|
|
5076
|
-
onLoad:
|
|
5074
|
+
onLoad: R,
|
|
5077
5075
|
onDrop: U,
|
|
5078
5076
|
onPaste: v,
|
|
5079
5077
|
onImageUpload: P,
|
|
@@ -5115,17 +5113,17 @@ function Pf({
|
|
|
5115
5113
|
G(() => {
|
|
5116
5114
|
be.current = Ce;
|
|
5117
5115
|
}, [Ce]);
|
|
5118
|
-
const
|
|
5116
|
+
const $ = T((N) => {
|
|
5119
5117
|
be.current(N);
|
|
5120
5118
|
}, []);
|
|
5121
5119
|
G(() => {
|
|
5122
5120
|
if (ie(), t && r) {
|
|
5123
5121
|
const N = typeof t.addFieldChangeListener == "function";
|
|
5124
|
-
return t.addListener(
|
|
5125
|
-
t.removeListener(
|
|
5122
|
+
return t.addListener($), N && t.addFieldChangeListener(r, le), () => {
|
|
5123
|
+
t.removeListener($), N && t.removeFieldChangeListener(r, le);
|
|
5126
5124
|
};
|
|
5127
5125
|
}
|
|
5128
|
-
}, [t, r,
|
|
5126
|
+
}, [t, r, $, le]), lt(() => {
|
|
5129
5127
|
ie();
|
|
5130
5128
|
}, []);
|
|
5131
5129
|
const xe = (N) => {
|
|
@@ -5136,15 +5134,15 @@ function Pf({
|
|
|
5136
5134
|
w && w(N);
|
|
5137
5135
|
}, ce = (N, ae) => {
|
|
5138
5136
|
y && y(N);
|
|
5139
|
-
}, se = () => o || de.isReadOnly,
|
|
5137
|
+
}, se = () => o || de.isReadOnly, Re = ne || ze, [$e, Ne] = k(!1), [, he] = k({});
|
|
5140
5138
|
if (G(() => {
|
|
5141
5139
|
typeof window > "u" || pc().then(() => {
|
|
5142
5140
|
Ne(!0), he({});
|
|
5143
5141
|
});
|
|
5144
|
-
}, []),
|
|
5145
|
-
return /* @__PURE__ */ n(rt.Wrapper, { withAsterisk: s, label: l, description: a, error:
|
|
5146
|
-
const Ue =
|
|
5147
|
-
return /* @__PURE__ */ n(rt.Wrapper, { withAsterisk: s, label: l, description: a, error:
|
|
5142
|
+
}, []), !$e || !dn)
|
|
5143
|
+
return /* @__PURE__ */ n(rt.Wrapper, { withAsterisk: s, label: l, description: a, error: Re, children: /* @__PURE__ */ n(Vo, { height: d || 200, width: u || "100%" }) });
|
|
5144
|
+
const Ue = dn, { en: Pe, es: Ye, ptBR: ge } = ds;
|
|
5145
|
+
return /* @__PURE__ */ n(rt.Wrapper, { withAsterisk: s, label: l, description: a, error: Re, children: /* @__PURE__ */ n(
|
|
5148
5146
|
Ue,
|
|
5149
5147
|
{
|
|
5150
5148
|
autoFocus: e,
|
|
@@ -5168,7 +5166,7 @@ function Pf({
|
|
|
5168
5166
|
onBlur: ce,
|
|
5169
5167
|
onSave: z,
|
|
5170
5168
|
onSetToolbarButtons: A,
|
|
5171
|
-
onLoad:
|
|
5169
|
+
onLoad: R,
|
|
5172
5170
|
onDrop: U,
|
|
5173
5171
|
onPaste: v,
|
|
5174
5172
|
onImageUpload: P,
|
|
@@ -5191,10 +5189,10 @@ function Pf({
|
|
|
5191
5189
|
}
|
|
5192
5190
|
) });
|
|
5193
5191
|
}
|
|
5194
|
-
let
|
|
5192
|
+
let un = null, hn = null, en = null;
|
|
5195
5193
|
async function gc() {
|
|
5196
|
-
return en || (
|
|
5197
|
-
|
|
5194
|
+
return en || (un && hn ? Promise.resolve() : (en = (async () => {
|
|
5195
|
+
hn = (await import("markdown-it")).default, un = (await import("react-markdown-editor-lite")).default, await import("react-markdown-editor-lite/lib/index.css");
|
|
5198
5196
|
})(), en));
|
|
5199
5197
|
}
|
|
5200
5198
|
function yc(e, t, r) {
|
|
@@ -5231,7 +5229,7 @@ function Nf({
|
|
|
5231
5229
|
t,
|
|
5232
5230
|
r,
|
|
5233
5231
|
""
|
|
5234
|
-
), W = it(), z = `${r}`, A = W?.getError(z), [
|
|
5232
|
+
), W = it(), z = `${r}`, A = W?.getError(z), [R, U] = k(
|
|
5235
5233
|
yc(V, t, r)
|
|
5236
5234
|
), [v, P] = k(c), M = nt();
|
|
5237
5235
|
G(() => {
|
|
@@ -5274,15 +5272,15 @@ function Nf({
|
|
|
5274
5272
|
typeof window > "u" || gc().then(() => {
|
|
5275
5273
|
de(!0), oe({});
|
|
5276
5274
|
});
|
|
5277
|
-
}, []), !Se || !
|
|
5275
|
+
}, []), !Se || !un || !hn)
|
|
5278
5276
|
return /* @__PURE__ */ n(rt.Wrapper, { withAsterisk: s, label: l, description: a, error: ee, children: /* @__PURE__ */ n(Vo, { height: d || 400, width: u || "100%" }) });
|
|
5279
|
-
const we =
|
|
5277
|
+
const we = un, ze = hn, ve = {
|
|
5280
5278
|
width: u || "100%",
|
|
5281
5279
|
...d && { height: d },
|
|
5282
5280
|
...h && { minHeight: h },
|
|
5283
5281
|
...X
|
|
5284
5282
|
}, re = {
|
|
5285
|
-
value:
|
|
5283
|
+
value: R || "",
|
|
5286
5284
|
style: ve,
|
|
5287
5285
|
onChange: F,
|
|
5288
5286
|
renderHTML: (te) => ze({ html: !0 }).render(te),
|
|
@@ -5342,7 +5340,7 @@ function Vf({
|
|
|
5342
5340
|
a
|
|
5343
5341
|
);
|
|
5344
5342
|
process.env.NODE_ENV;
|
|
5345
|
-
const H = it(), W = `${t}`, z = H?.getError(W), [A,
|
|
5343
|
+
const H = it(), W = `${t}`, z = H?.getError(W), [A, R] = k(c), U = ue(null), [v, P] = k(f), M = nt();
|
|
5346
5344
|
G(() => {
|
|
5347
5345
|
f !== void 0 && f !== v && P(f);
|
|
5348
5346
|
}, [f]);
|
|
@@ -5352,7 +5350,7 @@ function Vf({
|
|
|
5352
5350
|
const Se = e.getFieldValue(t);
|
|
5353
5351
|
Se != null && (ee = Se === l);
|
|
5354
5352
|
}
|
|
5355
|
-
|
|
5353
|
+
R(ee);
|
|
5356
5354
|
}, I = T(() => {
|
|
5357
5355
|
O();
|
|
5358
5356
|
}, []), x = T((ee) => {
|
|
@@ -5379,7 +5377,7 @@ function Vf({
|
|
|
5379
5377
|
return;
|
|
5380
5378
|
(v || z) && (P(void 0), H?.clearError(W));
|
|
5381
5379
|
const oe = ee.target.checked, we = oe ? l : a;
|
|
5382
|
-
|
|
5380
|
+
R(oe), e && !e.isBrowsing() && t && e.getFieldValue(t) !== we && X.handleValueChange(we), B && B(we, ee);
|
|
5383
5381
|
}, L = (ee) => {
|
|
5384
5382
|
E && E(ee);
|
|
5385
5383
|
}, C = (ee) => {
|
|
@@ -5480,7 +5478,7 @@ function Lf({
|
|
|
5480
5478
|
""
|
|
5481
5479
|
);
|
|
5482
5480
|
process.env.NODE_ENV;
|
|
5483
|
-
const [D, B] = k(""), V = ue(null), [X, H] = k(c), W = nt(), z = it(), A = `${t}`,
|
|
5481
|
+
const [D, B] = k(""), V = ue(null), [X, H] = k(c), W = nt(), z = it(), A = `${t}`, R = z?.getError(A);
|
|
5484
5482
|
G(() => {
|
|
5485
5483
|
c !== void 0 && c !== X && H(c);
|
|
5486
5484
|
}, [c]);
|
|
@@ -5511,7 +5509,7 @@ function Lf({
|
|
|
5511
5509
|
const I = (L) => {
|
|
5512
5510
|
L.preventDefault();
|
|
5513
5511
|
const C = L.target.value;
|
|
5514
|
-
if (L.persist(), (X ||
|
|
5512
|
+
if (L.persist(), (X || R) && (H(void 0), z?.clearError(A)), B((J) => C), e && !e.isBrowsing() && t && e.getFieldValue(t) !== C) {
|
|
5515
5513
|
const J = m ? C : btoa(C);
|
|
5516
5514
|
E.handleValueChange(J);
|
|
5517
5515
|
}
|
|
@@ -5520,9 +5518,9 @@ function Lf({
|
|
|
5520
5518
|
u && u(L);
|
|
5521
5519
|
}, _ = (L) => {
|
|
5522
5520
|
d && d(L);
|
|
5523
|
-
}, S = () => i || E.isReadOnly, F = X ||
|
|
5521
|
+
}, S = () => i || E.isReadOnly, F = X || R;
|
|
5524
5522
|
return /* @__PURE__ */ n(
|
|
5525
|
-
|
|
5523
|
+
gn,
|
|
5526
5524
|
{
|
|
5527
5525
|
disabled: r,
|
|
5528
5526
|
readOnly: S(),
|
|
@@ -5660,10 +5658,10 @@ function Bf({
|
|
|
5660
5658
|
spacing: g = "xs"
|
|
5661
5659
|
}) {
|
|
5662
5660
|
const y = (W) => W ? W.split(s).map((z) => {
|
|
5663
|
-
const [A,
|
|
5661
|
+
const [A, R] = z.split(l);
|
|
5664
5662
|
return {
|
|
5665
5663
|
key: a ? A.replace(/[{}]/g, "") : A,
|
|
5666
|
-
value:
|
|
5664
|
+
value: R
|
|
5667
5665
|
};
|
|
5668
5666
|
}) : [], [m, w] = k(y(e));
|
|
5669
5667
|
G(() => {
|
|
@@ -5679,13 +5677,13 @@ function Bf({
|
|
|
5679
5677
|
const W = [...m, { key: "", value: "" }];
|
|
5680
5678
|
w(W);
|
|
5681
5679
|
}, D = (W) => {
|
|
5682
|
-
const z = m.filter((A,
|
|
5680
|
+
const z = m.filter((A, R) => R !== W);
|
|
5683
5681
|
w(z);
|
|
5684
5682
|
}, B = (W, z) => {
|
|
5685
|
-
const A = m.map((
|
|
5683
|
+
const A = m.map((R, U) => U === W ? { ...R, key: z } : R);
|
|
5686
5684
|
w(A);
|
|
5687
5685
|
}, V = (W, z) => {
|
|
5688
|
-
const A = m.map((
|
|
5686
|
+
const A = m.map((R, U) => U === W ? { ...R, value: z } : R);
|
|
5689
5687
|
w(A);
|
|
5690
5688
|
}, X = m.some((W) => !W.key || !W.value), H = p === "horizontal" ? Ie : We;
|
|
5691
5689
|
return /* @__PURE__ */ n(rt.Wrapper, { label: u, error: d, children: /* @__PURE__ */ b(ye, { children: [
|
|
@@ -5740,7 +5738,7 @@ function Bf({
|
|
|
5740
5738
|
) })
|
|
5741
5739
|
] }) });
|
|
5742
5740
|
}
|
|
5743
|
-
const
|
|
5741
|
+
const fn = (e) => {
|
|
5744
5742
|
if (!e)
|
|
5745
5743
|
return "";
|
|
5746
5744
|
const t = e.getHours().toString().padStart(2, "0"), r = e.getMinutes().toString().padStart(2, "0");
|
|
@@ -5748,7 +5746,7 @@ const pn = (e) => {
|
|
|
5748
5746
|
}, no = (e) => e ? e.toLocaleDateString() : "", xc = (e, t) => {
|
|
5749
5747
|
if (!e || !t)
|
|
5750
5748
|
return "Selecionar intervalo";
|
|
5751
|
-
const r = no(e), i =
|
|
5749
|
+
const r = no(e), i = fn(e), o = no(t), s = fn(t);
|
|
5752
5750
|
return r === o ? `${r} ${i} - ${s}` : `${r} ${i} - ${o} ${s}`;
|
|
5753
5751
|
}, Ec = (e, t) => {
|
|
5754
5752
|
if (!e || !t)
|
|
@@ -5816,8 +5814,8 @@ Até: ${i}`;
|
|
|
5816
5814
|
}, [d, t, r, g]), G(() => {
|
|
5817
5815
|
u && (u.current = B.current);
|
|
5818
5816
|
}, [u, B.current]), G(() => {
|
|
5819
|
-
if (i !== void 0)
|
|
5820
|
-
if (h(i), i && i !== "custom") {
|
|
5817
|
+
if (console.log("[TimeRangeSelector] useEffect defaultRangeValue=%s, selectedRange=%s", i, d), i !== void 0)
|
|
5818
|
+
if (console.log("[TimeRangeSelector] setSelectedRange(%s)", i), h(i), i && i !== "custom") {
|
|
5821
5819
|
const z = t.find((A) => A.value === i);
|
|
5822
5820
|
if (z) {
|
|
5823
5821
|
const A = z.rangeFunction(/* @__PURE__ */ new Date());
|
|
@@ -5841,11 +5839,11 @@ Até: ${i}`;
|
|
|
5841
5839
|
};
|
|
5842
5840
|
h("custom"), y(z), w(!1), r && r("custom", z);
|
|
5843
5841
|
}, H = (z) => {
|
|
5844
|
-
if (h(z), z && z !== "custom") {
|
|
5845
|
-
const A = t.find((
|
|
5842
|
+
if (console.log("[TimeRangeSelector] handleRangeChange value=%s", z), h(z), z && z !== "custom") {
|
|
5843
|
+
const A = t.find((R) => R.value === z);
|
|
5846
5844
|
if (A) {
|
|
5847
|
-
const
|
|
5848
|
-
y(
|
|
5845
|
+
const R = A.rangeFunction(/* @__PURE__ */ new Date());
|
|
5846
|
+
y(R), w(!1), r && r(z, R);
|
|
5849
5847
|
}
|
|
5850
5848
|
} else
|
|
5851
5849
|
z === "custom" && !f.start && !f.end && g.start && g.end && p({
|
|
@@ -5853,8 +5851,8 @@ Até: ${i}`;
|
|
|
5853
5851
|
end: new Date(g.end.getTime())
|
|
5854
5852
|
});
|
|
5855
5853
|
}, W = (z, A) => {
|
|
5856
|
-
const [
|
|
5857
|
-
v.setHours(
|
|
5854
|
+
const [R, U] = z.split(":").map(Number), v = new Date((A ? f.start : f.end) || /* @__PURE__ */ new Date());
|
|
5855
|
+
v.setHours(R, U), p((P) => ({
|
|
5858
5856
|
...P,
|
|
5859
5857
|
[A ? "start" : "end"]: new Date(v)
|
|
5860
5858
|
}));
|
|
@@ -5927,7 +5925,7 @@ Até: ${i}`;
|
|
|
5927
5925
|
jr,
|
|
5928
5926
|
{
|
|
5929
5927
|
label: "Hora inicial",
|
|
5930
|
-
value:
|
|
5928
|
+
value: fn(f.start),
|
|
5931
5929
|
onChange: (z) => W(z.currentTarget.value, !0),
|
|
5932
5930
|
rightSection: /* @__PURE__ */ n(Ae, { onClick: () => E.current?.click(), children: /* @__PURE__ */ n(wr, { size: "1rem", stroke: 1.5 }) }),
|
|
5933
5931
|
ref: E,
|
|
@@ -5950,7 +5948,7 @@ Até: ${i}`;
|
|
|
5950
5948
|
jr,
|
|
5951
5949
|
{
|
|
5952
5950
|
label: "Hora final",
|
|
5953
|
-
value:
|
|
5951
|
+
value: fn(f.end),
|
|
5954
5952
|
onChange: (z) => W(z.currentTarget.value, !1),
|
|
5955
5953
|
rightSection: /* @__PURE__ */ n(Ae, { onClick: () => D.current?.click(), children: /* @__PURE__ */ n(wr, { size: "1rem", stroke: 1.5 }) }),
|
|
5956
5954
|
ref: D,
|
|
@@ -5977,7 +5975,7 @@ Até: ${i}`;
|
|
|
5977
5975
|
)
|
|
5978
5976
|
] });
|
|
5979
5977
|
}, yi = He.createContext({}), kc = yi.Provider;
|
|
5980
|
-
function
|
|
5978
|
+
function pn({
|
|
5981
5979
|
active: e,
|
|
5982
5980
|
activeBackgroundColor: t,
|
|
5983
5981
|
activeColor: r,
|
|
@@ -6040,13 +6038,13 @@ function mn({
|
|
|
6040
6038
|
`lstItem_${E.ownerId}_${c}`
|
|
6041
6039
|
);
|
|
6042
6040
|
}
|
|
6043
|
-
|
|
6041
|
+
pn.defaultProps = {
|
|
6044
6042
|
align: "left",
|
|
6045
6043
|
justify: !1,
|
|
6046
6044
|
showBorder: !1,
|
|
6047
6045
|
disabled: !1
|
|
6048
6046
|
};
|
|
6049
|
-
|
|
6047
|
+
pn.displayName = "ArchbaseListItem";
|
|
6050
6048
|
function Sc(e) {
|
|
6051
6049
|
const t = Mt(), { colorScheme: r } = Lt(), {
|
|
6052
6050
|
activeBackgroundColor: i = t.colors[t.primaryColor][5],
|
|
@@ -6073,7 +6071,7 @@ function Sc(e) {
|
|
|
6073
6071
|
onFilter: W,
|
|
6074
6072
|
children: z,
|
|
6075
6073
|
withPadding: A = !1,
|
|
6076
|
-
listStyleType:
|
|
6074
|
+
listStyleType: R = "",
|
|
6077
6075
|
center: U = !1,
|
|
6078
6076
|
spacing: v = "md",
|
|
6079
6077
|
type: P = "none",
|
|
@@ -6090,7 +6088,7 @@ function Sc(e) {
|
|
|
6090
6088
|
}
|
|
6091
6089
|
} = e, [j, J] = k(m || -1), [ee, Se] = k(0), [de, oe] = k([]), we = {
|
|
6092
6090
|
root: {
|
|
6093
|
-
listStyleType:
|
|
6091
|
+
listStyleType: R,
|
|
6094
6092
|
color: r === "dark" ? t.colors.dark[0] : t.black,
|
|
6095
6093
|
margin: 0,
|
|
6096
6094
|
paddingLeft: A ? t.spacing.xl : 0,
|
|
@@ -6125,7 +6123,7 @@ function Sc(e) {
|
|
|
6125
6123
|
m === void 0 && J(he), d && d(he, Ue);
|
|
6126
6124
|
};
|
|
6127
6125
|
G(() => {
|
|
6128
|
-
V && V instanceof
|
|
6126
|
+
V && V instanceof sn && j >= 0 && V.getCurrentIndex() !== j && !V.isEmpty() && V.gotoRecord(j);
|
|
6129
6127
|
}, [j]);
|
|
6130
6128
|
const Q = (he) => {
|
|
6131
6129
|
const Ue = {
|
|
@@ -6133,7 +6131,7 @@ function Sc(e) {
|
|
|
6133
6131
|
37: () => le(),
|
|
6134
6132
|
40: () => Ce(),
|
|
6135
6133
|
39: () => be(),
|
|
6136
|
-
33: () =>
|
|
6134
|
+
33: () => $(),
|
|
6137
6135
|
34: () => xe(),
|
|
6138
6136
|
36: () => ce(),
|
|
6139
6137
|
35: () => se()
|
|
@@ -6144,26 +6142,26 @@ function Sc(e) {
|
|
|
6144
6142
|
}
|
|
6145
6143
|
}, ie = () => {
|
|
6146
6144
|
const he = j;
|
|
6147
|
-
he - 1 >= 0 && Z(he - 1,
|
|
6145
|
+
he - 1 >= 0 && Z(he - 1, $e(he - 1));
|
|
6148
6146
|
}, le = () => {
|
|
6149
6147
|
ie();
|
|
6150
6148
|
}, Ce = () => {
|
|
6151
6149
|
const he = j;
|
|
6152
|
-
he + 1 < de.length && Z(he + 1,
|
|
6150
|
+
he + 1 < de.length && Z(he + 1, $e(he + 1));
|
|
6153
6151
|
}, be = () => {
|
|
6154
6152
|
Ce();
|
|
6155
|
-
},
|
|
6153
|
+
}, $ = () => {
|
|
6156
6154
|
const he = Math.max(j - 5, 0);
|
|
6157
|
-
Z(he,
|
|
6155
|
+
Z(he, $e(he));
|
|
6158
6156
|
}, xe = () => {
|
|
6159
6157
|
const he = Math.min(j + 5, de.length - 1);
|
|
6160
|
-
Z(he,
|
|
6158
|
+
Z(he, $e(he));
|
|
6161
6159
|
}, ce = () => {
|
|
6162
|
-
Z(0,
|
|
6160
|
+
Z(0, $e(0));
|
|
6163
6161
|
}, se = () => {
|
|
6164
6162
|
const he = de.length - 1;
|
|
6165
|
-
Z(he,
|
|
6166
|
-
},
|
|
6163
|
+
Z(he, $e(he));
|
|
6164
|
+
}, Re = (he) => he.browseRecords().map((Pe, Ye) => {
|
|
6167
6165
|
if (!Pe)
|
|
6168
6166
|
return null;
|
|
6169
6167
|
let ge = !0;
|
|
@@ -6198,7 +6196,7 @@ function Sc(e) {
|
|
|
6198
6196
|
Ke || (Ke = `${re}_${Ye}`);
|
|
6199
6197
|
const Je = `${re}_${Ye}`;
|
|
6200
6198
|
return /* @__PURE__ */ n(
|
|
6201
|
-
|
|
6199
|
+
pn,
|
|
6202
6200
|
{
|
|
6203
6201
|
disabled: Pe.disabled || S,
|
|
6204
6202
|
id: Ke,
|
|
@@ -6226,21 +6224,21 @@ function Sc(e) {
|
|
|
6226
6224
|
}
|
|
6227
6225
|
}
|
|
6228
6226
|
return null;
|
|
6229
|
-
}),
|
|
6227
|
+
}), $e = (he) => {
|
|
6230
6228
|
let Ue;
|
|
6231
6229
|
return de.forEach((Pe) => {
|
|
6232
6230
|
Pe.props.index === he && (Ue = Pe.props.recordData);
|
|
6233
6231
|
}), Ue;
|
|
6234
6232
|
}, Ne = () => He.Children.toArray(z).map((he, Ue) => {
|
|
6235
6233
|
if (he.props.visible && he.type && he.type.componentName !== "ArchbaseListItem")
|
|
6236
|
-
throw new
|
|
6234
|
+
throw new ln(
|
|
6237
6235
|
"Apenas componentes do tipo ArchbaseListItem podem ser usados como filhos de ArchbaseList."
|
|
6238
6236
|
);
|
|
6239
6237
|
if (!he.id)
|
|
6240
|
-
throw new
|
|
6238
|
+
throw new ln("Todos os itens da lista devem conter um ID.");
|
|
6241
6239
|
let Pe = he.active;
|
|
6242
6240
|
return j >= 0 && (Pe = !1, j === Ue && (Pe = !0)), /* @__PURE__ */ n(
|
|
6243
|
-
|
|
6241
|
+
pn,
|
|
6244
6242
|
{
|
|
6245
6243
|
disabled: he.disabled || S,
|
|
6246
6244
|
id: he.id,
|
|
@@ -6268,7 +6266,7 @@ function Sc(e) {
|
|
|
6268
6266
|
});
|
|
6269
6267
|
return G(() => {
|
|
6270
6268
|
if (V) {
|
|
6271
|
-
const he =
|
|
6269
|
+
const he = Re(V);
|
|
6272
6270
|
oe(he), te.isDataSourceV2 || ne();
|
|
6273
6271
|
} else if (z) {
|
|
6274
6272
|
const he = Ne();
|
|
@@ -6364,13 +6362,13 @@ const us = ({
|
|
|
6364
6362
|
}, [m, e, t]), W = Ge(() => {
|
|
6365
6363
|
if (t.selectable)
|
|
6366
6364
|
return m ? /* @__PURE__ */ n(Ae, { onClick: B, variant: "transparent", children: /* @__PURE__ */ n(Fa, { size: "1.2rem", style: H }) }) : /* @__PURE__ */ n(Ae, { onClick: B, variant: "transparent", children: /* @__PURE__ */ n(Ba, { size: "1.2rem", style: H }) });
|
|
6367
|
-
}, [t.selectable, m, H, B]), z = Ge(() => g ? e.state?.loading === !0 ? /* @__PURE__ */ n("i", { style: { ...H, width: "1rem" }, className: "svg-inline--fa fa-spinner fa-w-16 fa-spin fa-lg" }) : /* @__PURE__ */ n(Ae, { onClick: D, variant: "transparent", children: /* @__PURE__ */ n(
|
|
6365
|
+
}, [t.selectable, m, H, B]), z = Ge(() => g ? e.state?.loading === !0 ? /* @__PURE__ */ n("i", { style: { ...H, width: "1rem" }, className: "svg-inline--fa fa-spinner fa-w-16 fa-spin fa-lg" }) : /* @__PURE__ */ n(Ae, { onClick: D, variant: "transparent", children: /* @__PURE__ */ n(cn, { size: "1.2rem", style: { ...H } }) }) : /* @__PURE__ */ n(Ae, { onClick: D, variant: "transparent", children: /* @__PURE__ */ n(Gr, { size: "1.2rem", style: { ...H } }) }), [g, m, e, H, D, B]), A = Ge(() => {
|
|
6368
6366
|
const U = l();
|
|
6369
6367
|
return U && U.id === e.id ? {
|
|
6370
6368
|
color: t.focusedColor,
|
|
6371
6369
|
backgroundColor: t.focusedBackgroundColor
|
|
6372
6370
|
} : {};
|
|
6373
|
-
}, [e.id, l, t.focusedColor, t.focusedBackgroundColor, g, m]),
|
|
6371
|
+
}, [e.id, l, t.focusedColor, t.focusedBackgroundColor, g, m]), R = Ge(() => {
|
|
6374
6372
|
const U = [];
|
|
6375
6373
|
return e.nodes && e.state.expanded && e.nodes.forEach((v) => {
|
|
6376
6374
|
U.push(
|
|
@@ -6423,7 +6421,7 @@ const us = ({
|
|
|
6423
6421
|
f ? f(e) : /* @__PURE__ */ n(K, { truncate: !0, children: e.text })
|
|
6424
6422
|
] })
|
|
6425
6423
|
] }),
|
|
6426
|
-
/* @__PURE__ */ n("ul", { children:
|
|
6424
|
+
/* @__PURE__ */ n("ul", { children: R })
|
|
6427
6425
|
] }, `${t.id}_${e.id}`);
|
|
6428
6426
|
}, Ac = ({
|
|
6429
6427
|
id: e,
|
|
@@ -6453,7 +6451,7 @@ const us = ({
|
|
|
6453
6451
|
onRemovedNode: W,
|
|
6454
6452
|
onLoadDataSource: z,
|
|
6455
6453
|
onAddedNode: A,
|
|
6456
|
-
onExpandedNode:
|
|
6454
|
+
onExpandedNode: R,
|
|
6457
6455
|
onCollapsedNode: U,
|
|
6458
6456
|
onChangedDataSource: v,
|
|
6459
6457
|
dataSource: P,
|
|
@@ -6542,7 +6540,7 @@ const us = ({
|
|
|
6542
6540
|
N.push(...fe);
|
|
6543
6541
|
}
|
|
6544
6542
|
return N;
|
|
6545
|
-
},
|
|
6543
|
+
}, $ = T(
|
|
6546
6544
|
(ge, N) => {
|
|
6547
6545
|
const ae = [], fe = [...C], Te = re(fe, ge);
|
|
6548
6546
|
Te && Te.state && (E && N && ie(fe), Te.state.selected = N, ae.push(Te), w && !E && ae.push(...Q(Te.nodes || [], N)), j(fe), v && v(fe), N === !0 ? X && X(fe, Te, be(fe)) : H && H(fe, Te, be(fe)));
|
|
@@ -6575,10 +6573,10 @@ const us = ({
|
|
|
6575
6573
|
const ae = [...C], fe = [], Te = re(ae, ge);
|
|
6576
6574
|
if (Te && Te.state) {
|
|
6577
6575
|
let qe = !Te.nodes && !Te.isleaf;
|
|
6578
|
-
!z && qe && (qe = !1), Te.state.expanded = N, Te.state.loading = qe, fe.push(Te), j(ae), v && v(ae), N === !0 ?
|
|
6576
|
+
!z && qe && (qe = !1), Te.state.expanded = N, Te.state.loading = qe, fe.push(Te), j(ae), v && v(ae), N === !0 ? R && R(ae, fe) : U && U(ae, fe), qe && xe(Te.id);
|
|
6579
6577
|
}
|
|
6580
6578
|
},
|
|
6581
|
-
[C, v, z, xe,
|
|
6579
|
+
[C, v, z, xe, R, U]
|
|
6582
6580
|
), se = T(
|
|
6583
6581
|
(ge) => {
|
|
6584
6582
|
V && J && V(J);
|
|
@@ -6586,7 +6584,7 @@ const us = ({
|
|
|
6586
6584
|
N && (ee(N), B && B(N));
|
|
6587
6585
|
},
|
|
6588
6586
|
[C, J, B, V]
|
|
6589
|
-
),
|
|
6587
|
+
), Re = T(() => J, [J]), $e = T(
|
|
6590
6588
|
(ge, N) => {
|
|
6591
6589
|
if (D) {
|
|
6592
6590
|
const ae = re(C, ge);
|
|
@@ -6679,7 +6677,7 @@ const us = ({
|
|
|
6679
6677
|
const N = re(C, J.id);
|
|
6680
6678
|
if (N) {
|
|
6681
6679
|
let ae = !0;
|
|
6682
|
-
N.state.selected && (ae = !N.state.selected),
|
|
6680
|
+
N.state.selected && (ae = !N.state.selected), $(N.id, ae);
|
|
6683
6681
|
}
|
|
6684
6682
|
} else if (ge.keyCode === 107) {
|
|
6685
6683
|
ge.preventDefault();
|
|
@@ -6698,7 +6696,7 @@ const us = ({
|
|
|
6698
6696
|
Se.current,
|
|
6699
6697
|
te,
|
|
6700
6698
|
ne,
|
|
6701
|
-
|
|
6699
|
+
$,
|
|
6702
6700
|
ce
|
|
6703
6701
|
]
|
|
6704
6702
|
);
|
|
@@ -6719,12 +6717,12 @@ const us = ({
|
|
|
6719
6717
|
id: `${e}_${ge.id}`,
|
|
6720
6718
|
node: ge,
|
|
6721
6719
|
level: 1,
|
|
6722
|
-
onSelectedStatusChanged:
|
|
6720
|
+
onSelectedStatusChanged: $,
|
|
6723
6721
|
onExpandedCollapsedChanged: ce,
|
|
6724
6722
|
onFocusedChanged: se,
|
|
6725
|
-
onNodeDoubleClicked:
|
|
6723
|
+
onNodeDoubleClicked: $e,
|
|
6726
6724
|
onLoadDataSource: xe,
|
|
6727
|
-
getFocused:
|
|
6725
|
+
getFocused: Re,
|
|
6728
6726
|
addNode: Ne,
|
|
6729
6727
|
removeNode: he,
|
|
6730
6728
|
customRenderText: _,
|
|
@@ -6769,12 +6767,12 @@ const us = ({
|
|
|
6769
6767
|
g,
|
|
6770
6768
|
y,
|
|
6771
6769
|
m,
|
|
6772
|
-
|
|
6770
|
+
$,
|
|
6773
6771
|
ce,
|
|
6774
6772
|
se,
|
|
6775
|
-
Re,
|
|
6776
|
-
xe,
|
|
6777
6773
|
$e,
|
|
6774
|
+
xe,
|
|
6775
|
+
Re,
|
|
6778
6776
|
Ne,
|
|
6779
6777
|
he,
|
|
6780
6778
|
oe
|
|
@@ -6835,7 +6833,7 @@ const us = ({
|
|
|
6835
6833
|
onFocusEnter: W,
|
|
6836
6834
|
onFocusExit: z,
|
|
6837
6835
|
onDropdownOpen: A,
|
|
6838
|
-
onDropdownClose:
|
|
6836
|
+
onDropdownClose: R
|
|
6839
6837
|
}, U) => {
|
|
6840
6838
|
const v = Zt(), [P, M] = k(a), [O, I] = k(!1), [x, _] = k(w);
|
|
6841
6839
|
Ze(
|
|
@@ -6857,14 +6855,14 @@ const us = ({
|
|
|
6857
6855
|
if (Se(Q)) {
|
|
6858
6856
|
(x || L) && (_(void 0), S?.clearError(F));
|
|
6859
6857
|
const le = X(Q);
|
|
6860
|
-
ee(le, Q), I(!1),
|
|
6858
|
+
ee(le, Q), I(!1), R && R();
|
|
6861
6859
|
}
|
|
6862
|
-
}, [Se, ee,
|
|
6860
|
+
}, [Se, ee, R, X, x, L, S, F]), oe = T(() => {
|
|
6863
6861
|
if (r || i)
|
|
6864
6862
|
return;
|
|
6865
6863
|
const Q = !O;
|
|
6866
|
-
I(Q), Q && A ? A() : !Q &&
|
|
6867
|
-
}, [r, i, O, A,
|
|
6864
|
+
I(Q), Q && A ? A() : !Q && R && R();
|
|
6865
|
+
}, [r, i, O, A, R]), we = T(
|
|
6868
6866
|
(Q) => {
|
|
6869
6867
|
Q.type === q.onFieldError && Q.fieldName === t && (_(Q.error), S?.setError(F, Q.error));
|
|
6870
6868
|
},
|
|
@@ -6896,7 +6894,7 @@ const us = ({
|
|
|
6896
6894
|
closeOnEscape: !0,
|
|
6897
6895
|
clickOutsideEvents: ["mouseup", "touchend"],
|
|
6898
6896
|
onClose: () => {
|
|
6899
|
-
I(!1),
|
|
6897
|
+
I(!1), R && R();
|
|
6900
6898
|
},
|
|
6901
6899
|
children: [
|
|
6902
6900
|
/* @__PURE__ */ n(Ct.Target, { children: /* @__PURE__ */ n(
|
|
@@ -6932,7 +6930,7 @@ const us = ({
|
|
|
6932
6930
|
},
|
|
6933
6931
|
children: o ? /* @__PURE__ */ b(Ie, { justify: "space-between", wrap: "nowrap", children: [
|
|
6934
6932
|
/* @__PURE__ */ b(Ie, { gap: "sm", wrap: "nowrap", children: [
|
|
6935
|
-
/* @__PURE__ */ n(
|
|
6933
|
+
/* @__PURE__ */ n(on, { size: "xs" }),
|
|
6936
6934
|
/* @__PURE__ */ n(
|
|
6937
6935
|
K,
|
|
6938
6936
|
{
|
|
@@ -6943,7 +6941,7 @@ const us = ({
|
|
|
6943
6941
|
}
|
|
6944
6942
|
)
|
|
6945
6943
|
] }),
|
|
6946
|
-
/* @__PURE__ */ n(
|
|
6944
|
+
/* @__PURE__ */ n(on, { size: "xs" })
|
|
6947
6945
|
] }) : B && J ? B(J) : /* @__PURE__ */ b(Ie, { justify: "space-between", wrap: "nowrap", children: [
|
|
6948
6946
|
/* @__PURE__ */ b(Ie, { gap: "sm", wrap: "nowrap", children: [
|
|
6949
6947
|
p,
|
|
@@ -6973,7 +6971,7 @@ const us = ({
|
|
|
6973
6971
|
},
|
|
6974
6972
|
onBlur: (Q) => {
|
|
6975
6973
|
const ie = Q.relatedTarget, le = Q.currentTarget;
|
|
6976
|
-
(!ie || !le.contains(ie)) && O && (I(!1),
|
|
6974
|
+
(!ie || !le.contains(ie)) && O && (I(!1), R && R());
|
|
6977
6975
|
},
|
|
6978
6976
|
children: /* @__PURE__ */ n(
|
|
6979
6977
|
Ac,
|
|
@@ -7015,7 +7013,7 @@ const Ic = (e) => !e || e === "" ? [] : e.split(";").map((t) => {
|
|
|
7015
7013
|
days: r.split(",").filter((o) => o),
|
|
7016
7014
|
timeRange: i
|
|
7017
7015
|
};
|
|
7018
|
-
}),
|
|
7016
|
+
}), Rc = [
|
|
7019
7017
|
{ value: "1", label: "Segunda-feira" },
|
|
7020
7018
|
{ value: "2", label: "Terça-feira" },
|
|
7021
7019
|
{ value: "3", label: "Quarta-feira" },
|
|
@@ -7023,7 +7021,7 @@ const Ic = (e) => !e || e === "" ? [] : e.split(";").map((t) => {
|
|
|
7023
7021
|
{ value: "5", label: "Sexta-feira" },
|
|
7024
7022
|
{ value: "6", label: "Sábado" },
|
|
7025
7023
|
{ value: "7", label: "Domingo" }
|
|
7026
|
-
],
|
|
7024
|
+
], $c = [
|
|
7027
7025
|
{ value: "MONDAY", label: "Seg" },
|
|
7028
7026
|
{ value: "TUESDAY", label: "Ter" },
|
|
7029
7027
|
{ value: "WEDNESDAY", label: "Qua" },
|
|
@@ -7071,7 +7069,7 @@ function jf({
|
|
|
7071
7069
|
/* @__PURE__ */ n(
|
|
7072
7070
|
Mo,
|
|
7073
7071
|
{
|
|
7074
|
-
data:
|
|
7072
|
+
data: Rc,
|
|
7075
7073
|
value: s,
|
|
7076
7074
|
onChange: l,
|
|
7077
7075
|
placeholder: "Selecione os dias",
|
|
@@ -7114,7 +7112,7 @@ function jf({
|
|
|
7114
7112
|
),
|
|
7115
7113
|
u.map((g, y) => /* @__PURE__ */ n(ye, { mt: 2, children: /* @__PURE__ */ b(Ie, { justify: "space-between", children: [
|
|
7116
7114
|
/* @__PURE__ */ b(Ie, { wrap: "nowrap", children: [
|
|
7117
|
-
/* @__PURE__ */ n(K, { fw: 700, size: "12px", children: g.days.map((m) =>
|
|
7115
|
+
/* @__PURE__ */ n(K, { fw: 700, size: "12px", children: g.days.map((m) => $c.find((w) => w.value === m)?.label || "Dia desconhecido").join(",") }),
|
|
7118
7116
|
/* @__PURE__ */ n(K, { size: "12px", fw: 700, color: "blue", children: g.timeRange })
|
|
7119
7117
|
] }),
|
|
7120
7118
|
/* @__PURE__ */ n(
|
|
@@ -7197,9 +7195,9 @@ const Hf = ({ targetDate: e, color: t }) => {
|
|
|
7197
7195
|
}, p = (y) => {
|
|
7198
7196
|
c(y);
|
|
7199
7197
|
}, g = [
|
|
7200
|
-
|
|
7201
|
-
|
|
7202
|
-
|
|
7198
|
+
Nn.jpeg,
|
|
7199
|
+
Nn.png,
|
|
7200
|
+
Nn.pdf,
|
|
7203
7201
|
"application/msword",
|
|
7204
7202
|
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
7205
7203
|
"application/vnd.ms-excel",
|
|
@@ -7398,7 +7396,7 @@ function Gf({
|
|
|
7398
7396
|
""
|
|
7399
7397
|
);
|
|
7400
7398
|
process.env.NODE_ENV;
|
|
7401
|
-
const z = it(), A = `${t}`,
|
|
7399
|
+
const z = it(), A = `${t}`, R = z?.getError(A), [U, v] = k(p || ""), P = ue(null), M = Mt(), { colorScheme: O } = Lt(), [I, x] = k(c), _ = nt();
|
|
7402
7400
|
G(() => {
|
|
7403
7401
|
c !== void 0 && c !== I && x(c);
|
|
7404
7402
|
}, [c]);
|
|
@@ -7429,7 +7427,7 @@ function Gf({
|
|
|
7429
7427
|
const J = (re) => {
|
|
7430
7428
|
re.preventDefault();
|
|
7431
7429
|
const te = re.target.value;
|
|
7432
|
-
re.persist(), (I ||
|
|
7430
|
+
re.persist(), (I || R) && (x(void 0), z?.clearError(A)), v((Z) => te), e && !e.isBrowsing() && t && e.getFieldValue(t) !== te && W.handleValueChange(te), V && V(te, re);
|
|
7433
7431
|
}, ee = (re) => {
|
|
7434
7432
|
D && D(re);
|
|
7435
7433
|
}, Se = (re) => {
|
|
@@ -7455,7 +7453,7 @@ function Gf({
|
|
|
7455
7453
|
disabled: r || de(),
|
|
7456
7454
|
children: g || /* @__PURE__ */ n(wr, { size: "1rem", stroke: 1.5 })
|
|
7457
7455
|
}
|
|
7458
|
-
) }) : null, ze = w ? we : H ? oe : null, ve = I ||
|
|
7456
|
+
) }) : null, ze = w ? we : H ? oe : null, ve = I || R;
|
|
7459
7457
|
return /* @__PURE__ */ n(
|
|
7460
7458
|
jr,
|
|
7461
7459
|
{
|
|
@@ -7506,7 +7504,7 @@ function qf({
|
|
|
7506
7504
|
imageQuality: D = 0.95,
|
|
7507
7505
|
...B
|
|
7508
7506
|
}) {
|
|
7509
|
-
const [V, X] = k(void 0), [H, W] = k(void 0), [z, A] = k(void 0), [
|
|
7507
|
+
const [V, X] = k(void 0), [H, W] = k(void 0), [z, A] = k(void 0), [R, U] = k(!1), [v, P] = k({ x: 0, y: 0 }), [M, O] = k(f), [I, x] = k(0), [_, S] = k(null), F = ue(null), L = ue(null), C = ue(null), [j, J] = k(u), [ee, Se] = k(""), de = nt(), oe = Zt(), [we, ze] = k(!1), { t: ve } = Xe(), re = Ze(
|
|
7510
7508
|
"ArchbaseAvatarEdit",
|
|
7511
7509
|
r,
|
|
7512
7510
|
i,
|
|
@@ -7539,7 +7537,7 @@ function qf({
|
|
|
7539
7537
|
}, [r, i, be, ie]), lt(() => {
|
|
7540
7538
|
Q();
|
|
7541
7539
|
}, []);
|
|
7542
|
-
const
|
|
7540
|
+
const $ = (N) => {
|
|
7543
7541
|
(j || Z) && (J(void 0), te?.clearError(ne));
|
|
7544
7542
|
const fe = N;
|
|
7545
7543
|
if (X((Te) => fe), W(fe), r && !r.isBrowsing() && i && r.getFieldValue(i) !== fe) {
|
|
@@ -7556,11 +7554,11 @@ function qf({
|
|
|
7556
7554
|
A(H), W(fe.result), U(!0), P({ x: 0, y: 0 }), O(f), x(0);
|
|
7557
7555
|
}, fe.readAsDataURL(ae), N.target.value = "";
|
|
7558
7556
|
}
|
|
7559
|
-
},
|
|
7557
|
+
}, Re = () => {
|
|
7560
7558
|
if (xe() || o)
|
|
7561
7559
|
return;
|
|
7562
|
-
(j || Z) && (J(void 0), te?.clearError(ne)), W(void 0),
|
|
7563
|
-
},
|
|
7560
|
+
(j || Z) && (J(void 0), te?.clearError(ne)), W(void 0), $(void 0);
|
|
7561
|
+
}, $e = (N, ae) => {
|
|
7564
7562
|
S(ae);
|
|
7565
7563
|
}, Ne = () => {
|
|
7566
7564
|
U(!1), W(z);
|
|
@@ -7613,7 +7611,7 @@ function qf({
|
|
|
7613
7611
|
})}`);
|
|
7614
7612
|
return;
|
|
7615
7613
|
}
|
|
7616
|
-
|
|
7614
|
+
$(fe), U(!1), A(void 0), Se("");
|
|
7617
7615
|
} catch (N) {
|
|
7618
7616
|
Se(`Error cropping the image: ${N}`);
|
|
7619
7617
|
}
|
|
@@ -7693,7 +7691,7 @@ function qf({
|
|
|
7693
7691
|
size: "lg",
|
|
7694
7692
|
color: "red",
|
|
7695
7693
|
variant: m,
|
|
7696
|
-
onClick:
|
|
7694
|
+
onClick: Re,
|
|
7697
7695
|
children: /* @__PURE__ */ n(qt, { color: oe.colors.red[4] })
|
|
7698
7696
|
}
|
|
7699
7697
|
) })
|
|
@@ -7739,7 +7737,7 @@ function qf({
|
|
|
7739
7737
|
/* @__PURE__ */ b(
|
|
7740
7738
|
Jt,
|
|
7741
7739
|
{
|
|
7742
|
-
opened:
|
|
7740
|
+
opened: R,
|
|
7743
7741
|
onClose: Ne,
|
|
7744
7742
|
size: "lg",
|
|
7745
7743
|
children: [
|
|
@@ -7759,7 +7757,7 @@ function qf({
|
|
|
7759
7757
|
cropShape: "round",
|
|
7760
7758
|
showGrid: !1,
|
|
7761
7759
|
onCropChange: P,
|
|
7762
|
-
onCropComplete:
|
|
7760
|
+
onCropComplete: $e,
|
|
7763
7761
|
onZoomChange: O,
|
|
7764
7762
|
onRotationChange: x,
|
|
7765
7763
|
ref: C
|
|
@@ -7777,9 +7775,9 @@ function qf({
|
|
|
7777
7775
|
),
|
|
7778
7776
|
/* @__PURE__ */ b(We, { gap: "xs", mt: "md", children: [
|
|
7779
7777
|
/* @__PURE__ */ n(Ie, { justify: "space-between", children: /* @__PURE__ */ b(ye, { style: { flex: 1 }, children: [
|
|
7780
|
-
/* @__PURE__ */ n(je, { label: "Zoom", children: /* @__PURE__ */ n(
|
|
7778
|
+
/* @__PURE__ */ n(je, { label: "Zoom", children: /* @__PURE__ */ n(yn, { size: 20 }) }),
|
|
7781
7779
|
/* @__PURE__ */ n(
|
|
7782
|
-
|
|
7780
|
+
Un,
|
|
7783
7781
|
{
|
|
7784
7782
|
value: M,
|
|
7785
7783
|
onChange: O,
|
|
@@ -7794,7 +7792,7 @@ function qf({
|
|
|
7794
7792
|
/* @__PURE__ */ n(Ie, { justify: "space-between", children: /* @__PURE__ */ b(ye, { style: { flex: 1 }, children: [
|
|
7795
7793
|
/* @__PURE__ */ n(je, { label: `${ve("archbase:Rotation")}`, children: /* @__PURE__ */ n(ui, { size: 20 }) }),
|
|
7796
7794
|
/* @__PURE__ */ n(
|
|
7797
|
-
|
|
7795
|
+
Un,
|
|
7798
7796
|
{
|
|
7799
7797
|
value: I,
|
|
7800
7798
|
onChange: x,
|
|
@@ -7926,7 +7924,7 @@ function Yf({ actions: e, variant: t, customComponents: r, options: i }) {
|
|
|
7926
7924
|
ga(() => {
|
|
7927
7925
|
A();
|
|
7928
7926
|
}, [e, p, A]);
|
|
7929
|
-
function
|
|
7927
|
+
function R(v) {
|
|
7930
7928
|
v.enabled && v.executeAction();
|
|
7931
7929
|
}
|
|
7932
7930
|
function U() {
|
|
@@ -7961,7 +7959,7 @@ function Yf({ actions: e, variant: t, customComponents: r, options: i }) {
|
|
|
7961
7959
|
action: v,
|
|
7962
7960
|
options: i,
|
|
7963
7961
|
variant: t,
|
|
7964
|
-
handleExecuteAction:
|
|
7962
|
+
handleExecuteAction: R,
|
|
7965
7963
|
customComponents: r
|
|
7966
7964
|
})
|
|
7967
7965
|
) })
|
|
@@ -7991,7 +7989,7 @@ function Yf({ actions: e, variant: t, customComponents: r, options: i }) {
|
|
|
7991
7989
|
action: v,
|
|
7992
7990
|
options: i,
|
|
7993
7991
|
variant: t,
|
|
7994
|
-
handleExecuteAction:
|
|
7992
|
+
handleExecuteAction: R,
|
|
7995
7993
|
customComponents: r
|
|
7996
7994
|
},
|
|
7997
7995
|
D,
|
|
@@ -8023,7 +8021,7 @@ function Qf({
|
|
|
8023
8021
|
verticalLineStrokeWidth: g = 2,
|
|
8024
8022
|
verticalLineStrokeOpacity: y = 1
|
|
8025
8023
|
}) {
|
|
8026
|
-
const { colorScheme: m } = Lt(), w = Mt(), [E, D] = k({}), [B, V] = k(0), [X, H] = k(0), [W, z] = k(0), [A,
|
|
8024
|
+
const { colorScheme: m } = Lt(), w = Mt(), [E, D] = k({}), [B, V] = k(0), [X, H] = k(0), [W, z] = k(0), [A, R] = k(/* @__PURE__ */ new Date()), [U, v] = k(/* @__PURE__ */ new Date()), [P, M] = k(""), O = { top: 20, right: 20, bottom: 30, left: 150 }, { ref: I, width: x, height: _ } = Fo();
|
|
8027
8025
|
function S() {
|
|
8028
8026
|
const de = "0123456789ABCDEF";
|
|
8029
8027
|
let oe = "#";
|
|
@@ -8040,24 +8038,24 @@ function Qf({
|
|
|
8040
8038
|
function C(de) {
|
|
8041
8039
|
const oe = bt.select(`#timeline-chart-${P}`), we = +Ir(oe.attr("width")) - O.left - O.right, ze = +Ir(oe.attr("height")) - O.top - O.bottom;
|
|
8042
8040
|
oe.selectAll("*").remove();
|
|
8043
|
-
const ve = bt.min(de, (
|
|
8041
|
+
const ve = bt.min(de, ($) => $.startTime) || /* @__PURE__ */ new Date(), re = bt.max(de, ($) => $.endTime) || /* @__PURE__ */ new Date(), te = bt.scaleTime().domain([
|
|
8044
8042
|
new Date(ve).setMilliseconds(0),
|
|
8045
8043
|
new Date(Math.ceil(re.getTime() / 1e3) * 1e3)
|
|
8046
|
-
]).range([0, we > 0 ? we : 0]), ne = bt.scaleBand().rangeRound([0, ze]).padding(0.1).domain(de.map((
|
|
8047
|
-
V(ne.domain().length),
|
|
8044
|
+
]).range([0, we > 0 ? we : 0]), ne = bt.scaleBand().rangeRound([0, ze]).padding(0.1).domain(de.map(($) => $.type));
|
|
8045
|
+
V(ne.domain().length), R(te.domain()[0]), v(te.domain()[1]);
|
|
8048
8046
|
const Z = oe.append("g").attr("transform", `translate(${O.left},${O.top})`), Q = (U.getTime() - A.getTime()) / 1e3 * c;
|
|
8049
|
-
Z.append("g").attr("class", "axis axis--x").call(bt.axisTop(te).tickFormat(ee).ticks(Q)).selectAll("text").attr("transform", function(
|
|
8047
|
+
Z.append("g").attr("class", "axis axis--x").call(bt.axisTop(te).tickFormat(ee).ticks(Q)).selectAll("text").attr("transform", function($) {
|
|
8050
8048
|
return `rotate(${f})`;
|
|
8051
|
-
}), d && j(Z, te, ze, Q), Z.append("g").attr("class", "axis axis--y").call(bt.axisLeft(ne)), Z.selectAll(".bar").data(de).enter().append("rect").attr("class", "bar").attr("x", (
|
|
8049
|
+
}), d && j(Z, te, ze, Q), Z.append("g").attr("class", "axis axis--y").call(bt.axisLeft(ne)), Z.selectAll(".bar").data(de).enter().append("rect").attr("class", "bar").attr("x", ($) => te($.startTime)).attr("y", ($) => ne($.type)).attr("width", ($) => te($.endTime) - te($.startTime)).attr("height", ne.bandwidth()).style("fill", ($) => F($.type)).style("z-index", 800).on("mouseover", function($, xe) {
|
|
8052
8050
|
bt.select(`#tooltip-${P}`).style("visibility", "visible").html(`Item: ${xe.type}<br>Início: ${Se(xe.startTime)}<br>Fim: ${Se(xe.endTime)}`);
|
|
8053
|
-
}).on("mousemove", function(
|
|
8054
|
-
bt.select(`#tooltip-${P}`).style("top",
|
|
8051
|
+
}).on("mousemove", function($) {
|
|
8052
|
+
bt.select(`#tooltip-${P}`).style("top", $.pageY < _ / 2 ? $.pageY - 10 + "px" : $.pageY - 150 + "px").style("left", $.pageX < x / 2 ? $.pageX + 10 + "px" : $.pageX - 240 + "px");
|
|
8055
8053
|
}).on("mouseout", function() {
|
|
8056
8054
|
bt.select(`#tooltip-${P}`).style("visibility", "hidden");
|
|
8057
|
-
}), de.forEach((
|
|
8058
|
-
const ce = `${((
|
|
8059
|
-
Z.append("rect").attr("x",
|
|
8060
|
-
}), Z.selectAll(".text").data(de).enter().append("text").attr("x", (
|
|
8055
|
+
}), de.forEach(($) => {
|
|
8056
|
+
const ce = `${(($.endTime.getTime() - $.startTime.getTime()) / 1e3).toFixed(s)}s`.length * 6 + 10, se = 20, Re = te($.startTime) + (te($.endTime) - te($.startTime)) / 2 - ce / 2, $e = ne($.type) + ne.bandwidth() / 2 - se / 2;
|
|
8057
|
+
Z.append("rect").attr("x", Re).attr("y", $e).attr("width", ce).attr("height", se).attr("fill", "white").attr("stroke", "black").attr("stroke-width", "0.5").attr("rx", 5).attr("ry", 5);
|
|
8058
|
+
}), Z.selectAll(".text").data(de).enter().append("text").attr("x", ($) => te($.startTime) + (te($.endTime) - te($.startTime)) / 2).attr("y", ($) => ne($.type) + ne.bandwidth() / 2).attr("dy", ".35em").attr("text-anchor", "middle").text(($) => `${(($.endTime.getTime() - $.startTime.getTime()) / 1e3).toFixed(s)}s`).style("fill", "#000").style("font-size", "12px");
|
|
8061
8059
|
const le = oe.select(".axis--x").node().getBBox();
|
|
8062
8060
|
z(le.height);
|
|
8063
8061
|
const be = oe.select(".axis--y").node().getBBox();
|
|
@@ -8098,7 +8096,7 @@ function Qf({
|
|
|
8098
8096
|
(oe) => xt(oe.endTime).isBefore(a) || xt(oe.endTime).isSame(a)
|
|
8099
8097
|
)), C(de);
|
|
8100
8098
|
}
|
|
8101
|
-
}, [e, X]), /* @__PURE__ */ b(
|
|
8099
|
+
}, [e, X]), /* @__PURE__ */ b(Rt, { ref: I, w: r || "100%", h: i || "100%", children: [
|
|
8102
8100
|
/* @__PURE__ */ n(
|
|
8103
8101
|
"svg",
|
|
8104
8102
|
{
|
|
@@ -8231,7 +8229,7 @@ function Uc({
|
|
|
8231
8229
|
groupColor: W,
|
|
8232
8230
|
disabled: z = !1,
|
|
8233
8231
|
loading: A,
|
|
8234
|
-
error:
|
|
8232
|
+
error: R,
|
|
8235
8233
|
noData: U,
|
|
8236
8234
|
onLoad: v,
|
|
8237
8235
|
onError: P,
|
|
@@ -8286,10 +8284,10 @@ function Uc({
|
|
|
8286
8284
|
const ie = await import("vis-timeline"), { Timeline: le } = ie, Ce = ie.DataSet || ie.default?.DataSet;
|
|
8287
8285
|
if (!Z || !S.current)
|
|
8288
8286
|
return;
|
|
8289
|
-
const be = new Ce(oe),
|
|
8287
|
+
const be = new Ce(oe), $ = we ? new Ce(we) : void 0, xe = new le(
|
|
8290
8288
|
S.current,
|
|
8291
8289
|
be,
|
|
8292
|
-
|
|
8290
|
+
$ ? { groups: $, ...de } : de,
|
|
8293
8291
|
ze ? { start: ze[0], end: ze[1] } : void 0
|
|
8294
8292
|
);
|
|
8295
8293
|
F.current = xe, x && (typeof x == "function" ? x(xe) : "current" in x && (x.current = xe)), xe.on("select", (ce) => {
|
|
@@ -8354,14 +8352,14 @@ function Uc({
|
|
|
8354
8352
|
typeof A == "string" ? /* @__PURE__ */ n(K, { children: A }) : A
|
|
8355
8353
|
] }) })
|
|
8356
8354
|
}
|
|
8357
|
-
) :
|
|
8355
|
+
) : R && typeof R != "boolean" ? /* @__PURE__ */ n(
|
|
8358
8356
|
Qe,
|
|
8359
8357
|
{
|
|
8360
8358
|
withBorder: !0,
|
|
8361
8359
|
p: "xl",
|
|
8362
8360
|
style: { width: l, height: a, minHeight: c },
|
|
8363
8361
|
className: V,
|
|
8364
|
-
children: /* @__PURE__ */ n(mt, { h: "100%", children: /* @__PURE__ */ n(vr, { icon: /* @__PURE__ */ n(cr, { size: 16 }), color: "red", title: "Error", children: typeof
|
|
8362
|
+
children: /* @__PURE__ */ n(mt, { h: "100%", children: /* @__PURE__ */ n(vr, { icon: /* @__PURE__ */ n(cr, { size: 16 }), color: "red", title: "Error", children: typeof R == "string" ? R : "Failed to load timeline" }) })
|
|
8365
8363
|
}
|
|
8366
8364
|
) : e.length === 0 && U ? /* @__PURE__ */ n(
|
|
8367
8365
|
Qe,
|
|
@@ -8381,7 +8379,7 @@ function Uc({
|
|
|
8381
8379
|
className: V,
|
|
8382
8380
|
children: [
|
|
8383
8381
|
!z && /* @__PURE__ */ b(Ie, { justify: "flex-end", p: "xs", style: { borderBottom: "1px solid var(--mantine-color-gray-3)" }, children: [
|
|
8384
|
-
/* @__PURE__ */ n(Ae, { size: "sm", variant: "subtle", onClick: ve, title: String(_("Zoom in")), children: /* @__PURE__ */ n(
|
|
8382
|
+
/* @__PURE__ */ n(Ae, { size: "sm", variant: "subtle", onClick: ve, title: String(_("Zoom in")), children: /* @__PURE__ */ n(yn, { size: 16 }) }),
|
|
8385
8383
|
/* @__PURE__ */ n(Ae, { size: "sm", variant: "subtle", onClick: re, title: String(_("Zoom out")), children: /* @__PURE__ */ n(hi, { size: 16 }) }),
|
|
8386
8384
|
/* @__PURE__ */ n(Ae, { size: "sm", variant: "subtle", onClick: te, title: String(_("Fit to items")), children: /* @__PURE__ */ n(Kn, { size: 16 }) }),
|
|
8387
8385
|
/* @__PURE__ */ n(Ae, { size: "sm", variant: "subtle", onClick: ne, title: String(_("Go to today")), children: /* @__PURE__ */ n(Kn, { size: 16 }) }),
|
|
@@ -8588,7 +8586,7 @@ const nd = "_pointer_9trty_23", Nt = {
|
|
|
8588
8586
|
pickerIcon: "#x1f4cb",
|
|
8589
8587
|
withoutPicker: !1
|
|
8590
8588
|
};
|
|
8591
|
-
function
|
|
8589
|
+
function Ln(e, t, r) {
|
|
8592
8590
|
const i = [];
|
|
8593
8591
|
for (let o = 0; o < e.parentNode.children.length; o += 1) {
|
|
8594
8592
|
const s = e.parentNode.children[o];
|
|
@@ -8692,12 +8690,12 @@ class Kf extends ya {
|
|
|
8692
8690
|
};
|
|
8693
8691
|
handlerEventToggle = (t, r) => {
|
|
8694
8692
|
t.classList.toggle("collapsed");
|
|
8695
|
-
const i =
|
|
8693
|
+
const i = Ln(t, "ul.json-dict, ol.json-array", function(o) {
|
|
8696
8694
|
o.style.display = o.style.display === "" || o.style.display === "block" ? "none" : "block";
|
|
8697
8695
|
});
|
|
8698
8696
|
for (let o = 0; o < i.length; o += 1)
|
|
8699
8697
|
if (!ld(i[o]))
|
|
8700
|
-
|
|
8698
|
+
Ln(i[o], ".json-placeholder", function(s) {
|
|
8701
8699
|
return s.parentNode.removeChild(s);
|
|
8702
8700
|
});
|
|
8703
8701
|
else {
|
|
@@ -8716,7 +8714,7 @@ class Kf extends ya {
|
|
|
8716
8714
|
typeof r.matches == "function" && r.matches("a.json-toggle") && (this.handlerEventToggle.call(null, r, t), t.stopPropagation(), t.preventDefault()), r = r.parentNode;
|
|
8717
8715
|
};
|
|
8718
8716
|
simulateClickHandler = (t, r) => {
|
|
8719
|
-
|
|
8717
|
+
Ln(t, "a.json-toggle", function(i) {
|
|
8720
8718
|
return ad(i);
|
|
8721
8719
|
}), r.stopPropagation(), r.preventDefault();
|
|
8722
8720
|
};
|
|
@@ -8803,12 +8801,12 @@ const Or = () => {
|
|
|
8803
8801
|
e
|
|
8804
8802
|
);
|
|
8805
8803
|
t.id || (t.id = Date.now().toString()), Object.freeze(t);
|
|
8806
|
-
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, H] = He.useState(""), [W, z] = He.useState(Or()), [A,
|
|
8807
|
-
p(ee.clientY - l), h(ee.clientX - c), z(Or()),
|
|
8804
|
+
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, H] = He.useState(""), [W, z] = He.useState(Or()), [A, R] = He.useState(1), { ref: U, width: v, height: P } = Fo(), M = He.useRef(null), O = ue(r), I = ue(o), x = ue(l), _ = ue(c), S = 500, F = (ee) => {
|
|
8805
|
+
p(ee.clientY - l), h(ee.clientX - c), z(Or()), R(0.5);
|
|
8808
8806
|
}, L = (ee) => {
|
|
8809
8807
|
u((ee.clientX || ee.screenX || c + d) - d), a((ee.clientY || ee.screenY || l + f) - f);
|
|
8810
8808
|
}, C = (ee) => {
|
|
8811
|
-
u((ee.clientX || ee.screenX) - d), a((ee.clientY || ee.screenY) - f),
|
|
8809
|
+
u((ee.clientX || ee.screenX) - d), a((ee.clientY || ee.screenY) - f), R(1);
|
|
8812
8810
|
}, j = () => {
|
|
8813
8811
|
if (H(`${S}ms ease-in-out`), g)
|
|
8814
8812
|
O.current = r, a(x.current || 0), u(_.current || 0), y(!1), D("▁"), w(!1);
|
|
@@ -9159,7 +9157,7 @@ const lr = (e, t) => {
|
|
|
9159
9157
|
}
|
|
9160
9158
|
),
|
|
9161
9159
|
/* @__PURE__ */ n(rt.Wrapper, { w: "100%", error: o, children: /* @__PURE__ */ n(
|
|
9162
|
-
|
|
9160
|
+
gn,
|
|
9163
9161
|
{
|
|
9164
9162
|
value: u,
|
|
9165
9163
|
disabled: !a,
|
|
@@ -9255,7 +9253,7 @@ const lr = (e, t) => {
|
|
|
9255
9253
|
}
|
|
9256
9254
|
),
|
|
9257
9255
|
/* @__PURE__ */ n(rt.Wrapper, { w: "100%", error: i, children: /* @__PURE__ */ n(
|
|
9258
|
-
|
|
9256
|
+
gn,
|
|
9259
9257
|
{
|
|
9260
9258
|
value: u || "",
|
|
9261
9259
|
disabled: !a,
|
|
@@ -9316,7 +9314,7 @@ const lr = (e, t) => {
|
|
|
9316
9314
|
variant: "subtle",
|
|
9317
9315
|
color: "green",
|
|
9318
9316
|
"aria-label": `${l("archbase:Add Child Node")}`,
|
|
9319
|
-
children: /* @__PURE__ */ n(
|
|
9317
|
+
children: /* @__PURE__ */ n(bn, {})
|
|
9320
9318
|
}
|
|
9321
9319
|
) }),
|
|
9322
9320
|
/* @__PURE__ */ n(Ct.Dropdown, { w: "120px", color: "white", children: /* @__PURE__ */ b(We, { children: [
|
|
@@ -9524,7 +9522,7 @@ const lr = (e, t) => {
|
|
|
9524
9522
|
);
|
|
9525
9523
|
}
|
|
9526
9524
|
},
|
|
9527
|
-
children: /* @__PURE__ */ n(
|
|
9525
|
+
children: /* @__PURE__ */ n(bn, {})
|
|
9528
9526
|
}
|
|
9529
9527
|
)
|
|
9530
9528
|
}
|
|
@@ -9696,7 +9694,7 @@ const lr = (e, t) => {
|
|
|
9696
9694
|
"ASSIGN_VALUE"
|
|
9697
9695
|
);
|
|
9698
9696
|
},
|
|
9699
|
-
children: /* @__PURE__ */ n(
|
|
9697
|
+
children: /* @__PURE__ */ n(bn, {})
|
|
9700
9698
|
}
|
|
9701
9699
|
)
|
|
9702
9700
|
}
|
|
@@ -9809,13 +9807,13 @@ const lr = (e, t) => {
|
|
|
9809
9807
|
const s = `field_${Wr()}`;
|
|
9810
9808
|
i(`${e}.properties.${s}`, lr(Cr.string), "ASSIGN_VALUE");
|
|
9811
9809
|
},
|
|
9812
|
-
children: /* @__PURE__ */ n(
|
|
9810
|
+
children: /* @__PURE__ */ n(bn, {})
|
|
9813
9811
|
}
|
|
9814
9812
|
)
|
|
9815
9813
|
}
|
|
9816
9814
|
) })
|
|
9817
9815
|
] }) });
|
|
9818
|
-
},
|
|
9816
|
+
}, Fn = {
|
|
9819
9817
|
$schema: "http://json-schema.org/draft-07/schema#",
|
|
9820
9818
|
type: "object",
|
|
9821
9819
|
title: "title",
|
|
@@ -9828,18 +9826,18 @@ const lr = (e, t) => {
|
|
|
9828
9826
|
onRootSchemaChange: r,
|
|
9829
9827
|
readOnly: i = !1
|
|
9830
9828
|
}) => {
|
|
9831
|
-
const [o, s] =
|
|
9829
|
+
const [o, s] = Gn({
|
|
9832
9830
|
value: {
|
|
9833
|
-
jsonSchema: e ??
|
|
9831
|
+
jsonSchema: e ?? Fn,
|
|
9834
9832
|
isReadOnly: i,
|
|
9835
9833
|
fieldId: 0
|
|
9836
9834
|
},
|
|
9837
9835
|
defaultValue: {
|
|
9838
|
-
jsonSchema: t ??
|
|
9836
|
+
jsonSchema: t ?? Fn,
|
|
9839
9837
|
isReadOnly: i,
|
|
9840
9838
|
fieldId: 0
|
|
9841
9839
|
},
|
|
9842
|
-
finalValue:
|
|
9840
|
+
finalValue: Fn,
|
|
9843
9841
|
onChange: (c) => r(c.jsonSchema, uo(c.jsonSchema))
|
|
9844
9842
|
}), { ready: l } = Xe(), a = (c, u, d) => {
|
|
9845
9843
|
const h = yl(o, (f) => {
|
|
@@ -10229,8 +10227,8 @@ const ap = ({
|
|
|
10229
10227
|
innerProps: r
|
|
10230
10228
|
}) => /* @__PURE__ */ b(Qe, { miw: "400px", children: [
|
|
10231
10229
|
/* @__PURE__ */ n(sr, { variant: "contained", children: /* @__PURE__ */ b(sr.Item, { value: "photos", children: [
|
|
10232
|
-
/* @__PURE__ */ n(sr.Control, { icon: /* @__PURE__ */ n(fi, { size: "2.8rem", style: { color: "red" } }), children: /* @__PURE__ */ n(
|
|
10233
|
-
/* @__PURE__ */ n(sr.Panel, { children: /* @__PURE__ */ n(
|
|
10230
|
+
/* @__PURE__ */ n(sr.Control, { icon: /* @__PURE__ */ n(fi, { size: "2.8rem", style: { color: "red" } }), children: /* @__PURE__ */ n(Rt, { h: "160px", mah: "160px", children: r.message }) }),
|
|
10231
|
+
/* @__PURE__ */ n(sr.Panel, { children: /* @__PURE__ */ n(Rt, { h: "200px", mah: "200px", children: r.detailMessage }) })
|
|
10234
10232
|
] }) }),
|
|
10235
10233
|
/* @__PURE__ */ n(
|
|
10236
10234
|
_e,
|
|
@@ -10389,7 +10387,7 @@ function fo({
|
|
|
10389
10387
|
size: "lg",
|
|
10390
10388
|
onClick: s,
|
|
10391
10389
|
disabled: g || r >= 3,
|
|
10392
|
-
children: /* @__PURE__ */ n(
|
|
10390
|
+
children: /* @__PURE__ */ n(yn, { size: 18 })
|
|
10393
10391
|
}
|
|
10394
10392
|
) }),
|
|
10395
10393
|
m.rotate && /* @__PURE__ */ n(je, { label: `${String(y("Rotate"))} (${i}°)`, children: /* @__PURE__ */ n(
|
|
@@ -10421,7 +10419,7 @@ function fo({
|
|
|
10421
10419
|
size: "lg",
|
|
10422
10420
|
onClick: p,
|
|
10423
10421
|
disabled: g,
|
|
10424
|
-
children: /* @__PURE__ */ n(
|
|
10422
|
+
children: /* @__PURE__ */ n(wn, { size: 18 })
|
|
10425
10423
|
}
|
|
10426
10424
|
) })
|
|
10427
10425
|
] })
|
|
@@ -10430,7 +10428,7 @@ function fo({
|
|
|
10430
10428
|
const po = {
|
|
10431
10429
|
highlight: "#ffd700"
|
|
10432
10430
|
};
|
|
10433
|
-
function
|
|
10431
|
+
function Rd({
|
|
10434
10432
|
annotations: e,
|
|
10435
10433
|
onAnnotationAdd: t,
|
|
10436
10434
|
onAnnotationRemove: r,
|
|
@@ -10467,7 +10465,7 @@ function $d({
|
|
|
10467
10465
|
});
|
|
10468
10466
|
},
|
|
10469
10467
|
[u, h]
|
|
10470
|
-
),
|
|
10468
|
+
), R = T(() => {
|
|
10471
10469
|
if (!u || !p || !t) {
|
|
10472
10470
|
d(!1), f(null), g(null);
|
|
10473
10471
|
return;
|
|
@@ -10520,7 +10518,7 @@ function $d({
|
|
|
10520
10518
|
},
|
|
10521
10519
|
onMouseDown: z,
|
|
10522
10520
|
onMouseMove: A,
|
|
10523
|
-
onMouseUp:
|
|
10521
|
+
onMouseUp: R,
|
|
10524
10522
|
children: [
|
|
10525
10523
|
W.map((M) => {
|
|
10526
10524
|
const O = P(M.type);
|
|
@@ -10625,7 +10623,7 @@ function $d({
|
|
|
10625
10623
|
}
|
|
10626
10624
|
),
|
|
10627
10625
|
w?.type === "comment" && /* @__PURE__ */ n(
|
|
10628
|
-
|
|
10626
|
+
gn,
|
|
10629
10627
|
{
|
|
10630
10628
|
label: String(c("Comment")),
|
|
10631
10629
|
placeholder: String(c("Enter your comment...")),
|
|
@@ -10643,7 +10641,7 @@ function $d({
|
|
|
10643
10641
|
)
|
|
10644
10642
|
] });
|
|
10645
10643
|
}
|
|
10646
|
-
function
|
|
10644
|
+
function $d({
|
|
10647
10645
|
annotations: e,
|
|
10648
10646
|
onAnnotationRemove: t,
|
|
10649
10647
|
onAnnotationClick: r,
|
|
@@ -10739,7 +10737,7 @@ function dp({
|
|
|
10739
10737
|
style: z,
|
|
10740
10738
|
className: A
|
|
10741
10739
|
}) {
|
|
10742
|
-
const { t:
|
|
10740
|
+
const { t: R } = Xe(), [U, v] = k({ width: 0, height: 0 }), P = ue(null), {
|
|
10743
10741
|
currentValue: M,
|
|
10744
10742
|
loadDataSourceFieldValue: O,
|
|
10745
10743
|
isReadOnly: I
|
|
@@ -10786,7 +10784,7 @@ function dp({
|
|
|
10786
10784
|
}
|
|
10787
10785
|
}, [F, f]), be = T(() => {
|
|
10788
10786
|
L(1), f?.(1, C);
|
|
10789
|
-
}, [f, C]),
|
|
10787
|
+
}, [f, C]), $ = T(() => {
|
|
10790
10788
|
L(C), f?.(C, C);
|
|
10791
10789
|
}, [f, C]), xe = T(() => {
|
|
10792
10790
|
de((Ne) => (Ne + 90) % 360);
|
|
@@ -10798,7 +10796,7 @@ function dp({
|
|
|
10798
10796
|
}
|
|
10799
10797
|
}, [M, r]), se = T(() => {
|
|
10800
10798
|
window.print();
|
|
10801
|
-
}, []),
|
|
10799
|
+
}, []), Re = M || r, $e = X || I;
|
|
10802
10800
|
return /* @__PURE__ */ b(We, { gap: "xs", style: z, className: A, children: [
|
|
10803
10801
|
c && h !== "bottom" && /* @__PURE__ */ n(Qe, { withBorder: !0, p: "xs", children: /* @__PURE__ */ n(
|
|
10804
10802
|
fo,
|
|
@@ -10813,20 +10811,20 @@ function dp({
|
|
|
10813
10811
|
onNextPage: le,
|
|
10814
10812
|
onPreviousPage: Ce,
|
|
10815
10813
|
onFirstPage: be,
|
|
10816
|
-
onLastPage:
|
|
10814
|
+
onLastPage: $,
|
|
10817
10815
|
onRotate: xe,
|
|
10818
10816
|
onDownload: ce,
|
|
10819
10817
|
onPrint: se,
|
|
10820
|
-
disabled:
|
|
10818
|
+
disabled: $e
|
|
10821
10819
|
}
|
|
10822
10820
|
) }),
|
|
10823
10821
|
/* @__PURE__ */ b(Ie, { gap: "xs", align: "flex-start", children: [
|
|
10824
|
-
V && B && /* @__PURE__ */ n(Qe, { withBorder: !0, p: "xs", style: { width: 250 }, children: /* @__PURE__ */ n(
|
|
10825
|
-
|
|
10822
|
+
V && B && /* @__PURE__ */ n(Qe, { withBorder: !0, p: "xs", style: { width: 250 }, children: /* @__PURE__ */ n(Rt.Autosize, { mah: o, type: "always", children: /* @__PURE__ */ n(
|
|
10823
|
+
$d,
|
|
10826
10824
|
{
|
|
10827
10825
|
annotations: m,
|
|
10828
10826
|
onAnnotationRemove: E,
|
|
10829
|
-
disabled:
|
|
10827
|
+
disabled: $e
|
|
10830
10828
|
}
|
|
10831
10829
|
) }) }),
|
|
10832
10830
|
/* @__PURE__ */ b(
|
|
@@ -10838,14 +10836,14 @@ function dp({
|
|
|
10838
10836
|
ref: re,
|
|
10839
10837
|
children: [
|
|
10840
10838
|
/* @__PURE__ */ n(Ot, { visible: oe }),
|
|
10841
|
-
|
|
10839
|
+
Re ? ze ? /* @__PURE__ */ n(ye, { p: "xl", children: /* @__PURE__ */ n(K, { ta: "center", c: "red", children: W || String(R("Error loading PDF")) }) }) : /* @__PURE__ */ n(Ie, { justify: "center", style: { position: "relative" }, children: /* @__PURE__ */ n(
|
|
10842
10840
|
xl,
|
|
10843
10841
|
{
|
|
10844
|
-
file:
|
|
10842
|
+
file: Re,
|
|
10845
10843
|
onLoadSuccess: ne,
|
|
10846
10844
|
onLoadError: Z,
|
|
10847
|
-
loading: H || String(
|
|
10848
|
-
error: W || String(
|
|
10845
|
+
loading: H || String(R("Loading PDF...")),
|
|
10846
|
+
error: W || String(R("Error loading PDF")),
|
|
10849
10847
|
children: /* @__PURE__ */ b(ye, { ref: P, style: { position: "relative" }, children: [
|
|
10850
10848
|
/* @__PURE__ */ n(
|
|
10851
10849
|
El,
|
|
@@ -10857,13 +10855,13 @@ function dp({
|
|
|
10857
10855
|
}
|
|
10858
10856
|
),
|
|
10859
10857
|
B && U.width > 0 && /* @__PURE__ */ n(
|
|
10860
|
-
|
|
10858
|
+
Rd,
|
|
10861
10859
|
{
|
|
10862
10860
|
annotations: m,
|
|
10863
10861
|
onAnnotationAdd: w,
|
|
10864
10862
|
onAnnotationRemove: E,
|
|
10865
10863
|
onAnnotationUpdate: D,
|
|
10866
|
-
disabled:
|
|
10864
|
+
disabled: $e,
|
|
10867
10865
|
pageIndex: F - 1,
|
|
10868
10866
|
pageWidth: U.width,
|
|
10869
10867
|
pageHeight: U.height
|
|
@@ -10871,7 +10869,7 @@ function dp({
|
|
|
10871
10869
|
)
|
|
10872
10870
|
] })
|
|
10873
10871
|
}
|
|
10874
|
-
) }) : /* @__PURE__ */ n(ye, { p: "xl", children: /* @__PURE__ */ n(K, { ta: "center", c: "dimmed", children: String(
|
|
10872
|
+
) }) : /* @__PURE__ */ n(ye, { p: "xl", children: /* @__PURE__ */ n(K, { ta: "center", c: "dimmed", children: String(R("No PDF document loaded")) }) })
|
|
10875
10873
|
]
|
|
10876
10874
|
}
|
|
10877
10875
|
)
|
|
@@ -10889,11 +10887,11 @@ function dp({
|
|
|
10889
10887
|
onNextPage: le,
|
|
10890
10888
|
onPreviousPage: Ce,
|
|
10891
10889
|
onFirstPage: be,
|
|
10892
|
-
onLastPage:
|
|
10890
|
+
onLastPage: $,
|
|
10893
10891
|
onRotate: xe,
|
|
10894
10892
|
onDownload: ce,
|
|
10895
10893
|
onPrint: se,
|
|
10896
|
-
disabled:
|
|
10894
|
+
disabled: $e
|
|
10897
10895
|
}
|
|
10898
10896
|
) })
|
|
10899
10897
|
] });
|
|
@@ -11042,15 +11040,15 @@ const fr = {
|
|
|
11042
11040
|
"application/vnd.ms-powerpoint": "office",
|
|
11043
11041
|
"application/vnd.openxmlformats-officedocument.presentationml.presentation": "office"
|
|
11044
11042
|
};
|
|
11045
|
-
function
|
|
11043
|
+
function Bn(e) {
|
|
11046
11044
|
const t = e.split(".");
|
|
11047
11045
|
return t.length < 2 ? null : t.pop()?.toLowerCase() || null;
|
|
11048
11046
|
}
|
|
11049
|
-
function
|
|
11047
|
+
function On(e) {
|
|
11050
11048
|
const t = e.toLowerCase().replace(/^\./, "");
|
|
11051
11049
|
return fr.pdf.includes(t) ? "pdf" : fr.image.includes(t) ? "image" : fr.video.includes(t) ? "video" : fr.audio.includes(t) ? "audio" : fr.code.includes(t) ? "code" : fr.office.includes(t) ? "office" : fr.text.includes(t) ? "text" : "unknown";
|
|
11052
11050
|
}
|
|
11053
|
-
function
|
|
11051
|
+
function _n(e) {
|
|
11054
11052
|
return Pd[e] || "unknown";
|
|
11055
11053
|
}
|
|
11056
11054
|
function Nd(e) {
|
|
@@ -11072,14 +11070,14 @@ function Nd(e) {
|
|
|
11072
11070
|
}
|
|
11073
11071
|
async function Vd(e, t, r) {
|
|
11074
11072
|
if (t) {
|
|
11075
|
-
const i =
|
|
11073
|
+
const i = _n(t);
|
|
11076
11074
|
if (i !== "unknown")
|
|
11077
11075
|
return i;
|
|
11078
11076
|
}
|
|
11079
11077
|
if (r) {
|
|
11080
|
-
const i =
|
|
11078
|
+
const i = Bn(r);
|
|
11081
11079
|
if (i) {
|
|
11082
|
-
const o =
|
|
11080
|
+
const o = On(i);
|
|
11083
11081
|
if (o !== "unknown")
|
|
11084
11082
|
return o;
|
|
11085
11083
|
}
|
|
@@ -11089,26 +11087,26 @@ async function Vd(e, t, r) {
|
|
|
11089
11087
|
if (i.startsWith("data:")) {
|
|
11090
11088
|
const o = i.match(/^data:([^;]+);/);
|
|
11091
11089
|
if (o) {
|
|
11092
|
-
const s =
|
|
11090
|
+
const s = _n(o[1]);
|
|
11093
11091
|
if (s !== "unknown")
|
|
11094
11092
|
return s;
|
|
11095
11093
|
}
|
|
11096
11094
|
} else {
|
|
11097
|
-
const o = i.split("/"), l = o[o.length - 1].split("?"), a =
|
|
11095
|
+
const o = i.split("/"), l = o[o.length - 1].split("?"), a = Bn(l[0]);
|
|
11098
11096
|
if (a) {
|
|
11099
|
-
const c =
|
|
11097
|
+
const c = On(a);
|
|
11100
11098
|
if (c !== "unknown")
|
|
11101
11099
|
return c;
|
|
11102
11100
|
}
|
|
11103
11101
|
}
|
|
11104
11102
|
}
|
|
11105
11103
|
if (e instanceof File) {
|
|
11106
|
-
const i =
|
|
11104
|
+
const i = _n(e.type);
|
|
11107
11105
|
if (i !== "unknown")
|
|
11108
11106
|
return i;
|
|
11109
|
-
const o =
|
|
11107
|
+
const o = Bn(e.name);
|
|
11110
11108
|
if (o) {
|
|
11111
|
-
const s =
|
|
11109
|
+
const s = On(o);
|
|
11112
11110
|
if (s !== "unknown")
|
|
11113
11111
|
return s;
|
|
11114
11112
|
}
|
|
@@ -11149,7 +11147,7 @@ function qr(e) {
|
|
|
11149
11147
|
}
|
|
11150
11148
|
return e instanceof Blob || e instanceof File ? Promise.resolve(URL.createObjectURL(e)) : "";
|
|
11151
11149
|
}
|
|
11152
|
-
function
|
|
11150
|
+
function Cn(e) {
|
|
11153
11151
|
e.startsWith("blob:") && URL.revokeObjectURL(e);
|
|
11154
11152
|
}
|
|
11155
11153
|
function Ld({ file: e, width: t, height: r, onLoad: i, onError: o }) {
|
|
@@ -11166,7 +11164,7 @@ function Ld({ file: e, width: t, height: r, onLoad: i, onError: o }) {
|
|
|
11166
11164
|
});
|
|
11167
11165
|
}
|
|
11168
11166
|
})(), () => {
|
|
11169
|
-
s &&
|
|
11167
|
+
s && Cn(s);
|
|
11170
11168
|
}), [e]), s ? /* @__PURE__ */ n(
|
|
11171
11169
|
"iframe",
|
|
11172
11170
|
{
|
|
@@ -11194,7 +11192,7 @@ function Fd({ file: e, width: t, height: r, onLoad: i, onError: o, style: s, cla
|
|
|
11194
11192
|
});
|
|
11195
11193
|
}
|
|
11196
11194
|
})(), () => {
|
|
11197
|
-
a &&
|
|
11195
|
+
a && Cn(a);
|
|
11198
11196
|
}), [e]), u ? /* @__PURE__ */ n(mt, { h: "100%", children: /* @__PURE__ */ n(vr, { icon: /* @__PURE__ */ n(cr, { size: 16 }), color: "red", title: "Error", children: "Failed to load image" }) }) : a ? /* @__PURE__ */ n(mt, { h: "100%", children: /* @__PURE__ */ n(
|
|
11199
11197
|
"img",
|
|
11200
11198
|
{
|
|
@@ -11231,7 +11229,7 @@ function Bd({ file: e, width: t, height: r, onLoad: i, onError: o }) {
|
|
|
11231
11229
|
});
|
|
11232
11230
|
}
|
|
11233
11231
|
})(), () => {
|
|
11234
|
-
s &&
|
|
11232
|
+
s && Cn(s);
|
|
11235
11233
|
}), [e]), s ? /* @__PURE__ */ n(
|
|
11236
11234
|
"video",
|
|
11237
11235
|
{
|
|
@@ -11260,7 +11258,7 @@ function Od({ file: e, onLoad: t, onError: r }) {
|
|
|
11260
11258
|
});
|
|
11261
11259
|
}
|
|
11262
11260
|
})(), () => {
|
|
11263
|
-
i &&
|
|
11261
|
+
i && Cn(i);
|
|
11264
11262
|
}), [e]), i ? /* @__PURE__ */ n(mt, { h: "100%", children: /* @__PURE__ */ n("audio", { src: i, controls: !0, style: { width: "100%" } }) }) : /* @__PURE__ */ n(mt, { h: "100%", children: /* @__PURE__ */ n(Ot, { visible: !0 }) });
|
|
11265
11263
|
}
|
|
11266
11264
|
function _d({ file: e, width: t, height: r, onLoad: i, onError: o, className: s }) {
|
|
@@ -11290,7 +11288,7 @@ function _d({ file: e, width: t, height: r, onLoad: i, onError: o, className: s
|
|
|
11290
11288
|
}
|
|
11291
11289
|
})();
|
|
11292
11290
|
}, [e]), c ? /* @__PURE__ */ n(vr, { icon: /* @__PURE__ */ n(cr, { size: 16 }), color: "red", title: "Error", children: "Failed to load text content" }) : l === null ? /* @__PURE__ */ n(mt, { h: "100%", children: /* @__PURE__ */ n(Ot, { visible: !0 }) }) : /* @__PURE__ */ n(
|
|
11293
|
-
|
|
11291
|
+
Rt.Autosize,
|
|
11294
11292
|
{
|
|
11295
11293
|
mah: r || 400,
|
|
11296
11294
|
type: "auto",
|
|
@@ -11350,7 +11348,7 @@ function jd({
|
|
|
11350
11348
|
onLoadStart: W,
|
|
11351
11349
|
onLoadEnd: z,
|
|
11352
11350
|
onError: A,
|
|
11353
|
-
onDownload:
|
|
11351
|
+
onDownload: R,
|
|
11354
11352
|
onPrint: U,
|
|
11355
11353
|
onZoomChange: v,
|
|
11356
11354
|
onPageChange: P,
|
|
@@ -11374,23 +11372,23 @@ function jd({
|
|
|
11374
11372
|
const se = await Vd(e, F, S);
|
|
11375
11373
|
J(se), Se("loaded"), z?.();
|
|
11376
11374
|
} catch (se) {
|
|
11377
|
-
const
|
|
11375
|
+
const Re = {
|
|
11378
11376
|
code: "FILE_TYPE_DETECTION_ERROR",
|
|
11379
11377
|
message: "Failed to detect file type",
|
|
11380
11378
|
details: se instanceof Error ? se.message : String(se)
|
|
11381
11379
|
};
|
|
11382
|
-
Se("error"), oe(
|
|
11380
|
+
Se("error"), oe(Re), A?.(Re);
|
|
11383
11381
|
}
|
|
11384
11382
|
})();
|
|
11385
11383
|
}, [e, t, F, S]);
|
|
11386
11384
|
const Z = T(async () => {
|
|
11387
11385
|
try {
|
|
11388
11386
|
const ce = await qr(e), se = document.createElement("a");
|
|
11389
|
-
se.href = ce, se.download = S || `download-${j}`, document.body.appendChild(se), se.click(), document.body.removeChild(se),
|
|
11387
|
+
se.href = ce, se.download = S || `download-${j}`, document.body.appendChild(se), se.click(), document.body.removeChild(se), R?.();
|
|
11390
11388
|
} catch (ce) {
|
|
11391
11389
|
console.error("Download failed:", ce);
|
|
11392
11390
|
}
|
|
11393
|
-
}, [e, S, j,
|
|
11391
|
+
}, [e, S, j, R]);
|
|
11394
11392
|
T(() => {
|
|
11395
11393
|
if (C.current) {
|
|
11396
11394
|
const ce = window.open("", "", "width=800,height=600");
|
|
@@ -11430,7 +11428,7 @@ function jd({
|
|
|
11430
11428
|
zoomOut: !0,
|
|
11431
11429
|
rotate: !0,
|
|
11432
11430
|
fullscreen: !0
|
|
11433
|
-
} : {} : l, [l]),
|
|
11431
|
+
} : {} : l, [l]), $ = () => !s || B ? null : /* @__PURE__ */ b(Ie, { gap: "xs", px: "md", py: "sm", style: { borderBottom: "1px solid var(--mantine-color-gray-3)" }, children: [
|
|
11434
11432
|
be.download && /* @__PURE__ */ n(
|
|
11435
11433
|
Ae,
|
|
11436
11434
|
{
|
|
@@ -11465,7 +11463,7 @@ function jd({
|
|
|
11465
11463
|
onClick: Q,
|
|
11466
11464
|
disabled: we >= 3,
|
|
11467
11465
|
title: String(L("Zoom in")),
|
|
11468
|
-
children: /* @__PURE__ */ n(
|
|
11466
|
+
children: /* @__PURE__ */ n(yn, { size: 16 })
|
|
11469
11467
|
}
|
|
11470
11468
|
)
|
|
11471
11469
|
] }),
|
|
@@ -11505,8 +11503,8 @@ function jd({
|
|
|
11505
11503
|
width: i,
|
|
11506
11504
|
height: o,
|
|
11507
11505
|
onLoad: () => Se("loaded"),
|
|
11508
|
-
onError: (
|
|
11509
|
-
oe(
|
|
11506
|
+
onError: (Re) => {
|
|
11507
|
+
oe(Re), Se("error"), A?.(Re);
|
|
11510
11508
|
},
|
|
11511
11509
|
style: {
|
|
11512
11510
|
transform: `scale(${we}) rotate(${ve}deg)`,
|
|
@@ -11559,7 +11557,7 @@ function jd({
|
|
|
11559
11557
|
className: E,
|
|
11560
11558
|
"aria-label": x || _ || "File previewer",
|
|
11561
11559
|
children: [
|
|
11562
|
-
a === "top" || a === "both" ?
|
|
11560
|
+
a === "top" || a === "both" ? $() : null,
|
|
11563
11561
|
/* @__PURE__ */ n(
|
|
11564
11562
|
ye,
|
|
11565
11563
|
{
|
|
@@ -11571,7 +11569,7 @@ function jd({
|
|
|
11571
11569
|
children: xe()
|
|
11572
11570
|
}
|
|
11573
11571
|
),
|
|
11574
|
-
a === "bottom" || a === "both" ?
|
|
11572
|
+
a === "bottom" || a === "both" ? $() : null
|
|
11575
11573
|
]
|
|
11576
11574
|
}
|
|
11577
11575
|
) : /* @__PURE__ */ n(Qe, { withBorder: !0, p: "xl", style: { width: i, height: o }, children: /* @__PURE__ */ n(mt, { h: "100%", children: /* @__PURE__ */ b(We, { align: "center", gap: "md", children: [
|
|
@@ -11709,7 +11707,7 @@ function Gd(e) {
|
|
|
11709
11707
|
if (r === "ends_with")
|
|
11710
11708
|
return `${t}=like=*${l}`;
|
|
11711
11709
|
if ((r === "between" || r === "date_between") && Array.isArray(i)) {
|
|
11712
|
-
const [a, c] = i, u =
|
|
11710
|
+
const [a, c] = i, u = Rr(a, o), d = Rr(c, o);
|
|
11713
11711
|
return tr(Qt.bt(t, u, d));
|
|
11714
11712
|
}
|
|
11715
11713
|
if ((r === "in" || r === "not_in") && Array.isArray(i)) {
|
|
@@ -11723,11 +11721,11 @@ function Gd(e) {
|
|
|
11723
11721
|
function qd(e, t, r) {
|
|
11724
11722
|
if ((r === "between" || r === "date_between") && Array.isArray(e)) {
|
|
11725
11723
|
const [i, o] = e;
|
|
11726
|
-
return `${
|
|
11724
|
+
return `${Rr(i, t)},${Rr(o, t)}`;
|
|
11727
11725
|
}
|
|
11728
|
-
return (r === "in" || r === "not_in") && Array.isArray(e) ? e.map((i) =>
|
|
11726
|
+
return (r === "in" || r === "not_in") && Array.isArray(e) ? e.map((i) => Rr(i, t)).join(",") : Rr(e, t);
|
|
11729
11727
|
}
|
|
11730
|
-
function
|
|
11728
|
+
function Rr(e, t) {
|
|
11731
11729
|
if (e == null)
|
|
11732
11730
|
return "";
|
|
11733
11731
|
switch (t) {
|
|
@@ -11822,7 +11820,7 @@ function Xd(e) {
|
|
|
11822
11820
|
function Cs(e, t, r) {
|
|
11823
11821
|
return r === "is_null" || r === "is_not_null" ? !0 : r === "between" || r === "date_between" ? Array.isArray(e) && e.length === 2 : r === "in" || r === "not_in" ? Array.isArray(e) && e.length > 0 : !(e == null || e === "");
|
|
11824
11822
|
}
|
|
11825
|
-
function
|
|
11823
|
+
function mn() {
|
|
11826
11824
|
return `filter-${Date.now()}-${Math.random().toString(36).substring(2, 9)}`;
|
|
11827
11825
|
}
|
|
11828
11826
|
function Kd({
|
|
@@ -11846,17 +11844,17 @@ function Kd({
|
|
|
11846
11844
|
onFilterRemove: w,
|
|
11847
11845
|
onFiltersCleared: E
|
|
11848
11846
|
}) {
|
|
11849
|
-
const { t: D } = Xe(), B = ue(null), [V, X] = k([]), H = t !== void 0 ? t : V, [W, z] = k("field"), [A,
|
|
11847
|
+
const { t: D } = Xe(), B = ue(null), [V, X] = k([]), H = t !== void 0 ? t : V, [W, z] = k("field"), [A, R] = k(null), [U, v] = k(null), [P, M] = k(""), [O, { close: I, toggle: x }] = pa(!1);
|
|
11850
11848
|
G(() => {
|
|
11851
11849
|
if (i === "uncontrolled" && o) {
|
|
11852
11850
|
const ie = H.length > 0 ? H.map((le) => {
|
|
11853
|
-
const { key: Ce, operator: be, value:
|
|
11851
|
+
const { key: Ce, operator: be, value: $, type: xe } = le;
|
|
11854
11852
|
if (be === "is_null")
|
|
11855
11853
|
return `${Ce}=null=true`;
|
|
11856
11854
|
if (be === "is_not_null")
|
|
11857
11855
|
return `${Ce}=null=false`;
|
|
11858
|
-
let ce = String(
|
|
11859
|
-
return (xe === "date" || xe === "datetime") &&
|
|
11856
|
+
let ce = String($);
|
|
11857
|
+
return (xe === "date" || xe === "datetime") && $ instanceof Date && (ce = $.toISOString()), be === "contains" ? `${Ce}=like=*${ce}*` : be === "starts_with" ? `${Ce}=like=${ce}*` : be === "ends_with" ? `${Ce}=like=*${ce}` : be === "=" ? `${Ce}==${ce}` : be === "!=" ? `${Ce}!=${ce}` : be === ">" ? `${Ce}>${ce}` : be === "<" ? `${Ce}<${ce}` : be === ">=" ? `${Ce}>=${ce}` : be === "<=" ? `${Ce}<=${ce}` : `${Ce}==${ce}`;
|
|
11860
11858
|
}).join(";") : void 0;
|
|
11861
11859
|
o(ie);
|
|
11862
11860
|
}
|
|
@@ -11868,7 +11866,7 @@ function Kd({
|
|
|
11868
11866
|
), [_, P, W]), F = Ge(() => A ? A.operators || Qd(A.type) : [], [A]), L = Ge(() => A?.options || [], [A]), C = Ge(() => !P || W !== "value" ? L : L.filter(
|
|
11869
11867
|
(ie) => ie.label.toLowerCase().includes(P.toLowerCase())
|
|
11870
11868
|
), [L, P, W]), j = T(() => {
|
|
11871
|
-
z("field"),
|
|
11869
|
+
z("field"), R(null), v(null), M("");
|
|
11872
11870
|
}, []), J = T(() => {
|
|
11873
11871
|
if (!A || !U)
|
|
11874
11872
|
return;
|
|
@@ -11890,7 +11888,7 @@ function Kd({
|
|
|
11890
11888
|
break;
|
|
11891
11889
|
}
|
|
11892
11890
|
const le = {
|
|
11893
|
-
id:
|
|
11891
|
+
id: mn(),
|
|
11894
11892
|
key: A.key,
|
|
11895
11893
|
label: A.label,
|
|
11896
11894
|
type: A.type,
|
|
@@ -11908,13 +11906,13 @@ function Kd({
|
|
|
11908
11906
|
}, [E]), de = T((ie) => {
|
|
11909
11907
|
if (r) {
|
|
11910
11908
|
const le = ie.length > 0 ? ie.map((Ce) => {
|
|
11911
|
-
const { key: be, operator:
|
|
11912
|
-
if (
|
|
11909
|
+
const { key: be, operator: $, value: xe, type: ce } = Ce;
|
|
11910
|
+
if ($ === "is_null")
|
|
11913
11911
|
return `${be}=null=true`;
|
|
11914
|
-
if (
|
|
11912
|
+
if ($ === "is_not_null")
|
|
11915
11913
|
return `${be}=null=false`;
|
|
11916
11914
|
let se = String(xe);
|
|
11917
|
-
return (ce === "date" || ce === "datetime") && xe instanceof Date && (se = xe.toISOString()),
|
|
11915
|
+
return (ce === "date" || ce === "datetime") && xe instanceof Date && (se = xe.toISOString()), $ === "contains" ? `${be}=like=*${se}*` : $ === "starts_with" ? `${be}=like=${se}*` : $ === "ends_with" ? `${be}=like=*${se}` : $ === "=" ? `${be}==${se}` : $ === "!=" ? `${be}!=${se}` : $ === ">" ? `${be}>${se}` : $ === "<" ? `${be}<${se}` : $ === ">=" ? `${be}>=${se}` : $ === "<=" ? `${be}<=${se}` : `${be}==${se}`;
|
|
11918
11916
|
}).join(";") : void 0;
|
|
11919
11917
|
r(ie, le);
|
|
11920
11918
|
} else
|
|
@@ -11932,7 +11930,7 @@ function Kd({
|
|
|
11932
11930
|
const le = S.find(
|
|
11933
11931
|
(Ce) => Ce.key.toLowerCase() === ie.toLowerCase() || Ce.label.toLowerCase() === ie.toLowerCase()
|
|
11934
11932
|
);
|
|
11935
|
-
le && (
|
|
11933
|
+
le && (R(le), M(""), z("operator"));
|
|
11936
11934
|
} else if (W === "operator" && ie) {
|
|
11937
11935
|
const le = F.find(
|
|
11938
11936
|
(Ce) => Ce.toLowerCase().includes(ie.toLowerCase())
|
|
@@ -11940,7 +11938,7 @@ function Kd({
|
|
|
11940
11938
|
le && (v(le), M(""), le === "is_null" || le === "is_not_null" ? J() : z("value"));
|
|
11941
11939
|
}
|
|
11942
11940
|
}, [W, S, F, J]), ve = T((ie) => {
|
|
11943
|
-
|
|
11941
|
+
R(ie), v(Xd(ie.type)), M(""), z("value");
|
|
11944
11942
|
}, []), re = T((ie) => {
|
|
11945
11943
|
v(ie), M(""), ie === "is_null" || ie === "is_not_null" ? J() : z("value");
|
|
11946
11944
|
}, [J]), te = T((ie) => {
|
|
@@ -11948,7 +11946,7 @@ function Kd({
|
|
|
11948
11946
|
}, [J]), ne = () => {
|
|
11949
11947
|
switch (W) {
|
|
11950
11948
|
case "field":
|
|
11951
|
-
return /* @__PURE__ */ n(ot, { children: S.length === 0 ? /* @__PURE__ */ n(K, { p: "md", c: "dimmed", size: "sm", children: String(D("No fields found")) }) : /* @__PURE__ */ n(
|
|
11949
|
+
return /* @__PURE__ */ n(ot, { children: S.length === 0 ? /* @__PURE__ */ n(K, { p: "md", c: "dimmed", size: "sm", children: String(D("No fields found")) }) : /* @__PURE__ */ n(Rt.Autosize, { mah: 300, children: /* @__PURE__ */ n(We, { gap: 0, children: S.map((le) => /* @__PURE__ */ b(
|
|
11952
11950
|
_e,
|
|
11953
11951
|
{
|
|
11954
11952
|
variant: "subtle",
|
|
@@ -11967,7 +11965,7 @@ function Kd({
|
|
|
11967
11965
|
le.key
|
|
11968
11966
|
)) }) }) });
|
|
11969
11967
|
case "operator":
|
|
11970
|
-
return /* @__PURE__ */ n(ot, { children: F.length === 0 ? /* @__PURE__ */ n(K, { p: "md", c: "dimmed", size: "sm", children: String(D("No operators available")) }) : /* @__PURE__ */ n(
|
|
11968
|
+
return /* @__PURE__ */ n(ot, { children: F.length === 0 ? /* @__PURE__ */ n(K, { p: "md", c: "dimmed", size: "sm", children: String(D("No operators available")) }) : /* @__PURE__ */ n(Rt.Autosize, { mah: 300, children: /* @__PURE__ */ n(We, { gap: 0, children: F.map((le) => /* @__PURE__ */ n(
|
|
11971
11969
|
_e,
|
|
11972
11970
|
{
|
|
11973
11971
|
variant: "subtle",
|
|
@@ -11983,7 +11981,7 @@ function Kd({
|
|
|
11983
11981
|
)) }) }) });
|
|
11984
11982
|
case "value":
|
|
11985
11983
|
if (A && (A.type === "enum" || L.length > 0))
|
|
11986
|
-
return /* @__PURE__ */ n(ot, { children: C.length === 0 ? /* @__PURE__ */ n(K, { p: "md", c: "dimmed", size: "sm", children: String(D("No options found")) }) : /* @__PURE__ */ n(
|
|
11984
|
+
return /* @__PURE__ */ n(ot, { children: C.length === 0 ? /* @__PURE__ */ n(K, { p: "md", c: "dimmed", size: "sm", children: String(D("No options found")) }) : /* @__PURE__ */ n(Rt.Autosize, { mah: 300, children: /* @__PURE__ */ n(We, { gap: 0, children: C.map((le) => /* @__PURE__ */ n(
|
|
11987
11985
|
_e,
|
|
11988
11986
|
{
|
|
11989
11987
|
variant: "subtle",
|
|
@@ -12074,7 +12072,7 @@ function Kd({
|
|
|
12074
12072
|
size: "xs",
|
|
12075
12073
|
variant: "transparent",
|
|
12076
12074
|
onClick: x,
|
|
12077
|
-
children: /* @__PURE__ */ n(
|
|
12075
|
+
children: /* @__PURE__ */ n(cn, { size: 14 })
|
|
12078
12076
|
}
|
|
12079
12077
|
)
|
|
12080
12078
|
}
|
|
@@ -12093,7 +12091,7 @@ function Kd({
|
|
|
12093
12091
|
}
|
|
12094
12092
|
) }),
|
|
12095
12093
|
!Z && (c || u || d) && /* @__PURE__ */ b(pt, { shadow: "md", width: 200, position: "bottom-end", children: [
|
|
12096
|
-
/* @__PURE__ */ n(pt.Target, { children: /* @__PURE__ */ n(Ae, { variant: "subtle", children: /* @__PURE__ */ n(
|
|
12094
|
+
/* @__PURE__ */ n(pt.Target, { children: /* @__PURE__ */ n(Ae, { variant: "subtle", children: /* @__PURE__ */ n(cn, { size: 16 }) }) }),
|
|
12097
12095
|
/* @__PURE__ */ b(pt.Dropdown, { children: [
|
|
12098
12096
|
d && h.length > 0 && /* @__PURE__ */ b(ot, { children: [
|
|
12099
12097
|
/* @__PURE__ */ n(pt.Label, { children: String(D("Quick filters")) }),
|
|
@@ -12104,7 +12102,7 @@ function Kd({
|
|
|
12104
12102
|
onClick: () => {
|
|
12105
12103
|
const le = ie.filters.map((Ce) => ({
|
|
12106
12104
|
...Ce,
|
|
12107
|
-
id:
|
|
12105
|
+
id: mn()
|
|
12108
12106
|
}));
|
|
12109
12107
|
de(le);
|
|
12110
12108
|
},
|
|
@@ -12165,7 +12163,7 @@ function hp(e, t) {
|
|
|
12165
12163
|
}
|
|
12166
12164
|
const w = {
|
|
12167
12165
|
...y,
|
|
12168
|
-
id:
|
|
12166
|
+
id: mn(),
|
|
12169
12167
|
displayValue: vi(
|
|
12170
12168
|
y.value,
|
|
12171
12169
|
y.type,
|
|
@@ -12229,7 +12227,7 @@ function fp(e, t, r) {
|
|
|
12229
12227
|
return;
|
|
12230
12228
|
const y = {
|
|
12231
12229
|
...p,
|
|
12232
|
-
id:
|
|
12230
|
+
id: mn(),
|
|
12233
12231
|
displayValue: vi(p.value, p.type, p.operator, g.options)
|
|
12234
12232
|
}, m = t.findIndex((E) => E.key === p.key);
|
|
12235
12233
|
let w;
|
|
@@ -12646,7 +12644,7 @@ function au({
|
|
|
12646
12644
|
skipHtml: D = !1,
|
|
12647
12645
|
unwrapDisallowed: B = !1
|
|
12648
12646
|
}) {
|
|
12649
|
-
const [V, X] = k(!1), [H, W] = k(!1), [z, A] = k(null),
|
|
12647
|
+
const [V, X] = k(!1), [H, W] = k(!1), [z, A] = k(null), R = {
|
|
12650
12648
|
showLineNumbers: !0,
|
|
12651
12649
|
...t
|
|
12652
12650
|
}, U = {
|
|
@@ -12758,8 +12756,8 @@ function au({
|
|
|
12758
12756
|
{
|
|
12759
12757
|
language: C,
|
|
12760
12758
|
value: String(S).replace(/\n$/, ""),
|
|
12761
|
-
showLineNumbers:
|
|
12762
|
-
theme:
|
|
12759
|
+
showLineNumbers: R.showLineNumbers,
|
|
12760
|
+
theme: R.highlightTheme || su
|
|
12763
12761
|
}
|
|
12764
12762
|
) : /* @__PURE__ */ n(nu, { children: S });
|
|
12765
12763
|
},
|
|
@@ -12938,13 +12936,13 @@ function lu({
|
|
|
12938
12936
|
defaultSubtitles: c = !1,
|
|
12939
12937
|
preload: u = "metadata"
|
|
12940
12938
|
}) {
|
|
12941
|
-
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, H] = k({ volume: o, muted: i }), [W, z] = k(1), [A,
|
|
12939
|
+
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, H] = k({ volume: o, muted: i }), [W, z] = k(1), [A, R] = k(!1), [U, v] = k(!1), [P, M] = k(
|
|
12942
12940
|
l?.[0]?.label
|
|
12943
12941
|
), [O, I] = k(c), x = cu(e), _ = T(() => {
|
|
12944
12942
|
p("loading");
|
|
12945
12943
|
}, []), S = T(() => {
|
|
12946
|
-
const
|
|
12947
|
-
|
|
12944
|
+
const $ = d.current;
|
|
12945
|
+
$ && (D($.duration), s > 0 && ($.currentTime = s), p("ready"), t && ((t === "muted" || t === "any") && ($.muted = !0, H((xe) => ({ ...xe, muted: !0 }))), $.play().catch(() => {
|
|
12948
12946
|
})));
|
|
12949
12947
|
}, [t, s]), F = T(() => {
|
|
12950
12948
|
p("ready");
|
|
@@ -12955,29 +12953,29 @@ function lu({
|
|
|
12955
12953
|
}, []), j = T(() => {
|
|
12956
12954
|
y(!1), p("ended"), r && d.current && d.current.play();
|
|
12957
12955
|
}, [r]), J = T(() => {
|
|
12958
|
-
const
|
|
12959
|
-
if (
|
|
12960
|
-
w(
|
|
12956
|
+
const $ = d.current;
|
|
12957
|
+
if ($) {
|
|
12958
|
+
w($.currentTime);
|
|
12961
12959
|
const xe = [];
|
|
12962
|
-
for (let ce = 0; ce <
|
|
12960
|
+
for (let ce = 0; ce < $.buffered.length; ce++)
|
|
12963
12961
|
xe.push({
|
|
12964
|
-
start:
|
|
12965
|
-
end:
|
|
12966
|
-
length:
|
|
12962
|
+
start: $.buffered.start(ce),
|
|
12963
|
+
end: $.buffered.end(ce),
|
|
12964
|
+
length: $.buffered.end(ce) - $.buffered.start(ce)
|
|
12967
12965
|
});
|
|
12968
12966
|
V(xe);
|
|
12969
12967
|
}
|
|
12970
12968
|
}, []), ee = T(() => {
|
|
12971
|
-
const
|
|
12972
|
-
|
|
12973
|
-
volume:
|
|
12974
|
-
muted:
|
|
12969
|
+
const $ = d.current;
|
|
12970
|
+
$ && H({
|
|
12971
|
+
volume: $.volume,
|
|
12972
|
+
muted: $.muted
|
|
12975
12973
|
});
|
|
12976
12974
|
}, []), Se = T(() => {
|
|
12977
|
-
const
|
|
12978
|
-
|
|
12979
|
-
}, []), de = T((
|
|
12980
|
-
const ce =
|
|
12975
|
+
const $ = d.current;
|
|
12976
|
+
$ && z($.playbackRate);
|
|
12977
|
+
}, []), de = T(($) => {
|
|
12978
|
+
const ce = $.currentTarget.error;
|
|
12981
12979
|
p("error"), console.error("Video error:", ce);
|
|
12982
12980
|
}, []), oe = T(() => {
|
|
12983
12981
|
d.current && d.current.play();
|
|
@@ -12985,27 +12983,27 @@ function lu({
|
|
|
12985
12983
|
d.current && d.current.pause();
|
|
12986
12984
|
}, []), ze = T(() => {
|
|
12987
12985
|
g ? we() : oe();
|
|
12988
|
-
}, [g, oe, we]), ve = T((
|
|
12989
|
-
d.current && (d.current.currentTime = Math.max(0, Math.min(
|
|
12990
|
-
}, [E]), re = T((
|
|
12991
|
-
d.current && (d.current.volume = Math.max(0, Math.min(1,
|
|
12986
|
+
}, [g, oe, we]), ve = T(($) => {
|
|
12987
|
+
d.current && (d.current.currentTime = Math.max(0, Math.min($, E)));
|
|
12988
|
+
}, [E]), re = T(($) => {
|
|
12989
|
+
d.current && (d.current.volume = Math.max(0, Math.min(1, $)), $ > 0 && X.muted && (d.current.muted = !1));
|
|
12992
12990
|
}, [X.muted]), te = T(() => {
|
|
12993
12991
|
d.current && (d.current.muted = !d.current.muted);
|
|
12994
|
-
}, []), ne = T((
|
|
12995
|
-
d.current && (d.current.playbackRate =
|
|
12992
|
+
}, []), ne = T(($) => {
|
|
12993
|
+
d.current && (d.current.playbackRate = $);
|
|
12996
12994
|
}, []), Z = T(async () => {
|
|
12997
|
-
const
|
|
12998
|
-
if (
|
|
12995
|
+
const $ = h.current;
|
|
12996
|
+
if ($)
|
|
12999
12997
|
try {
|
|
13000
|
-
|
|
12998
|
+
$.requestFullscreen ? await $.requestFullscreen() : $.webkitRequestFullscreen && await $.webkitRequestFullscreen(), R(!0);
|
|
13001
12999
|
} catch (xe) {
|
|
13002
13000
|
console.warn("Fullscreen not supported", xe);
|
|
13003
13001
|
}
|
|
13004
13002
|
}, []), Q = T(async () => {
|
|
13005
13003
|
try {
|
|
13006
|
-
document.exitFullscreen ? await document.exitFullscreen() : document.webkitExitFullscreen && await document.webkitExitFullscreen(),
|
|
13007
|
-
} catch (
|
|
13008
|
-
console.warn("Exit fullscreen error",
|
|
13004
|
+
document.exitFullscreen ? await document.exitFullscreen() : document.webkitExitFullscreen && await document.webkitExitFullscreen(), R(!1);
|
|
13005
|
+
} catch ($) {
|
|
13006
|
+
console.warn("Exit fullscreen error", $);
|
|
13009
13007
|
}
|
|
13010
13008
|
}, []), ie = T(() => {
|
|
13011
13009
|
A ? Q() : Z();
|
|
@@ -13013,32 +13011,32 @@ function lu({
|
|
|
13013
13011
|
if (d.current && "pictureInPictureEnabled" in document)
|
|
13014
13012
|
try {
|
|
13015
13013
|
await d.current.requestPictureInPicture(), v(!0);
|
|
13016
|
-
} catch (
|
|
13017
|
-
console.warn("PiP not supported",
|
|
13014
|
+
} catch ($) {
|
|
13015
|
+
console.warn("PiP not supported", $);
|
|
13018
13016
|
}
|
|
13019
13017
|
}, []), Ce = T(async () => {
|
|
13020
13018
|
if (document.pictureInPictureElement)
|
|
13021
13019
|
try {
|
|
13022
13020
|
await document.exitPictureInPicture(), v(!1);
|
|
13023
|
-
} catch (
|
|
13024
|
-
console.warn("Exit PiP error",
|
|
13021
|
+
} catch ($) {
|
|
13022
|
+
console.warn("Exit PiP error", $);
|
|
13025
13023
|
}
|
|
13026
13024
|
}, []), be = T(() => {
|
|
13027
13025
|
U ? Ce() : le();
|
|
13028
13026
|
}, [U, le, Ce]);
|
|
13029
13027
|
return G(() => {
|
|
13030
|
-
const
|
|
13031
|
-
|
|
13028
|
+
const $ = () => {
|
|
13029
|
+
R(!!document.fullscreenElement);
|
|
13032
13030
|
};
|
|
13033
|
-
return document.addEventListener("fullscreenchange",
|
|
13034
|
-
document.removeEventListener("fullscreenchange",
|
|
13031
|
+
return document.addEventListener("fullscreenchange", $), () => {
|
|
13032
|
+
document.removeEventListener("fullscreenchange", $);
|
|
13035
13033
|
};
|
|
13036
13034
|
}, []), G(() => {
|
|
13037
|
-
const
|
|
13035
|
+
const $ = () => {
|
|
13038
13036
|
v(!!document.pictureInPictureElement);
|
|
13039
13037
|
};
|
|
13040
|
-
return document.addEventListener("enterpictureinpicture",
|
|
13041
|
-
document.removeEventListener("enterpictureinpicture",
|
|
13038
|
+
return document.addEventListener("enterpictureinpicture", $), document.addEventListener("leavepictureinpicture", $), () => {
|
|
13039
|
+
document.removeEventListener("enterpictureinpicture", $), document.removeEventListener("leavepictureinpicture", $);
|
|
13042
13040
|
};
|
|
13043
13041
|
}, []), {
|
|
13044
13042
|
videoRef: d,
|
|
@@ -13217,7 +13215,7 @@ function uu({
|
|
|
13217
13215
|
/* @__PURE__ */ b(Ie, { gap: 0, children: [
|
|
13218
13216
|
/* @__PURE__ */ n(Ae, { size: "sm", variant: "subtle", onClick: f, children: t || r === 0 ? /* @__PURE__ */ n(ol, { size: 16 }) : /* @__PURE__ */ n(sl, { size: 16 }) }),
|
|
13219
13217
|
/* @__PURE__ */ n(
|
|
13220
|
-
|
|
13218
|
+
Un,
|
|
13221
13219
|
{
|
|
13222
13220
|
style: { width: 60 },
|
|
13223
13221
|
value: t ? 0 : r * 100,
|
|
@@ -13321,7 +13319,7 @@ function hu({
|
|
|
13321
13319
|
disabled: W = !1,
|
|
13322
13320
|
loading: z,
|
|
13323
13321
|
error: A,
|
|
13324
|
-
noData:
|
|
13322
|
+
noData: R,
|
|
13325
13323
|
onLoadStart: U,
|
|
13326
13324
|
onLoadedMetadata: v,
|
|
13327
13325
|
onCanPlay: P,
|
|
@@ -13363,40 +13361,40 @@ function hu({
|
|
|
13363
13361
|
if (!p || f)
|
|
13364
13362
|
return;
|
|
13365
13363
|
let se;
|
|
13366
|
-
const
|
|
13364
|
+
const Re = () => {
|
|
13367
13365
|
be(!1), clearTimeout(se), Q.isPlaying && (se = setTimeout(() => be(!0), g));
|
|
13368
|
-
},
|
|
13369
|
-
return
|
|
13370
|
-
clearTimeout(se),
|
|
13366
|
+
}, $e = Q.containerRef.current;
|
|
13367
|
+
return $e && ($e.addEventListener("mousemove", Re), $e.addEventListener("click", Re), $e.addEventListener("touchstart", Re)), Q.isPlaying && (se = setTimeout(() => be(!0), g)), () => {
|
|
13368
|
+
clearTimeout(se), $e && ($e.removeEventListener("mousemove", Re), $e.removeEventListener("click", Re), $e.removeEventListener("touchstart", Re));
|
|
13371
13369
|
};
|
|
13372
13370
|
}, [p, f, g, Q.isPlaying]), G(() => {
|
|
13373
13371
|
if (re)
|
|
13374
13372
|
return;
|
|
13375
|
-
const se = (
|
|
13376
|
-
const
|
|
13377
|
-
if (!(
|
|
13378
|
-
switch (
|
|
13373
|
+
const se = (Re) => {
|
|
13374
|
+
const $e = Q.containerRef.current;
|
|
13375
|
+
if (!(!$e || !document.activeElement || !$e.contains(document.activeElement)))
|
|
13376
|
+
switch (Re.key) {
|
|
13379
13377
|
case " ":
|
|
13380
13378
|
case "k":
|
|
13381
|
-
|
|
13379
|
+
Re.preventDefault(), Q.togglePlay();
|
|
13382
13380
|
break;
|
|
13383
13381
|
case "ArrowLeft":
|
|
13384
|
-
|
|
13382
|
+
Re.preventDefault(), Q.seek(Q.currentTime - 5);
|
|
13385
13383
|
break;
|
|
13386
13384
|
case "ArrowRight":
|
|
13387
|
-
|
|
13385
|
+
Re.preventDefault(), Q.seek(Q.currentTime + 5);
|
|
13388
13386
|
break;
|
|
13389
13387
|
case "ArrowUp":
|
|
13390
|
-
|
|
13388
|
+
Re.preventDefault(), Q.setVolume(Math.min(1, Q.volume + 0.1));
|
|
13391
13389
|
break;
|
|
13392
13390
|
case "ArrowDown":
|
|
13393
|
-
|
|
13391
|
+
Re.preventDefault(), Q.setVolume(Math.max(0, Q.volume - 0.1));
|
|
13394
13392
|
break;
|
|
13395
13393
|
case "f":
|
|
13396
|
-
|
|
13394
|
+
Re.preventDefault(), Q.toggleFullscreen();
|
|
13397
13395
|
break;
|
|
13398
13396
|
case "m":
|
|
13399
|
-
|
|
13397
|
+
Re.preventDefault(), Q.toggleMute();
|
|
13400
13398
|
break;
|
|
13401
13399
|
}
|
|
13402
13400
|
};
|
|
@@ -13429,7 +13427,7 @@ function hu({
|
|
|
13429
13427
|
}, [Q.isFullscreen, ee]), G(() => {
|
|
13430
13428
|
Se?.(Q.isPiP);
|
|
13431
13429
|
}, [Q.isPiP, Se]);
|
|
13432
|
-
const
|
|
13430
|
+
const $ = () => {
|
|
13433
13431
|
ve || Q.togglePlay();
|
|
13434
13432
|
};
|
|
13435
13433
|
if (Q.playerState === "error")
|
|
@@ -13454,13 +13452,13 @@ function hu({
|
|
|
13454
13452
|
p: "xl",
|
|
13455
13453
|
style: { width: m, height: typeof w == "number" ? w : void 0 },
|
|
13456
13454
|
className: X,
|
|
13457
|
-
children: /* @__PURE__ */ n(mt, { h: "100%", children: /* @__PURE__ */ n(K, { c: "dimmed", children:
|
|
13455
|
+
children: /* @__PURE__ */ n(mt, { h: "100%", children: /* @__PURE__ */ n(K, { c: "dimmed", children: R || Z("No video source provided") }) })
|
|
13458
13456
|
}
|
|
13459
13457
|
);
|
|
13460
13458
|
const xe = (() => {
|
|
13461
13459
|
if (D) {
|
|
13462
|
-
const [se,
|
|
13463
|
-
return `${
|
|
13460
|
+
const [se, Re] = D.split(":").map(Number);
|
|
13461
|
+
return `${Re / se * 100}%`;
|
|
13464
13462
|
}
|
|
13465
13463
|
return "56.25%";
|
|
13466
13464
|
})(), ce = d && !W && (f || !Ce);
|
|
@@ -13493,7 +13491,7 @@ function hu({
|
|
|
13493
13491
|
alignItems: "center",
|
|
13494
13492
|
justifyContent: "center"
|
|
13495
13493
|
},
|
|
13496
|
-
onClick:
|
|
13494
|
+
onClick: $,
|
|
13497
13495
|
children: [
|
|
13498
13496
|
Q.playerState === "loading" && /* @__PURE__ */ n(Ot, { visible: !0 }),
|
|
13499
13497
|
/* @__PURE__ */ b(
|
|
@@ -13526,8 +13524,8 @@ function hu({
|
|
|
13526
13524
|
onSeeking: F,
|
|
13527
13525
|
onSeeked: () => L?.(Q.currentTime),
|
|
13528
13526
|
children: [
|
|
13529
|
-
Q.sources.map((se,
|
|
13530
|
-
c?.map((se,
|
|
13527
|
+
Q.sources.map((se, Re) => /* @__PURE__ */ n("source", { src: se.src, type: se.type }, Re)),
|
|
13528
|
+
c?.map((se, Re) => /* @__PURE__ */ n(
|
|
13531
13529
|
"track",
|
|
13532
13530
|
{
|
|
13533
13531
|
kind: se.kind,
|
|
@@ -13536,7 +13534,7 @@ function hu({
|
|
|
13536
13534
|
label: se.label,
|
|
13537
13535
|
default: se.default
|
|
13538
13536
|
},
|
|
13539
|
-
|
|
13537
|
+
Re
|
|
13540
13538
|
))
|
|
13541
13539
|
]
|
|
13542
13540
|
}
|
|
@@ -13607,7 +13605,7 @@ function hu({
|
|
|
13607
13605
|
);
|
|
13608
13606
|
}
|
|
13609
13607
|
hu.displayName = "ArchbaseVideoPlayer";
|
|
13610
|
-
const Et = "\x1B",
|
|
13608
|
+
const Et = "\x1B", $r = "", wo = {
|
|
13611
13609
|
left: `${Et}a\0`,
|
|
13612
13610
|
center: `${Et}a`,
|
|
13613
13611
|
right: `${Et}a`
|
|
@@ -13678,20 +13676,20 @@ function mu(e = "full") {
|
|
|
13678
13676
|
if (e === "none")
|
|
13679
13677
|
return new Uint8Array(0);
|
|
13680
13678
|
const t = e === "full" ? "B" : "C";
|
|
13681
|
-
return et(
|
|
13679
|
+
return et($r + "V" + t + "\0");
|
|
13682
13680
|
}
|
|
13683
13681
|
function Cp() {
|
|
13684
13682
|
return et(Et + "p\0<\0");
|
|
13685
13683
|
}
|
|
13686
13684
|
function gu(e, t = 8) {
|
|
13687
13685
|
const r = [];
|
|
13688
|
-
r.push(
|
|
13686
|
+
r.push($r + "(k"), r.push(""), r.push("\0"), r.push("1"), r.push("P"), r.push($r + "(k"), r.push("\0"), r.push("1"), r.push("Q"), r.push("\0");
|
|
13689
13687
|
const i = new TextEncoder().encode(e);
|
|
13690
|
-
return r.push(
|
|
13688
|
+
return r.push($r + "(k"), r.push(String.fromCharCode(i.length + 3)), r.push("\0"), r.push("1"), r.push(""), r.push(String.fromCharCode(...i)), r.push($r + "(k"), r.push("\0"), r.push("2"), r.push(String.fromCharCode(t)), r.push("\0"), et(r.join(""));
|
|
13691
13689
|
}
|
|
13692
13690
|
function yu(e, t = 162) {
|
|
13693
13691
|
const r = [];
|
|
13694
|
-
r.push(
|
|
13692
|
+
r.push($r + "k"), r.push("I"), r.push("\0"), r.push(String.fromCharCode(Math.min(t, 255))), r.push(String.fromCharCode(e.length));
|
|
13695
13693
|
const i = new TextEncoder().encode(e);
|
|
13696
13694
|
return r.push(String.fromCharCode(...i)), et(r.join(""));
|
|
13697
13695
|
}
|
|
@@ -13962,7 +13960,7 @@ function Eu({
|
|
|
13962
13960
|
}, 3e3);
|
|
13963
13961
|
}
|
|
13964
13962
|
}
|
|
13965
|
-
}, [z, a, d, h, f, p]),
|
|
13963
|
+
}, [z, a, d, h, f, p]), R = T(() => {
|
|
13966
13964
|
if (!z)
|
|
13967
13965
|
return;
|
|
13968
13966
|
const P = new Blob([z], { type: "application/octet-stream" }), M = URL.createObjectURL(P), O = document.createElement("a");
|
|
@@ -13980,7 +13978,7 @@ function Eu({
|
|
|
13980
13978
|
case "error":
|
|
13981
13979
|
return /* @__PURE__ */ n(cr, { size: 16, color: "red" });
|
|
13982
13980
|
default:
|
|
13983
|
-
return /* @__PURE__ */ n(
|
|
13981
|
+
return /* @__PURE__ */ n(wn, { size: 16 });
|
|
13984
13982
|
}
|
|
13985
13983
|
}, v = () => {
|
|
13986
13984
|
switch (D) {
|
|
@@ -14035,7 +14033,7 @@ function Eu({
|
|
|
14035
14033
|
{
|
|
14036
14034
|
variant: "light",
|
|
14037
14035
|
leftSection: /* @__PURE__ */ n(Mr, { size: 16 }),
|
|
14038
|
-
onClick:
|
|
14036
|
+
onClick: R,
|
|
14039
14037
|
disabled: !z,
|
|
14040
14038
|
children: E("Download")
|
|
14041
14039
|
}
|
|
@@ -14062,7 +14060,7 @@ function xp({
|
|
|
14062
14060
|
return /* @__PURE__ */ n(
|
|
14063
14061
|
_e,
|
|
14064
14062
|
{
|
|
14065
|
-
leftSection: /* @__PURE__ */ n(
|
|
14063
|
+
leftSection: /* @__PURE__ */ n(wn, { size: 16 }),
|
|
14066
14064
|
onClick: () => {
|
|
14067
14065
|
const o = xs(e);
|
|
14068
14066
|
console.log("ESC/POS Data:", o), t?.();
|
|
@@ -14192,7 +14190,7 @@ async function Ep(e, t, r = "myTheme") {
|
|
|
14192
14190
|
return !1;
|
|
14193
14191
|
}
|
|
14194
14192
|
}
|
|
14195
|
-
function
|
|
14193
|
+
function jn(e, t) {
|
|
14196
14194
|
return {
|
|
14197
14195
|
...e,
|
|
14198
14196
|
...t,
|
|
@@ -14313,7 +14311,7 @@ function Iu({
|
|
|
14313
14311
|
] }),
|
|
14314
14312
|
/* @__PURE__ */ b(ye, { children: [
|
|
14315
14313
|
/* @__PURE__ */ n(K, { size: "sm", fw: 500, mb: "xs", children: "Paleta de Cores" }),
|
|
14316
|
-
/* @__PURE__ */ n(
|
|
14314
|
+
/* @__PURE__ */ n(Rt.Autosize, { mah: 400, children: /* @__PURE__ */ n(We, { gap: "sm", children: o.map((s) => {
|
|
14317
14315
|
const l = e[s];
|
|
14318
14316
|
return typeof l != "object" ? null : /* @__PURE__ */ b(ye, { children: [
|
|
14319
14317
|
/* @__PURE__ */ b(Ie, { justify: "space-between", mb: "xs", children: [
|
|
@@ -14359,7 +14357,7 @@ function Iu({
|
|
|
14359
14357
|
] })
|
|
14360
14358
|
] });
|
|
14361
14359
|
}
|
|
14362
|
-
function
|
|
14360
|
+
function Ru({
|
|
14363
14361
|
theme: e,
|
|
14364
14362
|
onChange: t
|
|
14365
14363
|
}) {
|
|
@@ -14405,7 +14403,7 @@ function $u({
|
|
|
14405
14403
|
] })
|
|
14406
14404
|
] });
|
|
14407
14405
|
}
|
|
14408
|
-
function
|
|
14406
|
+
function $u({
|
|
14409
14407
|
theme: e,
|
|
14410
14408
|
onChange: t
|
|
14411
14409
|
}) {
|
|
@@ -14608,22 +14606,22 @@ function Vu({
|
|
|
14608
14606
|
header: H,
|
|
14609
14607
|
footer: W
|
|
14610
14608
|
}) {
|
|
14611
|
-
const { t: z } = Xe(), A = Mt(), [
|
|
14612
|
-
const j =
|
|
14613
|
-
return s ?
|
|
14609
|
+
const { t: z } = Xe(), A = Mt(), [R, U] = k(o), [v, P] = k(() => {
|
|
14610
|
+
const j = jn(A, e);
|
|
14611
|
+
return s ? jn(j, Eo(s)) : j;
|
|
14614
14612
|
}), [M, O] = k(v.primaryColor || "blue"), [I, x] = k(!1), _ = T((j) => {
|
|
14615
14613
|
P(j), t?.(j);
|
|
14616
14614
|
}, [t]), S = T(() => {
|
|
14617
14615
|
r?.(v);
|
|
14618
14616
|
}, [v, r]), F = T((j) => {
|
|
14619
|
-
const J = Eo(j), ee =
|
|
14617
|
+
const J = Eo(j), ee = jn(v, J);
|
|
14620
14618
|
P(ee), t?.(ee);
|
|
14621
14619
|
}, [v, t]);
|
|
14622
14620
|
T((j, J) => {
|
|
14623
14621
|
a?.(j, J);
|
|
14624
14622
|
}, [a]);
|
|
14625
14623
|
const L = () => {
|
|
14626
|
-
switch (
|
|
14624
|
+
switch (R) {
|
|
14627
14625
|
case "colors":
|
|
14628
14626
|
return /* @__PURE__ */ n(
|
|
14629
14627
|
Iu,
|
|
@@ -14636,7 +14634,7 @@ function Vu({
|
|
|
14636
14634
|
);
|
|
14637
14635
|
case "typography":
|
|
14638
14636
|
return /* @__PURE__ */ n(
|
|
14639
|
-
|
|
14637
|
+
Ru,
|
|
14640
14638
|
{
|
|
14641
14639
|
theme: v,
|
|
14642
14640
|
onChange: _
|
|
@@ -14644,7 +14642,7 @@ function Vu({
|
|
|
14644
14642
|
);
|
|
14645
14643
|
case "spacing":
|
|
14646
14644
|
return /* @__PURE__ */ n(
|
|
14647
|
-
|
|
14645
|
+
$u,
|
|
14648
14646
|
{
|
|
14649
14647
|
theme: v,
|
|
14650
14648
|
onChange: _
|
|
@@ -14661,7 +14659,7 @@ function Vu({
|
|
|
14661
14659
|
default:
|
|
14662
14660
|
return /* @__PURE__ */ b(vr, { icon: /* @__PURE__ */ n(qi, { size: 16 }), children: [
|
|
14663
14661
|
"Seção ",
|
|
14664
|
-
|
|
14662
|
+
R,
|
|
14665
14663
|
" em desenvolvimento"
|
|
14666
14664
|
] });
|
|
14667
14665
|
}
|
|
@@ -14719,7 +14717,7 @@ function Vu({
|
|
|
14719
14717
|
Rn,
|
|
14720
14718
|
{
|
|
14721
14719
|
orientation: "vertical",
|
|
14722
|
-
value:
|
|
14720
|
+
value: R,
|
|
14723
14721
|
onChange: (j) => U(j),
|
|
14724
14722
|
variant: "pills",
|
|
14725
14723
|
children: /* @__PURE__ */ n(Rn.List, { children: C.map((j) => {
|
|
@@ -14873,7 +14871,7 @@ async function Bu(e, t) {
|
|
|
14873
14871
|
u && (u.s = s);
|
|
14874
14872
|
}
|
|
14875
14873
|
Br.book_append_sheet(r, i, t.sheetName || "Sheet1");
|
|
14876
|
-
const l =
|
|
14874
|
+
const l = Rl(r, {
|
|
14877
14875
|
bookType: "xlsx",
|
|
14878
14876
|
type: "array",
|
|
14879
14877
|
bookSST: !1,
|
|
@@ -15065,7 +15063,7 @@ function ju({
|
|
|
15065
15063
|
}
|
|
15066
15064
|
},
|
|
15067
15065
|
children: [
|
|
15068
|
-
/* @__PURE__ */ n(
|
|
15066
|
+
/* @__PURE__ */ n(Rt.Autosize, { mah: "70vh", p: "md", offsetScrollbars: !0, children: /* @__PURE__ */ b(We, { gap: "md", pb: 8, children: [
|
|
15069
15067
|
/* @__PURE__ */ n(
|
|
15070
15068
|
Tt,
|
|
15071
15069
|
{
|
|
@@ -15214,7 +15212,7 @@ function Hu({
|
|
|
15214
15212
|
}
|
|
15215
15213
|
},
|
|
15216
15214
|
children: [
|
|
15217
|
-
/* @__PURE__ */ n(
|
|
15215
|
+
/* @__PURE__ */ n(Rt.Autosize, { mah: "70vh", p: "md", offsetScrollbars: !0, children: /* @__PURE__ */ b(We, { gap: "md", pb: 8, children: [
|
|
15218
15216
|
/* @__PURE__ */ n(
|
|
15219
15217
|
at,
|
|
15220
15218
|
{
|
|
@@ -15440,7 +15438,7 @@ const Wu = (e) => {
|
|
|
15440
15438
|
if (!r)
|
|
15441
15439
|
return /* @__PURE__ */ n("span", {});
|
|
15442
15440
|
try {
|
|
15443
|
-
const i =
|
|
15441
|
+
const i = an(r), o = wt(i, t);
|
|
15444
15442
|
return /* @__PURE__ */ n("span", { style: { textAlign: "center", display: "block" }, children: o });
|
|
15445
15443
|
} catch (i) {
|
|
15446
15444
|
return console.error("Erro ao formatar data:", i), /* @__PURE__ */ n("span", { children: "Data inválida" });
|
|
@@ -15450,7 +15448,7 @@ const Wu = (e) => {
|
|
|
15450
15448
|
if (!r)
|
|
15451
15449
|
return /* @__PURE__ */ n("span", {});
|
|
15452
15450
|
try {
|
|
15453
|
-
const i =
|
|
15451
|
+
const i = an(r), o = wt(i, t);
|
|
15454
15452
|
return /* @__PURE__ */ n("span", { style: { textAlign: "center", display: "block" }, children: o });
|
|
15455
15453
|
} catch (i) {
|
|
15456
15454
|
return console.error("Erro ao formatar data e hora:", i), /* @__PURE__ */ n("span", { children: "Data/hora inválida" });
|
|
@@ -15873,7 +15871,7 @@ const nr = (e, t) => {
|
|
|
15873
15871
|
onClick: r,
|
|
15874
15872
|
color: f.primaryColor,
|
|
15875
15873
|
variant: "filled",
|
|
15876
|
-
children: /* @__PURE__ */ n(
|
|
15874
|
+
children: /* @__PURE__ */ n(wn, { size: 20 })
|
|
15877
15875
|
}
|
|
15878
15876
|
) })
|
|
15879
15877
|
] }),
|
|
@@ -15969,7 +15967,7 @@ const nr = (e, t) => {
|
|
|
15969
15967
|
G(() => {
|
|
15970
15968
|
A(t.quickFilterValues?.[0] || "");
|
|
15971
15969
|
}, [t.quickFilterValues]);
|
|
15972
|
-
const
|
|
15970
|
+
const R = T((O) => {
|
|
15973
15971
|
const I = O || "";
|
|
15974
15972
|
console.log("[Toolbar] applyGlobalFilter chamado com:", O, "-> newValue:", I), A(I);
|
|
15975
15973
|
const x = {
|
|
@@ -15978,8 +15976,8 @@ const nr = (e, t) => {
|
|
|
15978
15976
|
};
|
|
15979
15977
|
console.log("[Toolbar] Chamando onFilterModelChange com:", x), h(x);
|
|
15980
15978
|
}, [t, h]), U = Ge(
|
|
15981
|
-
() => rs((O) =>
|
|
15982
|
-
[
|
|
15979
|
+
() => rs((O) => R(O), 300),
|
|
15980
|
+
[R]
|
|
15983
15981
|
);
|
|
15984
15982
|
G(() => () => {
|
|
15985
15983
|
U.cancel();
|
|
@@ -16032,7 +16030,7 @@ const nr = (e, t) => {
|
|
|
16032
16030
|
A(O || ""), U(O);
|
|
16033
16031
|
},
|
|
16034
16032
|
onClear: () => {
|
|
16035
|
-
A(""),
|
|
16033
|
+
A(""), R(null);
|
|
16036
16034
|
}
|
|
16037
16035
|
}
|
|
16038
16036
|
) : null,
|
|
@@ -16044,7 +16042,7 @@ const nr = (e, t) => {
|
|
|
16044
16042
|
onPrint: g,
|
|
16045
16043
|
globalFilterValue: z,
|
|
16046
16044
|
onGlobalFilterChange: (O) => {
|
|
16047
|
-
A(O || ""),
|
|
16045
|
+
A(O || ""), R(O);
|
|
16048
16046
|
},
|
|
16049
16047
|
renderAdditionalActions: c,
|
|
16050
16048
|
enableGlobalFilter: !1,
|
|
@@ -16345,7 +16343,7 @@ function mh({
|
|
|
16345
16343
|
"aria-label": t ? "Recolher detalhes" : "Expandir detalhes",
|
|
16346
16344
|
title: t ? "Recolher detalhes" : "Expandir detalhes",
|
|
16347
16345
|
"data-row-id": e,
|
|
16348
|
-
children: t ? /* @__PURE__ */ n(
|
|
16346
|
+
children: t ? /* @__PURE__ */ n(cn, { size: 18 }) : /* @__PURE__ */ n(Gr, { size: 18 })
|
|
16349
16347
|
}
|
|
16350
16348
|
);
|
|
16351
16349
|
}
|
|
@@ -16449,7 +16447,7 @@ function bh({
|
|
|
16449
16447
|
};
|
|
16450
16448
|
}, [t, e, r, i]);
|
|
16451
16449
|
}
|
|
16452
|
-
function
|
|
16450
|
+
function Rp({
|
|
16453
16451
|
rows: e,
|
|
16454
16452
|
getRowId: t,
|
|
16455
16453
|
safeGetRowId: r,
|
|
@@ -16496,11 +16494,11 @@ function wh({
|
|
|
16496
16494
|
};
|
|
16497
16495
|
}, [e]), l;
|
|
16498
16496
|
}
|
|
16499
|
-
const rn = 100,
|
|
16497
|
+
const rn = 100, vn = (e) => e && ("appendToFieldArray" in e || "updateFieldArrayItem" in e || "getRecords" in e), Hn = (e) => vn(e) ? e.getRecords?.() || [] : e.browseRecords?.() || [], gr = (e) => vn(e) ? {} : e.getOptions?.() || {}, zr = (e) => {
|
|
16500
16498
|
const t = e.getCurrentPage?.() ?? 0;
|
|
16501
|
-
return console.log("[getCurrentPageFromDataSource] isV2:",
|
|
16499
|
+
return console.log("[getCurrentPageFromDataSource] isV2:", vn(e), "page:", t), t;
|
|
16502
16500
|
};
|
|
16503
|
-
function
|
|
16501
|
+
function $p(e) {
|
|
16504
16502
|
const {
|
|
16505
16503
|
dataSource: t,
|
|
16506
16504
|
enableColumnResizing: r = !0,
|
|
@@ -16528,7 +16526,7 @@ function Rp(e) {
|
|
|
16528
16526
|
renderRowActions: W,
|
|
16529
16527
|
renderToolbarActions: z,
|
|
16530
16528
|
renderToolbarInternalActions: A,
|
|
16531
|
-
allowColumnFilters:
|
|
16529
|
+
allowColumnFilters: R = !0,
|
|
16532
16530
|
allowExportData: U = !0,
|
|
16533
16531
|
allowPrintData: v = !0,
|
|
16534
16532
|
withBorder: P = !0,
|
|
@@ -16560,12 +16558,12 @@ function Rp(e) {
|
|
|
16560
16558
|
bottomToolbarMinHeight: Ce,
|
|
16561
16559
|
gridRef: be,
|
|
16562
16560
|
// Propriedades para o detail panel
|
|
16563
|
-
renderDetailPanel:
|
|
16561
|
+
renderDetailPanel: $,
|
|
16564
16562
|
allowMultipleDetailPanels: xe = !1,
|
|
16565
16563
|
detailPanelMinHeight: ce = 200,
|
|
16566
16564
|
detailPanelStyle: se,
|
|
16567
|
-
detailPanelClassName:
|
|
16568
|
-
onDetailPanelChange:
|
|
16565
|
+
detailPanelClassName: Re,
|
|
16566
|
+
onDetailPanelChange: $e,
|
|
16569
16567
|
detailPanelDisplayMode: Ne = "auto",
|
|
16570
16568
|
// 'auto', 'inline', 'modal', 'drawer'
|
|
16571
16569
|
detailPanelTitle: he = "Detalhes",
|
|
@@ -16608,7 +16606,7 @@ function Rp(e) {
|
|
|
16608
16606
|
console.debug("Módulo de segurança não disponível");
|
|
16609
16607
|
}
|
|
16610
16608
|
}, [me]), Ve;
|
|
16611
|
-
})(ge), gt = ue(null), ke = ue(/* @__PURE__ */ new Map()), st =
|
|
16609
|
+
})(ge), gt = ue(null), ke = ue(/* @__PURE__ */ new Map()), st = vn(t), [ht, ft] = k(() => Hn(t)), [jt, Yt] = k({}), [ur, xn] = k(!1), [Ss, En] = k(!1), [As, kt] = k(!1), [Ds, kn] = k([]), [Ei, Sn] = k([]), [ki, Si] = k(() => {
|
|
16612
16610
|
const me = t.getGrandTotalRecords();
|
|
16613
16611
|
return Number.isFinite(me) ? Math.max(0, me) : 0;
|
|
16614
16612
|
}), [Ht, Er] = k({
|
|
@@ -16617,11 +16615,11 @@ function Rp(e) {
|
|
|
16617
16615
|
Number.isFinite(t?.getPageSize?.()) ? t.getPageSize() : E,
|
|
16618
16616
|
rn
|
|
16619
16617
|
)
|
|
16620
|
-
}), [Ts, zs] = k(() => oh(t)),
|
|
16621
|
-
items:
|
|
16622
|
-
quickFilterValues:
|
|
16623
|
-
}), [Is,
|
|
16624
|
-
expandedRowIds:
|
|
16618
|
+
}), [Ts, zs] = k(() => oh(t)), An = gr(t), [St, Dn] = k({
|
|
16619
|
+
items: An.originFilter || [],
|
|
16620
|
+
quickFilterValues: An.originGlobalFilter ? [An.originGlobalFilter] : []
|
|
16621
|
+
}), [Is, Rs] = k([]), $s = qe !== void 0 ? qe : Is, {
|
|
16622
|
+
expandedRowIds: $t,
|
|
16625
16623
|
detailPanelHeight: Ai,
|
|
16626
16624
|
detailPanelRefs: Di,
|
|
16627
16625
|
toggleExpand: Ti,
|
|
@@ -16631,12 +16629,12 @@ function Rp(e) {
|
|
|
16631
16629
|
setExpandedRowIds: Sh
|
|
16632
16630
|
} = yh({
|
|
16633
16631
|
allowMultipleDetailPanels: xe,
|
|
16634
|
-
onDetailPanelChange:
|
|
16632
|
+
onDetailPanelChange: $e,
|
|
16635
16633
|
detailPanelMinHeight: ce
|
|
16636
16634
|
});
|
|
16637
16635
|
bh({
|
|
16638
16636
|
containerRef: gt,
|
|
16639
|
-
expandedRowIds:
|
|
16637
|
+
expandedRowIds: $t,
|
|
16640
16638
|
detailPanelRefs: Di,
|
|
16641
16639
|
closeAllDetailPanels: yt
|
|
16642
16640
|
});
|
|
@@ -16647,13 +16645,13 @@ function Rp(e) {
|
|
|
16647
16645
|
safeGetRowId: nr,
|
|
16648
16646
|
rowHeight: de,
|
|
16649
16647
|
detailPanelMinHeight: ce
|
|
16650
|
-
}), Pt = ue(!1),
|
|
16648
|
+
}), Pt = ue(!1), Ri = ue(null), Tn = ue(!1);
|
|
16651
16649
|
G(() => () => {
|
|
16652
|
-
|
|
16650
|
+
Ri.current && clearTimeout(Ri.current);
|
|
16653
16651
|
}, []), G(() => {
|
|
16654
16652
|
const me = (Me) => {
|
|
16655
|
-
if (Pt.current ||
|
|
16656
|
-
|
|
16653
|
+
if (Pt.current || Tn.current) {
|
|
16654
|
+
Tn.current = !1;
|
|
16657
16655
|
return;
|
|
16658
16656
|
}
|
|
16659
16657
|
if (Me.id !== void 0 && Me.field)
|
|
@@ -16683,7 +16681,7 @@ function Rp(e) {
|
|
|
16683
16681
|
}, Ns = (me) => {
|
|
16684
16682
|
if (Pt.current)
|
|
16685
16683
|
return;
|
|
16686
|
-
|
|
16684
|
+
Tn.current = !0, kn(me);
|
|
16687
16685
|
const Ve = [];
|
|
16688
16686
|
if (me.forEach((Me) => {
|
|
16689
16687
|
const Be = ht.find((Oe) => {
|
|
@@ -16694,7 +16692,7 @@ function Rp(e) {
|
|
|
16694
16692
|
}
|
|
16695
16693
|
});
|
|
16696
16694
|
Be && Ve.push(Be);
|
|
16697
|
-
}),
|
|
16695
|
+
}), Sn(Ve), V && V(Ve), Ve.length === 1 && t.gotoRecordByData) {
|
|
16698
16696
|
Pt.current = !0;
|
|
16699
16697
|
try {
|
|
16700
16698
|
t.gotoRecordByData(Ve[0]);
|
|
@@ -16705,15 +16703,15 @@ function Rp(e) {
|
|
|
16705
16703
|
Pt.current = !1;
|
|
16706
16704
|
}, 100);
|
|
16707
16705
|
}
|
|
16706
|
+
}, zn = () => {
|
|
16707
|
+
xn(!0);
|
|
16708
16708
|
}, In = () => {
|
|
16709
16709
|
En(!0);
|
|
16710
|
-
}, $n = () => {
|
|
16711
|
-
kn(!0);
|
|
16712
16710
|
}, Vs = (me) => {
|
|
16713
|
-
Lu(ht, zt, me),
|
|
16711
|
+
Lu(ht, zt, me), xn(!1);
|
|
16714
16712
|
}, Ms = (me) => {
|
|
16715
|
-
_u(ht, zt, me),
|
|
16716
|
-
},
|
|
16713
|
+
_u(ht, zt, me), En(!1);
|
|
16714
|
+
}, $i = () => {
|
|
16717
16715
|
if (st) {
|
|
16718
16716
|
const Ve = tn(St, zt), Me = St.quickFilterValues && St.quickFilterValues.length > 0 ? St.quickFilterValues[0] : "";
|
|
16719
16717
|
console.log("[REFRESH V2] Refresh com filtro global:", Me), kt(!0), t.refreshData?.({
|
|
@@ -16755,7 +16753,7 @@ function Rp(e) {
|
|
|
16755
16753
|
const Ve = gr(t);
|
|
16756
16754
|
Ve.sort = me.map((Me) => `${Me.field}:${Me.sort}`), Ve.originSort = me, kt(!0), t.refreshData?.(Ve), yt();
|
|
16757
16755
|
}, Ni = (me) => {
|
|
16758
|
-
if (
|
|
16756
|
+
if (Dn(me), ve && ve(me), console.log("[FILTER] Aplicando filtro:", me), st) {
|
|
16759
16757
|
Er((Oe) => ({ ...Oe, page: 0 }));
|
|
16760
16758
|
const Me = tn(me, zt), Be = me.quickFilterValues && me.quickFilterValues.length > 0 ? me.quickFilterValues[0] : "";
|
|
16761
16759
|
console.log("[FILTER V2] filter construído:", Me, "tipo:", typeof Me), console.log("[FILTER V2] originGlobalFilter:", Be), kt(!0), t.refreshData?.({
|
|
@@ -16770,9 +16768,9 @@ function Rp(e) {
|
|
|
16770
16768
|
const Ve = gr(t);
|
|
16771
16769
|
Ve.filter = tn(me, zt), Ve.originFilter = me.items, Ve.originGlobalFilter = me.quickFilterValues && me.quickFilterValues.length > 0 ? me.quickFilterValues[0] : "", console.log("[FILTER] Filtro global definido como:", Ve.originGlobalFilter), Ve.currentPage = 0, Er((Me) => ({ ...Me, page: 0 })), kt(!0), t.refreshData?.(Ve), yt();
|
|
16772
16770
|
}, Fs = T((me, Ve) => {
|
|
16773
|
-
if (console.log("[COMPOSITE FILTERS] Filtros alterados:", me, "RSQL:", Ve), qe === void 0 &&
|
|
16771
|
+
if (console.log("[COMPOSITE FILTERS] Filtros alterados:", me, "RSQL:", Ve), qe === void 0 && Rs(me), Ke && Ke(me, Ve), Ve || me && me.length > 0) {
|
|
16774
16772
|
const Me = sh(me || []);
|
|
16775
|
-
if (
|
|
16773
|
+
if (Dn(Me), st) {
|
|
16776
16774
|
Er((Oe) => ({ ...Oe, page: 0 })), kt(!0), t.refreshData?.({
|
|
16777
16775
|
currentPage: 0,
|
|
16778
16776
|
pageSize: Ht.pageSize,
|
|
@@ -16786,7 +16784,7 @@ function Rp(e) {
|
|
|
16786
16784
|
const Be = gr(t);
|
|
16787
16785
|
Be.filter = Ve, Be.originFilter = Me.items, Be.currentPage = 0, kt(!0), t.refreshData?.(Be), yt();
|
|
16788
16786
|
} else {
|
|
16789
|
-
if (
|
|
16787
|
+
if (Dn({ items: [], quickFilterValues: [] }), st) {
|
|
16790
16788
|
kt(!0), t.refreshData?.({
|
|
16791
16789
|
currentPage: 0,
|
|
16792
16790
|
pageSize: Ht.pageSize,
|
|
@@ -16801,25 +16799,25 @@ function Rp(e) {
|
|
|
16801
16799
|
}
|
|
16802
16800
|
}, [qe, Ke, st, t, Ht.pageSize]);
|
|
16803
16801
|
G(() => {
|
|
16804
|
-
we && we(
|
|
16802
|
+
we && we(zn), ze && ze(In);
|
|
16805
16803
|
}, [we, ze]), ba(
|
|
16806
16804
|
be,
|
|
16807
16805
|
() => ({
|
|
16808
|
-
refreshData:
|
|
16806
|
+
refreshData: $i,
|
|
16809
16807
|
getSelectedRows: () => Ei,
|
|
16810
16808
|
clearSelection: () => {
|
|
16811
|
-
|
|
16809
|
+
kn([]), Sn([]);
|
|
16812
16810
|
},
|
|
16813
|
-
exportData:
|
|
16814
|
-
printData:
|
|
16811
|
+
exportData: zn,
|
|
16812
|
+
printData: In,
|
|
16815
16813
|
// Métodos adicionais para o detail panel
|
|
16816
16814
|
expandRow: (me) => zi(me),
|
|
16817
16815
|
collapseRow: (me) => kr(me),
|
|
16818
16816
|
collapseAllRows: yt,
|
|
16819
|
-
getExpandedRows: () => Array.from(
|
|
16817
|
+
getExpandedRows: () => Array.from($t),
|
|
16820
16818
|
getFilterModel: () => St
|
|
16821
16819
|
}),
|
|
16822
|
-
[Ei,
|
|
16820
|
+
[Ei, $t, zi, kr, yt, St]
|
|
16823
16821
|
);
|
|
16824
16822
|
const Bs = () => ({
|
|
16825
16823
|
root: {
|
|
@@ -17066,7 +17064,7 @@ function Rp(e) {
|
|
|
17066
17064
|
}
|
|
17067
17065
|
}), Os = Ge(() => typeof m == "string" ? m : Math.max(m, m + Ai), [m, Ai]), zt = Ge(() => {
|
|
17068
17066
|
const me = [], Ve = {};
|
|
17069
|
-
if (
|
|
17067
|
+
if ($ && me.push(gh($t, Ti, ke.current)), s && W) {
|
|
17070
17068
|
const Me = {
|
|
17071
17069
|
field: "actions",
|
|
17072
17070
|
headerName: "Ações",
|
|
@@ -17165,8 +17163,8 @@ function Rp(e) {
|
|
|
17165
17163
|
Fe?.dateTimeFormat,
|
|
17166
17164
|
F,
|
|
17167
17165
|
j,
|
|
17168
|
-
|
|
17169
|
-
|
|
17166
|
+
$,
|
|
17167
|
+
$t,
|
|
17170
17168
|
Ti,
|
|
17171
17169
|
// Dependências de segurança
|
|
17172
17170
|
Ee,
|
|
@@ -17178,7 +17176,7 @@ function Rp(e) {
|
|
|
17178
17176
|
G(() => {
|
|
17179
17177
|
const me = (Ve) => {
|
|
17180
17178
|
if (Ve.type === q.refreshData) {
|
|
17181
|
-
ft(
|
|
17179
|
+
ft(Hn(t));
|
|
17182
17180
|
const Me = Number.isFinite(zr(t)) ? zr(t) : 0, Be = Number.isFinite(t.getPageSize?.()) ? Math.min(Math.max(1, t.getPageSize()), rn) : 10;
|
|
17183
17181
|
Er({
|
|
17184
17182
|
page: Me,
|
|
@@ -17187,7 +17185,7 @@ function Rp(e) {
|
|
|
17187
17185
|
const Oe = Number.isFinite(t.getGrandTotalRecords?.()) ? Math.max(0, t.getGrandTotalRecords()) : 0;
|
|
17188
17186
|
Si(Oe), kt(!1), yt();
|
|
17189
17187
|
} else if (Ve.type === q.dataChanged || Ve.type === q.afterRemove || Ve.type === q.afterSave || Ve.type === q.afterAppend || Ve.type === q.afterCancel) {
|
|
17190
|
-
ft(
|
|
17188
|
+
ft(Hn(t));
|
|
17191
17189
|
const Me = Number.isFinite(zr(t)) ? zr(t) : 0, Be = Number.isFinite(t.getPageSize?.()) ? Math.min(Math.max(1, t.getPageSize()), rn) : 10;
|
|
17192
17190
|
Er({
|
|
17193
17191
|
page: Me,
|
|
@@ -17207,11 +17205,11 @@ function Rp(e) {
|
|
|
17207
17205
|
if (Oe && pe.current) {
|
|
17208
17206
|
Pt.current = !0;
|
|
17209
17207
|
try {
|
|
17210
|
-
|
|
17208
|
+
kn([Be]);
|
|
17211
17209
|
const Sr = ht.find(
|
|
17212
17210
|
(hr) => String(nr(hr, H)) === String(Be)
|
|
17213
17211
|
);
|
|
17214
|
-
Sr && (
|
|
17212
|
+
Sr && (Sn([Sr]), V && V([Sr])), setTimeout(() => {
|
|
17215
17213
|
try {
|
|
17216
17214
|
pe.current.scrollToIndexes({
|
|
17217
17215
|
rowIndex: ht.findIndex(
|
|
@@ -17241,12 +17239,12 @@ function Rp(e) {
|
|
|
17241
17239
|
id: me.field,
|
|
17242
17240
|
title: me.headerName || me.field
|
|
17243
17241
|
})), [zt]), js = () => {
|
|
17244
|
-
if (
|
|
17242
|
+
if (!$ || $t.size === 0)
|
|
17245
17243
|
return null;
|
|
17246
|
-
const me = Array.from(
|
|
17244
|
+
const me = Array.from($t)[0], Ve = ht.find((Oe) => String(nr(Oe, H)) === String(me));
|
|
17247
17245
|
if (!Ve)
|
|
17248
17246
|
return null;
|
|
17249
|
-
const Me = typeof he == "function" ? he(me, Ve) : he, Be =
|
|
17247
|
+
const Me = typeof he == "function" ? he(me, Ve) : he, Be = $({ row: Ve });
|
|
17250
17248
|
return /* @__PURE__ */ n(
|
|
17251
17249
|
"div",
|
|
17252
17250
|
{
|
|
@@ -17262,7 +17260,7 @@ function Rp(e) {
|
|
|
17262
17260
|
children: /* @__PURE__ */ b(
|
|
17263
17261
|
ye,
|
|
17264
17262
|
{
|
|
17265
|
-
className: `detail-panel-container ${
|
|
17263
|
+
className: `detail-panel-container ${Re || ""}`,
|
|
17266
17264
|
style: {
|
|
17267
17265
|
padding: 8,
|
|
17268
17266
|
backgroundColor: De === "dark" ? Y.colors.dark[5] : Y.colors.gray[0],
|
|
@@ -17282,7 +17280,7 @@ function Rp(e) {
|
|
|
17282
17280
|
},
|
|
17283
17281
|
`fixed-detail-panel-${me}`
|
|
17284
17282
|
);
|
|
17285
|
-
}, Hs = () =>
|
|
17283
|
+
}, Hs = () => !$ || $t.size === 0 ? null : Array.from($t).map((me) => {
|
|
17286
17284
|
const Ve = ht.find((Be) => String(nr(Be, H)) === String(me));
|
|
17287
17285
|
if (!Ve)
|
|
17288
17286
|
return null;
|
|
@@ -17292,12 +17290,12 @@ function Rp(e) {
|
|
|
17292
17290
|
{
|
|
17293
17291
|
rowId: me,
|
|
17294
17292
|
rowData: Ve,
|
|
17295
|
-
renderDetailPanel:
|
|
17293
|
+
renderDetailPanel: $,
|
|
17296
17294
|
onClose: kr,
|
|
17297
17295
|
theme: Y,
|
|
17298
|
-
className:
|
|
17296
|
+
className: Re,
|
|
17299
17297
|
style: se,
|
|
17300
|
-
opened:
|
|
17298
|
+
opened: $t.has(me),
|
|
17301
17299
|
title: Me
|
|
17302
17300
|
},
|
|
17303
17301
|
`detail-modal-${me}`
|
|
@@ -17306,12 +17304,12 @@ function Rp(e) {
|
|
|
17306
17304
|
{
|
|
17307
17305
|
rowId: me,
|
|
17308
17306
|
rowData: Ve,
|
|
17309
|
-
renderDetailPanel:
|
|
17307
|
+
renderDetailPanel: $,
|
|
17310
17308
|
onClose: kr,
|
|
17311
17309
|
theme: Y,
|
|
17312
|
-
className:
|
|
17310
|
+
className: Re,
|
|
17313
17311
|
style: se,
|
|
17314
|
-
opened:
|
|
17312
|
+
opened: $t.has(me),
|
|
17315
17313
|
title: Me,
|
|
17316
17314
|
position: Ue,
|
|
17317
17315
|
size: Pe
|
|
@@ -17322,12 +17320,12 @@ function Rp(e) {
|
|
|
17322
17320
|
{
|
|
17323
17321
|
rowId: me,
|
|
17324
17322
|
rowData: Ve,
|
|
17325
|
-
renderDetailPanel:
|
|
17323
|
+
renderDetailPanel: $,
|
|
17326
17324
|
onClose: kr,
|
|
17327
17325
|
theme: Y,
|
|
17328
|
-
className:
|
|
17326
|
+
className: Re,
|
|
17329
17327
|
style: se,
|
|
17330
|
-
opened:
|
|
17328
|
+
opened: $t.has(me),
|
|
17331
17329
|
title: Me
|
|
17332
17330
|
},
|
|
17333
17331
|
`detail-modal-${me}`
|
|
@@ -17363,14 +17361,14 @@ function Rp(e) {
|
|
|
17363
17361
|
renderToolbarInternalActions: A,
|
|
17364
17362
|
theme: Y,
|
|
17365
17363
|
onFilterModelChange: Ni,
|
|
17366
|
-
onRefresh:
|
|
17367
|
-
onExport:
|
|
17368
|
-
onPrint:
|
|
17364
|
+
onRefresh: $i,
|
|
17365
|
+
onExport: zn,
|
|
17366
|
+
onPrint: In,
|
|
17369
17367
|
apiRef: pe,
|
|
17370
17368
|
children: B,
|
|
17371
17369
|
useCompositeFilters: fe,
|
|
17372
17370
|
filterDefinitions: _s,
|
|
17373
|
-
activeFilters:
|
|
17371
|
+
activeFilters: $s,
|
|
17374
17372
|
onFiltersChange: Fs,
|
|
17375
17373
|
hideMuiFilters: Je,
|
|
17376
17374
|
withBorder: ct,
|
|
@@ -17406,7 +17404,7 @@ function Rp(e) {
|
|
|
17406
17404
|
onColumnVisibilityModelChange: Yt,
|
|
17407
17405
|
getRowId: (me) => nr(me, H) || "",
|
|
17408
17406
|
sx: Bs().root,
|
|
17409
|
-
disableColumnFilter:
|
|
17407
|
+
disableColumnFilter: !R,
|
|
17410
17408
|
disableColumnMenu: !0,
|
|
17411
17409
|
hideFooter: te,
|
|
17412
17410
|
slots: {
|
|
@@ -17437,7 +17435,7 @@ function Rp(e) {
|
|
|
17437
17435
|
ju,
|
|
17438
17436
|
{
|
|
17439
17437
|
opened: ur,
|
|
17440
|
-
onClose: () =>
|
|
17438
|
+
onClose: () => xn(!1),
|
|
17441
17439
|
onExport: Vs,
|
|
17442
17440
|
columns: Vi,
|
|
17443
17441
|
defaultConfig: {
|
|
@@ -17450,7 +17448,7 @@ function Rp(e) {
|
|
|
17450
17448
|
Hu,
|
|
17451
17449
|
{
|
|
17452
17450
|
opened: Ss,
|
|
17453
|
-
onClose: () =>
|
|
17451
|
+
onClose: () => En(!1),
|
|
17454
17452
|
onPrint: Ms,
|
|
17455
17453
|
columns: Vi,
|
|
17456
17454
|
defaultConfig: {
|
|
@@ -17546,7 +17544,7 @@ function Np({
|
|
|
17546
17544
|
}) {
|
|
17547
17545
|
const u = r({ row: t });
|
|
17548
17546
|
return /* @__PURE__ */ b(
|
|
17549
|
-
|
|
17547
|
+
$n,
|
|
17550
17548
|
{
|
|
17551
17549
|
position: "bottom",
|
|
17552
17550
|
width: c,
|
|
@@ -17554,13 +17552,13 @@ function Np({
|
|
|
17554
17552
|
withinPortal: !0,
|
|
17555
17553
|
onClose: () => i(e),
|
|
17556
17554
|
children: [
|
|
17557
|
-
/* @__PURE__ */ n(
|
|
17555
|
+
/* @__PURE__ */ n($n.Target, { children: a.current ? /* @__PURE__ */ n("div", { style: { display: "inline-block" }, children: /* @__PURE__ */ n("span", { ref: (d) => {
|
|
17558
17556
|
if (d && a.current) {
|
|
17559
17557
|
const h = a.current.getBoundingClientRect();
|
|
17560
17558
|
d.style.position = "absolute", d.style.left = `${h.left}px`, d.style.top = `${h.top}px`, d.style.width = `${h.width}px`, d.style.height = `${h.height}px`;
|
|
17561
17559
|
}
|
|
17562
17560
|
} }) }) : /* @__PURE__ */ n("span", {}) }),
|
|
17563
|
-
/* @__PURE__ */ n(
|
|
17561
|
+
/* @__PURE__ */ n($n.Dropdown, { children: /* @__PURE__ */ b(
|
|
17564
17562
|
ye,
|
|
17565
17563
|
{
|
|
17566
17564
|
className: `detail-panel-container ${s || ""}`,
|
|
@@ -17651,7 +17649,7 @@ function Vp(e, t, r, i) {
|
|
|
17651
17649
|
}
|
|
17652
17650
|
function Mp({ currentValue: e, values: t }) {
|
|
17653
17651
|
const r = t.findIndex((i) => i.value.toString() === e);
|
|
17654
|
-
return r !== -1 ? /* @__PURE__ */ n(ye, { children: /* @__PURE__ */ n(oi, { color: t[r].color, children:
|
|
17652
|
+
return r !== -1 ? /* @__PURE__ */ n(ye, { children: /* @__PURE__ */ n(oi, { color: t[r].color, children: $l(t[r].label) }) }) : null;
|
|
17655
17653
|
}
|
|
17656
17654
|
const To = (e, t) => {
|
|
17657
17655
|
if (!(!e || !t || t.length === 0 || t.filter((i) => i.enableGlobalFilter !== !1).length === 0))
|
|
@@ -17760,7 +17758,7 @@ function Lp({
|
|
|
17760
17758
|
};
|
|
17761
17759
|
}), [E, D] = k([]), [B, V] = k([]), [X, H] = k(() => e.getGrandTotalRecords()), [W, z] = k(
|
|
17762
17760
|
() => Math.ceil(e.getGrandTotalRecords() / (e.getPageSize() || t))
|
|
17763
|
-
), A = ue(!1),
|
|
17761
|
+
), A = ue(!1), R = ue(!1), U = ue(!0), v = ue(null);
|
|
17764
17762
|
G(() => {
|
|
17765
17763
|
a.current = e;
|
|
17766
17764
|
}, [e]);
|
|
@@ -17777,9 +17775,9 @@ function Lp({
|
|
|
17777
17775
|
const F = a.current, L = F.getOptions?.() || {};
|
|
17778
17776
|
L.filter = vh(S, o), L.originFilter = S.items, L.originGlobalFilter = S.quickFilterValues && S.quickFilterValues.length > 0 ? S.quickFilterValues[0] : "", L.currentPage = 0, p((C) => ({ ...C, page: 0 })), A.current = !0, h(!0), F.refreshData?.(L), s || l();
|
|
17779
17777
|
}, [o, l, s]), I = T((S) => {
|
|
17780
|
-
if (
|
|
17778
|
+
if (!R.current)
|
|
17781
17779
|
try {
|
|
17782
|
-
|
|
17780
|
+
R.current = !0, D(S);
|
|
17783
17781
|
const F = [];
|
|
17784
17782
|
if (S.forEach((L) => {
|
|
17785
17783
|
const C = c.find((j) => {
|
|
@@ -17806,11 +17804,11 @@ function Lp({
|
|
|
17806
17804
|
}
|
|
17807
17805
|
} finally {
|
|
17808
17806
|
setTimeout(() => {
|
|
17809
|
-
|
|
17807
|
+
R.current = !1;
|
|
17810
17808
|
}, 200);
|
|
17811
17809
|
}
|
|
17812
17810
|
}, [c, i]), x = T((S, F, L) => {
|
|
17813
|
-
if (
|
|
17811
|
+
if (!R.current && (F.key === "ArrowUp" || F.key === "ArrowDown") && E.length === 1) {
|
|
17814
17812
|
const C = c.findIndex((J) => {
|
|
17815
17813
|
try {
|
|
17816
17814
|
return String(i(J)) === String(E[0]);
|
|
@@ -17823,11 +17821,11 @@ function Lp({
|
|
|
17823
17821
|
const J = c[j];
|
|
17824
17822
|
try {
|
|
17825
17823
|
const ee = i(J);
|
|
17826
|
-
|
|
17827
|
-
|
|
17824
|
+
R.current = !0, D([ee]), V([J]), a.current.gotoRecordByData(J), setTimeout(() => {
|
|
17825
|
+
R.current = !1;
|
|
17828
17826
|
}, 200);
|
|
17829
17827
|
} catch (ee) {
|
|
17830
|
-
console.error("Error during keyboard navigation:", ee),
|
|
17828
|
+
console.error("Error during keyboard navigation:", ee), R.current = !1;
|
|
17831
17829
|
}
|
|
17832
17830
|
}
|
|
17833
17831
|
}
|
|
@@ -17837,7 +17835,7 @@ function Lp({
|
|
|
17837
17835
|
return G(() => {
|
|
17838
17836
|
console.log("Setting up DataSource event listener in useGridData");
|
|
17839
17837
|
const S = (L) => {
|
|
17840
|
-
if (!U.current && !(
|
|
17838
|
+
if (!U.current && !(R.current && L.type === q.afterScroll)) {
|
|
17841
17839
|
if (L.type === q.refreshData) {
|
|
17842
17840
|
u(a.current.browseRecords()), p({
|
|
17843
17841
|
page: a.current.getCurrentPage(),
|
|
@@ -17859,7 +17857,7 @@ function Lp({
|
|
|
17859
17857
|
pageSize: a.current.getPageSize()
|
|
17860
17858
|
}), H(a.current.getGrandTotalRecords()), z(Math.ceil(a.current.getGrandTotalRecords() / a.current.getPageSize())), h(!1), A.current = !1, s || l();
|
|
17861
17859
|
else if (L.type === q.afterScroll) {
|
|
17862
|
-
if (
|
|
17860
|
+
if (R.current)
|
|
17863
17861
|
return;
|
|
17864
17862
|
const C = a.current.getCurrentRecord();
|
|
17865
17863
|
if (C)
|
|
@@ -17867,8 +17865,8 @@ function Lp({
|
|
|
17867
17865
|
const j = i(C);
|
|
17868
17866
|
j !== void 0 && (E.some(
|
|
17869
17867
|
(ee) => String(ee) === String(j)
|
|
17870
|
-
) || (
|
|
17871
|
-
|
|
17868
|
+
) || (R.current = !0, D([j]), V([C]), setTimeout(() => {
|
|
17869
|
+
R.current = !1;
|
|
17872
17870
|
}, 200)));
|
|
17873
17871
|
} catch (j) {
|
|
17874
17872
|
console.error("Error processing afterScroll event:", j);
|
|
@@ -18236,7 +18234,7 @@ export {
|
|
|
18236
18234
|
Hf as ArchbaseCountdownProgress,
|
|
18237
18235
|
Uf as ArchbaseCronExpressionEdit,
|
|
18238
18236
|
vc as ArchbaseCronExpressionEditor,
|
|
18239
|
-
|
|
18237
|
+
$p as ArchbaseDataGrid,
|
|
18240
18238
|
ih as ArchbaseDataGridColumn,
|
|
18241
18239
|
fh as ArchbaseDataGridPagination,
|
|
18242
18240
|
uh as ArchbaseDataGridToolbar,
|
|
@@ -18270,7 +18268,7 @@ export {
|
|
|
18270
18268
|
ou as ArchbaseLinkRenderer,
|
|
18271
18269
|
Sc as ArchbaseList,
|
|
18272
18270
|
yi as ArchbaseListContext,
|
|
18273
|
-
|
|
18271
|
+
pn as ArchbaseListItem,
|
|
18274
18272
|
ep as ArchbaseListViewTable,
|
|
18275
18273
|
sm as ArchbaseLoader,
|
|
18276
18274
|
Df as ArchbaseLookupEdit,
|
|
@@ -18293,16 +18291,16 @@ export {
|
|
|
18293
18291
|
hd as ArchbaseObjectInspector,
|
|
18294
18292
|
lp as ArchbaseOnboardingTour,
|
|
18295
18293
|
jf as ArchbaseOperatingHoursEditor,
|
|
18296
|
-
|
|
18297
|
-
|
|
18294
|
+
Rd as ArchbasePDFAnnotations,
|
|
18295
|
+
$d as ArchbasePDFAnnotationsList,
|
|
18298
18296
|
dp as ArchbasePDFViewer,
|
|
18299
18297
|
fo as ArchbasePDFViewerToolbar,
|
|
18300
18298
|
um as ArchbasePagination,
|
|
18301
18299
|
If as ArchbasePasswordEdit,
|
|
18302
18300
|
hm as ArchbaseProgress,
|
|
18303
|
-
|
|
18301
|
+
Rf as ArchbaseRadioGroup,
|
|
18304
18302
|
fc as ArchbaseRadioItem,
|
|
18305
|
-
|
|
18303
|
+
$f as ArchbaseRating,
|
|
18306
18304
|
Pf as ArchbaseRichTextEdit,
|
|
18307
18305
|
ls as ArchbaseSelect,
|
|
18308
18306
|
wc as ArchbaseSelectContext,
|
|
@@ -18353,8 +18351,8 @@ export {
|
|
|
18353
18351
|
gh as createExpandColumn,
|
|
18354
18352
|
Vd as detectFileType,
|
|
18355
18353
|
Nd as detectFileTypeByContent,
|
|
18356
|
-
|
|
18357
|
-
|
|
18354
|
+
On as detectFileTypeByExtension,
|
|
18355
|
+
_n as detectFileTypeByMimeType,
|
|
18358
18356
|
Co as divider,
|
|
18359
18357
|
Du as downloadTheme,
|
|
18360
18358
|
pr as escposAlign,
|
|
@@ -18388,7 +18386,7 @@ export {
|
|
|
18388
18386
|
Up as formatTime,
|
|
18389
18387
|
ao as formatTimelineDate,
|
|
18390
18388
|
Ap as generateColorScale,
|
|
18391
|
-
|
|
18389
|
+
mn as generateFilterId,
|
|
18392
18390
|
xs as generateReceiptEscpos,
|
|
18393
18391
|
nh as getAlignmentByDataType,
|
|
18394
18392
|
Cu as getCharsWidth,
|
|
@@ -18406,7 +18404,7 @@ export {
|
|
|
18406
18404
|
Sp as isValidColor,
|
|
18407
18405
|
kf as languages,
|
|
18408
18406
|
fu as line,
|
|
18409
|
-
|
|
18407
|
+
jn as mergeTheme,
|
|
18410
18408
|
Oc as mergeTimelineOptions,
|
|
18411
18409
|
Pr as normalizeDate,
|
|
18412
18410
|
Hc as normalizeRange,
|
|
@@ -18424,7 +18422,7 @@ export {
|
|
|
18424
18422
|
ko as renderText,
|
|
18425
18423
|
Zu as renderTime,
|
|
18426
18424
|
th as renderUUID,
|
|
18427
|
-
|
|
18425
|
+
Cn as revokeFileUrl,
|
|
18428
18426
|
zu as rgbToHex,
|
|
18429
18427
|
bp as rightAlignText,
|
|
18430
18428
|
nr as safeGetRowId,
|
|
@@ -18445,7 +18443,7 @@ export {
|
|
|
18445
18443
|
Qp as useArchbaseVisible,
|
|
18446
18444
|
wh as useAvailableSpace,
|
|
18447
18445
|
bh as useDetailPanelAutoClose,
|
|
18448
|
-
|
|
18446
|
+
Rp as useDetailPanelPositions,
|
|
18449
18447
|
yh as useDetailPanels,
|
|
18450
18448
|
Lp as useGridData,
|
|
18451
18449
|
lu as useVideoPlayer,
|