@firecms/core 3.0.0-canary.2 → 3.0.0-canary.3
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.es.js +423 -424
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +3 -3
- package/dist/index.umd.js.map +1 -1
- package/package.json +4 -4
- package/src/hooks/useBuildNavigationController.tsx +1 -9
package/dist/index.es.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as n, jsxs as _, Fragment as
|
|
1
|
+
import { jsx as n, jsxs as _, Fragment as z } from "react/jsx-runtime";
|
|
2
2
|
import * as Fr from "react";
|
|
3
3
|
import I, { useRef as ce, useEffect as O, useContext as je, useCallback as k, useMemo as pe, useState as Q, createElement as $o, createRef as Wo, createContext as Jo, forwardRef as Ho, useLayoutEffect as Qr, useDeferredValue as Zo } from "react";
|
|
4
4
|
import { SnackbarProvider as Xo, useSnackbar as Ko } from "notistack";
|
|
5
5
|
import Bi from "object-hash";
|
|
6
6
|
import { getIn as Kt, Field as cn, useFormex as Lr, useCreateFormex as dn, Formex as un, setIn as Dr } from "@firecms/formex";
|
|
7
|
-
import { getColorSchemeForSeed as mn, CHIP_COLORS as ea, CircleIcon as pn, FunctionsIcon as ta, iconKeys as $r, coolIconKeys as Rr, Icon as Wr, Tooltip as _e, ErrorIcon as fn, Typography as J, IconButton as se, ContentCopyIcon as Jr, OpenInNewIcon as ar, DescriptionIcon as ra, Skeleton as Ue, Chip as Hr, cn as
|
|
7
|
+
import { getColorSchemeForSeed as mn, CHIP_COLORS as ea, CircleIcon as pn, FunctionsIcon as ta, iconKeys as $r, coolIconKeys as Rr, Icon as Wr, Tooltip as _e, ErrorIcon as fn, Typography as J, IconButton as se, ContentCopyIcon as Jr, OpenInNewIcon as ar, DescriptionIcon as ra, Skeleton as Ue, Chip as Hr, cn as ie, defaultBorderMixin as Be, KeyboardTabIcon as Zr, Checkbox as hn, Markdown as sr, TextareaAutosize as ia, MultiSelect as gn, MultiSelectItem as An, Select as tt, SelectItem as rt, BooleanSwitch as na, DateTimeField as zt, paperMixin as lr, ErrorOutlineIcon as oa, EditIcon as aa, Button as ge, RemoveCircleIcon as sa, Menu as Vt, MoreVertIcon as la, MenuItem as De, FilterListOffIcon as ca, CircularProgress as Gt, SearchBar as Xr, Badge as Ci, ArrowUpwardIcon as yr, Popover as Kr, FilterListIcon as da, AssignmentIcon as ua, TextField as yt, ClearIcon as Qt, BooleanSwitchWithLabel as cr, useOutsideAlerter as bn, AddIcon as ct, DeleteIcon as Pr, InfoIcon as ma, CloseIcon as yn, ExpandablePanel as ut, RemoveIcon as ei, fieldBackgroundMixin as wn, fieldBackgroundDisabledMixin as vn, fieldBackgroundHoverMixin as ti, focusedMixin as Si, Collapse as _n, ArrowDropDownIcon as kn, useInjectStyles as pa, Dialog as ri, DialogContent as ii, DialogActions as kt, FileCopyIcon as fa, ContentPasteIcon as ha, Alert as ga, SearchIcon as Aa, Card as ba, StarIcon as xn, StarBorderIcon as En, ArrowForwardIcon as ya, Container as wa, LoadingButton as va, Avatar as Ii, DarkModeIcon as _a, LightModeIcon as ka, LogoutIcon as xa, HandleIcon as Ea, debounce as Ba, Tab as wr, Tabs as Ca, Sheet as Bn, CenteredView as Ni, MenuIcon as Fi, ChevronLeftIcon as Sa, ShortTextIcon as Ia, SubjectIcon as Na, FormatQuoteIcon as Fa, HttpIcon as Qa, EmailIcon as Da, FlagIcon as Ra, ListIcon as Pa, ListAltIcon as Ta, NumbersIcon as Oa, FormatListNumberedIcon as Qi, UploadFileIcon as Ma, DriveFolderUploadIcon as za, LinkIcon as Va, AddLinkIcon as Ga, ScheduleIcon as ja, BallotIcon as Di, RepeatIcon as Ri, ViewStreamIcon as Ya } from "@firecms/ui";
|
|
8
8
|
import { useNavigate as dr, useLocation as jt, Link as ni, UNSAFE_NavigationContext as qa, NavLink as Ua, Route as Jt, Routes as La } from "react-router-dom";
|
|
9
9
|
import * as Cn from "js-search";
|
|
10
10
|
import W from "react-fast-compare";
|
|
@@ -3629,7 +3629,7 @@ function Ts({
|
|
|
3629
3629
|
}
|
|
3630
3630
|
}
|
|
3631
3631
|
),
|
|
3632
|
-
r && /* @__PURE__ */ _(
|
|
3632
|
+
r && /* @__PURE__ */ _(z, { children: [
|
|
3633
3633
|
navigator && /* @__PURE__ */ n(_e, { title: "Copy url to clipboard", children: /* @__PURE__ */ n(
|
|
3634
3634
|
"div",
|
|
3635
3635
|
{
|
|
@@ -3763,7 +3763,7 @@ function Ot({
|
|
|
3763
3763
|
i.url ? r = js(i, t) : i.storage ? r = co(t) : r = nt();
|
|
3764
3764
|
} else if (e.dataType === "array") {
|
|
3765
3765
|
const i = e;
|
|
3766
|
-
i.of && (Array.isArray(i.of) ? r = /* @__PURE__ */ _(
|
|
3766
|
+
i.of && (Array.isArray(i.of) ? r = /* @__PURE__ */ _(z, { children: [
|
|
3767
3767
|
i.of.map((o, a) => xr(o, a)),
|
|
3768
3768
|
" "
|
|
3769
3769
|
] }) : i.of.dataType === "map" && i.of.properties ? r = Ms(i.of.properties, t, i.of.previewProperties) : i.of.dataType === "string" ? i.of.enumValues ? r = Vs() : i.of.storage ? r = xr(i.of) : r = zs() : r = xr(i.of));
|
|
@@ -3773,7 +3773,7 @@ function Ot({
|
|
|
3773
3773
|
}
|
|
3774
3774
|
function Os(e, t) {
|
|
3775
3775
|
if (!e.properties)
|
|
3776
|
-
return /* @__PURE__ */ n(
|
|
3776
|
+
return /* @__PURE__ */ n(z, {});
|
|
3777
3777
|
let r;
|
|
3778
3778
|
return t === "medium" ? r = Object.keys(e.properties) : (r = e.previewProperties || Object.keys(e.properties), t === "small" ? r = r.slice(0, 3) : t === "tiny" && (r = r.slice(0, 1))), t !== "medium" ? /* @__PURE__ */ n(
|
|
3779
3779
|
"div",
|
|
@@ -3843,7 +3843,7 @@ function zs() {
|
|
|
3843
3843
|
}
|
|
3844
3844
|
function Vs() {
|
|
3845
3845
|
return /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: [0, 1].map(
|
|
3846
|
-
(e, t) => /* @__PURE__ */ n(
|
|
3846
|
+
(e, t) => /* @__PURE__ */ n(z, { children: nt(t) })
|
|
3847
3847
|
) });
|
|
3848
3848
|
}
|
|
3849
3849
|
function xr(e, t = 0) {
|
|
@@ -3852,7 +3852,7 @@ function xr(e, t = 0) {
|
|
|
3852
3852
|
{
|
|
3853
3853
|
className: "flex flex-col gap-2",
|
|
3854
3854
|
children: [0, 1].map(
|
|
3855
|
-
(r, i) => /* @__PURE__ */ n(
|
|
3855
|
+
(r, i) => /* @__PURE__ */ n(z, { children: /* @__PURE__ */ n(
|
|
3856
3856
|
Ot,
|
|
3857
3857
|
{
|
|
3858
3858
|
property: e,
|
|
@@ -4008,14 +4008,14 @@ function mo({
|
|
|
4008
4008
|
);
|
|
4009
4009
|
{
|
|
4010
4010
|
if (!t)
|
|
4011
|
-
return /* @__PURE__ */ n(
|
|
4011
|
+
return /* @__PURE__ */ n(z, {});
|
|
4012
4012
|
const o = t.split(`
|
|
4013
4013
|
`);
|
|
4014
4014
|
return t && t.includes(`
|
|
4015
4015
|
`) ? /* @__PURE__ */ n("div", { className: "overflow-x-scroll", children: o.map((a, s) => /* @__PURE__ */ _(I.Fragment, { children: [
|
|
4016
4016
|
/* @__PURE__ */ n("span", { children: a }),
|
|
4017
4017
|
s !== o.length - 1 && /* @__PURE__ */ n("br", {})
|
|
4018
|
-
] }, `string_preview_${s}`)) }) : /* @__PURE__ */ n(
|
|
4018
|
+
] }, `string_preview_${s}`)) }) : /* @__PURE__ */ n(z, { children: t });
|
|
4019
4019
|
}
|
|
4020
4020
|
}
|
|
4021
4021
|
}
|
|
@@ -4046,7 +4046,7 @@ function Yi({
|
|
|
4046
4046
|
return u ? /* @__PURE__ */ n(
|
|
4047
4047
|
I.Fragment,
|
|
4048
4048
|
{
|
|
4049
|
-
children: /* @__PURE__ */ n("div", { className:
|
|
4049
|
+
children: /* @__PURE__ */ n("div", { className: ie(Be, "m-1 border-b last:border-b-0"), children: /* @__PURE__ */ n(de, { children: /* @__PURE__ */ n(
|
|
4050
4050
|
Re,
|
|
4051
4051
|
{
|
|
4052
4052
|
propertyKey: e,
|
|
@@ -4138,7 +4138,7 @@ function Hs({ reference: e, collection: t, previewProperties: r, size: i, disabl
|
|
|
4138
4138
|
error: "Reference does not exist",
|
|
4139
4139
|
tooltip: e.path
|
|
4140
4140
|
}
|
|
4141
|
-
) : y = /* @__PURE__ */ _(
|
|
4141
|
+
) : y = /* @__PURE__ */ _(z, { children: [
|
|
4142
4142
|
/* @__PURE__ */ _(
|
|
4143
4143
|
"div",
|
|
4144
4144
|
{
|
|
@@ -4224,7 +4224,7 @@ function hi({
|
|
|
4224
4224
|
J,
|
|
4225
4225
|
{
|
|
4226
4226
|
variant: "label",
|
|
4227
|
-
className:
|
|
4227
|
+
className: ie(
|
|
4228
4228
|
"bg-opacity-70 bg-gray-100 dark:bg-gray-800 dark:bg-opacity-60",
|
|
4229
4229
|
"w-full",
|
|
4230
4230
|
"flex",
|
|
@@ -4419,7 +4419,7 @@ function el({
|
|
|
4419
4419
|
(f, m) => /* @__PURE__ */ n(
|
|
4420
4420
|
I.Fragment,
|
|
4421
4421
|
{
|
|
4422
|
-
children: /* @__PURE__ */ n("div", { className:
|
|
4422
|
+
children: /* @__PURE__ */ n("div", { className: ie(Be, "m-1 border-b last:border-b-0"), children: /* @__PURE__ */ n(de, { children: f && /* @__PURE__ */ n(
|
|
4423
4423
|
Re,
|
|
4424
4424
|
{
|
|
4425
4425
|
propertyKey: e,
|
|
@@ -4471,7 +4471,7 @@ function tl({
|
|
|
4471
4471
|
return /* @__PURE__ */ _(
|
|
4472
4472
|
"div",
|
|
4473
4473
|
{
|
|
4474
|
-
className:
|
|
4474
|
+
className: ie(Be, "last:border-b-0 border-b"),
|
|
4475
4475
|
children: [
|
|
4476
4476
|
/* @__PURE__ */ _(
|
|
4477
4477
|
"div",
|
|
@@ -4511,7 +4511,7 @@ function tl({
|
|
|
4511
4511
|
]
|
|
4512
4512
|
}
|
|
4513
4513
|
),
|
|
4514
|
-
(c.dataType === "map" || c === "array") && /* @__PURE__ */ n("div", { className:
|
|
4514
|
+
(c.dataType === "map" || c === "array") && /* @__PURE__ */ n("div", { className: ie(Be, "border-l pl-4 ml-2 my-2"), children: /* @__PURE__ */ n(
|
|
4515
4515
|
Re,
|
|
4516
4516
|
{
|
|
4517
4517
|
propertyKey: s,
|
|
@@ -4536,7 +4536,7 @@ function fo({ value: e }) {
|
|
|
4536
4536
|
children: Object.entries(e).map(([t, r]) => /* @__PURE__ */ _(
|
|
4537
4537
|
"div",
|
|
4538
4538
|
{
|
|
4539
|
-
className:
|
|
4539
|
+
className: ie(Be, "last:border-b-0 border-b"),
|
|
4540
4540
|
children: [
|
|
4541
4541
|
/* @__PURE__ */ _(
|
|
4542
4542
|
"div",
|
|
@@ -4569,7 +4569,7 @@ function fo({ value: e }) {
|
|
|
4569
4569
|
]
|
|
4570
4570
|
}
|
|
4571
4571
|
),
|
|
4572
|
-
typeof r == "object" && /* @__PURE__ */ n("div", { className:
|
|
4572
|
+
typeof r == "object" && /* @__PURE__ */ n("div", { className: ie(Be, "border-l pl-4"), children: /* @__PURE__ */ n(fo, { value: r }) })
|
|
4573
4573
|
]
|
|
4574
4574
|
},
|
|
4575
4575
|
`map_preview_table_${t}}`
|
|
@@ -4581,7 +4581,7 @@ function rl({
|
|
|
4581
4581
|
date: e
|
|
4582
4582
|
}) {
|
|
4583
4583
|
const t = ue(), r = t?.locale ? Sn[t?.locale] : void 0, i = t?.dateTimeFormat ?? ds, o = e ? $a(e, i, { locale: r }) : "";
|
|
4584
|
-
return /* @__PURE__ */ n(
|
|
4584
|
+
return /* @__PURE__ */ n(z, { children: o });
|
|
4585
4585
|
}
|
|
4586
4586
|
function il({ value: e }) {
|
|
4587
4587
|
return /* @__PURE__ */ n(hn, { checked: e, color: "secondary" });
|
|
@@ -4600,9 +4600,9 @@ function nl({
|
|
|
4600
4600
|
enumValues: o,
|
|
4601
4601
|
size: r !== "medium" ? "small" : "medium"
|
|
4602
4602
|
}
|
|
4603
|
-
) : /* @__PURE__ */ n(
|
|
4603
|
+
) : /* @__PURE__ */ n(z, { children: e });
|
|
4604
4604
|
} else
|
|
4605
|
-
return /* @__PURE__ */ n(
|
|
4605
|
+
return /* @__PURE__ */ n(z, { children: e });
|
|
4606
4606
|
}
|
|
4607
4607
|
const Re = I.memo(function(t) {
|
|
4608
4608
|
const r = ue();
|
|
@@ -4848,7 +4848,7 @@ function ho({
|
|
|
4848
4848
|
fields: o.propertyConfigs
|
|
4849
4849
|
}), [t, r, e]).properties;
|
|
4850
4850
|
return /* @__PURE__ */ n("div", { className: "w-full " + i, children: /* @__PURE__ */ _("div", { className: "w-full mb-4", children: [
|
|
4851
|
-
/* @__PURE__ */ _("div", { className:
|
|
4851
|
+
/* @__PURE__ */ _("div", { className: ie(Be, "flex justify-between py-2 border-b last:border-b-0"), children: [
|
|
4852
4852
|
/* @__PURE__ */ n("div", { className: "flex items-center w-1/4", children: /* @__PURE__ */ n("span", { className: "pl-2 text-sm text-gray-600", children: "Id" }) }),
|
|
4853
4853
|
/* @__PURE__ */ _(
|
|
4854
4854
|
"div",
|
|
@@ -4879,7 +4879,7 @@ function ho({
|
|
|
4879
4879
|
return /* @__PURE__ */ _(
|
|
4880
4880
|
"div",
|
|
4881
4881
|
{
|
|
4882
|
-
className:
|
|
4882
|
+
className: ie(Be, "flex justify-between py-2 border-b last:border-b-0"),
|
|
4883
4883
|
children: [
|
|
4884
4884
|
/* @__PURE__ */ n("div", { className: "flex items-center w-1/4", children: /* @__PURE__ */ n("span", { className: "pl-2 text-sm text-gray-600", children: c.name }) }),
|
|
4885
4885
|
/* @__PURE__ */ n(
|
|
@@ -5335,7 +5335,7 @@ function bo({
|
|
|
5335
5335
|
}, [t, r, i, s, e]);
|
|
5336
5336
|
return I.useEffect(() => (m.current = !0, t.file && p(t.file, t.fileName), () => {
|
|
5337
5337
|
m.current = !1;
|
|
5338
|
-
}), [t.file, t.fileName, p]), a ? /* @__PURE__ */ n("div", { className: `m-4 w-${o} h-${o}`, children: u && /* @__PURE__ */ n(Ue, { className: `w-${o} h-${o}` }) }) : /* @__PURE__ */ _("div", { className:
|
|
5338
|
+
}), [t.file, t.fileName, p]), a ? /* @__PURE__ */ n("div", { className: `m-4 w-${o} h-${o}`, children: u && /* @__PURE__ */ n(Ue, { className: `w-${o} h-${o}` }) }) : /* @__PURE__ */ _("div", { className: ie(
|
|
5339
5339
|
lr,
|
|
5340
5340
|
"relative m-4 border-box flex items-center justify-center",
|
|
5341
5341
|
`min-w-[${o}px] min-h-[${o}px]`
|
|
@@ -5359,7 +5359,7 @@ function yo({ showError: e, disabled: t, showExpandIcon: r, selected: i, openPop
|
|
|
5359
5359
|
}, []), c = ce();
|
|
5360
5360
|
return O(() => {
|
|
5361
5361
|
c.current && i && c.current.focus({ preventScroll: !0 });
|
|
5362
|
-
}, [i]), /* @__PURE__ */ n(
|
|
5362
|
+
}, [i]), /* @__PURE__ */ n(z, { children: (e || !t && r) && /* @__PURE__ */ _("div", { ref: s, className: "absolute top-0.5 right-0.5 flex items-center", children: [
|
|
5363
5363
|
i && a,
|
|
5364
5364
|
i && !t && r && /* @__PURE__ */ n(
|
|
5365
5365
|
se,
|
|
@@ -5490,11 +5490,11 @@ function Al({
|
|
|
5490
5490
|
}) {
|
|
5491
5491
|
const [y, b] = Q(!1), w = d && u === "medium" ? "small" : u;
|
|
5492
5492
|
if (d) {
|
|
5493
|
-
const
|
|
5494
|
-
if (Array.isArray(
|
|
5493
|
+
const P = e;
|
|
5494
|
+
if (Array.isArray(P.of))
|
|
5495
5495
|
throw Error("Using array properties instead of single one in `of` in ArrayProperty");
|
|
5496
|
-
if (
|
|
5497
|
-
if (
|
|
5496
|
+
if (P.of) {
|
|
5497
|
+
if (P.of.dataType !== "string")
|
|
5498
5498
|
throw Error("Storage field using array must be of data type string");
|
|
5499
5499
|
} else
|
|
5500
5500
|
throw Error("Storage field using array must be of data type string");
|
|
@@ -5508,22 +5508,22 @@ function Al({
|
|
|
5508
5508
|
isDragReject: D
|
|
5509
5509
|
} = Dn(
|
|
5510
5510
|
{
|
|
5511
|
-
accept: g.acceptedFiles ? g.acceptedFiles.map((
|
|
5511
|
+
accept: g.acceptedFiles ? g.acceptedFiles.map((P) => ({ [P]: [] })).reduce((P, K) => ({ ...P, ...K }), {}) : void 0,
|
|
5512
5512
|
disabled: f,
|
|
5513
5513
|
maxSize: g.maxSize,
|
|
5514
5514
|
noClick: !0,
|
|
5515
5515
|
noKeyboard: !0,
|
|
5516
5516
|
onDrop: p,
|
|
5517
|
-
onDropRejected: (
|
|
5518
|
-
for (const ee of
|
|
5519
|
-
for (const
|
|
5517
|
+
onDropRejected: (P, K) => {
|
|
5518
|
+
for (const ee of P)
|
|
5519
|
+
for (const G of ee.errors)
|
|
5520
5520
|
B.open({
|
|
5521
5521
|
type: "error",
|
|
5522
5522
|
message: `Error uploading file: File is larger than ${g.maxSize} bytes`
|
|
5523
5523
|
});
|
|
5524
5524
|
}
|
|
5525
5525
|
}
|
|
5526
|
-
), { ...Y } = S(), oe = d ? "Drag 'n' drop some files here, or click here to edit" : "Drag 'n' drop a file here, or click here edit",
|
|
5526
|
+
), { ...Y } = S(), oe = d ? "Drag 'n' drop some files here, or click here to edit" : "Drag 'n' drop a file here, or click here edit", M = d ? e.of : e, q = pe(() => wt(w), [w]), X = !f && l;
|
|
5527
5527
|
return /* @__PURE__ */ _(
|
|
5528
5528
|
"div",
|
|
5529
5529
|
{
|
|
@@ -5531,7 +5531,7 @@ function Al({
|
|
|
5531
5531
|
onMouseEnter: () => b(!0),
|
|
5532
5532
|
onMouseMove: () => b(!0),
|
|
5533
5533
|
onMouseLeave: () => b(!1),
|
|
5534
|
-
className:
|
|
5534
|
+
className: ie(
|
|
5535
5535
|
ml,
|
|
5536
5536
|
"relative w-full h-full flex",
|
|
5537
5537
|
`justify-${E ? "start" : "center"}`,
|
|
@@ -5541,23 +5541,23 @@ function Al({
|
|
|
5541
5541
|
),
|
|
5542
5542
|
children: [
|
|
5543
5543
|
/* @__PURE__ */ n("input", { autoFocus: m, ...N() }),
|
|
5544
|
-
r.map((
|
|
5544
|
+
r.map((P, K) => {
|
|
5545
5545
|
let ee;
|
|
5546
|
-
return
|
|
5546
|
+
return P.storagePathOrDownloadUrl ? ee = /* @__PURE__ */ n(
|
|
5547
5547
|
bl,
|
|
5548
5548
|
{
|
|
5549
|
-
property:
|
|
5550
|
-
value:
|
|
5549
|
+
property: M,
|
|
5550
|
+
value: P.storagePathOrDownloadUrl,
|
|
5551
5551
|
entity: a,
|
|
5552
5552
|
size: w
|
|
5553
5553
|
},
|
|
5554
5554
|
`storage_preview_${K}`
|
|
5555
|
-
) :
|
|
5555
|
+
) : P.file && (ee = /* @__PURE__ */ n(
|
|
5556
5556
|
bo,
|
|
5557
5557
|
{
|
|
5558
|
-
entry:
|
|
5558
|
+
entry: P,
|
|
5559
5559
|
metadata: x,
|
|
5560
|
-
storagePath: A(
|
|
5560
|
+
storagePath: A(P.file),
|
|
5561
5561
|
onFileUploadComplete: h,
|
|
5562
5562
|
imageSize: q,
|
|
5563
5563
|
simple: !0
|
|
@@ -5682,7 +5682,7 @@ const yl = I.memo(
|
|
|
5682
5682
|
size: it(l),
|
|
5683
5683
|
children: /* @__PURE__ */ n(Ee, { title: "Value is not a reference.", error: "Click to edit" })
|
|
5684
5684
|
}
|
|
5685
|
-
), S = () => Array.isArray(i) ? /* @__PURE__ */ n(
|
|
5685
|
+
), S = () => Array.isArray(i) ? /* @__PURE__ */ n(z, { children: i.map(
|
|
5686
5686
|
(N, R) => /* @__PURE__ */ n(
|
|
5687
5687
|
"div",
|
|
5688
5688
|
{
|
|
@@ -5997,7 +5997,7 @@ const Il = ({
|
|
|
5997
5997
|
}) => /* @__PURE__ */ n(
|
|
5998
5998
|
"div",
|
|
5999
5999
|
{
|
|
6000
|
-
className:
|
|
6000
|
+
className: ie(
|
|
6001
6001
|
"flex flex-col max-h-full w-full",
|
|
6002
6002
|
{
|
|
6003
6003
|
"items-start": r || t
|
|
@@ -6075,20 +6075,20 @@ const Il = ({
|
|
|
6075
6075
|
a ? g(void 0) : !o && ee && g(ee);
|
|
6076
6076
|
}, [w, g, o, a]), Y = k((ee) => {
|
|
6077
6077
|
D(), ee.stopPropagation();
|
|
6078
|
-
}, [D]), oe = pe(() => b ? b.height > x : !1, [b, x]),
|
|
6078
|
+
}, [D]), oe = pe(() => b ? b.height > x : !1, [b, x]), M = !N && o, q = !a && u && oe, X = !a && !u && oe, P = k(() => B(!0), []), K = k(() => B(!1), []);
|
|
6079
6079
|
return /* @__PURE__ */ _(
|
|
6080
6080
|
"div",
|
|
6081
6081
|
{
|
|
6082
6082
|
ref: w,
|
|
6083
|
-
className:
|
|
6083
|
+
className: ie(
|
|
6084
6084
|
"transition-colors duration-100 ease-in-out",
|
|
6085
6085
|
`flex relative h-full rounded-md p-${R} border border-4 border-opacity-75`,
|
|
6086
6086
|
E && !a ? "bg-gray-50 dark:bg-gray-900" : "",
|
|
6087
6087
|
l ? "bg-gray-100 bg-opacity-75 dark:bg-gray-800 dark:bg-opacity-75" : "",
|
|
6088
|
-
!
|
|
6088
|
+
!M && !v && !N ? "border-transparent" : "",
|
|
6089
6089
|
h ? "overflow-hidden" : "",
|
|
6090
|
-
|
|
6091
|
-
|
|
6090
|
+
M ? "bg-gray-50 dark:bg-gray-900" : "",
|
|
6091
|
+
M && !v ? "border-primary" : "",
|
|
6092
6092
|
v ? "border-green-500 " : "",
|
|
6093
6093
|
N ? "border-red-500" : ""
|
|
6094
6094
|
),
|
|
@@ -6100,8 +6100,8 @@ const Il = ({
|
|
|
6100
6100
|
},
|
|
6101
6101
|
tabIndex: o || a ? void 0 : 0,
|
|
6102
6102
|
onFocus: Y,
|
|
6103
|
-
onMouseEnter:
|
|
6104
|
-
onMouseMove:
|
|
6103
|
+
onMouseEnter: P,
|
|
6104
|
+
onMouseMove: P,
|
|
6105
6105
|
onMouseLeave: K,
|
|
6106
6106
|
children: [
|
|
6107
6107
|
/* @__PURE__ */ _(de, { children: [
|
|
@@ -6164,7 +6164,7 @@ const Ql = I.memo(
|
|
|
6164
6164
|
N(!0), setTimeout(() => {
|
|
6165
6165
|
N(!1);
|
|
6166
6166
|
}, 100);
|
|
6167
|
-
}, []), F = !!o.Field, D = !!o.Preview, Y = Yt(o), oe = typeof o.disabled == "object" ? o.disabled.disabledMessage : void 0,
|
|
6167
|
+
}, []), F = !!o.Field, D = !!o.Preview, Y = Yt(o), oe = typeof o.disabled == "object" ? o.disabled.disabledMessage : void 0, M = u || f || !!o.disabled, q = pe(() => Mt({
|
|
6168
6168
|
property: o,
|
|
6169
6169
|
entityId: d.id,
|
|
6170
6170
|
customFieldValidator: r,
|
|
@@ -6196,14 +6196,14 @@ const Ql = I.memo(
|
|
|
6196
6196
|
v(te);
|
|
6197
6197
|
});
|
|
6198
6198
|
}, [w, q, t, o, d]);
|
|
6199
|
-
const
|
|
6199
|
+
const P = (te) => {
|
|
6200
6200
|
let C;
|
|
6201
6201
|
te === void 0 ? C = null : C = te, x(C), X(C);
|
|
6202
6202
|
};
|
|
6203
6203
|
Le({
|
|
6204
6204
|
property: o,
|
|
6205
6205
|
value: w,
|
|
6206
|
-
setValue:
|
|
6206
|
+
setValue: P
|
|
6207
6207
|
});
|
|
6208
6208
|
const K = k((te) => {
|
|
6209
6209
|
A(te ? {
|
|
@@ -6222,8 +6222,8 @@ const Ql = I.memo(
|
|
|
6222
6222
|
propertyKey: t
|
|
6223
6223
|
} : void 0);
|
|
6224
6224
|
};
|
|
6225
|
-
let
|
|
6226
|
-
const
|
|
6225
|
+
let G, fe = !1, Z = !1, ae = !0, me = !1, T = !1, re = !0;
|
|
6226
|
+
const ne = !M && B;
|
|
6227
6227
|
if (u || Y)
|
|
6228
6228
|
return /* @__PURE__ */ n(
|
|
6229
6229
|
nr,
|
|
@@ -6252,11 +6252,11 @@ const Ql = I.memo(
|
|
|
6252
6252
|
);
|
|
6253
6253
|
if (!F && (!D || b)) {
|
|
6254
6254
|
if (Fl(o))
|
|
6255
|
-
|
|
6255
|
+
G = /* @__PURE__ */ n(
|
|
6256
6256
|
gl,
|
|
6257
6257
|
{
|
|
6258
6258
|
error: B,
|
|
6259
|
-
disabled:
|
|
6259
|
+
disabled: M,
|
|
6260
6260
|
focused: b,
|
|
6261
6261
|
selected: b,
|
|
6262
6262
|
openPopup: y ? ee : void 0,
|
|
@@ -6265,101 +6265,101 @@ const Ql = I.memo(
|
|
|
6265
6265
|
path: c,
|
|
6266
6266
|
value: w,
|
|
6267
6267
|
previewSize: it(p),
|
|
6268
|
-
updateValue:
|
|
6268
|
+
updateValue: P,
|
|
6269
6269
|
propertyKey: t
|
|
6270
6270
|
}
|
|
6271
|
-
), re = !1, Z = !0,
|
|
6271
|
+
), re = !1, Z = !0, T = !0, me = !0;
|
|
6272
6272
|
else if (b && o.dataType === "number") {
|
|
6273
6273
|
const C = o;
|
|
6274
|
-
C.enumValues ? (
|
|
6274
|
+
C.enumValues ? (G = /* @__PURE__ */ n(
|
|
6275
6275
|
Er,
|
|
6276
6276
|
{
|
|
6277
6277
|
name: t,
|
|
6278
6278
|
multiple: !1,
|
|
6279
|
-
disabled:
|
|
6279
|
+
disabled: M,
|
|
6280
6280
|
focused: b,
|
|
6281
6281
|
valueType: "number",
|
|
6282
6282
|
small: it(p) !== "medium",
|
|
6283
6283
|
enumValues: C.enumValues,
|
|
6284
6284
|
error: B,
|
|
6285
6285
|
internalValue: w,
|
|
6286
|
-
updateValue:
|
|
6286
|
+
updateValue: P
|
|
6287
6287
|
}
|
|
6288
|
-
),
|
|
6288
|
+
), T = !0) : (G = /* @__PURE__ */ n(
|
|
6289
6289
|
al,
|
|
6290
6290
|
{
|
|
6291
6291
|
align: a,
|
|
6292
6292
|
error: B,
|
|
6293
6293
|
focused: b,
|
|
6294
|
-
disabled:
|
|
6294
|
+
disabled: M,
|
|
6295
6295
|
value: w,
|
|
6296
|
-
updateValue:
|
|
6296
|
+
updateValue: P
|
|
6297
6297
|
}
|
|
6298
6298
|
), fe = !0);
|
|
6299
6299
|
} else if (b && o.dataType === "string") {
|
|
6300
6300
|
const C = o;
|
|
6301
6301
|
if (C.enumValues)
|
|
6302
|
-
|
|
6302
|
+
G = /* @__PURE__ */ n(
|
|
6303
6303
|
Er,
|
|
6304
6304
|
{
|
|
6305
6305
|
name: t,
|
|
6306
6306
|
multiple: !1,
|
|
6307
6307
|
focused: b,
|
|
6308
|
-
disabled:
|
|
6308
|
+
disabled: M,
|
|
6309
6309
|
valueType: "string",
|
|
6310
6310
|
small: it(p) !== "medium",
|
|
6311
6311
|
enumValues: C.enumValues,
|
|
6312
6312
|
error: B,
|
|
6313
6313
|
internalValue: w,
|
|
6314
|
-
updateValue:
|
|
6314
|
+
updateValue: P
|
|
6315
6315
|
}
|
|
6316
|
-
),
|
|
6316
|
+
), T = !0;
|
|
6317
6317
|
else if (!C.storage) {
|
|
6318
|
-
const
|
|
6319
|
-
|
|
6318
|
+
const V = !!C.multiline || !!C.markdown;
|
|
6319
|
+
G = /* @__PURE__ */ n(
|
|
6320
6320
|
ol,
|
|
6321
6321
|
{
|
|
6322
6322
|
error: B,
|
|
6323
|
-
disabled:
|
|
6324
|
-
multiline:
|
|
6323
|
+
disabled: M,
|
|
6324
|
+
multiline: V,
|
|
6325
6325
|
focused: b,
|
|
6326
6326
|
value: w,
|
|
6327
|
-
updateValue:
|
|
6327
|
+
updateValue: P
|
|
6328
6328
|
}
|
|
6329
6329
|
), fe = !0;
|
|
6330
6330
|
}
|
|
6331
6331
|
} else if (o.dataType === "boolean")
|
|
6332
|
-
|
|
6332
|
+
G = /* @__PURE__ */ n(
|
|
6333
6333
|
sl,
|
|
6334
6334
|
{
|
|
6335
6335
|
error: B,
|
|
6336
|
-
disabled:
|
|
6336
|
+
disabled: M,
|
|
6337
6337
|
focused: b,
|
|
6338
6338
|
internalValue: w,
|
|
6339
|
-
updateValue:
|
|
6339
|
+
updateValue: P
|
|
6340
6340
|
}
|
|
6341
6341
|
);
|
|
6342
6342
|
else if (o.dataType === "date")
|
|
6343
|
-
|
|
6343
|
+
G = /* @__PURE__ */ n(
|
|
6344
6344
|
ll,
|
|
6345
6345
|
{
|
|
6346
6346
|
name: t,
|
|
6347
6347
|
error: B,
|
|
6348
|
-
disabled:
|
|
6348
|
+
disabled: M,
|
|
6349
6349
|
mode: o.mode,
|
|
6350
6350
|
focused: b,
|
|
6351
6351
|
internalValue: w,
|
|
6352
|
-
updateValue:
|
|
6352
|
+
updateValue: P
|
|
6353
6353
|
}
|
|
6354
|
-
),
|
|
6354
|
+
), T = !0, ae = !1, fe = !1;
|
|
6355
6355
|
else if (o.dataType === "reference")
|
|
6356
|
-
typeof o.path == "string" && (
|
|
6356
|
+
typeof o.path == "string" && (G = /* @__PURE__ */ n(
|
|
6357
6357
|
Ji,
|
|
6358
6358
|
{
|
|
6359
6359
|
name: t,
|
|
6360
6360
|
internalValue: w,
|
|
6361
|
-
updateValue:
|
|
6362
|
-
disabled:
|
|
6361
|
+
updateValue: P,
|
|
6362
|
+
disabled: M,
|
|
6363
6363
|
size: p,
|
|
6364
6364
|
path: o.path,
|
|
6365
6365
|
multiselect: !1,
|
|
@@ -6372,27 +6372,27 @@ const Ql = I.memo(
|
|
|
6372
6372
|
const C = o;
|
|
6373
6373
|
if (!C.of && !C.oneOf)
|
|
6374
6374
|
throw Error(`You need to specify an 'of' or 'oneOf' prop (or specify a custom field) in your array property ${t}`);
|
|
6375
|
-
C.of && !Array.isArray(C.of) && (C.of.dataType === "string" || C.of.dataType === "number" ? b && C.of.enumValues && (
|
|
6375
|
+
C.of && !Array.isArray(C.of) && (C.of.dataType === "string" || C.of.dataType === "number" ? b && C.of.enumValues && (G = /* @__PURE__ */ n(
|
|
6376
6376
|
Er,
|
|
6377
6377
|
{
|
|
6378
6378
|
name: t,
|
|
6379
6379
|
multiple: !0,
|
|
6380
|
-
disabled:
|
|
6380
|
+
disabled: M,
|
|
6381
6381
|
focused: b,
|
|
6382
6382
|
small: it(p) !== "medium",
|
|
6383
6383
|
valueType: C.of.dataType,
|
|
6384
6384
|
enumValues: C.of.enumValues,
|
|
6385
6385
|
error: B,
|
|
6386
6386
|
internalValue: w,
|
|
6387
|
-
updateValue:
|
|
6387
|
+
updateValue: P
|
|
6388
6388
|
}
|
|
6389
|
-
), fe = !0,
|
|
6389
|
+
), fe = !0, T = !0, ae = !1) : C.of.dataType === "reference" && (typeof C.of.path == "string" && (G = /* @__PURE__ */ n(
|
|
6390
6390
|
Ji,
|
|
6391
6391
|
{
|
|
6392
6392
|
name: t,
|
|
6393
|
-
disabled:
|
|
6393
|
+
disabled: M,
|
|
6394
6394
|
internalValue: w,
|
|
6395
|
-
updateValue:
|
|
6395
|
+
updateValue: P,
|
|
6396
6396
|
size: p,
|
|
6397
6397
|
multiselect: !0,
|
|
6398
6398
|
path: C.of.path,
|
|
@@ -6403,7 +6403,7 @@ const Ql = I.memo(
|
|
|
6403
6403
|
)), fe = !1));
|
|
6404
6404
|
}
|
|
6405
6405
|
}
|
|
6406
|
-
return
|
|
6406
|
+
return G || (fe = !1, Z = b && !G && !M && !Y, G = /* @__PURE__ */ n(
|
|
6407
6407
|
Re,
|
|
6408
6408
|
{
|
|
6409
6409
|
width: s,
|
|
@@ -6420,10 +6420,10 @@ const Ql = I.memo(
|
|
|
6420
6420
|
width: s,
|
|
6421
6421
|
onSelect: K,
|
|
6422
6422
|
selected: b,
|
|
6423
|
-
disabled:
|
|
6423
|
+
disabled: M || Y,
|
|
6424
6424
|
disabledTooltip: oe ?? "Disabled",
|
|
6425
6425
|
removePadding: me,
|
|
6426
|
-
fullHeight:
|
|
6426
|
+
fullHeight: T,
|
|
6427
6427
|
saved: S,
|
|
6428
6428
|
error: B,
|
|
6429
6429
|
align: a,
|
|
@@ -6434,14 +6434,14 @@ const Ql = I.memo(
|
|
|
6434
6434
|
actions: re && /* @__PURE__ */ n(
|
|
6435
6435
|
yo,
|
|
6436
6436
|
{
|
|
6437
|
-
showError:
|
|
6438
|
-
disabled:
|
|
6437
|
+
showError: ne,
|
|
6438
|
+
disabled: M,
|
|
6439
6439
|
showExpandIcon: Z,
|
|
6440
6440
|
selected: b,
|
|
6441
|
-
openPopup:
|
|
6441
|
+
openPopup: M ? void 0 : ee
|
|
6442
6442
|
}
|
|
6443
6443
|
),
|
|
6444
|
-
children:
|
|
6444
|
+
children: G
|
|
6445
6445
|
},
|
|
6446
6446
|
`cell_${t}_${d.path}_${d.id}`
|
|
6447
6447
|
);
|
|
@@ -6476,7 +6476,7 @@ const gi = function({
|
|
|
6476
6476
|
"div",
|
|
6477
6477
|
{
|
|
6478
6478
|
onClick: b,
|
|
6479
|
-
className:
|
|
6479
|
+
className: ie(
|
|
6480
6480
|
"h-full flex items-center justify-center flex-col bg-gray-50 dark:bg-gray-900 bg-opacity-90 dark:bg-opacity-90 z-10",
|
|
6481
6481
|
a ? "sticky left-0" : ""
|
|
6482
6482
|
),
|
|
@@ -6602,7 +6602,7 @@ function Rl(e) {
|
|
|
6602
6602
|
return /* @__PURE__ */ _(
|
|
6603
6603
|
"div",
|
|
6604
6604
|
{
|
|
6605
|
-
className:
|
|
6605
|
+
className: ie(Be, "no-scrollbar min-h-[56px] overflow-x-auto px-2 md:px-4 bg-gray-50 dark:bg-gray-900 border-b flex flex-row justify-between items-center w-full"),
|
|
6606
6606
|
children: [
|
|
6607
6607
|
/* @__PURE__ */ _("div", { className: "flex items-center gap-2 md:mr-4 mr-2", children: [
|
|
6608
6608
|
e.title && /* @__PURE__ */ n("div", { className: "hidden lg:block", children: e.title }),
|
|
@@ -6774,7 +6774,7 @@ const Ml = I.memo(
|
|
|
6774
6774
|
return /* @__PURE__ */ n(de, { children: /* @__PURE__ */ _(
|
|
6775
6775
|
"div",
|
|
6776
6776
|
{
|
|
6777
|
-
className:
|
|
6777
|
+
className: ie(
|
|
6778
6778
|
"flex py-0 px-3 h-full text-xs uppercase font-semibold relative select-none items-center bg-gray-50 dark:bg-gray-900",
|
|
6779
6779
|
"text-gray-600 hover:text-gray-800 dark:text-gray-400 dark:hover:text-gray-200 ",
|
|
6780
6780
|
"hover:bg-gray-100 dark:hover:bg-gray-800 hover:bg-opacity-50 dark:hover:bg-opacity-50",
|
|
@@ -6812,7 +6812,7 @@ const Ml = I.memo(
|
|
|
6812
6812
|
]
|
|
6813
6813
|
}
|
|
6814
6814
|
) }),
|
|
6815
|
-
/* @__PURE__ */ _(
|
|
6815
|
+
/* @__PURE__ */ _(z, { children: [
|
|
6816
6816
|
f && /* @__PURE__ */ n(f, { onHover: m || p }),
|
|
6817
6817
|
c.sortable && (o || B || p) && /* @__PURE__ */ n(
|
|
6818
6818
|
Ci,
|
|
@@ -6878,7 +6878,7 @@ const Ml = I.memo(
|
|
|
6878
6878
|
"div",
|
|
6879
6879
|
{
|
|
6880
6880
|
ref: t,
|
|
6881
|
-
className:
|
|
6881
|
+
className: ie(
|
|
6882
6882
|
"absolute h-full w-[6px] top-0 right-0 cursor-col-resize",
|
|
6883
6883
|
B && "bg-gray-300 dark:bg-gray-700"
|
|
6884
6884
|
),
|
|
@@ -6929,7 +6929,7 @@ function zl({
|
|
|
6929
6929
|
/* @__PURE__ */ n(
|
|
6930
6930
|
"div",
|
|
6931
6931
|
{
|
|
6932
|
-
className:
|
|
6932
|
+
className: ie(Be, "py-4 px-6 text-xs font-semibold uppercase border-b"),
|
|
6933
6933
|
children: e.title ?? l
|
|
6934
6934
|
}
|
|
6935
6935
|
),
|
|
@@ -7013,7 +7013,7 @@ const Vl = ({
|
|
|
7013
7013
|
return /* @__PURE__ */ _(
|
|
7014
7014
|
"div",
|
|
7015
7015
|
{
|
|
7016
|
-
className:
|
|
7016
|
+
className: ie(Be, "z-20 sticky min-w-full flex w-fit flex-row top-0 left-0 h-12 border-b bg-gray-50 dark:bg-gray-900"),
|
|
7017
7017
|
children: [
|
|
7018
7018
|
e.map((E, B) => {
|
|
7019
7019
|
const v = e[B], S = v && a && a[v.key] ? a[v.key] : void 0;
|
|
@@ -7059,7 +7059,7 @@ const Vl = ({
|
|
|
7059
7059
|
return /* @__PURE__ */ n(
|
|
7060
7060
|
"div",
|
|
7061
7061
|
{
|
|
7062
|
-
className:
|
|
7062
|
+
className: ie(
|
|
7063
7063
|
"flex min-w-full text-sm border-b border-gray-200 dark:border-gray-800 border-opacity-40 dark:border-opacity-40",
|
|
7064
7064
|
c ? c(t) : "",
|
|
7065
7065
|
{
|
|
@@ -7101,7 +7101,7 @@ const Yl = Ho(({
|
|
|
7101
7101
|
...t
|
|
7102
7102
|
}, r) => /* @__PURE__ */ n(hr.Consumer, { children: (i) => {
|
|
7103
7103
|
const o = i.customView;
|
|
7104
|
-
return /* @__PURE__ */ _(
|
|
7104
|
+
return /* @__PURE__ */ _(z, { children: [
|
|
7105
7105
|
/* @__PURE__ */ n(
|
|
7106
7106
|
"div",
|
|
7107
7107
|
{
|
|
@@ -7166,33 +7166,33 @@ const Yl = Ho(({
|
|
|
7166
7166
|
O(() => {
|
|
7167
7167
|
R(a);
|
|
7168
7168
|
}, [a]);
|
|
7169
|
-
const [Y, oe] = In(),
|
|
7170
|
-
R(N.map((
|
|
7169
|
+
const [Y, oe] = In(), M = k((C) => {
|
|
7170
|
+
R(N.map((V) => V.key === C.column.key ? C.column : V));
|
|
7171
7171
|
}, [N]), q = k((C) => {
|
|
7172
|
-
R(N.map((
|
|
7172
|
+
R(N.map((V) => V.key === C.column.key ? C.column : V)), l && l(C);
|
|
7173
7173
|
}, [N, l]), X = ce();
|
|
7174
7174
|
O(() => {
|
|
7175
7175
|
X.current = c;
|
|
7176
7176
|
}, [c]);
|
|
7177
|
-
const
|
|
7177
|
+
const P = k(() => {
|
|
7178
7178
|
D.current = 0, F.current && F.current.scrollTo(F.current?.scrollLeft, 0);
|
|
7179
7179
|
}, []), K = k((C) => {
|
|
7180
|
-
const
|
|
7181
|
-
L && d && !d(L, le) && u && u(void 0), r && r(), p && p(le),
|
|
7182
|
-
}, [d, S, u, r, p,
|
|
7180
|
+
const V = v === C && S === "desc", H = v === C && S === "asc" ? "desc" : V ? void 0 : "asc", ye = V ? void 0 : C, L = X.current, le = H && ye ? [ye, H] : void 0;
|
|
7181
|
+
L && d && !d(L, le) && u && u(void 0), r && r(), p && p(le), P();
|
|
7182
|
+
}, [d, S, u, r, p, P, v]), ee = k(() => {
|
|
7183
7183
|
D.current = 0, p && p(void 0);
|
|
7184
|
-
}, [p]),
|
|
7184
|
+
}, [p]), G = Math.max((t?.length ?? 0) * vt(o) - oe.height, 0), fe = k((C) => {
|
|
7185
7185
|
i && (t?.length ?? 0) > 0 && C > D.current + 600 && (D.current = C, i());
|
|
7186
7186
|
}, [t?.length, i]), Z = k(({
|
|
7187
7187
|
scrollOffset: C,
|
|
7188
|
-
scrollUpdateWasRequested:
|
|
7188
|
+
scrollUpdateWasRequested: V
|
|
7189
7189
|
}) => {
|
|
7190
|
-
!
|
|
7191
|
-
}, [
|
|
7190
|
+
!V && C >= G - 600 && fe(C);
|
|
7191
|
+
}, [G, fe]), ae = k((C, V) => {
|
|
7192
7192
|
D.current = 0;
|
|
7193
|
-
const
|
|
7194
|
-
let H =
|
|
7195
|
-
|
|
7193
|
+
const j = X.current;
|
|
7194
|
+
let H = j ? { ...j } : {};
|
|
7195
|
+
V ? H[C.key] = V : delete H[C.key], !d || d(H, v && S ? [v, S] : void 0) || (H = V ? { [C.key]: V } : {}), u && u(H), C.key !== v && ee();
|
|
7196
7196
|
}, [d, S, u, ee, v]), me = k(() => /* @__PURE__ */ _(
|
|
7197
7197
|
"div",
|
|
7198
7198
|
{
|
|
@@ -7202,7 +7202,7 @@ const Yl = Ho(({
|
|
|
7202
7202
|
m?.message && /* @__PURE__ */ n(sr, { className: "px-4 break-all", source: m.message })
|
|
7203
7203
|
]
|
|
7204
7204
|
}
|
|
7205
|
-
), [m?.message]),
|
|
7205
|
+
), [m?.message]), T = k(() => h ? /* @__PURE__ */ n(jr, {}) : /* @__PURE__ */ _(
|
|
7206
7206
|
"div",
|
|
7207
7207
|
{
|
|
7208
7208
|
className: "flex flex-col overflow-auto items-center justify-center p-2 gap-2 h-full",
|
|
@@ -7211,15 +7211,15 @@ const Yl = Ho(({
|
|
|
7211
7211
|
g
|
|
7212
7212
|
]
|
|
7213
7213
|
}
|
|
7214
|
-
), [g, h]), re = !h && (t?.length ?? 0) === 0,
|
|
7214
|
+
), [g, h]), re = !h && (t?.length ?? 0) === 0, ne = m ? me() : re ? T() : void 0, te = {
|
|
7215
7215
|
data: t,
|
|
7216
7216
|
size: o,
|
|
7217
7217
|
cellRenderer: A,
|
|
7218
7218
|
columns: N,
|
|
7219
7219
|
currentSort: S,
|
|
7220
7220
|
onRowClick: s,
|
|
7221
|
-
customView:
|
|
7222
|
-
onColumnResize:
|
|
7221
|
+
customView: ne,
|
|
7222
|
+
onColumnResize: M,
|
|
7223
7223
|
onColumnResizeEnd: q,
|
|
7224
7224
|
filter: X.current,
|
|
7225
7225
|
onColumnSort: K,
|
|
@@ -7235,7 +7235,7 @@ const Yl = Ho(({
|
|
|
7235
7235
|
"div",
|
|
7236
7236
|
{
|
|
7237
7237
|
ref: Y,
|
|
7238
|
-
className:
|
|
7238
|
+
className: ie("h-full w-full", x),
|
|
7239
7239
|
children: /* @__PURE__ */ n(
|
|
7240
7240
|
hr.Provider,
|
|
7241
7241
|
{
|
|
@@ -7371,11 +7371,11 @@ function Ll({
|
|
|
7371
7371
|
const [f, m] = t || [c[0], void 0], [g, p] = Q(f), [h, A] = Q(m), y = h ? Array.isArray(h) ? h.map((F) => F instanceof We ? F.id : null).filter(Boolean) : [h.id] : [];
|
|
7372
7372
|
function b(F, D) {
|
|
7373
7373
|
const Y = Cr.includes(g), oe = Cr.includes(F);
|
|
7374
|
-
let
|
|
7375
|
-
Y !== oe && (
|
|
7376
|
-
const q =
|
|
7374
|
+
let M = D;
|
|
7375
|
+
Y !== oe && (M = oe ? M instanceof We ? [M] : [] : void 0), p(F), A(M);
|
|
7376
|
+
const q = M !== null && Array.isArray(M) ? M.length > 0 : M !== void 0;
|
|
7377
7377
|
r(
|
|
7378
|
-
F && q ? [F,
|
|
7378
|
+
F && q ? [F, M] : void 0
|
|
7379
7379
|
);
|
|
7380
7380
|
}
|
|
7381
7381
|
const w = ke(), x = pe(() => o ? w.getCollection(o) : void 0, [o]), E = (F) => {
|
|
@@ -7670,7 +7670,7 @@ const Hl = I.memo(
|
|
|
7670
7670
|
endAdornment: Y,
|
|
7671
7671
|
AddColumnComponent: oe
|
|
7672
7672
|
}) {
|
|
7673
|
-
const
|
|
7673
|
+
const M = ce(null), [q, X] = I.useState(void 0), P = () => {
|
|
7674
7674
|
!E || d || u || b !== void 0 && w?.(b + x);
|
|
7675
7675
|
}, K = k(() => {
|
|
7676
7676
|
w?.(x);
|
|
@@ -7679,7 +7679,7 @@ const Hl = I.memo(
|
|
|
7679
7679
|
return i && i(ae);
|
|
7680
7680
|
}, [i, l]);
|
|
7681
7681
|
bn(
|
|
7682
|
-
|
|
7682
|
+
M,
|
|
7683
7683
|
() => {
|
|
7684
7684
|
q && fe();
|
|
7685
7685
|
},
|
|
@@ -7692,7 +7692,7 @@ const Hl = I.memo(
|
|
|
7692
7692
|
document.removeEventListener("keydown", ae, !1);
|
|
7693
7693
|
};
|
|
7694
7694
|
});
|
|
7695
|
-
const
|
|
7695
|
+
const G = k((ae) => {
|
|
7696
7696
|
X(ae);
|
|
7697
7697
|
}, []), fe = k(() => {
|
|
7698
7698
|
X(void 0);
|
|
@@ -7704,7 +7704,7 @@ const Hl = I.memo(
|
|
|
7704
7704
|
{
|
|
7705
7705
|
value: {
|
|
7706
7706
|
setPopupCell: v,
|
|
7707
|
-
select:
|
|
7707
|
+
select: G,
|
|
7708
7708
|
onValueChange: t,
|
|
7709
7709
|
size: s ?? "m",
|
|
7710
7710
|
selectedCell: q
|
|
@@ -7713,7 +7713,7 @@ const Hl = I.memo(
|
|
|
7713
7713
|
"div",
|
|
7714
7714
|
{
|
|
7715
7715
|
className: "h-full w-full flex flex-col bg-white dark:bg-gray-950",
|
|
7716
|
-
ref:
|
|
7716
|
+
ref: M,
|
|
7717
7717
|
children: /* @__PURE__ */ n(
|
|
7718
7718
|
ql,
|
|
7719
7719
|
{
|
|
@@ -7721,7 +7721,7 @@ const Hl = I.memo(
|
|
|
7721
7721
|
columns: R,
|
|
7722
7722
|
cellRenderer: r,
|
|
7723
7723
|
onRowClick: l ? void 0 : i ? ee : void 0,
|
|
7724
|
-
onEndReached:
|
|
7724
|
+
onEndReached: P,
|
|
7725
7725
|
onResetPagination: K,
|
|
7726
7726
|
error: f,
|
|
7727
7727
|
paginationEnabled: E,
|
|
@@ -7850,11 +7850,11 @@ const Co = I.memo(
|
|
|
7850
7850
|
emptyComponent: D,
|
|
7851
7851
|
getIdColumnWidth: Y,
|
|
7852
7852
|
onTextSearchClick: oe,
|
|
7853
|
-
textSearchLoading:
|
|
7853
|
+
textSearchLoading: M
|
|
7854
7854
|
}) {
|
|
7855
|
-
const q = ce(null), X = He(),
|
|
7855
|
+
const q = ce(null), X = He(), P = !!t, K = (d?.selectedEntities?.length > 0 ? d?.selectedEntities : u)?.filter(Boolean), ee = Ce(), [G, fe] = I.useState(w ?? "m"), Z = K?.map((L) => L.id), ae = !!E.filterValues && Object.keys(E.filterValues).length > 0, me = k((L) => {
|
|
7856
7856
|
g && g(L), fe(L);
|
|
7857
|
-
}, []),
|
|
7857
|
+
}, []), T = k((L) => E.setSearchString?.(L), []), re = pe(() => y ? y.map((L) => ({ [L.key]: L })).reduce((L, le) => ({ ...L, ...le }), {}) : {}, [y]), ne = s, te = ({
|
|
7858
7858
|
column: L,
|
|
7859
7859
|
columnIndex: le,
|
|
7860
7860
|
rowData: Me,
|
|
@@ -7875,10 +7875,10 @@ const Co = I.memo(
|
|
|
7875
7875
|
propertyKey: Ye,
|
|
7876
7876
|
property: Qe,
|
|
7877
7877
|
value: we?.values ? dt(we.values, Ye) : void 0,
|
|
7878
|
-
customFieldValidator:
|
|
7878
|
+
customFieldValidator: ne,
|
|
7879
7879
|
columnIndex: le,
|
|
7880
7880
|
width: L.width,
|
|
7881
|
-
height: vt(
|
|
7881
|
+
height: vt(G),
|
|
7882
7882
|
entity: we,
|
|
7883
7883
|
disabled: Ze,
|
|
7884
7884
|
path: we.path
|
|
@@ -7893,12 +7893,12 @@ const Co = I.memo(
|
|
|
7893
7893
|
const Se = le, we = re[L.key], Ye = we.dependencies ? Object.entries(Se.values).filter(([Qe, st]) => we.dependencies.includes(Qe)).reduce((Qe, st) => ({ ...Qe, ...st }), {}) : Se, Ze = we.Builder;
|
|
7894
7894
|
if (!Ze && !we.value)
|
|
7895
7895
|
throw new Error("When using additional fields you need to provide a Builder or a value");
|
|
7896
|
-
const at = Ze ? /* @__PURE__ */ n(Ze, { entity: Se, context: ee }) : /* @__PURE__ */ n(
|
|
7896
|
+
const at = Ze ? /* @__PURE__ */ n(Ze, { entity: Se, context: ee }) : /* @__PURE__ */ n(z, { children: we.value?.({ entity: Se, context: ee }) });
|
|
7897
7897
|
return /* @__PURE__ */ n(
|
|
7898
7898
|
nr,
|
|
7899
7899
|
{
|
|
7900
7900
|
width: Me,
|
|
7901
|
-
size:
|
|
7901
|
+
size: G,
|
|
7902
7902
|
value: Ye,
|
|
7903
7903
|
selected: !1,
|
|
7904
7904
|
disabled: !0,
|
|
@@ -7910,12 +7910,12 @@ const Co = I.memo(
|
|
|
7910
7910
|
},
|
|
7911
7911
|
`additional_table_cell_${Se.id}_${L.key}`
|
|
7912
7912
|
);
|
|
7913
|
-
}, [
|
|
7913
|
+
}, [G, Z]), V = (() => {
|
|
7914
7914
|
const L = Ol({
|
|
7915
7915
|
properties: x,
|
|
7916
7916
|
sortable: v,
|
|
7917
7917
|
forceFilter: t,
|
|
7918
|
-
disabledFilter:
|
|
7918
|
+
disabledFilter: P,
|
|
7919
7919
|
AdditionalHeaderWidget: R
|
|
7920
7920
|
}), le = y ? y.map((Me) => ({
|
|
7921
7921
|
key: Me.key,
|
|
@@ -7936,14 +7936,14 @@ const Co = I.memo(
|
|
|
7936
7936
|
align: "center",
|
|
7937
7937
|
AdditionalHeaderWidget: () => F
|
|
7938
7938
|
},
|
|
7939
|
-
...b.map((L) =>
|
|
7939
|
+
...b.map((L) => V.find((le) => le.key === L.key)).filter(Boolean)
|
|
7940
7940
|
], ye = (L) => {
|
|
7941
7941
|
const le = L.column, Me = L.columns, Se = le.key;
|
|
7942
7942
|
try {
|
|
7943
7943
|
if (L.columnIndex === 0)
|
|
7944
7944
|
return a ? a({
|
|
7945
7945
|
entity: L.rowData,
|
|
7946
|
-
size:
|
|
7946
|
+
size: G,
|
|
7947
7947
|
width: le.width,
|
|
7948
7948
|
frozen: le.frozen
|
|
7949
7949
|
}) : /* @__PURE__ */ n(
|
|
@@ -7953,7 +7953,7 @@ const Co = I.memo(
|
|
|
7953
7953
|
width: le.width,
|
|
7954
7954
|
frozen: le.frozen,
|
|
7955
7955
|
isSelected: !1,
|
|
7956
|
-
size:
|
|
7956
|
+
size: G
|
|
7957
7957
|
}
|
|
7958
7958
|
);
|
|
7959
7959
|
if (re[Se])
|
|
@@ -7965,7 +7965,7 @@ const Co = I.memo(
|
|
|
7965
7965
|
return console.error("Error rendering cell", we), /* @__PURE__ */ n(
|
|
7966
7966
|
nr,
|
|
7967
7967
|
{
|
|
7968
|
-
size:
|
|
7968
|
+
size: G,
|
|
7969
7969
|
width: le.width,
|
|
7970
7970
|
saved: !1,
|
|
7971
7971
|
value: null,
|
|
@@ -7986,13 +7986,13 @@ const Co = I.memo(
|
|
|
7986
7986
|
/* @__PURE__ */ n(
|
|
7987
7987
|
Rl,
|
|
7988
7988
|
{
|
|
7989
|
-
forceFilter:
|
|
7989
|
+
forceFilter: P,
|
|
7990
7990
|
filterIsSet: ae,
|
|
7991
|
-
onTextSearch: p ?
|
|
7992
|
-
textSearchLoading:
|
|
7991
|
+
onTextSearch: p ? T : void 0,
|
|
7992
|
+
textSearchLoading: M,
|
|
7993
7993
|
onTextSearchClick: p ? oe : void 0,
|
|
7994
7994
|
clearFilter: E.clearFilter,
|
|
7995
|
-
size:
|
|
7995
|
+
size: G,
|
|
7996
7996
|
onSizeChanged: me,
|
|
7997
7997
|
title: o,
|
|
7998
7998
|
actionsStart: r,
|
|
@@ -8004,7 +8004,7 @@ const Co = I.memo(
|
|
|
8004
8004
|
Hl,
|
|
8005
8005
|
{
|
|
8006
8006
|
columns: H,
|
|
8007
|
-
size:
|
|
8007
|
+
size: G,
|
|
8008
8008
|
inlineEditing: A,
|
|
8009
8009
|
cellRenderer: ye,
|
|
8010
8010
|
onEntityClick: f,
|
|
@@ -8065,12 +8065,12 @@ function So({
|
|
|
8065
8065
|
return;
|
|
8066
8066
|
}
|
|
8067
8067
|
return s;
|
|
8068
|
-
}, [s, g]), [E, B] = I.useState(g ?? a ?? void 0), [v, S] = I.useState(x), N = v ? v[0] : void 0, R = v ? v[1] : void 0, F = Ce(), [D, Y] = Q([]), [oe,
|
|
8068
|
+
}, [s, g]), [E, B] = I.useState(g ?? a ?? void 0), [v, S] = I.useState(x), N = v ? v[0] : void 0, R = v ? v[1] : void 0, F = Ce(), [D, Y] = Q([]), [oe, M] = Q(!1), [q, X] = Q(), [P, K] = Q(!1), ee = k((me, T) => f.isFilterCombinationValid ? f.isFilterCombinationValid({
|
|
8069
8069
|
path: m,
|
|
8070
8070
|
collection: t,
|
|
8071
8071
|
filterValues: me,
|
|
8072
|
-
sortBy:
|
|
8073
|
-
}) : !0, []),
|
|
8072
|
+
sortBy: T
|
|
8073
|
+
}) : !0, []), G = k(() => B(g ?? void 0), [g]), fe = k((me) => {
|
|
8074
8074
|
if (g) {
|
|
8075
8075
|
console.warn("Filter is not compatible with the force filter. Ignoring filter");
|
|
8076
8076
|
return;
|
|
@@ -8078,33 +8078,33 @@ function So({
|
|
|
8078
8078
|
me && Object.keys(me).length === 0 ? B(void 0) : B(me);
|
|
8079
8079
|
}, [g]);
|
|
8080
8080
|
O(() => {
|
|
8081
|
-
|
|
8081
|
+
M(!0);
|
|
8082
8082
|
const me = async (re) => {
|
|
8083
8083
|
if (t.callbacks?.onFetch)
|
|
8084
8084
|
try {
|
|
8085
8085
|
re = await Promise.all(
|
|
8086
|
-
re.map((
|
|
8086
|
+
re.map((ne) => t.callbacks.onFetch({
|
|
8087
8087
|
collection: t,
|
|
8088
8088
|
path: m,
|
|
8089
|
-
entity:
|
|
8089
|
+
entity: ne,
|
|
8090
8090
|
context: F
|
|
8091
8091
|
}))
|
|
8092
8092
|
);
|
|
8093
|
-
} catch (
|
|
8094
|
-
console.error(
|
|
8093
|
+
} catch (ne) {
|
|
8094
|
+
console.error(ne);
|
|
8095
8095
|
}
|
|
8096
|
-
|
|
8097
|
-
...
|
|
8096
|
+
M(!1), X(void 0), Y(re.map((ne) => ({
|
|
8097
|
+
...ne
|
|
8098
8098
|
// values: sanitizeData(e.values, resolvedCollection.properties)
|
|
8099
8099
|
}))), K(!b || re.length < b);
|
|
8100
|
-
},
|
|
8101
|
-
console.error("ERROR", re),
|
|
8100
|
+
}, T = (re) => {
|
|
8101
|
+
console.error("ERROR", re), M(!1), Y([]), X(re);
|
|
8102
8102
|
};
|
|
8103
8103
|
return f.listenCollection ? f.listenCollection({
|
|
8104
8104
|
path: m,
|
|
8105
8105
|
collection: t,
|
|
8106
8106
|
onUpdate: me,
|
|
8107
|
-
onError:
|
|
8107
|
+
onError: T,
|
|
8108
8108
|
searchString: A,
|
|
8109
8109
|
filter: E,
|
|
8110
8110
|
limit: b,
|
|
@@ -8120,7 +8120,7 @@ function So({
|
|
|
8120
8120
|
startAfter: void 0,
|
|
8121
8121
|
orderBy: N,
|
|
8122
8122
|
order: R
|
|
8123
|
-
}).then(me).catch(
|
|
8123
|
+
}).then(me).catch(T), () => {
|
|
8124
8124
|
});
|
|
8125
8125
|
}, [m, b, R, N, E, A]);
|
|
8126
8126
|
const Z = Xl({
|
|
@@ -8135,7 +8135,7 @@ function So({
|
|
|
8135
8135
|
lastDeleteTimestamp: i
|
|
8136
8136
|
}),
|
|
8137
8137
|
dataLoading: oe,
|
|
8138
|
-
noMoreToLoad:
|
|
8138
|
+
noMoreToLoad: P,
|
|
8139
8139
|
dataLoadingError: q,
|
|
8140
8140
|
filterValues: E,
|
|
8141
8141
|
setFilterValues: fe,
|
|
@@ -8143,7 +8143,7 @@ function So({
|
|
|
8143
8143
|
setSortBy: S,
|
|
8144
8144
|
searchString: A,
|
|
8145
8145
|
setSearchString: y,
|
|
8146
|
-
clearFilter:
|
|
8146
|
+
clearFilter: G,
|
|
8147
8147
|
itemCount: b,
|
|
8148
8148
|
setItemCount: w,
|
|
8149
8149
|
paginationEnabled: p,
|
|
@@ -8238,7 +8238,7 @@ function tc({
|
|
|
8238
8238
|
}, x = or(e.Actions).map((E, B) => /* @__PURE__ */ n(de, { children: /* @__PURE__ */ n(E, { ...w }) }, `actions_${B}`));
|
|
8239
8239
|
return m && m.forEach((E, B) => {
|
|
8240
8240
|
E.collections?.CollectionActions && x.push(...or(E.collections?.CollectionActions).map((v, S) => /* @__PURE__ */ n(de, { children: /* @__PURE__ */ n(v, { ...w, ...E.collections?.collectionActionsProps }) }, `plugin_actions_${B}_${S}`)));
|
|
8241
|
-
}), /* @__PURE__ */ _(
|
|
8241
|
+
}), /* @__PURE__ */ _(z, { children: [
|
|
8242
8242
|
x,
|
|
8243
8243
|
b,
|
|
8244
8244
|
A
|
|
@@ -8444,14 +8444,14 @@ function en({
|
|
|
8444
8444
|
const f = k((m) => {
|
|
8445
8445
|
m.stopPropagation(), m.preventDefault(), r(null);
|
|
8446
8446
|
}, [r]);
|
|
8447
|
-
return /* @__PURE__ */ _(
|
|
8447
|
+
return /* @__PURE__ */ _(z, { children: [
|
|
8448
8448
|
/* @__PURE__ */ n(
|
|
8449
8449
|
tt,
|
|
8450
8450
|
{
|
|
8451
8451
|
value: t ? t.toString() : "",
|
|
8452
8452
|
disabled: a,
|
|
8453
8453
|
position: "item-aligned",
|
|
8454
|
-
inputClassName:
|
|
8454
|
+
inputClassName: ie("w-full"),
|
|
8455
8455
|
label: /* @__PURE__ */ n(
|
|
8456
8456
|
Oe,
|
|
8457
8457
|
{
|
|
@@ -8665,14 +8665,14 @@ function oc({
|
|
|
8665
8665
|
title: l.name,
|
|
8666
8666
|
className: "text-text-secondary dark:text-text-secondary-dark"
|
|
8667
8667
|
}
|
|
8668
|
-
), v = /* @__PURE__ */ _(
|
|
8668
|
+
), v = /* @__PURE__ */ _(z, { children: [
|
|
8669
8669
|
!y && /* @__PURE__ */ n(
|
|
8670
8670
|
Ee,
|
|
8671
8671
|
{
|
|
8672
8672
|
error: "The specified collection does not exist. Check console"
|
|
8673
8673
|
}
|
|
8674
8674
|
),
|
|
8675
|
-
y && /* @__PURE__ */ _(
|
|
8675
|
+
y && /* @__PURE__ */ _(z, { children: [
|
|
8676
8676
|
/* @__PURE__ */ n(
|
|
8677
8677
|
yi,
|
|
8678
8678
|
{
|
|
@@ -8701,7 +8701,7 @@ function oc({
|
|
|
8701
8701
|
)
|
|
8702
8702
|
] })
|
|
8703
8703
|
] });
|
|
8704
|
-
return /* @__PURE__ */ _(
|
|
8704
|
+
return /* @__PURE__ */ _(z, { children: [
|
|
8705
8705
|
!s && /* @__PURE__ */ n(
|
|
8706
8706
|
ut,
|
|
8707
8707
|
{
|
|
@@ -8733,7 +8733,7 @@ function No({
|
|
|
8733
8733
|
disabled: a,
|
|
8734
8734
|
size: s
|
|
8735
8735
|
}) {
|
|
8736
|
-
return /* @__PURE__ */ _("div", { className:
|
|
8736
|
+
return /* @__PURE__ */ _("div", { className: ie(
|
|
8737
8737
|
lr,
|
|
8738
8738
|
"relative m-4 border-box flex items-center justify-center",
|
|
8739
8739
|
s === "medium" ? "min-w-[220px] min-h-[220px] max-w-[220px]" : "min-w-[118px] min-h-[118px] max-w-[118px]"
|
|
@@ -8816,7 +8816,7 @@ function rn({
|
|
|
8816
8816
|
values: d.values,
|
|
8817
8817
|
path: d.path
|
|
8818
8818
|
};
|
|
8819
|
-
return /* @__PURE__ */ _(
|
|
8819
|
+
return /* @__PURE__ */ _(z, { children: [
|
|
8820
8820
|
!s && /* @__PURE__ */ n(
|
|
8821
8821
|
Oe,
|
|
8822
8822
|
{
|
|
@@ -8902,7 +8902,7 @@ function mc({
|
|
|
8902
8902
|
"div",
|
|
8903
8903
|
{
|
|
8904
8904
|
...b(),
|
|
8905
|
-
className:
|
|
8905
|
+
className: ie(
|
|
8906
8906
|
wn,
|
|
8907
8907
|
t ? vn : ti,
|
|
8908
8908
|
ac,
|
|
@@ -8922,7 +8922,7 @@ function mc({
|
|
|
8922
8922
|
{
|
|
8923
8923
|
...a.droppableProps,
|
|
8924
8924
|
ref: a.innerRef,
|
|
8925
|
-
className:
|
|
8925
|
+
className: ie(
|
|
8926
8926
|
"flex items-center p-1 no-scrollbar",
|
|
8927
8927
|
o && l.length ? "overflow-auto" : "",
|
|
8928
8928
|
o && l.length ? "min-h-[180px]" : "min-h-[250px]"
|
|
@@ -8970,7 +8970,7 @@ function mc({
|
|
|
8970
8970
|
ref: R.innerRef,
|
|
8971
8971
|
...R.draggableProps,
|
|
8972
8972
|
...R.dragHandleProps,
|
|
8973
|
-
className:
|
|
8973
|
+
className: ie(Si, "rounded-md"),
|
|
8974
8974
|
style: {
|
|
8975
8975
|
...R.draggableProps.style
|
|
8976
8976
|
},
|
|
@@ -9123,7 +9123,7 @@ function Ft({
|
|
|
9123
9123
|
} else
|
|
9124
9124
|
r(h.target.value);
|
|
9125
9125
|
}, g = !!d, p = l.dataType === "number" ? "number" : void 0;
|
|
9126
|
-
return /* @__PURE__ */ _(
|
|
9126
|
+
return /* @__PURE__ */ _(z, { children: [
|
|
9127
9127
|
/* @__PURE__ */ n(
|
|
9128
9128
|
yt,
|
|
9129
9129
|
{
|
|
@@ -9195,7 +9195,7 @@ const fc = I.forwardRef(function({
|
|
|
9195
9195
|
property: d,
|
|
9196
9196
|
value: r,
|
|
9197
9197
|
setValue: i
|
|
9198
|
-
}), /* @__PURE__ */ _(
|
|
9198
|
+
}), /* @__PURE__ */ _(z, { children: [
|
|
9199
9199
|
/* @__PURE__ */ n(
|
|
9200
9200
|
cr,
|
|
9201
9201
|
{
|
|
@@ -9244,7 +9244,7 @@ function hc({
|
|
|
9244
9244
|
property: c,
|
|
9245
9245
|
value: t,
|
|
9246
9246
|
setValue: r
|
|
9247
|
-
}), /* @__PURE__ */ _(
|
|
9247
|
+
}), /* @__PURE__ */ _(z, { children: [
|
|
9248
9248
|
/* @__PURE__ */ n(
|
|
9249
9249
|
zt,
|
|
9250
9250
|
{
|
|
@@ -9290,7 +9290,7 @@ function Fo({
|
|
|
9290
9290
|
}) {
|
|
9291
9291
|
if (!l.entityId)
|
|
9292
9292
|
throw new Error("ReadOnlyFieldBinding: Entity id is null");
|
|
9293
|
-
return l.entityId, l.values, l.path, /* @__PURE__ */ _(
|
|
9293
|
+
return l.entityId, l.values, l.path, /* @__PURE__ */ _(z, { children: [
|
|
9294
9294
|
!o && /* @__PURE__ */ n(
|
|
9295
9295
|
Oe,
|
|
9296
9296
|
{
|
|
@@ -9303,7 +9303,7 @@ function Fo({
|
|
|
9303
9303
|
/* @__PURE__ */ n(
|
|
9304
9304
|
"div",
|
|
9305
9305
|
{
|
|
9306
|
-
className:
|
|
9306
|
+
className: ie(lr, "min-h-14 p-4 md:p-6 overflow-x-scroll no-scrollbar"),
|
|
9307
9307
|
children: /* @__PURE__ */ n(de, { children: /* @__PURE__ */ n(
|
|
9308
9308
|
Re,
|
|
9309
9309
|
{
|
|
@@ -9366,7 +9366,7 @@ function Ac({
|
|
|
9366
9366
|
), A = k((y) => {
|
|
9367
9367
|
y.preventDefault(), h.open();
|
|
9368
9368
|
}, [h]);
|
|
9369
|
-
return /* @__PURE__ */ _(
|
|
9369
|
+
return /* @__PURE__ */ _(z, { children: [
|
|
9370
9370
|
/* @__PURE__ */ n(
|
|
9371
9371
|
Oe,
|
|
9372
9372
|
{
|
|
@@ -9382,7 +9382,7 @@ function Ac({
|
|
|
9382
9382
|
error: "The specified collection does not exist. Check console"
|
|
9383
9383
|
}
|
|
9384
9384
|
),
|
|
9385
|
-
g && /* @__PURE__ */ _(
|
|
9385
|
+
g && /* @__PURE__ */ _(z, { children: [
|
|
9386
9386
|
e && /* @__PURE__ */ n(
|
|
9387
9387
|
Xe,
|
|
9388
9388
|
{
|
|
@@ -9454,7 +9454,7 @@ function bc({
|
|
|
9454
9454
|
fields: u.propertyConfigs
|
|
9455
9455
|
});
|
|
9456
9456
|
if (g === null || ur(g))
|
|
9457
|
-
return /* @__PURE__ */ n(
|
|
9457
|
+
return /* @__PURE__ */ n(z, {});
|
|
9458
9458
|
if (Yt(g))
|
|
9459
9459
|
m = Fo;
|
|
9460
9460
|
else if (g.Field)
|
|
@@ -9591,7 +9591,7 @@ function vc({
|
|
|
9591
9591
|
a.properties,
|
|
9592
9592
|
...Object.keys(t).filter((b) => b in a.properties)
|
|
9593
9593
|
) : h = {} : h = a.properties;
|
|
9594
|
-
const A = /* @__PURE__ */ n(
|
|
9594
|
+
const A = /* @__PURE__ */ n(z, { children: /* @__PURE__ */ n("div", { className: "py-1 flex flex-col space-y-2", children: Object.entries(h).filter(([b, w]) => !ur(w)).map(
|
|
9595
9595
|
([b, w], x) => {
|
|
9596
9596
|
const E = {
|
|
9597
9597
|
propertyKey: `${e}.${b}`,
|
|
@@ -9678,7 +9678,7 @@ function _c({
|
|
|
9678
9678
|
className: "text-text-secondary dark:text-text-secondary-dark"
|
|
9679
9679
|
}
|
|
9680
9680
|
);
|
|
9681
|
-
return /* @__PURE__ */ _(
|
|
9681
|
+
return /* @__PURE__ */ _(z, { children: [
|
|
9682
9682
|
!l && /* @__PURE__ */ n(
|
|
9683
9683
|
ut,
|
|
9684
9684
|
{
|
|
@@ -9876,7 +9876,7 @@ function kc({
|
|
|
9876
9876
|
) : h === "array" ? /* @__PURE__ */ n(
|
|
9877
9877
|
"div",
|
|
9878
9878
|
{
|
|
9879
|
-
className:
|
|
9879
|
+
className: ie(Be, "ml-2 pl-2 border-l border-solid"),
|
|
9880
9880
|
children: /* @__PURE__ */ n(
|
|
9881
9881
|
zo,
|
|
9882
9882
|
{
|
|
@@ -9915,7 +9915,7 @@ function kc({
|
|
|
9915
9915
|
) : h === "map" ? /* @__PURE__ */ n(
|
|
9916
9916
|
"div",
|
|
9917
9917
|
{
|
|
9918
|
-
className:
|
|
9918
|
+
className: ie(Be, "ml-2 pl-2 border-l border-solid"),
|
|
9919
9919
|
children: /* @__PURE__ */ n(
|
|
9920
9920
|
wi,
|
|
9921
9921
|
{
|
|
@@ -9941,7 +9941,7 @@ function kc({
|
|
|
9941
9941
|
function m(g) {
|
|
9942
9942
|
c(e, g);
|
|
9943
9943
|
}
|
|
9944
|
-
return /* @__PURE__ */ _(
|
|
9944
|
+
return /* @__PURE__ */ _(z, { children: [
|
|
9945
9945
|
/* @__PURE__ */ _(
|
|
9946
9946
|
J,
|
|
9947
9947
|
{
|
|
@@ -10086,7 +10086,7 @@ function xc({
|
|
|
10086
10086
|
i(f);
|
|
10087
10087
|
}
|
|
10088
10088
|
}
|
|
10089
|
-
) : u === "array" ? /* @__PURE__ */ n(J, { variant: "caption", children: "Arrays of arrays are not supported." }) : u === "map" ? /* @__PURE__ */ n("div", { className:
|
|
10089
|
+
) : u === "array" ? /* @__PURE__ */ n(J, { variant: "caption", children: "Arrays of arrays are not supported." }) : u === "map" ? /* @__PURE__ */ n("div", { className: ie(Be, "ml-2 pl-2 border-l border-solid"), children: /* @__PURE__ */ n(
|
|
10090
10090
|
wi,
|
|
10091
10091
|
{
|
|
10092
10092
|
value: d,
|
|
@@ -10102,7 +10102,7 @@ function xc({
|
|
|
10102
10102
|
}
|
|
10103
10103
|
);
|
|
10104
10104
|
}
|
|
10105
|
-
return /* @__PURE__ */ _(
|
|
10105
|
+
return /* @__PURE__ */ _(z, { children: [
|
|
10106
10106
|
/* @__PURE__ */ _(
|
|
10107
10107
|
J,
|
|
10108
10108
|
{
|
|
@@ -10254,7 +10254,7 @@ function Ec({
|
|
|
10254
10254
|
className: "text-text-secondary dark:text-text-secondary-dark"
|
|
10255
10255
|
}
|
|
10256
10256
|
);
|
|
10257
|
-
return /* @__PURE__ */ _(
|
|
10257
|
+
return /* @__PURE__ */ _(z, { children: [
|
|
10258
10258
|
!l && /* @__PURE__ */ n(
|
|
10259
10259
|
ut,
|
|
10260
10260
|
{
|
|
@@ -10338,7 +10338,7 @@ function Bc({
|
|
|
10338
10338
|
}
|
|
10339
10339
|
}
|
|
10340
10340
|
);
|
|
10341
|
-
return /* @__PURE__ */ _(
|
|
10341
|
+
return /* @__PURE__ */ _(z, { children: [
|
|
10342
10342
|
!l && /* @__PURE__ */ n(
|
|
10343
10343
|
ut,
|
|
10344
10344
|
{
|
|
@@ -10392,14 +10392,14 @@ function Cc({
|
|
|
10392
10392
|
const w = b ? a[b] : void 0;
|
|
10393
10393
|
u(b), f.setFieldTouched(p, !0), f.setFieldValue(p, b), f.setFieldValue(h, w ? ci(w) : null);
|
|
10394
10394
|
};
|
|
10395
|
-
return /* @__PURE__ */ _("div", { className:
|
|
10395
|
+
return /* @__PURE__ */ _("div", { className: ie(lr, "bg-transparent p-4 my-4 py-8"), children: [
|
|
10396
10396
|
/* @__PURE__ */ n(
|
|
10397
10397
|
cn,
|
|
10398
10398
|
{
|
|
10399
10399
|
name: p,
|
|
10400
10400
|
children: (b) => {
|
|
10401
10401
|
const w = b.field.value !== void 0 && b.field.value !== null ? b.field.value : "";
|
|
10402
|
-
return /* @__PURE__ */ n(
|
|
10402
|
+
return /* @__PURE__ */ n(z, { children: /* @__PURE__ */ n(
|
|
10403
10403
|
tt,
|
|
10404
10404
|
{
|
|
10405
10405
|
className: "mb-2",
|
|
@@ -10482,7 +10482,7 @@ function Ic({
|
|
|
10482
10482
|
p.current = t, g(t);
|
|
10483
10483
|
}, [t]), O(() => {
|
|
10484
10484
|
h.internalValue !== p.current && r(h.internalValue);
|
|
10485
|
-
}, [h]), /* @__PURE__ */ _(
|
|
10485
|
+
}, [h]), /* @__PURE__ */ _(z, { children: [
|
|
10486
10486
|
!d && /* @__PURE__ */ n(
|
|
10487
10487
|
J,
|
|
10488
10488
|
{
|
|
@@ -10503,7 +10503,7 @@ function Ic({
|
|
|
10503
10503
|
Ht,
|
|
10504
10504
|
{
|
|
10505
10505
|
value: m ?? "",
|
|
10506
|
-
className:
|
|
10506
|
+
className: ie(
|
|
10507
10507
|
wn,
|
|
10508
10508
|
a ? vn : ti,
|
|
10509
10509
|
"text-base"
|
|
@@ -11164,7 +11164,7 @@ function Fc({
|
|
|
11164
11164
|
};
|
|
11165
11165
|
return /* @__PURE__ */ n("div", { className: "pb-4", children: /* @__PURE__ */ n(Bt, { ...y }) }, `custom_shaped_array_${A}`);
|
|
11166
11166
|
});
|
|
11167
|
-
return /* @__PURE__ */ _(
|
|
11167
|
+
return /* @__PURE__ */ _(z, { children: [
|
|
11168
11168
|
!s && /* @__PURE__ */ n(
|
|
11169
11169
|
ut,
|
|
11170
11170
|
{
|
|
@@ -11235,7 +11235,7 @@ function Rc({
|
|
|
11235
11235
|
disabled: c || s,
|
|
11236
11236
|
name: "id",
|
|
11237
11237
|
value: (a && r === "existing" ? a.id : t) ?? "",
|
|
11238
|
-
endAdornment: s ? /* @__PURE__ */ n(Gt, { size: "small" }) : a ? /* @__PURE__ */ _(
|
|
11238
|
+
endAdornment: s ? /* @__PURE__ */ n(Gt, { size: "small" }) : a ? /* @__PURE__ */ _(z, { children: [
|
|
11239
11239
|
/* @__PURE__ */ n(_e, { title: "Copy", children: /* @__PURE__ */ n(
|
|
11240
11240
|
se,
|
|
11241
11241
|
{
|
|
@@ -11258,7 +11258,7 @@ function Rc({
|
|
|
11258
11258
|
) })
|
|
11259
11259
|
] }) : void 0
|
|
11260
11260
|
};
|
|
11261
|
-
return /* @__PURE__ */ _(
|
|
11261
|
+
return /* @__PURE__ */ _(z, { children: [
|
|
11262
11262
|
u && /* @__PURE__ */ n(
|
|
11263
11263
|
tt,
|
|
11264
11264
|
{
|
|
@@ -11381,7 +11381,7 @@ function Do({
|
|
|
11381
11381
|
}, [g, h, S, s, l, r, u, b.name, a]);
|
|
11382
11382
|
let R;
|
|
11383
11383
|
if (g && h)
|
|
11384
|
-
R = /* @__PURE__ */ n(
|
|
11384
|
+
R = /* @__PURE__ */ n(z, { children: "Multiple entities" });
|
|
11385
11385
|
else {
|
|
11386
11386
|
const D = g;
|
|
11387
11387
|
R = D ? /* @__PURE__ */ n(
|
|
@@ -11391,9 +11391,9 @@ function Do({
|
|
|
11391
11391
|
collection: t,
|
|
11392
11392
|
path: l
|
|
11393
11393
|
}
|
|
11394
|
-
) : /* @__PURE__ */ n(
|
|
11394
|
+
) : /* @__PURE__ */ n(z, {});
|
|
11395
11395
|
}
|
|
11396
|
-
const F = h ? /* @__PURE__ */ _(
|
|
11396
|
+
const F = h ? /* @__PURE__ */ _(z, { children: [
|
|
11397
11397
|
/* @__PURE__ */ n("b", { children: b.name }),
|
|
11398
11398
|
": Confirm multiple delete?"
|
|
11399
11399
|
] }) : `Would you like to delete this ${b.singularName ?? b.name}?`;
|
|
@@ -11581,11 +11581,11 @@ function Mc({
|
|
|
11581
11581
|
path: t,
|
|
11582
11582
|
values: i?.values,
|
|
11583
11583
|
fields: p.propertyConfigs
|
|
11584
|
-
}), [i?.values, t]), w = (e === "new" || e === "copy") && !!b.customId && b.customId !== "optional", x = pe(() => e === "new" || e === "copy" ? w ? void 0 : A.generateEntityId(t) : i?.id, []), E = ce(!1), B = ce(nn(b, e, i)), [v, S] = I.useState(x), [N, R] = I.useState(!1), [F, D] = I.useState(), [Y, oe] = I.useState(!1), [
|
|
11585
|
-
collection:
|
|
11584
|
+
}), [i?.values, t]), w = (e === "new" || e === "copy") && !!b.customId && b.customId !== "optional", x = pe(() => e === "new" || e === "copy" ? w ? void 0 : A.generateEntityId(t) : i?.id, []), E = ce(!1), B = ce(nn(b, e, i)), [v, S] = I.useState(x), [N, R] = I.useState(!1), [F, D] = I.useState(), [Y, oe] = I.useState(!1), [M, q] = Q(i?.values ?? B.current), X = (j) => o({
|
|
11585
|
+
collection: G,
|
|
11586
11586
|
path: t,
|
|
11587
11587
|
entityId: v,
|
|
11588
|
-
values:
|
|
11588
|
+
values: j,
|
|
11589
11589
|
previousValues: i?.values,
|
|
11590
11590
|
closeAfterSave: E.current,
|
|
11591
11591
|
autoSave: f ?? !1
|
|
@@ -11596,7 +11596,7 @@ function Mc({
|
|
|
11596
11596
|
console.error(H), D(H);
|
|
11597
11597
|
}).finally(() => {
|
|
11598
11598
|
E.current = !1;
|
|
11599
|
-
}),
|
|
11599
|
+
}), P = (j, H) => {
|
|
11600
11600
|
if (w && !v) {
|
|
11601
11601
|
console.error("Missing custom Id"), R(!0), H.setSubmitting(!1);
|
|
11602
11602
|
return;
|
|
@@ -11609,9 +11609,9 @@ function Mc({
|
|
|
11609
11609
|
throw Error("Form misconfiguration when saving, entityId should be set");
|
|
11610
11610
|
} else
|
|
11611
11611
|
throw Error("New FormType added, check EntityForm");
|
|
11612
|
-
return X(
|
|
11612
|
+
return X(j)?.then((ye) => {
|
|
11613
11613
|
H.resetForm({
|
|
11614
|
-
values:
|
|
11614
|
+
values: j,
|
|
11615
11615
|
submitCount: 0,
|
|
11616
11616
|
touched: {}
|
|
11617
11617
|
});
|
|
@@ -11620,8 +11620,8 @@ function Mc({
|
|
|
11620
11620
|
});
|
|
11621
11621
|
}, K = dn({
|
|
11622
11622
|
initialValues: B.current,
|
|
11623
|
-
onSubmit:
|
|
11624
|
-
validation: (
|
|
11623
|
+
onSubmit: P,
|
|
11624
|
+
validation: (j) => re?.validate(j, { abortEarly: !1 }).then(() => ({})).catch((H) => {
|
|
11625
11625
|
const ye = {};
|
|
11626
11626
|
return H.inner.forEach((L) => {
|
|
11627
11627
|
ye[L.path] = L.message;
|
|
@@ -11630,92 +11630,92 @@ function Mc({
|
|
|
11630
11630
|
});
|
|
11631
11631
|
O(() => {
|
|
11632
11632
|
B.current = nn(b, e, i);
|
|
11633
|
-
const
|
|
11634
|
-
!K.isSubmitting &&
|
|
11635
|
-
Object.entries(
|
|
11633
|
+
const j = K.initialValues;
|
|
11634
|
+
!K.isSubmitting && j && e === "existing" ? me(
|
|
11635
|
+
Object.entries(G.properties).map(([H, ye]) => {
|
|
11636
11636
|
if (ur(ye))
|
|
11637
11637
|
return {};
|
|
11638
|
-
const L =
|
|
11638
|
+
const L = j[H], le = B.current[H];
|
|
11639
11639
|
return W(L, le) ? {} : { [H]: le };
|
|
11640
11640
|
}).reduce((H, ye) => ({ ...H, ...ye }), {})
|
|
11641
11641
|
) : me({});
|
|
11642
11642
|
}, [i, b, e]);
|
|
11643
|
-
const ee = (
|
|
11643
|
+
const ee = (j) => {
|
|
11644
11644
|
const H = K.initialValues;
|
|
11645
|
-
q(
|
|
11645
|
+
q(j), l && l(j), f && j && !W(j, H) && X(j);
|
|
11646
11646
|
};
|
|
11647
11647
|
O(() => {
|
|
11648
11648
|
v && c && c(v);
|
|
11649
11649
|
}, [v, c]);
|
|
11650
|
-
const
|
|
11650
|
+
const G = qe({
|
|
11651
11651
|
collection: r,
|
|
11652
11652
|
path: t,
|
|
11653
11653
|
entityId: v,
|
|
11654
|
-
values:
|
|
11654
|
+
values: M,
|
|
11655
11655
|
previousValues: K.initialValues,
|
|
11656
11656
|
fields: p.propertyConfigs
|
|
11657
11657
|
}), fe = r.callbacks?.onIdUpdate, Z = k(async () => {
|
|
11658
|
-
if (fe &&
|
|
11658
|
+
if (fe && M && (e === "new" || e === "copy")) {
|
|
11659
11659
|
oe(!0);
|
|
11660
11660
|
try {
|
|
11661
|
-
const
|
|
11662
|
-
collection:
|
|
11661
|
+
const j = await fe({
|
|
11662
|
+
collection: G,
|
|
11663
11663
|
path: t,
|
|
11664
11664
|
entityId: v,
|
|
11665
|
-
values:
|
|
11665
|
+
values: M,
|
|
11666
11666
|
context: h
|
|
11667
11667
|
});
|
|
11668
|
-
S(
|
|
11669
|
-
} catch (
|
|
11670
|
-
m && m(
|
|
11668
|
+
S(j);
|
|
11669
|
+
} catch (j) {
|
|
11670
|
+
m && m(j), console.error(j);
|
|
11671
11671
|
}
|
|
11672
11672
|
oe(!1);
|
|
11673
11673
|
}
|
|
11674
|
-
}, [v,
|
|
11674
|
+
}, [v, M, e]);
|
|
11675
11675
|
O(() => {
|
|
11676
11676
|
Z();
|
|
11677
11677
|
}, [Z]);
|
|
11678
|
-
const [ae, me] = Q({}),
|
|
11678
|
+
const [ae, me] = Q({}), T = k(
|
|
11679
11679
|
({
|
|
11680
|
-
name:
|
|
11680
|
+
name: j,
|
|
11681
11681
|
value: H,
|
|
11682
11682
|
property: ye
|
|
11683
|
-
}) => A.checkUniqueField(t,
|
|
11683
|
+
}) => A.checkUniqueField(t, j, H, v),
|
|
11684
11684
|
[A, t, v]
|
|
11685
11685
|
), re = pe(
|
|
11686
11686
|
() => v ? wo(
|
|
11687
11687
|
v,
|
|
11688
|
-
|
|
11689
|
-
|
|
11688
|
+
G.properties,
|
|
11689
|
+
T
|
|
11690
11690
|
) : void 0,
|
|
11691
|
-
[v,
|
|
11692
|
-
),
|
|
11693
|
-
const ye = Pt(r,
|
|
11691
|
+
[v, G.properties, T]
|
|
11692
|
+
), ne = ft(), te = k(({ entity: j, customEntityActions: H }) => {
|
|
11693
|
+
const ye = Pt(r, ne, $e(t), null), L = j ? pi(r, ne, $e(t), j) : !0, le = [];
|
|
11694
11694
|
return ye && le.push(Ro), L && le.push(Po), H && le.push(...H), le;
|
|
11695
|
-
}, [
|
|
11695
|
+
}, [ne, r, t]), C = [], V = {
|
|
11696
11696
|
setFieldValue: K.setFieldValue,
|
|
11697
11697
|
values: K.values,
|
|
11698
|
-
collection:
|
|
11698
|
+
collection: G,
|
|
11699
11699
|
entityId: v,
|
|
11700
11700
|
path: t,
|
|
11701
11701
|
save: X
|
|
11702
11702
|
};
|
|
11703
11703
|
if (O(() => {
|
|
11704
|
-
d && d(
|
|
11705
|
-
}, [d,
|
|
11706
|
-
const
|
|
11704
|
+
d && d(V);
|
|
11705
|
+
}, [d, V]), y && r) {
|
|
11706
|
+
const j = {
|
|
11707
11707
|
entityId: v,
|
|
11708
11708
|
path: t,
|
|
11709
11709
|
status: e,
|
|
11710
11710
|
collection: r,
|
|
11711
11711
|
context: h,
|
|
11712
11712
|
currentEntityId: v,
|
|
11713
|
-
formContext:
|
|
11713
|
+
formContext: V
|
|
11714
11714
|
};
|
|
11715
11715
|
C.push(...y.map((H, ye) => H.form?.Actions ? /* @__PURE__ */ n(
|
|
11716
11716
|
H.form.Actions,
|
|
11717
11717
|
{
|
|
11718
|
-
...
|
|
11718
|
+
...j
|
|
11719
11719
|
},
|
|
11720
11720
|
`actions_${H.name}`
|
|
11721
11721
|
) : null).filter(Boolean));
|
|
@@ -11724,7 +11724,7 @@ function Mc({
|
|
|
11724
11724
|
C.length > 0 && /* @__PURE__ */ n(
|
|
11725
11725
|
"div",
|
|
11726
11726
|
{
|
|
11727
|
-
className:
|
|
11727
|
+
className: ie("w-full flex justify-end items-center sticky top-0 right-0 left-0 z-10 bg-opacity-60 bg-slate-200 dark:bg-opacity-60 dark:bg-slate-800 backdrop-blur-md"),
|
|
11728
11728
|
children: C
|
|
11729
11729
|
}
|
|
11730
11730
|
),
|
|
@@ -11772,8 +11772,8 @@ function Mc({
|
|
|
11772
11772
|
onValuesChanged: ee,
|
|
11773
11773
|
underlyingChanges: ae,
|
|
11774
11774
|
entity: i,
|
|
11775
|
-
resolvedCollection:
|
|
11776
|
-
formContext:
|
|
11775
|
+
resolvedCollection: G,
|
|
11776
|
+
formContext: V,
|
|
11777
11777
|
status: e,
|
|
11778
11778
|
savingError: F,
|
|
11779
11779
|
closeAfterSaveRef: E,
|
|
@@ -11981,21 +11981,21 @@ function jc({
|
|
|
11981
11981
|
};
|
|
11982
11982
|
}, [s, v.height, v.width]), D = k(({
|
|
11983
11983
|
x: C,
|
|
11984
|
-
y:
|
|
11984
|
+
y: V
|
|
11985
11985
|
}) => {
|
|
11986
|
-
const
|
|
11987
|
-
if (!
|
|
11986
|
+
const j = S.current?.getBoundingClientRect();
|
|
11987
|
+
if (!j)
|
|
11988
11988
|
throw Error("normalizePosition called before draggableBoundingRect is set");
|
|
11989
11989
|
return {
|
|
11990
|
-
x: Math.max(0, Math.min(C, v.width -
|
|
11991
|
-
y: Math.max(0, Math.min(
|
|
11990
|
+
x: Math.max(0, Math.min(C, v.width - j.width)),
|
|
11991
|
+
y: Math.max(0, Math.min(V, v.height - j.height))
|
|
11992
11992
|
};
|
|
11993
11993
|
}, [v]), Y = k((C) => {
|
|
11994
|
-
const
|
|
11995
|
-
if (!s || !
|
|
11994
|
+
const V = S.current?.getBoundingClientRect();
|
|
11995
|
+
if (!s || !V)
|
|
11996
11996
|
return;
|
|
11997
|
-
const
|
|
11998
|
-
(!h ||
|
|
11997
|
+
const j = C ?? D(F());
|
|
11998
|
+
(!h || j.x !== h.x || j.y !== h.y) && A(j);
|
|
11999
11999
|
}, [s, F, D, h]);
|
|
12000
12000
|
rc({
|
|
12001
12001
|
containerRef: S,
|
|
@@ -12027,7 +12027,7 @@ function jc({
|
|
|
12027
12027
|
i && B.properties[i] ? { [i]: B.properties[i] } : {},
|
|
12028
12028
|
r
|
|
12029
12029
|
);
|
|
12030
|
-
}, [B, y, i, r]),
|
|
12030
|
+
}, [B, y, i, r]), M = k(() => Y(h), [h, Y]), q = async (C) => (p(null), o && b && d && i ? d({
|
|
12031
12031
|
value: C[i],
|
|
12032
12032
|
propertyKey: i,
|
|
12033
12033
|
entity: b,
|
|
@@ -12038,23 +12038,23 @@ function jc({
|
|
|
12038
12038
|
context: f
|
|
12039
12039
|
}) : Promise.resolve());
|
|
12040
12040
|
if (!b)
|
|
12041
|
-
return /* @__PURE__ */ n(
|
|
12041
|
+
return /* @__PURE__ */ n(z, {});
|
|
12042
12042
|
const X = dn({
|
|
12043
12043
|
initialValues: b?.values ?? {},
|
|
12044
|
-
validation: (C) => oe?.validate(C, { abortEarly: !1 }).then(() => ({})).catch((
|
|
12045
|
-
const
|
|
12046
|
-
return
|
|
12047
|
-
|
|
12048
|
-
}),
|
|
12044
|
+
validation: (C) => oe?.validate(C, { abortEarly: !1 }).then(() => ({})).catch((V) => {
|
|
12045
|
+
const j = {};
|
|
12046
|
+
return V.inner.forEach((H) => {
|
|
12047
|
+
j[H.path] = H.message;
|
|
12048
|
+
}), j;
|
|
12049
12049
|
}),
|
|
12050
12050
|
validateOnInitialRender: !0,
|
|
12051
|
-
onSubmit: (C,
|
|
12052
|
-
q(C).then(() => c()).finally(() =>
|
|
12051
|
+
onSubmit: (C, V) => {
|
|
12052
|
+
q(C).then(() => c()).finally(() => V.setSubmitting(!1));
|
|
12053
12053
|
}
|
|
12054
|
-
}), { values:
|
|
12054
|
+
}), { values: P, isSubmitting: K, setFieldValue: ee, handleSubmit: G } = X;
|
|
12055
12055
|
if (O(() => {
|
|
12056
|
-
W(
|
|
12057
|
-
}, [
|
|
12056
|
+
W(P, x) || E(P);
|
|
12057
|
+
}, [P]), !b)
|
|
12058
12058
|
return /* @__PURE__ */ n(
|
|
12059
12059
|
Ee,
|
|
12060
12060
|
{
|
|
@@ -12062,11 +12062,11 @@ function jc({
|
|
|
12062
12062
|
}
|
|
12063
12063
|
);
|
|
12064
12064
|
if (!B)
|
|
12065
|
-
return /* @__PURE__ */ n(
|
|
12065
|
+
return /* @__PURE__ */ n(z, {});
|
|
12066
12066
|
const fe = K, Z = {
|
|
12067
12067
|
collection: B,
|
|
12068
12068
|
entityId: y,
|
|
12069
|
-
values:
|
|
12069
|
+
values: P,
|
|
12070
12070
|
path: a,
|
|
12071
12071
|
setFieldValue: ee,
|
|
12072
12072
|
save: q
|
|
@@ -12082,14 +12082,14 @@ function jc({
|
|
|
12082
12082
|
partOfBlock: !1,
|
|
12083
12083
|
autoFocus: l
|
|
12084
12084
|
} : void 0;
|
|
12085
|
-
let
|
|
12085
|
+
let T = /* @__PURE__ */ n(z, { children: /* @__PURE__ */ n(
|
|
12086
12086
|
"div",
|
|
12087
12087
|
{
|
|
12088
12088
|
className: "w-[560px] max-w-full max-h-[85vh]",
|
|
12089
12089
|
children: /* @__PURE__ */ _(
|
|
12090
12090
|
"form",
|
|
12091
12091
|
{
|
|
12092
|
-
onSubmit:
|
|
12092
|
+
onSubmit: G,
|
|
12093
12093
|
noValidate: !0,
|
|
12094
12094
|
children: [
|
|
12095
12095
|
/* @__PURE__ */ n(
|
|
@@ -12125,7 +12125,7 @@ function jc({
|
|
|
12125
12125
|
) });
|
|
12126
12126
|
const re = m.plugins;
|
|
12127
12127
|
re && re.forEach((C) => {
|
|
12128
|
-
C.form?.provider && (
|
|
12128
|
+
C.form?.provider && (T = /* @__PURE__ */ n(
|
|
12129
12129
|
C.form.provider.Component,
|
|
12130
12130
|
{
|
|
12131
12131
|
status: "existing",
|
|
@@ -12136,16 +12136,16 @@ function jc({
|
|
|
12136
12136
|
currentEntityId: y,
|
|
12137
12137
|
formContext: Z,
|
|
12138
12138
|
...C.form.provider.props,
|
|
12139
|
-
children:
|
|
12139
|
+
children: T
|
|
12140
12140
|
}
|
|
12141
12141
|
));
|
|
12142
12142
|
});
|
|
12143
|
-
const
|
|
12143
|
+
const ne = /* @__PURE__ */ _(
|
|
12144
12144
|
"div",
|
|
12145
12145
|
{
|
|
12146
12146
|
className: `text-gray-900 dark:text-white overflow-auto rounded rounded-md bg-white dark:bg-gray-950 ${l ? "" : "hidden"} cursor-grab max-w-[100vw]`,
|
|
12147
12147
|
children: [
|
|
12148
|
-
|
|
12148
|
+
T,
|
|
12149
12149
|
g && /* @__PURE__ */ n(J, { color: "error", children: g.message })
|
|
12150
12150
|
]
|
|
12151
12151
|
}
|
|
@@ -12158,13 +12158,13 @@ function jc({
|
|
|
12158
12158
|
className: `inline-block fixed z-20 shadow-outline rounded-md bg-white dark:bg-gray-950 ${l ? "visible" : "invisible"} cursor-grab overflow-visible`,
|
|
12159
12159
|
ref: S,
|
|
12160
12160
|
children: [
|
|
12161
|
-
/* @__PURE__ */ n(nc, { onResize:
|
|
12161
|
+
/* @__PURE__ */ n(nc, { onResize: M }),
|
|
12162
12162
|
/* @__PURE__ */ _(
|
|
12163
12163
|
"div",
|
|
12164
12164
|
{
|
|
12165
12165
|
className: "overflow-hidden",
|
|
12166
12166
|
children: [
|
|
12167
|
-
|
|
12167
|
+
ne,
|
|
12168
12168
|
/* @__PURE__ */ n(
|
|
12169
12169
|
"div",
|
|
12170
12170
|
{
|
|
@@ -12230,23 +12230,23 @@ const Yc = "collectionGroupParent", To = I.memo(
|
|
|
12230
12230
|
}, [y]), R = k(($) => {
|
|
12231
12231
|
const he = h.current;
|
|
12232
12232
|
return Un(he, d, $e(t), $ ?? null) ? he.inlineEditing === void 0 || he.inlineEditing : !1;
|
|
12233
|
-
}, [d, t]), F = p.selectionEnabled === void 0 || p.selectionEnabled, D = !R(), [Y, oe] = Q(!1),
|
|
12233
|
+
}, [d, t]), F = p.selectionEnabled === void 0 || p.selectionEnabled, D = !R(), [Y, oe] = Q(!1), M = Oo(), q = p.selectionController ?? M, {
|
|
12234
12234
|
selectedEntities: X,
|
|
12235
|
-
toggleEntitySelection:
|
|
12235
|
+
toggleEntitySelection: P,
|
|
12236
12236
|
isEntitySelected: K,
|
|
12237
12237
|
setSelectedEntities: ee
|
|
12238
12238
|
} = q;
|
|
12239
12239
|
O(() => {
|
|
12240
12240
|
x(void 0);
|
|
12241
12241
|
}, [X]);
|
|
12242
|
-
const
|
|
12242
|
+
const G = So({
|
|
12243
12243
|
fullPath: t,
|
|
12244
12244
|
collection: h.current,
|
|
12245
12245
|
entitiesDisplayedFirst: [],
|
|
12246
12246
|
lastDeleteTimestamp: E
|
|
12247
|
-
}), fe = I.useRef(Math.random().toString(36)), Z =
|
|
12248
|
-
|
|
12249
|
-
}, [
|
|
12247
|
+
}), fe = I.useRef(Math.random().toString(36)), Z = G.popupCell, ae = k(() => {
|
|
12248
|
+
G.setPopupCell?.(void 0);
|
|
12249
|
+
}, [G.setPopupCell]), me = k(($) => {
|
|
12250
12250
|
const he = h.current;
|
|
12251
12251
|
return b($), f.onAnalyticsEvent?.("edit_entity_clicked", {
|
|
12252
12252
|
path: $.path,
|
|
@@ -12258,7 +12258,7 @@ const Yc = "collectionGroupParent", To = I.memo(
|
|
|
12258
12258
|
updateUrl: !0,
|
|
12259
12259
|
onClose: N
|
|
12260
12260
|
});
|
|
12261
|
-
}, [N]),
|
|
12261
|
+
}, [N]), T = k(() => {
|
|
12262
12262
|
const $ = h.current;
|
|
12263
12263
|
f.onAnalyticsEvent?.("new_entity_click", {
|
|
12264
12264
|
path: t
|
|
@@ -12272,7 +12272,7 @@ const Yc = "collectionGroupParent", To = I.memo(
|
|
|
12272
12272
|
f.onAnalyticsEvent?.("multiple_delete_dialog_open", {
|
|
12273
12273
|
path: t
|
|
12274
12274
|
}), x(X);
|
|
12275
|
-
},
|
|
12275
|
+
}, ne = ($, he) => {
|
|
12276
12276
|
f.onAnalyticsEvent?.("single_entity_deleted", {
|
|
12277
12277
|
path: t
|
|
12278
12278
|
}), ee((be) => be.filter((Ae) => Ae.id !== he.id)), B(Date.now());
|
|
@@ -12283,12 +12283,12 @@ const Yc = "collectionGroupParent", To = I.memo(
|
|
|
12283
12283
|
};
|
|
12284
12284
|
let C;
|
|
12285
12285
|
m?.plugins && (C = m.plugins.find(($) => $.collectionView?.AddColumnComponent)?.collectionView?.AddColumnComponent);
|
|
12286
|
-
const
|
|
12286
|
+
const V = k(($, he) => {
|
|
12287
12287
|
if (u) {
|
|
12288
12288
|
const be = u.getCollectionConfig($), Ae = Je(be, he);
|
|
12289
12289
|
u.onCollectionModified($, Ae);
|
|
12290
12290
|
}
|
|
12291
|
-
}, [u]),
|
|
12291
|
+
}, [u]), j = k(({
|
|
12292
12292
|
width: $,
|
|
12293
12293
|
key: he
|
|
12294
12294
|
}) => {
|
|
@@ -12296,10 +12296,10 @@ const Yc = "collectionGroupParent", To = I.memo(
|
|
|
12296
12296
|
if (!bt(be.properties, he))
|
|
12297
12297
|
return;
|
|
12298
12298
|
const Ae = Mo(he, $);
|
|
12299
|
-
|
|
12300
|
-
}, [
|
|
12301
|
-
u &&
|
|
12302
|
-
}, [
|
|
12299
|
+
V(t, Ae);
|
|
12300
|
+
}, [V, t]), H = k(($) => {
|
|
12301
|
+
u && V(t, { defaultSize: $ });
|
|
12302
|
+
}, [V, t, u]), ye = Pt(p, d, $e(t), null), L = k(
|
|
12303
12303
|
({
|
|
12304
12304
|
name: $,
|
|
12305
12305
|
value: he,
|
|
@@ -12385,7 +12385,7 @@ const Yc = "collectionGroupParent", To = I.memo(
|
|
|
12385
12385
|
dependencies: [],
|
|
12386
12386
|
Builder: ({ entity: be }) => {
|
|
12387
12387
|
const Ae = l.getParentReferencesFromPath(be.path);
|
|
12388
|
-
return /* @__PURE__ */ n(
|
|
12388
|
+
return /* @__PURE__ */ n(z, { children: Ae.map((xe) => /* @__PURE__ */ n(
|
|
12389
12389
|
Xe,
|
|
12390
12390
|
{
|
|
12391
12391
|
reference: xe,
|
|
@@ -12457,8 +12457,8 @@ const Yc = "collectionGroupParent", To = I.memo(
|
|
|
12457
12457
|
{
|
|
12458
12458
|
fullPath: t,
|
|
12459
12459
|
collection: p,
|
|
12460
|
-
filter:
|
|
12461
|
-
sortBy:
|
|
12460
|
+
filter: G.filterValues,
|
|
12461
|
+
sortBy: G.sortBy,
|
|
12462
12462
|
onCountChange: S
|
|
12463
12463
|
}
|
|
12464
12464
|
)
|
|
@@ -12471,7 +12471,7 @@ const Yc = "collectionGroupParent", To = I.memo(
|
|
|
12471
12471
|
onHover: be
|
|
12472
12472
|
}) => {
|
|
12473
12473
|
const Ae = h.current;
|
|
12474
|
-
return m.plugins ? /* @__PURE__ */ n(
|
|
12474
|
+
return m.plugins ? /* @__PURE__ */ n(z, { children: m.plugins.filter((xe) => xe.collectionView?.HeaderAction).map((xe, It) => {
|
|
12475
12475
|
const Nt = xe.collectionView.HeaderAction;
|
|
12476
12476
|
return /* @__PURE__ */ n(
|
|
12477
12477
|
Nt,
|
|
@@ -12508,18 +12508,18 @@ const Yc = "collectionGroupParent", To = I.memo(
|
|
|
12508
12508
|
return /* @__PURE__ */ _(
|
|
12509
12509
|
"div",
|
|
12510
12510
|
{
|
|
12511
|
-
className:
|
|
12511
|
+
className: ie("overflow-hidden h-full w-full", o),
|
|
12512
12512
|
ref: g,
|
|
12513
12513
|
children: [
|
|
12514
12514
|
/* @__PURE__ */ n(
|
|
12515
12515
|
Co,
|
|
12516
12516
|
{
|
|
12517
12517
|
additionalFields: Ze,
|
|
12518
|
-
tableController:
|
|
12518
|
+
tableController: G,
|
|
12519
12519
|
displayedColumnIds: Ye,
|
|
12520
12520
|
onSizeChanged: H,
|
|
12521
12521
|
onEntityClick: me,
|
|
12522
|
-
onColumnResize:
|
|
12522
|
+
onColumnResize: j,
|
|
12523
12523
|
onValueChange: le,
|
|
12524
12524
|
tableRowActionsBuilder: Ar,
|
|
12525
12525
|
uniqueFieldValidator: L,
|
|
@@ -12537,9 +12537,9 @@ const Yc = "collectionGroupParent", To = I.memo(
|
|
|
12537
12537
|
{
|
|
12538
12538
|
parentCollectionIds: r ?? [],
|
|
12539
12539
|
collection: p,
|
|
12540
|
-
tableController:
|
|
12540
|
+
tableController: G,
|
|
12541
12541
|
onMultipleDeleteClick: re,
|
|
12542
|
-
onNewClick:
|
|
12542
|
+
onNewClick: T,
|
|
12543
12543
|
path: t,
|
|
12544
12544
|
relativePath: p.path,
|
|
12545
12545
|
selectionController: q,
|
|
@@ -12547,14 +12547,14 @@ const Yc = "collectionGroupParent", To = I.memo(
|
|
|
12547
12547
|
collectionEntitiesCount: v
|
|
12548
12548
|
}
|
|
12549
12549
|
),
|
|
12550
|
-
emptyComponent: A &&
|
|
12550
|
+
emptyComponent: A && G.filterValues === void 0 && G.sortBy === void 0 ? /* @__PURE__ */ _("div", { className: "flex flex-col items-center justify-center", children: [
|
|
12551
12551
|
/* @__PURE__ */ n(J, { variant: "subtitle2", children: "So empty..." }),
|
|
12552
12552
|
/* @__PURE__ */ _(
|
|
12553
12553
|
ge,
|
|
12554
12554
|
{
|
|
12555
12555
|
color: "primary",
|
|
12556
12556
|
variant: "outlined",
|
|
12557
|
-
onClick:
|
|
12557
|
+
onClick: T,
|
|
12558
12558
|
className: "mt-4",
|
|
12559
12559
|
children: [
|
|
12560
12560
|
/* @__PURE__ */ n(ct, {}),
|
|
@@ -12603,7 +12603,7 @@ const Yc = "collectionGroupParent", To = I.memo(
|
|
|
12603
12603
|
collection: p,
|
|
12604
12604
|
callbacks: p.callbacks,
|
|
12605
12605
|
open: !!w,
|
|
12606
|
-
onEntityDelete:
|
|
12606
|
+
onEntityDelete: ne,
|
|
12607
12607
|
onMultipleEntitiesDelete: te,
|
|
12608
12608
|
onClose: () => x(void 0)
|
|
12609
12609
|
}
|
|
@@ -12725,33 +12725,33 @@ function Lc({
|
|
|
12725
12725
|
}) {
|
|
12726
12726
|
const d = vi(), u = ht(), f = ke(), m = Et(), g = ue(), p = f.resolveAliasesFrom(o), h = Ke(), [A, y] = Q([]), b = (q) => {
|
|
12727
12727
|
let X;
|
|
12728
|
-
const
|
|
12728
|
+
const P = w.selectedEntities;
|
|
12729
12729
|
if (m.onAnalyticsEvent?.("reference_selection_toggle", {
|
|
12730
12730
|
path: p,
|
|
12731
12731
|
entityId: q.id
|
|
12732
|
-
}),
|
|
12733
|
-
if (
|
|
12734
|
-
X =
|
|
12732
|
+
}), P) {
|
|
12733
|
+
if (P.map((K) => K.id).indexOf(q.id) > -1)
|
|
12734
|
+
X = P.filter((K) => K.id !== q.id);
|
|
12735
12735
|
else {
|
|
12736
|
-
if (c &&
|
|
12736
|
+
if (c && P.length >= c)
|
|
12737
12737
|
return;
|
|
12738
|
-
X = [...
|
|
12738
|
+
X = [...P, q];
|
|
12739
12739
|
}
|
|
12740
12740
|
w.setSelectedEntities(X), t && t(X);
|
|
12741
12741
|
}
|
|
12742
12742
|
}, w = Oo(b);
|
|
12743
12743
|
O(() => {
|
|
12744
12744
|
let q = !1;
|
|
12745
|
-
const X = a?.map((
|
|
12745
|
+
const X = a?.map((P) => P?.toString()).filter(Boolean);
|
|
12746
12746
|
return X && i ? Promise.all(
|
|
12747
|
-
X.map((
|
|
12747
|
+
X.map((P) => h.fetchEntity({
|
|
12748
12748
|
path: p,
|
|
12749
|
-
entityId:
|
|
12749
|
+
entityId: P,
|
|
12750
12750
|
collection: i
|
|
12751
12751
|
}))
|
|
12752
|
-
).then((
|
|
12752
|
+
).then((P) => {
|
|
12753
12753
|
if (!q) {
|
|
12754
|
-
const K =
|
|
12754
|
+
const K = P.filter((ee) => ee !== void 0);
|
|
12755
12755
|
w.setSelectedEntities(K), y(K);
|
|
12756
12756
|
}
|
|
12757
12757
|
}) : (w.setSelectedEntities([]), y([])), () => {
|
|
@@ -12782,18 +12782,18 @@ function Lc({
|
|
|
12782
12782
|
}, v = ({
|
|
12783
12783
|
entity: q,
|
|
12784
12784
|
size: X,
|
|
12785
|
-
width:
|
|
12785
|
+
width: P,
|
|
12786
12786
|
frozen: K
|
|
12787
12787
|
}) => {
|
|
12788
|
-
const ee = w.selectedEntities,
|
|
12788
|
+
const ee = w.selectedEntities, G = ee && ee.map((fe) => fe.id).indexOf(q.id) > -1;
|
|
12789
12789
|
return /* @__PURE__ */ n(
|
|
12790
12790
|
gi,
|
|
12791
12791
|
{
|
|
12792
|
-
width:
|
|
12792
|
+
width: P,
|
|
12793
12793
|
frozen: K,
|
|
12794
12794
|
entity: q,
|
|
12795
12795
|
size: X,
|
|
12796
|
-
isSelected:
|
|
12796
|
+
isSelected: G,
|
|
12797
12797
|
selectionEnabled: r,
|
|
12798
12798
|
hideId: i?.hideIdFromCollection,
|
|
12799
12799
|
fullPath: p,
|
|
@@ -12824,7 +12824,7 @@ function Lc({
|
|
|
12824
12824
|
textSearchLoading: D,
|
|
12825
12825
|
textSearchInitialised: Y,
|
|
12826
12826
|
onTextSearchClick: oe,
|
|
12827
|
-
textSearchEnabled:
|
|
12827
|
+
textSearchEnabled: M
|
|
12828
12828
|
} = (
|
|
12829
12829
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
12830
12830
|
Io({
|
|
@@ -12838,7 +12838,7 @@ function Lc({
|
|
|
12838
12838
|
{
|
|
12839
12839
|
textSearchLoading: D,
|
|
12840
12840
|
onTextSearchClick: Y ? void 0 : oe,
|
|
12841
|
-
textSearchEnabled:
|
|
12841
|
+
textSearchEnabled: M,
|
|
12842
12842
|
displayedColumnIds: R,
|
|
12843
12843
|
onEntityClick: E,
|
|
12844
12844
|
tableController: F,
|
|
@@ -12911,7 +12911,7 @@ function $c({
|
|
|
12911
12911
|
children: /* @__PURE__ */ n(ct, {})
|
|
12912
12912
|
}
|
|
12913
12913
|
));
|
|
12914
|
-
return /* @__PURE__ */ _(
|
|
12914
|
+
return /* @__PURE__ */ _(z, { children: [
|
|
12915
12915
|
/* @__PURE__ */ n(
|
|
12916
12916
|
ge,
|
|
12917
12917
|
{
|
|
@@ -12974,7 +12974,7 @@ function Wc({
|
|
|
12974
12974
|
collection: r,
|
|
12975
12975
|
context: u
|
|
12976
12976
|
};
|
|
12977
|
-
g = /* @__PURE__ */ n(
|
|
12977
|
+
g = /* @__PURE__ */ n(z, { children: f.plugins.map((h, A) => h.homePage?.CollectionActions ? /* @__PURE__ */ n(
|
|
12978
12978
|
h.homePage.CollectionActions,
|
|
12979
12979
|
{
|
|
12980
12980
|
...p,
|
|
@@ -12986,7 +12986,7 @@ function Wc({
|
|
|
12986
12986
|
return /* @__PURE__ */ n(
|
|
12987
12987
|
ba,
|
|
12988
12988
|
{
|
|
12989
|
-
className:
|
|
12989
|
+
className: ie("h-full p-4 cursor-pointer min-h-[230px]"),
|
|
12990
12990
|
onClick: () => {
|
|
12991
12991
|
s?.(), d(i), l && l.setRecentlyVisitedPaths(
|
|
12992
12992
|
[t, ...(l.recentlyVisitedPaths ?? []).filter((p) => p !== t)]
|
|
@@ -13183,7 +13183,7 @@ function Xc({
|
|
|
13183
13183
|
const w = {
|
|
13184
13184
|
context: i
|
|
13185
13185
|
};
|
|
13186
|
-
b = /* @__PURE__ */ n(
|
|
13186
|
+
b = /* @__PURE__ */ n(z, { children: o.plugins.filter((x) => x.homePage?.includeSection).map((x, E) => {
|
|
13187
13187
|
const B = x.homePage.includeSection(w);
|
|
13188
13188
|
return /* @__PURE__ */ n(
|
|
13189
13189
|
on,
|
|
@@ -13523,7 +13523,7 @@ const td = function({
|
|
|
13523
13523
|
"div",
|
|
13524
13524
|
{
|
|
13525
13525
|
style: c,
|
|
13526
|
-
className:
|
|
13526
|
+
className: ie(
|
|
13527
13527
|
"pr-2",
|
|
13528
13528
|
{
|
|
13529
13529
|
"ml-[17rem]": o && p,
|
|
@@ -13884,7 +13884,7 @@ function Du({
|
|
|
13884
13884
|
)), /* @__PURE__ */ _(
|
|
13885
13885
|
"div",
|
|
13886
13886
|
{
|
|
13887
|
-
className:
|
|
13887
|
+
className: ie(
|
|
13888
13888
|
"text-sm font-medium text-gray-500",
|
|
13889
13889
|
"min-w-80 flex flex-col gap-4",
|
|
13890
13890
|
"relative transition-colors duration-200 ease-in rounded font-medium",
|
|
@@ -13956,7 +13956,7 @@ function Ru({
|
|
|
13956
13956
|
);
|
|
13957
13957
|
return I.useEffect(() => (s(o), () => {
|
|
13958
13958
|
s.clear();
|
|
13959
|
-
}), [o, s]), /* @__PURE__ */ _(
|
|
13959
|
+
}), [o, s]), /* @__PURE__ */ _(z, { children: [
|
|
13960
13960
|
/* @__PURE__ */ n(
|
|
13961
13961
|
Xr,
|
|
13962
13962
|
{
|
|
@@ -14059,14 +14059,14 @@ function Tu({
|
|
|
14059
14059
|
injectCollections: l
|
|
14060
14060
|
}) {
|
|
14061
14061
|
const c = jt(), d = ce(), [u, f] = Q(), [m, g] = Q(), [p, h] = Q(!1), [A, y] = Q(void 0), [b, w] = Q(!0), [x, E] = Q(void 0), B = ve(e), v = ve(t), S = B ? `/${B}` : "/", N = B ? `/${B}/${v}` : `/${v}`, R = k(
|
|
14062
|
-
(
|
|
14062
|
+
(T) => B ? `/${B}/${Lt(T)}` : `/${Lt(T)}`,
|
|
14063
14063
|
[B]
|
|
14064
14064
|
), F = k(
|
|
14065
|
-
(
|
|
14065
|
+
(T) => `${ve(t)}/${Lt(T)}`,
|
|
14066
14066
|
[t]
|
|
14067
|
-
), D = k((
|
|
14068
|
-
const
|
|
14069
|
-
...(
|
|
14067
|
+
), D = k((T, re) => {
|
|
14068
|
+
const ne = [
|
|
14069
|
+
...(T ?? []).map((C) => C.hideFromNavigation ? void 0 : {
|
|
14070
14070
|
url: F(C.id ?? C.path),
|
|
14071
14071
|
type: "collection",
|
|
14072
14072
|
name: C.name.trim(),
|
|
@@ -14083,23 +14083,23 @@ function Tu({
|
|
|
14083
14083
|
description: C.description?.trim(),
|
|
14084
14084
|
group: C.group?.trim()
|
|
14085
14085
|
}).filter(Boolean)
|
|
14086
|
-
], te = Object.values(
|
|
14086
|
+
], te = Object.values(ne).map((C) => C.group).filter(Boolean).filter((C, V, j) => j.indexOf(C) === V);
|
|
14087
14087
|
return {
|
|
14088
|
-
navigationEntries:
|
|
14088
|
+
navigationEntries: ne,
|
|
14089
14089
|
groups: te
|
|
14090
14090
|
};
|
|
14091
14091
|
}, [R, F]), Y = k(async () => {
|
|
14092
14092
|
if (!r.initialLoading) {
|
|
14093
14093
|
try {
|
|
14094
|
-
const [
|
|
14094
|
+
const [T = [], re = []] = await Promise.all(
|
|
14095
14095
|
[
|
|
14096
14096
|
cd(i, r, s, l),
|
|
14097
14097
|
dd(o, r, s)
|
|
14098
14098
|
]
|
|
14099
14099
|
);
|
|
14100
|
-
(!W(d.current,
|
|
14101
|
-
} catch (
|
|
14102
|
-
console.error(
|
|
14100
|
+
(!W(d.current, T) || !W(m, re) || !W(A, D(T, re))) && (d.current = T, f(T), g(re), y(D(T ?? [], re)));
|
|
14101
|
+
} catch (T) {
|
|
14102
|
+
console.error(T), E(T);
|
|
14103
14103
|
}
|
|
14104
14104
|
w(!1), h(!0);
|
|
14105
14105
|
}
|
|
@@ -14107,86 +14107,85 @@ function Tu({
|
|
|
14107
14107
|
O(() => {
|
|
14108
14108
|
Y();
|
|
14109
14109
|
}, [Y]);
|
|
14110
|
-
const oe = k((
|
|
14110
|
+
const oe = k((T, re, ne = !1) => {
|
|
14111
14111
|
if (!u)
|
|
14112
14112
|
return;
|
|
14113
|
-
const te = ai(ve(
|
|
14114
|
-
let
|
|
14115
|
-
if (
|
|
14116
|
-
const H =
|
|
14117
|
-
|
|
14118
|
-
...
|
|
14119
|
-
subcollections:
|
|
14120
|
-
callbacks:
|
|
14121
|
-
permissions:
|
|
14113
|
+
const te = ai(ve(T), u), C = ne ? a?.getCollectionConfig(T) : void 0, V = te ? Je(te, C) : void 0;
|
|
14114
|
+
let j = V;
|
|
14115
|
+
if (V) {
|
|
14116
|
+
const H = V.subcollections, ye = V.callbacks, L = V.permissions;
|
|
14117
|
+
j = {
|
|
14118
|
+
...j,
|
|
14119
|
+
subcollections: j?.subcollections ?? H,
|
|
14120
|
+
callbacks: j?.callbacks ?? ye,
|
|
14121
|
+
permissions: j?.permissions ?? L
|
|
14122
14122
|
};
|
|
14123
14123
|
}
|
|
14124
|
-
if (
|
|
14125
|
-
return { ...
|
|
14124
|
+
if (j)
|
|
14125
|
+
return { ...V, ...j };
|
|
14126
14126
|
}, [
|
|
14127
14127
|
e,
|
|
14128
14128
|
t,
|
|
14129
14129
|
u
|
|
14130
|
-
]),
|
|
14130
|
+
]), M = k((T) => {
|
|
14131
14131
|
let re = u;
|
|
14132
14132
|
if (!re)
|
|
14133
14133
|
throw Error("Collections have not been initialised yet");
|
|
14134
|
-
for (let
|
|
14135
|
-
const te =
|
|
14134
|
+
for (let ne = 0; ne < T.length; ne++) {
|
|
14135
|
+
const te = T[ne], C = re.find((V) => V.id === te || V.path === te);
|
|
14136
14136
|
if (!C)
|
|
14137
14137
|
return;
|
|
14138
|
-
if (re = C.subcollections,
|
|
14138
|
+
if (re = C.subcollections, ne === T.length - 1)
|
|
14139
14139
|
return C;
|
|
14140
14140
|
}
|
|
14141
|
-
}, [u]), q = k((
|
|
14141
|
+
}, [u]), q = k((T) => {
|
|
14142
14142
|
let re = u;
|
|
14143
14143
|
if (!re)
|
|
14144
14144
|
throw Error("Collections have not been initialised yet");
|
|
14145
|
-
for (let
|
|
14146
|
-
const te =
|
|
14145
|
+
for (let ne = 0; ne < T.length; ne++) {
|
|
14146
|
+
const te = T[ne], C = re.find((V) => V.id === te);
|
|
14147
14147
|
if (!C)
|
|
14148
14148
|
return;
|
|
14149
|
-
if (re = C.subcollections,
|
|
14149
|
+
if (re = C.subcollections, ne === T.length - 1)
|
|
14150
14150
|
return C;
|
|
14151
14151
|
}
|
|
14152
14152
|
}, [u]), X = k(
|
|
14153
|
-
(
|
|
14153
|
+
(T) => ve(T + "/").startsWith(ve(N) + "/"),
|
|
14154
14154
|
[N]
|
|
14155
|
-
),
|
|
14156
|
-
if (
|
|
14157
|
-
return
|
|
14155
|
+
), P = k((T) => {
|
|
14156
|
+
if (T.startsWith(N))
|
|
14157
|
+
return T.replace(N, "");
|
|
14158
14158
|
throw Error("Expected path starting with " + N);
|
|
14159
14159
|
}, [N]), K = k(
|
|
14160
14160
|
({
|
|
14161
|
-
path:
|
|
14162
|
-
}) => `s/edit/${Lt(
|
|
14161
|
+
path: T
|
|
14162
|
+
}) => `s/edit/${Lt(T)}`,
|
|
14163
14163
|
[]
|
|
14164
|
-
), ee = k((
|
|
14164
|
+
), ee = k((T) => {
|
|
14165
14165
|
if (!u)
|
|
14166
14166
|
throw Error("Collections have not been initialised yet");
|
|
14167
|
-
return Pn(
|
|
14168
|
-
}, [u]),
|
|
14169
|
-
path:
|
|
14167
|
+
return Pn(T, u);
|
|
14168
|
+
}, [u]), G = c.state, fe = G && G.base_location ? G.base_location : c, Z = k((T) => Vo({
|
|
14169
|
+
path: T,
|
|
14170
14170
|
collections: u
|
|
14171
|
-
}), [u]), ae = k((
|
|
14172
|
-
const
|
|
14173
|
-
|
|
14171
|
+
}), [u]), ae = k((T) => {
|
|
14172
|
+
const ne = T.split("/").filter((C, V) => V % 2 === 0);
|
|
14173
|
+
ne.pop();
|
|
14174
14174
|
const te = [];
|
|
14175
|
-
for (let
|
|
14176
|
-
te.push(
|
|
14177
|
-
|
|
14178
|
-
return z(ie), console.log("getParentCollectionIds", P, C), C;
|
|
14175
|
+
for (let C = 1; C <= ne.length; C++)
|
|
14176
|
+
te.push(ne.slice(0, C));
|
|
14177
|
+
return te.map((C) => M(C)?.id).filter(Boolean);
|
|
14179
14178
|
}, [Z]), me = k(
|
|
14180
|
-
(
|
|
14179
|
+
(T) => {
|
|
14181
14180
|
let re = u;
|
|
14182
|
-
const
|
|
14183
|
-
for (let te = 0; te <
|
|
14184
|
-
const C =
|
|
14185
|
-
if (!
|
|
14181
|
+
const ne = [];
|
|
14182
|
+
for (let te = 0; te < T.length; te++) {
|
|
14183
|
+
const C = T[te], V = re.find((j) => j.id === C);
|
|
14184
|
+
if (!V)
|
|
14186
14185
|
throw Error(`Collection with id ${C} not found`);
|
|
14187
|
-
|
|
14186
|
+
ne.push(V.path), re = V.subcollections;
|
|
14188
14187
|
}
|
|
14189
|
-
return
|
|
14188
|
+
return ne;
|
|
14190
14189
|
},
|
|
14191
14190
|
[q]
|
|
14192
14191
|
);
|
|
@@ -14200,10 +14199,10 @@ function Tu({
|
|
|
14200
14199
|
baseCollectionPath: t,
|
|
14201
14200
|
initialised: p,
|
|
14202
14201
|
getCollection: oe,
|
|
14203
|
-
getCollectionFromPaths:
|
|
14202
|
+
getCollectionFromPaths: M,
|
|
14204
14203
|
getCollectionFromIds: q,
|
|
14205
14204
|
isUrlCollectionPath: X,
|
|
14206
|
-
urlPathToDataPath:
|
|
14205
|
+
urlPathToDataPath: P,
|
|
14207
14206
|
buildUrlCollectionPath: F,
|
|
14208
14207
|
buildUrlEditCollectionPath: K,
|
|
14209
14208
|
buildCMSUrlPath: R,
|
|
@@ -14260,7 +14259,7 @@ function ud({
|
|
|
14260
14259
|
o.customId && o.formAutoSave && console.warn(`The collection ${o.path} has customId and formAutoSave enabled. This is not supported and formAutoSave will be ignored`);
|
|
14261
14260
|
const [u, f] = Q(!1), [m, g] = Q(void 0);
|
|
14262
14261
|
mi(m, () => {
|
|
14263
|
-
m &&
|
|
14262
|
+
m && V({
|
|
14264
14263
|
entityId: Z?.id,
|
|
14265
14264
|
collection: o,
|
|
14266
14265
|
path: e,
|
|
@@ -14268,15 +14267,15 @@ function ud({
|
|
|
14268
14267
|
closeAfterSave: !1
|
|
14269
14268
|
});
|
|
14270
14269
|
}, !1, 2e3);
|
|
14271
|
-
const p = Ke(), h = vi(), A = ht(), y = gt(), b = ue(), w = Ce(), x = ft(), [E, B] = Q(void 0), [v, S] = Q(i ? "copy" : t ? "existing" : "new"), N = ce(void 0), R = N.current, F = (o.subcollections ?? []).filter((U) => !U.hideFromNavigation), D = F?.length ?? 0, Y = o.entityViews, oe = Y?.length ?? 0,
|
|
14270
|
+
const p = Ke(), h = vi(), A = ht(), y = gt(), b = ue(), w = Ce(), x = ft(), [E, B] = Q(void 0), [v, S] = Q(i ? "copy" : t ? "existing" : "new"), N = ce(void 0), R = N.current, F = (o.subcollections ?? []).filter((U) => !U.hideFromNavigation), D = F?.length ?? 0, Y = o.entityViews, oe = Y?.length ?? 0, M = o.formAutoSave && !o.customId, q = oe > 0 || D > 0, X = r ?? Yn(
|
|
14272
14271
|
o ? o.defaultSelectedView : void 0,
|
|
14273
14272
|
{
|
|
14274
14273
|
status: v,
|
|
14275
14274
|
entityId: t
|
|
14276
14275
|
}
|
|
14277
|
-
),
|
|
14276
|
+
), P = ce(X ?? $t), K = P.current === $t, {
|
|
14278
14277
|
entity: ee,
|
|
14279
|
-
dataLoading:
|
|
14278
|
+
dataLoading: G,
|
|
14280
14279
|
// eslint-disable-next-line no-unused-vars
|
|
14281
14280
|
dataLoadingError: fe
|
|
14282
14281
|
} = no({
|
|
@@ -14284,15 +14283,15 @@ function ud({
|
|
|
14284
14283
|
entityId: t,
|
|
14285
14284
|
collection: o,
|
|
14286
14285
|
useCache: !1
|
|
14287
|
-
}), [Z, ae] = Q(ee), [me,
|
|
14286
|
+
}), [Z, ae] = Q(ee), [me, T] = Q(void 0);
|
|
14288
14287
|
O(() => {
|
|
14289
14288
|
ee && ae(ee);
|
|
14290
14289
|
}, [ee]), O(() => {
|
|
14291
14290
|
if (v === "new")
|
|
14292
|
-
|
|
14291
|
+
T(!1);
|
|
14293
14292
|
else {
|
|
14294
14293
|
const U = Z ? Un(o, x, $e(e), Z ?? null) : !1;
|
|
14295
|
-
Z &&
|
|
14294
|
+
Z && T(!U);
|
|
14296
14295
|
}
|
|
14297
14296
|
}, [x, Z, v]);
|
|
14298
14297
|
const re = k((U) => {
|
|
@@ -14300,19 +14299,19 @@ function ud({
|
|
|
14300
14299
|
type: "error",
|
|
14301
14300
|
message: "Error before saving: " + U?.message
|
|
14302
14301
|
}), console.error(U);
|
|
14303
|
-
}, [y]),
|
|
14302
|
+
}, [y]), ne = k((U) => {
|
|
14304
14303
|
f(!1), y.open({
|
|
14305
14304
|
type: "error",
|
|
14306
14305
|
message: "Error after saving (entity is saved): " + U?.message
|
|
14307
14306
|
}), console.error(U);
|
|
14308
14307
|
}, [y]), te = (U, Ie) => {
|
|
14309
|
-
f(!1),
|
|
14308
|
+
f(!1), M || y.open({
|
|
14310
14309
|
type: "success",
|
|
14311
14310
|
message: `${o.singularName ?? o.name}: Saved correctly`
|
|
14312
14311
|
}), ae(U), S("existing"), s(!1), c && c({ entity: U }), Ie ? (h.setBlocked(!1), h.close(!0), d?.()) : v !== "existing" && A.replace({
|
|
14313
14312
|
path: e,
|
|
14314
14313
|
entityId: U.id,
|
|
14315
|
-
selectedSubPath:
|
|
14314
|
+
selectedSubPath: P.current,
|
|
14316
14315
|
updateUrl: !0,
|
|
14317
14316
|
collection: o
|
|
14318
14317
|
});
|
|
@@ -14321,7 +14320,7 @@ function ud({
|
|
|
14321
14320
|
type: "error",
|
|
14322
14321
|
message: "Error saving: " + U?.message
|
|
14323
14322
|
}), console.error("Error saving entity", e, t), console.error(U);
|
|
14324
|
-
}, [t, e, y]),
|
|
14323
|
+
}, [t, e, y]), V = ({
|
|
14325
14324
|
values: U,
|
|
14326
14325
|
previousValues: Ie,
|
|
14327
14326
|
closeAfterSave: Ne,
|
|
@@ -14341,9 +14340,9 @@ function ud({
|
|
|
14341
14340
|
onSaveSuccess: ($) => te($, Ne),
|
|
14342
14341
|
onSaveFailure: C,
|
|
14343
14342
|
onPreSaveHookError: re,
|
|
14344
|
-
onSaveSuccessHookError:
|
|
14343
|
+
onSaveSuccessHookError: ne
|
|
14345
14344
|
}).then();
|
|
14346
|
-
},
|
|
14345
|
+
}, j = async ({
|
|
14347
14346
|
collection: U,
|
|
14348
14347
|
path: Ie,
|
|
14349
14348
|
entityId: Ne,
|
|
@@ -14352,7 +14351,7 @@ function ud({
|
|
|
14352
14351
|
closeAfterSave: St,
|
|
14353
14352
|
autoSave: $
|
|
14354
14353
|
}) => {
|
|
14355
|
-
v && ($ ? g(et) :
|
|
14354
|
+
v && ($ ? g(et) : V({
|
|
14356
14355
|
collection: U,
|
|
14357
14356
|
path: Ie,
|
|
14358
14357
|
entityId: Ne,
|
|
@@ -14362,13 +14361,13 @@ function ud({
|
|
|
14362
14361
|
}));
|
|
14363
14362
|
}, H = Y ? Y.map((U) => Gn(U, b.entityViews)).filter(Boolean) : [], ye = Y && H.map(
|
|
14364
14363
|
(U, Ie) => {
|
|
14365
|
-
if (!U ||
|
|
14364
|
+
if (!U || P.current !== U.key)
|
|
14366
14365
|
return null;
|
|
14367
14366
|
const Ne = U.Builder;
|
|
14368
14367
|
return Ne ? /* @__PURE__ */ n(
|
|
14369
14368
|
"div",
|
|
14370
14369
|
{
|
|
14371
|
-
className:
|
|
14370
|
+
className: ie(
|
|
14372
14371
|
Be,
|
|
14373
14372
|
"relative flex-grow w-full h-full overflow-auto "
|
|
14374
14373
|
),
|
|
@@ -14386,10 +14385,10 @@ function ud({
|
|
|
14386
14385
|
`custom_view_${U.key}`
|
|
14387
14386
|
) : (console.error("customView.Builder is not defined"), null);
|
|
14388
14387
|
}
|
|
14389
|
-
).filter(Boolean), L =
|
|
14388
|
+
).filter(Boolean), L = G && !Z || (!Z || me === void 0) && (v === "existing" || v === "copy"), le = L || u, Me = F && F.map(
|
|
14390
14389
|
(U, Ie) => {
|
|
14391
14390
|
const Ne = U.id ?? U.path, et = Z ? `${e}/${Z?.id}/${ve(Ne)}` : void 0;
|
|
14392
|
-
return
|
|
14391
|
+
return P.current !== Ne ? null : /* @__PURE__ */ _(
|
|
14393
14392
|
"div",
|
|
14394
14393
|
{
|
|
14395
14394
|
className: "relative flex-grow h-full overflow-auto w-full",
|
|
@@ -14419,7 +14418,7 @@ function ud({
|
|
|
14419
14418
|
).filter(Boolean), Se = k(() => {
|
|
14420
14419
|
s(!1);
|
|
14421
14420
|
}, []), we = (U) => {
|
|
14422
|
-
|
|
14421
|
+
P.current = U, A.replace({
|
|
14423
14422
|
path: e,
|
|
14424
14423
|
entityId: t,
|
|
14425
14424
|
selectedSubPath: U === $t ? void 0 : U,
|
|
@@ -14439,7 +14438,7 @@ function ud({
|
|
|
14439
14438
|
id: U
|
|
14440
14439
|
} : void 0);
|
|
14441
14440
|
}, []), Qe = (U) => {
|
|
14442
|
-
|
|
14441
|
+
M || s(U);
|
|
14443
14442
|
};
|
|
14444
14443
|
function st() {
|
|
14445
14444
|
const U = b.plugins;
|
|
@@ -14449,7 +14448,7 @@ function ud({
|
|
|
14449
14448
|
status: v,
|
|
14450
14449
|
path: e,
|
|
14451
14450
|
collection: o,
|
|
14452
|
-
onEntitySaveRequested:
|
|
14451
|
+
onEntitySaveRequested: j,
|
|
14453
14452
|
onDiscard: Se,
|
|
14454
14453
|
onValuesChanged: Ye,
|
|
14455
14454
|
onModified: Qe,
|
|
@@ -14457,7 +14456,7 @@ function ud({
|
|
|
14457
14456
|
onIdChange: at,
|
|
14458
14457
|
onFormContextChange: B,
|
|
14459
14458
|
hideId: o.hideIdFromForm,
|
|
14460
|
-
autoSave:
|
|
14459
|
+
autoSave: M,
|
|
14461
14460
|
onIdUpdateError: Ze
|
|
14462
14461
|
}
|
|
14463
14462
|
);
|
|
@@ -14480,7 +14479,7 @@ function ud({
|
|
|
14480
14479
|
));
|
|
14481
14480
|
}), /* @__PURE__ */ n(de, { children: Ie });
|
|
14482
14481
|
}
|
|
14483
|
-
const gr = me === void 0 ? /* @__PURE__ */ n(
|
|
14482
|
+
const gr = me === void 0 ? /* @__PURE__ */ n(z, {}) : me ? /* @__PURE__ */ _(z, { children: [
|
|
14484
14483
|
/* @__PURE__ */ n(
|
|
14485
14484
|
J,
|
|
14486
14485
|
{
|
|
@@ -14523,11 +14522,11 @@ function ud({
|
|
|
14523
14522
|
"div",
|
|
14524
14523
|
{
|
|
14525
14524
|
className: "flex flex-col h-full w-full transition-width duration-250 ease-in-out",
|
|
14526
|
-
children: /* @__PURE__ */ _(
|
|
14525
|
+
children: /* @__PURE__ */ _(z, { children: [
|
|
14527
14526
|
/* @__PURE__ */ _(
|
|
14528
14527
|
"div",
|
|
14529
14528
|
{
|
|
14530
|
-
className:
|
|
14529
|
+
className: ie(Be, "no-scrollbar border-b pl-2 pr-2 pt-1 flex items-end overflow-scroll bg-gray-50 dark:bg-gray-950"),
|
|
14531
14530
|
children: [
|
|
14532
14531
|
/* @__PURE__ */ n(
|
|
14533
14532
|
"div",
|
|
@@ -14554,7 +14553,7 @@ function ud({
|
|
|
14554
14553
|
/* @__PURE__ */ _(
|
|
14555
14554
|
Ca,
|
|
14556
14555
|
{
|
|
14557
|
-
value:
|
|
14556
|
+
value: P.current,
|
|
14558
14557
|
onValueChange: (U) => {
|
|
14559
14558
|
we(U);
|
|
14560
14559
|
},
|
|
@@ -14684,7 +14683,7 @@ const jo = I.createContext({
|
|
|
14684
14683
|
}), vi = () => je(jo);
|
|
14685
14684
|
function Mu() {
|
|
14686
14685
|
const t = fr().sidePanels, r = [...t];
|
|
14687
|
-
return r.push(void 0), /* @__PURE__ */ n(
|
|
14686
|
+
return r.push(void 0), /* @__PURE__ */ n(z, { children: r.map((i, o) => /* @__PURE__ */ n(
|
|
14688
14687
|
fd,
|
|
14689
14688
|
{
|
|
14690
14689
|
panel: i,
|
|
@@ -14783,13 +14782,13 @@ function hd(e) {
|
|
|
14783
14782
|
};
|
|
14784
14783
|
}, [t, s]);
|
|
14785
14784
|
const l = k((c) => {
|
|
14786
|
-
r(c), i(c ? /* @__PURE__ */ _(
|
|
14785
|
+
r(c), i(c ? /* @__PURE__ */ _(z, { children: [
|
|
14787
14786
|
" You have unsaved changes in this ",
|
|
14788
14787
|
/* @__PURE__ */ n("b", { children: s?.singularName ?? s?.name }),
|
|
14789
14788
|
"."
|
|
14790
14789
|
] }) : void 0);
|
|
14791
14790
|
}, [s?.name, r, i]);
|
|
14792
|
-
return !e || !s ? /* @__PURE__ */ n("div", { className: "w-full" }) : /* @__PURE__ */ n(
|
|
14791
|
+
return !e || !s ? /* @__PURE__ */ n("div", { className: "w-full" }) : /* @__PURE__ */ n(z, { children: /* @__PURE__ */ n(de, { children: /* @__PURE__ */ n(
|
|
14793
14792
|
ud,
|
|
14794
14793
|
{
|
|
14795
14794
|
...e,
|
|
@@ -15335,7 +15334,7 @@ function Ed({
|
|
|
15335
15334
|
children: o
|
|
15336
15335
|
}
|
|
15337
15336
|
));
|
|
15338
|
-
}), /* @__PURE__ */ n(
|
|
15337
|
+
}), /* @__PURE__ */ n(z, { children: o });
|
|
15339
15338
|
}
|
|
15340
15339
|
function Bd({
|
|
15341
15340
|
hovered: e,
|
|
@@ -15419,7 +15418,7 @@ function sn({
|
|
|
15419
15418
|
width: r ? "280px" : "72px",
|
|
15420
15419
|
transition: r ? "width 150ms ease-in" : void 0
|
|
15421
15420
|
},
|
|
15422
|
-
className: ({ isActive: c }) =>
|
|
15421
|
+
className: ({ isActive: c }) => ie(
|
|
15423
15422
|
"rounded-r-xl truncate",
|
|
15424
15423
|
"hover:bg-slate-300 hover:bg-opacity-75 dark:hover:bg-gray-700 dark:hover:bg-opacity-75 text-gray-800 dark:text-gray-200 hover:text-gray-900 hover:dark:text-gray-100",
|
|
15425
15424
|
"flex flex-row items-center mr-8",
|
|
@@ -15441,7 +15440,7 @@ function sn({
|
|
|
15441
15440
|
/* @__PURE__ */ n(
|
|
15442
15441
|
"div",
|
|
15443
15442
|
{
|
|
15444
|
-
className:
|
|
15443
|
+
className: ie(
|
|
15445
15444
|
r ? "opacity-100" : "opacity-0 hidden",
|
|
15446
15445
|
"ml-4 font-inherit text-inherit"
|
|
15447
15446
|
),
|
|
@@ -15531,7 +15530,7 @@ const Cd = 280, Vu = I.memo(
|
|
|
15531
15530
|
/* @__PURE__ */ n(
|
|
15532
15531
|
"div",
|
|
15533
15532
|
{
|
|
15534
|
-
className:
|
|
15533
|
+
className: ie(Be, "flex-grow overflow-auto lg:m-0 lg:mx-4 lg:mb-4 lg:rounded-lg lg:border lg:border-solid m-0 mt-1"),
|
|
15535
15534
|
children: /* @__PURE__ */ n(de, { children: r })
|
|
15536
15535
|
}
|
|
15537
15536
|
)
|
|
@@ -15582,7 +15581,7 @@ function Id(e) {
|
|
|
15582
15581
|
transition: "padding 100ms cubic-bezier(0.4, 0, 0.6, 1) 0ms",
|
|
15583
15582
|
padding: e.open ? "32px 144px 0px 24px" : "72px 16px 0px"
|
|
15584
15583
|
},
|
|
15585
|
-
className:
|
|
15584
|
+
className: ie("cursor-pointer"),
|
|
15586
15585
|
children: /* @__PURE__ */ n(
|
|
15587
15586
|
_e,
|
|
15588
15587
|
{
|
|
@@ -15598,7 +15597,7 @@ function Id(e) {
|
|
|
15598
15597
|
{
|
|
15599
15598
|
src: e.logo,
|
|
15600
15599
|
alt: "Logo",
|
|
15601
|
-
className:
|
|
15600
|
+
className: ie(
|
|
15602
15601
|
"max-w-full max-h-full",
|
|
15603
15602
|
e.open ?? "w-[112px] h-[112px]"
|
|
15604
15603
|
)
|
|
@@ -15644,7 +15643,7 @@ function Id(e) {
|
|
|
15644
15643
|
)
|
|
15645
15644
|
]
|
|
15646
15645
|
}
|
|
15647
|
-
) : e.displayed ? /* @__PURE__ */ _(
|
|
15646
|
+
) : e.displayed ? /* @__PURE__ */ _(z, { children: [
|
|
15648
15647
|
/* @__PURE__ */ n(
|
|
15649
15648
|
se,
|
|
15650
15649
|
{
|
|
@@ -15989,7 +15988,7 @@ const Gu = I.memo(
|
|
|
15989
15988
|
}) {
|
|
15990
15989
|
const i = jt(), o = ke();
|
|
15991
15990
|
if (!o)
|
|
15992
|
-
return /* @__PURE__ */ n(
|
|
15991
|
+
return /* @__PURE__ */ n(z, {});
|
|
15993
15992
|
const a = i.state, s = a && a.base_location ? a.base_location : i, l = [];
|
|
15994
15993
|
o.views && o.views.forEach((m) => {
|
|
15995
15994
|
Array.isArray(m.path) ? l.push(...m.path.map((g) => ln(g, m))) : l.push(ln(m.path, m));
|