@applica-software-guru/react-admin 1.4.189 → 1.4.192
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/components/ActionsMenu.d.ts.map +1 -1
- package/dist/components/ra-buttons/CreateInDialogButton.d.ts +6 -1
- package/dist/components/ra-buttons/CreateInDialogButton.d.ts.map +1 -1
- package/dist/components/ra-buttons/EditInDialogButton.d.ts +2 -1
- package/dist/components/ra-buttons/EditInDialogButton.d.ts.map +1 -1
- package/dist/react-admin.cjs.js +5 -5
- package/dist/react-admin.cjs.js.map +1 -1
- package/dist/react-admin.es.js +55 -36
- package/dist/react-admin.es.js.map +1 -1
- package/dist/react-admin.umd.js +2 -2
- package/dist/react-admin.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/ActionsMenu.tsx +9 -7
- package/src/components/ra-buttons/CreateInDialogButton.tsx +17 -3
- package/src/components/ra-buttons/EditInDialogButton.tsx +7 -2
package/dist/react-admin.es.js
CHANGED
|
@@ -3529,30 +3529,36 @@ const J5 = ap("div", {
|
|
|
3529
3529
|
"& .MuiMenuItem-root": {
|
|
3530
3530
|
padding: 0,
|
|
3531
3531
|
margin: 0,
|
|
3532
|
-
backgroundColor:
|
|
3532
|
+
// backgroundColor: theme.palette.background.paper,
|
|
3533
3533
|
"& .MuiButton-startIcon": {
|
|
3534
3534
|
marginRight: e.spacing(0)
|
|
3535
3535
|
}
|
|
3536
3536
|
}
|
|
3537
3537
|
}));
|
|
3538
3538
|
function ts({ horizontal: e = !1, children: t }) {
|
|
3539
|
-
const [n, r] = je(null), o = Le.useRef(null), a = (
|
|
3540
|
-
|
|
3541
|
-
}, s = Se((
|
|
3542
|
-
|
|
3539
|
+
const [n, r] = je(null), o = Le.useRef(null), a = (A) => {
|
|
3540
|
+
A.stopPropagation(), A.preventDefault(), r(A.currentTarget), o.current = A.currentTarget;
|
|
3541
|
+
}, s = Se((A) => {
|
|
3542
|
+
A.stopPropagation(), A.preventDefault(), r(null);
|
|
3543
3543
|
}, []);
|
|
3544
3544
|
if (!t || Le.Children.count(t) === 0 || // @ts-ignore
|
|
3545
|
-
t != null && t.filter && (t == null ? void 0 : t.filter((
|
|
3545
|
+
t != null && t.filter && (t == null ? void 0 : t.filter((A) => Le.isValidElement(A)).length) === 0)
|
|
3546
3546
|
return null;
|
|
3547
|
-
const c = Se((
|
|
3548
|
-
var
|
|
3549
|
-
|
|
3550
|
-
}, []);
|
|
3547
|
+
const c = Se((A) => {
|
|
3548
|
+
var f;
|
|
3549
|
+
A.stopPropagation(), A.preventDefault(), r(null), typeof ((f = A.currentTarget) == null ? void 0 : f.onClick) == "function" && A.currentTarget.onClick(A);
|
|
3550
|
+
}, []), u = { width: "100%", justifyContent: "flex-start" };
|
|
3551
3551
|
return /* @__PURE__ */ $(J5, { children: [
|
|
3552
3552
|
/* @__PURE__ */ h(zB, { "aria-label": "more", "aria-haspopup": "true", onClick: a, color: n ? "inherit" : "default", children: e ? /* @__PURE__ */ h(UD, {}) : /* @__PURE__ */ h(YD, {}) }),
|
|
3553
3553
|
/* @__PURE__ */ h(X5, { open: n, onClose: s, arrow: "right-top", children: Wn.map(
|
|
3554
3554
|
t,
|
|
3555
|
-
(
|
|
3555
|
+
(A, f) => Le.isValidElement(A) && /* @__PURE__ */ h(WB, { onClick: c, children: Le.cloneElement(
|
|
3556
|
+
A,
|
|
3557
|
+
{
|
|
3558
|
+
// @ts-ignore
|
|
3559
|
+
style: { ...u }
|
|
3560
|
+
}
|
|
3561
|
+
) }, f)
|
|
3556
3562
|
) })
|
|
3557
3563
|
] });
|
|
3558
3564
|
}
|
|
@@ -28408,44 +28414,53 @@ function vne({
|
|
|
28408
28414
|
scrollToTop: a = !0,
|
|
28409
28415
|
className: s,
|
|
28410
28416
|
sx: c,
|
|
28411
|
-
|
|
28412
|
-
|
|
28413
|
-
|
|
28414
|
-
|
|
28417
|
+
style: u,
|
|
28418
|
+
fab: A = !0,
|
|
28419
|
+
onSubmit: f,
|
|
28420
|
+
onSuccess: p,
|
|
28421
|
+
onError: C,
|
|
28422
|
+
...m
|
|
28415
28423
|
}) {
|
|
28416
|
-
const [
|
|
28424
|
+
const [I, B] = je(!1), v = Mr(), w = Zn(), { openDialog: P, closeDialog: y } = ns(), S = Se(() => P(w, () => B(!0)), [P, w]), T = Se(() => y(w, () => B(!1)), [y, w]), D = A && Ks((M) => M.breakpoints.down("md"));
|
|
28417
28425
|
return /* @__PURE__ */ $(rn, { children: [
|
|
28418
|
-
|
|
28426
|
+
D ? /* @__PURE__ */ h(
|
|
28419
28427
|
i$,
|
|
28420
28428
|
{
|
|
28421
|
-
...
|
|
28429
|
+
...m,
|
|
28422
28430
|
state: o$[String(a)],
|
|
28423
28431
|
color: "primary",
|
|
28424
28432
|
className: Xe(LB.floating, s),
|
|
28425
|
-
"aria-label": n &&
|
|
28426
|
-
onClick:
|
|
28433
|
+
"aria-label": n && v(n),
|
|
28434
|
+
onClick: S,
|
|
28427
28435
|
children: /* @__PURE__ */ h(lf, {})
|
|
28428
28436
|
}
|
|
28429
|
-
) : /* @__PURE__ */ h(ti, { ...
|
|
28437
|
+
) : /* @__PURE__ */ h(ti, { ...m, sx: c, label: n, onClick: S, style: u, children: /* @__PURE__ */ h(lf, {}) }),
|
|
28430
28438
|
/* @__PURE__ */ h(
|
|
28431
28439
|
eA,
|
|
28432
28440
|
{
|
|
28433
|
-
open:
|
|
28441
|
+
open: I,
|
|
28434
28442
|
scroll: "body",
|
|
28435
|
-
sx: {
|
|
28436
|
-
|
|
28443
|
+
sx: {
|
|
28444
|
+
"& .MuiToolbar-root": {
|
|
28445
|
+
position: "initial",
|
|
28446
|
+
paddingLeft: 2.5,
|
|
28447
|
+
paddingRight: 2.5,
|
|
28448
|
+
paddingBottom: 2.5
|
|
28449
|
+
}
|
|
28450
|
+
},
|
|
28451
|
+
onClose: T,
|
|
28437
28452
|
fullWidth: e,
|
|
28438
28453
|
maxWidth: t,
|
|
28439
28454
|
children: /* @__PURE__ */ h(
|
|
28440
28455
|
r$,
|
|
28441
28456
|
{
|
|
28442
|
-
...
|
|
28457
|
+
...m,
|
|
28443
28458
|
redirect: o,
|
|
28444
28459
|
record: r,
|
|
28445
|
-
onClose:
|
|
28446
|
-
onSubmit:
|
|
28447
|
-
onSuccess:
|
|
28448
|
-
onError:
|
|
28460
|
+
onClose: T,
|
|
28461
|
+
onSubmit: f,
|
|
28462
|
+
onSuccess: p,
|
|
28463
|
+
onError: C
|
|
28449
28464
|
}
|
|
28450
28465
|
)
|
|
28451
28466
|
}
|
|
@@ -28490,25 +28505,29 @@ function bne({
|
|
|
28490
28505
|
fullWidth: e = !0,
|
|
28491
28506
|
maxWidth: t = "md",
|
|
28492
28507
|
label: n = "ra.action.edit",
|
|
28493
|
-
|
|
28508
|
+
style: r,
|
|
28509
|
+
...o
|
|
28494
28510
|
}) {
|
|
28495
|
-
const [
|
|
28511
|
+
const [a, s] = je(!1), { openDialog: c, closeDialog: u } = ns(), A = Zn(), f = Se(() => c(A, () => s(!0)), [c, A]), p = Se(() => u(A, () => s(!1)), [u, A]);
|
|
28496
28512
|
return /* @__PURE__ */ $(rn, { children: [
|
|
28497
|
-
/* @__PURE__ */ h(ti, { label: n, onClick:
|
|
28513
|
+
/* @__PURE__ */ h(ti, { label: n, onClick: f, style: r, children: /* @__PURE__ */ h(XD, {}) }),
|
|
28498
28514
|
/* @__PURE__ */ h(
|
|
28499
28515
|
eA,
|
|
28500
28516
|
{
|
|
28501
|
-
open:
|
|
28517
|
+
open: a,
|
|
28502
28518
|
scroll: "body",
|
|
28503
28519
|
sx: {
|
|
28504
28520
|
"& .MuiToolbar-root": {
|
|
28505
|
-
position: "initial"
|
|
28521
|
+
position: "initial",
|
|
28522
|
+
paddingLeft: 2.5,
|
|
28523
|
+
paddingRight: 2.5,
|
|
28524
|
+
paddingBottom: 2.5
|
|
28506
28525
|
}
|
|
28507
28526
|
},
|
|
28508
|
-
onClose:
|
|
28527
|
+
onClose: p,
|
|
28509
28528
|
fullWidth: e,
|
|
28510
28529
|
maxWidth: t,
|
|
28511
|
-
children: /* @__PURE__ */ h(a$, { onClose:
|
|
28530
|
+
children: /* @__PURE__ */ h(a$, { onClose: p, children: o == null ? void 0 : o.children })
|
|
28512
28531
|
}
|
|
28513
28532
|
)
|
|
28514
28533
|
] });
|