@applica-software-guru/react-admin 1.0.16 → 1.0.29
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/README.md +7 -25
- package/dist/components/Layout/Header/HeaderContent/Notification.d.ts +1 -1
- package/dist/components/Layout/Header/HeaderContent/NotificationItem.d.ts +1 -1
- package/dist/components/Layout/index.d.ts.map +1 -1
- package/dist/components/ra-lists/NotificationList/NotificationList.d.ts.map +1 -1
- package/dist/components/ra-lists/NotificationList/button/MarkAsReadedButton.d.ts.map +1 -1
- package/dist/components/ra-lists/NotificationList/button/MarkAsUnreadedButton.d.ts.map +1 -1
- package/dist/hooks/useBreadcrumbs.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/react-admin.cjs.js +3 -3
- package/dist/react-admin.es.js +68 -53
- package/dist/react-admin.umd.js +3 -3
- package/package.json +13 -8
package/dist/react-admin.es.js
CHANGED
|
@@ -7205,42 +7205,52 @@ const sn = () => Wt(zI), gM = ["e-", "entities/"], dM = (e) => {
|
|
|
7205
7205
|
pathname: s
|
|
7206
7206
|
} = Ri();
|
|
7207
7207
|
return it(() => {
|
|
7208
|
-
|
|
7209
|
-
|
|
7210
|
-
|
|
7211
|
-
|
|
7208
|
+
var E;
|
|
7209
|
+
const a = s.split("/").filter((h) => h);
|
|
7210
|
+
let l = at.exports.cloneDeep(r), u = s, g = n(l, s);
|
|
7211
|
+
if (g || (g = n(l, a[a.length - 1]), u = g ? g.id : u), !g)
|
|
7212
|
+
for (let h = a.length; h >= 0; h--) {
|
|
7213
|
+
let I = a.slice(0, h).join("/");
|
|
7214
|
+
if (g = n(l, I), g) {
|
|
7215
|
+
u = g.id;
|
|
7216
|
+
break;
|
|
7217
|
+
}
|
|
7218
|
+
}
|
|
7219
|
+
const d = (E = g == null ? void 0 : g.url) == null ? void 0 : E.split("/");
|
|
7220
|
+
if (a.length >= (d == null ? void 0 : d.length)) {
|
|
7221
|
+
const h = a[a.length - 1];
|
|
7212
7222
|
if (g) {
|
|
7213
|
-
const
|
|
7214
|
-
id: `${u}-${
|
|
7223
|
+
const I = h === "create" || s === g.url ? "create" : "edit", B = `resources.${u}.breadcrumbs.${I}`, Q = {
|
|
7224
|
+
id: `${u}-${I}`,
|
|
7215
7225
|
type: "item",
|
|
7216
|
-
title: e(
|
|
7217
|
-
_: e(
|
|
7218
|
-
_:
|
|
7226
|
+
title: e(B, {
|
|
7227
|
+
_: e(B, {
|
|
7228
|
+
_: B
|
|
7219
7229
|
})
|
|
7220
7230
|
}),
|
|
7221
7231
|
url: s,
|
|
7222
7232
|
breadcrumbs: !0,
|
|
7223
7233
|
parent: g
|
|
7224
7234
|
};
|
|
7225
|
-
g.type = "collapse", g.breadcrumbs = !0, g.children = g.children || [], g.children.push(
|
|
7235
|
+
g.type = "collapse", g.breadcrumbs = !0, g.children = g.children || [], g.children.push(Q), g = Q;
|
|
7226
7236
|
}
|
|
7227
7237
|
}
|
|
7228
|
-
let
|
|
7238
|
+
let p = [];
|
|
7229
7239
|
if (g) {
|
|
7230
|
-
let
|
|
7240
|
+
let h = {
|
|
7231
7241
|
...g,
|
|
7232
7242
|
last: !0
|
|
7233
7243
|
};
|
|
7234
|
-
for (;
|
|
7235
|
-
|
|
7236
|
-
|
|
7244
|
+
for (; h; )
|
|
7245
|
+
p.push(h), h = h.parent;
|
|
7246
|
+
p = p.reverse();
|
|
7237
7247
|
}
|
|
7238
7248
|
return {
|
|
7239
7249
|
isLoading: t,
|
|
7240
7250
|
navigation: {
|
|
7241
7251
|
items: l
|
|
7242
7252
|
},
|
|
7243
|
-
breadcrumbs:
|
|
7253
|
+
breadcrumbs: p
|
|
7244
7254
|
};
|
|
7245
7255
|
}, [t, s, r, n, e]);
|
|
7246
7256
|
};
|
|
@@ -19022,7 +19032,7 @@ var uQ = { exports: {} };
|
|
|
19022
19032
|
});
|
|
19023
19033
|
})(uQ);
|
|
19024
19034
|
const xn = uQ.exports, oc = ({
|
|
19025
|
-
resource: e
|
|
19035
|
+
resource: e,
|
|
19026
19036
|
selected: t,
|
|
19027
19037
|
notification: r,
|
|
19028
19038
|
onClick: n
|
|
@@ -19075,7 +19085,7 @@ const xn = uQ.exports, oc = ({
|
|
|
19075
19085
|
};
|
|
19076
19086
|
oc.displayName = "NotificationItem";
|
|
19077
19087
|
oc.defaultProps = {
|
|
19078
|
-
resource: "
|
|
19088
|
+
resource: "entities/notification",
|
|
19079
19089
|
selected: !1
|
|
19080
19090
|
};
|
|
19081
19091
|
oc.propTypes = {
|
|
@@ -19103,7 +19113,7 @@ const N8 = {
|
|
|
19103
19113
|
alignSelf: "flex-start",
|
|
19104
19114
|
transform: "none"
|
|
19105
19115
|
}, ic = ({
|
|
19106
|
-
resource: e
|
|
19116
|
+
resource: e
|
|
19107
19117
|
}) => {
|
|
19108
19118
|
const t = dt(), r = xr(t.breakpoints.down("md")), n = Po(null), [s, a] = ut(!1), l = () => {
|
|
19109
19119
|
a((Q) => !Q);
|
|
@@ -19238,7 +19248,7 @@ const N8 = {
|
|
|
19238
19248
|
};
|
|
19239
19249
|
ic.displayName = "Notification";
|
|
19240
19250
|
ic.defaultProps = {
|
|
19241
|
-
resource: "
|
|
19251
|
+
resource: "entities/notification"
|
|
19242
19252
|
};
|
|
19243
19253
|
ic.propTypes = {
|
|
19244
19254
|
resource: c.exports.string.isRequired
|
|
@@ -19439,7 +19449,7 @@ const H8 = () => {
|
|
|
19439
19449
|
width: "calc(100% - 260px)",
|
|
19440
19450
|
flexGrow: 1,
|
|
19441
19451
|
p: {
|
|
19442
|
-
xs:
|
|
19452
|
+
xs: 0,
|
|
19443
19453
|
sm: 2,
|
|
19444
19454
|
lg: 1
|
|
19445
19455
|
},
|
|
@@ -19463,8 +19473,7 @@ const H8 = () => {
|
|
|
19463
19473
|
position: "relative",
|
|
19464
19474
|
minHeight: "calc(100vh - 110px)",
|
|
19465
19475
|
display: "flex",
|
|
19466
|
-
flexDirection: "column"
|
|
19467
|
-
backgroundColor: "yellow"
|
|
19476
|
+
flexDirection: "column"
|
|
19468
19477
|
},
|
|
19469
19478
|
children: [!d && /* @__PURE__ */ C(Sg, {
|
|
19470
19479
|
titleBottom: !0,
|
|
@@ -22194,52 +22203,56 @@ ny.propTypes = {
|
|
|
22194
22203
|
};
|
|
22195
22204
|
const yz = () => {
|
|
22196
22205
|
const e = _C(), t = Ti(), r = JC(), n = Tr(), {
|
|
22197
|
-
selectedIds: s
|
|
22198
|
-
|
|
22199
|
-
|
|
22206
|
+
selectedIds: s,
|
|
22207
|
+
data: a
|
|
22208
|
+
} = XC(), l = jt(), u = s.map((E) => a.find((h) => h.id === E)), [g, {
|
|
22209
|
+
isLoading: d
|
|
22200
22210
|
}] = ZC(n, {
|
|
22201
|
-
ids: s.length > 0 ? s : [
|
|
22211
|
+
ids: s.length > 0 ? s : [l == null ? void 0 : l.id],
|
|
22202
22212
|
data: {
|
|
22203
22213
|
readed: xn().format("YYYY-MM-DD HH:mm:ss")
|
|
22204
|
-
}
|
|
22214
|
+
},
|
|
22215
|
+
rows: u
|
|
22205
22216
|
}, {
|
|
22206
22217
|
onSuccess: () => {
|
|
22207
22218
|
e(), t("resources.notifications.messages.readed.done"), r(n);
|
|
22208
22219
|
},
|
|
22209
|
-
onError: () => t("
|
|
22210
|
-
onFailure: () => t("
|
|
22211
|
-
}),
|
|
22212
|
-
|
|
22213
|
-
}, [
|
|
22220
|
+
onError: () => t("ra.notification.readed_error", "warning"),
|
|
22221
|
+
onFailure: () => t("ra.notification.readed_error", "warning")
|
|
22222
|
+
}), p = xt(() => {
|
|
22223
|
+
g();
|
|
22224
|
+
}, [g]);
|
|
22214
22225
|
return /* @__PURE__ */ C($n, {
|
|
22215
|
-
label: "
|
|
22216
|
-
disabled:
|
|
22217
|
-
onClick:
|
|
22226
|
+
label: "ra.notification.mark_as_readed",
|
|
22227
|
+
disabled: d || (l == null ? void 0 : l.readed) !== null,
|
|
22228
|
+
onClick: p,
|
|
22218
22229
|
children: /* @__PURE__ */ C(YR, {})
|
|
22219
22230
|
});
|
|
22220
22231
|
}, vz = () => {
|
|
22221
22232
|
const e = _C(), t = Ti(), r = JC(), {
|
|
22222
|
-
selectedIds: n
|
|
22223
|
-
|
|
22224
|
-
|
|
22225
|
-
|
|
22226
|
-
|
|
22233
|
+
selectedIds: n,
|
|
22234
|
+
data: s
|
|
22235
|
+
} = XC(), a = jt(), l = Tr(), u = n.map((E) => s.find((h) => h.id === E)).concat([a]), [g, {
|
|
22236
|
+
isLoading: d
|
|
22237
|
+
}] = ZC(l, {
|
|
22238
|
+
ids: n.length > 0 ? n : [a == null ? void 0 : a.id],
|
|
22227
22239
|
data: {
|
|
22228
22240
|
readed: null
|
|
22229
|
-
}
|
|
22241
|
+
},
|
|
22242
|
+
rows: u
|
|
22230
22243
|
}, {
|
|
22231
22244
|
onSuccess: () => {
|
|
22232
22245
|
e(), t("resources.notifications.messages.unreaded.done"), r("notifications");
|
|
22233
22246
|
},
|
|
22234
22247
|
onFailure: () => t("resources.notifications.messages.unreaded.error", "warning")
|
|
22235
|
-
}),
|
|
22236
|
-
|
|
22237
|
-
}, [
|
|
22248
|
+
}), p = xt(() => {
|
|
22249
|
+
g();
|
|
22250
|
+
}, [g]);
|
|
22238
22251
|
return /* @__PURE__ */ C($n, {
|
|
22239
22252
|
color: "secondary",
|
|
22240
|
-
label: "
|
|
22241
|
-
disabled:
|
|
22242
|
-
onClick:
|
|
22253
|
+
label: "ra.notification.mark_as_unreaded",
|
|
22254
|
+
disabled: d || a && !(a != null && a.readed),
|
|
22255
|
+
onClick: p,
|
|
22243
22256
|
children: /* @__PURE__ */ C(GR, {})
|
|
22244
22257
|
});
|
|
22245
22258
|
}, bz = (e) => {
|
|
@@ -22254,7 +22267,7 @@ const yz = () => {
|
|
|
22254
22267
|
t != null && t.resource && (t != null && t.resource.startsWith("/") ? n(t == null ? void 0 : t.resource) : document.location.href = t == null ? void 0 : t.resource);
|
|
22255
22268
|
},
|
|
22256
22269
|
onFailure: () => {
|
|
22257
|
-
s("
|
|
22270
|
+
s("ra.notification.readed_error", "warning");
|
|
22258
22271
|
}
|
|
22259
22272
|
}), d = xt(() => g(), [g]);
|
|
22260
22273
|
return /* @__PURE__ */ oe("div", {
|
|
@@ -22289,7 +22302,7 @@ const yz = () => {
|
|
|
22289
22302
|
mt: 1
|
|
22290
22303
|
},
|
|
22291
22304
|
color: "textSecondary",
|
|
22292
|
-
children: a("
|
|
22305
|
+
children: a("ra.notification.readed", {
|
|
22293
22306
|
readed: u
|
|
22294
22307
|
})
|
|
22295
22308
|
})]
|
|
@@ -22313,9 +22326,11 @@ const yz = () => {
|
|
|
22313
22326
|
rowStyle: a,
|
|
22314
22327
|
children: [/* @__PURE__ */ C(bz, {
|
|
22315
22328
|
source: "notification",
|
|
22316
|
-
sortable: !1
|
|
22329
|
+
sortable: !1,
|
|
22330
|
+
label: "ra.notification"
|
|
22317
22331
|
}), /* @__PURE__ */ C(hd, {
|
|
22318
|
-
source: "created"
|
|
22332
|
+
source: "created",
|
|
22333
|
+
label: "ra.notification.created"
|
|
22319
22334
|
}), /* @__PURE__ */ oe(Yl, {
|
|
22320
22335
|
children: [/* @__PURE__ */ C(yz, {}), /* @__PURE__ */ C(vz, {})]
|
|
22321
22336
|
})]
|
|
@@ -26032,7 +26047,7 @@ Ay.defaultProps = {
|
|
|
26032
26047
|
defaultLocale: "en",
|
|
26033
26048
|
development: !1,
|
|
26034
26049
|
version: "0.0.0",
|
|
26035
|
-
notification: "
|
|
26050
|
+
notification: "entities/notification",
|
|
26036
26051
|
disableNotification: !1
|
|
26037
26052
|
};
|
|
26038
26053
|
Ay.propTypes = {
|