@firecms/user_management 3.0.0-3.0.0-beta.4.pre.1.0 → 3.0.0-3.0.0-canary.27.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 (39) hide show
  1. package/dist/UserManagementProvider.d.ts +4 -3
  2. package/dist/components/roles/RoleChip.d.ts +1 -1
  3. package/dist/components/roles/RolesDetailsForm.d.ts +1 -2
  4. package/dist/components/roles/RolesTable.d.ts +1 -1
  5. package/dist/components/roles/default_roles.d.ts +1 -1
  6. package/dist/components/users/UserDetailsForm.d.ts +2 -2
  7. package/dist/components/users/UsersTable.d.ts +2 -2
  8. package/dist/hooks/useBuildFirestoreUserManagement.d.ts +1 -3
  9. package/dist/hooks/useUserManagement.d.ts +3 -2
  10. package/dist/index.es.js +461 -443
  11. package/dist/index.es.js.map +1 -1
  12. package/dist/index.umd.js +1 -1
  13. package/dist/index.umd.js.map +1 -1
  14. package/dist/types/index.d.ts +1 -2
  15. package/dist/types/persisted_user.d.ts +5 -0
  16. package/dist/types/user_management.d.ts +12 -10
  17. package/dist/utils/permissions.d.ts +3 -4
  18. package/package.json +8 -9
  19. package/src/UserManagementProvider.tsx +4 -3
  20. package/src/components/roles/RoleChip.tsx +1 -1
  21. package/src/components/roles/RolesDetailsForm.tsx +1 -2
  22. package/src/components/roles/RolesTable.tsx +1 -2
  23. package/src/components/roles/RolesView.tsx +1 -2
  24. package/src/components/roles/default_roles.tsx +1 -1
  25. package/src/components/users/UserDetailsForm.tsx +14 -13
  26. package/src/components/users/UsersTable.tsx +9 -10
  27. package/src/components/users/UsersView.tsx +3 -3
  28. package/src/hooks/useBuildFirestoreUserManagement.tsx +53 -23
  29. package/src/hooks/useUserManagement.tsx +3 -3
  30. package/src/types/index.ts +1 -2
  31. package/src/types/persisted_user.ts +6 -0
  32. package/src/types/user_management.tsx +14 -11
  33. package/src/useUserManagementPlugin.tsx +2 -2
  34. package/src/utils/permissions.ts +7 -5
  35. package/dist/types/firecms_user.d.ts +0 -7
  36. package/dist/types/roles.d.ts +0 -31
  37. package/src/types/firecms_user.ts +0 -8
  38. package/src/types/roles.ts +0 -41
  39. package/tailwind.config.js +0 -68
package/dist/index.es.js CHANGED
@@ -1,19 +1,22 @@
1
- import A, { useRef as Se, useEffect as Z, useCallback as E, useContext as Ie, useState as F } from "react";
2
- import { getFirestore as ee, onSnapshot as le, collection as se, setDoc as ae, doc as G, deleteDoc as ce } from "firebase/firestore";
3
- import { jsx as e, jsxs as s, Fragment as H } from "react/jsx-runtime";
4
- import { getColorSchemeForSeed as ke, Chip as Ee, Dialog as de, DialogContent as ue, Typography as _, TextField as K, Paper as Pe, Table as ie, TableHeader as re, TableCell as a, TableBody as oe, TableRow as M, Tooltip as L, Checkbox as P, Select as ne, SelectItem as T, DialogActions as me, Button as q, LoadingButton as he, DoneIcon as fe, IconButton as ge, DeleteIcon as pe, CenteredView as Ce, Container as ve, AddIcon as we, MultiSelect as Ae, MultiSelectItem as Fe } from "@firecms/ui";
5
- import * as V from "yup";
6
- import { toSnakeCase as Te, FieldCaption as B, DeleteConfirmationDialog as ye, useNavigationController as Be, useSnackbarController as be, useAuthController as Le, useCustomizationController as Ve, defaultDateFormat as _e } from "@firecms/core";
7
- import { useCreateFormex as Ne, getIn as j, Formex as xe } from "@firecms/formex";
8
- import { format as Oe } from "date-fns";
9
- import * as $e from "date-fns/locale";
10
- const hn = ["Admin"], Me = {
1
+ import A, { useRef as Ee, useEffect as Z, useCallback as k, useContext as Ae, useState as P } from "react";
2
+ import { getFirestore as ee, onSnapshot as ae, collection as ne, setDoc as ce, doc as G, addDoc as Pe, deleteDoc as de } from "firebase/firestore";
3
+ import { jsx as e, jsxs as l, Fragment as H } from "react/jsx-runtime";
4
+ import { getColorSchemeForSeed as Fe, Chip as Te, Dialog as ue, DialogContent as me, Typography as O, TextField as K, Paper as Be, Table as re, TableHeader as oe, TableCell as a, TableBody as le, TableRow as q, Tooltip as V, Checkbox as E, Select as te, SelectItem as T, DialogActions as he, Button as Y, LoadingButton as fe, DoneIcon as ge, IconButton as pe, DeleteIcon as Ce, CenteredView as ve, Container as we, AddIcon as ye, MultiSelect as Le, MultiSelectItem as Ve } from "@firecms/ui";
5
+ import * as _ from "yup";
6
+ import { toSnakeCase as _e, FieldCaption as B, DeleteConfirmationDialog as be, useNavigationController as Oe, useSnackbarController as Ne, useAuthController as Re, useCustomizationController as $e, defaultDateFormat as Me } from "@firecms/core";
7
+ import { useCreateFormex as xe, getIn as j, Formex as De } from "@firecms/formex";
8
+ import { format as qe } from "date-fns";
9
+ import * as Ye from "date-fns/locale";
10
+ const pn = ["Admin"], We = {
11
11
  read: !1,
12
12
  edit: !1,
13
13
  create: !1,
14
14
  delete: !1
15
15
  };
16
- function qe({ collection: t, user: i }) {
16
+ function je({
17
+ collection: t,
18
+ user: i
19
+ }) {
17
20
  const n = i?.roles;
18
21
  if (n) {
19
22
  if (t.ownerId === i?.uid)
@@ -24,49 +27,49 @@ function qe({ collection: t, user: i }) {
24
27
  delete: !0
25
28
  };
26
29
  {
27
- const d = {
30
+ const c = {
28
31
  read: !1,
29
32
  create: !1,
30
33
  edit: !1,
31
34
  delete: !1
32
35
  };
33
- return n.map((r) => Ye(r, t.id)).reduce(te, d);
36
+ return n.map((r) => ze(r, t.id)).reduce(ie, c);
34
37
  }
35
38
  } else
36
- return Me;
39
+ return We;
37
40
  }
38
- function Ye(t, i) {
41
+ function ze(t, i) {
39
42
  const n = {
40
43
  read: t.isAdmin || t.defaultPermissions?.read,
41
44
  create: t.isAdmin || t.defaultPermissions?.create,
42
45
  edit: t.isAdmin || t.defaultPermissions?.edit,
43
46
  delete: t.isAdmin || t.defaultPermissions?.delete
44
47
  };
45
- return t.collectionPermissions && t.collectionPermissions[i] ? te(t.collectionPermissions[i], n) : t.defaultPermissions ? te(t.defaultPermissions, n) : n;
48
+ return t.collectionPermissions && t.collectionPermissions[i] ? ie(t.collectionPermissions[i], n) : t.defaultPermissions ? ie(t.defaultPermissions, n) : n;
46
49
  }
47
- const te = (t, i) => ({
50
+ const ie = (t, i) => ({
48
51
  read: t.read || i.read,
49
52
  create: t.create || i.create,
50
53
  edit: t.edit || i.edit,
51
54
  delete: t.delete || i.delete
52
55
  });
53
- function fn(t, i) {
54
- return t ? i.roles ? i.roles.map((n) => t.find((d) => d.id === n.id)).filter(Boolean) : [] : void 0;
56
+ function Cn(t, i) {
57
+ return t ? i.roles ? i.roles.map((n) => t.find((c) => c.id === n.id)).filter(Boolean) : [] : void 0;
55
58
  }
56
- const We = (t, i) => {
57
- const n = t.map((r) => r.id), d = i.map((r) => r.id);
58
- return n.length === i.length && n.every((r) => d.includes(r));
59
+ const Je = (t, i) => {
60
+ const n = t.map((r) => r.id), c = i.map((r) => r.id);
61
+ return n.length === i.length && n.every((r) => c.includes(r));
59
62
  };
60
- function gn(t, i) {
63
+ function vn(t, i) {
61
64
  if (!i)
62
65
  return;
63
- const n = je(i), d = new Date(n.exp * 1e3);
66
+ const n = Ge(i), c = new Date(n.exp * 1e3);
64
67
  localStorage.setItem(`auth_token::${t}`, JSON.stringify({
65
68
  token: i,
66
- expiry: d
69
+ expiry: c
67
70
  }));
68
71
  }
69
- function pn(t) {
72
+ function wn(t) {
70
73
  const i = localStorage.getItem(`auth_token::${t}`);
71
74
  if (i) {
72
75
  const n = JSON.parse(i);
@@ -74,154 +77,168 @@ function pn(t) {
74
77
  return n.token;
75
78
  }
76
79
  }
77
- function Cn() {
80
+ function yn() {
78
81
  for (let t = 0; t < localStorage.length; t++) {
79
82
  const i = localStorage.key(t);
80
83
  i?.startsWith("auth_token::") && localStorage.removeItem(i);
81
84
  }
82
85
  }
83
- function je(t) {
86
+ function Ge(t) {
84
87
  if (!t)
85
88
  throw new Error("No JWT token");
86
- const n = t.split(".")[1].replace(/-/g, "+").replace(/_/g, "/"), d = decodeURIComponent(window.atob(n).split("").map(function(r) {
89
+ const n = t.split(".")[1].replace(/-/g, "+").replace(/_/g, "/"), c = decodeURIComponent(window.atob(n).split("").map(function(r) {
87
90
  return "%" + ("00" + r.charCodeAt(0).toString(16)).slice(-2);
88
91
  }).join(""));
89
- return JSON.parse(d);
92
+ return JSON.parse(c);
90
93
  }
91
- function vn(t, i = 10) {
94
+ function bn(t, i = 10) {
92
95
  if (!/^#([0-9A-Fa-f]{3}){1,2}$/.test(t))
93
96
  throw new Error("Invalid color format");
94
97
  let n = t.substring(1).split("");
95
98
  n.length === 3 && (n = [n[0], n[0], n[1], n[1], n[2], n[2]]);
96
- let d = parseInt(n[0] + n[1], 16), r = parseInt(n[2] + n[3], 16), m = parseInt(n[4] + n[5], 16);
97
- return d = Math.floor(d * (1 - i / 100)), r = Math.floor(r * (1 - i / 100)), m = Math.floor(m * (1 - i / 100)), "#" + (d < 16 ? "0" : "") + d.toString(16) + (r < 16 ? "0" : "") + r.toString(16) + (m < 16 ? "0" : "") + m.toString(16);
99
+ let c = parseInt(n[0] + n[1], 16), r = parseInt(n[2] + n[3], 16), h = parseInt(n[4] + n[5], 16);
100
+ return c = Math.floor(c * (1 - i / 100)), r = Math.floor(r * (1 - i / 100)), h = Math.floor(h * (1 - i / 100)), "#" + (c < 16 ? "0" : "") + c.toString(16) + (r < 16 ? "0" : "") + r.toString(16) + (h < 16 ? "0" : "") + h.toString(16);
98
101
  }
99
- function wn(t, i = 10) {
102
+ function Nn(t, i = 10) {
100
103
  if (!/^#([0-9A-Fa-f]{3}){1,2}$/.test(t))
101
104
  throw new Error("Invalid color format");
102
105
  let n = t.substring(1).split("");
103
106
  n.length === 3 && (n = [n[0], n[0], n[1], n[1], n[2], n[2]]);
104
- const d = parseInt(n[0] + n[1], 16), r = parseInt(n[2] + n[3], 16), m = parseInt(n[4] + n[5], 16), f = i / 100;
105
- return `rgba(${d}, ${r}, ${m}, ${f})`;
107
+ const c = parseInt(n[0] + n[1], 16), r = parseInt(n[2] + n[3], 16), h = parseInt(n[4] + n[5], 16), w = i / 100;
108
+ return `rgba(${c}, ${r}, ${h}, ${w})`;
106
109
  }
107
- function yn({
110
+ function Rn({
108
111
  firebaseApp: t,
109
112
  usersPath: i = "__FIRECMS/config/users",
110
113
  rolesPath: n = "__FIRECMS/config/roles",
111
- usersLimit: d,
114
+ usersLimit: c,
112
115
  canEditRoles: r = !0,
113
- authController: m,
114
- allowDefaultRolesCreation: f,
115
- includeCollectionConfigPermissions: p
116
+ allowDefaultRolesCreation: h,
117
+ includeCollectionConfigPermissions: w
116
118
  }) {
117
- const N = Se(), [v, c] = A.useState(!0), [I, w] = A.useState(!0), [l, g] = A.useState([]), [R, y] = A.useState([]), O = R.map((C) => ({
118
- ...C,
119
- roles: l.filter((b) => C.roles?.includes(b.id))
120
- })), [z, u] = A.useState(), [h, x] = A.useState(), U = v || I, k = O.find((C) => C.email?.toLowerCase() === m.user?.email?.toLowerCase());
119
+ const f = Ee(), [x, y] = A.useState(!0), [d, I] = A.useState(!0), [b, s] = A.useState([]), [C, D] = A.useState([]), p = C.map((m) => ({
120
+ ...m,
121
+ roles: b.filter((v) => m.roles?.includes(v.id))
122
+ })), [z, L] = A.useState(), [g, u] = A.useState(), N = x || d;
121
123
  Z(() => {
122
- t && (N.current = ee(t));
124
+ t && (f.current = ee(t));
123
125
  }, [t]), Z(() => {
124
126
  if (!t || !n)
125
127
  return;
126
- const C = ee(t);
127
- return le(
128
- se(C, n),
128
+ const m = ee(t);
129
+ return ae(
130
+ ne(m, n),
129
131
  {
130
- next: (b) => {
131
- u(void 0);
132
+ next: (v) => {
133
+ L(void 0);
132
134
  try {
133
- const D = Je(b.docs);
134
- g(D);
135
- } catch (D) {
136
- u(D);
135
+ const R = Ke(v.docs);
136
+ s(R);
137
+ } catch (R) {
138
+ L(R);
137
139
  }
138
- c(!1);
140
+ y(!1);
139
141
  },
140
- error: (b) => {
141
- u(b), c(!1);
142
+ error: (v) => {
143
+ L(v), y(!1);
142
144
  }
143
145
  }
144
146
  );
145
147
  }, [t, n]), Z(() => {
146
148
  if (!t || !i)
147
149
  return;
148
- const C = ee(t);
149
- return le(
150
- se(C, i),
150
+ const m = ee(t);
151
+ return ae(
152
+ ne(m, i),
151
153
  {
152
- next: (b) => {
153
- x(void 0);
154
+ next: (v) => {
155
+ u(void 0);
154
156
  try {
155
- const D = ze(b.docs);
156
- y(D);
157
- } catch (D) {
158
- x(D);
157
+ const R = He(v.docs);
158
+ D(R);
159
+ } catch (R) {
160
+ u(R);
159
161
  }
160
- w(!1);
162
+ I(!1);
161
163
  },
162
- error: (b) => {
163
- x(b), w(!1);
164
+ error: (v) => {
165
+ u(v), I(!1);
164
166
  }
165
167
  }
166
168
  );
167
169
  }, [t, i]);
168
- const o = E(async (C) => {
169
- const b = N.current;
170
- if (!b || !i)
170
+ const U = k(async (m) => {
171
+ const v = f.current;
172
+ if (!v || !i)
171
173
  throw Error("useFirestoreConfigurationPersistence Firestore not initialised");
172
- console.debug("Persisting user", C);
173
- const D = C.roles.map((Ue) => Ue.id), {
174
- uid: W,
174
+ console.debug("Persisting user", m);
175
+ const R = m.roles?.map((ke) => ke.id), {
176
+ uid: M,
175
177
  ...X
176
- } = C;
177
- return ae(G(b, i, W), { ...X, roles: D }, { merge: !0 }).then(() => C);
178
- }, [i]), S = E((C) => {
179
- const b = N.current;
180
- if (!b || !n)
178
+ } = m, se = {
179
+ ...X,
180
+ roles: R
181
+ };
182
+ return M ? ce(G(v, i, M), se, { merge: !0 }).then(() => m) : Pe(ne(v, i), se).then(() => m);
183
+ }, [i]), F = k((m) => {
184
+ const v = f.current;
185
+ if (!v || !n)
181
186
  throw Error("useFirestoreConfigurationPersistence Firestore not initialised");
182
- console.debug("Persisting role", C);
187
+ console.debug("Persisting role", m);
183
188
  const {
184
- id: D,
185
- ...W
186
- } = C, X = G(b, n, D);
187
- return ae(X, W, { merge: !0 });
188
- }, [n]), $ = E(async (C) => {
189
- const b = N.current;
190
- if (!b || !i)
189
+ id: R,
190
+ ...M
191
+ } = m, X = G(v, n, R);
192
+ return ce(X, M, { merge: !0 });
193
+ }, [n]), o = k(async (m) => {
194
+ const v = f.current;
195
+ if (!v || !i)
191
196
  throw Error("useFirestoreConfigurationPersistence Firestore not initialised");
192
- console.debug("Deleting", C);
193
- const { uid: D } = C;
194
- return ce(G(b, i, D));
195
- }, [i]), J = E((C) => {
196
- const b = N.current;
197
- if (!b || !n)
197
+ console.debug("Deleting", m);
198
+ const { uid: R } = m;
199
+ return de(G(v, i, R));
200
+ }, [i]), S = k((m) => {
201
+ const v = f.current;
202
+ if (!v || !n)
198
203
  throw Error("useFirestoreConfigurationPersistence Firestore not initialised");
199
- console.debug("Deleting", C);
200
- const { id: D } = C, W = G(b, n, D);
201
- return ce(W);
202
- }, [n]), De = E(({
203
- collection: C
204
- }) => qe({
205
- collection: C,
206
- user: k ?? null
207
- }), [k?.uid]);
204
+ console.debug("Deleting", m);
205
+ const { id: R } = m, M = G(v, n, R);
206
+ return de(M);
207
+ }, [n]), $ = k(({
208
+ collection: m,
209
+ user: v
210
+ }) => je({
211
+ collection: m,
212
+ user: v
213
+ }), []), J = p.map((m) => m.uid), Se = k((m) => {
214
+ if (!p)
215
+ throw Error("Users not loaded");
216
+ return p.find((R) => R.email?.toLowerCase() === m?.email?.toLowerCase())?.roles;
217
+ }, [J]), Ie = k(({ user: m }) => {
218
+ if (console.log("Authenticating user", m), N)
219
+ return console.log("User management is still loading"), !1;
220
+ if (p.length === 0 || p.find((R) => R.email?.toLowerCase() === m?.email?.toLowerCase()))
221
+ return !0;
222
+ throw Error("Could not find a user with the provided email");
223
+ }, [N, p]);
208
224
  return {
209
- loading: U,
210
- loggedInUser: k,
211
- roles: l,
212
- users: O,
213
- saveUser: o,
214
- saveRole: S,
215
- deleteUser: $,
216
- deleteRole: J,
217
- usersLimit: d,
225
+ loading: N,
226
+ roles: b,
227
+ users: p,
228
+ saveUser: U,
229
+ saveRole: F,
230
+ deleteUser: o,
231
+ deleteRole: S,
232
+ usersLimit: c,
218
233
  canEditRoles: r === void 0 ? !0 : r,
219
- allowDefaultRolesCreation: f === void 0 ? !0 : f,
220
- includeCollectionConfigPermissions: !!p,
221
- collectionPermissions: De
234
+ allowDefaultRolesCreation: h === void 0 ? !0 : h,
235
+ includeCollectionConfigPermissions: !!w,
236
+ collectionPermissions: $,
237
+ defineRolesFor: Se,
238
+ authenticator: Ie
222
239
  };
223
240
  }
224
- const ze = (t) => t.map((i) => {
241
+ const He = (t) => t.map((i) => {
225
242
  const n = i.data();
226
243
  return {
227
244
  uid: i.id,
@@ -229,21 +246,21 @@ const ze = (t) => t.map((i) => {
229
246
  created_on: n?.created_on?.toDate(),
230
247
  updated_on: n?.updated_on?.toDate()
231
248
  };
232
- }), Je = (t) => t.map((i) => ({
249
+ }), Ke = (t) => t.map((i) => ({
233
250
  id: i.id,
234
251
  ...i.data()
235
- })), Re = A.createContext({});
236
- function Ge({
252
+ })), Ue = A.createContext({});
253
+ function Qe({
237
254
  children: t,
238
255
  userManagement: i
239
256
  }) {
240
- return /* @__PURE__ */ e(Re.Provider, { value: i, children: t });
257
+ return /* @__PURE__ */ e(Ue.Provider, { value: i, children: t });
241
258
  }
242
- const Y = () => Ie(Re);
259
+ const W = () => Ae(Ue);
243
260
  function Q({ role: t }) {
244
261
  let i;
245
- return t.isAdmin ? i = "blueDarker" : t.id === "editor" ? i = "yellowLight" : t.id === "viewer" ? i = "grayLight" : i = ke(t.id), /* @__PURE__ */ e(
246
- Ee,
262
+ return t.isAdmin ? i = "blueDarker" : t.id === "editor" ? i = "yellowLight" : t.id === "viewer" ? i = "grayLight" : i = Fe(t.id), /* @__PURE__ */ e(
263
+ Te,
247
264
  {
248
265
  colorScheme: i,
249
266
  children: t.name
@@ -251,27 +268,27 @@ function Q({ role: t }) {
251
268
  t.id
252
269
  );
253
270
  }
254
- const He = V.object().shape({
255
- id: V.string().required("Required"),
256
- name: V.string().required("Required")
271
+ const Xe = _.object().shape({
272
+ id: _.string().required("Required"),
273
+ name: _.string().required("Required")
257
274
  });
258
- function Ke({
275
+ function Ze({
259
276
  open: t,
260
277
  role: i,
261
278
  editable: n,
262
- handleClose: d,
279
+ handleClose: c,
263
280
  collections: r
264
281
  }) {
265
- const { saveRole: m } = Y(), f = !i, [p, N] = F(), v = E((o) => (N(void 0), m(o)), [m]), c = Ne({
282
+ const { saveRole: h } = W(), w = !i, [f, x] = P(), y = k((o) => (x(void 0), h(o)), [h]), d = xe({
266
283
  initialValues: i ?? {
267
284
  name: ""
268
285
  },
269
- onSubmit: (o, S) => v(o).then(() => {
286
+ onSubmit: (o, S) => y(o).then(() => {
270
287
  S.resetForm({
271
288
  values: o
272
- }), d();
273
- }).catch(($) => N($)),
274
- validation: (o) => He.validate(o, { abortEarly: !1 }).then(() => ({})).catch((S) => {
289
+ }), c();
290
+ }).catch(($) => x($)),
291
+ validation: (o) => Xe.validate(o, { abortEarly: !1 }).then(() => ({})).catch((S) => {
275
292
  const $ = {};
276
293
  return S.inner.forEach((J) => {
277
294
  $[J.path] = J.message;
@@ -279,27 +296,27 @@ function Ke({
279
296
  })
280
297
  }), {
281
298
  isSubmitting: I,
282
- touched: w,
283
- values: l,
284
- errors: g,
285
- handleChange: R,
286
- setFieldValue: y,
287
- dirty: O,
288
- setFieldTouched: z
289
- } = c, u = l.isAdmin ?? !1, h = l.defaultPermissions?.create ?? !1, x = l.defaultPermissions?.read ?? !1, U = l.defaultPermissions?.edit ?? !1, k = l.defaultPermissions?.delete ?? !1;
299
+ touched: b,
300
+ values: s,
301
+ errors: C,
302
+ handleChange: D,
303
+ setFieldValue: p,
304
+ dirty: z,
305
+ setFieldTouched: L
306
+ } = d, g = s.isAdmin ?? !1, u = s.defaultPermissions?.create ?? !1, N = s.defaultPermissions?.read ?? !1, U = s.defaultPermissions?.edit ?? !1, F = s.defaultPermissions?.delete ?? !1;
290
307
  return A.useEffect(() => {
291
- !j(w, "id") && l.name && y("id", Te(l.name));
292
- }, [w, l.name]), /* @__PURE__ */ e(
293
- de,
308
+ !j(b, "id") && s.name && p("id", _e(s.name));
309
+ }, [b, s.name]), /* @__PURE__ */ e(
310
+ ue,
294
311
  {
295
312
  open: t,
296
313
  maxWidth: "4xl",
297
- children: /* @__PURE__ */ e(xe, { value: c, children: /* @__PURE__ */ s(
314
+ children: /* @__PURE__ */ e(De, { value: d, children: /* @__PURE__ */ l(
298
315
  "form",
299
316
  {
300
317
  noValidate: !0,
301
318
  autoComplete: "off",
302
- onSubmit: c.handleSubmit,
319
+ onSubmit: d.handleSubmit,
303
320
  style: {
304
321
  display: "flex",
305
322
  flexDirection: "column",
@@ -307,13 +324,13 @@ function Ke({
307
324
  height: "100%"
308
325
  },
309
326
  children: [
310
- /* @__PURE__ */ s(ue, { className: "flex-grow", children: [
327
+ /* @__PURE__ */ l(me, { className: "flex-grow", children: [
311
328
  /* @__PURE__ */ e(
312
329
  "div",
313
330
  {
314
331
  className: "flex flex-row pt-12 pb-8",
315
332
  children: /* @__PURE__ */ e(
316
- _,
333
+ O,
317
334
  {
318
335
  variant: "h4",
319
336
  className: "flex-grow",
@@ -322,48 +339,48 @@ function Ke({
322
339
  )
323
340
  }
324
341
  ),
325
- /* @__PURE__ */ s("div", { className: "grid grid-cols-12 gap-8", children: [
326
- /* @__PURE__ */ s("div", { className: "col-span-12 md:col-span-8", children: [
342
+ /* @__PURE__ */ l("div", { className: "grid grid-cols-12 gap-8", children: [
343
+ /* @__PURE__ */ l("div", { className: "col-span-12 md:col-span-8", children: [
327
344
  /* @__PURE__ */ e(
328
345
  K,
329
346
  {
330
347
  name: "name",
331
348
  required: !0,
332
- error: w.name && !!g.name,
333
- value: l.name,
334
- disabled: u || !n,
335
- onChange: R,
349
+ error: b.name && !!C.name,
350
+ value: s.name,
351
+ disabled: g || !n,
352
+ onChange: D,
336
353
  "aria-describedby": "name-helper-text",
337
354
  label: "Name"
338
355
  }
339
356
  ),
340
- /* @__PURE__ */ e(B, { children: w.name && g.name ? g.name : "Name of this role" })
357
+ /* @__PURE__ */ e(B, { children: b.name && C.name ? C.name : "Name of this role" })
341
358
  ] }),
342
- /* @__PURE__ */ s("div", { className: "col-span-12 md:col-span-4", children: [
359
+ /* @__PURE__ */ l("div", { className: "col-span-12 md:col-span-4", children: [
343
360
  /* @__PURE__ */ e(
344
361
  K,
345
362
  {
346
363
  name: "id",
347
364
  required: !0,
348
- error: w.id && !!g.id,
349
- value: l.id,
350
- disabled: !f || !n,
365
+ error: b.id && !!C.id,
366
+ value: s.id,
367
+ disabled: !w || !n,
351
368
  onChange: (o) => {
352
- R(o), z("id", !0);
369
+ D(o), L("id", !0);
353
370
  },
354
371
  "aria-describedby": "id-helper-text",
355
372
  label: "ID"
356
373
  }
357
374
  ),
358
- /* @__PURE__ */ e(B, { children: w.id && g.id ? g.id : "ID of this role" })
375
+ /* @__PURE__ */ e(B, { children: b.id && C.id ? C.id : "ID of this role" })
359
376
  ] }),
360
- /* @__PURE__ */ s("div", { className: "col-span-12", children: [
377
+ /* @__PURE__ */ l("div", { className: "col-span-12", children: [
361
378
  /* @__PURE__ */ e(
362
- Pe,
379
+ Be,
363
380
  {
364
381
  className: "bg-inherit",
365
- children: /* @__PURE__ */ s(ie, { children: [
366
- /* @__PURE__ */ s(re, { children: [
382
+ children: /* @__PURE__ */ l(re, { children: [
383
+ /* @__PURE__ */ l(oe, { children: [
367
384
  /* @__PURE__ */ e(a, {}),
368
385
  /* @__PURE__ */ e(
369
386
  a,
@@ -394,8 +411,8 @@ function Ke({
394
411
  }
395
412
  )
396
413
  ] }),
397
- /* @__PURE__ */ s(oe, { children: [
398
- /* @__PURE__ */ s(M, { children: [
414
+ /* @__PURE__ */ l(le, { children: [
415
+ /* @__PURE__ */ l(q, { children: [
399
416
  /* @__PURE__ */ e(
400
417
  a,
401
418
  {
@@ -408,15 +425,15 @@ function Ke({
408
425
  {
409
426
  align: "center",
410
427
  children: /* @__PURE__ */ e(
411
- L,
428
+ V,
412
429
  {
413
430
  title: "Create entities in collections",
414
431
  children: /* @__PURE__ */ e(
415
- P,
432
+ E,
416
433
  {
417
- disabled: u || !n,
418
- checked: (u || h) ?? !1,
419
- onCheckedChange: (o) => y("defaultPermissions.create", o)
434
+ disabled: g || !n,
435
+ checked: (g || u) ?? !1,
436
+ onCheckedChange: (o) => p("defaultPermissions.create", o)
420
437
  }
421
438
  )
422
439
  }
@@ -428,15 +445,15 @@ function Ke({
428
445
  {
429
446
  align: "center",
430
447
  children: /* @__PURE__ */ e(
431
- L,
448
+ V,
432
449
  {
433
450
  title: "Access all data in every collection",
434
451
  children: /* @__PURE__ */ e(
435
- P,
452
+ E,
436
453
  {
437
- disabled: u || !n,
438
- checked: (u || x) ?? !1,
439
- onCheckedChange: (o) => y("defaultPermissions.read", o)
454
+ disabled: g || !n,
455
+ checked: (g || N) ?? !1,
456
+ onCheckedChange: (o) => p("defaultPermissions.read", o)
440
457
  }
441
458
  )
442
459
  }
@@ -448,15 +465,15 @@ function Ke({
448
465
  {
449
466
  align: "center",
450
467
  children: /* @__PURE__ */ e(
451
- L,
468
+ V,
452
469
  {
453
470
  title: "Update data in any collection",
454
471
  children: /* @__PURE__ */ e(
455
- P,
472
+ E,
456
473
  {
457
- disabled: u || !n,
458
- checked: (u || U) ?? !1,
459
- onCheckedChange: (o) => y("defaultPermissions.edit", o)
474
+ disabled: g || !n,
475
+ checked: (g || U) ?? !1,
476
+ onCheckedChange: (o) => p("defaultPermissions.edit", o)
460
477
  }
461
478
  )
462
479
  }
@@ -468,15 +485,15 @@ function Ke({
468
485
  {
469
486
  align: "center",
470
487
  children: /* @__PURE__ */ e(
471
- L,
488
+ V,
472
489
  {
473
490
  title: "Delete data in any collection",
474
491
  children: /* @__PURE__ */ e(
475
- P,
492
+ E,
476
493
  {
477
- disabled: u || !n,
478
- checked: (u || k) ?? !1,
479
- onCheckedChange: (o) => y("defaultPermissions.delete", o)
494
+ disabled: g || !n,
495
+ checked: (g || F) ?? !1,
496
+ onCheckedChange: (o) => p("defaultPermissions.delete", o)
480
497
  }
481
498
  )
482
499
  }
@@ -484,7 +501,7 @@ function Ke({
484
501
  }
485
502
  )
486
503
  ] }),
487
- r && r.map((o) => /* @__PURE__ */ s(M, { children: [
504
+ r && r.map((o) => /* @__PURE__ */ l(q, { children: [
488
505
  /* @__PURE__ */ e(
489
506
  a,
490
507
  {
@@ -497,11 +514,11 @@ function Ke({
497
514
  {
498
515
  align: "center",
499
516
  children: /* @__PURE__ */ e(
500
- P,
517
+ E,
501
518
  {
502
- disabled: u || h || !n,
503
- checked: (u || h || j(l, `collectionPermissions.${o.path}.create`)) ?? !1,
504
- onCheckedChange: (S) => y(`collectionPermissions.${o.path}.create`, S)
519
+ disabled: g || u || !n,
520
+ checked: (g || u || j(s, `collectionPermissions.${o.path}.create`)) ?? !1,
521
+ onCheckedChange: (S) => p(`collectionPermissions.${o.path}.create`, S)
505
522
  }
506
523
  )
507
524
  }
@@ -511,11 +528,11 @@ function Ke({
511
528
  {
512
529
  align: "center",
513
530
  children: /* @__PURE__ */ e(
514
- P,
531
+ E,
515
532
  {
516
- disabled: u || x || !n,
517
- checked: (u || x || j(l, `collectionPermissions.${o.path}.read`)) ?? !1,
518
- onCheckedChange: (S) => y(`collectionPermissions.${o.path}.read`, S)
533
+ disabled: g || N || !n,
534
+ checked: (g || N || j(s, `collectionPermissions.${o.path}.read`)) ?? !1,
535
+ onCheckedChange: (S) => p(`collectionPermissions.${o.path}.read`, S)
519
536
  }
520
537
  )
521
538
  }
@@ -525,11 +542,11 @@ function Ke({
525
542
  {
526
543
  align: "center",
527
544
  children: /* @__PURE__ */ e(
528
- P,
545
+ E,
529
546
  {
530
- disabled: u || U || !n,
531
- checked: (u || U || j(l, `collectionPermissions.${o.path}.edit`)) ?? !1,
532
- onCheckedChange: (S) => y(`collectionPermissions.${o.path}.edit`, S)
547
+ disabled: g || U || !n,
548
+ checked: (g || U || j(s, `collectionPermissions.${o.path}.edit`)) ?? !1,
549
+ onCheckedChange: (S) => p(`collectionPermissions.${o.path}.edit`, S)
533
550
  }
534
551
  )
535
552
  }
@@ -539,11 +556,11 @@ function Ke({
539
556
  {
540
557
  align: "center",
541
558
  children: /* @__PURE__ */ e(
542
- P,
559
+ E,
543
560
  {
544
- disabled: u || k || !n,
545
- checked: (u || k || j(l, `collectionPermissions.${o.path}.delete`)) ?? !1,
546
- onCheckedChange: (S) => y(`collectionPermissions.${o.path}.delete`, S)
561
+ disabled: g || F || !n,
562
+ checked: (g || F || j(s, `collectionPermissions.${o.path}.delete`)) ?? !1,
563
+ onCheckedChange: (S) => p(`collectionPermissions.${o.path}.delete`, S)
547
564
  }
548
565
  )
549
566
  }
@@ -555,18 +572,18 @@ function Ke({
555
572
  ),
556
573
  /* @__PURE__ */ e(B, { children: "You can customise the permissions that the users related to this role can perform in the entities of each collection" })
557
574
  ] }),
558
- /* @__PURE__ */ s("div", { className: "col-span-12 md:col-span-4", children: [
559
- /* @__PURE__ */ s(
560
- ne,
575
+ /* @__PURE__ */ l("div", { className: "col-span-12 md:col-span-4", children: [
576
+ /* @__PURE__ */ l(
577
+ te,
561
578
  {
562
- error: w.config && !!g.config,
579
+ error: b.config && !!C.config,
563
580
  id: "createCollections",
564
581
  name: "createCollections",
565
582
  label: "Create collections",
566
583
  position: "item-aligned",
567
- disabled: u || !n,
568
- onChange: (o) => y("config.createCollections", o.target.value === "true"),
569
- value: u || l.config?.createCollections ? "true" : "false",
584
+ disabled: g || !n,
585
+ onChange: (o) => p("config.createCollections", o.target.value === "true"),
586
+ value: g || s.config?.createCollections ? "true" : "false",
570
587
  renderValue: (o) => o === "true" ? "Yes" : "No",
571
588
  children: [
572
589
  /* @__PURE__ */ e(
@@ -586,20 +603,20 @@ function Ke({
586
603
  ]
587
604
  }
588
605
  ),
589
- /* @__PURE__ */ e(B, { children: w.config && g.config ? g.config : "Can the user create collections" })
606
+ /* @__PURE__ */ e(B, { children: b.config && C.config ? C.config : "Can the user create collections" })
590
607
  ] }),
591
- /* @__PURE__ */ s("div", { className: "col-span-12 md:col-span-4", children: [
592
- /* @__PURE__ */ s(
593
- ne,
608
+ /* @__PURE__ */ l("div", { className: "col-span-12 md:col-span-4", children: [
609
+ /* @__PURE__ */ l(
610
+ te,
594
611
  {
595
- error: w.config && !!g.config,
612
+ error: b.config && !!C.config,
596
613
  id: "editCollections",
597
614
  name: "editCollections",
598
615
  label: "Edit collections",
599
- disabled: u || !n,
616
+ disabled: g || !n,
600
617
  position: "item-aligned",
601
- onChange: (o) => y("config.editCollections", o.target.value === "own" ? "own" : o.target.value === "true"),
602
- value: u ? "true" : l.config?.editCollections === "own" ? "own" : l.config?.editCollections ? "true" : "false",
618
+ onChange: (o) => p("config.editCollections", o.target.value === "own" ? "own" : o.target.value === "true"),
619
+ value: g ? "true" : s.config?.editCollections === "own" ? "own" : s.config?.editCollections ? "true" : "false",
603
620
  renderValue: (o) => o === "own" ? "Own" : o === "true" ? "Yes" : "No",
604
621
  children: [
605
622
  /* @__PURE__ */ e(
@@ -626,20 +643,20 @@ function Ke({
626
643
  ]
627
644
  }
628
645
  ),
629
- /* @__PURE__ */ e(B, { children: w.config && g.config ? g.config : "Can the user edit collections" })
646
+ /* @__PURE__ */ e(B, { children: b.config && C.config ? C.config : "Can the user edit collections" })
630
647
  ] }),
631
- /* @__PURE__ */ s("div", { className: "col-span-12 md:col-span-4", children: [
632
- /* @__PURE__ */ s(
633
- ne,
648
+ /* @__PURE__ */ l("div", { className: "col-span-12 md:col-span-4", children: [
649
+ /* @__PURE__ */ l(
650
+ te,
634
651
  {
635
- error: w.config && !!g.config,
652
+ error: b.config && !!C.config,
636
653
  id: "deleteCollections",
637
654
  name: "deleteCollections",
638
655
  label: "Delete collections",
639
- disabled: u || !n,
656
+ disabled: g || !n,
640
657
  position: "item-aligned",
641
- onChange: (o) => y("config.deleteCollections", o.target.value === "own" ? "own" : o.target.value === "true"),
642
- value: u ? "true" : l.config?.deleteCollections === "own" ? "own" : l.config?.deleteCollections ? "true" : "false",
658
+ onChange: (o) => p("config.deleteCollections", o.target.value === "own" ? "own" : o.target.value === "true"),
659
+ value: g ? "true" : s.config?.deleteCollections === "own" ? "own" : s.config?.deleteCollections ? "true" : "false",
643
660
  renderValue: (o) => o === "own" ? "Own" : o === "true" ? "Yes" : "No",
644
661
  children: [
645
662
  /* @__PURE__ */ e(
@@ -666,32 +683,32 @@ function Ke({
666
683
  ]
667
684
  }
668
685
  ),
669
- /* @__PURE__ */ e(B, { children: w.config && g.config ? g.config : "Can the user delete collections" })
686
+ /* @__PURE__ */ e(B, { children: b.config && C.config ? C.config : "Can the user delete collections" })
670
687
  ] })
671
688
  ] })
672
689
  ] }),
673
- /* @__PURE__ */ s(me, { position: "sticky", children: [
674
- p && /* @__PURE__ */ e(_, { className: "text-red-500", children: "There was an error saving this role" }),
690
+ /* @__PURE__ */ l(he, { position: "sticky", children: [
691
+ f && /* @__PURE__ */ e(O, { className: "text-red-500", children: "There was an error saving this role" }),
675
692
  /* @__PURE__ */ e(
676
- q,
693
+ Y,
677
694
  {
678
695
  variant: "text",
679
696
  onClick: () => {
680
- d();
697
+ c();
681
698
  },
682
699
  children: "Cancel"
683
700
  }
684
701
  ),
685
702
  /* @__PURE__ */ e(
686
- he,
703
+ fe,
687
704
  {
688
705
  variant: "filled",
689
706
  color: "primary",
690
707
  type: "submit",
691
- disabled: !O,
708
+ disabled: !z,
692
709
  loading: I,
693
- startIcon: /* @__PURE__ */ e(fe, {}),
694
- children: f ? "Create role" : "Update"
710
+ startIcon: /* @__PURE__ */ e(ge, {}),
711
+ children: w ? "Create role" : "Update"
695
712
  }
696
713
  )
697
714
  ] })
@@ -701,7 +718,7 @@ function Ke({
701
718
  }
702
719
  );
703
720
  }
704
- const Qe = [
721
+ const en = [
705
722
  {
706
723
  id: "admin",
707
724
  name: "Admin",
@@ -735,69 +752,69 @@ const Qe = [
735
752
  }
736
753
  }
737
754
  ];
738
- function Xe({
755
+ function nn({
739
756
  onRoleClicked: t,
740
757
  editable: i
741
758
  }) {
742
759
  const {
743
760
  roles: n,
744
- saveRole: d,
761
+ saveRole: c,
745
762
  deleteRole: r,
746
- allowDefaultRolesCreation: m
747
- } = Y(), [f, p] = F(void 0), [N, v] = F(!1);
748
- return /* @__PURE__ */ s(
763
+ allowDefaultRolesCreation: h
764
+ } = W(), [w, f] = P(void 0), [x, y] = P(!1);
765
+ return /* @__PURE__ */ l(
749
766
  "div",
750
767
  {
751
768
  className: "w-full overflow-auto",
752
769
  children: [
753
- /* @__PURE__ */ s(ie, { children: [
754
- /* @__PURE__ */ s(re, { children: [
770
+ /* @__PURE__ */ l(re, { children: [
771
+ /* @__PURE__ */ l(oe, { children: [
755
772
  /* @__PURE__ */ e(a, { header: !0, className: "w-16" }),
756
773
  /* @__PURE__ */ e(a, { header: !0, children: "Role" }),
757
774
  /* @__PURE__ */ e(a, { header: !0, className: "items-center", children: "Is Admin" }),
758
775
  /* @__PURE__ */ e(a, { header: !0, children: "Default permissions" })
759
776
  ] }),
760
- /* @__PURE__ */ s(oe, { children: [
761
- n && n.map((c) => {
762
- const I = c.isAdmin || c.defaultPermissions?.create, w = c.isAdmin || c.defaultPermissions?.read, l = c.isAdmin || c.defaultPermissions?.edit, g = c.isAdmin || c.defaultPermissions?.delete;
763
- return /* @__PURE__ */ s(
764
- M,
777
+ /* @__PURE__ */ l(le, { children: [
778
+ n && n.map((d) => {
779
+ const I = d.isAdmin || d.defaultPermissions?.create, b = d.isAdmin || d.defaultPermissions?.read, s = d.isAdmin || d.defaultPermissions?.edit, C = d.isAdmin || d.defaultPermissions?.delete;
780
+ return /* @__PURE__ */ l(
781
+ q,
765
782
  {
766
783
  onClick: () => {
767
- t(c);
784
+ t(d);
768
785
  },
769
786
  children: [
770
- /* @__PURE__ */ e(a, { style: { width: "64px" }, children: !c.isAdmin && /* @__PURE__ */ e(L, { title: "Delete this role", children: /* @__PURE__ */ e(
771
- ge,
787
+ /* @__PURE__ */ e(a, { style: { width: "64px" }, children: !d.isAdmin && /* @__PURE__ */ e(V, { title: "Delete this role", children: /* @__PURE__ */ e(
788
+ pe,
772
789
  {
773
790
  size: "small",
774
791
  disabled: !i,
775
- onClick: (R) => (R.stopPropagation(), p(c)),
776
- children: /* @__PURE__ */ e(pe, {})
792
+ onClick: (D) => (D.stopPropagation(), f(d)),
793
+ children: /* @__PURE__ */ e(Ce, {})
777
794
  }
778
795
  ) }) }),
779
- /* @__PURE__ */ e(a, { children: /* @__PURE__ */ e(Q, { role: c }) }),
780
- /* @__PURE__ */ e(a, { className: "items-center", children: /* @__PURE__ */ e(P, { checked: c.isAdmin ?? !1 }) }),
781
- /* @__PURE__ */ e(a, { children: /* @__PURE__ */ s("ul", { children: [
796
+ /* @__PURE__ */ e(a, { children: /* @__PURE__ */ e(Q, { role: d }) }),
797
+ /* @__PURE__ */ e(a, { className: "items-center", children: /* @__PURE__ */ e(E, { checked: d.isAdmin ?? !1 }) }),
798
+ /* @__PURE__ */ e(a, { children: /* @__PURE__ */ l("ul", { children: [
782
799
  I && /* @__PURE__ */ e("li", { children: "Create" }),
783
- w && /* @__PURE__ */ e("li", { children: "Read" }),
784
- l && /* @__PURE__ */ e("li", { children: "Update" }),
785
- g && /* @__PURE__ */ e("li", { children: "Delete" })
800
+ b && /* @__PURE__ */ e("li", { children: "Read" }),
801
+ s && /* @__PURE__ */ e("li", { children: "Update" }),
802
+ C && /* @__PURE__ */ e("li", { children: "Delete" })
786
803
  ] }) })
787
804
  ]
788
805
  },
789
- c.name
806
+ d.name
790
807
  );
791
808
  }),
792
- (!n || n.length === 0) && /* @__PURE__ */ e(M, { children: /* @__PURE__ */ e(a, { colspan: 4, children: /* @__PURE__ */ s(Ce, { className: "flex flex-col gap-4 my-8 items-center", children: [
793
- /* @__PURE__ */ e(_, { variant: "label", children: "You don't have any roles yet." }),
794
- m && /* @__PURE__ */ e(
795
- q,
809
+ (!n || n.length === 0) && /* @__PURE__ */ e(q, { children: /* @__PURE__ */ e(a, { colspan: 4, children: /* @__PURE__ */ l(ve, { className: "flex flex-col gap-4 my-8 items-center", children: [
810
+ /* @__PURE__ */ e(O, { variant: "label", children: "You don't have any roles yet." }),
811
+ h && /* @__PURE__ */ e(
812
+ Y,
796
813
  {
797
814
  variant: "outlined",
798
815
  onClick: () => {
799
- Qe.forEach((c) => {
800
- d(c);
816
+ en.forEach((d) => {
817
+ c(d);
801
818
  });
802
819
  },
803
820
  children: "Create default roles"
@@ -807,19 +824,19 @@ function Xe({
807
824
  ] })
808
825
  ] }),
809
826
  /* @__PURE__ */ e(
810
- ye,
827
+ be,
811
828
  {
812
- open: !!f,
813
- loading: N,
829
+ open: !!w,
830
+ loading: x,
814
831
  onAccept: () => {
815
- f && (v(!0), r(f).then(() => {
816
- p(void 0);
832
+ w && (y(!0), r(w).then(() => {
833
+ f(void 0);
817
834
  }).finally(() => {
818
- v(!1);
835
+ y(!1);
819
836
  }));
820
837
  },
821
838
  onCancel: () => {
822
- p(void 0);
839
+ f(void 0);
823
840
  },
824
841
  title: /* @__PURE__ */ e(H, { children: "Delete?" }),
825
842
  body: /* @__PURE__ */ e(H, { children: "Are you sure you want to delete this role?" })
@@ -829,16 +846,16 @@ function Xe({
829
846
  }
830
847
  );
831
848
  }
832
- const Ze = A.memo(
849
+ const tn = A.memo(
833
850
  function({ children: i }) {
834
- const { collections: n } = Be(), [d, r] = F(!1), [m, f] = F(), { canEditRoles: p } = Y(), N = E((c) => {
835
- r(!0), f(c);
851
+ const { collections: n } = Oe(), [c, r] = P(!1), [h, w] = P(), { canEditRoles: f } = W(), x = k((d) => {
852
+ r(!0), w(d);
836
853
  }, []);
837
- return /* @__PURE__ */ s(ve, { className: "w-full flex flex-col py-4 gap-4", maxWidth: "6xl", children: [
854
+ return /* @__PURE__ */ l(we, { className: "w-full flex flex-col py-4 gap-4", maxWidth: "6xl", children: [
838
855
  i,
839
- /* @__PURE__ */ s("div", { className: "flex items-center mt-12", children: [
856
+ /* @__PURE__ */ l("div", { className: "flex items-center mt-12", children: [
840
857
  /* @__PURE__ */ e(
841
- _,
858
+ O,
842
859
  {
843
860
  gutterBottom: !0,
844
861
  variant: "h4",
@@ -847,102 +864,103 @@ const Ze = A.memo(
847
864
  children: "Roles"
848
865
  }
849
866
  ),
850
- /* @__PURE__ */ e(L, { title: p ? void 0 : "Update plans to customise roles", children: /* @__PURE__ */ e(
851
- q,
867
+ /* @__PURE__ */ e(V, { title: f ? void 0 : "Update plans to customise roles", children: /* @__PURE__ */ e(
868
+ Y,
852
869
  {
853
870
  size: "large",
854
- disabled: !p,
855
- startIcon: /* @__PURE__ */ e(we, {}),
871
+ disabled: !f,
872
+ startIcon: /* @__PURE__ */ e(ye, {}),
856
873
  onClick: () => r(!0),
857
874
  children: "Add role"
858
875
  }
859
876
  ) })
860
877
  ] }),
861
- /* @__PURE__ */ e(Xe, { onRoleClicked: N, editable: !!p }),
878
+ /* @__PURE__ */ e(nn, { onRoleClicked: x, editable: !!f }),
862
879
  /* @__PURE__ */ e(
863
- Ke,
880
+ Ze,
864
881
  {
865
- open: d,
866
- role: m,
867
- editable: p,
882
+ open: c,
883
+ role: h,
884
+ editable: f,
868
885
  collections: n,
869
886
  handleClose: () => {
870
- f(void 0), r(!1);
887
+ w(void 0), r(!1);
871
888
  }
872
889
  },
873
- m?.id ?? "new"
890
+ h?.id ?? "new"
874
891
  )
875
892
  ] });
876
893
  }
877
- ), en = V.object().shape({
878
- displayName: V.string().required("Required"),
879
- email: V.string().email().required("Required"),
880
- roles: V.array().min(1)
894
+ ), rn = _.object().shape({
895
+ displayName: _.string().required("Required"),
896
+ email: _.string().email().required("Required"),
897
+ roles: _.array().min(1)
881
898
  });
882
- function nn(t, i, n, d, r) {
883
- const m = n.filter((v) => v.roles.map((c) => c.id).includes("admin")), f = t.roles.map((v) => v.id).includes("admin");
884
- if ((!r || !We(r.roles, i.roles)) && !f)
899
+ function on(t, i, n, c, r) {
900
+ const h = n.filter((y) => y.roles?.map((d) => d.id).includes("admin")), w = t.roles?.map((y) => y.id).includes("admin");
901
+ if ((!r || !Je(r.roles ?? [], i.roles ?? [])) && !w)
885
902
  throw new Error("Only admins can change roles");
886
- if (r && r.roles.map((v) => v.id).includes("admin") && !i.roles.map((v) => v.id).includes("admin") && m.length === 1)
903
+ if (r && r.roles?.map((y) => y.id).includes("admin") && !i.roles?.map((y) => y.id).includes("admin") && h.length === 1)
887
904
  throw new Error("There must be at least one admin");
888
905
  return !0;
889
906
  }
890
- function tn({
907
+ function ln({
891
908
  open: t,
892
909
  user: i,
893
910
  handleClose: n
894
911
  }) {
895
- const d = be(), {
896
- loggedInUser: r,
897
- saveUser: m,
898
- users: f,
899
- roles: p
900
- } = Y(), N = !i, v = E((h) => {
912
+ const c = Ne(), {
913
+ user: r
914
+ } = Re(), {
915
+ saveUser: h,
916
+ users: w,
917
+ roles: f
918
+ } = W(), x = !i, y = k((u) => {
901
919
  if (!r)
902
920
  throw new Error("Logged user not found");
903
921
  try {
904
- return nn(r, h, f, p, i), m(h);
905
- } catch (x) {
906
- return Promise.reject(x);
922
+ return on(r, u, w, f, i), h(u);
923
+ } catch (N) {
924
+ return Promise.reject(N);
907
925
  }
908
- }, [p, m, i, f, r]), c = Ne({
926
+ }, [f, h, i, w, r]), d = xe({
909
927
  initialValues: i ?? {
910
928
  displayName: "",
911
929
  email: "",
912
- roles: p.filter((h) => h.id === "editor")
930
+ roles: f.filter((u) => u.id === "editor")
913
931
  },
914
- validation: (h) => en.validate(h, { abortEarly: !1 }).then(() => ({})).catch((x) => x.inner.reduce((U, k) => (U[k.path] = k.message, U), {})),
915
- onSubmit: (h, x) => v(h).then(() => {
916
- n(), x.resetForm({
917
- values: h
932
+ validation: (u) => rn.validate(u, { abortEarly: !1 }).then(() => ({})).catch((N) => N.inner.reduce((U, F) => (U[F.path] = F.message, U), {})),
933
+ onSubmit: (u, N) => y(u).then(() => {
934
+ n(), N.resetForm({
935
+ values: u
918
936
  });
919
937
  }).catch((U) => {
920
- d.open({
938
+ c.open({
921
939
  type: "error",
922
940
  message: U.message
923
941
  });
924
942
  })
925
943
  }), {
926
944
  isSubmitting: I,
927
- touched: w,
928
- handleChange: l,
929
- values: g,
930
- errors: R,
931
- setFieldValue: y,
932
- dirty: O,
933
- handleSubmit: z,
934
- submitCount: u
935
- } = c;
945
+ touched: b,
946
+ handleChange: s,
947
+ values: C,
948
+ errors: D,
949
+ setFieldValue: p,
950
+ dirty: z,
951
+ handleSubmit: L,
952
+ submitCount: g
953
+ } = d;
936
954
  return /* @__PURE__ */ e(
937
- de,
955
+ ue,
938
956
  {
939
957
  open: t,
940
- onOpenChange: (h) => h ? void 0 : n(),
958
+ onOpenChange: (u) => u ? void 0 : n(),
941
959
  maxWidth: "4xl",
942
- children: /* @__PURE__ */ e(xe, { value: c, children: /* @__PURE__ */ s(
960
+ children: /* @__PURE__ */ e(De, { value: d, children: /* @__PURE__ */ l(
943
961
  "form",
944
962
  {
945
- onSubmit: z,
963
+ onSubmit: L,
946
964
  autoComplete: "off",
947
965
  noValidate: !0,
948
966
  style: {
@@ -952,13 +970,13 @@ function tn({
952
970
  height: "100%"
953
971
  },
954
972
  children: [
955
- /* @__PURE__ */ s(ue, { className: "h-full flex-grow", children: [
973
+ /* @__PURE__ */ l(me, { className: "h-full flex-grow", children: [
956
974
  /* @__PURE__ */ e(
957
975
  "div",
958
976
  {
959
977
  className: "flex flex-row pt-4 pb-4",
960
978
  children: /* @__PURE__ */ e(
961
- _,
979
+ O,
962
980
  {
963
981
  variant: "h4",
964
982
  className: "flex-grow",
@@ -967,62 +985,62 @@ function tn({
967
985
  )
968
986
  }
969
987
  ),
970
- /* @__PURE__ */ s("div", { className: "grid grid-cols-12 gap-8", children: [
971
- /* @__PURE__ */ s("div", { className: "col-span-12", children: [
988
+ /* @__PURE__ */ l("div", { className: "grid grid-cols-12 gap-8", children: [
989
+ /* @__PURE__ */ l("div", { className: "col-span-12", children: [
972
990
  /* @__PURE__ */ e(
973
991
  K,
974
992
  {
975
993
  name: "displayName",
976
994
  required: !0,
977
- error: u > 0 && !!R.displayName,
978
- value: g.displayName ?? "",
979
- onChange: l,
995
+ error: g > 0 && !!D.displayName,
996
+ value: C.displayName ?? "",
997
+ onChange: s,
980
998
  "aria-describedby": "name-helper-text",
981
999
  label: "Name"
982
1000
  }
983
1001
  ),
984
- /* @__PURE__ */ e(B, { children: u > 0 && R.displayName ? R.displayName : "Name of this user" })
1002
+ /* @__PURE__ */ e(B, { children: g > 0 && D.displayName ? D.displayName : "Name of this user" })
985
1003
  ] }),
986
- /* @__PURE__ */ s("div", { className: "col-span-12", children: [
1004
+ /* @__PURE__ */ l("div", { className: "col-span-12", children: [
987
1005
  /* @__PURE__ */ e(
988
1006
  K,
989
1007
  {
990
1008
  required: !0,
991
- error: u > 0 && !!R.email,
1009
+ error: g > 0 && !!D.email,
992
1010
  name: "email",
993
- value: g.email ?? "",
994
- onChange: l,
1011
+ value: C.email ?? "",
1012
+ onChange: s,
995
1013
  "aria-describedby": "email-helper-text",
996
1014
  label: "Email"
997
1015
  }
998
1016
  ),
999
- /* @__PURE__ */ e(B, { children: u > 0 && R.email ? R.email : "Email of this user" })
1017
+ /* @__PURE__ */ e(B, { children: g > 0 && D.email ? D.email : "Email of this user" })
1000
1018
  ] }),
1001
1019
  /* @__PURE__ */ e("div", { className: "col-span-12", children: /* @__PURE__ */ e(
1002
- Ae,
1020
+ Le,
1003
1021
  {
1004
1022
  label: "Roles",
1005
- value: g.roles.map((h) => h.id) ?? [],
1006
- onMultiValueChange: (h) => y("roles", h.map((x) => p.find((U) => U.id === x))),
1007
- renderValue: (h) => {
1008
- const x = p.find((U) => U.id === h);
1009
- return x ? /* @__PURE__ */ e("div", { className: "flex flex-wrap space-x-2 space-y-2", children: /* @__PURE__ */ e(Q, { role: x }, x?.id) }) : null;
1023
+ value: C.roles?.map((u) => u.id) ?? [],
1024
+ onMultiValueChange: (u) => p("roles", u.map((N) => f.find((U) => U.id === N))),
1025
+ renderValue: (u) => {
1026
+ const N = f.find((U) => U.id === u);
1027
+ return N ? /* @__PURE__ */ e("div", { className: "flex flex-wrap space-x-2 space-y-2", children: /* @__PURE__ */ e(Q, { role: N }, N?.id) }) : null;
1010
1028
  },
1011
- children: p.map((h) => /* @__PURE__ */ e(
1012
- Fe,
1029
+ children: f.map((u) => /* @__PURE__ */ e(
1030
+ Ve,
1013
1031
  {
1014
- value: h.id,
1015
- children: /* @__PURE__ */ e(Q, { role: h }, h?.id)
1032
+ value: u.id,
1033
+ children: /* @__PURE__ */ e(Q, { role: u }, u?.id)
1016
1034
  },
1017
- h.id
1035
+ u.id
1018
1036
  ))
1019
1037
  }
1020
1038
  ) })
1021
1039
  ] })
1022
1040
  ] }),
1023
- /* @__PURE__ */ s(me, { children: [
1041
+ /* @__PURE__ */ l(he, { children: [
1024
1042
  /* @__PURE__ */ e(
1025
- q,
1043
+ Y,
1026
1044
  {
1027
1045
  variant: "text",
1028
1046
  onClick: () => {
@@ -1032,15 +1050,15 @@ function tn({
1032
1050
  }
1033
1051
  ),
1034
1052
  /* @__PURE__ */ e(
1035
- he,
1053
+ fe,
1036
1054
  {
1037
1055
  variant: "filled",
1038
1056
  color: "primary",
1039
1057
  type: "submit",
1040
- disabled: !O,
1058
+ disabled: !z,
1041
1059
  loading: I,
1042
- startIcon: /* @__PURE__ */ e(fe, {}),
1043
- children: N ? "Create user" : "Update"
1060
+ startIcon: /* @__PURE__ */ e(ge, {}),
1061
+ children: x ? "Create user" : "Update"
1044
1062
  }
1045
1063
  )
1046
1064
  ] })
@@ -1050,15 +1068,15 @@ function tn({
1050
1068
  }
1051
1069
  );
1052
1070
  }
1053
- function rn({ onUserClicked: t }) {
1071
+ function sn({ onUserClicked: t }) {
1054
1072
  const {
1055
1073
  users: i,
1056
1074
  saveUser: n,
1057
- deleteUser: d
1058
- } = Y(), r = Le(), m = be(), f = Ve(), p = f?.locale ? $e[f?.locale] : void 0, N = f?.dateTimeFormat ?? _e, [v, c] = F(void 0), [I, w] = F(!1);
1059
- return /* @__PURE__ */ s("div", { className: "overflow-auto", children: [
1060
- /* @__PURE__ */ s(ie, { children: [
1061
- /* @__PURE__ */ s(re, { children: [
1075
+ deleteUser: c
1076
+ } = W(), r = Re(), h = Ne(), w = $e(), f = w?.locale ? Ye[w?.locale] : void 0, x = w?.dateTimeFormat ?? Me, [y, d] = P(void 0), [I, b] = P(!1);
1077
+ return /* @__PURE__ */ l("div", { className: "overflow-auto", children: [
1078
+ /* @__PURE__ */ l(re, { children: [
1079
+ /* @__PURE__ */ l(oe, { children: [
1062
1080
  /* @__PURE__ */ e(a, { className: "truncate w-16" }),
1063
1081
  /* @__PURE__ */ e(a, { children: "ID" }),
1064
1082
  /* @__PURE__ */ e(a, { children: "Email" }),
@@ -1066,40 +1084,40 @@ function rn({ onUserClicked: t }) {
1066
1084
  /* @__PURE__ */ e(a, { children: "Roles" }),
1067
1085
  /* @__PURE__ */ e(a, { children: "Created on" })
1068
1086
  ] }),
1069
- /* @__PURE__ */ s(oe, { children: [
1070
- i && i.map((l) => {
1071
- const g = l.roles, R = l.created_on ? Oe(l.created_on, N, { locale: p }) : "";
1072
- return /* @__PURE__ */ s(
1073
- M,
1087
+ /* @__PURE__ */ l(le, { children: [
1088
+ i && i.map((s) => {
1089
+ const C = s.roles, D = s.created_on ? qe(s.created_on, x, { locale: f }) : "";
1090
+ return /* @__PURE__ */ l(
1091
+ q,
1074
1092
  {
1075
1093
  onClick: () => {
1076
- t(l);
1094
+ t(s);
1077
1095
  },
1078
1096
  children: [
1079
- /* @__PURE__ */ e(a, { className: "w-10", children: /* @__PURE__ */ e(L, { title: "Delete this user", children: /* @__PURE__ */ e(
1080
- ge,
1097
+ /* @__PURE__ */ e(a, { className: "w-10", children: /* @__PURE__ */ e(V, { title: "Delete this user", children: /* @__PURE__ */ e(
1098
+ pe,
1081
1099
  {
1082
1100
  size: "small",
1083
- onClick: (y) => (y.stopPropagation(), c(l)),
1084
- children: /* @__PURE__ */ e(pe, {})
1101
+ onClick: (p) => (p.stopPropagation(), d(s)),
1102
+ children: /* @__PURE__ */ e(Ce, {})
1085
1103
  }
1086
1104
  ) }) }),
1087
- /* @__PURE__ */ e(a, { children: l.uid }),
1088
- /* @__PURE__ */ e(a, { children: l.email }),
1089
- /* @__PURE__ */ e(a, { className: "font-medium align-left", children: l.displayName }),
1090
- /* @__PURE__ */ e(a, { className: "align-left", children: g ? /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-2", children: g.map(
1091
- (y) => /* @__PURE__ */ e(Q, { role: y }, y?.id)
1105
+ /* @__PURE__ */ e(a, { children: s.uid }),
1106
+ /* @__PURE__ */ e(a, { children: s.email }),
1107
+ /* @__PURE__ */ e(a, { className: "font-medium align-left", children: s.displayName }),
1108
+ /* @__PURE__ */ e(a, { className: "align-left", children: C ? /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-2", children: C.map(
1109
+ (p) => /* @__PURE__ */ e(Q, { role: p }, p?.id)
1092
1110
  ) }) : null }),
1093
- /* @__PURE__ */ e(a, { children: R })
1111
+ /* @__PURE__ */ e(a, { children: D })
1094
1112
  ]
1095
1113
  },
1096
- "row_" + l.uid
1114
+ "row_" + s.uid
1097
1115
  );
1098
1116
  }),
1099
- (!i || i.length === 0) && /* @__PURE__ */ e(M, { children: /* @__PURE__ */ e(a, { colspan: 6, children: /* @__PURE__ */ s(Ce, { className: "flex flex-col gap-4 my-8 items-center", children: [
1100
- /* @__PURE__ */ e(_, { variant: "label", children: "There are no users yet" }),
1117
+ (!i || i.length === 0) && /* @__PURE__ */ e(q, { children: /* @__PURE__ */ e(a, { colspan: 6, children: /* @__PURE__ */ l(ve, { className: "flex flex-col gap-4 my-8 items-center", children: [
1118
+ /* @__PURE__ */ e(O, { variant: "label", children: "There are no users yet" }),
1101
1119
  /* @__PURE__ */ e(
1102
- q,
1120
+ Y,
1103
1121
  {
1104
1122
  variant: "outlined",
1105
1123
  onClick: () => {
@@ -1115,14 +1133,14 @@ function rn({ onUserClicked: t }) {
1115
1133
  roles: [{ id: "admin", name: "Admin" }],
1116
1134
  created_on: /* @__PURE__ */ new Date()
1117
1135
  }).then(() => {
1118
- m.open({
1136
+ h.open({
1119
1137
  type: "success",
1120
1138
  message: "User added successfully"
1121
1139
  });
1122
- }).catch((l) => {
1123
- m.open({
1140
+ }).catch((s) => {
1141
+ h.open({
1124
1142
  type: "error",
1125
- message: "Error adding user: " + l.message
1143
+ message: "Error adding user: " + s.message
1126
1144
  });
1127
1145
  });
1128
1146
  },
@@ -1133,24 +1151,24 @@ function rn({ onUserClicked: t }) {
1133
1151
  ] })
1134
1152
  ] }),
1135
1153
  /* @__PURE__ */ e(
1136
- ye,
1154
+ be,
1137
1155
  {
1138
- open: !!v,
1156
+ open: !!y,
1139
1157
  loading: I,
1140
1158
  onAccept: () => {
1141
- v && (w(!0), d(v).then(() => {
1142
- c(void 0);
1143
- }).catch((l) => {
1144
- m.open({
1159
+ y && (b(!0), c(y).then(() => {
1160
+ d(void 0);
1161
+ }).catch((s) => {
1162
+ h.open({
1145
1163
  type: "error",
1146
- message: "Error deleting user: " + l.message
1164
+ message: "Error deleting user: " + s.message
1147
1165
  });
1148
1166
  }).finally(() => {
1149
- w(!1);
1167
+ b(!1);
1150
1168
  }));
1151
1169
  },
1152
1170
  onCancel: () => {
1153
- c(void 0);
1171
+ d(void 0);
1154
1172
  },
1155
1173
  title: /* @__PURE__ */ e(H, { children: "Delete?" }),
1156
1174
  body: /* @__PURE__ */ e(H, { children: "Are you sure you want to delete this user?" })
@@ -1158,21 +1176,21 @@ function rn({ onUserClicked: t }) {
1158
1176
  )
1159
1177
  ] });
1160
1178
  }
1161
- const on = function({ children: i }) {
1162
- const [n, d] = F(), [r, m] = F(), { users: f, usersLimit: p } = Y(), N = p !== void 0 && f && f.length >= p, v = E((I) => {
1163
- m(I), d(!0);
1164
- }, []), c = E(() => {
1165
- d(!1), m(void 0);
1179
+ const an = function({ children: i }) {
1180
+ const [n, c] = P(), [r, h] = P(), { users: w, usersLimit: f } = W(), x = f !== void 0 && w && w.length >= f, y = k((I) => {
1181
+ h(I), c(!0);
1182
+ }, []), d = k(() => {
1183
+ c(!1), h(void 0);
1166
1184
  }, []);
1167
- return /* @__PURE__ */ s(ve, { className: "w-full flex flex-col py-4 gap-4", maxWidth: "6xl", children: [
1185
+ return /* @__PURE__ */ l(we, { className: "w-full flex flex-col py-4 gap-4", maxWidth: "6xl", children: [
1168
1186
  i,
1169
- /* @__PURE__ */ s(
1187
+ /* @__PURE__ */ l(
1170
1188
  "div",
1171
1189
  {
1172
1190
  className: "flex items-center mt-12",
1173
1191
  children: [
1174
1192
  /* @__PURE__ */ e(
1175
- _,
1193
+ O,
1176
1194
  {
1177
1195
  gutterBottom: !0,
1178
1196
  variant: "h4",
@@ -1182,82 +1200,82 @@ const on = function({ children: i }) {
1182
1200
  }
1183
1201
  ),
1184
1202
  /* @__PURE__ */ e(
1185
- q,
1203
+ Y,
1186
1204
  {
1187
1205
  size: "large",
1188
- disabled: N,
1189
- startIcon: /* @__PURE__ */ e(we, {}),
1190
- onClick: () => d(!0),
1206
+ disabled: x,
1207
+ startIcon: /* @__PURE__ */ e(ye, {}),
1208
+ onClick: () => c(!0),
1191
1209
  children: "Add user"
1192
1210
  }
1193
1211
  )
1194
1212
  ]
1195
1213
  }
1196
1214
  ),
1197
- /* @__PURE__ */ e(rn, { onUserClicked: v }),
1215
+ /* @__PURE__ */ e(sn, { onUserClicked: y }),
1198
1216
  /* @__PURE__ */ e(
1199
- tn,
1217
+ ln,
1200
1218
  {
1201
1219
  open: n ?? !1,
1202
1220
  user: r,
1203
- handleClose: c
1221
+ handleClose: d
1204
1222
  },
1205
1223
  r?.uid ?? "new"
1206
1224
  )
1207
1225
  ] });
1208
1226
  };
1209
- function bn({ userManagement: t }) {
1227
+ function xn({ userManagement: t }) {
1210
1228
  return {
1211
- name: "User management plugin",
1229
+ key: "user_management",
1212
1230
  loading: t.loading,
1213
1231
  provider: {
1214
- Component: Ge,
1232
+ Component: Qe,
1215
1233
  props: {
1216
1234
  userManagement: t
1217
1235
  }
1218
1236
  }
1219
1237
  };
1220
1238
  }
1221
- const Nn = [
1239
+ const Dn = [
1222
1240
  {
1223
1241
  path: "users",
1224
1242
  name: "CMS Users",
1225
1243
  group: "Admin",
1226
1244
  icon: "face",
1227
- view: /* @__PURE__ */ e(on, {})
1245
+ view: /* @__PURE__ */ e(an, {})
1228
1246
  },
1229
1247
  {
1230
1248
  path: "roles",
1231
1249
  name: "Roles",
1232
1250
  group: "Admin",
1233
1251
  icon: "gpp_good",
1234
- view: /* @__PURE__ */ e(Ze, {})
1252
+ view: /* @__PURE__ */ e(tn, {})
1235
1253
  }
1236
1254
  ];
1237
1255
  export {
1238
- hn as RESERVED_GROUPS,
1256
+ pn as RESERVED_GROUPS,
1239
1257
  Q as RoleChip,
1240
- He as RoleYupSchema,
1241
- Ke as RolesDetailsForm,
1242
- Xe as RolesTable,
1243
- Ze as RolesView,
1244
- tn as UserDetailsForm,
1245
- Re as UserManagementContext,
1246
- Ge as UserManagementProvider,
1247
- en as UserYupSchema,
1248
- rn as UsersTable,
1249
- on as UsersView,
1250
- We as areRolesEqual,
1251
- gn as cacheDelegatedLoginToken,
1252
- Cn as clearDelegatedLoginTokensCache,
1253
- vn as darkenColor,
1254
- pn as getDelegatedLoginTokenFromCache,
1255
- fn as getUserRoles,
1256
- wn as hexToRgbaWithOpacity,
1257
- qe as resolveUserRolePermissions,
1258
- yn as useBuildFirestoreUserManagement,
1259
- Y as useUserManagement,
1260
- bn as useUserManagementPlugin,
1261
- Nn as userManagementAdminViews
1258
+ Xe as RoleYupSchema,
1259
+ Ze as RolesDetailsForm,
1260
+ nn as RolesTable,
1261
+ tn as RolesView,
1262
+ ln as UserDetailsForm,
1263
+ Ue as UserManagementContext,
1264
+ Qe as UserManagementProvider,
1265
+ rn as UserYupSchema,
1266
+ sn as UsersTable,
1267
+ an as UsersView,
1268
+ Je as areRolesEqual,
1269
+ vn as cacheDelegatedLoginToken,
1270
+ yn as clearDelegatedLoginTokensCache,
1271
+ bn as darkenColor,
1272
+ wn as getDelegatedLoginTokenFromCache,
1273
+ Cn as getUserRoles,
1274
+ Nn as hexToRgbaWithOpacity,
1275
+ je as resolveUserRolePermissions,
1276
+ Rn as useBuildFirestoreUserManagement,
1277
+ W as useUserManagement,
1278
+ xn as useUserManagementPlugin,
1279
+ Dn as userManagementAdminViews
1262
1280
  };
1263
1281
  //# sourceMappingURL=index.es.js.map