@deix/rossini-identity-management 4.1.1 → 5.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.
Files changed (186) hide show
  1. package/lib/src/app/[locale]/groups/page.d.ts.map +1 -0
  2. package/lib/{app → src/app}/[locale]/layout.d.ts +1 -1
  3. package/lib/src/app/[locale]/layout.d.ts.map +1 -0
  4. package/lib/src/app/[locale]/users/page.d.ts +4 -0
  5. package/lib/src/app/[locale]/users/page.d.ts.map +1 -0
  6. package/lib/{app → src/app}/layout.d.ts +1 -1
  7. package/lib/src/app/layout.d.ts.map +1 -0
  8. package/lib/{components → src/components}/AddItemDialog.d.ts +2 -1
  9. package/lib/src/components/AddItemDialog.d.ts.map +1 -0
  10. package/lib/{components → src/components}/AddItemDialog.js +7 -20
  11. package/lib/{components → src/components}/DeleteConfirmationDialog.d.ts +2 -1
  12. package/lib/src/components/DeleteConfirmationDialog.d.ts.map +1 -0
  13. package/lib/src/components/DeleteConfirmationDialog.js +12 -0
  14. package/lib/{components → src/components}/SearchField.d.ts +2 -1
  15. package/lib/src/components/SearchField.d.ts.map +1 -0
  16. package/lib/{components → src/components}/SearchField.js +5 -3
  17. package/lib/{components → src/components}/groups/CreateGroupDialog.d.ts +2 -1
  18. package/lib/src/components/groups/CreateGroupDialog.d.ts.map +1 -0
  19. package/lib/{components → src/components}/groups/CreateGroupDialog.js +3 -3
  20. package/lib/{components → src/components}/groups/GroupDetails.d.ts +2 -1
  21. package/lib/src/components/groups/GroupDetails.d.ts.map +1 -0
  22. package/lib/{components → src/components}/groups/GroupDetails.js +1 -1
  23. package/lib/{components → src/components}/groups/GroupForm.d.ts +2 -1
  24. package/lib/src/components/groups/GroupForm.d.ts.map +1 -0
  25. package/lib/{components → src/components}/groups/GroupForm.js +4 -4
  26. package/lib/{components → src/components}/groups/GroupTabs.d.ts +1 -1
  27. package/lib/src/components/groups/GroupTabs.d.ts.map +1 -0
  28. package/lib/{components → src/components}/groups/GroupTabs.js +3 -3
  29. package/lib/src/components/groups/GroupUsers.d.ts +8 -0
  30. package/lib/src/components/groups/GroupUsers.d.ts.map +1 -0
  31. package/lib/src/components/groups/GroupUsers.js +46 -0
  32. package/lib/{components → src/components}/groups/Groups.d.ts +2 -1
  33. package/lib/src/components/groups/Groups.d.ts.map +1 -0
  34. package/lib/{components → src/components}/groups/Groups.js +8 -6
  35. package/lib/{components → src/components}/groups/GroupsTable.d.ts +2 -1
  36. package/lib/src/components/groups/GroupsTable.d.ts.map +1 -0
  37. package/lib/{components → src/components}/groups/GroupsTable.js +6 -7
  38. package/lib/src/components/index.d.ts.map +1 -0
  39. package/lib/src/components/tables/Table.d.ts +29 -0
  40. package/lib/src/components/tables/Table.d.ts.map +1 -0
  41. package/lib/src/components/tables/Table.js +96 -0
  42. package/lib/{components → src/components}/users/CreateUserDialog.d.ts +2 -1
  43. package/lib/src/components/users/CreateUserDialog.d.ts.map +1 -0
  44. package/lib/{components → src/components}/users/CreateUserDialog.js +3 -3
  45. package/lib/{components → src/components}/users/UserCredentials.d.ts +2 -1
  46. package/lib/src/components/users/UserCredentials.d.ts.map +1 -0
  47. package/lib/{components → src/components}/users/UserCredentials.js +3 -3
  48. package/lib/{components → src/components}/users/UserDetails.d.ts +2 -1
  49. package/lib/src/components/users/UserDetails.d.ts.map +1 -0
  50. package/lib/{components → src/components}/users/UserDetails.js +1 -1
  51. package/lib/{components → src/components}/users/UserForm.d.ts +2 -1
  52. package/lib/src/components/users/UserForm.d.ts.map +1 -0
  53. package/lib/src/components/users/UserForm.js +48 -0
  54. package/lib/src/components/users/UserGroups.d.ts +8 -0
  55. package/lib/src/components/users/UserGroups.d.ts.map +1 -0
  56. package/lib/{components → src/components}/users/UserGroups.js +6 -8
  57. package/lib/{components → src/components}/users/Users.d.ts +2 -1
  58. package/lib/src/components/users/Users.d.ts.map +1 -0
  59. package/lib/{components → src/components}/users/Users.js +17 -7
  60. package/lib/{components → src/components}/users/UsersTable.d.ts +5 -1
  61. package/lib/src/components/users/UsersTable.d.ts.map +1 -0
  62. package/lib/src/components/users/UsersTable.js +25 -0
  63. package/lib/{components → src/components}/users/UsersTabs.d.ts +1 -1
  64. package/lib/src/components/users/UsersTabs.d.ts.map +1 -0
  65. package/lib/src/components/users/UsersTabs.js +22 -0
  66. package/lib/src/config/i18n.d.ts.map +1 -0
  67. package/lib/{config → src/config}/index.d.ts +1 -1
  68. package/lib/src/config/index.d.ts.map +1 -0
  69. package/lib/src/config/palette.d.ts.map +1 -0
  70. package/lib/src/index.d.ts.map +1 -0
  71. package/lib/src/lang/common.d.ts +6 -0
  72. package/lib/src/lang/common.d.ts.map +1 -0
  73. package/lib/src/lang/common.js +35 -0
  74. package/lib/src/lang/groups.d.ts.map +1 -0
  75. package/lib/{lang → src/lang}/groups.js +4 -0
  76. package/lib/src/lang/home.d.ts.map +1 -0
  77. package/lib/src/lang/tables.d.ts +6 -0
  78. package/lib/src/lang/tables.d.ts.map +1 -0
  79. package/lib/src/lang/tables.js +11 -0
  80. package/lib/src/lang/users.d.ts.map +1 -0
  81. package/lib/{lang → src/lang}/users.js +16 -0
  82. package/lib/src/proxy.d.ts.map +1 -0
  83. package/lib/src/types/config.d.ts.map +1 -0
  84. package/lib/src/types/groups.d.ts.map +1 -0
  85. package/lib/{utils → src/types}/index.d.ts.map +1 -1
  86. package/lib/src/types/tables.d.ts.map +1 -0
  87. package/lib/src/types/users.d.ts.map +1 -0
  88. package/lib/{utils/hooks → src/utils/helpers}/index.d.ts.map +1 -1
  89. package/lib/src/utils/hooks/groups.d.ts.map +1 -0
  90. package/lib/{utils → src/utils}/hooks/groups.js +10 -10
  91. package/lib/{utils/helpers → src/utils/hooks}/index.d.ts.map +1 -1
  92. package/lib/{utils → src/utils}/hooks/useAPIClient.d.ts +1 -1
  93. package/lib/src/utils/hooks/useAPIClient.d.ts.map +1 -0
  94. package/lib/src/utils/hooks/useTranslate.d.ts +6 -0
  95. package/lib/src/utils/hooks/useTranslate.d.ts.map +1 -0
  96. package/lib/src/utils/hooks/useTranslate.js +16 -0
  97. package/lib/src/utils/hooks/users.d.ts.map +1 -0
  98. package/lib/{utils → src/utils}/hooks/users.js +19 -19
  99. package/lib/{types → src/utils}/index.d.ts.map +1 -1
  100. package/lib/tsconfig.tsbuildinfo +1 -1
  101. package/package.json +49 -41
  102. package/lib/app/[locale]/groups/page.d.ts.map +0 -1
  103. package/lib/app/[locale]/layout.d.ts.map +0 -1
  104. package/lib/app/[locale]/users/page.d.ts +0 -3
  105. package/lib/app/[locale]/users/page.d.ts.map +0 -1
  106. package/lib/app/layout.d.ts.map +0 -1
  107. package/lib/components/AddItemDialog.d.ts.map +0 -1
  108. package/lib/components/DeleteConfirmationDialog.d.ts.map +0 -1
  109. package/lib/components/DeleteConfirmationDialog.js +0 -29
  110. package/lib/components/SearchField.d.ts.map +0 -1
  111. package/lib/components/groups/CreateGroupDialog.d.ts.map +0 -1
  112. package/lib/components/groups/GroupDetails.d.ts.map +0 -1
  113. package/lib/components/groups/GroupForm.d.ts.map +0 -1
  114. package/lib/components/groups/GroupTabs.d.ts.map +0 -1
  115. package/lib/components/groups/GroupUsers.d.ts +0 -7
  116. package/lib/components/groups/GroupUsers.d.ts.map +0 -1
  117. package/lib/components/groups/GroupUsers.js +0 -56
  118. package/lib/components/groups/Groups.d.ts.map +0 -1
  119. package/lib/components/groups/GroupsTable.d.ts.map +0 -1
  120. package/lib/components/index.d.ts.map +0 -1
  121. package/lib/components/users/CreateUserDialog.d.ts.map +0 -1
  122. package/lib/components/users/UserCredentials.d.ts.map +0 -1
  123. package/lib/components/users/UserDetails.d.ts.map +0 -1
  124. package/lib/components/users/UserForm.d.ts.map +0 -1
  125. package/lib/components/users/UserForm.js +0 -50
  126. package/lib/components/users/UserGroups.d.ts +0 -7
  127. package/lib/components/users/UserGroups.d.ts.map +0 -1
  128. package/lib/components/users/Users.d.ts.map +0 -1
  129. package/lib/components/users/UsersTable.d.ts.map +0 -1
  130. package/lib/components/users/UsersTable.js +0 -48
  131. package/lib/components/users/UsersTabs.d.ts.map +0 -1
  132. package/lib/components/users/UsersTabs.js +0 -22
  133. package/lib/config/i18n.d.ts.map +0 -1
  134. package/lib/config/index.d.ts.map +0 -1
  135. package/lib/config/palette.d.ts.map +0 -1
  136. package/lib/index.d.ts.map +0 -1
  137. package/lib/lang/groups.d.ts.map +0 -1
  138. package/lib/lang/home.d.ts.map +0 -1
  139. package/lib/lang/users.d.ts.map +0 -1
  140. package/lib/proxy.d.ts.map +0 -1
  141. package/lib/types/config.d.ts.map +0 -1
  142. package/lib/types/groups.d.ts.map +0 -1
  143. package/lib/types/tables.d.ts.map +0 -1
  144. package/lib/types/users.d.ts.map +0 -1
  145. package/lib/utils/hooks/groups.d.ts.map +0 -1
  146. package/lib/utils/hooks/useAPIClient.d.ts.map +0 -1
  147. package/lib/utils/hooks/users.d.ts.map +0 -1
  148. /package/lib/{app → src/app}/[locale]/groups/page.d.ts +0 -0
  149. /package/lib/{app → src/app}/[locale]/groups/page.js +0 -0
  150. /package/lib/{app → src/app}/[locale]/layout.js +0 -0
  151. /package/lib/{app → src/app}/[locale]/users/page.js +0 -0
  152. /package/lib/{app → src/app}/layout.js +0 -0
  153. /package/lib/{components → src/components}/index.d.ts +0 -0
  154. /package/lib/{components → src/components}/index.js +0 -0
  155. /package/lib/{config → src/config}/i18n.d.ts +0 -0
  156. /package/lib/{config → src/config}/i18n.js +0 -0
  157. /package/lib/{config → src/config}/index.js +0 -0
  158. /package/lib/{config → src/config}/palette.d.ts +0 -0
  159. /package/lib/{config → src/config}/palette.js +0 -0
  160. /package/lib/{index.d.ts → src/index.d.ts} +0 -0
  161. /package/lib/{index.js → src/index.js} +0 -0
  162. /package/lib/{lang → src/lang}/groups.d.ts +0 -0
  163. /package/lib/{lang → src/lang}/home.d.ts +0 -0
  164. /package/lib/{lang → src/lang}/home.js +0 -0
  165. /package/lib/{lang → src/lang}/users.d.ts +0 -0
  166. /package/lib/{proxy.d.ts → src/proxy.d.ts} +0 -0
  167. /package/lib/{proxy.js → src/proxy.js} +0 -0
  168. /package/lib/{types → src/types}/config.d.ts +0 -0
  169. /package/lib/{types → src/types}/config.js +0 -0
  170. /package/lib/{types → src/types}/groups.d.ts +0 -0
  171. /package/lib/{types → src/types}/groups.js +0 -0
  172. /package/lib/{types → src/types}/index.d.ts +0 -0
  173. /package/lib/{types → src/types}/index.js +0 -0
  174. /package/lib/{types → src/types}/tables.d.ts +0 -0
  175. /package/lib/{types → src/types}/tables.js +0 -0
  176. /package/lib/{types → src/types}/users.d.ts +0 -0
  177. /package/lib/{types → src/types}/users.js +0 -0
  178. /package/lib/{utils → src/utils}/helpers/index.d.ts +0 -0
  179. /package/lib/{utils → src/utils}/helpers/index.js +0 -0
  180. /package/lib/{utils → src/utils}/hooks/groups.d.ts +0 -0
  181. /package/lib/{utils → src/utils}/hooks/index.d.ts +0 -0
  182. /package/lib/{utils → src/utils}/hooks/index.js +0 -0
  183. /package/lib/{utils → src/utils}/hooks/useAPIClient.js +0 -0
  184. /package/lib/{utils → src/utils}/hooks/users.d.ts +0 -0
  185. /package/lib/{utils → src/utils}/index.d.ts +0 -0
  186. /package/lib/{utils → src/utils}/index.js +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deix/rossini-identity-management",
3
- "version": "4.1.1",
3
+ "version": "5.0.1",
4
4
  "main": "lib/index.js",
5
5
  "repository": {
6
6
  "type": "git",
@@ -21,56 +21,58 @@
21
21
  },
22
22
  "peerDependencies": {
23
23
  "@emotion/react": "^11.14.0",
24
- "@emotion/styled": "^11.14.0",
25
- "@fontsource/raleway": "^5.1.1",
26
- "@mui/icons-material": "^7.2.0",
27
- "@mui/material": "^7.2.0",
28
- "@tanstack/react-query": "^5.66.0",
29
- "@tanstack/react-query-devtools": "^5.66.0",
24
+ "@emotion/styled": "^11.14.1",
25
+ "@fontsource/raleway": "^5.3.0",
26
+ "@mui/icons-material": "^9.4.0",
27
+ "@mui/material": "^9.4.0",
28
+ "@tanstack/react-query": "^5.102.0",
29
+ "@tanstack/react-query-devtools": "^5.102.0",
30
30
  "@types/react": "^19.1.0",
31
31
  "@types/react-dom": "^19.1.1",
32
- "axios": "^1.7.9",
32
+ "axios": "^1.20.0",
33
33
  "next": "^16.0.0",
34
34
  "react": "^19.1.0",
35
35
  "react-dom": "^19.1.0"
36
36
  },
37
37
  "devDependencies": {
38
- "@babel/core": "^7.26.0",
38
+ "@babel/core": "^8.0.6",
39
39
  "@emotion/react": "^11.14.0",
40
- "@emotion/styled": "^11.14.0",
40
+ "@emotion/styled": "^11.14.1",
41
41
  "@eslint/js": "^10.0.1",
42
- "@fontsource/raleway": "^5.1.1",
42
+ "@fontsource/raleway": "^5.3.0",
43
43
  "@mdx-js/loader": "^3.1.0",
44
44
  "@mdx-js/react": "^3.1.0",
45
- "@mui/icons-material": "^7.2.0",
46
- "@mui/material": "^7.2.0",
47
- "@storybook/addon-docs": "^10.0.0",
48
- "@storybook/addon-links": "^10.0.0",
49
- "@storybook/addon-onboarding": "^10.0.0",
45
+ "@mui/icons-material": "^9.4.0",
46
+ "@mui/material": "^9.4.0",
47
+ "@storybook/addon-docs": "^10.6.0",
48
+ "@storybook/addon-links": "^10.6.0",
49
+ "@storybook/addon-onboarding": "^10.6.0",
50
50
  "@storybook/mdx2-csf": "^1.1.0",
51
- "@storybook/nextjs": "^10.0.0",
52
- "@tanstack/react-query": "^5.64.2",
53
- "@tanstack/react-query-devtools": "^5.64.2",
54
- "@types/node": "^24.0.10",
55
- "@types/react": "19.2.7",
56
- "@types/react-dom": "19.2.3",
57
- "axios": "^1.7.9",
58
- "babel-loader": "^10.0.0",
59
- "commitizen": "^4.3.0",
51
+ "@storybook/nextjs-vite": "^10.6.1",
52
+ "@tanstack/react-query": "^5.102.0",
53
+ "@tanstack/react-query-devtools": "^5.102.0",
54
+ "@types/node": "^26.6.2",
55
+ "@types/react": "19.3.0",
56
+ "@types/react-dom": "19.3.0",
57
+ "@typescript/native": "npm:typescript@^7.0.2",
58
+ "axios": "^1.20.0",
59
+ "babel-loader": "^10.1.1",
60
+ "commitizen": "^4.3.2",
60
61
  "cz-conventional-changelog": "^3.3.0",
61
- "eslint": "^10.0.2",
62
+ "eslint": "^10.11.0",
62
63
  "eslint-config-prettier": "^10.1.1",
63
- "eslint-plugin-prettier": "^5.5.5",
64
- "eslint-plugin-storybook": "^10.2.15",
65
- "json-server": "^1.0.0-alpha.21",
66
- "next": "^16.1.4",
67
- "react": "^19.1.0",
64
+ "eslint-plugin-prettier": "^5.5.6",
65
+ "eslint-plugin-storybook": "^10.6.0",
66
+ "json-server": "^1.0.0-beta.15",
67
+ "next": "^16.3.6",
68
+ "react": "^19.3.0",
68
69
  "react-docgen-typescript-plugin": "^1.0.8",
69
- "react-dom": "19.2.3",
70
+ "react-dom": "19.3.0",
70
71
  "remark-mdx": "^3.0.0",
71
- "ts-loader": "^9.5.1",
72
- "typescript": "^5.7.3",
73
- "typescript-eslint": "^8.56.1"
72
+ "ts-loader": "^9.6.2",
73
+ "typescript": "npm:@typescript/typescript6@^6.0.2",
74
+ "typescript-eslint": "^8.70.1",
75
+ "vite": "^8.3.3"
74
76
  },
75
77
  "resolutions": {
76
78
  "@storybook/react-docgen-typescript-plugin": "npm:react-docgen-typescript-plugin@1.0.2"
@@ -84,15 +86,21 @@
84
86
  }
85
87
  },
86
88
  "dependencies": {
87
- "@deix/rossini-core": "^6.2.0",
88
- "@mui/icons-material": "^7.2.0",
89
- "@mui/material": "^7.2.0",
89
+ "@deix/rossini-core": "^7.0.0",
90
+ "@mui/icons-material": "^9.4.0",
91
+ "@mui/material": "^9.4.0",
92
+ "@mui/x-data-grid": "^9.14.0",
90
93
  "notistack": "^3.0.2",
91
- "react-hook-form": "^7.49.3"
94
+ "react-hook-form": "^7.88.0"
92
95
  },
93
96
  "overrides": {
94
97
  "tmp": "^0.2.4",
95
- "@types/react": "19.2.7",
96
- "@types/react-dom": "19.2.3"
98
+ "@types/react": "19.3.0",
99
+ "@types/react-dom": "19.3.0",
100
+ "seroval": "1.6.3"
101
+ },
102
+ "allowScripts": {
103
+ "core-js-pure@3.50.0": true,
104
+ "esbuild@0.28.2": true
97
105
  }
98
106
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../src/app/[locale]/groups/page.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAGvB,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -1 +0,0 @@
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,3 +0,0 @@
1
- declare const UsersPage: () => import("react/jsx-runtime").JSX.Element;
2
- export default UsersPage;
3
- //# sourceMappingURL=page.d.ts.map
@@ -1 +0,0 @@
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 +0,0 @@
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"}
@@ -1 +0,0 @@
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 +0,0 @@
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,29 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Button, Dialog, DialogActions, DialogContent, DialogTitle, Typography, } from '@mui/material';
3
- import { useLocale } from '@deix/rossini-core';
4
- const translations = {
5
- title: {
6
- en: 'Delete item?',
7
- it: 'Cancellare elemento?',
8
- },
9
- message: {
10
- en: 'This is a permanent action',
11
- it: "Questa è un'azione permanente",
12
- },
13
- yes: {
14
- en: 'Yes',
15
- it: 'Si',
16
- },
17
- no: {
18
- en: 'No',
19
- it: 'No',
20
- },
21
- };
22
- const DeleteConfirmationDialog = ({ open, onClose, onConfirm, }) => {
23
- const locale = useLocale();
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] })] })] }));
28
- };
29
- export default DeleteConfirmationDialog;
@@ -1 +0,0 @@
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 +0,0 @@
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 +0,0 @@
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 +0,0 @@
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 +0,0 @@
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,7 +0,0 @@
1
- import { Group } from '../../types/groups';
2
- interface GroupUsersProps {
3
- group: Group;
4
- }
5
- declare const GroupUsers: ({ group }: GroupUsersProps) => import("react/jsx-runtime").JSX.Element;
6
- export default GroupUsers;
7
- //# sourceMappingURL=GroupUsers.d.ts.map
@@ -1 +0,0 @@
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,56 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { Box, Button, IconButton, Table, TableBody, TableCell, TableContainer, TableHead, TableRow, } from '@mui/material';
3
- import AddIcon from '@mui/icons-material/Add';
4
- import DeleteIcon from '@mui/icons-material/Delete';
5
- import { isStringTranslation, useLocale } from '@deix/rossini-core';
6
- import { useAddUserToGroup, useRemoveUserFromGroup, useUsers, } from '../../utils/hooks/users';
7
- import { useState } from 'react';
8
- import DeleteConfirmationDialog from '../DeleteConfirmationDialog';
9
- import { useQueryClient } from '@tanstack/react-query';
10
- import AddItemDialog from '../AddItemDialog';
11
- import { useGroupUsers } from '../../utils/hooks/groups';
12
- import groupsTranslations from '../../lang/groups';
13
- import { useAPIClient } from '../../utils/hooks/useAPIClient';
14
- const groupUsersTableColumns = [
15
- {
16
- id: 'username',
17
- label: { en: 'Username', it: 'Username' },
18
- },
19
- {
20
- id: 'firstName',
21
- label: { en: 'First name', it: 'Nome' },
22
- },
23
- {
24
- id: 'lastName',
25
- label: { en: 'Last name', it: 'Cognome' },
26
- },
27
- ];
28
- const GroupUsers = ({ group }) => {
29
- const locale = useLocale();
30
- const apiClient = useAPIClient();
31
- const queryClient = useQueryClient();
32
- const { data: users } = useUsers(apiClient);
33
- const { data: groupUsers } = useGroupUsers(group?.id, apiClient);
34
- const { mutate: addUserToGroup } = useAddUserToGroup(queryClient, apiClient);
35
- const { mutate: removeUserFromGroup } = useRemoveUserFromGroup(queryClient, apiClient);
36
- const [openAddUserDialog, setOpenAddUserDialog] = useState(false);
37
- const [openConfirmationDialog, setOpenConfirmationDialog] = useState(false);
38
- const [deleteId, setDeleteId] = useState();
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
- : {} })] }));
55
- };
56
- export default GroupUsers;
@@ -1 +0,0 @@
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 +0,0 @@
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 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,4BAA4B,CAAC"}
@@ -1 +0,0 @@
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 +0,0 @@
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 +0,0 @@
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 +0,0 @@
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,50 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useLocale } from '@deix/rossini-core';
3
- import { Button, FormControlLabel, Grid, Switch, TextField, } from '@mui/material';
4
- import { Controller, useForm } from 'react-hook-form';
5
- import { useEffect } from 'react';
6
- import usersTranslations from '../../lang/users';
7
- const UserForm = ({ user, onSave, onCancel, mode = 'create', editUsername, emailAsUsername = false, }) => {
8
- const locale = useLocale();
9
- const { control, formState: { errors }, handleSubmit, setValue, } = useForm({
10
- defaultValues: {
11
- id: user?.id,
12
- username: user?.username || '',
13
- firstName: user?.firstName || '',
14
- lastName: user?.lastName || '',
15
- email: user?.email || '',
16
- emailVerified: user?.emailVerified || true,
17
- enabled: user?.enabled || true,
18
- sendEmailOnCreation: true,
19
- },
20
- });
21
- useEffect(() => {
22
- if (user) {
23
- setValue('id', user?.id);
24
- if (!emailAsUsername) {
25
- setValue('username', user?.username);
26
- }
27
- setValue('firstName', user?.firstName);
28
- setValue('lastName', user?.lastName);
29
- setValue('email', user?.email);
30
- setValue('emailVerified', user?.emailVerified);
31
- setValue('enabled', user?.enabled);
32
- setValue('groups', user?.groups);
33
- // The user already exists, we don't want to send an email
34
- setValue('sendEmailOnCreation', false);
35
- }
36
- }, [user, setValue]);
37
- const onSubmit = (data) => {
38
- onSave(data);
39
- };
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] })] })] }) }));
49
- };
50
- export default UserForm;
@@ -1,7 +0,0 @@
1
- import { User } from '../../types/users';
2
- interface UserGroupsProps {
3
- user: User;
4
- }
5
- declare const UserGroups: ({ user }: UserGroupsProps) => import("react/jsx-runtime").JSX.Element;
6
- export default UserGroups;
7
- //# sourceMappingURL=UserGroups.d.ts.map
@@ -1 +0,0 @@
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 +0,0 @@
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 +0,0 @@
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,48 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { isStringTranslation, useLocale } from '@deix/rossini-core';
3
- import CheckIcon from '@mui/icons-material/Check';
4
- import CloseIcon from '@mui/icons-material/Close';
5
- import DeleteIcon from '@mui/icons-material/Delete';
6
- import { IconButton, Table, TableBody, TableCell, TableContainer, TableHead, TableRow, useTheme, } from '@mui/material';
7
- import { useState } from 'react';
8
- import DeleteConfirmationDialog from '../DeleteConfirmationDialog';
9
- const usersTableColumns = [
10
- {
11
- id: 'firstName',
12
- label: { en: 'First Name', it: 'Nome' },
13
- },
14
- {
15
- id: 'lastName',
16
- label: { en: 'Last Name', it: 'Cognome' },
17
- },
18
- {
19
- id: 'username',
20
- label: { en: 'Username', it: 'Username' },
21
- },
22
- { id: 'email', label: 'Email' },
23
- {
24
- id: 'enabled',
25
- label: { en: 'Enabled', it: 'Utente Abilitato' },
26
- },
27
- ];
28
- const UsersTable = ({ users = [], selectedUser, setSelectedUser, onDelete, emailAsUsername = false, disableDelete = false, }) => {
29
- const locale = useLocale();
30
- const muiTheme = useTheme();
31
- const [openConfirmationDialog, setOpenConfirmationDialog] = useState(false);
32
- const [deleteUser, setDeleteUser] = useState();
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) : {}) })] }));
47
- };
48
- export default UsersTable;
@@ -1 +0,0 @@
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,22 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { useState } from 'react';
4
- import { Box, Tab, Tabs } from '@mui/material';
5
- import { useLocale } from '@deix/rossini-core';
6
- import usersTranslations from '../../lang/users';
7
- import UserDetails from './UserDetails';
8
- import UserGroups from './UserGroups';
9
- import UserCredentials from './UserCredentials';
10
- const UserTabs = ({ user, additionalTabs = [], onUserUpdate, editUsername, emailAsUsername = false, hideGroupsSelection = false, }) => {
11
- const locale = useLocale();
12
- const [selectedTab, setSelectedTab] = useState('DETAILS');
13
- return (_jsxs(Box, { sx: {
14
- flexGrow: 1,
15
- maxWidth: '100%',
16
- overflowX: 'hidden',
17
- alignSelf: 'stretch',
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}`)))] })] }));
21
- };
22
- export default UserTabs;
@@ -1 +0,0 @@
1
- {"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../src/config/i18n.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,eAAO,MAAM,SAAS,EAAE,QAAQ,EAa/B,CAAC"}
@@ -1 +0,0 @@
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 +0,0 @@
1
- {"version":3,"file":"palette.d.ts","sourceRoot":"","sources":["../../src/config/palette.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,sCAAsC,CAAC;AAE9C,eAAO,MAAM,YAAY,EAAE,cAyC1B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,cAsCzB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAC/D,YAAY,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC1C,YAAY,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AAC5F,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,4BAA4B,CAAC;AACtE,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"groups.d.ts","sourceRoot":"","sources":["../../src/lang/groups.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,QAAA,MAAM,kBAAkB,EAqEnB;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,iBAAiB,CAAA;CAAE,CAAC;AAE1C,eAAe,kBAAkB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"home.d.ts","sourceRoot":"","sources":["../../src/lang/home.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,QAAA,MAAM,gBAAgB,EASjB;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,iBAAiB,CAAA;CAAE,CAAC;AAE1C,eAAe,gBAAgB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../src/lang/users.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,QAAA,MAAM,iBAAiB,EA6HlB;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,iBAAiB,CAAA;CAAE,CAAC;AAE1C,eAAe,iBAAiB,CAAC"}
@@ -1 +0,0 @@
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"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/types/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,MAAM,WAAW,MAAM;IACrB,iBAAiB,EAAE;QACjB,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,SAAS,EAAE,QAAQ,EAAE,CAAC;CACvB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"groups.d.ts","sourceRoot":"","sources":["../../src/types/groups.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,KAAK;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"tables.d.ts","sourceRoot":"","sources":["../../src/types/tables.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,GAAG,iBAAiB,CAAC;IAClC,KAAK,CAAC,EAAE,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;IAC5D,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;CAC1C"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../src/types/users.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"groups.d.ts","sourceRoot":"","sources":["../../../src/utils/hooks/groups.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,cAAc,EAGf,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAGtC,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAUzC,eAAO,MAAM,SAAS,GACpB,WAAW,aAAa,KACvB,cAAc,CAAC,KAAK,EAAE,GAAG,SAAS,EAAE,KAAK,CAM3C,CAAC;AAcF,eAAO,MAAM,WAAW,GACtB,aAAa,WAAW,EACxB,WAAW,aAAa,oDA6BzB,CAAC;AAiBF,eAAO,MAAM,cAAc,GACzB,aAAa,WAAW,EACxB,WAAW,aAAa,oDA8BzB,CAAC;AAgBF,eAAO,MAAM,cAAc,GACzB,aAAa,WAAW,EACxB,WAAW,aAAa,6EA6BzB,CAAC;AAgBF,eAAO,MAAM,aAAa,GACxB,IAAI,MAAM,GAAG,SAAS,EACtB,WAAW,aAAa,KACvB,cAAc,CAAC,IAAI,EAAE,GAAG,SAAS,EAAE,KAAK,CAM1C,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"useAPIClient.d.ts","sourceRoot":"","sources":["../../../src/utils/hooks/useAPIClient.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,KAAoC,MAAM,OAAO,CAAC;AAUzD,UAAU,sBAAsB;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,iBAAiB,GAAI,wBAG/B,sBAAsB,4CAaxB,CAAC;AAEF,eAAO,MAAM,YAAY,qBAA+B,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../../src/utils/hooks/users.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,cAAc,EAGf,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAGtC,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAGjE,eAAO,MAAM,QAAQ,GACnB,WAAW,aAAa,EACxB,WAAW,MAAM,EACjB,QAAQ,MAAM,EACd,SAAQ,MAAU,EAClB,QAAO,MAAa,oBAqBrB,CAAC;AAEF,eAAO,MAAM,QAAQ,GACnB,WAAW,aAAa,EACxB,QAAQ,MAAM,EACd,SAAQ,MAAU,EAClB,QAAO,MAAa,KACnB,cAAc,CAAC,IAAI,EAAE,GAAG,SAAS,EAAE,KAAK,CAW1C,CAAC;AAQF,eAAO,MAAM,OAAO,GAClB,IAAI,MAAM,EACV,WAAW,aAAa,KACvB,cAAc,CAAC,IAAI,GAAG,SAAS,EAAE,KAAK,CAMxC,CAAC;AAGF,eAAO,MAAM,OAAO,GAAU,sDAK3B;IACD,OAAO,EAAE,IAAI,CAAC;IACd,mBAAmB,EAAE,OAAO,CAAC;IAC7B,SAAS,EAAE,aAAa,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB,kBAWA,CAAC;AAEF,eAAO,MAAM,UAAU,GACrB,aAAa,WAAW,EACxB,WAAW,aAAa;UAQd,cAAc;YACZ,MAAM,EAAE,GAAG,SAAS;WA6BjC,CAAC;AAiBF,eAAO,MAAM,aAAa,GACxB,aAAa,WAAW,EACxB,WAAW,aAAa,kFA6BzB,CAAC;AAgBF,eAAO,MAAM,aAAa,GACxB,aAAa,WAAW,EACxB,WAAW,aAAa,4GA6BzB,CAAC;AAcF,eAAO,MAAM,aAAa,GACxB,IAAI,MAAM,GAAG,SAAS,EACtB,WAAW,aAAa,KACvB,cAAc,CAAC,KAAK,EAAE,GAAG,SAAS,EAAE,KAAK,CAM3C,CAAC;AAmBF,eAAO,MAAM,iBAAiB,GAC5B,aAAa,WAAW,EACxB,WAAW,aAAa;;;;YAIsB,MAAM;aAAW,MAAM;WA8BtE,CAAC;AAmBF,eAAO,MAAM,sBAAsB,GACjC,aAAa,WAAW,EACxB,WAAW,aAAa;;;;YAIsB,MAAM;aAAW,MAAM;WA8BtE,CAAC;AAkBF,eAAO,MAAM,0BAA0B,GACrC,aAAa,WAAW,EACxB,WAAW,aAAa;;0BAoBzB,CAAC;AAEF,eAAO,MAAM,aAAa,GACxB,WAAW,aAAa,EACxB,WAAW,MAAM,EACjB,QAAQ,MAAM,oBAmBf,CAAC;AAEF,eAAO,MAAM,aAAa,GACxB,WAAW,aAAa,EACxB,QAAQ,MAAM,KACb,cAAc,CAAC,MAAM,GAAG,SAAS,EAAE,KAAK,CAM1C,CAAC"}
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes