@firecms/user_management 3.3.0-canary.d3242eb → 3.4.0-canary.00f9be5
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 +6 -6
- package/src/components/UserManagementPausedNotice.tsx +37 -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
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Shown by the Users and Roles views instead of their editors while FireCMS
|
|
4
|
+
* PRO is paused. The user management plugin itself stays mounted, so sign-in
|
|
5
|
+
* and role checks keep working; only editing users and roles is paused.
|
|
6
|
+
*/
|
|
7
|
+
export declare function UserManagementPausedNotice(): React.JSX.Element;
|
package/dist/index.es.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import React, { useEffect, useCallback, useContext, useState } from "react";
|
|
2
2
|
import equal from "react-fast-compare";
|
|
3
|
-
import { removeUndefined, useTranslation, useAuthController, toSnakeCase, FieldCaption, ConfirmationDialog, useNavigationController, useSnackbarController, useCustomizationController, defaultDateFormat } from "@firecms/core";
|
|
3
|
+
import { removeUndefined, useTranslation, useAuthController, toSnakeCase, FieldCaption, ConfirmationDialog, useLicenseStatus, getLicenseSubscribeUrl, isProPaused, useNavigationController, useSnackbarController, useCustomizationController, useDateFnsLocale, defaultDateFormat } from "@firecms/core";
|
|
4
4
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
5
5
|
import { c } from "react-compiler-runtime";
|
|
6
|
-
import { getColorSchemeForSeed, Chip, TableRow, TableCell, Checkbox, Tooltip, Button, Typography, DialogTitle, TextField, TableHeader, TableBody, Paper, Table, SelectItem, Select, DialogContent, LoadingButton, DialogActions, Dialog, IconButton, DeleteIcon, CenteredView,
|
|
6
|
+
import { getColorSchemeForSeed, Chip, TableRow, TableCell, Checkbox, Tooltip, Button, Typography, DialogTitle, TextField, TableHeader, TableBody, Paper, Table, SelectItem, Select, DialogContent, LoadingButton, DialogActions, Dialog, IconButton, DeleteIcon, CenteredView, Container, AddIcon, CopyIcon, MultiSelectItem, MultiSelect, Avatar } from "@firecms/ui";
|
|
7
7
|
import * as Yup from "yup";
|
|
8
8
|
import { useCreateFormex, getIn, Formex } from "@firecms/formex";
|
|
9
9
|
import { format } from "date-fns";
|
|
10
|
-
import * as locales from "date-fns/locale";
|
|
11
10
|
const RESERVED_GROUPS = ["Admin"];
|
|
12
11
|
const DEFAULT_PERMISSIONS = {
|
|
13
12
|
read: false,
|
|
@@ -253,7 +252,8 @@ function useBuildUserManagement({
|
|
|
253
252
|
id: userExists.uid
|
|
254
253
|
};
|
|
255
254
|
await dataSourceDelegate.deleteEntity({
|
|
256
|
-
entity
|
|
255
|
+
entity,
|
|
256
|
+
pathSegments: void 0
|
|
257
257
|
}).then(() => {
|
|
258
258
|
console.debug("Deleted previous user", userExists);
|
|
259
259
|
}).catch((e_3) => {
|
|
@@ -263,6 +263,10 @@ function useBuildUserManagement({
|
|
|
263
263
|
return dataSourceDelegate.saveEntity({
|
|
264
264
|
status: "existing",
|
|
265
265
|
path: usersPath,
|
|
266
|
+
// `usersPath` / `rolesPath` are configurable path strings this hook never parses.
|
|
267
|
+
// Segments are left undefined rather than split out of one: absent means "not known
|
|
268
|
+
// here", and a split would be wrong for any configured id containing "/".
|
|
269
|
+
pathSegments: void 0,
|
|
266
270
|
entityId: email,
|
|
267
271
|
values: removeUndefined(data)
|
|
268
272
|
}).then(() => user);
|
|
@@ -278,6 +282,10 @@ function useBuildUserManagement({
|
|
|
278
282
|
return dataSourceDelegate.saveEntity({
|
|
279
283
|
status: "existing",
|
|
280
284
|
path: rolesPath,
|
|
285
|
+
// `usersPath` / `rolesPath` are configurable path strings this hook never parses.
|
|
286
|
+
// Segments are left undefined rather than split out of one: absent means "not known
|
|
287
|
+
// here", and a split would be wrong for any configured id containing "/".
|
|
288
|
+
pathSegments: void 0,
|
|
281
289
|
entityId: id,
|
|
282
290
|
values: removeUndefined(roleData)
|
|
283
291
|
}).then(() => {
|
|
@@ -297,7 +305,8 @@ function useBuildUserManagement({
|
|
|
297
305
|
values: {}
|
|
298
306
|
};
|
|
299
307
|
await dataSourceDelegate.deleteEntity({
|
|
300
|
-
entity: entity_0
|
|
308
|
+
entity: entity_0,
|
|
309
|
+
pathSegments: void 0
|
|
301
310
|
});
|
|
302
311
|
}, [usersPath, dataSourceDelegate?.initialised]);
|
|
303
312
|
const deleteRole = useCallback(async (role_0) => {
|
|
@@ -313,7 +322,8 @@ function useBuildUserManagement({
|
|
|
313
322
|
values: {}
|
|
314
323
|
};
|
|
315
324
|
await dataSourceDelegate.deleteEntity({
|
|
316
|
-
entity: entity_1
|
|
325
|
+
entity: entity_1,
|
|
326
|
+
pathSegments: void 0
|
|
317
327
|
});
|
|
318
328
|
}, [rolesPath, dataSourceDelegate?.initialised]);
|
|
319
329
|
const collectionPermissions = useCallback(({
|
|
@@ -1954,14 +1964,96 @@ function RolesTable(t0) {
|
|
|
1954
1964
|
}
|
|
1955
1965
|
return t21;
|
|
1956
1966
|
}
|
|
1967
|
+
function UserManagementPausedNotice() {
|
|
1968
|
+
const $ = c(20);
|
|
1969
|
+
const {
|
|
1970
|
+
t
|
|
1971
|
+
} = useTranslation();
|
|
1972
|
+
const licenseStatus = useLicenseStatus();
|
|
1973
|
+
let t0;
|
|
1974
|
+
if ($[0] !== licenseStatus?.licenseState || $[1] !== t) {
|
|
1975
|
+
t0 = licenseStatus?.licenseState === "invalid_project" ? t("license_add_project_to_license") : licenseStatus?.licenseState === "over_quota" ? t("license_update_license") : t("license_get_license");
|
|
1976
|
+
$[0] = licenseStatus?.licenseState;
|
|
1977
|
+
$[1] = t;
|
|
1978
|
+
$[2] = t0;
|
|
1979
|
+
} else {
|
|
1980
|
+
t0 = $[2];
|
|
1981
|
+
}
|
|
1982
|
+
const linkLabel = t0;
|
|
1983
|
+
let t1;
|
|
1984
|
+
if ($[3] !== t) {
|
|
1985
|
+
t1 = t("pro_features_paused");
|
|
1986
|
+
$[3] = t;
|
|
1987
|
+
$[4] = t1;
|
|
1988
|
+
} else {
|
|
1989
|
+
t1 = $[4];
|
|
1990
|
+
}
|
|
1991
|
+
let t2;
|
|
1992
|
+
if ($[5] !== t1) {
|
|
1993
|
+
t2 = /* @__PURE__ */ jsx(Typography, { variant: "subtitle2", className: "uppercase", children: t1 });
|
|
1994
|
+
$[5] = t1;
|
|
1995
|
+
$[6] = t2;
|
|
1996
|
+
} else {
|
|
1997
|
+
t2 = $[6];
|
|
1998
|
+
}
|
|
1999
|
+
let t3;
|
|
2000
|
+
if ($[7] !== t) {
|
|
2001
|
+
t3 = t("user_management_paused_description");
|
|
2002
|
+
$[7] = t;
|
|
2003
|
+
$[8] = t3;
|
|
2004
|
+
} else {
|
|
2005
|
+
t3 = $[8];
|
|
2006
|
+
}
|
|
2007
|
+
let t4;
|
|
2008
|
+
if ($[9] !== t3) {
|
|
2009
|
+
t4 = /* @__PURE__ */ jsx(Typography, { children: t3 });
|
|
2010
|
+
$[9] = t3;
|
|
2011
|
+
$[10] = t4;
|
|
2012
|
+
} else {
|
|
2013
|
+
t4 = $[10];
|
|
2014
|
+
}
|
|
2015
|
+
let t5;
|
|
2016
|
+
if ($[11] !== licenseStatus) {
|
|
2017
|
+
t5 = getLicenseSubscribeUrl(licenseStatus);
|
|
2018
|
+
$[11] = licenseStatus;
|
|
2019
|
+
$[12] = t5;
|
|
2020
|
+
} else {
|
|
2021
|
+
t5 = $[12];
|
|
2022
|
+
}
|
|
2023
|
+
let t6;
|
|
2024
|
+
if ($[13] !== linkLabel || $[14] !== t5) {
|
|
2025
|
+
t6 = /* @__PURE__ */ jsx(Button, { component: "a", href: t5, target: "_blank", rel: "noopener noreferrer", children: linkLabel });
|
|
2026
|
+
$[13] = linkLabel;
|
|
2027
|
+
$[14] = t5;
|
|
2028
|
+
$[15] = t6;
|
|
2029
|
+
} else {
|
|
2030
|
+
t6 = $[15];
|
|
2031
|
+
}
|
|
2032
|
+
let t7;
|
|
2033
|
+
if ($[16] !== t2 || $[17] !== t4 || $[18] !== t6) {
|
|
2034
|
+
t7 = /* @__PURE__ */ jsxs(Paper, { className: "flex flex-col items-start px-4 py-6 bg-white dark:bg-surface-accent-800 gap-2", children: [
|
|
2035
|
+
t2,
|
|
2036
|
+
t4,
|
|
2037
|
+
t6
|
|
2038
|
+
] });
|
|
2039
|
+
$[16] = t2;
|
|
2040
|
+
$[17] = t4;
|
|
2041
|
+
$[18] = t6;
|
|
2042
|
+
$[19] = t7;
|
|
2043
|
+
} else {
|
|
2044
|
+
t7 = $[19];
|
|
2045
|
+
}
|
|
2046
|
+
return t7;
|
|
2047
|
+
}
|
|
1957
2048
|
const RolesView = React.memo(function RolesView2(t0) {
|
|
1958
|
-
const $ = c(
|
|
2049
|
+
const $ = c(33);
|
|
1959
2050
|
const {
|
|
1960
2051
|
children
|
|
1961
2052
|
} = t0;
|
|
1962
2053
|
const {
|
|
1963
2054
|
t
|
|
1964
2055
|
} = useTranslation();
|
|
2056
|
+
const paused = isProPaused(useLicenseStatus());
|
|
1965
2057
|
const {
|
|
1966
2058
|
collections
|
|
1967
2059
|
} = useNavigationController();
|
|
@@ -1989,94 +2081,133 @@ const RolesView = React.memo(function RolesView2(t0) {
|
|
|
1989
2081
|
t2 = $[1];
|
|
1990
2082
|
}
|
|
1991
2083
|
const handleClose = t2;
|
|
2084
|
+
if (paused) {
|
|
2085
|
+
let t32;
|
|
2086
|
+
if ($[2] !== t) {
|
|
2087
|
+
t32 = t("roles");
|
|
2088
|
+
$[2] = t;
|
|
2089
|
+
$[3] = t32;
|
|
2090
|
+
} else {
|
|
2091
|
+
t32 = $[3];
|
|
2092
|
+
}
|
|
2093
|
+
let t42;
|
|
2094
|
+
if ($[4] !== t32) {
|
|
2095
|
+
t42 = /* @__PURE__ */ jsx(Typography, { gutterBottom: true, variant: "h4", className: "mt-12", component: "h4", children: t32 });
|
|
2096
|
+
$[4] = t32;
|
|
2097
|
+
$[5] = t42;
|
|
2098
|
+
} else {
|
|
2099
|
+
t42 = $[5];
|
|
2100
|
+
}
|
|
2101
|
+
let t52;
|
|
2102
|
+
if ($[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
2103
|
+
t52 = /* @__PURE__ */ jsx(UserManagementPausedNotice, {});
|
|
2104
|
+
$[6] = t52;
|
|
2105
|
+
} else {
|
|
2106
|
+
t52 = $[6];
|
|
2107
|
+
}
|
|
2108
|
+
let t62;
|
|
2109
|
+
if ($[7] !== children || $[8] !== t42) {
|
|
2110
|
+
t62 = /* @__PURE__ */ jsxs(Container, { className: "w-full flex flex-col py-4 gap-4", maxWidth: "6xl", children: [
|
|
2111
|
+
children,
|
|
2112
|
+
t42,
|
|
2113
|
+
t52
|
|
2114
|
+
] });
|
|
2115
|
+
$[7] = children;
|
|
2116
|
+
$[8] = t42;
|
|
2117
|
+
$[9] = t62;
|
|
2118
|
+
} else {
|
|
2119
|
+
t62 = $[9];
|
|
2120
|
+
}
|
|
2121
|
+
return t62;
|
|
2122
|
+
}
|
|
1992
2123
|
let t3;
|
|
1993
|
-
if ($[
|
|
2124
|
+
if ($[10] !== t) {
|
|
1994
2125
|
t3 = t("roles");
|
|
1995
|
-
$[
|
|
1996
|
-
$[
|
|
2126
|
+
$[10] = t;
|
|
2127
|
+
$[11] = t3;
|
|
1997
2128
|
} else {
|
|
1998
|
-
t3 = $[
|
|
2129
|
+
t3 = $[11];
|
|
1999
2130
|
}
|
|
2000
2131
|
let t4;
|
|
2001
|
-
if ($[
|
|
2132
|
+
if ($[12] !== t3) {
|
|
2002
2133
|
t4 = /* @__PURE__ */ jsx(Typography, { gutterBottom: true, variant: "h4", className: "flex-grow", component: "h4", children: t3 });
|
|
2003
|
-
$[
|
|
2004
|
-
$[
|
|
2134
|
+
$[12] = t3;
|
|
2135
|
+
$[13] = t4;
|
|
2005
2136
|
} else {
|
|
2006
|
-
t4 = $[
|
|
2137
|
+
t4 = $[13];
|
|
2007
2138
|
}
|
|
2008
2139
|
let t5;
|
|
2009
2140
|
let t6;
|
|
2010
|
-
if ($[
|
|
2141
|
+
if ($[14] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
2011
2142
|
t5 = /* @__PURE__ */ jsx(AddIcon, {});
|
|
2012
2143
|
t6 = () => setDialogOpen(true);
|
|
2013
|
-
$[
|
|
2014
|
-
$[
|
|
2144
|
+
$[14] = t5;
|
|
2145
|
+
$[15] = t6;
|
|
2015
2146
|
} else {
|
|
2016
|
-
t5 = $[
|
|
2017
|
-
t6 = $[
|
|
2147
|
+
t5 = $[14];
|
|
2148
|
+
t6 = $[15];
|
|
2018
2149
|
}
|
|
2019
2150
|
let t7;
|
|
2020
|
-
if ($[
|
|
2151
|
+
if ($[16] !== t) {
|
|
2021
2152
|
t7 = t("add_role");
|
|
2022
|
-
$[
|
|
2023
|
-
$[
|
|
2153
|
+
$[16] = t;
|
|
2154
|
+
$[17] = t7;
|
|
2024
2155
|
} else {
|
|
2025
|
-
t7 = $[
|
|
2156
|
+
t7 = $[17];
|
|
2026
2157
|
}
|
|
2027
2158
|
let t8;
|
|
2028
|
-
if ($[
|
|
2159
|
+
if ($[18] !== t7) {
|
|
2029
2160
|
t8 = /* @__PURE__ */ jsx(Button, { size: "large", startIcon: t5, onClick: t6, children: t7 });
|
|
2030
|
-
$[
|
|
2031
|
-
$[
|
|
2161
|
+
$[18] = t7;
|
|
2162
|
+
$[19] = t8;
|
|
2032
2163
|
} else {
|
|
2033
|
-
t8 = $[
|
|
2164
|
+
t8 = $[19];
|
|
2034
2165
|
}
|
|
2035
2166
|
let t9;
|
|
2036
|
-
if ($[
|
|
2167
|
+
if ($[20] !== t4 || $[21] !== t8) {
|
|
2037
2168
|
t9 = /* @__PURE__ */ jsxs("div", { className: "flex items-center mt-12", children: [
|
|
2038
2169
|
t4,
|
|
2039
2170
|
t8
|
|
2040
2171
|
] });
|
|
2041
|
-
$[
|
|
2042
|
-
$[
|
|
2043
|
-
$[
|
|
2172
|
+
$[20] = t4;
|
|
2173
|
+
$[21] = t8;
|
|
2174
|
+
$[22] = t9;
|
|
2044
2175
|
} else {
|
|
2045
|
-
t9 = $[
|
|
2176
|
+
t9 = $[22];
|
|
2046
2177
|
}
|
|
2047
2178
|
let t10;
|
|
2048
|
-
if ($[
|
|
2179
|
+
if ($[23] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
2049
2180
|
t10 = /* @__PURE__ */ jsx(RolesTable, { onRoleClicked, editable: true });
|
|
2050
|
-
$[
|
|
2181
|
+
$[23] = t10;
|
|
2051
2182
|
} else {
|
|
2052
|
-
t10 = $[
|
|
2183
|
+
t10 = $[23];
|
|
2053
2184
|
}
|
|
2054
2185
|
const t11 = selectedRole?.id ?? "new";
|
|
2055
2186
|
let t12;
|
|
2056
|
-
if ($[
|
|
2187
|
+
if ($[24] !== collections || $[25] !== dialogOpen || $[26] !== selectedRole || $[27] !== t11) {
|
|
2057
2188
|
t12 = /* @__PURE__ */ jsx(RolesDetailsForm, { open: dialogOpen, role: selectedRole, editable: true, collections, handleClose }, t11);
|
|
2058
|
-
$[
|
|
2059
|
-
$[
|
|
2060
|
-
$[
|
|
2061
|
-
$[
|
|
2062
|
-
$[
|
|
2189
|
+
$[24] = collections;
|
|
2190
|
+
$[25] = dialogOpen;
|
|
2191
|
+
$[26] = selectedRole;
|
|
2192
|
+
$[27] = t11;
|
|
2193
|
+
$[28] = t12;
|
|
2063
2194
|
} else {
|
|
2064
|
-
t12 = $[
|
|
2195
|
+
t12 = $[28];
|
|
2065
2196
|
}
|
|
2066
2197
|
let t13;
|
|
2067
|
-
if ($[
|
|
2198
|
+
if ($[29] !== children || $[30] !== t12 || $[31] !== t9) {
|
|
2068
2199
|
t13 = /* @__PURE__ */ jsxs(Container, { className: "w-full flex flex-col py-4 gap-4", maxWidth: "6xl", children: [
|
|
2069
2200
|
children,
|
|
2070
2201
|
t9,
|
|
2071
2202
|
t10,
|
|
2072
2203
|
t12
|
|
2073
2204
|
] });
|
|
2074
|
-
$[
|
|
2075
|
-
$[
|
|
2076
|
-
$[
|
|
2077
|
-
$[
|
|
2205
|
+
$[29] = children;
|
|
2206
|
+
$[30] = t12;
|
|
2207
|
+
$[31] = t9;
|
|
2208
|
+
$[32] = t13;
|
|
2078
2209
|
} else {
|
|
2079
|
-
t13 = $[
|
|
2210
|
+
t13 = $[32];
|
|
2080
2211
|
}
|
|
2081
2212
|
return t13;
|
|
2082
2213
|
});
|
|
@@ -2569,7 +2700,7 @@ function UsersTable(t0) {
|
|
|
2569
2700
|
const authController = useAuthController();
|
|
2570
2701
|
const snackbarController = useSnackbarController();
|
|
2571
2702
|
const customizationController = useCustomizationController();
|
|
2572
|
-
const dateUtilsLocale = customizationController?.locale
|
|
2703
|
+
const dateUtilsLocale = useDateFnsLocale(customizationController?.locale);
|
|
2573
2704
|
const dateFormat = customizationController?.dateTimeFormat ?? defaultDateFormat;
|
|
2574
2705
|
const [userToBeDeleted, setUserToBeDeleted] = useState(void 0);
|
|
2575
2706
|
const [deleteInProgress, setDeleteInProgress] = useState(false);
|
|
@@ -2864,13 +2995,14 @@ function _temp$1(userRole) {
|
|
|
2864
2995
|
return /* @__PURE__ */ jsx(RoleChip, { role: userRole }, userRole?.id);
|
|
2865
2996
|
}
|
|
2866
2997
|
const UsersView = function UsersView2(t0) {
|
|
2867
|
-
const $ = c(
|
|
2998
|
+
const $ = c(32);
|
|
2868
2999
|
const {
|
|
2869
3000
|
children
|
|
2870
3001
|
} = t0;
|
|
2871
3002
|
const {
|
|
2872
3003
|
t
|
|
2873
3004
|
} = useTranslation();
|
|
3005
|
+
const paused = isProPaused(useLicenseStatus());
|
|
2874
3006
|
const [dialogOpen, setDialogOpen] = useState(false);
|
|
2875
3007
|
const [selectedUser, setSelectedUser] = useState();
|
|
2876
3008
|
const [newFormKey, setNewFormKey] = useState(0);
|
|
@@ -2909,89 +3041,128 @@ const UsersView = function UsersView2(t0) {
|
|
|
2909
3041
|
t3 = $[2];
|
|
2910
3042
|
}
|
|
2911
3043
|
const handleAddUser = t3;
|
|
3044
|
+
if (paused) {
|
|
3045
|
+
let t42;
|
|
3046
|
+
if ($[3] !== t) {
|
|
3047
|
+
t42 = t("users");
|
|
3048
|
+
$[3] = t;
|
|
3049
|
+
$[4] = t42;
|
|
3050
|
+
} else {
|
|
3051
|
+
t42 = $[4];
|
|
3052
|
+
}
|
|
3053
|
+
let t52;
|
|
3054
|
+
if ($[5] !== t42) {
|
|
3055
|
+
t52 = /* @__PURE__ */ jsx(Typography, { gutterBottom: true, variant: "h4", className: "mt-12", component: "h4", children: t42 });
|
|
3056
|
+
$[5] = t42;
|
|
3057
|
+
$[6] = t52;
|
|
3058
|
+
} else {
|
|
3059
|
+
t52 = $[6];
|
|
3060
|
+
}
|
|
3061
|
+
let t62;
|
|
3062
|
+
if ($[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
3063
|
+
t62 = /* @__PURE__ */ jsx(UserManagementPausedNotice, {});
|
|
3064
|
+
$[7] = t62;
|
|
3065
|
+
} else {
|
|
3066
|
+
t62 = $[7];
|
|
3067
|
+
}
|
|
3068
|
+
let t72;
|
|
3069
|
+
if ($[8] !== children || $[9] !== t52) {
|
|
3070
|
+
t72 = /* @__PURE__ */ jsxs(Container, { className: "w-full flex flex-col py-4 gap-4", maxWidth: "6xl", children: [
|
|
3071
|
+
children,
|
|
3072
|
+
t52,
|
|
3073
|
+
t62
|
|
3074
|
+
] });
|
|
3075
|
+
$[8] = children;
|
|
3076
|
+
$[9] = t52;
|
|
3077
|
+
$[10] = t72;
|
|
3078
|
+
} else {
|
|
3079
|
+
t72 = $[10];
|
|
3080
|
+
}
|
|
3081
|
+
return t72;
|
|
3082
|
+
}
|
|
2912
3083
|
let t4;
|
|
2913
|
-
if ($[
|
|
3084
|
+
if ($[11] !== t) {
|
|
2914
3085
|
t4 = t("users");
|
|
2915
|
-
$[
|
|
2916
|
-
$[
|
|
3086
|
+
$[11] = t;
|
|
3087
|
+
$[12] = t4;
|
|
2917
3088
|
} else {
|
|
2918
|
-
t4 = $[
|
|
3089
|
+
t4 = $[12];
|
|
2919
3090
|
}
|
|
2920
3091
|
let t5;
|
|
2921
|
-
if ($[
|
|
3092
|
+
if ($[13] !== t4) {
|
|
2922
3093
|
t5 = /* @__PURE__ */ jsx(Typography, { gutterBottom: true, variant: "h4", className: "flex-grow", component: "h4", children: t4 });
|
|
2923
|
-
$[
|
|
2924
|
-
$[
|
|
3094
|
+
$[13] = t4;
|
|
3095
|
+
$[14] = t5;
|
|
2925
3096
|
} else {
|
|
2926
|
-
t5 = $[
|
|
3097
|
+
t5 = $[14];
|
|
2927
3098
|
}
|
|
2928
3099
|
let t6;
|
|
2929
|
-
if ($[
|
|
3100
|
+
if ($[15] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
2930
3101
|
t6 = /* @__PURE__ */ jsx(AddIcon, {});
|
|
2931
|
-
$[
|
|
3102
|
+
$[15] = t6;
|
|
2932
3103
|
} else {
|
|
2933
|
-
t6 = $[
|
|
3104
|
+
t6 = $[15];
|
|
2934
3105
|
}
|
|
2935
3106
|
let t7;
|
|
2936
|
-
if ($[
|
|
3107
|
+
if ($[16] !== t) {
|
|
2937
3108
|
t7 = t("add_user");
|
|
2938
|
-
$[
|
|
2939
|
-
$[
|
|
3109
|
+
$[16] = t;
|
|
3110
|
+
$[17] = t7;
|
|
2940
3111
|
} else {
|
|
2941
|
-
t7 = $[
|
|
3112
|
+
t7 = $[17];
|
|
2942
3113
|
}
|
|
2943
3114
|
let t8;
|
|
2944
|
-
if ($[
|
|
3115
|
+
if ($[18] !== t7) {
|
|
2945
3116
|
t8 = /* @__PURE__ */ jsx(Button, { size: "large", startIcon: t6, onClick: handleAddUser, children: t7 });
|
|
2946
|
-
$[
|
|
2947
|
-
$[
|
|
3117
|
+
$[18] = t7;
|
|
3118
|
+
$[19] = t8;
|
|
2948
3119
|
} else {
|
|
2949
|
-
t8 = $[
|
|
3120
|
+
t8 = $[19];
|
|
2950
3121
|
}
|
|
2951
3122
|
let t9;
|
|
2952
|
-
if ($[
|
|
3123
|
+
if ($[20] !== t5 || $[21] !== t8) {
|
|
2953
3124
|
t9 = /* @__PURE__ */ jsxs("div", { className: "flex items-center mt-12", children: [
|
|
2954
3125
|
t5,
|
|
2955
3126
|
t8
|
|
2956
3127
|
] });
|
|
2957
|
-
$[
|
|
2958
|
-
$[
|
|
2959
|
-
$[
|
|
3128
|
+
$[20] = t5;
|
|
3129
|
+
$[21] = t8;
|
|
3130
|
+
$[22] = t9;
|
|
2960
3131
|
} else {
|
|
2961
|
-
t9 = $[
|
|
3132
|
+
t9 = $[22];
|
|
2962
3133
|
}
|
|
2963
3134
|
let t10;
|
|
2964
|
-
if ($[
|
|
3135
|
+
if ($[23] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
2965
3136
|
t10 = /* @__PURE__ */ jsx(UsersTable, { onUserClicked });
|
|
2966
|
-
$[
|
|
3137
|
+
$[23] = t10;
|
|
2967
3138
|
} else {
|
|
2968
|
-
t10 = $[
|
|
3139
|
+
t10 = $[23];
|
|
2969
3140
|
}
|
|
2970
3141
|
const t11 = selectedUser?.uid ?? `new-${newFormKey}`;
|
|
2971
3142
|
let t12;
|
|
2972
|
-
if ($[
|
|
3143
|
+
if ($[24] !== dialogOpen || $[25] !== selectedUser || $[26] !== t11) {
|
|
2973
3144
|
t12 = /* @__PURE__ */ jsx(UserDetailsForm, { open: dialogOpen, user: selectedUser, handleClose }, t11);
|
|
2974
|
-
$[
|
|
2975
|
-
$[
|
|
2976
|
-
$[
|
|
2977
|
-
$[
|
|
3145
|
+
$[24] = dialogOpen;
|
|
3146
|
+
$[25] = selectedUser;
|
|
3147
|
+
$[26] = t11;
|
|
3148
|
+
$[27] = t12;
|
|
2978
3149
|
} else {
|
|
2979
|
-
t12 = $[
|
|
3150
|
+
t12 = $[27];
|
|
2980
3151
|
}
|
|
2981
3152
|
let t13;
|
|
2982
|
-
if ($[
|
|
3153
|
+
if ($[28] !== children || $[29] !== t12 || $[30] !== t9) {
|
|
2983
3154
|
t13 = /* @__PURE__ */ jsxs(Container, { className: "w-full flex flex-col py-4 gap-4", maxWidth: "6xl", children: [
|
|
2984
3155
|
children,
|
|
2985
3156
|
t9,
|
|
2986
3157
|
t10,
|
|
2987
3158
|
t12
|
|
2988
3159
|
] });
|
|
2989
|
-
$[
|
|
2990
|
-
$[
|
|
2991
|
-
$[
|
|
2992
|
-
$[
|
|
3160
|
+
$[28] = children;
|
|
3161
|
+
$[29] = t12;
|
|
3162
|
+
$[30] = t9;
|
|
3163
|
+
$[31] = t13;
|
|
2993
3164
|
} else {
|
|
2994
|
-
t13 = $[
|
|
3165
|
+
t13 = $[31];
|
|
2995
3166
|
}
|
|
2996
3167
|
return t13;
|
|
2997
3168
|
};
|
|
@@ -3079,6 +3250,10 @@ function IntroWidget(t0) {
|
|
|
3079
3250
|
const {
|
|
3080
3251
|
t
|
|
3081
3252
|
} = useTranslation();
|
|
3253
|
+
const licenseStatus = useLicenseStatus();
|
|
3254
|
+
if (isProPaused(licenseStatus)) {
|
|
3255
|
+
return null;
|
|
3256
|
+
}
|
|
3082
3257
|
let t1;
|
|
3083
3258
|
if ($[0] !== noRoles || $[1] !== noUsers || $[2] !== t) {
|
|
3084
3259
|
t1 = noUsers && noRoles ? t("create_default_roles_and_add_admin") : noUsers ? t("add_current_user_as_admin") : noRoles ? t("create_default_roles") : void 0;
|