@deix/rossini-identity-management 3.2.0 → 4.0.1
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/LICENSE +8 -0
- 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 +17 -14
- package/lib/middleware.d.ts +0 -5
- package/lib/middleware.d.ts.map +0 -1
|
@@ -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 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 (
|
|
13
|
+
return (_jsxs(Box, { sx: {
|
|
13
14
|
flexGrow: 1,
|
|
14
15
|
maxWidth: '100%',
|
|
15
16
|
overflowX: 'hidden',
|
|
16
17
|
alignSelf: 'stretch',
|
|
17
|
-
} },
|
|
18
|
-
|
|
19
|
-
|
|
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;
|
package/lib/config/index.d.ts
CHANGED
|
@@ -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) =>
|
|
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,
|
|
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"}
|
package/lib/config/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import
|
|
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 (
|
|
17
|
+
return (_jsx(ConfigContext.Provider, { value: getConfig(publicRuntimeEnv), children: children }));
|
|
17
18
|
};
|
|
18
19
|
export const useConfig = () => useContext(ConfigContext);
|
package/lib/proxy.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proxy.d.ts","sourceRoot":"","sources":["../src/proxy.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,KAAK,6FAAmD,CAAC;AAEtE,eAAO,MAAM,MAAM;;CAGlB,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { createI18nMiddleware } from '@deix/rossini-core/lib/utils/middleware';
|
|
|
2
2
|
import { languages } from './config/i18n';
|
|
3
3
|
const locales = languages.map((language) => language.id);
|
|
4
4
|
const defaultLocale = 'it';
|
|
5
|
-
export const
|
|
5
|
+
export const proxy = createI18nMiddleware({ locales, defaultLocale });
|
|
6
6
|
export const config = {
|
|
7
7
|
// Matcher ignoring `/_next/` and `/api/`
|
|
8
8
|
matcher: ['/((?!api|_next/static|_next/image|favicon.ico|images).*)'],
|