@deix/rossini-identity-management 3.2.0 → 4.0.0
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/lib/app/[locale]/groups/page.js +2 -2
- package/lib/app/[locale]/layout.d.ts +1 -1
- package/lib/app/[locale]/layout.d.ts.map +1 -1
- package/lib/app/[locale]/layout.js +2 -4
- package/lib/app/[locale]/users/page.d.ts +1 -2
- package/lib/app/[locale]/users/page.d.ts.map +1 -1
- package/lib/app/[locale]/users/page.js +2 -2
- package/lib/app/layout.d.ts +1 -1
- package/lib/app/layout.d.ts.map +1 -1
- package/lib/app/layout.js +2 -4
- package/lib/components/AddItemDialog.d.ts +1 -2
- package/lib/components/AddItemDialog.d.ts.map +1 -1
- package/lib/components/AddItemDialog.js +10 -16
- package/lib/components/DeleteConfirmationDialog.d.ts +1 -2
- package/lib/components/DeleteConfirmationDialog.d.ts.map +1 -1
- package/lib/components/DeleteConfirmationDialog.js +5 -11
- package/lib/components/SearchField.d.ts +1 -2
- package/lib/components/SearchField.d.ts.map +1 -1
- package/lib/components/SearchField.js +4 -6
- package/lib/components/groups/CreateGroupDialog.d.ts +1 -2
- package/lib/components/groups/CreateGroupDialog.d.ts.map +1 -1
- package/lib/components/groups/CreateGroupDialog.js +2 -5
- package/lib/components/groups/GroupDetails.d.ts +1 -2
- package/lib/components/groups/GroupDetails.d.ts.map +1 -1
- package/lib/components/groups/GroupDetails.js +2 -3
- package/lib/components/groups/GroupForm.d.ts +1 -2
- package/lib/components/groups/GroupForm.d.ts.map +1 -1
- package/lib/components/groups/GroupForm.js +8 -14
- package/lib/components/groups/GroupTabs.d.ts +1 -1
- package/lib/components/groups/GroupTabs.d.ts.map +1 -1
- package/lib/components/groups/GroupTabs.js +6 -14
- package/lib/components/groups/GroupUsers.d.ts +1 -2
- package/lib/components/groups/GroupUsers.d.ts.map +1 -1
- package/lib/components/groups/GroupUsers.js +17 -34
- package/lib/components/groups/Groups.d.ts +1 -2
- package/lib/components/groups/Groups.d.ts.map +1 -1
- package/lib/components/groups/Groups.js +19 -35
- package/lib/components/groups/GroupsTable.d.ts +1 -2
- package/lib/components/groups/GroupsTable.d.ts.map +1 -1
- package/lib/components/groups/GroupsTable.js +13 -25
- package/lib/components/users/CreateUserDialog.d.ts +1 -2
- package/lib/components/users/CreateUserDialog.d.ts.map +1 -1
- package/lib/components/users/CreateUserDialog.js +2 -5
- package/lib/components/users/UserCredentials.d.ts +1 -2
- package/lib/components/users/UserCredentials.d.ts.map +1 -1
- package/lib/components/users/UserCredentials.js +2 -3
- package/lib/components/users/UserDetails.d.ts +1 -2
- package/lib/components/users/UserDetails.d.ts.map +1 -1
- package/lib/components/users/UserDetails.js +2 -3
- package/lib/components/users/UserForm.d.ts +1 -2
- package/lib/components/users/UserForm.d.ts.map +1 -1
- package/lib/components/users/UserForm.js +10 -26
- package/lib/components/users/UserGroups.d.ts +1 -2
- package/lib/components/users/UserGroups.d.ts.map +1 -1
- package/lib/components/users/UserGroups.js +17 -32
- package/lib/components/users/Users.d.ts +1 -2
- package/lib/components/users/Users.d.ts.map +1 -1
- package/lib/components/users/Users.js +19 -35
- package/lib/components/users/UsersTable.d.ts +1 -2
- package/lib/components/users/UsersTable.d.ts.map +1 -1
- package/lib/components/users/UsersTable.js +15 -31
- package/lib/components/users/UsersTabs.d.ts +1 -1
- package/lib/components/users/UsersTabs.d.ts.map +1 -1
- package/lib/components/users/UsersTabs.js +6 -16
- package/lib/config/index.d.ts +1 -1
- package/lib/config/index.d.ts.map +1 -1
- package/lib/config/index.js +3 -2
- package/lib/proxy.d.ts +5 -0
- package/lib/proxy.d.ts.map +1 -0
- package/lib/{middleware.js → proxy.js} +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/utils/hooks/useAPIClient.d.ts +1 -1
- package/lib/utils/hooks/useAPIClient.d.ts.map +1 -1
- package/lib/utils/hooks/useAPIClient.js +4 -3
- package/package.json +16 -13
- package/lib/middleware.d.ts +0 -5
- package/lib/middleware.d.ts.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { useConfig } from '../../../config';
|
|
4
4
|
import Groups from '../../../components/groups/Groups';
|
|
5
5
|
const GroupsPage = () => {
|
|
6
6
|
const config = useConfig();
|
|
7
|
-
return
|
|
7
|
+
return _jsx(Groups, { apiUrl: config.generalProperties.apiURL });
|
|
8
8
|
};
|
|
9
9
|
export default GroupsPage;
|
|
@@ -6,5 +6,5 @@ import '@fontsource/raleway/600.css';
|
|
|
6
6
|
import '@fontsource/raleway/700.css';
|
|
7
7
|
export default function RootLayout({ children, }: {
|
|
8
8
|
children: React.ReactNode;
|
|
9
|
-
}):
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
//# sourceMappingURL=layout.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../src/app/[locale]/layout.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,6BAA6B,CAAC;AACrC,OAAO,6BAA6B,CAAC;AACrC,OAAO,6BAA6B,CAAC;AACrC,OAAO,6BAA6B,CAAC;AACrC,OAAO,6BAA6B,CAAC;AAIrC,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,
|
|
1
|
+
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../src/app/[locale]/layout.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,6BAA6B,CAAC;AACrC,OAAO,6BAA6B,CAAC;AACrC,OAAO,6BAA6B,CAAC;AACrC,OAAO,6BAA6B,CAAC;AACrC,OAAO,6BAA6B,CAAC;AAIrC,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,2CAiBA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { PageProvider } from '@deix/rossini-core';
|
|
4
4
|
import '@fontsource/raleway/300.css';
|
|
5
5
|
import '@fontsource/raleway/400.css';
|
|
@@ -18,7 +18,5 @@ export default function RootLayout({ children, }) {
|
|
|
18
18
|
},
|
|
19
19
|
},
|
|
20
20
|
});
|
|
21
|
-
return (
|
|
22
|
-
React.createElement(PageProvider, null, children),
|
|
23
|
-
React.createElement(ReactQueryDevtools, { initialIsOpen: false, buttonPosition: 'bottom-right' })));
|
|
21
|
+
return (_jsxs(QueryClientProvider, { client: queryClient, children: [_jsx(PageProvider, { children: children }), _jsx(ReactQueryDevtools, { initialIsOpen: false, buttonPosition: 'bottom-right' })] }));
|
|
24
22
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../src/app/[locale]/users/page.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../src/app/[locale]/users/page.tsx"],"names":[],"mappings":"AAMA,QAAA,MAAM,SAAS,+CAGd,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { useConfig } from '../../../config';
|
|
4
4
|
import Users from '../../../components/users/Users';
|
|
5
5
|
const UsersPage = () => {
|
|
6
6
|
const config = useConfig();
|
|
7
|
-
return
|
|
7
|
+
return _jsx(Users, { apiUrl: config.generalProperties.apiURL, editUsername: true });
|
|
8
8
|
};
|
|
9
9
|
export default UsersPage;
|
package/lib/app/layout.d.ts
CHANGED
package/lib/app/layout.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../src/app/layout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,6BAA6B,CAAC;AACrC,OAAO,6BAA6B,CAAC;AACrC,OAAO,6BAA6B,CAAC;AACrC,OAAO,6BAA6B,CAAC;AACrC,OAAO,6BAA6B,CAAC;AAGrC,eAAO,MAAM,QAAQ;;CAEpB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,
|
|
1
|
+
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../src/app/layout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,6BAA6B,CAAC;AACrC,OAAO,6BAA6B,CAAC;AACrC,OAAO,6BAA6B,CAAC;AACrC,OAAO,6BAA6B,CAAC;AACrC,OAAO,6BAA6B,CAAC;AAGrC,eAAO,MAAM,QAAQ;;CAEpB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,2CAeA"}
|
package/lib/app/layout.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import '@fontsource/raleway/300.css';
|
|
3
3
|
import '@fontsource/raleway/400.css';
|
|
4
4
|
import '@fontsource/raleway/500.css';
|
|
@@ -14,7 +14,5 @@ export default function RootLayout({ children, }) {
|
|
|
14
14
|
LOGOUT_URL: process.env.LOGOUT_URL || '',
|
|
15
15
|
ACCOUNT_SETTINGS_URL: process.env.ACCOUNT_SETTINGS_URL || '',
|
|
16
16
|
};
|
|
17
|
-
return (
|
|
18
|
-
React.createElement("body", null,
|
|
19
|
-
React.createElement(ConfigProvider, { publicRuntimeEnv: publicRuntimeEnv }, children))));
|
|
17
|
+
return (_jsx("html", { lang: 'en', children: _jsx("body", { children: _jsx(ConfigProvider, { publicRuntimeEnv: publicRuntimeEnv, children: children }) }) }));
|
|
20
18
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { StringTranslation } from '@deix/rossini-core';
|
|
3
2
|
interface Option {
|
|
4
3
|
value: string;
|
|
@@ -11,6 +10,6 @@ interface AddItemDialogProps {
|
|
|
11
10
|
onClose: () => void;
|
|
12
11
|
onConfirm: (value: Option | null) => void;
|
|
13
12
|
}
|
|
14
|
-
declare const AddItemDialog: ({ title, options, open, onClose, onConfirm, }: AddItemDialogProps) =>
|
|
13
|
+
declare const AddItemDialog: ({ title, options, open, onClose, onConfirm, }: AddItemDialogProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
14
|
export default AddItemDialog;
|
|
16
15
|
//# sourceMappingURL=AddItemDialog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddItemDialog.d.ts","sourceRoot":"","sources":["../../src/components/AddItemDialog.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AddItemDialog.d.ts","sourceRoot":"","sources":["../../src/components/AddItemDialog.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,iBAAiB,EAAa,MAAM,oBAAoB,CAAC;AAkBlE,UAAU,MAAM;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,UAAU,kBAAkB;IAC1B,KAAK,EAAE,iBAAiB,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;CAC3C;AAED,QAAA,MAAM,aAAa,GAAI,+CAMpB,kBAAkB,4CAkDpB,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Autocomplete, Button, Dialog, DialogActions, DialogContent, DialogTitle, TextField, } from '@mui/material';
|
|
3
3
|
import { useLocale } from '@deix/rossini-core';
|
|
4
4
|
import { useEffect, useState } from 'react';
|
|
@@ -25,21 +25,15 @@ const AddItemDialog = ({ title, options, open, onClose, onConfirm, }) => {
|
|
|
25
25
|
setValue(null);
|
|
26
26
|
}
|
|
27
27
|
}, [open]);
|
|
28
|
-
return (
|
|
29
|
-
React.createElement(DialogTitle, null, title[locale]),
|
|
30
|
-
React.createElement(DialogContent, null,
|
|
31
|
-
React.createElement(Autocomplete
|
|
32
|
-
// multiple
|
|
33
|
-
, {
|
|
28
|
+
return (_jsxs(Dialog, { open: open, fullWidth: true, maxWidth: 'sm', onClose: onClose, children: [_jsx(DialogTitle, { children: title[locale] }), _jsx(DialogContent, { children: _jsx(Autocomplete
|
|
34
29
|
// multiple
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
} }, translations.ok[locale]))));
|
|
30
|
+
, {
|
|
31
|
+
// multiple
|
|
32
|
+
options: options ?? [], getOptionLabel: (option) => option.label, getOptionKey: (option) => option.value, isOptionEqualToValue: (option, value) => option.value === value.value, renderInput: (params) => (_jsx(TextField, { ...params, label: translations.search[locale], placeholder: '' })), onChange: (event, newValue) => {
|
|
33
|
+
setValue(newValue);
|
|
34
|
+
}, value: value }) }), _jsxs(DialogActions, { children: [_jsx(Button, { size: 'small', variant: 'outlined', onClick: onClose, children: translations.cancel[locale] }), _jsx(Button, { variant: 'contained', onClick: () => {
|
|
35
|
+
onConfirm(value);
|
|
36
|
+
onClose();
|
|
37
|
+
}, children: translations.ok[locale] })] })] }));
|
|
44
38
|
};
|
|
45
39
|
export default AddItemDialog;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
export interface DeleteConfirmationDialogProps {
|
|
3
2
|
open: boolean;
|
|
4
3
|
onClose: () => void;
|
|
5
4
|
onConfirm: () => void;
|
|
6
5
|
}
|
|
7
|
-
declare const DeleteConfirmationDialog: ({ open, onClose, onConfirm, }: DeleteConfirmationDialogProps) =>
|
|
6
|
+
declare const DeleteConfirmationDialog: ({ open, onClose, onConfirm, }: DeleteConfirmationDialogProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
7
|
export default DeleteConfirmationDialog;
|
|
9
8
|
//# sourceMappingURL=DeleteConfirmationDialog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeleteConfirmationDialog.d.ts","sourceRoot":"","sources":["../../src/components/DeleteConfirmationDialog.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DeleteConfirmationDialog.d.ts","sourceRoot":"","sources":["../../src/components/DeleteConfirmationDialog.tsx"],"names":[],"mappings":"AA8BA,MAAM,WAAW,6BAA6B;IAC5C,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,QAAA,MAAM,wBAAwB,GAAI,+BAI/B,6BAA6B,4CA2B/B,CAAC;AAEF,eAAe,wBAAwB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Button, Dialog, DialogActions, DialogContent, DialogTitle, Typography, } from '@mui/material';
|
|
3
3
|
import { useLocale } from '@deix/rossini-core';
|
|
4
4
|
const translations = {
|
|
@@ -21,15 +21,9 @@ const translations = {
|
|
|
21
21
|
};
|
|
22
22
|
const DeleteConfirmationDialog = ({ open, onClose, onConfirm, }) => {
|
|
23
23
|
const locale = useLocale();
|
|
24
|
-
return (
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
React.createElement(DialogActions, null,
|
|
29
|
-
React.createElement(Button, { size: 'small', variant: 'outlined', onClick: onClose }, translations.no[locale]),
|
|
30
|
-
React.createElement(Button, { size: 'small', variant: 'contained', onClick: () => {
|
|
31
|
-
onConfirm();
|
|
32
|
-
onClose();
|
|
33
|
-
} }, translations.yes[locale]))));
|
|
24
|
+
return (_jsxs(Dialog, { open: open, fullWidth: true, maxWidth: 'sm', onClose: onClose, children: [_jsx(DialogTitle, { children: translations.title[locale] }), _jsx(DialogContent, { children: _jsx(Typography, { variant: 'caption', children: translations.message[locale] }) }), _jsxs(DialogActions, { children: [_jsx(Button, { size: 'small', variant: 'outlined', onClick: onClose, children: translations.no[locale] }), _jsx(Button, { size: 'small', variant: 'contained', onClick: () => {
|
|
25
|
+
onConfirm();
|
|
26
|
+
onClose();
|
|
27
|
+
}, children: translations.yes[locale] })] })] }));
|
|
34
28
|
};
|
|
35
29
|
export default DeleteConfirmationDialog;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { TextFieldProps as MuiTextFieldProps } from '@mui/material';
|
|
3
2
|
type SearchFieldProps = MuiTextFieldProps & {
|
|
4
3
|
onSearch: (val: string) => void;
|
|
5
4
|
};
|
|
6
|
-
declare const SearchField: ({ placeholder, onSearch, ...props }: SearchFieldProps) =>
|
|
5
|
+
declare const SearchField: ({ placeholder, onSearch, ...props }: SearchFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
6
|
export default SearchField;
|
|
8
7
|
//# sourceMappingURL=SearchField.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchField.d.ts","sourceRoot":"","sources":["../../src/components/SearchField.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SearchField.d.ts","sourceRoot":"","sources":["../../src/components/SearchField.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,cAAc,IAAI,iBAAiB,EAEpC,MAAM,eAAe,CAAC;AAIvB,KAAK,gBAAgB,GAAG,iBAAiB,GAAG;IAC1C,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CACjC,CAAC;AAEF,QAAA,MAAM,WAAW,GAAI,qCAIlB,gBAAgB,4CAwBlB,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import SearchIcon from '@mui/icons-material/Search';
|
|
3
3
|
import { IconButton, TextField, } from '@mui/material';
|
|
4
4
|
import { useState } from 'react';
|
|
5
5
|
const SearchField = ({ placeholder = 'Search...', onSearch, ...props }) => {
|
|
6
6
|
const [value, setValue] = useState('');
|
|
7
|
-
return (
|
|
8
|
-
React.createElement(TextField, { size: 'small', placeholder: placeholder, value: value, onChange: (evt) => {
|
|
7
|
+
return (_jsx(_Fragment, { children: _jsx(TextField, { size: 'small', placeholder: placeholder, value: value, onChange: (evt) => {
|
|
9
8
|
setValue(evt.target.value);
|
|
10
9
|
onSearch(evt.target.value);
|
|
11
10
|
}, ...props, InputProps: {
|
|
12
|
-
endAdornment: (
|
|
13
|
-
|
|
14
|
-
} })));
|
|
11
|
+
endAdornment: (_jsx(IconButton, { size: 'small', onClick: () => onSearch(value), children: _jsx(SearchIcon, {}) })),
|
|
12
|
+
} }) }));
|
|
15
13
|
};
|
|
16
14
|
export default SearchField;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { Group } from '../../types/groups';
|
|
3
2
|
export interface CreateGroupDialogProps {
|
|
4
3
|
open: boolean;
|
|
5
4
|
onClose: () => void;
|
|
6
5
|
onGroupCreate?: (newGroup: Group) => void;
|
|
7
6
|
}
|
|
8
|
-
declare const CreateGroupDialog: ({ open, onClose, onGroupCreate, }: CreateGroupDialogProps) =>
|
|
7
|
+
declare const CreateGroupDialog: ({ open, onClose, onGroupCreate, }: CreateGroupDialogProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
export default CreateGroupDialog;
|
|
10
9
|
//# sourceMappingURL=CreateGroupDialog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreateGroupDialog.d.ts","sourceRoot":"","sources":["../../../src/components/groups/CreateGroupDialog.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CreateGroupDialog.d.ts","sourceRoot":"","sources":["../../../src/components/groups/CreateGroupDialog.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAK3C,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,aAAa,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,KAAK,IAAI,CAAC;CAC3C;AAED,QAAA,MAAM,iBAAiB,GAAI,mCAIxB,sBAAsB,4CAuBxB,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useLocale } from '@deix/rossini-core';
|
|
3
3
|
import { Dialog, DialogContent, DialogTitle } from '@mui/material';
|
|
4
4
|
import { useQueryClient } from '@tanstack/react-query';
|
|
@@ -18,9 +18,6 @@ const CreateGroupDialog = ({ open, onClose, onGroupCreate, }) => {
|
|
|
18
18
|
}
|
|
19
19
|
onClose();
|
|
20
20
|
};
|
|
21
|
-
return (
|
|
22
|
-
React.createElement(DialogTitle, null, groupsTranslations.create[locale]),
|
|
23
|
-
React.createElement(DialogContent, null,
|
|
24
|
-
React.createElement(GroupForm, { mode: 'create', onSave: handleSave, onCancel: onClose }))));
|
|
21
|
+
return (_jsxs(Dialog, { open: open, fullWidth: true, maxWidth: 'sm', onClose: onClose, children: [_jsx(DialogTitle, { children: groupsTranslations.create[locale] }), _jsx(DialogContent, { children: _jsx(GroupForm, { mode: 'create', onSave: handleSave, onCancel: onClose }) })] }));
|
|
25
22
|
};
|
|
26
23
|
export default CreateGroupDialog;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { Group } from '../../types/groups';
|
|
3
2
|
export interface GroupDetailsProps {
|
|
4
3
|
group: Group;
|
|
5
4
|
onGroupUpdate?: (newGroup: Group, oldGroup: Group) => void;
|
|
6
5
|
editName?: boolean;
|
|
7
6
|
}
|
|
8
|
-
declare const GroupDetails: ({ group, onGroupUpdate, editName, }: GroupDetailsProps) =>
|
|
7
|
+
declare const GroupDetails: ({ group, onGroupUpdate, editName, }: GroupDetailsProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
export default GroupDetails;
|
|
10
9
|
//# sourceMappingURL=GroupDetails.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GroupDetails.d.ts","sourceRoot":"","sources":["../../../src/components/groups/GroupDetails.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GroupDetails.d.ts","sourceRoot":"","sources":["../../../src/components/groups/GroupDetails.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAK3C,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,KAAK,CAAC;IACb,aAAa,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,KAAK,IAAI,CAAC;IAC3D,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,QAAA,MAAM,YAAY,GAAI,qCAInB,iBAAiB,4CAuBnB,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useQueryClient } from '@tanstack/react-query';
|
|
3
3
|
import { useUpdateGroup } from '../../utils/hooks/groups';
|
|
4
4
|
import GroupForm from './GroupForm';
|
|
@@ -13,7 +13,6 @@ const GroupDetails = ({ group, onGroupUpdate, editName, }) => {
|
|
|
13
13
|
onGroupUpdate(updatedGroup, group);
|
|
14
14
|
}
|
|
15
15
|
};
|
|
16
|
-
return (
|
|
17
|
-
React.createElement(GroupForm, { mode: 'modify', group: group, onSave: handleUpdate, onCancel: () => { }, editName: editName })));
|
|
16
|
+
return (_jsx(_Fragment, { children: _jsx(GroupForm, { mode: 'modify', group: group, onSave: handleUpdate, onCancel: () => { }, editName: editName }) }));
|
|
18
17
|
};
|
|
19
18
|
export default GroupDetails;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { Group } from '../../types/groups';
|
|
3
2
|
export interface GroupFormProps {
|
|
4
3
|
onCancel?: () => void;
|
|
@@ -7,6 +6,6 @@ export interface GroupFormProps {
|
|
|
7
6
|
mode: 'create' | 'modify';
|
|
8
7
|
editName?: boolean;
|
|
9
8
|
}
|
|
10
|
-
declare const GroupForm: ({ group, onCancel, onSave, mode, editName, }: GroupFormProps) =>
|
|
9
|
+
declare const GroupForm: ({ group, onCancel, onSave, mode, editName, }: GroupFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
10
|
export default GroupForm;
|
|
12
11
|
//# sourceMappingURL=GroupForm.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GroupForm.d.ts","sourceRoot":"","sources":["../../../src/components/groups/GroupForm.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GroupForm.d.ts","sourceRoot":"","sources":["../../../src/components/groups/GroupForm.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,MAAM,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAC/B,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,IAAI,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,QAAA,MAAM,SAAS,GAAI,8CAMhB,cAAc,4CAkEhB,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useLocale } from '@deix/rossini-core';
|
|
3
3
|
import { Button, Grid, TextField } from '@mui/material';
|
|
4
4
|
import { Controller, useForm } from 'react-hook-form';
|
|
@@ -21,18 +21,12 @@ const GroupForm = ({ group, onCancel, onSave, mode, editName, }) => {
|
|
|
21
21
|
const onSubmit = (data) => {
|
|
22
22
|
onSave(data);
|
|
23
23
|
};
|
|
24
|
-
return (
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
justifyContent: 'flex-end',
|
|
32
|
-
gap: 2,
|
|
33
|
-
width: '100%',
|
|
34
|
-
} },
|
|
35
|
-
mode === 'create' && (React.createElement(Button, { variant: 'outlined', onClick: onCancel }, groupsTranslations.cancel[locale])),
|
|
36
|
-
React.createElement(Button, { variant: 'contained', type: 'submit' }, groupsTranslations.save[locale])))));
|
|
24
|
+
return (_jsx("form", { onSubmit: (event) => void handleSubmit(onSubmit)(event), children: _jsxs(Grid, { container: true, spacing: 2, sx: { mt: 2, maxWidth: 'sm' }, justifyContent: 'stretch', children: [_jsx(Grid, { size: { xs: 12 }, children: _jsx(Controller, { name: 'name', control: control, render: ({ field }) => (_jsx(TextField, { size: 'small', fullWidth: true, label: groupsTranslations.name[locale], disabled: mode === 'modify' && !editName, sx: { flexShrink: 0 }, ...field })) }) }), _jsxs(Grid, { sx: {
|
|
25
|
+
mt: 2,
|
|
26
|
+
display: 'flex',
|
|
27
|
+
justifyContent: 'flex-end',
|
|
28
|
+
gap: 2,
|
|
29
|
+
width: '100%',
|
|
30
|
+
}, children: [mode === 'create' && (_jsx(Button, { variant: 'outlined', onClick: onCancel, children: groupsTranslations.cancel[locale] })), _jsx(Button, { variant: 'contained', type: 'submit', children: groupsTranslations.save[locale] })] })] }) }));
|
|
37
31
|
};
|
|
38
32
|
export default GroupForm;
|
|
@@ -13,6 +13,6 @@ export interface GroupTabsProps {
|
|
|
13
13
|
onGroupUpdate?: (newGroup: Group, oldGroup: Group) => void;
|
|
14
14
|
editName?: boolean;
|
|
15
15
|
}
|
|
16
|
-
declare const GroupTabs: ({ group, additionalTabs, onGroupUpdate, editName, }: GroupTabsProps) =>
|
|
16
|
+
declare const GroupTabs: ({ group, additionalTabs, onGroupUpdate, editName, }: GroupTabsProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
17
|
export default GroupTabs;
|
|
18
18
|
//# sourceMappingURL=GroupTabs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GroupTabs.d.ts","sourceRoot":"","sources":["../../../src/components/groups/GroupTabs.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,OAAO,EAAE,iBAAiB,EAAa,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAK3C,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,iBAAiB,CAAC;IACzB,SAAS,EAAE,KAAK,CAAC,iBAAiB,CAAC;QAAE,KAAK,EAAE,KAAK,CAAA;KAAE,CAAC,CAAC;CACtD;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,KAAK,CAAC;IACb,cAAc,CAAC,EAAE,QAAQ,EAAE,CAAC;IAC5B,aAAa,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,KAAK,IAAI,CAAC;IAC3D,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,QAAA,MAAM,SAAS,GAAI,qDAKhB,cAAc,
|
|
1
|
+
{"version":3,"file":"GroupTabs.d.ts","sourceRoot":"","sources":["../../../src/components/groups/GroupTabs.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,OAAO,EAAE,iBAAiB,EAAa,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAK3C,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,iBAAiB,CAAC;IACzB,SAAS,EAAE,KAAK,CAAC,iBAAiB,CAAC;QAAE,KAAK,EAAE,KAAK,CAAA;KAAE,CAAC,CAAC;CACtD;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,KAAK,CAAC;IACb,cAAc,CAAC,EAAE,QAAQ,EAAE,CAAC;IAC5B,aAAa,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,KAAK,IAAI,CAAC;IAC3D,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,QAAA,MAAM,SAAS,GAAI,qDAKhB,cAAc,4CAkDhB,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useState } from 'react';
|
|
3
4
|
import { Box, Tab, Tabs } from '@mui/material';
|
|
4
5
|
import { useLocale } from '@deix/rossini-core';
|
|
5
6
|
import GroupDetails from './GroupDetails';
|
|
@@ -8,22 +9,13 @@ import GroupUsers from './GroupUsers';
|
|
|
8
9
|
const GroupTabs = ({ group, additionalTabs = [], onGroupUpdate, editName, }) => {
|
|
9
10
|
const locale = useLocale();
|
|
10
11
|
const [selectedTab, setSelectedTab] = useState('DETAILS');
|
|
11
|
-
return (
|
|
12
|
+
return (_jsxs(Box, { sx: {
|
|
12
13
|
flexGrow: 1,
|
|
13
14
|
maxWidth: '100%',
|
|
14
15
|
overflowX: 'hidden',
|
|
15
16
|
alignSelf: 'stretch',
|
|
16
|
-
} },
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
setSelectedTab(newValue);
|
|
20
|
-
}, "aria-label": 'basic tabs example' },
|
|
21
|
-
React.createElement(Tab, { label: groupsTranslations.details[locale], value: 'DETAILS' }),
|
|
22
|
-
React.createElement(Tab, { label: groupsTranslations.users[locale], value: 'USERS' }),
|
|
23
|
-
additionalTabs.map((tab, index) => (React.createElement(Tab, { key: `tab${index}`, label: tab.title[locale], value: `ADDITIONAL_TAB_${index}` }))))),
|
|
24
|
-
React.createElement(Box, { sx: { p: 1 } },
|
|
25
|
-
selectedTab === 'DETAILS' && (React.createElement(GroupDetails, { group: group, onGroupUpdate: onGroupUpdate, editName: editName })),
|
|
26
|
-
selectedTab === 'USERS' && React.createElement(GroupUsers, { group: group }),
|
|
27
|
-
additionalTabs.map((tab, index) => selectedTab === `ADDITIONAL_TAB_${index}` && (React.createElement(tab.component, { key: `tab${index}`, group: group }))))));
|
|
17
|
+
}, children: [_jsx(Box, { sx: { borderBottom: 1, borderColor: 'divider' }, children: _jsxs(Tabs, { value: selectedTab, onChange: (_evt, newValue) => {
|
|
18
|
+
setSelectedTab(newValue);
|
|
19
|
+
}, "aria-label": 'basic tabs example', children: [_jsx(Tab, { label: groupsTranslations.details[locale], value: 'DETAILS' }), _jsx(Tab, { label: groupsTranslations.users[locale], value: 'USERS' }), additionalTabs.map((tab, index) => (_jsx(Tab, { label: tab.title[locale], value: `ADDITIONAL_TAB_${index}` }, `tab${index}`)))] }) }), _jsxs(Box, { sx: { p: 1 }, children: [selectedTab === 'DETAILS' && (_jsx(GroupDetails, { group: group, onGroupUpdate: onGroupUpdate, editName: editName })), selectedTab === 'USERS' && _jsx(GroupUsers, { group: group }), additionalTabs.map((tab, index) => selectedTab === `ADDITIONAL_TAB_${index}` && (_jsx(tab.component, { group: group }, `tab${index}`)))] })] }));
|
|
28
20
|
};
|
|
29
21
|
export default GroupTabs;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { Group } from '../../types/groups';
|
|
3
2
|
interface GroupUsersProps {
|
|
4
3
|
group: Group;
|
|
5
4
|
}
|
|
6
|
-
declare const GroupUsers: ({ group }: GroupUsersProps) =>
|
|
5
|
+
declare const GroupUsers: ({ group }: GroupUsersProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
6
|
export default GroupUsers;
|
|
8
7
|
//# sourceMappingURL=GroupUsers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GroupUsers.d.ts","sourceRoot":"","sources":["../../../src/components/groups/GroupUsers.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GroupUsers.d.ts","sourceRoot":"","sources":["../../../src/components/groups/GroupUsers.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AA8B3C,UAAU,eAAe;IACvB,KAAK,EAAE,KAAK,CAAC;CACd;AAED,QAAA,MAAM,UAAU,GAAI,WAAW,eAAe,4CA8F7C,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { Box, Button, IconButton, Table, TableBody, TableCell, TableContainer, TableHead, TableRow, } from '@mui/material';
|
|
3
3
|
import AddIcon from '@mui/icons-material/Add';
|
|
4
4
|
import DeleteIcon from '@mui/icons-material/Delete';
|
|
@@ -36,38 +36,21 @@ const GroupUsers = ({ group }) => {
|
|
|
36
36
|
const [openAddUserDialog, setOpenAddUserDialog] = useState(false);
|
|
37
37
|
const [openConfirmationDialog, setOpenConfirmationDialog] = useState(false);
|
|
38
38
|
const [deleteId, setDeleteId] = useState();
|
|
39
|
-
return (
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
evt.stopPropagation();
|
|
56
|
-
setOpenConfirmationDialog(true);
|
|
57
|
-
setDeleteId(user.id);
|
|
58
|
-
} },
|
|
59
|
-
React.createElement(DeleteIcon, null))))))))))),
|
|
60
|
-
React.createElement(Button, { variant: 'outlined', startIcon: React.createElement(AddIcon, null), onClick: () => setOpenAddUserDialog(true), sx: { marginTop: 2 } }, groupsTranslations.addUser[locale]),
|
|
61
|
-
React.createElement(AddItemDialog, { open: openAddUserDialog, onClose: () => setOpenAddUserDialog(false), onConfirm: (value) => {
|
|
62
|
-
if (value) {
|
|
63
|
-
addUserToGroup({ userId: value?.value, groupId: group.id });
|
|
64
|
-
}
|
|
65
|
-
}, title: groupsTranslations.addUser, options: users?.map((user) => ({
|
|
66
|
-
value: user.id,
|
|
67
|
-
label: user.username || '',
|
|
68
|
-
})) }),
|
|
69
|
-
React.createElement(DeleteConfirmationDialog, { open: openConfirmationDialog, onClose: () => setOpenConfirmationDialog(false), onConfirm: () => deleteId
|
|
70
|
-
? removeUserFromGroup({ userId: deleteId, groupId: group.id })
|
|
71
|
-
: {} })));
|
|
39
|
+
return (_jsxs(_Fragment, { children: [groupUsers && groupUsers.length > 0 && (_jsx(Box, { maxWidth: 'md', children: _jsx(TableContainer, { children: _jsxs(Table, { size: 'small', children: [_jsx(TableHead, { children: _jsxs(TableRow, { children: [groupUsersTableColumns.map((col) => (_jsx(TableCell, { align: col.align || 'inherit', children: isStringTranslation(col.label)
|
|
40
|
+
? col.label[locale]
|
|
41
|
+
: col.label }, col.id))), _jsx(TableCell, { padding: 'none', children: '' })] }) }), _jsx(TableBody, { children: groupUsers?.map((user, rowIdx) => (_jsxs(TableRow, { children: [_jsx(TableCell, { children: user.username }), _jsx(TableCell, { children: user.firstName }), _jsx(TableCell, { children: user.lastName }), _jsx(TableCell, { padding: 'none', align: 'right', children: _jsx(IconButton, { size: 'small', onClick: (evt) => {
|
|
42
|
+
evt.stopPropagation();
|
|
43
|
+
setOpenConfirmationDialog(true);
|
|
44
|
+
setDeleteId(user.id);
|
|
45
|
+
}, children: _jsx(DeleteIcon, {}) }) })] }, rowIdx))) })] }) }) })), _jsx(Button, { variant: 'outlined', startIcon: _jsx(AddIcon, {}), onClick: () => setOpenAddUserDialog(true), sx: { marginTop: 2 }, children: groupsTranslations.addUser[locale] }), _jsx(AddItemDialog, { open: openAddUserDialog, onClose: () => setOpenAddUserDialog(false), onConfirm: (value) => {
|
|
46
|
+
if (value) {
|
|
47
|
+
addUserToGroup({ userId: value?.value, groupId: group.id });
|
|
48
|
+
}
|
|
49
|
+
}, title: groupsTranslations.addUser, options: users?.map((user) => ({
|
|
50
|
+
value: user.id,
|
|
51
|
+
label: user.username || '',
|
|
52
|
+
})) }), _jsx(DeleteConfirmationDialog, { open: openConfirmationDialog, onClose: () => setOpenConfirmationDialog(false), onConfirm: () => deleteId
|
|
53
|
+
? removeUserFromGroup({ userId: deleteId, groupId: group.id })
|
|
54
|
+
: {} })] }));
|
|
72
55
|
};
|
|
73
56
|
export default GroupUsers;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { Group } from '../../types/groups';
|
|
3
2
|
import { GroupTab } from './GroupTabs';
|
|
4
3
|
interface GroupsProps {
|
|
@@ -9,6 +8,6 @@ interface GroupsProps {
|
|
|
9
8
|
onGroupDelete?: (group: Group) => void;
|
|
10
9
|
editName?: boolean;
|
|
11
10
|
}
|
|
12
|
-
declare const Groups: ({ apiUrl, additionalTabs, onGroupUpdate, onGroupCreate, onGroupDelete, editName, }: GroupsProps) =>
|
|
11
|
+
declare const Groups: ({ apiUrl, additionalTabs, onGroupUpdate, onGroupCreate, onGroupDelete, editName, }: GroupsProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
12
|
export default Groups;
|
|
14
13
|
//# sourceMappingURL=Groups.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Groups.d.ts","sourceRoot":"","sources":["../../../src/components/groups/Groups.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Groups.d.ts","sourceRoot":"","sources":["../../../src/components/groups/Groups.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,OAAkB,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAIlD,UAAU,WAAW;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,QAAQ,EAAE,CAAC;IAE5B,aAAa,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,KAAK,IAAI,CAAC;IAE3D,aAAa,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,KAAK,IAAI,CAAC;IAE1C,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAEvC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,QAAA,MAAM,MAAM,GAAI,oFAOb,WAAW,4CAgJb,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { useEffect, useState } from 'react';
|
|
3
4
|
import GroupAddIcon from '@mui/icons-material/GroupAdd';
|
|
4
5
|
import { Box, Button, Grid, IconButton, Link } from '@mui/material';
|
|
5
6
|
import ArrowBackIcon from '@mui/icons-material/ArrowBack';
|
|
@@ -52,46 +53,29 @@ const Groups = ({ apiUrl, additionalTabs = [], onGroupUpdate, onGroupCreate, onG
|
|
|
52
53
|
}
|
|
53
54
|
setSelectedGroup(undefined);
|
|
54
55
|
};
|
|
55
|
-
return (
|
|
56
|
-
React.createElement(Box, { sx: {
|
|
56
|
+
return (_jsx(APIClientProvider, { baseURL: apiUrl, children: _jsxs(Box, { sx: {
|
|
57
57
|
flexGrow: 1,
|
|
58
58
|
maxWidth: '100%',
|
|
59
59
|
overflowX: 'hidden',
|
|
60
60
|
paddingTop: 3,
|
|
61
61
|
paddingLeft: 3,
|
|
62
62
|
paddingRight: 3,
|
|
63
|
-
} },
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
React.createElement(Button, { variant: 'contained', startIcon: React.createElement(GroupAddIcon, null), onClick: () => {
|
|
70
|
-
setOpenGroupDialog(true);
|
|
71
|
-
setSelectedGroup(undefined);
|
|
72
|
-
} }, groupsTranslations.new[locale]))),
|
|
73
|
-
React.createElement(GroupsTable, { groups: filteredGroups, selectedGroup: selectedGroup, setSelectedGroup: (group) => {
|
|
74
|
-
setSelectedGroup(group);
|
|
75
|
-
}, onDelete: handleDelete }))),
|
|
76
|
-
selectedGroup && (React.createElement(Box, { sx: {
|
|
77
|
-
display: 'flex',
|
|
78
|
-
flexDirection: 'column',
|
|
79
|
-
alignItems: 'flex-start',
|
|
80
|
-
width: '100%',
|
|
81
|
-
} },
|
|
82
|
-
React.createElement(Box, { sx: {
|
|
63
|
+
}, children: [!selectedGroup && (_jsxs(_Fragment, { children: [_jsxs(Grid, { container: true, spacing: 2, sx: { marginBottom: 2 }, children: [_jsx(Grid, { children: _jsx(SearchField, { placeholder: groupsTranslations.search[locale], onSearch: (value) => setSearchString(value) }) }), _jsx(Grid, { children: _jsx(Button, { variant: 'contained', startIcon: _jsx(GroupAddIcon, {}), onClick: () => {
|
|
64
|
+
setOpenGroupDialog(true);
|
|
65
|
+
setSelectedGroup(undefined);
|
|
66
|
+
}, children: groupsTranslations.new[locale] }) })] }), _jsx(GroupsTable, { groups: filteredGroups, selectedGroup: selectedGroup, setSelectedGroup: (group) => {
|
|
67
|
+
setSelectedGroup(group);
|
|
68
|
+
}, onDelete: handleDelete })] })), selectedGroup && (_jsxs(Box, { sx: {
|
|
83
69
|
display: 'flex',
|
|
84
|
-
flexDirection: '
|
|
85
|
-
alignItems: '
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
setOpenGroupDialog(false);
|
|
95
|
-
}, onGroupCreate: onGroupCreate }))));
|
|
70
|
+
flexDirection: 'column',
|
|
71
|
+
alignItems: 'flex-start',
|
|
72
|
+
width: '100%',
|
|
73
|
+
}, children: [_jsxs(Box, { sx: {
|
|
74
|
+
display: 'flex',
|
|
75
|
+
flexDirection: 'row',
|
|
76
|
+
alignItems: 'center',
|
|
77
|
+
}, children: [_jsx(IconButton, { "aria-label": 'delete', color: 'primary', onClick: () => setSelectedGroup(undefined), sx: { mr: 2 }, children: _jsx(ArrowBackIcon, {}) }), _jsx(Link, { underline: 'none', href: '#', onClick: () => setSelectedGroup(undefined), children: groupsTranslations.title[locale] }), _jsx(KeyboardArrowRightIcon, {}), selectedGroup.name] }), _jsx(GroupTabs, { group: selectedGroup, additionalTabs: additionalTabs, onGroupUpdate: onGroupUpdate, editName: editName })] })), _jsx(CreateGroupDialog, { open: openGroupDialog, onClose: () => {
|
|
78
|
+
setOpenGroupDialog(false);
|
|
79
|
+
}, onGroupCreate: onGroupCreate })] }) }));
|
|
96
80
|
};
|
|
97
81
|
export default Groups;
|