@deix/rossini-identity-management 3.1.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.
Files changed (77) hide show
  1. package/lib/app/[locale]/groups/page.js +2 -2
  2. package/lib/app/[locale]/layout.d.ts +1 -1
  3. package/lib/app/[locale]/layout.d.ts.map +1 -1
  4. package/lib/app/[locale]/layout.js +2 -4
  5. package/lib/app/[locale]/users/page.d.ts +1 -2
  6. package/lib/app/[locale]/users/page.d.ts.map +1 -1
  7. package/lib/app/[locale]/users/page.js +2 -2
  8. package/lib/app/layout.d.ts +1 -1
  9. package/lib/app/layout.d.ts.map +1 -1
  10. package/lib/app/layout.js +2 -4
  11. package/lib/components/AddItemDialog.d.ts +1 -2
  12. package/lib/components/AddItemDialog.d.ts.map +1 -1
  13. package/lib/components/AddItemDialog.js +10 -16
  14. package/lib/components/DeleteConfirmationDialog.d.ts +1 -2
  15. package/lib/components/DeleteConfirmationDialog.d.ts.map +1 -1
  16. package/lib/components/DeleteConfirmationDialog.js +5 -11
  17. package/lib/components/SearchField.d.ts +1 -2
  18. package/lib/components/SearchField.d.ts.map +1 -1
  19. package/lib/components/SearchField.js +4 -6
  20. package/lib/components/groups/CreateGroupDialog.d.ts +1 -2
  21. package/lib/components/groups/CreateGroupDialog.d.ts.map +1 -1
  22. package/lib/components/groups/CreateGroupDialog.js +2 -5
  23. package/lib/components/groups/GroupDetails.d.ts +1 -2
  24. package/lib/components/groups/GroupDetails.d.ts.map +1 -1
  25. package/lib/components/groups/GroupDetails.js +2 -3
  26. package/lib/components/groups/GroupForm.d.ts +1 -2
  27. package/lib/components/groups/GroupForm.d.ts.map +1 -1
  28. package/lib/components/groups/GroupForm.js +8 -14
  29. package/lib/components/groups/GroupTabs.d.ts +1 -1
  30. package/lib/components/groups/GroupTabs.d.ts.map +1 -1
  31. package/lib/components/groups/GroupTabs.js +6 -14
  32. package/lib/components/groups/GroupUsers.d.ts +1 -2
  33. package/lib/components/groups/GroupUsers.d.ts.map +1 -1
  34. package/lib/components/groups/GroupUsers.js +17 -34
  35. package/lib/components/groups/Groups.d.ts +1 -2
  36. package/lib/components/groups/Groups.d.ts.map +1 -1
  37. package/lib/components/groups/Groups.js +19 -35
  38. package/lib/components/groups/GroupsTable.d.ts +1 -2
  39. package/lib/components/groups/GroupsTable.d.ts.map +1 -1
  40. package/lib/components/groups/GroupsTable.js +13 -25
  41. package/lib/components/users/CreateUserDialog.d.ts +1 -2
  42. package/lib/components/users/CreateUserDialog.d.ts.map +1 -1
  43. package/lib/components/users/CreateUserDialog.js +2 -5
  44. package/lib/components/users/UserCredentials.d.ts +1 -2
  45. package/lib/components/users/UserCredentials.d.ts.map +1 -1
  46. package/lib/components/users/UserCredentials.js +2 -3
  47. package/lib/components/users/UserDetails.d.ts +1 -2
  48. package/lib/components/users/UserDetails.d.ts.map +1 -1
  49. package/lib/components/users/UserDetails.js +2 -3
  50. package/lib/components/users/UserForm.d.ts +1 -2
  51. package/lib/components/users/UserForm.d.ts.map +1 -1
  52. package/lib/components/users/UserForm.js +10 -26
  53. package/lib/components/users/UserGroups.d.ts +1 -2
  54. package/lib/components/users/UserGroups.d.ts.map +1 -1
  55. package/lib/components/users/UserGroups.js +17 -32
  56. package/lib/components/users/Users.d.ts +1 -2
  57. package/lib/components/users/Users.d.ts.map +1 -1
  58. package/lib/components/users/Users.js +19 -35
  59. package/lib/components/users/UsersTable.d.ts +1 -2
  60. package/lib/components/users/UsersTable.d.ts.map +1 -1
  61. package/lib/components/users/UsersTable.js +15 -31
  62. package/lib/components/users/UsersTabs.d.ts +1 -1
  63. package/lib/components/users/UsersTabs.d.ts.map +1 -1
  64. package/lib/components/users/UsersTabs.js +6 -16
  65. package/lib/config/index.d.ts +1 -1
  66. package/lib/config/index.d.ts.map +1 -1
  67. package/lib/config/index.js +3 -2
  68. package/lib/proxy.d.ts +5 -0
  69. package/lib/proxy.d.ts.map +1 -0
  70. package/lib/{middleware.js → proxy.js} +1 -1
  71. package/lib/tsconfig.tsbuildinfo +1 -1
  72. package/lib/utils/hooks/useAPIClient.d.ts +1 -1
  73. package/lib/utils/hooks/useAPIClient.d.ts.map +1 -1
  74. package/lib/utils/hooks/useAPIClient.js +4 -3
  75. package/package.json +26 -23
  76. package/lib/middleware.d.ts +0 -5
  77. package/lib/middleware.d.ts.map +0 -1
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import { Group } from '../../types/groups';
3
2
  export interface TableProps {
4
3
  groups?: Group[];
@@ -6,6 +5,6 @@ export interface TableProps {
6
5
  setSelectedGroup: (group: Group) => void;
7
6
  onDelete: (group: Group) => void;
8
7
  }
9
- declare const GroupsTable: ({ groups, selectedGroup, setSelectedGroup, onDelete, }: TableProps) => React.JSX.Element;
8
+ declare const GroupsTable: ({ groups, selectedGroup, setSelectedGroup, onDelete, }: TableProps) => import("react/jsx-runtime").JSX.Element;
10
9
  export default GroupsTable;
11
10
  //# sourceMappingURL=GroupsTable.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"GroupsTable.d.ts","sourceRoot":"","sources":["../../../src/components/groups/GroupsTable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAe1B,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAW3C,MAAM,WAAW,UAAU;IACzB,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC;IACjB,aAAa,CAAC,EAAE,KAAK,CAAC;IACtB,gBAAgB,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACzC,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CAClC;AAED,QAAA,MAAM,WAAW,GAAI,wDAKlB,UAAU,sBA8DZ,CAAC;AAEF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"GroupsTable.d.ts","sourceRoot":"","sources":["../../../src/components/groups/GroupsTable.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAW3C,MAAM,WAAW,UAAU;IACzB,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC;IACjB,aAAa,CAAC,EAAE,KAAK,CAAC;IACtB,gBAAgB,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACzC,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CAClC;AAED,QAAA,MAAM,WAAW,GAAI,wDAKlB,UAAU,4CA8DZ,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { isStringTranslation, useLocale } from '@deix/rossini-core';
3
3
  import DeleteIcon from '@mui/icons-material/Delete';
4
4
  import { IconButton, Table, TableBody, TableCell, TableContainer, TableHead, TableRow, useTheme, } from '@mui/material';
@@ -15,29 +15,17 @@ const GroupsTable = ({ groups = [], selectedGroup, setSelectedGroup, onDelete, }
15
15
  const muiTheme = useTheme();
16
16
  const [openConfirmationDialog, setOpenConfirmationDialog] = useState(false);
17
17
  const [deleteGroup, setDeleteGroup] = useState();
18
- return (React.createElement(React.Fragment, null,
19
- React.createElement(TableContainer, null,
20
- React.createElement(Table, { size: 'small' },
21
- React.createElement(TableHead, null,
22
- React.createElement(TableRow, null,
23
- groupsTableColumns.map((col) => (React.createElement(TableCell, { key: col.id, align: col.align || 'inherit' }, isStringTranslation(col.label)
24
- ? col.label[locale]
25
- : col.label))),
26
- React.createElement(TableCell, { padding: 'none' }, ''))),
27
- React.createElement(TableBody, null, groups.map((group, rowIdx) => (React.createElement(TableRow, { key: rowIdx, onClick: () => setSelectedGroup(group), sx: {
28
- cursor: 'pointer',
29
- background: selectedGroup && group.id === selectedGroup.id
30
- ? muiTheme.palette.primary.light
31
- : undefined,
32
- } },
33
- React.createElement(TableCell, null, group.name),
34
- React.createElement(TableCell, { padding: 'none', align: 'right' },
35
- React.createElement(IconButton, { size: 'small', onClick: (evt) => {
36
- evt.stopPropagation();
37
- setOpenConfirmationDialog(true);
38
- setDeleteGroup(group);
39
- } },
40
- React.createElement(DeleteIcon, null))))))))),
41
- React.createElement(DeleteConfirmationDialog, { open: openConfirmationDialog, onClose: () => setOpenConfirmationDialog(false), onConfirm: () => (deleteGroup ? onDelete(deleteGroup) : {}) })));
18
+ return (_jsxs(_Fragment, { children: [_jsx(TableContainer, { children: _jsxs(Table, { size: 'small', children: [_jsx(TableHead, { children: _jsxs(TableRow, { children: [groupsTableColumns.map((col) => (_jsx(TableCell, { align: col.align || 'inherit', children: isStringTranslation(col.label)
19
+ ? col.label[locale]
20
+ : col.label }, col.id))), _jsx(TableCell, { padding: 'none', children: '' })] }) }), _jsx(TableBody, { children: groups.map((group, rowIdx) => (_jsxs(TableRow, { onClick: () => setSelectedGroup(group), sx: {
21
+ cursor: 'pointer',
22
+ background: selectedGroup && group.id === selectedGroup.id
23
+ ? muiTheme.palette.primary.light
24
+ : undefined,
25
+ }, children: [_jsx(TableCell, { children: group.name }), _jsx(TableCell, { padding: 'none', align: 'right', children: _jsx(IconButton, { size: 'small', onClick: (evt) => {
26
+ evt.stopPropagation();
27
+ setOpenConfirmationDialog(true);
28
+ setDeleteGroup(group);
29
+ }, children: _jsx(DeleteIcon, {}) }) })] }, rowIdx))) })] }) }), _jsx(DeleteConfirmationDialog, { open: openConfirmationDialog, onClose: () => setOpenConfirmationDialog(false), onConfirm: () => (deleteGroup ? onDelete(deleteGroup) : {}) })] }));
42
30
  };
43
31
  export default GroupsTable;
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import { User } from '../../types/users';
3
2
  export interface CreateUserDialogProps {
4
3
  open: boolean;
@@ -7,6 +6,6 @@ export interface CreateUserDialogProps {
7
6
  filteredGroup?: string;
8
7
  emailAsUsername?: boolean;
9
8
  }
10
- declare const CreateUserDialog: ({ open, onClose, onUserCreate, filteredGroup, emailAsUsername, }: CreateUserDialogProps) => React.JSX.Element;
9
+ declare const CreateUserDialog: ({ open, onClose, onUserCreate, filteredGroup, emailAsUsername, }: CreateUserDialogProps) => import("react/jsx-runtime").JSX.Element;
11
10
  export default CreateUserDialog;
12
11
  //# sourceMappingURL=CreateUserDialog.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CreateUserDialog.d.ts","sourceRoot":"","sources":["../../../src/components/users/CreateUserDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,IAAI,KAAK,IAAI,CAAC;IACvC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,QAAA,MAAM,gBAAgB,GAAI,kEAMvB,qBAAqB,sBA6CvB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"CreateUserDialog.d.ts","sourceRoot":"","sources":["../../../src/components/users/CreateUserDialog.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,IAAI,KAAK,IAAI,CAAC;IACvC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,QAAA,MAAM,gBAAgB,GAAI,kEAMvB,qBAAqB,4CA6CvB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -1,4 +1,4 @@
1
- import React from 'react';
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';
@@ -31,9 +31,6 @@ const CreateUserDialog = ({ open, onClose, onUserCreate, filteredGroup, emailAsU
31
31
  });
32
32
  onClose();
33
33
  };
34
- return (React.createElement(Dialog, { open: open, fullWidth: true, maxWidth: 'sm', onClose: onClose },
35
- React.createElement(DialogTitle, null, usersTranslations.create[locale]),
36
- React.createElement(DialogContent, null,
37
- React.createElement(UserForm, { mode: 'create', onSave: handleSave, onCancel: onClose, emailAsUsername: emailAsUsername }))));
34
+ return (_jsxs(Dialog, { open: open, fullWidth: true, maxWidth: 'sm', onClose: onClose, children: [_jsx(DialogTitle, { children: usersTranslations.create[locale] }), _jsx(DialogContent, { children: _jsx(UserForm, { mode: 'create', onSave: handleSave, onCancel: onClose, emailAsUsername: emailAsUsername }) })] }));
38
35
  };
39
36
  export default CreateUserDialog;
@@ -1,8 +1,7 @@
1
- import React from 'react';
2
1
  import { User } from '../../types/users';
3
2
  interface UserCredentialsProps {
4
3
  user: User;
5
4
  }
6
- declare const UserCredentials: ({ user }: UserCredentialsProps) => React.JSX.Element;
5
+ declare const UserCredentials: ({ user }: UserCredentialsProps) => import("react/jsx-runtime").JSX.Element;
7
6
  export default UserCredentials;
8
7
  //# sourceMappingURL=UserCredentials.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"UserCredentials.d.ts","sourceRoot":"","sources":["../../../src/components/users/UserCredentials.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAOzC,UAAU,oBAAoB;IAC5B,IAAI,EAAE,IAAI,CAAC;CACZ;AAED,QAAA,MAAM,eAAe,GAAI,UAAU,oBAAoB,sBAkBtD,CAAC;AAEF,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"UserCredentials.d.ts","sourceRoot":"","sources":["../../../src/components/users/UserCredentials.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAOzC,UAAU,oBAAoB;IAC5B,IAAI,EAAE,IAAI,CAAC;CACZ;AAED,QAAA,MAAM,eAAe,GAAI,UAAU,oBAAoB,4CAkBtD,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useLocale } from '@deix/rossini-core';
3
3
  import { Box, Button } from '@mui/material';
4
4
  import usersTranslations from '../../lang/users';
@@ -10,7 +10,6 @@ const UserCredentials = ({ user }) => {
10
10
  const apiClient = useAPIClient();
11
11
  const queryClient = useQueryClient();
12
12
  const { mutate: sendResetPasswordEmail } = useSendUpdatePasswordEmail(queryClient, apiClient);
13
- return (React.createElement(Box, { sx: { mt: 2 } },
14
- React.createElement(Button, { variant: 'contained', onClick: () => sendResetPasswordEmail(user.id) }, usersTranslations.sendResetPasswordEmail[locale])));
13
+ return (_jsx(Box, { sx: { mt: 2 }, children: _jsx(Button, { variant: 'contained', onClick: () => sendResetPasswordEmail(user.id), children: usersTranslations.sendResetPasswordEmail[locale] }) }));
15
14
  };
16
15
  export default UserCredentials;
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import { User } from '../../types/users';
3
2
  export interface UserDetailsProps {
4
3
  user: User;
@@ -6,6 +5,6 @@ export interface UserDetailsProps {
6
5
  editUsername?: boolean;
7
6
  emailAsUsername?: boolean;
8
7
  }
9
- declare const UserDetails: ({ user, onUserUpdate, editUsername, emailAsUsername, }: UserDetailsProps) => React.JSX.Element;
8
+ declare const UserDetails: ({ user, onUserUpdate, editUsername, emailAsUsername, }: UserDetailsProps) => import("react/jsx-runtime").JSX.Element;
10
9
  export default UserDetails;
11
10
  //# sourceMappingURL=UserDetails.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"UserDetails.d.ts","sourceRoot":"","sources":["../../../src/components/users/UserDetails.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAKzC,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,IAAI,CAAC;IACX,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,KAAK,IAAI,CAAC;IACtD,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,QAAA,MAAM,WAAW,GAAI,wDAKlB,gBAAgB,sBA2BlB,CAAC;AAEF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"UserDetails.d.ts","sourceRoot":"","sources":["../../../src/components/users/UserDetails.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAKzC,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,IAAI,CAAC;IACX,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,KAAK,IAAI,CAAC;IACtD,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,QAAA,MAAM,WAAW,GAAI,wDAKlB,gBAAgB,4CA2BlB,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { useQueryClient } from '@tanstack/react-query';
3
3
  import { useUpdateUser } from '../../utils/hooks/users';
4
4
  import UserForm from './UserForm';
@@ -16,7 +16,6 @@ const UserDetails = ({ user, onUserUpdate, editUsername, emailAsUsername = false
16
16
  onUserUpdate(updatedUser, user);
17
17
  }
18
18
  };
19
- return (React.createElement(React.Fragment, null,
20
- React.createElement(UserForm, { mode: 'modify', user: user, onSave: handleUpdate, onCancel: () => { }, editUsername: editUsername, emailAsUsername: emailAsUsername })));
19
+ return (_jsx(_Fragment, { children: _jsx(UserForm, { mode: 'modify', user: user, onSave: handleUpdate, onCancel: () => { }, editUsername: editUsername, emailAsUsername: emailAsUsername }) }));
21
20
  };
22
21
  export default UserDetails;
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import { User } from '../../types/users';
3
2
  export interface UserFormFields extends User {
4
3
  sendEmailOnCreation: boolean;
@@ -11,6 +10,6 @@ export interface UserFormProps {
11
10
  editUsername?: boolean;
12
11
  emailAsUsername?: boolean;
13
12
  }
14
- declare const UserForm: ({ user, onSave, onCancel, mode, editUsername, emailAsUsername, }: UserFormProps) => React.JSX.Element;
13
+ declare const UserForm: ({ user, onSave, onCancel, mode, editUsername, emailAsUsername, }: UserFormProps) => import("react/jsx-runtime").JSX.Element;
15
14
  export default UserForm;
16
15
  //# sourceMappingURL=UserForm.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"UserForm.d.ts","sourceRoot":"","sources":["../../../src/components/users/UserForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAc1B,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,MAAM,WAAW,cAAe,SAAQ,IAAI;IAC1C,mBAAmB,EAAE,OAAO,CAAC;CAC9B;AAED,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,IAAI,CAAC;IACvC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC3B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,QAAA,MAAM,QAAQ,GAAI,kEAOf,aAAa,sBA6Kf,CAAC;AAEF,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"UserForm.d.ts","sourceRoot":"","sources":["../../../src/components/users/UserForm.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,MAAM,WAAW,cAAe,SAAQ,IAAI;IAC1C,mBAAmB,EAAE,OAAO,CAAC;CAC9B;AAED,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,IAAI,CAAC;IACvC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC3B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,QAAA,MAAM,QAAQ,GAAI,kEAOf,aAAa,4CA6Kf,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useLocale } from '@deix/rossini-core';
3
3
  import { Button, FormControlLabel, Grid, Switch, TextField, } from '@mui/material';
4
4
  import { Controller, useForm } from 'react-hook-form';
@@ -37,30 +37,14 @@ const UserForm = ({ user, onSave, onCancel, mode = 'create', editUsername, email
37
37
  const onSubmit = (data) => {
38
38
  onSave(data);
39
39
  };
40
- return (React.createElement("form", { onSubmit: (event) => void handleSubmit(onSubmit)(event) },
41
- React.createElement(Grid, { container: true, spacing: 2, sx: { mt: 2, maxWidth: 'sm' }, justifyContent: 'stretch' },
42
- !emailAsUsername && (React.createElement(Grid, { size: { xs: 12 } },
43
- React.createElement(Controller, { name: 'username', control: control, render: ({ field }) => (React.createElement(TextField, { size: 'small', fullWidth: true, label: usersTranslations.username[locale], disabled: mode === 'modify' && !editUsername, sx: { flexShrink: 0 }, ...field })) }))),
44
- React.createElement(Grid, { size: { xs: 12 } },
45
- React.createElement(Controller, { name: 'firstName', control: control, render: ({ field }) => (React.createElement(TextField, { size: 'small', fullWidth: true, label: usersTranslations.firstName[locale], sx: { flexShrink: 0 }, ...field })) })),
46
- React.createElement(Grid, { size: { xs: 12 } },
47
- React.createElement(Controller, { name: 'lastName', control: control, render: ({ field }) => (React.createElement(TextField, { size: 'small', fullWidth: true, label: usersTranslations.lastName[locale], sx: { flexShrink: 0 }, ...field })) })),
48
- React.createElement(Grid, { size: { xs: 12 } },
49
- React.createElement(Controller, { name: 'email', control: control, rules: { required: true }, render: ({ field }) => (React.createElement(TextField, { size: 'small', fullWidth: true, error: !!errors.email, helperText: errors.email
50
- ? usersTranslations.requiredField[locale]
51
- : undefined, label: usersTranslations.email[locale], sx: { flexShrink: 0 }, ...field })) })),
52
- React.createElement(Grid, { size: { xs: 12 } },
53
- React.createElement(Controller, { name: 'enabled', control: control, render: ({ field }) => (React.createElement(FormControlLabel, { sx: { ml: 1 }, control: React.createElement(Switch, { checked: field.value, size: 'small', ...field }), label: usersTranslations.enabled[locale] })) })),
54
- mode === 'create' && (React.createElement(Grid, { size: { xs: 12 } },
55
- React.createElement(Controller, { name: 'sendEmailOnCreation', control: control, render: ({ field }) => (React.createElement(FormControlLabel, { sx: { ml: 1 }, control: React.createElement(Switch, { checked: field.value, size: 'small', ...field }), label: usersTranslations.sendResetPasswordEmail[locale] })) }))),
56
- React.createElement(Grid, { sx: {
57
- mt: 2,
58
- display: 'flex',
59
- justifyContent: 'flex-end',
60
- gap: 2,
61
- width: '100%',
62
- } },
63
- mode === 'create' && (React.createElement(Button, { variant: 'outlined', onClick: onCancel }, usersTranslations.cancel[locale])),
64
- React.createElement(Button, { variant: 'contained', type: 'submit' }, usersTranslations.save[locale])))));
40
+ return (_jsx("form", { onSubmit: (event) => void handleSubmit(onSubmit)(event), children: _jsxs(Grid, { container: true, spacing: 2, sx: { mt: 2, maxWidth: 'sm' }, justifyContent: 'stretch', children: [!emailAsUsername && (_jsx(Grid, { size: { xs: 12 }, children: _jsx(Controller, { name: 'username', control: control, render: ({ field }) => (_jsx(TextField, { size: 'small', fullWidth: true, label: usersTranslations.username[locale], disabled: mode === 'modify' && !editUsername, sx: { flexShrink: 0 }, ...field })) }) })), _jsx(Grid, { size: { xs: 12 }, children: _jsx(Controller, { name: 'firstName', control: control, render: ({ field }) => (_jsx(TextField, { size: 'small', fullWidth: true, label: usersTranslations.firstName[locale], sx: { flexShrink: 0 }, ...field })) }) }), _jsx(Grid, { size: { xs: 12 }, children: _jsx(Controller, { name: 'lastName', control: control, render: ({ field }) => (_jsx(TextField, { size: 'small', fullWidth: true, label: usersTranslations.lastName[locale], sx: { flexShrink: 0 }, ...field })) }) }), _jsx(Grid, { size: { xs: 12 }, children: _jsx(Controller, { name: 'email', control: control, rules: { required: true }, render: ({ field }) => (_jsx(TextField, { size: 'small', fullWidth: true, error: !!errors.email, helperText: errors.email
41
+ ? usersTranslations.requiredField[locale]
42
+ : undefined, label: usersTranslations.email[locale], sx: { flexShrink: 0 }, ...field })) }) }), _jsx(Grid, { size: { xs: 12 }, children: _jsx(Controller, { name: 'enabled', control: control, render: ({ field }) => (_jsx(FormControlLabel, { sx: { ml: 1 }, control: _jsx(Switch, { checked: field.value, size: 'small', ...field }), label: usersTranslations.enabled[locale] })) }) }), mode === 'create' && (_jsx(Grid, { size: { xs: 12 }, children: _jsx(Controller, { name: 'sendEmailOnCreation', control: control, render: ({ field }) => (_jsx(FormControlLabel, { sx: { ml: 1 }, control: _jsx(Switch, { checked: field.value, size: 'small', ...field }), label: usersTranslations.sendResetPasswordEmail[locale] })) }) })), _jsxs(Grid, { sx: {
43
+ mt: 2,
44
+ display: 'flex',
45
+ justifyContent: 'flex-end',
46
+ gap: 2,
47
+ width: '100%',
48
+ }, children: [mode === 'create' && (_jsx(Button, { variant: 'outlined', onClick: onCancel, children: usersTranslations.cancel[locale] })), _jsx(Button, { variant: 'contained', type: 'submit', children: usersTranslations.save[locale] })] })] }) }));
65
49
  };
66
50
  export default UserForm;
@@ -1,8 +1,7 @@
1
- import React from 'react';
2
1
  import { User } from '../../types/users';
3
2
  interface UserGroupsProps {
4
3
  user: User;
5
4
  }
6
- declare const UserGroups: ({ user }: UserGroupsProps) => React.JSX.Element;
5
+ declare const UserGroups: ({ user }: UserGroupsProps) => import("react/jsx-runtime").JSX.Element;
7
6
  export default UserGroups;
8
7
  //# sourceMappingURL=UserGroups.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"UserGroups.d.ts","sourceRoot":"","sources":["../../../src/components/users/UserGroups.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAe1B,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAsBzC,UAAU,eAAe;IACvB,IAAI,EAAE,IAAI,CAAC;CACZ;AAED,QAAA,MAAM,UAAU,GAAI,UAAU,eAAe,sBA4F5C,CAAC;AAEF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"UserGroups.d.ts","sourceRoot":"","sources":["../../../src/components/users/UserGroups.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAsBzC,UAAU,eAAe;IACvB,IAAI,EAAE,IAAI,CAAC;CACZ;AAED,QAAA,MAAM,UAAU,GAAI,UAAU,eAAe,4CA4F5C,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -1,4 +1,4 @@
1
- import React from 'react';
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';
@@ -28,36 +28,21 @@ const UserGroups = ({ user }) => {
28
28
  const [openAddGroupDialog, setOpenAddGroupDialog] = useState(false);
29
29
  const [openConfirmationDialog, setOpenConfirmationDialog] = useState(false);
30
30
  const [deleteId, setDeleteId] = useState();
31
- return (React.createElement(React.Fragment, null,
32
- userGroups && userGroups.length > 0 && (React.createElement(Box, { maxWidth: 'sm' },
33
- React.createElement(TableContainer, null,
34
- React.createElement(Table, { size: 'small' },
35
- React.createElement(TableHead, null,
36
- React.createElement(TableRow, null,
37
- userGroupsTableColumns.map((col) => (React.createElement(TableCell, { key: col.id, align: col.align || 'inherit' }, isStringTranslation(col.label)
38
- ? col.label[locale]
39
- : col.label))),
40
- React.createElement(TableCell, { padding: 'none' }, ''))),
41
- React.createElement(TableBody, null, userGroups?.map((group, rowIdx) => (React.createElement(TableRow, { key: rowIdx },
42
- React.createElement(TableCell, null, group.name),
43
- React.createElement(TableCell, { padding: 'none', align: 'right' },
44
- React.createElement(IconButton, { size: 'small', onClick: (evt) => {
45
- evt.stopPropagation();
46
- setOpenConfirmationDialog(true);
47
- setDeleteId(group.id);
48
- } },
49
- React.createElement(DeleteIcon, null))))))))))),
50
- React.createElement(Button, { variant: 'outlined', startIcon: React.createElement(AddIcon, null), onClick: () => setOpenAddGroupDialog(true), sx: { marginTop: 2 } }, usersTranslations.addGroup[locale]),
51
- React.createElement(AddItemDialog, { open: openAddGroupDialog, onClose: () => setOpenAddGroupDialog(false), onConfirm: (value) => {
52
- if (value) {
53
- addUserToGroup({ userId: user.id, groupId: value?.value });
54
- }
55
- }, title: usersTranslations.addGroup, options: groups?.map((group) => ({
56
- value: group.id,
57
- label: group.name,
58
- })) }),
59
- React.createElement(DeleteConfirmationDialog, { open: openConfirmationDialog, onClose: () => setOpenConfirmationDialog(false), onConfirm: () => deleteId
60
- ? removeUserFromGroup({ userId: user.id, groupId: deleteId })
61
- : {} })));
31
+ return (_jsxs(_Fragment, { children: [userGroups && userGroups.length > 0 && (_jsx(Box, { maxWidth: 'sm', children: _jsx(TableContainer, { children: _jsxs(Table, { size: 'small', children: [_jsx(TableHead, { children: _jsxs(TableRow, { children: [userGroupsTableColumns.map((col) => (_jsx(TableCell, { align: col.align || 'inherit', children: isStringTranslation(col.label)
32
+ ? col.label[locale]
33
+ : col.label }, col.id))), _jsx(TableCell, { padding: 'none', children: '' })] }) }), _jsx(TableBody, { children: userGroups?.map((group, rowIdx) => (_jsxs(TableRow, { children: [_jsx(TableCell, { children: group.name }), _jsx(TableCell, { padding: 'none', align: 'right', children: _jsx(IconButton, { size: 'small', onClick: (evt) => {
34
+ evt.stopPropagation();
35
+ setOpenConfirmationDialog(true);
36
+ setDeleteId(group.id);
37
+ }, children: _jsx(DeleteIcon, {}) }) })] }, rowIdx))) })] }) }) })), _jsx(Button, { variant: 'outlined', startIcon: _jsx(AddIcon, {}), onClick: () => setOpenAddGroupDialog(true), sx: { marginTop: 2 }, children: usersTranslations.addGroup[locale] }), _jsx(AddItemDialog, { open: openAddGroupDialog, onClose: () => setOpenAddGroupDialog(false), onConfirm: (value) => {
38
+ if (value) {
39
+ addUserToGroup({ userId: user.id, groupId: value?.value });
40
+ }
41
+ }, title: usersTranslations.addGroup, options: groups?.map((group) => ({
42
+ value: group.id,
43
+ label: group.name,
44
+ })) }), _jsx(DeleteConfirmationDialog, { open: openConfirmationDialog, onClose: () => setOpenConfirmationDialog(false), onConfirm: () => deleteId
45
+ ? removeUserFromGroup({ userId: user.id, groupId: deleteId })
46
+ : {} })] }));
62
47
  };
63
48
  export default UserGroups;
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import { User } from '../../types/users';
3
2
  import { UserTab } from './UsersTabs';
4
3
  interface UsersProps {
@@ -13,6 +12,6 @@ interface UsersProps {
13
12
  hideGroupsSelection?: boolean;
14
13
  disableDelete?: boolean;
15
14
  }
16
- declare const Users: ({ apiUrl, additionalTabs, onUserCreate, onUserUpdate, onUserDelete, editUsername, filteredGroup, emailAsUsername, hideGroupsSelection, disableDelete, }: UsersProps) => React.JSX.Element;
15
+ declare const Users: ({ apiUrl, additionalTabs, onUserCreate, onUserUpdate, onUserDelete, editUsername, filteredGroup, emailAsUsername, hideGroupsSelection, disableDelete, }: UsersProps) => import("react/jsx-runtime").JSX.Element;
17
16
  export default Users;
18
17
  //# sourceMappingURL=Users.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Users.d.ts","sourceRoot":"","sources":["../../../src/components/users/Users.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAWnD,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,OAAiB,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAGhD,UAAU,UAAU;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,OAAO,EAAE,CAAC;IAE3B,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,KAAK,IAAI,CAAC;IAEtD,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,IAAI,KAAK,IAAI,CAAC;IAEvC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IAEpC,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAE9B,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,QAAA,MAAM,KAAK,GAAI,yJAWZ,UAAU,sBA+JZ,CAAC;AAEF,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"Users.d.ts","sourceRoot":"","sources":["../../../src/components/users/Users.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,OAAiB,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAGhD,UAAU,UAAU;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,OAAO,EAAE,CAAC;IAE3B,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,KAAK,IAAI,CAAC;IAEtD,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,IAAI,KAAK,IAAI,CAAC;IAEvC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IAEpC,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAE9B,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,QAAA,MAAM,KAAK,GAAI,yJAWZ,UAAU,4CA+JZ,CAAC;AAEF,eAAe,KAAK,CAAC"}
@@ -1,5 +1,6 @@
1
1
  'use client';
2
- import React, { useEffect, useState } from 'react';
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { useEffect, useState } from 'react';
3
4
  import PersonAddIcon from '@mui/icons-material/PersonAdd';
4
5
  import { Box, Button, Grid, IconButton, Link } from '@mui/material';
5
6
  import ArrowBackIcon from '@mui/icons-material/ArrowBack';
@@ -58,46 +59,29 @@ const Users = ({ apiUrl, additionalTabs = [], onUserCreate, onUserUpdate, onUser
58
59
  }
59
60
  setSelectedUser(undefined);
60
61
  };
61
- return (React.createElement(APIClientProvider, { baseURL: apiUrl },
62
- React.createElement(Box, { sx: {
62
+ return (_jsx(APIClientProvider, { baseURL: apiUrl, children: _jsxs(Box, { sx: {
63
63
  flexGrow: 1,
64
64
  maxWidth: '100%',
65
65
  overflowX: 'hidden',
66
66
  paddingTop: 3,
67
67
  paddingLeft: 3,
68
68
  paddingRight: 3,
69
- } },
70
- !selectedUser && (React.createElement(React.Fragment, null,
71
- React.createElement(Grid, { container: true, spacing: 2, sx: { marginBottom: 2 } },
72
- React.createElement(Grid, null,
73
- React.createElement(SearchField, { placeholder: usersTranslations.search[locale], onSearch: (value) => setSearchString(value) })),
74
- React.createElement(Grid, null,
75
- React.createElement(Button, { variant: 'contained', startIcon: React.createElement(PersonAddIcon, null), onClick: () => {
76
- setOpenCreateUserDialog(true);
77
- setSelectedUser(undefined);
78
- } }, usersTranslations.new[locale]))),
79
- React.createElement(UsersTable, { users: filteredUsers, selectedUser: selectedUser, setSelectedUser: (user) => {
80
- setSelectedUser(user);
81
- }, onDelete: handleDelete, emailAsUsername: emailAsUsername, disableDelete: disableDelete }))),
82
- selectedUser && (React.createElement(Box, { sx: {
83
- display: 'flex',
84
- flexDirection: 'column',
85
- alignItems: 'flex-start',
86
- width: '100%',
87
- } },
88
- React.createElement(Box, { sx: {
69
+ }, children: [!selectedUser && (_jsxs(_Fragment, { children: [_jsxs(Grid, { container: true, spacing: 2, sx: { marginBottom: 2 }, children: [_jsx(Grid, { children: _jsx(SearchField, { placeholder: usersTranslations.search[locale], onSearch: (value) => setSearchString(value) }) }), _jsx(Grid, { children: _jsx(Button, { variant: 'contained', startIcon: _jsx(PersonAddIcon, {}), onClick: () => {
70
+ setOpenCreateUserDialog(true);
71
+ setSelectedUser(undefined);
72
+ }, children: usersTranslations.new[locale] }) })] }), _jsx(UsersTable, { users: filteredUsers, selectedUser: selectedUser, setSelectedUser: (user) => {
73
+ setSelectedUser(user);
74
+ }, onDelete: handleDelete, emailAsUsername: emailAsUsername, disableDelete: disableDelete })] })), selectedUser && (_jsxs(Box, { sx: {
89
75
  display: 'flex',
90
- flexDirection: 'row',
91
- alignItems: 'center',
92
- } },
93
- React.createElement(IconButton, { "aria-label": 'delete', color: 'primary', onClick: () => setSelectedUser(undefined), sx: { mr: 2 } },
94
- React.createElement(ArrowBackIcon, null)),
95
- React.createElement(Link, { underline: 'none', href: '#', onClick: () => setSelectedUser(undefined) }, usersTranslations.title[locale]),
96
- React.createElement(KeyboardArrowRightIcon, null),
97
- selectedUser.username),
98
- React.createElement(UserTabs, { user: selectedUser, additionalTabs: additionalTabs, onUserUpdate: onUserUpdate, editUsername: editUsername, emailAsUsername: emailAsUsername, hideGroupsSelection: hideGroupsSelection }))),
99
- React.createElement(CreateUserDialog, { open: openCreateUserDialog, onClose: () => {
100
- setOpenCreateUserDialog(false);
101
- }, onUserCreate: onUserCreate, filteredGroup: filteredGroup, emailAsUsername: true }))));
76
+ flexDirection: 'column',
77
+ alignItems: 'flex-start',
78
+ width: '100%',
79
+ }, children: [_jsxs(Box, { sx: {
80
+ display: 'flex',
81
+ flexDirection: 'row',
82
+ alignItems: 'center',
83
+ }, children: [_jsx(IconButton, { "aria-label": 'delete', color: 'primary', onClick: () => setSelectedUser(undefined), sx: { mr: 2 }, children: _jsx(ArrowBackIcon, {}) }), _jsx(Link, { underline: 'none', href: '#', onClick: () => setSelectedUser(undefined), children: usersTranslations.title[locale] }), _jsx(KeyboardArrowRightIcon, {}), selectedUser.username] }), _jsx(UserTabs, { user: selectedUser, additionalTabs: additionalTabs, onUserUpdate: onUserUpdate, editUsername: editUsername, emailAsUsername: emailAsUsername, hideGroupsSelection: hideGroupsSelection })] })), _jsx(CreateUserDialog, { open: openCreateUserDialog, onClose: () => {
84
+ setOpenCreateUserDialog(false);
85
+ }, onUserCreate: onUserCreate, filteredGroup: filteredGroup, emailAsUsername: true })] }) }));
102
86
  };
103
87
  export default Users;
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import { Group } from '../../types/groups';
3
2
  import { User } from '../../types/users';
4
3
  export interface TableProps {
@@ -10,6 +9,6 @@ export interface TableProps {
10
9
  emailAsUsername?: boolean;
11
10
  disableDelete?: boolean;
12
11
  }
13
- declare const UsersTable: ({ users, selectedUser, setSelectedUser, onDelete, emailAsUsername, disableDelete, }: TableProps) => React.JSX.Element;
12
+ declare const UsersTable: ({ users, selectedUser, setSelectedUser, onDelete, emailAsUsername, disableDelete, }: TableProps) => import("react/jsx-runtime").JSX.Element;
14
13
  export default UsersTable;
15
14
  //# sourceMappingURL=UsersTable.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"UsersTable.d.ts","sourceRoot":"","sources":["../../../src/components/users/UsersTable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAiB1B,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAuBzC,MAAM,WAAW,UAAU;IACzB,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC;IACf,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC;IACjB,YAAY,CAAC,EAAE,IAAI,CAAC;IACpB,eAAe,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACtC,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,QAAA,MAAM,UAAU,GAAI,qFAOjB,UAAU,sBAwEZ,CAAC;AAEF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"UsersTable.d.ts","sourceRoot":"","sources":["../../../src/components/users/UsersTable.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAuBzC,MAAM,WAAW,UAAU;IACzB,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC;IACf,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC;IACjB,YAAY,CAAC,EAAE,IAAI,CAAC;IACpB,eAAe,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACtC,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,QAAA,MAAM,UAAU,GAAI,qFAOjB,UAAU,4CAwEZ,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { isStringTranslation, useLocale } from '@deix/rossini-core';
3
3
  import CheckIcon from '@mui/icons-material/Check';
4
4
  import CloseIcon from '@mui/icons-material/Close';
@@ -30,35 +30,19 @@ const UsersTable = ({ users = [], selectedUser, setSelectedUser, onDelete, email
30
30
  const muiTheme = useTheme();
31
31
  const [openConfirmationDialog, setOpenConfirmationDialog] = useState(false);
32
32
  const [deleteUser, setDeleteUser] = useState();
33
- return (React.createElement(React.Fragment, null,
34
- React.createElement(TableContainer, null,
35
- React.createElement(Table, { size: 'small' },
36
- React.createElement(TableHead, null,
37
- React.createElement(TableRow, null,
38
- usersTableColumns
39
- .filter((c) => c.id !== 'username' || !emailAsUsername)
40
- .map((col) => (React.createElement(TableCell, { key: col.id, align: col.align || 'inherit' }, isStringTranslation(col.label)
41
- ? col.label[locale]
42
- : col.label))),
43
- React.createElement(TableCell, { padding: 'none' }, ''))),
44
- React.createElement(TableBody, null, users.map((user, rowIdx) => (React.createElement(TableRow, { key: rowIdx, onClick: () => setSelectedUser(user), sx: {
45
- cursor: 'pointer',
46
- background: selectedUser && user.id === selectedUser.id
47
- ? muiTheme.palette.primary.light
48
- : undefined,
49
- } },
50
- React.createElement(TableCell, null, user.firstName),
51
- React.createElement(TableCell, null, user.lastName),
52
- !emailAsUsername && React.createElement(TableCell, null, user.username),
53
- React.createElement(TableCell, null, user.email),
54
- React.createElement(TableCell, null, user.enabled ? React.createElement(CheckIcon, null) : React.createElement(CloseIcon, null)),
55
- !disableDelete && (React.createElement(TableCell, { padding: 'none', align: 'right' },
56
- React.createElement(IconButton, { size: 'small', onClick: (evt) => {
57
- evt.stopPropagation();
58
- setOpenConfirmationDialog(true);
59
- setDeleteUser(user);
60
- } },
61
- React.createElement(DeleteIcon, null)))))))))),
62
- React.createElement(DeleteConfirmationDialog, { open: openConfirmationDialog, onClose: () => setOpenConfirmationDialog(false), onConfirm: () => (deleteUser ? onDelete(deleteUser) : {}) })));
33
+ return (_jsxs(_Fragment, { children: [_jsx(TableContainer, { children: _jsxs(Table, { size: 'small', children: [_jsx(TableHead, { children: _jsxs(TableRow, { children: [usersTableColumns
34
+ .filter((c) => c.id !== 'username' || !emailAsUsername)
35
+ .map((col) => (_jsx(TableCell, { align: col.align || 'inherit', children: isStringTranslation(col.label)
36
+ ? col.label[locale]
37
+ : col.label }, col.id))), _jsx(TableCell, { padding: 'none', children: '' })] }) }), _jsx(TableBody, { children: users.map((user, rowIdx) => (_jsxs(TableRow, { onClick: () => setSelectedUser(user), sx: {
38
+ cursor: 'pointer',
39
+ background: selectedUser && user.id === selectedUser.id
40
+ ? muiTheme.palette.primary.light
41
+ : undefined,
42
+ }, children: [_jsx(TableCell, { children: user.firstName }), _jsx(TableCell, { children: user.lastName }), !emailAsUsername && _jsx(TableCell, { children: user.username }), _jsx(TableCell, { children: user.email }), _jsx(TableCell, { children: user.enabled ? _jsx(CheckIcon, {}) : _jsx(CloseIcon, {}) }), !disableDelete && (_jsx(TableCell, { padding: 'none', align: 'right', children: _jsx(IconButton, { size: 'small', onClick: (evt) => {
43
+ evt.stopPropagation();
44
+ setOpenConfirmationDialog(true);
45
+ setDeleteUser(user);
46
+ }, children: _jsx(DeleteIcon, {}) }) }))] }, rowIdx))) })] }) }), _jsx(DeleteConfirmationDialog, { open: openConfirmationDialog, onClose: () => setOpenConfirmationDialog(false), onConfirm: () => (deleteUser ? onDelete(deleteUser) : {}) })] }));
63
47
  };
64
48
  export default UsersTable;
@@ -15,6 +15,6 @@ export interface UserTabsProps {
15
15
  emailAsUsername?: boolean;
16
16
  hideGroupsSelection?: boolean;
17
17
  }
18
- declare const UserTabs: ({ user, additionalTabs, onUserUpdate, editUsername, emailAsUsername, hideGroupsSelection, }: UserTabsProps) => React.JSX.Element;
18
+ declare const UserTabs: ({ user, additionalTabs, onUserUpdate, editUsername, emailAsUsername, hideGroupsSelection, }: UserTabsProps) => import("react/jsx-runtime").JSX.Element;
19
19
  export default UserTabs;
20
20
  //# sourceMappingURL=UsersTabs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"UsersTabs.d.ts","sourceRoot":"","sources":["../../../src/components/users/UsersTabs.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,iBAAiB,EAAa,MAAM,oBAAoB,CAAC;AAElE,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAKzC,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE,iBAAiB,CAAC;IACzB,SAAS,EAAE,KAAK,CAAC,iBAAiB,CAAC;QAAE,IAAI,EAAE,IAAI,CAAA;KAAE,CAAC,CAAC;CACpD;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,IAAI,CAAC;IACX,cAAc,CAAC,EAAE,OAAO,EAAE,CAAC;IAC3B,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,KAAK,IAAI,CAAC;IACtD,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,QAAA,MAAM,QAAQ,GAAI,6FAOf,aAAa,sBA+Df,CAAC;AAEF,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"UsersTabs.d.ts","sourceRoot":"","sources":["../../../src/components/users/UsersTabs.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,iBAAiB,EAAa,MAAM,oBAAoB,CAAC;AAElE,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAKzC,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE,iBAAiB,CAAC;IACzB,SAAS,EAAE,KAAK,CAAC,iBAAiB,CAAC;QAAE,IAAI,EAAE,IAAI,CAAA;KAAE,CAAC,CAAC;CACpD;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,IAAI,CAAC;IACX,cAAc,CAAC,EAAE,OAAO,EAAE,CAAC;IAC3B,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,KAAK,IAAI,CAAC;IACtD,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,QAAA,MAAM,QAAQ,GAAI,6FAOf,aAAa,4CA+Df,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -1,5 +1,6 @@
1
1
  'use client';
2
- import React, { useState } from 'react';
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 usersTranslations from '../../lang/users';
@@ -9,24 +10,13 @@ import UserCredentials from './UserCredentials';
9
10
  const UserTabs = ({ user, additionalTabs = [], onUserUpdate, editUsername, emailAsUsername = false, hideGroupsSelection = false, }) => {
10
11
  const locale = useLocale();
11
12
  const [selectedTab, setSelectedTab] = useState('DETAILS');
12
- return (React.createElement(Box, { sx: {
13
+ return (_jsxs(Box, { sx: {
13
14
  flexGrow: 1,
14
15
  maxWidth: '100%',
15
16
  overflowX: 'hidden',
16
17
  alignSelf: 'stretch',
17
- } },
18
- React.createElement(Box, { sx: { borderBottom: 1, borderColor: 'divider' } },
19
- React.createElement(Tabs, { value: selectedTab, onChange: (_evt, newValue) => {
20
- setSelectedTab(newValue);
21
- }, "aria-label": 'basic tabs example' },
22
- React.createElement(Tab, { label: usersTranslations.details[locale], value: 'DETAILS' }),
23
- !hideGroupsSelection && (React.createElement(Tab, { label: usersTranslations.userGroups[locale], value: 'USER_GROUPS' })),
24
- React.createElement(Tab, { label: usersTranslations.credentials[locale], value: 'CREDENTIALS' }),
25
- additionalTabs.map((tab, index) => (React.createElement(Tab, { key: `tab${index}`, label: tab.title[locale], value: `ADDITIONAL_TAB_${index}` }))))),
26
- React.createElement(Box, { sx: { p: 1 } },
27
- selectedTab === 'DETAILS' && (React.createElement(UserDetails, { user: user, onUserUpdate: onUserUpdate, editUsername: editUsername, emailAsUsername: emailAsUsername })),
28
- selectedTab === 'USER_GROUPS' && !hideGroupsSelection && (React.createElement(UserGroups, { user: user })),
29
- selectedTab === 'CREDENTIALS' && React.createElement(UserCredentials, { user: user }),
30
- additionalTabs.map((tab, index) => selectedTab === `ADDITIONAL_TAB_${index}` && (React.createElement(tab.component, { key: `tab${index}`, user: user }))))));
18
+ }, children: [_jsx(Box, { sx: { borderBottom: 1, borderColor: 'divider' }, children: _jsxs(Tabs, { value: selectedTab, onChange: (_evt, newValue) => {
19
+ setSelectedTab(newValue);
20
+ }, "aria-label": 'basic tabs example', children: [_jsx(Tab, { label: usersTranslations.details[locale], value: 'DETAILS' }), !hideGroupsSelection && (_jsx(Tab, { label: usersTranslations.userGroups[locale], value: 'USER_GROUPS' })), _jsx(Tab, { label: usersTranslations.credentials[locale], value: 'CREDENTIALS' }), 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(UserDetails, { user: user, onUserUpdate: onUserUpdate, editUsername: editUsername, emailAsUsername: emailAsUsername })), selectedTab === 'USER_GROUPS' && !hideGroupsSelection && (_jsx(UserGroups, { user: user })), selectedTab === 'CREDENTIALS' && _jsx(UserCredentials, { user: user }), additionalTabs.map((tab, index) => selectedTab === `ADDITIONAL_TAB_${index}` && (_jsx(tab.component, { user: user }, `tab${index}`)))] })] }));
31
21
  };
32
22
  export default UserTabs;
@@ -5,7 +5,7 @@ interface ConfigProviderProps {
5
5
  publicRuntimeEnv: Record<string, string>;
6
6
  children: React.ReactNode;
7
7
  }
8
- export declare const ConfigProvider: ({ publicRuntimeEnv, children, }: ConfigProviderProps) => React.JSX.Element;
8
+ export declare const ConfigProvider: ({ publicRuntimeEnv, children, }: ConfigProviderProps) => import("react/jsx-runtime").JSX.Element;
9
9
  export declare const useConfig: () => Config;
10
10
  export {};
11
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAEzD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAGzC,eAAO,MAAM,SAAS,GACpB,kBAAkB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KACvC,MAKD,CAAC;AAQH,UAAU,mBAAmB;IAC3B,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,cAAc,GAAI,iCAG5B,mBAAmB,sBAMrB,CAAC;AAEF,eAAO,MAAM,SAAS,cAAkC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAEzD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAGzC,eAAO,MAAM,SAAS,GACpB,kBAAkB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KACvC,MAKD,CAAC;AAQH,UAAU,mBAAmB;IAC3B,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,cAAc,GAAI,iCAG5B,mBAAmB,4CAMrB,CAAC;AAEF,eAAO,MAAM,SAAS,cAAkC,CAAC"}
@@ -1,5 +1,6 @@
1
1
  'use client';
2
- import React, { createContext, useContext } from 'react';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { createContext, useContext } from 'react';
3
4
  import { languages } from './i18n';
4
5
  export const getConfig = (publicRuntimeEnv) => ({
5
6
  generalProperties: {
@@ -13,6 +14,6 @@ export const getConfig = (publicRuntimeEnv) => ({
13
14
  // read at runtime
14
15
  const ConfigContext = createContext(getConfig({}));
15
16
  export const ConfigProvider = ({ publicRuntimeEnv, children, }) => {
16
- return (React.createElement(ConfigContext.Provider, { value: getConfig(publicRuntimeEnv) }, children));
17
+ return (_jsx(ConfigContext.Provider, { value: getConfig(publicRuntimeEnv), children: children }));
17
18
  };
18
19
  export const useConfig = () => useContext(ConfigContext);