@firecms/user_management 3.0.0 → 3.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.
@@ -2,3 +2,4 @@ export * from "./RoleChip";
2
2
  export * from "./RolesDetailsForm";
3
3
  export * from "./RolesTable";
4
4
  export * from "./RolesView";
5
+ export * from "./default_roles";
package/dist/index.es.js CHANGED
@@ -618,7 +618,7 @@ function RolesDetailsForm(t0) {
618
618
  React.useEffect(t5, t6);
619
619
  let t7;
620
620
  let t8;
621
- if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
621
+ if ($[18] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
622
622
  t7 = {
623
623
  display: "flex",
624
624
  flexDirection: "column",
@@ -713,7 +713,7 @@ function RolesDetailsForm(t0) {
713
713
  t21 = $[42];
714
714
  }
715
715
  let t22;
716
- if ($[43] === Symbol.for("react.memo_cache_sentinel")) {
716
+ if ($[43] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
717
717
  t22 = /* @__PURE__ */ jsxs(TableHeader, { className: "rounded-md", children: [
718
718
  /* @__PURE__ */ jsx(TableCell, {}),
719
719
  /* @__PURE__ */ jsx(TableCell, { align: "center", children: "Create entities" }),
@@ -727,7 +727,7 @@ function RolesDetailsForm(t0) {
727
727
  t22 = $[43];
728
728
  }
729
729
  let t23;
730
- if ($[44] === Symbol.for("react.memo_cache_sentinel")) {
730
+ if ($[44] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
731
731
  t23 = /* @__PURE__ */ jsx(TableCell, { scope: "row", children: /* @__PURE__ */ jsx("strong", { children: "All collections" }) });
732
732
  $[44] = t23;
733
733
  } else {
@@ -814,7 +814,7 @@ function RolesDetailsForm(t0) {
814
814
  t39 = $[68];
815
815
  }
816
816
  let t40;
817
- if ($[69] === Symbol.for("react.memo_cache_sentinel")) {
817
+ if ($[69] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
818
818
  t40 = /* @__PURE__ */ jsx(TableCell, { align: "center" });
819
819
  $[69] = t40;
820
820
  } else {
@@ -882,7 +882,7 @@ function RolesDetailsForm(t0) {
882
882
  t43 = $[87];
883
883
  }
884
884
  let t44;
885
- if ($[88] === Symbol.for("react.memo_cache_sentinel")) {
885
+ if ($[88] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
886
886
  t44 = /* @__PURE__ */ jsx(FieldCaption, { children: "You can customise the permissions that the users related to this role can perform in the entities of each collection" });
887
887
  $[88] = t44;
888
888
  } else {
@@ -912,7 +912,7 @@ function RolesDetailsForm(t0) {
912
912
  const t49 = isAdmin || values_0.config?.createCollections ? "true" : "false";
913
913
  let t50;
914
914
  let t51;
915
- if ($[93] === Symbol.for("react.memo_cache_sentinel")) {
915
+ if ($[93] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
916
916
  t50 = /* @__PURE__ */ jsx(SelectItem, { value: "true", children: " Yes " });
917
917
  t51 = /* @__PURE__ */ jsx(SelectItem, { value: "false", children: " No " });
918
918
  $[93] = t50;
@@ -970,7 +970,7 @@ function RolesDetailsForm(t0) {
970
970
  let t60;
971
971
  let t61;
972
972
  let t62;
973
- if ($[107] === Symbol.for("react.memo_cache_sentinel")) {
973
+ if ($[107] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
974
974
  t60 = /* @__PURE__ */ jsx(SelectItem, { value: "true", children: " Yes " });
975
975
  t61 = /* @__PURE__ */ jsx(SelectItem, { value: "false", children: " No " });
976
976
  t62 = /* @__PURE__ */ jsx(SelectItem, { value: "own", children: " Only his/her own " });
@@ -1032,7 +1032,7 @@ function RolesDetailsForm(t0) {
1032
1032
  let t71;
1033
1033
  let t72;
1034
1034
  let t73;
1035
- if ($[122] === Symbol.for("react.memo_cache_sentinel")) {
1035
+ if ($[122] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
1036
1036
  t71 = /* @__PURE__ */ jsx(SelectItem, { value: "true", children: " Yes " });
1037
1037
  t72 = /* @__PURE__ */ jsx(SelectItem, { value: "false", children: " No " });
1038
1038
  t73 = /* @__PURE__ */ jsx(SelectItem, { value: "own", children: " Only his/her own " });
@@ -1247,7 +1247,7 @@ function RolesTable(t0) {
1247
1247
  const [roleToBeDeleted, setRoleToBeDeleted] = useState(void 0);
1248
1248
  const [deleteInProgress, setDeleteInProgress] = useState(false);
1249
1249
  let t1;
1250
- if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
1250
+ if ($[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
1251
1251
  t1 = /* @__PURE__ */ jsxs(TableHeader, { children: [
1252
1252
  /* @__PURE__ */ jsx(TableCell, { header: true, className: "w-16" }),
1253
1253
  /* @__PURE__ */ jsx(TableCell, { header: true, children: "Role" }),
@@ -1345,7 +1345,7 @@ function RolesTable(t0) {
1345
1345
  let t7;
1346
1346
  let t8;
1347
1347
  let t9;
1348
- if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
1348
+ if ($[15] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
1349
1349
  t7 = () => {
1350
1350
  setRoleToBeDeleted(void 0);
1351
1351
  };
@@ -1394,7 +1394,7 @@ const RolesView = React.memo(function RolesView2(t0) {
1394
1394
  const [dialogOpen, setDialogOpen] = useState(false);
1395
1395
  const [selectedRole, setSelectedRole] = useState();
1396
1396
  let t1;
1397
- if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
1397
+ if ($[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
1398
1398
  t1 = (user) => {
1399
1399
  setDialogOpen(true);
1400
1400
  setSelectedRole(user);
@@ -1405,7 +1405,7 @@ const RolesView = React.memo(function RolesView2(t0) {
1405
1405
  }
1406
1406
  const onRoleClicked = t1;
1407
1407
  let t2;
1408
- if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
1408
+ if ($[1] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
1409
1409
  t2 = () => {
1410
1410
  setSelectedRole(void 0);
1411
1411
  setDialogOpen(false);
@@ -1416,7 +1416,7 @@ const RolesView = React.memo(function RolesView2(t0) {
1416
1416
  }
1417
1417
  const handleClose = t2;
1418
1418
  let t3;
1419
- if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
1419
+ if ($[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
1420
1420
  t3 = /* @__PURE__ */ jsx(Typography, { gutterBottom: true, variant: "h4", className: "flex-grow", component: "h4", children: "Roles" });
1421
1421
  $[2] = t3;
1422
1422
  } else {
@@ -1424,7 +1424,7 @@ const RolesView = React.memo(function RolesView2(t0) {
1424
1424
  }
1425
1425
  let t4;
1426
1426
  let t5;
1427
- if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
1427
+ if ($[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
1428
1428
  t4 = /* @__PURE__ */ jsxs("div", { className: "flex items-center mt-12", children: [
1429
1429
  t3,
1430
1430
  /* @__PURE__ */ jsx(Button, { size: "large", startIcon: /* @__PURE__ */ jsx(AddIcon, {}), onClick: () => setDialogOpen(true), children: "Add role" })
@@ -1590,7 +1590,7 @@ function UserDetailsForm(t0) {
1590
1590
  }
1591
1591
  let t6;
1592
1592
  let t7;
1593
- if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
1593
+ if ($[18] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
1594
1594
  t6 = {
1595
1595
  display: "flex",
1596
1596
  flexDirection: "column",
@@ -1830,7 +1830,7 @@ function UsersTable(t0) {
1830
1830
  const [userToBeDeleted, setUserToBeDeleted] = useState(void 0);
1831
1831
  const [deleteInProgress, setDeleteInProgress] = useState(false);
1832
1832
  let t1;
1833
- if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
1833
+ if ($[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
1834
1834
  t1 = /* @__PURE__ */ jsxs(TableHeader, { children: [
1835
1835
  /* @__PURE__ */ jsx(TableCell, { className: "truncate w-16" }),
1836
1836
  /* @__PURE__ */ jsx(TableCell, { children: "Email" }),
@@ -1954,7 +1954,7 @@ function UsersTable(t0) {
1954
1954
  let t7;
1955
1955
  let t8;
1956
1956
  let t9;
1957
- if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
1957
+ if ($[18] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
1958
1958
  t7 = () => {
1959
1959
  setUserToBeDeleted(void 0);
1960
1960
  };
@@ -2005,7 +2005,7 @@ const UsersView = function UsersView2(t0) {
2005
2005
  const [newFormKey, setNewFormKey] = useState(0);
2006
2006
  useUserManagement();
2007
2007
  let t1;
2008
- if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
2008
+ if ($[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
2009
2009
  t1 = (user) => {
2010
2010
  setSelectedUser(user);
2011
2011
  setDialogOpen(true);
@@ -2016,7 +2016,7 @@ const UsersView = function UsersView2(t0) {
2016
2016
  }
2017
2017
  const onUserClicked = t1;
2018
2018
  let t2;
2019
- if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
2019
+ if ($[1] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
2020
2020
  t2 = () => {
2021
2021
  setDialogOpen(false);
2022
2022
  setSelectedUser(void 0);
@@ -2027,7 +2027,7 @@ const UsersView = function UsersView2(t0) {
2027
2027
  }
2028
2028
  const handleClose = t2;
2029
2029
  let t3;
2030
- if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
2030
+ if ($[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
2031
2031
  t3 = () => {
2032
2032
  setSelectedUser(void 0);
2033
2033
  setNewFormKey(_temp);
@@ -2039,7 +2039,7 @@ const UsersView = function UsersView2(t0) {
2039
2039
  }
2040
2040
  const handleAddUser = t3;
2041
2041
  let t4;
2042
- if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
2042
+ if ($[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
2043
2043
  t4 = /* @__PURE__ */ jsx(Typography, { gutterBottom: true, variant: "h4", className: "flex-grow", component: "h4", children: "Users" });
2044
2044
  $[3] = t4;
2045
2045
  } else {
@@ -2047,7 +2047,7 @@ const UsersView = function UsersView2(t0) {
2047
2047
  }
2048
2048
  let t5;
2049
2049
  let t6;
2050
- if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
2050
+ if ($[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
2051
2051
  t5 = /* @__PURE__ */ jsxs("div", { className: "flex items-center mt-12", children: [
2052
2052
  t4,
2053
2053
  /* @__PURE__ */ jsx(Button, { size: "large", startIcon: /* @__PURE__ */ jsx(AddIcon, {}), onClick: handleAddUser, children: "Add user" })
@@ -2170,7 +2170,7 @@ function IntroWidget(t0) {
2170
2170
  const buttonLabel = noUsers && noRoles ? "Create default roles and add current user as admin" : noUsers ? "Add current user as admin" : noRoles ? "Create default roles" : void 0;
2171
2171
  let t1;
2172
2172
  let t2;
2173
- if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
2173
+ if ($[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
2174
2174
  t1 = /* @__PURE__ */ jsx(Typography, { variant: "subtitle2", className: "uppercase", children: "Create your users and roles" });
2175
2175
  t2 = /* @__PURE__ */ jsx(Typography, { children: "You have no users or roles defined. You can create default roles and add the current user as admin." });
2176
2176
  $[0] = t1;
@@ -2231,7 +2231,7 @@ function IntroWidget(t0) {
2231
2231
  t3 = $[12];
2232
2232
  }
2233
2233
  let t4;
2234
- if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
2234
+ if ($[13] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
2235
2235
  t4 = /* @__PURE__ */ jsx(AddIcon, {});
2236
2236
  $[13] = t4;
2237
2237
  } else {
@@ -2269,6 +2269,7 @@ const userManagementAdminViews = [{
2269
2269
  view: /* @__PURE__ */ jsx(RolesView, {})
2270
2270
  }];
2271
2271
  export {
2272
+ DEFAULT_ROLES,
2272
2273
  IntroWidget,
2273
2274
  RESERVED_GROUPS,
2274
2275
  RoleChip,