@applica-software-guru/react-admin 1.3.172 → 1.3.174
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/ra-fields/AttachmentField.d.ts +10 -3
- package/dist/components/ra-fields/AttachmentField.d.ts.map +1 -1
- package/dist/react-admin.cjs.js +2 -2
- package/dist/react-admin.cjs.js.map +1 -1
- package/dist/react-admin.es.js +43 -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/ra-fields/AttachmentField.tsx +18 -5
- package/src/components/ra-lists/BulkFloatingActionsToolbar.tsx +2 -2
package/dist/react-admin.es.js
CHANGED
|
@@ -18408,41 +18408,48 @@ WQ.propTypes = {
|
|
|
18408
18408
|
ping: u.string,
|
|
18409
18409
|
rel: u.string
|
|
18410
18410
|
};
|
|
18411
|
-
const UQ = ({
|
|
18412
|
-
|
|
18413
|
-
|
|
18414
|
-
|
|
18415
|
-
|
|
18416
|
-
|
|
18417
|
-
|
|
18418
|
-
|
|
18411
|
+
const UQ = ({
|
|
18412
|
+
entityId: e,
|
|
18413
|
+
property: t,
|
|
18414
|
+
disabled: n,
|
|
18415
|
+
showUser: r = !1,
|
|
18416
|
+
userResource: o = "entities/user",
|
|
18417
|
+
...a
|
|
18418
|
+
}) => {
|
|
18419
|
+
const [s, c] = je(null), A = on(a), d = rp(), f = Zn(), p = Pe(
|
|
18420
|
+
async (I) => {
|
|
18421
|
+
I.preventDefault(), I.stopPropagation();
|
|
18422
|
+
const B = ht.get(A, a == null ? void 0 : a.source), v = f.replace("entities/", ""), T = await d.getFile(
|
|
18423
|
+
`/attachments/${v}/${e || (A == null ? void 0 : A.id)}/${t || (a == null ? void 0 : a.source)}/${(B == null ? void 0 : B.id) || (A == null ? void 0 : A.id)}`
|
|
18424
|
+
), P = document.createElement("a");
|
|
18425
|
+
P.href = T, P.download = ht.get(A, (a == null ? void 0 : a.title) || (a == null ? void 0 : a.source)), P.click();
|
|
18419
18426
|
},
|
|
18420
|
-
[
|
|
18421
|
-
),
|
|
18427
|
+
[d, A, e, f, t, a == null ? void 0 : a.source, a == null ? void 0 : a.title]
|
|
18428
|
+
), h = Ze(
|
|
18422
18429
|
() => ({
|
|
18423
|
-
...
|
|
18424
|
-
[
|
|
18425
|
-
[
|
|
18430
|
+
...A,
|
|
18431
|
+
[a == null ? void 0 : a.source]: (A == null ? void 0 : A.src) || ht.get(A, a == null ? void 0 : a.source),
|
|
18432
|
+
[a == null ? void 0 : a.title]: (A == null ? void 0 : A.title) || ht.get(A, (a == null ? void 0 : a.title) || (a == null ? void 0 : a.source))
|
|
18426
18433
|
}),
|
|
18427
|
-
[
|
|
18428
|
-
),
|
|
18434
|
+
[A, a == null ? void 0 : a.source, a == null ? void 0 : a.title]
|
|
18435
|
+
), m = Dr();
|
|
18429
18436
|
return Re(() => {
|
|
18430
|
-
!
|
|
18431
|
-
}, [
|
|
18437
|
+
!A || !(A != null && A.userId) || r === !1 || d.getOne(o, { id: A == null ? void 0 : A.userId }).then(({ data: I }) => c(I)).catch(() => c(null));
|
|
18438
|
+
}, [A, d, o]), /* @__PURE__ */ C(
|
|
18432
18439
|
WQ,
|
|
18433
18440
|
{
|
|
18434
|
-
...
|
|
18441
|
+
...a,
|
|
18435
18442
|
disabled: n,
|
|
18436
|
-
record:
|
|
18437
|
-
onClick:
|
|
18443
|
+
record: h,
|
|
18444
|
+
onClick: p,
|
|
18438
18445
|
title: /* @__PURE__ */ ee(Le, { sx: { cursor: "pointer" }, children: [
|
|
18439
|
-
/* @__PURE__ */ C(me, { variant: "subtitle1", children: ht.get(
|
|
18446
|
+
/* @__PURE__ */ C(me, { variant: "subtitle1", children: ht.get(h, (a == null ? void 0 : a.title) || (a == null ? void 0 : a.source)) }),
|
|
18440
18447
|
/* @__PURE__ */ ee(me, { variant: "caption", color: "secondary", children: [
|
|
18441
|
-
ht.get(
|
|
18442
|
-
|
|
18443
|
-
|
|
18444
|
-
user:
|
|
18445
|
-
created: Bo(
|
|
18448
|
+
ht.get(h, "sizeDescription"),
|
|
18449
|
+
r && s && " | ",
|
|
18450
|
+
r && s && m("ra.attachment.info", {
|
|
18451
|
+
user: s == null ? void 0 : s.name,
|
|
18452
|
+
created: Bo(h == null ? void 0 : h.createdAt).format("DD/MM/YYYY HH:mm")
|
|
18446
18453
|
})
|
|
18447
18454
|
] })
|
|
18448
18455
|
] })
|
|
@@ -29406,10 +29413,10 @@ const ef = {
|
|
|
29406
29413
|
r(I.currentTarget);
|
|
29407
29414
|
}, a = () => {
|
|
29408
29415
|
r(null);
|
|
29409
|
-
}, s = Ys((I) => I.breakpoints.down("md")),
|
|
29410
|
-
|
|
29411
|
-
}, [
|
|
29412
|
-
return /* @__PURE__ */ C(Mv, { in:
|
|
29416
|
+
}, s = Ys((I) => I.breakpoints.down("md")), { filterValues: c, resource: A, selectedIds: d = [], onUnselectItems: f } = Ep(e), p = !!n && d !== void 0 && d.length > 0, h = p ? "simple-popover" : void 0, m = D.useCallback(() => {
|
|
29417
|
+
f(), r(null);
|
|
29418
|
+
}, [f, r]);
|
|
29419
|
+
return /* @__PURE__ */ C(Mv, { in: d !== void 0 && d.length > 0, children: /* @__PURE__ */ ee(
|
|
29413
29420
|
Le,
|
|
29414
29421
|
{
|
|
29415
29422
|
sx: {
|
|
@@ -29418,12 +29425,12 @@ const ef = {
|
|
|
29418
29425
|
right: "16px"
|
|
29419
29426
|
},
|
|
29420
29427
|
children: [
|
|
29421
|
-
/* @__PURE__ */ C(Hv, { color: "primary", "aria-label": "manage", onClick: o, children:
|
|
29428
|
+
/* @__PURE__ */ C(Hv, { color: "primary", "aria-label": "manage", onClick: o, children: d == null ? void 0 : d.length }),
|
|
29422
29429
|
/* @__PURE__ */ C(
|
|
29423
29430
|
Ip,
|
|
29424
29431
|
{
|
|
29425
|
-
id:
|
|
29426
|
-
open:
|
|
29432
|
+
id: h,
|
|
29433
|
+
open: p,
|
|
29427
29434
|
anchorEl: n,
|
|
29428
29435
|
onClose: a,
|
|
29429
29436
|
anchorOrigin: {
|
|
@@ -29441,9 +29448,9 @@ const ef = {
|
|
|
29441
29448
|
D.Children.map(t, (I) => {
|
|
29442
29449
|
var B;
|
|
29443
29450
|
return /* @__PURE__ */ C(mu, { sx: ef, children: D.isValidElement(I) ? D.cloneElement(I, {
|
|
29444
|
-
filterValues:
|
|
29445
|
-
resource:
|
|
29446
|
-
selectedIds:
|
|
29451
|
+
filterValues: c,
|
|
29452
|
+
resource: A,
|
|
29453
|
+
selectedIds: d,
|
|
29447
29454
|
sx: rv,
|
|
29448
29455
|
...(B = I.props) != null && B.popover ? { closePopover: a } : {}
|
|
29449
29456
|
}) : null });
|