@applica-software-guru/react-admin 1.3.127 → 1.3.129
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/Layout/Error.d.ts.map +1 -1
- package/dist/components/ra-forms/LongForm/utils.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 +14 -3
- package/dist/react-admin.es.js.map +1 -1
- package/dist/react-admin.umd.js +6 -6
- package/dist/react-admin.umd.js.map +1 -1
- package/package.json +2 -2
- package/src/components/Layout/Error.tsx +9 -1
- package/src/components/ra-forms/LongForm/hooks.tsx +1 -1
- package/src/components/ra-forms/LongForm/utils.ts +3 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applica-software-guru/react-admin",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.129",
|
|
4
4
|
"private": false,
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@applica-software-guru/crud-client": "1.1.*",
|
|
75
|
-
"@applica-software-guru/iam-client": "1.
|
|
75
|
+
"@applica-software-guru/iam-client": "1.1.*",
|
|
76
76
|
"@testing-library/jest-dom": "^5.16.5",
|
|
77
77
|
"@testing-library/react": "^14.0.0",
|
|
78
78
|
"@types/node": "^18.7.6",
|
|
@@ -38,7 +38,15 @@ function Error(props: ErrorBoundaryProps) {
|
|
|
38
38
|
<Stack alignItems="center" px={2} py={{ xs: 4, sm: 8 }} spacing={2} textAlign="center">
|
|
39
39
|
{title && <Title title={title} />}
|
|
40
40
|
<img src={imgSrc} style={{ width: '100%', maxWidth: 450, marginTop: theme.spacing(4) }} />
|
|
41
|
-
<Typography
|
|
41
|
+
<Typography
|
|
42
|
+
variant="h2"
|
|
43
|
+
sx={{
|
|
44
|
+
whiteSpace: 'pre-wrap',
|
|
45
|
+
wordBreak: 'break-word'
|
|
46
|
+
}}
|
|
47
|
+
>
|
|
48
|
+
{translate(isProduction ? 'ra.page.error' : error.message, { _: error.message })}
|
|
49
|
+
</Typography>
|
|
42
50
|
{!isProduction && <Typography variant="caption">{translate('ra.message.error_more_info')}</Typography>}
|
|
43
51
|
{errorInfo && (
|
|
44
52
|
<Typography
|
|
@@ -6,7 +6,7 @@ import { useNavigate } from 'react-router';
|
|
|
6
6
|
|
|
7
7
|
function useIsActive(id: string): boolean {
|
|
8
8
|
const activeItem = useActiveItem();
|
|
9
|
-
return isChild(id, activeItem ?? '');
|
|
9
|
+
return id === activeItem || isChild(id, activeItem ?? '');
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
function useChildren(id?: string): Array<IItem> {
|
|
@@ -7,7 +7,9 @@ function getId(data: Optional<Pick<IItem, 'id' | 'label'>, 'id'>): string {
|
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
function isChild(parentId: string, childId: string): boolean {
|
|
10
|
-
|
|
10
|
+
const regExpString = `^${parentId}.`.replaceAll('.', '\\.'),
|
|
11
|
+
regExp = new RegExp(regExpString, 'g');
|
|
12
|
+
return childId.match(regExp) !== null;
|
|
11
13
|
}
|
|
12
14
|
|
|
13
15
|
function getItemsIds(items: Array<IItem>): Array<string> {
|