@firecms/user_management 3.3.0 → 3.4.0-canary.1faa2a9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/UserManagementPausedNotice.d.ts +7 -0
- package/dist/index.es.js +265 -90
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +265 -90
- package/dist/index.umd.js.map +1 -1
- package/dist/useUserManagementPlugin.d.ts +1 -1
- package/package.json +5 -5
- package/src/components/UserManagementPausedNotice.tsx +35 -0
- package/src/components/roles/RolesView.tsx +15 -1
- package/src/components/users/UsersTable.tsx +2 -2
- package/src/components/users/UsersView.tsx +15 -1
- package/src/hooks/useBuildUserManagement.tsx +11 -3
- package/src/useUserManagementPlugin.tsx +15 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
(function(global, factory) {
|
|
2
|
-
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("react"), require("react-fast-compare"), require("@firecms/core"), require("react/jsx-runtime"), require("react-compiler-runtime"), require("@firecms/ui"), require("yup"), require("@firecms/formex"), require("date-fns")
|
|
3
|
-
})(this, (function(exports2, React, equal, core, jsxRuntime, reactCompilerRuntime, ui, Yup, formex, dateFns
|
|
2
|
+
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("react"), require("react-fast-compare"), require("@firecms/core"), require("react/jsx-runtime"), require("react-compiler-runtime"), require("@firecms/ui"), require("yup"), require("@firecms/formex"), require("date-fns")) : typeof define === "function" && define.amd ? define(["exports", "react", "react-fast-compare", "@firecms/core", "react/jsx-runtime", "react-compiler-runtime", "@firecms/ui", "yup", "@firecms/formex", "date-fns"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.FireCMS = {}, global.React, global.equal, global.core, global.jsxRuntime, global.reactCompilerRuntime, global.ui, global.Yup, global.formex, global.dateFns));
|
|
3
|
+
})(this, (function(exports2, React, equal, core, jsxRuntime, reactCompilerRuntime, ui, Yup, formex, dateFns) {
|
|
4
4
|
"use strict";
|
|
5
5
|
function _interopNamespaceDefault(e) {
|
|
6
6
|
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
@@ -19,7 +19,6 @@
|
|
|
19
19
|
return Object.freeze(n);
|
|
20
20
|
}
|
|
21
21
|
const Yup__namespace = /* @__PURE__ */ _interopNamespaceDefault(Yup);
|
|
22
|
-
const locales__namespace = /* @__PURE__ */ _interopNamespaceDefault(locales);
|
|
23
22
|
const RESERVED_GROUPS = ["Admin"];
|
|
24
23
|
const DEFAULT_PERMISSIONS = {
|
|
25
24
|
read: false,
|
|
@@ -265,7 +264,8 @@
|
|
|
265
264
|
id: userExists.uid
|
|
266
265
|
};
|
|
267
266
|
await dataSourceDelegate.deleteEntity({
|
|
268
|
-
entity
|
|
267
|
+
entity,
|
|
268
|
+
pathSegments: void 0
|
|
269
269
|
}).then(() => {
|
|
270
270
|
console.debug("Deleted previous user", userExists);
|
|
271
271
|
}).catch((e_3) => {
|
|
@@ -275,6 +275,10 @@
|
|
|
275
275
|
return dataSourceDelegate.saveEntity({
|
|
276
276
|
status: "existing",
|
|
277
277
|
path: usersPath,
|
|
278
|
+
// `usersPath` / `rolesPath` are configurable path strings this hook never parses.
|
|
279
|
+
// Segments are left undefined rather than split out of one: absent means "not known
|
|
280
|
+
// here", and a split would be wrong for any configured id containing "/".
|
|
281
|
+
pathSegments: void 0,
|
|
278
282
|
entityId: email,
|
|
279
283
|
values: core.removeUndefined(data)
|
|
280
284
|
}).then(() => user);
|
|
@@ -290,6 +294,10 @@
|
|
|
290
294
|
return dataSourceDelegate.saveEntity({
|
|
291
295
|
status: "existing",
|
|
292
296
|
path: rolesPath,
|
|
297
|
+
// `usersPath` / `rolesPath` are configurable path strings this hook never parses.
|
|
298
|
+
// Segments are left undefined rather than split out of one: absent means "not known
|
|
299
|
+
// here", and a split would be wrong for any configured id containing "/".
|
|
300
|
+
pathSegments: void 0,
|
|
293
301
|
entityId: id,
|
|
294
302
|
values: core.removeUndefined(roleData)
|
|
295
303
|
}).then(() => {
|
|
@@ -309,7 +317,8 @@
|
|
|
309
317
|
values: {}
|
|
310
318
|
};
|
|
311
319
|
await dataSourceDelegate.deleteEntity({
|
|
312
|
-
entity: entity_0
|
|
320
|
+
entity: entity_0,
|
|
321
|
+
pathSegments: void 0
|
|
313
322
|
});
|
|
314
323
|
}, [usersPath, dataSourceDelegate?.initialised]);
|
|
315
324
|
const deleteRole = React.useCallback(async (role_0) => {
|
|
@@ -325,7 +334,8 @@
|
|
|
325
334
|
values: {}
|
|
326
335
|
};
|
|
327
336
|
await dataSourceDelegate.deleteEntity({
|
|
328
|
-
entity: entity_1
|
|
337
|
+
entity: entity_1,
|
|
338
|
+
pathSegments: void 0
|
|
329
339
|
});
|
|
330
340
|
}, [rolesPath, dataSourceDelegate?.initialised]);
|
|
331
341
|
const collectionPermissions = React.useCallback(({
|
|
@@ -1966,14 +1976,96 @@
|
|
|
1966
1976
|
}
|
|
1967
1977
|
return t21;
|
|
1968
1978
|
}
|
|
1979
|
+
function UserManagementPausedNotice() {
|
|
1980
|
+
const $ = reactCompilerRuntime.c(20);
|
|
1981
|
+
const {
|
|
1982
|
+
t
|
|
1983
|
+
} = core.useTranslation();
|
|
1984
|
+
const licenseStatus = core.useLicenseStatus();
|
|
1985
|
+
let t0;
|
|
1986
|
+
if ($[0] !== licenseStatus?.licenseState || $[1] !== t) {
|
|
1987
|
+
t0 = licenseStatus?.licenseState === "invalid_project" ? t("license_add_project_to_license") : t("license_get_license");
|
|
1988
|
+
$[0] = licenseStatus?.licenseState;
|
|
1989
|
+
$[1] = t;
|
|
1990
|
+
$[2] = t0;
|
|
1991
|
+
} else {
|
|
1992
|
+
t0 = $[2];
|
|
1993
|
+
}
|
|
1994
|
+
const linkLabel = t0;
|
|
1995
|
+
let t1;
|
|
1996
|
+
if ($[3] !== t) {
|
|
1997
|
+
t1 = t("pro_features_paused");
|
|
1998
|
+
$[3] = t;
|
|
1999
|
+
$[4] = t1;
|
|
2000
|
+
} else {
|
|
2001
|
+
t1 = $[4];
|
|
2002
|
+
}
|
|
2003
|
+
let t2;
|
|
2004
|
+
if ($[5] !== t1) {
|
|
2005
|
+
t2 = /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "subtitle2", className: "uppercase", children: t1 });
|
|
2006
|
+
$[5] = t1;
|
|
2007
|
+
$[6] = t2;
|
|
2008
|
+
} else {
|
|
2009
|
+
t2 = $[6];
|
|
2010
|
+
}
|
|
2011
|
+
let t3;
|
|
2012
|
+
if ($[7] !== t) {
|
|
2013
|
+
t3 = t("user_management_paused_description");
|
|
2014
|
+
$[7] = t;
|
|
2015
|
+
$[8] = t3;
|
|
2016
|
+
} else {
|
|
2017
|
+
t3 = $[8];
|
|
2018
|
+
}
|
|
2019
|
+
let t4;
|
|
2020
|
+
if ($[9] !== t3) {
|
|
2021
|
+
t4 = /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { children: t3 });
|
|
2022
|
+
$[9] = t3;
|
|
2023
|
+
$[10] = t4;
|
|
2024
|
+
} else {
|
|
2025
|
+
t4 = $[10];
|
|
2026
|
+
}
|
|
2027
|
+
let t5;
|
|
2028
|
+
if ($[11] !== licenseStatus) {
|
|
2029
|
+
t5 = core.getLicenseSubscribeUrl(licenseStatus);
|
|
2030
|
+
$[11] = licenseStatus;
|
|
2031
|
+
$[12] = t5;
|
|
2032
|
+
} else {
|
|
2033
|
+
t5 = $[12];
|
|
2034
|
+
}
|
|
2035
|
+
let t6;
|
|
2036
|
+
if ($[13] !== linkLabel || $[14] !== t5) {
|
|
2037
|
+
t6 = /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { component: "a", href: t5, target: "_blank", rel: "noopener noreferrer", children: linkLabel });
|
|
2038
|
+
$[13] = linkLabel;
|
|
2039
|
+
$[14] = t5;
|
|
2040
|
+
$[15] = t6;
|
|
2041
|
+
} else {
|
|
2042
|
+
t6 = $[15];
|
|
2043
|
+
}
|
|
2044
|
+
let t7;
|
|
2045
|
+
if ($[16] !== t2 || $[17] !== t4 || $[18] !== t6) {
|
|
2046
|
+
t7 = /* @__PURE__ */ jsxRuntime.jsxs(ui.Paper, { className: "flex flex-col items-start px-4 py-6 bg-white dark:bg-surface-accent-800 gap-2", children: [
|
|
2047
|
+
t2,
|
|
2048
|
+
t4,
|
|
2049
|
+
t6
|
|
2050
|
+
] });
|
|
2051
|
+
$[16] = t2;
|
|
2052
|
+
$[17] = t4;
|
|
2053
|
+
$[18] = t6;
|
|
2054
|
+
$[19] = t7;
|
|
2055
|
+
} else {
|
|
2056
|
+
t7 = $[19];
|
|
2057
|
+
}
|
|
2058
|
+
return t7;
|
|
2059
|
+
}
|
|
1969
2060
|
const RolesView = React.memo(function RolesView2(t0) {
|
|
1970
|
-
const $ = reactCompilerRuntime.c(
|
|
2061
|
+
const $ = reactCompilerRuntime.c(33);
|
|
1971
2062
|
const {
|
|
1972
2063
|
children
|
|
1973
2064
|
} = t0;
|
|
1974
2065
|
const {
|
|
1975
2066
|
t
|
|
1976
2067
|
} = core.useTranslation();
|
|
2068
|
+
const paused = core.isProPaused(core.useLicenseStatus());
|
|
1977
2069
|
const {
|
|
1978
2070
|
collections
|
|
1979
2071
|
} = core.useNavigationController();
|
|
@@ -2001,94 +2093,133 @@
|
|
|
2001
2093
|
t2 = $[1];
|
|
2002
2094
|
}
|
|
2003
2095
|
const handleClose = t2;
|
|
2096
|
+
if (paused) {
|
|
2097
|
+
let t32;
|
|
2098
|
+
if ($[2] !== t) {
|
|
2099
|
+
t32 = t("roles");
|
|
2100
|
+
$[2] = t;
|
|
2101
|
+
$[3] = t32;
|
|
2102
|
+
} else {
|
|
2103
|
+
t32 = $[3];
|
|
2104
|
+
}
|
|
2105
|
+
let t42;
|
|
2106
|
+
if ($[4] !== t32) {
|
|
2107
|
+
t42 = /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { gutterBottom: true, variant: "h4", className: "mt-12", component: "h4", children: t32 });
|
|
2108
|
+
$[4] = t32;
|
|
2109
|
+
$[5] = t42;
|
|
2110
|
+
} else {
|
|
2111
|
+
t42 = $[5];
|
|
2112
|
+
}
|
|
2113
|
+
let t52;
|
|
2114
|
+
if ($[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
2115
|
+
t52 = /* @__PURE__ */ jsxRuntime.jsx(UserManagementPausedNotice, {});
|
|
2116
|
+
$[6] = t52;
|
|
2117
|
+
} else {
|
|
2118
|
+
t52 = $[6];
|
|
2119
|
+
}
|
|
2120
|
+
let t62;
|
|
2121
|
+
if ($[7] !== children || $[8] !== t42) {
|
|
2122
|
+
t62 = /* @__PURE__ */ jsxRuntime.jsxs(ui.Container, { className: "w-full flex flex-col py-4 gap-4", maxWidth: "6xl", children: [
|
|
2123
|
+
children,
|
|
2124
|
+
t42,
|
|
2125
|
+
t52
|
|
2126
|
+
] });
|
|
2127
|
+
$[7] = children;
|
|
2128
|
+
$[8] = t42;
|
|
2129
|
+
$[9] = t62;
|
|
2130
|
+
} else {
|
|
2131
|
+
t62 = $[9];
|
|
2132
|
+
}
|
|
2133
|
+
return t62;
|
|
2134
|
+
}
|
|
2004
2135
|
let t3;
|
|
2005
|
-
if ($[
|
|
2136
|
+
if ($[10] !== t) {
|
|
2006
2137
|
t3 = t("roles");
|
|
2007
|
-
$[
|
|
2008
|
-
$[
|
|
2138
|
+
$[10] = t;
|
|
2139
|
+
$[11] = t3;
|
|
2009
2140
|
} else {
|
|
2010
|
-
t3 = $[
|
|
2141
|
+
t3 = $[11];
|
|
2011
2142
|
}
|
|
2012
2143
|
let t4;
|
|
2013
|
-
if ($[
|
|
2144
|
+
if ($[12] !== t3) {
|
|
2014
2145
|
t4 = /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { gutterBottom: true, variant: "h4", className: "flex-grow", component: "h4", children: t3 });
|
|
2015
|
-
$[
|
|
2016
|
-
$[
|
|
2146
|
+
$[12] = t3;
|
|
2147
|
+
$[13] = t4;
|
|
2017
2148
|
} else {
|
|
2018
|
-
t4 = $[
|
|
2149
|
+
t4 = $[13];
|
|
2019
2150
|
}
|
|
2020
2151
|
let t5;
|
|
2021
2152
|
let t6;
|
|
2022
|
-
if ($[
|
|
2153
|
+
if ($[14] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
2023
2154
|
t5 = /* @__PURE__ */ jsxRuntime.jsx(ui.AddIcon, {});
|
|
2024
2155
|
t6 = () => setDialogOpen(true);
|
|
2025
|
-
$[
|
|
2026
|
-
$[
|
|
2156
|
+
$[14] = t5;
|
|
2157
|
+
$[15] = t6;
|
|
2027
2158
|
} else {
|
|
2028
|
-
t5 = $[
|
|
2029
|
-
t6 = $[
|
|
2159
|
+
t5 = $[14];
|
|
2160
|
+
t6 = $[15];
|
|
2030
2161
|
}
|
|
2031
2162
|
let t7;
|
|
2032
|
-
if ($[
|
|
2163
|
+
if ($[16] !== t) {
|
|
2033
2164
|
t7 = t("add_role");
|
|
2034
|
-
$[
|
|
2035
|
-
$[
|
|
2165
|
+
$[16] = t;
|
|
2166
|
+
$[17] = t7;
|
|
2036
2167
|
} else {
|
|
2037
|
-
t7 = $[
|
|
2168
|
+
t7 = $[17];
|
|
2038
2169
|
}
|
|
2039
2170
|
let t8;
|
|
2040
|
-
if ($[
|
|
2171
|
+
if ($[18] !== t7) {
|
|
2041
2172
|
t8 = /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "large", startIcon: t5, onClick: t6, children: t7 });
|
|
2042
|
-
$[
|
|
2043
|
-
$[
|
|
2173
|
+
$[18] = t7;
|
|
2174
|
+
$[19] = t8;
|
|
2044
2175
|
} else {
|
|
2045
|
-
t8 = $[
|
|
2176
|
+
t8 = $[19];
|
|
2046
2177
|
}
|
|
2047
2178
|
let t9;
|
|
2048
|
-
if ($[
|
|
2179
|
+
if ($[20] !== t4 || $[21] !== t8) {
|
|
2049
2180
|
t9 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center mt-12", children: [
|
|
2050
2181
|
t4,
|
|
2051
2182
|
t8
|
|
2052
2183
|
] });
|
|
2053
|
-
$[
|
|
2054
|
-
$[
|
|
2055
|
-
$[
|
|
2184
|
+
$[20] = t4;
|
|
2185
|
+
$[21] = t8;
|
|
2186
|
+
$[22] = t9;
|
|
2056
2187
|
} else {
|
|
2057
|
-
t9 = $[
|
|
2188
|
+
t9 = $[22];
|
|
2058
2189
|
}
|
|
2059
2190
|
let t10;
|
|
2060
|
-
if ($[
|
|
2191
|
+
if ($[23] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
2061
2192
|
t10 = /* @__PURE__ */ jsxRuntime.jsx(RolesTable, { onRoleClicked, editable: true });
|
|
2062
|
-
$[
|
|
2193
|
+
$[23] = t10;
|
|
2063
2194
|
} else {
|
|
2064
|
-
t10 = $[
|
|
2195
|
+
t10 = $[23];
|
|
2065
2196
|
}
|
|
2066
2197
|
const t11 = selectedRole?.id ?? "new";
|
|
2067
2198
|
let t12;
|
|
2068
|
-
if ($[
|
|
2199
|
+
if ($[24] !== collections || $[25] !== dialogOpen || $[26] !== selectedRole || $[27] !== t11) {
|
|
2069
2200
|
t12 = /* @__PURE__ */ jsxRuntime.jsx(RolesDetailsForm, { open: dialogOpen, role: selectedRole, editable: true, collections, handleClose }, t11);
|
|
2070
|
-
$[
|
|
2071
|
-
$[
|
|
2072
|
-
$[
|
|
2073
|
-
$[
|
|
2074
|
-
$[
|
|
2201
|
+
$[24] = collections;
|
|
2202
|
+
$[25] = dialogOpen;
|
|
2203
|
+
$[26] = selectedRole;
|
|
2204
|
+
$[27] = t11;
|
|
2205
|
+
$[28] = t12;
|
|
2075
2206
|
} else {
|
|
2076
|
-
t12 = $[
|
|
2207
|
+
t12 = $[28];
|
|
2077
2208
|
}
|
|
2078
2209
|
let t13;
|
|
2079
|
-
if ($[
|
|
2210
|
+
if ($[29] !== children || $[30] !== t12 || $[31] !== t9) {
|
|
2080
2211
|
t13 = /* @__PURE__ */ jsxRuntime.jsxs(ui.Container, { className: "w-full flex flex-col py-4 gap-4", maxWidth: "6xl", children: [
|
|
2081
2212
|
children,
|
|
2082
2213
|
t9,
|
|
2083
2214
|
t10,
|
|
2084
2215
|
t12
|
|
2085
2216
|
] });
|
|
2086
|
-
$[
|
|
2087
|
-
$[
|
|
2088
|
-
$[
|
|
2089
|
-
$[
|
|
2217
|
+
$[29] = children;
|
|
2218
|
+
$[30] = t12;
|
|
2219
|
+
$[31] = t9;
|
|
2220
|
+
$[32] = t13;
|
|
2090
2221
|
} else {
|
|
2091
|
-
t13 = $[
|
|
2222
|
+
t13 = $[32];
|
|
2092
2223
|
}
|
|
2093
2224
|
return t13;
|
|
2094
2225
|
});
|
|
@@ -2581,7 +2712,7 @@
|
|
|
2581
2712
|
const authController = core.useAuthController();
|
|
2582
2713
|
const snackbarController = core.useSnackbarController();
|
|
2583
2714
|
const customizationController = core.useCustomizationController();
|
|
2584
|
-
const dateUtilsLocale = customizationController?.locale
|
|
2715
|
+
const dateUtilsLocale = core.useDateFnsLocale(customizationController?.locale);
|
|
2585
2716
|
const dateFormat = customizationController?.dateTimeFormat ?? core.defaultDateFormat;
|
|
2586
2717
|
const [userToBeDeleted, setUserToBeDeleted] = React.useState(void 0);
|
|
2587
2718
|
const [deleteInProgress, setDeleteInProgress] = React.useState(false);
|
|
@@ -2876,13 +3007,14 @@
|
|
|
2876
3007
|
return /* @__PURE__ */ jsxRuntime.jsx(RoleChip, { role: userRole }, userRole?.id);
|
|
2877
3008
|
}
|
|
2878
3009
|
const UsersView = function UsersView2(t0) {
|
|
2879
|
-
const $ = reactCompilerRuntime.c(
|
|
3010
|
+
const $ = reactCompilerRuntime.c(32);
|
|
2880
3011
|
const {
|
|
2881
3012
|
children
|
|
2882
3013
|
} = t0;
|
|
2883
3014
|
const {
|
|
2884
3015
|
t
|
|
2885
3016
|
} = core.useTranslation();
|
|
3017
|
+
const paused = core.isProPaused(core.useLicenseStatus());
|
|
2886
3018
|
const [dialogOpen, setDialogOpen] = React.useState(false);
|
|
2887
3019
|
const [selectedUser, setSelectedUser] = React.useState();
|
|
2888
3020
|
const [newFormKey, setNewFormKey] = React.useState(0);
|
|
@@ -2921,89 +3053,128 @@
|
|
|
2921
3053
|
t3 = $[2];
|
|
2922
3054
|
}
|
|
2923
3055
|
const handleAddUser = t3;
|
|
3056
|
+
if (paused) {
|
|
3057
|
+
let t42;
|
|
3058
|
+
if ($[3] !== t) {
|
|
3059
|
+
t42 = t("users");
|
|
3060
|
+
$[3] = t;
|
|
3061
|
+
$[4] = t42;
|
|
3062
|
+
} else {
|
|
3063
|
+
t42 = $[4];
|
|
3064
|
+
}
|
|
3065
|
+
let t52;
|
|
3066
|
+
if ($[5] !== t42) {
|
|
3067
|
+
t52 = /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { gutterBottom: true, variant: "h4", className: "mt-12", component: "h4", children: t42 });
|
|
3068
|
+
$[5] = t42;
|
|
3069
|
+
$[6] = t52;
|
|
3070
|
+
} else {
|
|
3071
|
+
t52 = $[6];
|
|
3072
|
+
}
|
|
3073
|
+
let t62;
|
|
3074
|
+
if ($[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
3075
|
+
t62 = /* @__PURE__ */ jsxRuntime.jsx(UserManagementPausedNotice, {});
|
|
3076
|
+
$[7] = t62;
|
|
3077
|
+
} else {
|
|
3078
|
+
t62 = $[7];
|
|
3079
|
+
}
|
|
3080
|
+
let t72;
|
|
3081
|
+
if ($[8] !== children || $[9] !== t52) {
|
|
3082
|
+
t72 = /* @__PURE__ */ jsxRuntime.jsxs(ui.Container, { className: "w-full flex flex-col py-4 gap-4", maxWidth: "6xl", children: [
|
|
3083
|
+
children,
|
|
3084
|
+
t52,
|
|
3085
|
+
t62
|
|
3086
|
+
] });
|
|
3087
|
+
$[8] = children;
|
|
3088
|
+
$[9] = t52;
|
|
3089
|
+
$[10] = t72;
|
|
3090
|
+
} else {
|
|
3091
|
+
t72 = $[10];
|
|
3092
|
+
}
|
|
3093
|
+
return t72;
|
|
3094
|
+
}
|
|
2924
3095
|
let t4;
|
|
2925
|
-
if ($[
|
|
3096
|
+
if ($[11] !== t) {
|
|
2926
3097
|
t4 = t("users");
|
|
2927
|
-
$[
|
|
2928
|
-
$[
|
|
3098
|
+
$[11] = t;
|
|
3099
|
+
$[12] = t4;
|
|
2929
3100
|
} else {
|
|
2930
|
-
t4 = $[
|
|
3101
|
+
t4 = $[12];
|
|
2931
3102
|
}
|
|
2932
3103
|
let t5;
|
|
2933
|
-
if ($[
|
|
3104
|
+
if ($[13] !== t4) {
|
|
2934
3105
|
t5 = /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { gutterBottom: true, variant: "h4", className: "flex-grow", component: "h4", children: t4 });
|
|
2935
|
-
$[
|
|
2936
|
-
$[
|
|
3106
|
+
$[13] = t4;
|
|
3107
|
+
$[14] = t5;
|
|
2937
3108
|
} else {
|
|
2938
|
-
t5 = $[
|
|
3109
|
+
t5 = $[14];
|
|
2939
3110
|
}
|
|
2940
3111
|
let t6;
|
|
2941
|
-
if ($[
|
|
3112
|
+
if ($[15] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
2942
3113
|
t6 = /* @__PURE__ */ jsxRuntime.jsx(ui.AddIcon, {});
|
|
2943
|
-
$[
|
|
3114
|
+
$[15] = t6;
|
|
2944
3115
|
} else {
|
|
2945
|
-
t6 = $[
|
|
3116
|
+
t6 = $[15];
|
|
2946
3117
|
}
|
|
2947
3118
|
let t7;
|
|
2948
|
-
if ($[
|
|
3119
|
+
if ($[16] !== t) {
|
|
2949
3120
|
t7 = t("add_user");
|
|
2950
|
-
$[
|
|
2951
|
-
$[
|
|
3121
|
+
$[16] = t;
|
|
3122
|
+
$[17] = t7;
|
|
2952
3123
|
} else {
|
|
2953
|
-
t7 = $[
|
|
3124
|
+
t7 = $[17];
|
|
2954
3125
|
}
|
|
2955
3126
|
let t8;
|
|
2956
|
-
if ($[
|
|
3127
|
+
if ($[18] !== t7) {
|
|
2957
3128
|
t8 = /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "large", startIcon: t6, onClick: handleAddUser, children: t7 });
|
|
2958
|
-
$[
|
|
2959
|
-
$[
|
|
3129
|
+
$[18] = t7;
|
|
3130
|
+
$[19] = t8;
|
|
2960
3131
|
} else {
|
|
2961
|
-
t8 = $[
|
|
3132
|
+
t8 = $[19];
|
|
2962
3133
|
}
|
|
2963
3134
|
let t9;
|
|
2964
|
-
if ($[
|
|
3135
|
+
if ($[20] !== t5 || $[21] !== t8) {
|
|
2965
3136
|
t9 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center mt-12", children: [
|
|
2966
3137
|
t5,
|
|
2967
3138
|
t8
|
|
2968
3139
|
] });
|
|
2969
|
-
$[
|
|
2970
|
-
$[
|
|
2971
|
-
$[
|
|
3140
|
+
$[20] = t5;
|
|
3141
|
+
$[21] = t8;
|
|
3142
|
+
$[22] = t9;
|
|
2972
3143
|
} else {
|
|
2973
|
-
t9 = $[
|
|
3144
|
+
t9 = $[22];
|
|
2974
3145
|
}
|
|
2975
3146
|
let t10;
|
|
2976
|
-
if ($[
|
|
3147
|
+
if ($[23] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
2977
3148
|
t10 = /* @__PURE__ */ jsxRuntime.jsx(UsersTable, { onUserClicked });
|
|
2978
|
-
$[
|
|
3149
|
+
$[23] = t10;
|
|
2979
3150
|
} else {
|
|
2980
|
-
t10 = $[
|
|
3151
|
+
t10 = $[23];
|
|
2981
3152
|
}
|
|
2982
3153
|
const t11 = selectedUser?.uid ?? `new-${newFormKey}`;
|
|
2983
3154
|
let t12;
|
|
2984
|
-
if ($[
|
|
3155
|
+
if ($[24] !== dialogOpen || $[25] !== selectedUser || $[26] !== t11) {
|
|
2985
3156
|
t12 = /* @__PURE__ */ jsxRuntime.jsx(UserDetailsForm, { open: dialogOpen, user: selectedUser, handleClose }, t11);
|
|
2986
|
-
$[
|
|
2987
|
-
$[
|
|
2988
|
-
$[
|
|
2989
|
-
$[
|
|
3157
|
+
$[24] = dialogOpen;
|
|
3158
|
+
$[25] = selectedUser;
|
|
3159
|
+
$[26] = t11;
|
|
3160
|
+
$[27] = t12;
|
|
2990
3161
|
} else {
|
|
2991
|
-
t12 = $[
|
|
3162
|
+
t12 = $[27];
|
|
2992
3163
|
}
|
|
2993
3164
|
let t13;
|
|
2994
|
-
if ($[
|
|
3165
|
+
if ($[28] !== children || $[29] !== t12 || $[30] !== t9) {
|
|
2995
3166
|
t13 = /* @__PURE__ */ jsxRuntime.jsxs(ui.Container, { className: "w-full flex flex-col py-4 gap-4", maxWidth: "6xl", children: [
|
|
2996
3167
|
children,
|
|
2997
3168
|
t9,
|
|
2998
3169
|
t10,
|
|
2999
3170
|
t12
|
|
3000
3171
|
] });
|
|
3001
|
-
$[
|
|
3002
|
-
$[
|
|
3003
|
-
$[
|
|
3004
|
-
$[
|
|
3172
|
+
$[28] = children;
|
|
3173
|
+
$[29] = t12;
|
|
3174
|
+
$[30] = t9;
|
|
3175
|
+
$[31] = t13;
|
|
3005
3176
|
} else {
|
|
3006
|
-
t13 = $[
|
|
3177
|
+
t13 = $[31];
|
|
3007
3178
|
}
|
|
3008
3179
|
return t13;
|
|
3009
3180
|
};
|
|
@@ -3091,6 +3262,10 @@
|
|
|
3091
3262
|
const {
|
|
3092
3263
|
t
|
|
3093
3264
|
} = core.useTranslation();
|
|
3265
|
+
const licenseStatus = core.useLicenseStatus();
|
|
3266
|
+
if (core.isProPaused(licenseStatus)) {
|
|
3267
|
+
return null;
|
|
3268
|
+
}
|
|
3094
3269
|
let t1;
|
|
3095
3270
|
if ($[0] !== noRoles || $[1] !== noUsers || $[2] !== t) {
|
|
3096
3271
|
t1 = noUsers && noRoles ? t("create_default_roles_and_add_admin") : noUsers ? t("add_current_user_as_admin") : noRoles ? t("create_default_roles") : void 0;
|