strapi-plugin-firebase-authentication 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/{App-B7d4qS3T.js → App-CAgq2cOo.js} +277 -279
- package/dist/_chunks/{App-CQ9ehArz.mjs → App-CyeC5fLT.mjs} +193 -195
- package/dist/_chunks/api-BL-wXuSb.js +56776 -0
- package/dist/_chunks/api-Bjer83Qp.mjs +56759 -0
- package/dist/_chunks/index-Bg-lGlji.mjs +2758 -0
- package/dist/_chunks/{index-Cwp9xkG4.js → index-CTenjpqN.js} +158 -159
- package/dist/_chunks/{index-0tTyhxbb.mjs → index-Kidqhaeq.mjs} +139 -140
- package/dist/_chunks/index-Rervtuh1.js +2757 -0
- package/dist/admin/index.js +1 -3
- package/dist/admin/index.mjs +2 -4
- package/dist/server/index.js +375 -380
- package/dist/server/index.mjs +375 -380
- package/dist/server/src/controllers/firebaseController.d.ts +2 -2
- package/dist/server/src/index.d.ts +14 -4
- package/dist/server/src/policies/index.d.ts +3 -1
- package/dist/server/src/policies/is-authenticated.d.ts +6 -0
- package/dist/server/src/routes/content-api.d.ts +10 -2
- package/dist/server/src/routes/index.d.ts +10 -2
- package/dist/server/src/services/firebaseService.d.ts +5 -1
- package/dist/server/src/services/index.d.ts +1 -1
- package/package.json +8 -8
- package/dist/_chunks/api-BM2UtpvM.mjs +0 -36
- package/dist/_chunks/api-DYP-1kdx.js +0 -35
- package/dist/_chunks/index-B5EwGI_y.js +0 -814
- package/dist/_chunks/index-CMFutRyI.mjs +0 -815
|
@@ -2,16 +2,14 @@ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
|
2
2
|
import { Layouts, useQueryParams as useQueryParams$1, getFetchClient, Pagination, useNotification, Page } from "@strapi/strapi/admin";
|
|
3
3
|
import { useNavigate, useLocation, useParams, Routes, Route } from "react-router-dom";
|
|
4
4
|
import { Provider } from "@radix-ui/react-tooltip";
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
5
|
+
import m__default, { useState, useCallback, useMemo, useEffect, useRef, useLayoutEffect } from "react";
|
|
6
|
+
import { z as zc, T, R, N as Nn, A as Ar, S as S1, k as k1, a as A1, b as Tr, E, t as t1, v as v1, C as C1, $ as $1, c as bo, w as wo, h as h0, d as a0, o as ot, K as Km, x as x1, G as G0, e as vm, g as getFirebaseConfig$1, F as Fm, D as D1, p as pl } from "./api-Bjer83Qp.mjs";
|
|
7
7
|
import { useIntl } from "react-intl";
|
|
8
|
-
import { i as isArguments_1, a as isBufferExports, b as isTypedArray_1, c as isLength_1, d as isFunction_1, _ as _getTag, e as _Stack, f as _equalArrays, g as _equalByTag, h as isObjectLike_1, j as getDefaultExportFromCjs, k as _baseGetTag, l as _MapCache, m as _Symbol, P as PLUGIN_ID,
|
|
9
|
-
import { ArrowLeft, Key, Trash, WarningCircle, CaretUp, CaretDown, Search, Plus, Pencil } from "@strapi/icons";
|
|
8
|
+
import { i as isArguments_1, a as isBufferExports, b as isTypedArray_1, c as isLength_1, d as isFunction_1, _ as _getTag, e as _Stack, f as _equalArrays, g as _equalByTag, h as isObjectLike_1, j as getDefaultExportFromCjs, U as U2, k as _baseGetTag, l as _MapCache, m as _Symbol, n as m3, o as bn, N as Nn$1, Y as Y2, J as J2, P as PLUGIN_ID, p as getAugmentedNamespace, q as commonjsGlobal, u as un, s as sn, r as _3 } from "./index-Bg-lGlji.mjs";
|
|
10
9
|
import styled from "styled-components";
|
|
11
10
|
import { RxCheck, RxCross2 } from "react-icons/rx";
|
|
12
11
|
import { AiOutlineUserAdd, AiFillPhone, AiFillMail, AiFillYahoo, AiFillGithub, AiFillTwitterCircle, AiFillFacebook, AiFillApple, AiFillGoogleCircle } from "react-icons/ai";
|
|
13
12
|
import { MdPassword } from "react-icons/md";
|
|
14
|
-
import { g as getFirebaseConfig$1 } from "./api-BM2UtpvM.mjs";
|
|
15
13
|
import * as PhoneInputModule from "react-phone-input-2";
|
|
16
14
|
import "react-phone-input-2/lib/style.css";
|
|
17
15
|
import validator from "validator";
|
|
@@ -278,8 +276,8 @@ const Header = ({
|
|
|
278
276
|
}) => {
|
|
279
277
|
const navigate = useNavigate();
|
|
280
278
|
const didChangeData = !isEqual$1(initialData, modifiedData) || isCreatingEntry && !isEmpty$1(modifiedData);
|
|
281
|
-
const primaryAction = /* @__PURE__ */ jsx(
|
|
282
|
-
|
|
279
|
+
const primaryAction = /* @__PURE__ */ jsx(T, { children: /* @__PURE__ */ jsx(R, { children: /* @__PURE__ */ jsx(
|
|
280
|
+
Nn,
|
|
283
281
|
{
|
|
284
282
|
disabled: !didChangeData || isSubmitButtonDisabled,
|
|
285
283
|
onClick: onSave,
|
|
@@ -294,9 +292,9 @@ const Header = ({
|
|
|
294
292
|
title,
|
|
295
293
|
primaryAction,
|
|
296
294
|
navigationAction: /* @__PURE__ */ jsx(
|
|
297
|
-
|
|
295
|
+
zc,
|
|
298
296
|
{
|
|
299
|
-
startIcon: /* @__PURE__ */ jsx(
|
|
297
|
+
startIcon: /* @__PURE__ */ jsx(U2, {}),
|
|
300
298
|
onClick: (e2) => {
|
|
301
299
|
e2.preventDefault();
|
|
302
300
|
navigate(-1);
|
|
@@ -462,7 +460,7 @@ const providerNameMapping = {
|
|
|
462
460
|
anonymous: "Anonymous"
|
|
463
461
|
};
|
|
464
462
|
const MapProviderToIcon = ({ providerData }) => {
|
|
465
|
-
return /* @__PURE__ */ jsx(
|
|
463
|
+
return /* @__PURE__ */ jsx(T, { gap: 2, children: providerData?.map(({ providerId }) => /* @__PURE__ */ jsx(Ar, { description: providerNameMapping[providerId] || providerId, children: /* @__PURE__ */ jsx("div", { children: providerIconMapping[providerId] || providerId }) }, providerId)) });
|
|
466
464
|
};
|
|
467
465
|
function _typeof(o) {
|
|
468
466
|
"@babel/helpers - typeof";
|
|
@@ -772,7 +770,7 @@ var formatters = {
|
|
|
772
770
|
return addLeadingZeros(weekYear, token.length);
|
|
773
771
|
},
|
|
774
772
|
// ISO week-numbering year
|
|
775
|
-
R: function
|
|
773
|
+
R: function R2(date, token) {
|
|
776
774
|
var isoWeekYear = getUTCISOWeekYear(date);
|
|
777
775
|
return addLeadingZeros(isoWeekYear, token.length);
|
|
778
776
|
},
|
|
@@ -948,7 +946,7 @@ var formatters = {
|
|
|
948
946
|
return addLeadingZeros(dayOfYear, token.length);
|
|
949
947
|
},
|
|
950
948
|
// Day of week
|
|
951
|
-
E: function
|
|
949
|
+
E: function E2(date, token, localize2) {
|
|
952
950
|
var dayOfWeek = date.getUTCDay();
|
|
953
951
|
switch (token) {
|
|
954
952
|
case "E":
|
|
@@ -1316,7 +1314,7 @@ var formatters = {
|
|
|
1316
1314
|
return addLeadingZeros(timestamp, token.length);
|
|
1317
1315
|
},
|
|
1318
1316
|
// Milliseconds timestamp
|
|
1319
|
-
T: function
|
|
1317
|
+
T: function T2(date, token, _localize, options) {
|
|
1320
1318
|
var originalDate = options._originalDate || date;
|
|
1321
1319
|
var timestamp = originalDate.getTime();
|
|
1322
1320
|
return addLeadingZeros(timestamp, token.length);
|
|
@@ -1992,10 +1990,10 @@ const getPasswordResetTooltip = (user) => {
|
|
|
1992
1990
|
}
|
|
1993
1991
|
return `Password reset is only available for users with email/password authentication. Current provider(s): ${providers}`;
|
|
1994
1992
|
};
|
|
1995
|
-
const TypographyMaxWidth = styled(
|
|
1993
|
+
const TypographyMaxWidth = styled(E)`
|
|
1996
1994
|
max-width: 300px;
|
|
1997
1995
|
`;
|
|
1998
|
-
const CellLink = styled(
|
|
1996
|
+
const CellLink = styled(A1)`
|
|
1999
1997
|
text-decoration: underline;
|
|
2000
1998
|
color: ${({ theme }) => theme.colors.primary600};
|
|
2001
1999
|
&:hover {
|
|
@@ -2006,7 +2004,7 @@ const CellLink = styled(Td)`
|
|
|
2006
2004
|
color: ${({ theme }) => theme.colors.primary600};
|
|
2007
2005
|
}
|
|
2008
2006
|
`;
|
|
2009
|
-
const ActionCell = styled(
|
|
2007
|
+
const ActionCell = styled(A1)`
|
|
2010
2008
|
/* Prevent scroll on button clicks */
|
|
2011
2009
|
position: relative;
|
|
2012
2010
|
|
|
@@ -2034,11 +2032,11 @@ const FirebaseTableRows = ({
|
|
|
2034
2032
|
const { formatMessage } = useIntl();
|
|
2035
2033
|
const navigate = useNavigate();
|
|
2036
2034
|
const location = useLocation();
|
|
2037
|
-
return /* @__PURE__ */ jsx(
|
|
2035
|
+
return /* @__PURE__ */ jsx(S1, { children: rows.map((data) => {
|
|
2038
2036
|
const isChecked = entriesToDelete.includes(data.id);
|
|
2039
|
-
return /* @__PURE__ */ jsxs(
|
|
2040
|
-
/* @__PURE__ */ jsx(
|
|
2041
|
-
|
|
2037
|
+
return /* @__PURE__ */ jsxs(k1, { children: [
|
|
2038
|
+
/* @__PURE__ */ jsx(A1, { children: /* @__PURE__ */ jsx(T, { justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsx(
|
|
2039
|
+
Tr,
|
|
2042
2040
|
{
|
|
2043
2041
|
"aria-label": formatMessage({
|
|
2044
2042
|
id: "app.component.table.select.one-entry",
|
|
@@ -2066,7 +2064,7 @@ const FirebaseTableRows = ({
|
|
|
2066
2064
|
data.uid
|
|
2067
2065
|
),
|
|
2068
2066
|
/* @__PURE__ */ jsx(CellLink, { children: /* @__PURE__ */ jsx(TypographyMaxWidth, { ellipsis: true, textColor: "neutral800", children: /* @__PURE__ */ jsx(
|
|
2069
|
-
|
|
2067
|
+
R,
|
|
2070
2068
|
{
|
|
2071
2069
|
onClick: () => {
|
|
2072
2070
|
navigate(
|
|
@@ -2077,15 +2075,15 @@ const FirebaseTableRows = ({
|
|
|
2077
2075
|
children: data.strapiId
|
|
2078
2076
|
}
|
|
2079
2077
|
) }) }, data.strapiId),
|
|
2080
|
-
/* @__PURE__ */ jsx(
|
|
2081
|
-
/* @__PURE__ */ jsx(
|
|
2082
|
-
/* @__PURE__ */ jsx(
|
|
2083
|
-
/* @__PURE__ */ jsx(
|
|
2084
|
-
/* @__PURE__ */ jsx(
|
|
2085
|
-
/* @__PURE__ */ jsx(
|
|
2086
|
-
/* @__PURE__ */ jsx(
|
|
2087
|
-
/* @__PURE__ */ jsx(
|
|
2088
|
-
/* @__PURE__ */ jsx(
|
|
2078
|
+
/* @__PURE__ */ jsx(A1, { children: /* @__PURE__ */ jsx(TypographyMaxWidth, { ellipsis: true, textColor: "neutral800", children: data.username }) }, data.username),
|
|
2079
|
+
/* @__PURE__ */ jsx(A1, { children: /* @__PURE__ */ jsx(TypographyMaxWidth, { ellipsis: true, textColor: "neutral800", children: data.displayName }) }),
|
|
2080
|
+
/* @__PURE__ */ jsx(A1, { style: { padding: 16 }, children: /* @__PURE__ */ jsx(TypographyMaxWidth, { ellipsis: true, textColor: "neutral800", children: data.email }) }, data.email),
|
|
2081
|
+
/* @__PURE__ */ jsx(A1, { style: { padding: 16 }, children: /* @__PURE__ */ jsx(TypographyMaxWidth, { ellipsis: true, textColor: "neutral800", children: data.phoneNumber || "-" }) }, data.phoneNumber),
|
|
2082
|
+
/* @__PURE__ */ jsx(A1, { children: /* @__PURE__ */ jsx(MapProviderToIcon, { providerData: data.providerData }) }),
|
|
2083
|
+
/* @__PURE__ */ jsx(A1, { children: data.emailVerified ? /* @__PURE__ */ jsx(RxCheck, { size: 24 }) : /* @__PURE__ */ jsx(RxCross2, { size: 24 }) }),
|
|
2084
|
+
/* @__PURE__ */ jsx(A1, { children: data.disabled ? /* @__PURE__ */ jsx(RxCheck, { size: 24 }) : /* @__PURE__ */ jsx(RxCross2, { size: 24 }) }, data.disabled),
|
|
2085
|
+
/* @__PURE__ */ jsx(A1, { children: /* @__PURE__ */ jsx(TypographyMaxWidth, { ellipsis: true, textColor: "neutral800", children: data.createdAt ? format(new Date(data.createdAt), "yyyy/MM/dd HH:mm z") : data.metadata?.creationTime ? format(new Date(data.metadata.creationTime), "yyyy/MM/dd HH:mm z") : "-" }) }, data.createdAt),
|
|
2086
|
+
/* @__PURE__ */ jsx(A1, { children: /* @__PURE__ */ jsx(TypographyMaxWidth, { ellipsis: true, textColor: "neutral800", children: data.metadata?.lastSignInTime ? format(new Date(data.metadata.lastSignInTime), "yyyy/MM/dd HH:mm z") : "-" }) }, data.metadata?.lastSignInTime || "lastSignInTime"),
|
|
2089
2087
|
/* @__PURE__ */ jsx(
|
|
2090
2088
|
ActionCell,
|
|
2091
2089
|
{
|
|
@@ -2096,9 +2094,9 @@ const FirebaseTableRows = ({
|
|
|
2096
2094
|
onMouseDown: (e2) => {
|
|
2097
2095
|
e2.preventDefault();
|
|
2098
2096
|
},
|
|
2099
|
-
children: /* @__PURE__ */ jsxs(
|
|
2097
|
+
children: /* @__PURE__ */ jsxs(T, { gap: 2, justifyContent: "center", alignItems: "center", children: [
|
|
2100
2098
|
hasPasswordProvider(data) ? /* @__PURE__ */ jsx(
|
|
2101
|
-
|
|
2099
|
+
Nn,
|
|
2102
2100
|
{
|
|
2103
2101
|
onClick: (e2) => {
|
|
2104
2102
|
e2.preventDefault();
|
|
@@ -2117,10 +2115,10 @@ const FirebaseTableRows = ({
|
|
|
2117
2115
|
padding: "0.25rem 0.75rem",
|
|
2118
2116
|
minWidth: "5.5rem"
|
|
2119
2117
|
},
|
|
2120
|
-
children: /* @__PURE__ */ jsx(
|
|
2118
|
+
children: /* @__PURE__ */ jsx(m3, { "aria-hidden": true, style: { display: "block" } })
|
|
2121
2119
|
}
|
|
2122
|
-
) : /* @__PURE__ */ jsx(
|
|
2123
|
-
|
|
2120
|
+
) : /* @__PURE__ */ jsx(Ar, { label: getPasswordResetTooltip(data), children: /* @__PURE__ */ jsx(R, { children: /* @__PURE__ */ jsx(
|
|
2121
|
+
Nn,
|
|
2124
2122
|
{
|
|
2125
2123
|
disabled: true,
|
|
2126
2124
|
variant: "secondary",
|
|
@@ -2136,11 +2134,11 @@ const FirebaseTableRows = ({
|
|
|
2136
2134
|
opacity: 0.5,
|
|
2137
2135
|
cursor: "not-allowed"
|
|
2138
2136
|
},
|
|
2139
|
-
children: /* @__PURE__ */ jsx(
|
|
2137
|
+
children: /* @__PURE__ */ jsx(m3, { "aria-hidden": true, style: { display: "block" } })
|
|
2140
2138
|
}
|
|
2141
2139
|
) }) }),
|
|
2142
2140
|
/* @__PURE__ */ jsx(
|
|
2143
|
-
|
|
2141
|
+
Nn,
|
|
2144
2142
|
{
|
|
2145
2143
|
onClick: (e2) => {
|
|
2146
2144
|
e2.preventDefault();
|
|
@@ -2159,7 +2157,7 @@ const FirebaseTableRows = ({
|
|
|
2159
2157
|
padding: "0.25rem 0.75rem",
|
|
2160
2158
|
minWidth: "5.5rem"
|
|
2161
2159
|
},
|
|
2162
|
-
children: /* @__PURE__ */ jsx(
|
|
2160
|
+
children: /* @__PURE__ */ jsx(bn, { "aria-hidden": true, style: { display: "block" } })
|
|
2163
2161
|
}
|
|
2164
2162
|
)
|
|
2165
2163
|
] })
|
|
@@ -2374,25 +2372,25 @@ const DeleteAccount = ({
|
|
|
2374
2372
|
setIsStrapiIncluded(true);
|
|
2375
2373
|
setIsFirebaseIncluded(true);
|
|
2376
2374
|
}, [isOpen]);
|
|
2377
|
-
return /* @__PURE__ */ jsx(
|
|
2378
|
-
/* @__PURE__ */ jsx(
|
|
2379
|
-
/* @__PURE__ */ jsx(
|
|
2380
|
-
/* @__PURE__ */ jsxs(
|
|
2381
|
-
/* @__PURE__ */ jsx(
|
|
2382
|
-
/* @__PURE__ */ jsx(
|
|
2375
|
+
return /* @__PURE__ */ jsx(t1.Root, { open: isOpen, onOpenChange: (open) => !open && onToggleDialog(), children: /* @__PURE__ */ jsxs(t1.Content, { children: [
|
|
2376
|
+
/* @__PURE__ */ jsx(t1.Header, { children: /* @__PURE__ */ jsx(t1.Title, { children: "Delete Account" }) }),
|
|
2377
|
+
/* @__PURE__ */ jsx(t1.Body, { children: /* @__PURE__ */ jsxs(T, { direction: "column", alignItems: "stretch", gap: 4, children: [
|
|
2378
|
+
/* @__PURE__ */ jsxs(T, { direction: "row", alignItems: "center", gap: 2, children: [
|
|
2379
|
+
/* @__PURE__ */ jsx(Nn$1, { fill: "danger700", width: "20px", height: "20px" }),
|
|
2380
|
+
/* @__PURE__ */ jsx(E, { textColor: "danger700", children: "After you delete an account, it's permanently deleted. Accounts cannot be undeleted." })
|
|
2383
2381
|
] }),
|
|
2384
|
-
isSingleRecord ? /* @__PURE__ */ jsxs(
|
|
2385
|
-
/* @__PURE__ */ jsx(
|
|
2386
|
-
/* @__PURE__ */ jsx(
|
|
2387
|
-
] }) : /* @__PURE__ */ jsxs(
|
|
2388
|
-
/* @__PURE__ */ jsx(
|
|
2389
|
-
/* @__PURE__ */ jsx(
|
|
2382
|
+
isSingleRecord ? /* @__PURE__ */ jsxs(T, { direction: "column", alignItems: "stretch", gap: 1, children: [
|
|
2383
|
+
/* @__PURE__ */ jsx(E, { variant: "sigma", children: "User account" }),
|
|
2384
|
+
/* @__PURE__ */ jsx(E, { children: email })
|
|
2385
|
+
] }) : /* @__PURE__ */ jsxs(T, { direction: "column", alignItems: "stretch", gap: 1, children: [
|
|
2386
|
+
/* @__PURE__ */ jsx(E, { variant: "sigma", children: "Bulk delete operation" }),
|
|
2387
|
+
/* @__PURE__ */ jsx(E, { children: "You are about to delete multiple user accounts" })
|
|
2390
2388
|
] }),
|
|
2391
|
-
/* @__PURE__ */ jsxs(
|
|
2392
|
-
/* @__PURE__ */ jsx(
|
|
2393
|
-
/* @__PURE__ */ jsxs(
|
|
2389
|
+
/* @__PURE__ */ jsxs(T, { direction: "column", alignItems: "stretch", gap: 2, children: [
|
|
2390
|
+
/* @__PURE__ */ jsx(E, { children: "Delete user from:" }),
|
|
2391
|
+
/* @__PURE__ */ jsxs(T, { direction: "row", alignItems: "center", gap: 4, children: [
|
|
2394
2392
|
/* @__PURE__ */ jsx(
|
|
2395
|
-
|
|
2393
|
+
Tr,
|
|
2396
2394
|
{
|
|
2397
2395
|
onCheckedChange: (checked) => setIsStrapiIncluded(checked === true),
|
|
2398
2396
|
checked: isStrapiIncluded,
|
|
@@ -2400,7 +2398,7 @@ const DeleteAccount = ({
|
|
|
2400
2398
|
}
|
|
2401
2399
|
),
|
|
2402
2400
|
/* @__PURE__ */ jsx(
|
|
2403
|
-
|
|
2401
|
+
Tr,
|
|
2404
2402
|
{
|
|
2405
2403
|
onCheckedChange: (checked) => setIsFirebaseIncluded(checked === true),
|
|
2406
2404
|
checked: isFirebaseIncluded,
|
|
@@ -2410,10 +2408,10 @@ const DeleteAccount = ({
|
|
|
2410
2408
|
] })
|
|
2411
2409
|
] })
|
|
2412
2410
|
] }) }),
|
|
2413
|
-
/* @__PURE__ */ jsxs(
|
|
2414
|
-
/* @__PURE__ */ jsx(
|
|
2411
|
+
/* @__PURE__ */ jsxs(t1.Footer, { children: [
|
|
2412
|
+
/* @__PURE__ */ jsx(Nn, { onClick: onToggleDialog, variant: "tertiary", children: "Cancel" }),
|
|
2415
2413
|
/* @__PURE__ */ jsx(
|
|
2416
|
-
|
|
2414
|
+
Nn,
|
|
2417
2415
|
{
|
|
2418
2416
|
variant: "danger",
|
|
2419
2417
|
onClick: () => {
|
|
@@ -2463,7 +2461,7 @@ const StyledTableContainer = styled.div`
|
|
|
2463
2461
|
cursor: pointer;
|
|
2464
2462
|
}
|
|
2465
2463
|
`;
|
|
2466
|
-
const BulkActionsBar = styled(
|
|
2464
|
+
const BulkActionsBar = styled(R)`
|
|
2467
2465
|
margin-bottom: 16px;
|
|
2468
2466
|
padding: 12px 0;
|
|
2469
2467
|
`;
|
|
@@ -2531,21 +2529,21 @@ const FirebaseTable = ({
|
|
|
2531
2529
|
});
|
|
2532
2530
|
};
|
|
2533
2531
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2534
|
-
/* @__PURE__ */ jsx(BulkActionsBar, { paddingLeft: 0, paddingRight: 0, children: /* @__PURE__ */ jsxs(
|
|
2535
|
-
/* @__PURE__ */ jsxs(
|
|
2532
|
+
/* @__PURE__ */ jsx(BulkActionsBar, { paddingLeft: 0, paddingRight: 0, children: /* @__PURE__ */ jsxs(T, { direction: "row", alignItems: "center", justifyContent: "space-between", wrap: "nowrap", children: [
|
|
2533
|
+
/* @__PURE__ */ jsxs(T, { direction: "row", alignItems: "center", gap: 2, wrap: "nowrap", children: [
|
|
2536
2534
|
action,
|
|
2537
2535
|
hasSelection && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2538
|
-
/* @__PURE__ */ jsxs(
|
|
2536
|
+
/* @__PURE__ */ jsxs(E, { variant: "omega", fontWeight: "semiBold", style: { whiteSpace: "nowrap" }, children: [
|
|
2539
2537
|
selectedCount,
|
|
2540
2538
|
" ",
|
|
2541
2539
|
selectedCount === 1 ? "entry" : "entries",
|
|
2542
2540
|
" selected"
|
|
2543
2541
|
] }),
|
|
2544
2542
|
/* @__PURE__ */ jsx(
|
|
2545
|
-
|
|
2543
|
+
Nn,
|
|
2546
2544
|
{
|
|
2547
2545
|
variant: "danger",
|
|
2548
|
-
startIcon: /* @__PURE__ */ jsx(
|
|
2546
|
+
startIcon: /* @__PURE__ */ jsx(bn, {}),
|
|
2549
2547
|
onClick: () => setShowBulkDeleteDialog(true),
|
|
2550
2548
|
size: "S",
|
|
2551
2549
|
style: { whiteSpace: "nowrap" },
|
|
@@ -2553,7 +2551,7 @@ const FirebaseTable = ({
|
|
|
2553
2551
|
}
|
|
2554
2552
|
),
|
|
2555
2553
|
/* @__PURE__ */ jsx(
|
|
2556
|
-
|
|
2554
|
+
Nn,
|
|
2557
2555
|
{
|
|
2558
2556
|
variant: "secondary",
|
|
2559
2557
|
onClick: clearSelection,
|
|
@@ -2566,10 +2564,10 @@ const FirebaseTable = ({
|
|
|
2566
2564
|
] }),
|
|
2567
2565
|
createAction
|
|
2568
2566
|
] }) }),
|
|
2569
|
-
/* @__PURE__ */ jsx(StyledTableContainer, { children: /* @__PURE__ */ jsxs(
|
|
2570
|
-
/* @__PURE__ */ jsx(
|
|
2571
|
-
/* @__PURE__ */ jsx(
|
|
2572
|
-
|
|
2567
|
+
/* @__PURE__ */ jsx(StyledTableContainer, { children: /* @__PURE__ */ jsxs(v1, { colCount: tableHeaders.length + 2, rowCount: rows.length + 1, children: [
|
|
2568
|
+
/* @__PURE__ */ jsx(C1, { children: /* @__PURE__ */ jsxs(k1, { children: [
|
|
2569
|
+
/* @__PURE__ */ jsx($1, { children: /* @__PURE__ */ jsx(
|
|
2570
|
+
Tr,
|
|
2573
2571
|
{
|
|
2574
2572
|
"aria-label": "Select all entries",
|
|
2575
2573
|
checked: isAllSelected,
|
|
@@ -2581,19 +2579,19 @@ const FirebaseTable = ({
|
|
|
2581
2579
|
const isSorted = sortBy === header.name;
|
|
2582
2580
|
const isAsc = sortOrder === "ASC";
|
|
2583
2581
|
const isSortable = header.metadatas.sortable;
|
|
2584
|
-
return /* @__PURE__ */ jsx(
|
|
2582
|
+
return /* @__PURE__ */ jsx($1, { children: isSortable ? /* @__PURE__ */ jsxs(
|
|
2585
2583
|
SortButton,
|
|
2586
2584
|
{
|
|
2587
2585
|
onClick: () => handleSort(header.name),
|
|
2588
2586
|
"aria-label": `Sort by ${header.metadatas.label}`,
|
|
2589
2587
|
children: [
|
|
2590
|
-
/* @__PURE__ */ jsx(
|
|
2591
|
-
isSorted && /* @__PURE__ */ jsx(Fragment, { children: isAsc ? /* @__PURE__ */ jsx(
|
|
2588
|
+
/* @__PURE__ */ jsx(E, { variant: "sigma", textColor: "neutral600", children: header.metadatas.label }),
|
|
2589
|
+
isSorted && /* @__PURE__ */ jsx(Fragment, { children: isAsc ? /* @__PURE__ */ jsx(Y2, { width: "10px", height: "10px" }) : /* @__PURE__ */ jsx(J2, { width: "10px", height: "10px" }) })
|
|
2592
2590
|
]
|
|
2593
2591
|
}
|
|
2594
|
-
) : /* @__PURE__ */ jsx(
|
|
2592
|
+
) : /* @__PURE__ */ jsx(E, { variant: "sigma", textColor: "neutral600", children: header.metadatas.label }) }, header.key);
|
|
2595
2593
|
}),
|
|
2596
|
-
/* @__PURE__ */ jsx(
|
|
2594
|
+
/* @__PURE__ */ jsx($1, { children: /* @__PURE__ */ jsx(E, { variant: "sigma", textColor: "neutral600", children: "Actions" }) })
|
|
2597
2595
|
] }) }),
|
|
2598
2596
|
/* @__PURE__ */ jsx(
|
|
2599
2597
|
FirebaseTableRows,
|
|
@@ -2719,21 +2717,21 @@ const PaginationFooter = ({ pageCount = 0 }) => {
|
|
|
2719
2717
|
const handlePageSizeChange = (value) => {
|
|
2720
2718
|
setQuery({ pageSize: value, page: 1 });
|
|
2721
2719
|
};
|
|
2722
|
-
return /* @__PURE__ */ jsx(
|
|
2723
|
-
/* @__PURE__ */ jsxs(
|
|
2724
|
-
/* @__PURE__ */ jsx(
|
|
2720
|
+
return /* @__PURE__ */ jsx(R, { paddingTop: 4, children: /* @__PURE__ */ jsxs(T, { alignItems: "center", justifyContent: "space-between", children: [
|
|
2721
|
+
/* @__PURE__ */ jsxs(T, { alignItems: "center", gap: 2, children: [
|
|
2722
|
+
/* @__PURE__ */ jsx(E, { variant: "pi", textColor: "neutral600", children: "Entries per page:" }),
|
|
2725
2723
|
/* @__PURE__ */ jsxs(
|
|
2726
|
-
|
|
2724
|
+
bo,
|
|
2727
2725
|
{
|
|
2728
2726
|
size: "S",
|
|
2729
2727
|
value: pageSize,
|
|
2730
2728
|
onChange: handlePageSizeChange,
|
|
2731
2729
|
"aria-label": "Entries per page",
|
|
2732
2730
|
children: [
|
|
2733
|
-
/* @__PURE__ */ jsx(
|
|
2734
|
-
/* @__PURE__ */ jsx(
|
|
2735
|
-
/* @__PURE__ */ jsx(
|
|
2736
|
-
/* @__PURE__ */ jsx(
|
|
2731
|
+
/* @__PURE__ */ jsx(wo, { value: "10", children: "10" }),
|
|
2732
|
+
/* @__PURE__ */ jsx(wo, { value: "25", children: "25" }),
|
|
2733
|
+
/* @__PURE__ */ jsx(wo, { value: "50", children: "50" }),
|
|
2734
|
+
/* @__PURE__ */ jsx(wo, { value: "100", children: "100" })
|
|
2737
2735
|
]
|
|
2738
2736
|
}
|
|
2739
2737
|
)
|
|
@@ -3067,9 +3065,9 @@ function nameOf(f) {
|
|
|
3067
3065
|
if (f.name) {
|
|
3068
3066
|
return f.name;
|
|
3069
3067
|
}
|
|
3070
|
-
var
|
|
3071
|
-
if (
|
|
3072
|
-
return
|
|
3068
|
+
var m4 = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
|
|
3069
|
+
if (m4) {
|
|
3070
|
+
return m4[1];
|
|
3073
3071
|
}
|
|
3074
3072
|
return null;
|
|
3075
3073
|
}
|
|
@@ -3135,7 +3133,7 @@ function isSet(x2) {
|
|
|
3135
3133
|
setSize.call(x2);
|
|
3136
3134
|
try {
|
|
3137
3135
|
mapSize.call(x2);
|
|
3138
|
-
} catch (
|
|
3136
|
+
} catch (m4) {
|
|
3139
3137
|
return true;
|
|
3140
3138
|
}
|
|
3141
3139
|
return x2 instanceof Set;
|
|
@@ -4882,8 +4880,8 @@ const SearchURLQuery = ({ label, placeholder = void 0 }) => {
|
|
|
4882
4880
|
}
|
|
4883
4881
|
};
|
|
4884
4882
|
if (isOpen) {
|
|
4885
|
-
return /* @__PURE__ */ jsx("div", { ref: wrapperRef, style: { width: "100%" }, children: /* @__PURE__ */ jsx(
|
|
4886
|
-
|
|
4883
|
+
return /* @__PURE__ */ jsx("div", { ref: wrapperRef, style: { width: "100%" }, children: /* @__PURE__ */ jsx(h0, { onSubmit: handleSubmit, children: /* @__PURE__ */ jsx(
|
|
4884
|
+
a0,
|
|
4887
4885
|
{
|
|
4888
4886
|
name: "search",
|
|
4889
4887
|
onChange: ({ target: { value: value2 } }) => setValue(value2),
|
|
@@ -4900,7 +4898,7 @@ const SearchURLQuery = ({ label, placeholder = void 0 }) => {
|
|
|
4900
4898
|
) }) });
|
|
4901
4899
|
}
|
|
4902
4900
|
return /* @__PURE__ */ jsx(
|
|
4903
|
-
|
|
4901
|
+
ot,
|
|
4904
4902
|
{
|
|
4905
4903
|
ref: iconButtonRef,
|
|
4906
4904
|
variant: "tertiary",
|
|
@@ -4909,7 +4907,7 @@ const SearchURLQuery = ({ label, placeholder = void 0 }) => {
|
|
|
4909
4907
|
id: "app.component.search.label",
|
|
4910
4908
|
defaultMessage: "Search"
|
|
4911
4909
|
}),
|
|
4912
|
-
children: /* @__PURE__ */ jsx(
|
|
4910
|
+
children: /* @__PURE__ */ jsx(un, {})
|
|
4913
4911
|
}
|
|
4914
4912
|
);
|
|
4915
4913
|
};
|
|
@@ -4981,23 +4979,23 @@ const ResetPassword = ({
|
|
|
4981
4979
|
setIsLoading(false);
|
|
4982
4980
|
}
|
|
4983
4981
|
};
|
|
4984
|
-
return /* @__PURE__ */ jsx(
|
|
4985
|
-
/* @__PURE__ */ jsx(
|
|
4986
|
-
/* @__PURE__ */ jsx(
|
|
4987
|
-
/* @__PURE__ */ jsxs(
|
|
4988
|
-
/* @__PURE__ */ jsx(
|
|
4989
|
-
/* @__PURE__ */ jsx(
|
|
4982
|
+
return /* @__PURE__ */ jsx(Km.Root, { open: isOpen, onOpenChange: (open) => !open && handleClose(), children: /* @__PURE__ */ jsxs(Km.Content, { children: [
|
|
4983
|
+
/* @__PURE__ */ jsx(Km.Header, { children: "Reset Password" }),
|
|
4984
|
+
/* @__PURE__ */ jsx(Km.Body, { children: /* @__PURE__ */ jsxs(T, { direction: "column", gap: 4, children: [
|
|
4985
|
+
/* @__PURE__ */ jsxs(T, { direction: "column", gap: 1, children: [
|
|
4986
|
+
/* @__PURE__ */ jsx(E, { variant: "sigma", children: "User email" }),
|
|
4987
|
+
/* @__PURE__ */ jsx(E, { children: email })
|
|
4990
4988
|
] }),
|
|
4991
|
-
/* @__PURE__ */ jsxs(
|
|
4992
|
-
/* @__PURE__ */ jsxs(
|
|
4993
|
-
/* @__PURE__ */ jsx(
|
|
4994
|
-
/* @__PURE__ */ jsx(
|
|
4989
|
+
/* @__PURE__ */ jsxs(x1.Root, { value: mode, onValueChange: (val) => setMode(val), children: [
|
|
4990
|
+
/* @__PURE__ */ jsxs(x1.List, { children: [
|
|
4991
|
+
/* @__PURE__ */ jsx(x1.Trigger, { value: "direct", children: "Set Password Directly" }),
|
|
4992
|
+
/* @__PURE__ */ jsx(x1.Trigger, { value: "email", children: "Send Reset Email" })
|
|
4995
4993
|
] }),
|
|
4996
|
-
/* @__PURE__ */ jsx(
|
|
4997
|
-
/* @__PURE__ */ jsx(
|
|
4998
|
-
/* @__PURE__ */ jsxs(
|
|
4994
|
+
/* @__PURE__ */ jsx(x1.Content, { value: "direct", children: /* @__PURE__ */ jsxs(T, { direction: "column", gap: 3, paddingTop: 4, children: [
|
|
4995
|
+
/* @__PURE__ */ jsx(E, { children: "Set a new password for this user. The user will not be notified of this change." }),
|
|
4996
|
+
/* @__PURE__ */ jsxs(T, { direction: "column", gap: 1, children: [
|
|
4999
4997
|
/* @__PURE__ */ jsx(
|
|
5000
|
-
|
|
4998
|
+
G0,
|
|
5001
4999
|
{
|
|
5002
5000
|
type: "password",
|
|
5003
5001
|
label: "New password",
|
|
@@ -5011,24 +5009,24 @@ const ResetPassword = ({
|
|
|
5011
5009
|
required: true
|
|
5012
5010
|
}
|
|
5013
5011
|
),
|
|
5014
|
-
isPasswordChanged && password && !validatePassword(password) && /* @__PURE__ */ jsx(
|
|
5012
|
+
isPasswordChanged && password && !validatePassword(password) && /* @__PURE__ */ jsx(E, { variant: "pi", textColor: "danger500", children: passwordMessage })
|
|
5015
5013
|
] })
|
|
5016
5014
|
] }) }),
|
|
5017
|
-
/* @__PURE__ */ jsx(
|
|
5015
|
+
/* @__PURE__ */ jsx(x1.Content, { value: "email", children: /* @__PURE__ */ jsx(T, { direction: "column", gap: 3, paddingTop: 4, children: !emailSent ? /* @__PURE__ */ jsxs(E, { children: [
|
|
5018
5016
|
"Send a password reset email to ",
|
|
5019
5017
|
/* @__PURE__ */ jsx("strong", { children: email }),
|
|
5020
5018
|
". The link will expire in 1 hour."
|
|
5021
|
-
] }) : /* @__PURE__ */ jsxs(
|
|
5019
|
+
] }) : /* @__PURE__ */ jsxs(vm, { variant: "success", title: "Email Sent", children: [
|
|
5022
5020
|
"Password reset email has been sent to ",
|
|
5023
5021
|
email
|
|
5024
5022
|
] }) }) })
|
|
5025
5023
|
] }),
|
|
5026
|
-
error && /* @__PURE__ */ jsx(
|
|
5024
|
+
error && /* @__PURE__ */ jsx(vm, { variant: "danger", title: "Error", children: error })
|
|
5027
5025
|
] }) }),
|
|
5028
|
-
/* @__PURE__ */ jsxs(
|
|
5029
|
-
/* @__PURE__ */ jsx(
|
|
5026
|
+
/* @__PURE__ */ jsxs(Km.Footer, { children: [
|
|
5027
|
+
/* @__PURE__ */ jsx(Nn, { onClick: handleClose, variant: "tertiary", children: emailSent ? "Close" : "Cancel" }),
|
|
5030
5028
|
!emailSent && /* @__PURE__ */ jsx(
|
|
5031
|
-
|
|
5029
|
+
Nn,
|
|
5032
5030
|
{
|
|
5033
5031
|
variant: mode === "direct" ? "danger-light" : "success",
|
|
5034
5032
|
loading: isLoading,
|
|
@@ -5071,25 +5069,25 @@ const ResendVerification = ({
|
|
|
5071
5069
|
setIsLoading(false);
|
|
5072
5070
|
}
|
|
5073
5071
|
};
|
|
5074
|
-
return /* @__PURE__ */ jsx(
|
|
5075
|
-
/* @__PURE__ */ jsx(
|
|
5076
|
-
/* @__PURE__ */ jsx(
|
|
5072
|
+
return /* @__PURE__ */ jsx(Km.Root, { open: isOpen, onOpenChange: (open) => !open && handleClose(), children: /* @__PURE__ */ jsxs(Km.Content, { children: [
|
|
5073
|
+
/* @__PURE__ */ jsx(Km.Header, { children: "Resend Verification Email" }),
|
|
5074
|
+
/* @__PURE__ */ jsx(Km.Body, { children: /* @__PURE__ */ jsxs(T, { direction: "column", gap: 4, alignItems: "center", children: [
|
|
5077
5075
|
!emailSent ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5078
|
-
/* @__PURE__ */ jsxs(
|
|
5076
|
+
/* @__PURE__ */ jsxs(E, { textAlign: "center", children: [
|
|
5079
5077
|
"Send a verification email to ",
|
|
5080
5078
|
/* @__PURE__ */ jsx("strong", { children: email }),
|
|
5081
5079
|
"?"
|
|
5082
5080
|
] }),
|
|
5083
|
-
/* @__PURE__ */ jsx(
|
|
5084
|
-
] }) : /* @__PURE__ */ jsxs(
|
|
5081
|
+
/* @__PURE__ */ jsx(E, { variant: "omega", textColor: "neutral600", textAlign: "center", children: "The link will expire in 1 hour." })
|
|
5082
|
+
] }) : /* @__PURE__ */ jsxs(vm, { variant: "success", title: "Email Sent", children: [
|
|
5085
5083
|
"Verification email has been sent to ",
|
|
5086
5084
|
email
|
|
5087
5085
|
] }),
|
|
5088
|
-
error && /* @__PURE__ */ jsx(
|
|
5086
|
+
error && /* @__PURE__ */ jsx(vm, { variant: "danger", title: "Error", children: error })
|
|
5089
5087
|
] }) }),
|
|
5090
|
-
/* @__PURE__ */ jsxs(
|
|
5091
|
-
/* @__PURE__ */ jsx(
|
|
5092
|
-
!emailSent && /* @__PURE__ */ jsx(
|
|
5088
|
+
/* @__PURE__ */ jsxs(Km.Footer, { children: [
|
|
5089
|
+
/* @__PURE__ */ jsx(Nn, { onClick: handleClose, variant: "tertiary", children: emailSent ? "Close" : "Cancel" }),
|
|
5090
|
+
!emailSent && /* @__PURE__ */ jsx(Nn, { variant: "success", loading: isLoading, onClick: handleSendEmail, children: "Send" })
|
|
5093
5091
|
] })
|
|
5094
5092
|
] }) });
|
|
5095
5093
|
};
|
|
@@ -5257,7 +5255,7 @@ function ListView({ data, meta }) {
|
|
|
5257
5255
|
navigate("users/create");
|
|
5258
5256
|
}, [navigate]);
|
|
5259
5257
|
const getCreateAction = useCallback(
|
|
5260
|
-
() => /* @__PURE__ */ jsx(
|
|
5258
|
+
() => /* @__PURE__ */ jsx(Nn, { onClick: handleNavigateToCreate, startIcon: /* @__PURE__ */ jsx(sn, {}), children: "Create" }),
|
|
5261
5259
|
[handleNavigateToCreate]
|
|
5262
5260
|
);
|
|
5263
5261
|
const handleCloseResetDialogue = useCallback(() => {
|
|
@@ -5322,7 +5320,7 @@ function ListView({ data, meta }) {
|
|
|
5322
5320
|
{
|
|
5323
5321
|
subtitle: headSubtitle,
|
|
5324
5322
|
title: HEADER_TITLE,
|
|
5325
|
-
navigationAction: /* @__PURE__ */ jsx(
|
|
5323
|
+
navigationAction: /* @__PURE__ */ jsx(zc, { startIcon: /* @__PURE__ */ jsx(U2, {}), to: "/content-manager/", children: "Back" })
|
|
5326
5324
|
}
|
|
5327
5325
|
),
|
|
5328
5326
|
/* @__PURE__ */ jsxs(Layouts.Content, { children: [
|
|
@@ -5434,11 +5432,11 @@ const HomePage = () => {
|
|
|
5434
5432
|
}
|
|
5435
5433
|
return /* @__PURE__ */ jsxs(StyledPageMain, { children: [
|
|
5436
5434
|
/* @__PURE__ */ jsx(Page.Title, { children: "Firebase Users" }),
|
|
5437
|
-
!isNotConfigured ? /* @__PURE__ */ jsx(ContentContainer, { children: /* @__PURE__ */ jsx(
|
|
5438
|
-
/* @__PURE__ */ jsx(
|
|
5439
|
-
/* @__PURE__ */ jsx(
|
|
5435
|
+
!isNotConfigured ? /* @__PURE__ */ jsx(ContentContainer, { children: /* @__PURE__ */ jsx(T, { direction: "column", alignItems: "stretch", gap: 4, children: /* @__PURE__ */ jsx(ListView, {}) }) }) : /* @__PURE__ */ jsxs(T, { direction: "column", marginTop: 10, children: [
|
|
5436
|
+
/* @__PURE__ */ jsx(Nn$1, {}),
|
|
5437
|
+
/* @__PURE__ */ jsx(R, { marginTop: 1, children: /* @__PURE__ */ jsx(E, { children: "Firebase is not configured, please configure Firebase" }) }),
|
|
5440
5438
|
/* @__PURE__ */ jsx(
|
|
5441
|
-
|
|
5439
|
+
Nn,
|
|
5442
5440
|
{
|
|
5443
5441
|
marginTop: 3,
|
|
5444
5442
|
onClick: () => {
|
|
@@ -5632,14 +5630,14 @@ const UserFormFields = ({
|
|
|
5632
5630
|
}) => {
|
|
5633
5631
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5634
5632
|
/* @__PURE__ */ jsxs(
|
|
5635
|
-
|
|
5633
|
+
Fm.Root,
|
|
5636
5634
|
{
|
|
5637
5635
|
style: { width: "50%" },
|
|
5638
5636
|
error: emailError || (hasBeenTouched && !userData?.email && !userData?.phoneNumber ? "Email or Phone Number is required" : void 0),
|
|
5639
5637
|
children: [
|
|
5640
|
-
/* @__PURE__ */ jsx(
|
|
5638
|
+
/* @__PURE__ */ jsx(Fm.Label, { children: "Email" }),
|
|
5641
5639
|
/* @__PURE__ */ jsx(
|
|
5642
|
-
|
|
5640
|
+
G0,
|
|
5643
5641
|
{
|
|
5644
5642
|
id: "email",
|
|
5645
5643
|
name: "email",
|
|
@@ -5649,14 +5647,14 @@ const UserFormFields = ({
|
|
|
5649
5647
|
value: userData.email || ""
|
|
5650
5648
|
}
|
|
5651
5649
|
),
|
|
5652
|
-
/* @__PURE__ */ jsx(
|
|
5650
|
+
/* @__PURE__ */ jsx(Fm.Error, {})
|
|
5653
5651
|
]
|
|
5654
5652
|
}
|
|
5655
5653
|
),
|
|
5656
|
-
/* @__PURE__ */ jsxs(
|
|
5657
|
-
/* @__PURE__ */ jsx(
|
|
5654
|
+
/* @__PURE__ */ jsxs(Fm.Root, { style: { width: "50%" }, children: [
|
|
5655
|
+
/* @__PURE__ */ jsx(Fm.Label, { children: "Display Name" }),
|
|
5658
5656
|
/* @__PURE__ */ jsx(
|
|
5659
|
-
|
|
5657
|
+
G0,
|
|
5660
5658
|
{
|
|
5661
5659
|
id: "displayName",
|
|
5662
5660
|
name: "displayName",
|
|
@@ -5666,8 +5664,8 @@ const UserFormFields = ({
|
|
|
5666
5664
|
}
|
|
5667
5665
|
)
|
|
5668
5666
|
] }),
|
|
5669
|
-
/* @__PURE__ */ jsxs(
|
|
5670
|
-
/* @__PURE__ */ jsx(
|
|
5667
|
+
/* @__PURE__ */ jsxs(Fm.Root, { style: { width: "50%" }, error: phoneError || void 0, children: [
|
|
5668
|
+
/* @__PURE__ */ jsx(Fm.Label, { children: "Phone Number" }),
|
|
5671
5669
|
/* @__PURE__ */ jsx(StyledPhoneInputWrapper, { children: /* @__PURE__ */ jsx(
|
|
5672
5670
|
PhoneInput,
|
|
5673
5671
|
{
|
|
@@ -5697,18 +5695,18 @@ const UserFormFields = ({
|
|
|
5697
5695
|
}
|
|
5698
5696
|
}
|
|
5699
5697
|
) }),
|
|
5700
|
-
/* @__PURE__ */ jsx(
|
|
5701
|
-
/* @__PURE__ */ jsx(
|
|
5698
|
+
/* @__PURE__ */ jsx(Fm.Error, {}),
|
|
5699
|
+
/* @__PURE__ */ jsx(Fm.Hint, { children: "E.164 format: +[country code][number] (e.g., +14155552671)" })
|
|
5702
5700
|
] }),
|
|
5703
5701
|
/* @__PURE__ */ jsxs(
|
|
5704
|
-
|
|
5702
|
+
Fm.Root,
|
|
5705
5703
|
{
|
|
5706
5704
|
style: { width: "50%" },
|
|
5707
5705
|
error: userData?.password?.length && userData?.password?.length < 6 ? "Password must be at least 6 characters" : void 0,
|
|
5708
5706
|
children: [
|
|
5709
|
-
/* @__PURE__ */ jsx(
|
|
5707
|
+
/* @__PURE__ */ jsx(Fm.Label, { children: "Password" }),
|
|
5710
5708
|
/* @__PURE__ */ jsx(
|
|
5711
|
-
|
|
5709
|
+
G0,
|
|
5712
5710
|
{
|
|
5713
5711
|
id: "password",
|
|
5714
5712
|
name: "password",
|
|
@@ -5719,15 +5717,15 @@ const UserFormFields = ({
|
|
|
5719
5717
|
required: isPasswordRequired
|
|
5720
5718
|
}
|
|
5721
5719
|
),
|
|
5722
|
-
/* @__PURE__ */ jsx(
|
|
5723
|
-
showPasswordHint && /* @__PURE__ */ jsx(
|
|
5720
|
+
/* @__PURE__ */ jsx(Fm.Error, {}),
|
|
5721
|
+
showPasswordHint && /* @__PURE__ */ jsx(Fm.Hint, { children: "Leave empty to keep current password" })
|
|
5724
5722
|
]
|
|
5725
5723
|
}
|
|
5726
5724
|
),
|
|
5727
|
-
/* @__PURE__ */ jsxs(
|
|
5728
|
-
/* @__PURE__ */ jsx(
|
|
5725
|
+
/* @__PURE__ */ jsxs(Fm.Root, { maxWidth: "320px", children: [
|
|
5726
|
+
/* @__PURE__ */ jsx(Fm.Label, { children: "Disabled" }),
|
|
5729
5727
|
/* @__PURE__ */ jsx(
|
|
5730
|
-
|
|
5728
|
+
D1,
|
|
5731
5729
|
{
|
|
5732
5730
|
name: "disabled",
|
|
5733
5731
|
onLabel: "True",
|
|
@@ -5737,10 +5735,10 @@ const UserFormFields = ({
|
|
|
5737
5735
|
}
|
|
5738
5736
|
)
|
|
5739
5737
|
] }),
|
|
5740
|
-
/* @__PURE__ */ jsxs(
|
|
5741
|
-
/* @__PURE__ */ jsx(
|
|
5738
|
+
/* @__PURE__ */ jsxs(Fm.Root, { maxWidth: "320px", children: [
|
|
5739
|
+
/* @__PURE__ */ jsx(Fm.Label, { children: "Email Verified" }),
|
|
5742
5740
|
/* @__PURE__ */ jsx(
|
|
5743
|
-
|
|
5741
|
+
D1,
|
|
5744
5742
|
{
|
|
5745
5743
|
name: "emailVerified",
|
|
5746
5744
|
onLabel: "True",
|
|
@@ -5753,9 +5751,9 @@ const UserFormFields = ({
|
|
|
5753
5751
|
] });
|
|
5754
5752
|
};
|
|
5755
5753
|
const UserFormLayout = ({ children, sidebar }) => {
|
|
5756
|
-
return /* @__PURE__ */ jsxs(
|
|
5754
|
+
return /* @__PURE__ */ jsxs(T, { direction: "row", alignItems: "stretch", gap: 4, width: "100%", children: [
|
|
5757
5755
|
/* @__PURE__ */ jsx(
|
|
5758
|
-
|
|
5756
|
+
R,
|
|
5759
5757
|
{
|
|
5760
5758
|
background: "neutral0",
|
|
5761
5759
|
borderColor: "neutral150",
|
|
@@ -5763,11 +5761,11 @@ const UserFormLayout = ({ children, sidebar }) => {
|
|
|
5763
5761
|
padding: 8,
|
|
5764
5762
|
shadow: "tableShadow",
|
|
5765
5763
|
style: { flex: "9 1 0px", minWidth: 0 },
|
|
5766
|
-
children: /* @__PURE__ */ jsx(
|
|
5764
|
+
children: /* @__PURE__ */ jsx(T, { direction: "column", gap: 4, alignItems: "stretch", children })
|
|
5767
5765
|
}
|
|
5768
5766
|
),
|
|
5769
5767
|
sidebar && /* @__PURE__ */ jsx(
|
|
5770
|
-
|
|
5768
|
+
T,
|
|
5771
5769
|
{
|
|
5772
5770
|
direction: "column",
|
|
5773
5771
|
gap: 4,
|
|
@@ -5934,11 +5932,11 @@ const PasswordResetButton = ({
|
|
|
5934
5932
|
}
|
|
5935
5933
|
};
|
|
5936
5934
|
const button = /* @__PURE__ */ jsx(
|
|
5937
|
-
|
|
5935
|
+
Nn,
|
|
5938
5936
|
{
|
|
5939
5937
|
onClick: handleClick,
|
|
5940
5938
|
disabled: !canResetPassword,
|
|
5941
|
-
startIcon: /* @__PURE__ */ jsx(
|
|
5939
|
+
startIcon: /* @__PURE__ */ jsx(m3, {}),
|
|
5942
5940
|
variant,
|
|
5943
5941
|
size,
|
|
5944
5942
|
fullWidth,
|
|
@@ -5946,18 +5944,18 @@ const PasswordResetButton = ({
|
|
|
5946
5944
|
}
|
|
5947
5945
|
);
|
|
5948
5946
|
if (!canResetPassword) {
|
|
5949
|
-
return /* @__PURE__ */ jsx(
|
|
5947
|
+
return /* @__PURE__ */ jsx(Ar, { label: tooltipMessage, children: /* @__PURE__ */ jsx(R, { children: button }) });
|
|
5950
5948
|
}
|
|
5951
5949
|
return button;
|
|
5952
5950
|
};
|
|
5953
|
-
const MetaWrapper = styled(
|
|
5951
|
+
const MetaWrapper = styled(R)`
|
|
5954
5952
|
width: 100%;
|
|
5955
5953
|
display: flex;
|
|
5956
5954
|
flex-direction: column;
|
|
5957
5955
|
justify-content: flex-start;
|
|
5958
5956
|
font-size: 18px;
|
|
5959
5957
|
`;
|
|
5960
|
-
const ContentWrapper = styled(
|
|
5958
|
+
const ContentWrapper = styled(R)`
|
|
5961
5959
|
width: 100%;
|
|
5962
5960
|
display: flex;
|
|
5963
5961
|
justify-content: space-between;
|
|
@@ -5965,7 +5963,7 @@ const ContentWrapper = styled(Box)`
|
|
|
5965
5963
|
font-size: 18px;
|
|
5966
5964
|
padding: 5px;
|
|
5967
5965
|
`;
|
|
5968
|
-
const DetailsButtonWrapper = styled(
|
|
5966
|
+
const DetailsButtonWrapper = styled(R)`
|
|
5969
5967
|
width: 100%;
|
|
5970
5968
|
display: flex;
|
|
5971
5969
|
justify-content: flex-end;
|
|
@@ -6098,7 +6096,7 @@ const EditUserForm = ({ data }) => {
|
|
|
6098
6096
|
{
|
|
6099
6097
|
sidebar: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
6100
6098
|
/* @__PURE__ */ jsxs(
|
|
6101
|
-
|
|
6099
|
+
R,
|
|
6102
6100
|
{
|
|
6103
6101
|
as: "aside",
|
|
6104
6102
|
background: "neutral0",
|
|
@@ -6110,15 +6108,15 @@ const EditUserForm = ({ data }) => {
|
|
|
6110
6108
|
paddingTop: 2,
|
|
6111
6109
|
shadow: "tableShadow",
|
|
6112
6110
|
children: [
|
|
6113
|
-
/* @__PURE__ */ jsxs(
|
|
6114
|
-
/* @__PURE__ */ jsxs(
|
|
6115
|
-
/* @__PURE__ */ jsx(
|
|
6116
|
-
/* @__PURE__ */ jsx(
|
|
6111
|
+
/* @__PURE__ */ jsxs(T, { paddingTop: 2, paddingBottom: 2, direction: "column", alignItems: "flex-start", gap: 2, children: [
|
|
6112
|
+
/* @__PURE__ */ jsxs(T, { gap: 1, children: [
|
|
6113
|
+
/* @__PURE__ */ jsx(E, { variant: "sigma", textColor: "neutral600", children: "Firebase User ID:" }),
|
|
6114
|
+
/* @__PURE__ */ jsx(E, { variant: "sigma", textColor: "neutral600", children: userData.firebaseUserID || userData.uid })
|
|
6117
6115
|
] }),
|
|
6118
|
-
locationState?.strapiId && /* @__PURE__ */ jsxs(
|
|
6119
|
-
/* @__PURE__ */ jsx(
|
|
6116
|
+
locationState?.strapiId && /* @__PURE__ */ jsxs(T, { gap: 1, children: [
|
|
6117
|
+
/* @__PURE__ */ jsx(E, { variant: "sigma", textColor: "neutral600", children: "Strapi ID:" }),
|
|
6120
6118
|
/* @__PURE__ */ jsx(
|
|
6121
|
-
|
|
6119
|
+
E,
|
|
6122
6120
|
{
|
|
6123
6121
|
variant: "sigma",
|
|
6124
6122
|
textColor: "primary600",
|
|
@@ -6138,37 +6136,37 @@ const EditUserForm = ({ data }) => {
|
|
|
6138
6136
|
)
|
|
6139
6137
|
] })
|
|
6140
6138
|
] }),
|
|
6141
|
-
/* @__PURE__ */ jsx(
|
|
6142
|
-
userData.providerData?.map((provider, index) => /* @__PURE__ */ jsxs(
|
|
6143
|
-
index > 0 && /* @__PURE__ */ jsx(
|
|
6144
|
-
/* @__PURE__ */ jsxs(
|
|
6145
|
-
/* @__PURE__ */ jsxs(
|
|
6146
|
-
/* @__PURE__ */ jsx(
|
|
6147
|
-
/* @__PURE__ */ jsx(
|
|
6139
|
+
/* @__PURE__ */ jsx(pl, {}),
|
|
6140
|
+
userData.providerData?.map((provider, index) => /* @__PURE__ */ jsxs(m__default.Fragment, { children: [
|
|
6141
|
+
index > 0 && /* @__PURE__ */ jsx(pl, {}),
|
|
6142
|
+
/* @__PURE__ */ jsxs(T, { paddingTop: 2, paddingBottom: 2, direction: "column", alignItems: "flex-start", gap: 2, children: [
|
|
6143
|
+
/* @__PURE__ */ jsxs(T, { gap: 1, children: [
|
|
6144
|
+
/* @__PURE__ */ jsx(E, { variant: "sigma", textColor: "neutral600", children: "Provider:" }),
|
|
6145
|
+
/* @__PURE__ */ jsx(E, { variant: "sigma", textColor: "neutral600", children: provider.providerId })
|
|
6148
6146
|
] }),
|
|
6149
|
-
/* @__PURE__ */ jsxs(
|
|
6150
|
-
/* @__PURE__ */ jsx(
|
|
6151
|
-
/* @__PURE__ */ jsx(
|
|
6147
|
+
/* @__PURE__ */ jsxs(T, { gap: 1, children: [
|
|
6148
|
+
/* @__PURE__ */ jsx(E, { variant: "sigma", textColor: "neutral600", children: "Identifier:" }),
|
|
6149
|
+
/* @__PURE__ */ jsx(E, { variant: "sigma", textColor: "neutral600", children: provider.uid })
|
|
6152
6150
|
] })
|
|
6153
6151
|
] })
|
|
6154
6152
|
] }, index)),
|
|
6155
|
-
/* @__PURE__ */ jsx(
|
|
6156
|
-
/* @__PURE__ */ jsxs(
|
|
6153
|
+
/* @__PURE__ */ jsx(pl, {}),
|
|
6154
|
+
/* @__PURE__ */ jsxs(T, { paddingTop: 2, paddingBottom: 2, direction: "column", alignItems: "flex-start", gap: 3, children: [
|
|
6157
6155
|
userData.metadata?.lastSignInTime && /* @__PURE__ */ jsxs(MetaWrapper, { children: [
|
|
6158
|
-
/* @__PURE__ */ jsx(
|
|
6159
|
-
/* @__PURE__ */ jsx(
|
|
6156
|
+
/* @__PURE__ */ jsx(E, { variant: "sigma", textColor: "neutral600", children: "Last Sign In Time" }),
|
|
6157
|
+
/* @__PURE__ */ jsx(E, { variant: "sigma", textColor: "neutral600", children: format(new Date(userData.metadata.lastSignInTime), "yyyy/MM/dd HH:mm z") })
|
|
6160
6158
|
] }),
|
|
6161
6159
|
(userData.metadata?.creationTime || userData.createdAt) && /* @__PURE__ */ jsxs(MetaWrapper, { children: [
|
|
6162
|
-
/* @__PURE__ */ jsx(
|
|
6163
|
-
/* @__PURE__ */ jsx(
|
|
6160
|
+
/* @__PURE__ */ jsx(E, { variant: "sigma", textColor: "neutral600", children: "Creation Time" }),
|
|
6161
|
+
/* @__PURE__ */ jsx(E, { variant: "sigma", textColor: "neutral600", children: userData.metadata?.creationTime ? format(new Date(userData.metadata.creationTime), "yyyy/MM/dd HH:mm z") : userData.createdAt ? format(new Date(userData.createdAt), "yyyy/MM/dd HH:mm z") : "-" })
|
|
6164
6162
|
] })
|
|
6165
6163
|
] })
|
|
6166
6164
|
]
|
|
6167
6165
|
}
|
|
6168
6166
|
),
|
|
6169
|
-
/* @__PURE__ */ jsx(
|
|
6167
|
+
/* @__PURE__ */ jsx(R, { marginTop: 5, marginBottom: 5 }),
|
|
6170
6168
|
/* @__PURE__ */ jsxs(
|
|
6171
|
-
|
|
6169
|
+
R,
|
|
6172
6170
|
{
|
|
6173
6171
|
as: "aside",
|
|
6174
6172
|
background: "neutral0",
|
|
@@ -6180,8 +6178,8 @@ const EditUserForm = ({ data }) => {
|
|
|
6180
6178
|
paddingTop: 4,
|
|
6181
6179
|
shadow: "tableShadow",
|
|
6182
6180
|
children: [
|
|
6183
|
-
/* @__PURE__ */ jsx(
|
|
6184
|
-
/* @__PURE__ */ jsxs(
|
|
6181
|
+
/* @__PURE__ */ jsx(E, { variant: "sigma", textColor: "neutral600", marginBottom: 2, children: "Account Actions" }),
|
|
6182
|
+
/* @__PURE__ */ jsxs(T, { direction: "column", gap: 2, children: [
|
|
6185
6183
|
/* @__PURE__ */ jsx(
|
|
6186
6184
|
PasswordResetButton,
|
|
6187
6185
|
{
|
|
@@ -6197,7 +6195,7 @@ const EditUserForm = ({ data }) => {
|
|
|
6197
6195
|
}
|
|
6198
6196
|
),
|
|
6199
6197
|
userData.email && !userData.emailVerified && /* @__PURE__ */ jsx(
|
|
6200
|
-
|
|
6198
|
+
Nn,
|
|
6201
6199
|
{
|
|
6202
6200
|
variant: "secondary",
|
|
6203
6201
|
fullWidth: true,
|
|
@@ -6215,9 +6213,9 @@ const EditUserForm = ({ data }) => {
|
|
|
6215
6213
|
]
|
|
6216
6214
|
}
|
|
6217
6215
|
),
|
|
6218
|
-
/* @__PURE__ */ jsx(
|
|
6216
|
+
/* @__PURE__ */ jsx(R, { marginTop: 5, marginBottom: 5 }),
|
|
6219
6217
|
userData.localUser && /* @__PURE__ */ jsx(
|
|
6220
|
-
|
|
6218
|
+
R,
|
|
6221
6219
|
{
|
|
6222
6220
|
as: "aside",
|
|
6223
6221
|
background: "neutral0",
|
|
@@ -6228,11 +6226,11 @@ const EditUserForm = ({ data }) => {
|
|
|
6228
6226
|
paddingRight: 2,
|
|
6229
6227
|
paddingTop: 1,
|
|
6230
6228
|
shadow: "tableShadow",
|
|
6231
|
-
children: /* @__PURE__ */ jsxs(
|
|
6229
|
+
children: /* @__PURE__ */ jsxs(R, { paddingTop: 2, paddingBottom: 2, children: [
|
|
6232
6230
|
/* @__PURE__ */ jsx(DetailsButtonWrapper, { children: /* @__PURE__ */ jsx(
|
|
6233
|
-
|
|
6231
|
+
zc,
|
|
6234
6232
|
{
|
|
6235
|
-
startIcon: /* @__PURE__ */ jsx(
|
|
6233
|
+
startIcon: /* @__PURE__ */ jsx(_3, {}),
|
|
6236
6234
|
onClick: () => navigate(
|
|
6237
6235
|
`/content-manager/collection-types/plugin::users-permissions.user/${userData.localUser?.id}`
|
|
6238
6236
|
),
|
|
@@ -6241,8 +6239,8 @@ const EditUserForm = ({ data }) => {
|
|
|
6241
6239
|
}
|
|
6242
6240
|
) }),
|
|
6243
6241
|
/* @__PURE__ */ jsxs(ContentWrapper, { children: [
|
|
6244
|
-
/* @__PURE__ */ jsx(
|
|
6245
|
-
/* @__PURE__ */ jsx(
|
|
6242
|
+
/* @__PURE__ */ jsx(E, { variant: "sigma", textColor: "neutral600", children: "local user:" }),
|
|
6243
|
+
/* @__PURE__ */ jsx(E, { variant: "sigma", textColor: "neutral600", children: userData.localUser.username })
|
|
6246
6244
|
] })
|
|
6247
6245
|
] })
|
|
6248
6246
|
}
|