strapi-plugin-firebase-authentication 1.3.2 → 1.4.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-BmP-duLn.js → App-C9bt_W_j.js} +596 -251
- package/dist/_chunks/{App-DjamRMm8.mjs → App-ICSLMN65.mjs} +484 -160
- package/dist/_chunks/{api-CLQa5PFi.mjs → api-BUBYDvgD.mjs} +2 -1
- package/dist/_chunks/{api-Bg075IIT.js → api-vlU0YOD2.js} +2 -1
- package/dist/_chunks/{index-CAZnRswo.mjs → index-BXFmeItI.mjs} +1 -1
- package/dist/_chunks/{index-B2NvsXdF.mjs → index-BZSt7Cfj.mjs} +13 -14
- package/dist/_chunks/{index-CyOVjVQb.js → index-DLo9v_Bx.js} +4 -5
- package/dist/_chunks/{index-B4ptk_Em.js → index-ovm1QUEJ.js} +1 -1
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +2 -2
- package/dist/admin/src/components/ActivityLog/ActivityLog.d.ts +6 -0
- package/dist/admin/src/components/ActivityLog/index.d.ts +1 -0
- package/dist/admin/src/pages/utils/api.d.ts +18 -1
- package/dist/server/index.js +8182 -30627
- package/dist/server/index.mjs +8178 -30618
- package/dist/server/src/config/index.d.ts +8 -0
- package/dist/server/src/content-types/index.d.ts +74 -0
- package/dist/server/src/controllers/activityLogController.d.ts +8 -0
- package/dist/server/src/controllers/index.d.ts +3 -0
- package/dist/server/src/index.d.ts +93 -1
- package/dist/server/src/middlewares/activity-logger.d.ts +9 -0
- package/dist/server/src/middlewares/index.d.ts +5 -1
- package/dist/server/src/services/activityLogService.d.ts +58 -0
- package/dist/server/src/services/firebaseService.d.ts +1 -0
- package/dist/server/src/services/firebaseUserDataService.d.ts +1 -0
- package/dist/server/src/services/index.d.ts +10 -0
- package/dist/server/src/services/userService.d.ts +1 -0
- package/package.json +6 -4
|
@@ -5,9 +5,9 @@ const admin = require("@strapi/strapi/admin");
|
|
|
5
5
|
const reactRouterDom = require("react-router-dom");
|
|
6
6
|
const rt = require("@radix-ui/react-tooltip");
|
|
7
7
|
const m = require("react");
|
|
8
|
-
const api = require("./api-
|
|
8
|
+
const api = require("./api-vlU0YOD2.js");
|
|
9
9
|
const reactIntl = require("react-intl");
|
|
10
|
-
const index = require("./index-
|
|
10
|
+
const index = require("./index-DLo9v_Bx.js");
|
|
11
11
|
const styled = require("styled-components");
|
|
12
12
|
const rx = require("react-icons/rx");
|
|
13
13
|
const ai = require("react-icons/ai");
|
|
@@ -2735,6 +2735,26 @@ const sendVerificationEmail = async (userId) => {
|
|
|
2735
2735
|
const { data: result } = await put(url, {});
|
|
2736
2736
|
return result;
|
|
2737
2737
|
};
|
|
2738
|
+
const fetchActivityLogs = async (firebaseUserId, query = {}) => {
|
|
2739
|
+
const { page = 1, pageSize = 10, filters = {} } = query;
|
|
2740
|
+
let url = `/${index.PLUGIN_ID}/activity-logs?firebaseUserId=${encodeURIComponent(firebaseUserId)}&page=${page}&pageSize=${pageSize}`;
|
|
2741
|
+
if (filters.activityType && filters.activityType !== "all") {
|
|
2742
|
+
url += `&activityType=${encodeURIComponent(filters.activityType)}`;
|
|
2743
|
+
}
|
|
2744
|
+
if (filters.startDate) {
|
|
2745
|
+
url += `&startDate=${encodeURIComponent(filters.startDate)}`;
|
|
2746
|
+
}
|
|
2747
|
+
if (filters.endDate) {
|
|
2748
|
+
url += `&endDate=${encodeURIComponent(filters.endDate)}`;
|
|
2749
|
+
}
|
|
2750
|
+
try {
|
|
2751
|
+
const { get: get2 } = admin.getFetchClient();
|
|
2752
|
+
const { data } = await get2(url);
|
|
2753
|
+
return data;
|
|
2754
|
+
} catch (e2) {
|
|
2755
|
+
return { data: [], meta: { total: 0, page: 1, pageSize: 10 } };
|
|
2756
|
+
}
|
|
2757
|
+
};
|
|
2738
2758
|
const PaginationFooter = ({ pageCount = 0 }) => {
|
|
2739
2759
|
const [{ query }, setQuery] = admin.useQueryParams();
|
|
2740
2760
|
const pageSize = query?.pageSize || "10";
|
|
@@ -3003,7 +3023,7 @@ var objectInspect = function inspect_(obj, options, depth, seen) {
|
|
|
3003
3023
|
var ys = arrObjKeys(obj, inspect2);
|
|
3004
3024
|
var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
|
|
3005
3025
|
var protoTag = obj instanceof Object ? "" : "null prototype";
|
|
3006
|
-
var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr
|
|
3026
|
+
var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? "Object" : "";
|
|
3007
3027
|
var constructorTag = isPlainObject || typeof obj.constructor !== "function" ? "" : obj.constructor.name ? obj.constructor.name + " " : "";
|
|
3008
3028
|
var tag = constructorTag + (stringTag || protoTag ? "[" + $join.call($concat$1.call([], stringTag || [], protoTag || []), ": ") + "] " : "");
|
|
3009
3029
|
if (ys.length === 0) {
|
|
@@ -3028,25 +3048,25 @@ function canTrustToString(obj) {
|
|
|
3028
3048
|
return !toStringTag || !(typeof obj === "object" && (toStringTag in obj || typeof obj[toStringTag] !== "undefined"));
|
|
3029
3049
|
}
|
|
3030
3050
|
function isArray$3(obj) {
|
|
3031
|
-
return toStr
|
|
3051
|
+
return toStr(obj) === "[object Array]" && canTrustToString(obj);
|
|
3032
3052
|
}
|
|
3033
3053
|
function isDate(obj) {
|
|
3034
|
-
return toStr
|
|
3054
|
+
return toStr(obj) === "[object Date]" && canTrustToString(obj);
|
|
3035
3055
|
}
|
|
3036
3056
|
function isRegExp$1(obj) {
|
|
3037
|
-
return toStr
|
|
3057
|
+
return toStr(obj) === "[object RegExp]" && canTrustToString(obj);
|
|
3038
3058
|
}
|
|
3039
3059
|
function isError(obj) {
|
|
3040
|
-
return toStr
|
|
3060
|
+
return toStr(obj) === "[object Error]" && canTrustToString(obj);
|
|
3041
3061
|
}
|
|
3042
3062
|
function isString(obj) {
|
|
3043
|
-
return toStr
|
|
3063
|
+
return toStr(obj) === "[object String]" && canTrustToString(obj);
|
|
3044
3064
|
}
|
|
3045
3065
|
function isNumber(obj) {
|
|
3046
|
-
return toStr
|
|
3066
|
+
return toStr(obj) === "[object Number]" && canTrustToString(obj);
|
|
3047
3067
|
}
|
|
3048
3068
|
function isBoolean(obj) {
|
|
3049
|
-
return toStr
|
|
3069
|
+
return toStr(obj) === "[object Boolean]" && canTrustToString(obj);
|
|
3050
3070
|
}
|
|
3051
3071
|
function isSymbol(obj) {
|
|
3052
3072
|
if (hasShammedSymbols) {
|
|
@@ -3082,7 +3102,7 @@ var hasOwn$1 = Object.prototype.hasOwnProperty || function(key) {
|
|
|
3082
3102
|
function has$3(obj, key) {
|
|
3083
3103
|
return hasOwn$1.call(obj, key);
|
|
3084
3104
|
}
|
|
3085
|
-
function toStr
|
|
3105
|
+
function toStr(obj) {
|
|
3086
3106
|
return objectToString.call(obj);
|
|
3087
3107
|
}
|
|
3088
3108
|
function nameOf(f) {
|
|
@@ -3391,7 +3411,7 @@ var syntax = SyntaxError;
|
|
|
3391
3411
|
var uri = URIError;
|
|
3392
3412
|
var abs$1 = Math.abs;
|
|
3393
3413
|
var floor$1 = Math.floor;
|
|
3394
|
-
var max$
|
|
3414
|
+
var max$1 = Math.max;
|
|
3395
3415
|
var min$1 = Math.min;
|
|
3396
3416
|
var pow$1 = Math.pow;
|
|
3397
3417
|
var round$1 = Math.round;
|
|
@@ -3520,78 +3540,99 @@ function requireObject_getPrototypeOf() {
|
|
|
3520
3540
|
Object_getPrototypeOf = $Object2.getPrototypeOf || null;
|
|
3521
3541
|
return Object_getPrototypeOf;
|
|
3522
3542
|
}
|
|
3523
|
-
var
|
|
3524
|
-
var
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
var
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
arr
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
}
|
|
3537
|
-
var
|
|
3538
|
-
|
|
3539
|
-
|
|
3540
|
-
arr
|
|
3541
|
-
}
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
var
|
|
3545
|
-
|
|
3546
|
-
for (var i2 = 0; i2 < arr.length; i2 += 1) {
|
|
3547
|
-
str += arr[i2];
|
|
3548
|
-
if (i2 + 1 < arr.length) {
|
|
3549
|
-
str += joiner;
|
|
3543
|
+
var implementation;
|
|
3544
|
+
var hasRequiredImplementation;
|
|
3545
|
+
function requireImplementation() {
|
|
3546
|
+
if (hasRequiredImplementation) return implementation;
|
|
3547
|
+
hasRequiredImplementation = 1;
|
|
3548
|
+
var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
|
|
3549
|
+
var toStr2 = Object.prototype.toString;
|
|
3550
|
+
var max2 = Math.max;
|
|
3551
|
+
var funcType = "[object Function]";
|
|
3552
|
+
var concatty = function concatty2(a3, b2) {
|
|
3553
|
+
var arr = [];
|
|
3554
|
+
for (var i2 = 0; i2 < a3.length; i2 += 1) {
|
|
3555
|
+
arr[i2] = a3[i2];
|
|
3556
|
+
}
|
|
3557
|
+
for (var j = 0; j < b2.length; j += 1) {
|
|
3558
|
+
arr[j + a3.length] = b2[j];
|
|
3559
|
+
}
|
|
3560
|
+
return arr;
|
|
3561
|
+
};
|
|
3562
|
+
var slicy = function slicy2(arrLike, offset) {
|
|
3563
|
+
var arr = [];
|
|
3564
|
+
for (var i2 = offset, j = 0; i2 < arrLike.length; i2 += 1, j += 1) {
|
|
3565
|
+
arr[j] = arrLike[i2];
|
|
3550
3566
|
}
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
var
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
var args = slicy(arguments, 1);
|
|
3560
|
-
var bound;
|
|
3561
|
-
var binder = function() {
|
|
3562
|
-
if (this instanceof bound) {
|
|
3563
|
-
var result = target.apply(
|
|
3564
|
-
this,
|
|
3565
|
-
concatty(args, arguments)
|
|
3566
|
-
);
|
|
3567
|
-
if (Object(result) === result) {
|
|
3568
|
-
return result;
|
|
3567
|
+
return arr;
|
|
3568
|
+
};
|
|
3569
|
+
var joiny = function(arr, joiner) {
|
|
3570
|
+
var str = "";
|
|
3571
|
+
for (var i2 = 0; i2 < arr.length; i2 += 1) {
|
|
3572
|
+
str += arr[i2];
|
|
3573
|
+
if (i2 + 1 < arr.length) {
|
|
3574
|
+
str += joiner;
|
|
3569
3575
|
}
|
|
3570
|
-
return this;
|
|
3571
3576
|
}
|
|
3572
|
-
return
|
|
3573
|
-
that,
|
|
3574
|
-
concatty(args, arguments)
|
|
3575
|
-
);
|
|
3577
|
+
return str;
|
|
3576
3578
|
};
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
var
|
|
3579
|
+
implementation = function bind2(that) {
|
|
3580
|
+
var target = this;
|
|
3581
|
+
if (typeof target !== "function" || toStr2.apply(target) !== funcType) {
|
|
3582
|
+
throw new TypeError(ERROR_MESSAGE + target);
|
|
3583
|
+
}
|
|
3584
|
+
var args = slicy(arguments, 1);
|
|
3585
|
+
var bound;
|
|
3586
|
+
var binder = function() {
|
|
3587
|
+
if (this instanceof bound) {
|
|
3588
|
+
var result = target.apply(
|
|
3589
|
+
this,
|
|
3590
|
+
concatty(args, arguments)
|
|
3591
|
+
);
|
|
3592
|
+
if (Object(result) === result) {
|
|
3593
|
+
return result;
|
|
3594
|
+
}
|
|
3595
|
+
return this;
|
|
3596
|
+
}
|
|
3597
|
+
return target.apply(
|
|
3598
|
+
that,
|
|
3599
|
+
concatty(args, arguments)
|
|
3600
|
+
);
|
|
3585
3601
|
};
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
};
|
|
3592
|
-
|
|
3593
|
-
var
|
|
3594
|
-
|
|
3602
|
+
var boundLength = max2(0, target.length - args.length);
|
|
3603
|
+
var boundArgs = [];
|
|
3604
|
+
for (var i2 = 0; i2 < boundLength; i2++) {
|
|
3605
|
+
boundArgs[i2] = "$" + i2;
|
|
3606
|
+
}
|
|
3607
|
+
bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
|
|
3608
|
+
if (target.prototype) {
|
|
3609
|
+
var Empty = function Empty2() {
|
|
3610
|
+
};
|
|
3611
|
+
Empty.prototype = target.prototype;
|
|
3612
|
+
bound.prototype = new Empty();
|
|
3613
|
+
Empty.prototype = null;
|
|
3614
|
+
}
|
|
3615
|
+
return bound;
|
|
3616
|
+
};
|
|
3617
|
+
return implementation;
|
|
3618
|
+
}
|
|
3619
|
+
var functionBind;
|
|
3620
|
+
var hasRequiredFunctionBind;
|
|
3621
|
+
function requireFunctionBind() {
|
|
3622
|
+
if (hasRequiredFunctionBind) return functionBind;
|
|
3623
|
+
hasRequiredFunctionBind = 1;
|
|
3624
|
+
var implementation2 = requireImplementation();
|
|
3625
|
+
functionBind = Function.prototype.bind || implementation2;
|
|
3626
|
+
return functionBind;
|
|
3627
|
+
}
|
|
3628
|
+
var functionCall;
|
|
3629
|
+
var hasRequiredFunctionCall;
|
|
3630
|
+
function requireFunctionCall() {
|
|
3631
|
+
if (hasRequiredFunctionCall) return functionCall;
|
|
3632
|
+
hasRequiredFunctionCall = 1;
|
|
3633
|
+
functionCall = Function.prototype.call;
|
|
3634
|
+
return functionCall;
|
|
3635
|
+
}
|
|
3595
3636
|
var functionApply;
|
|
3596
3637
|
var hasRequiredFunctionApply;
|
|
3597
3638
|
function requireFunctionApply() {
|
|
@@ -3601,14 +3642,14 @@ function requireFunctionApply() {
|
|
|
3601
3642
|
return functionApply;
|
|
3602
3643
|
}
|
|
3603
3644
|
var reflectApply = typeof Reflect !== "undefined" && Reflect && Reflect.apply;
|
|
3604
|
-
var bind$2 =
|
|
3645
|
+
var bind$2 = requireFunctionBind();
|
|
3605
3646
|
var $apply$1 = requireFunctionApply();
|
|
3606
|
-
var $call$2 =
|
|
3647
|
+
var $call$2 = requireFunctionCall();
|
|
3607
3648
|
var $reflectApply = reflectApply;
|
|
3608
3649
|
var actualApply = $reflectApply || bind$2.call($call$2, $apply$1);
|
|
3609
|
-
var bind$1 =
|
|
3650
|
+
var bind$1 = requireFunctionBind();
|
|
3610
3651
|
var $TypeError$4 = type;
|
|
3611
|
-
var $call$1 =
|
|
3652
|
+
var $call$1 = requireFunctionCall();
|
|
3612
3653
|
var $actualApply = actualApply;
|
|
3613
3654
|
var callBindApplyHelpers = function callBindBasic(args) {
|
|
3614
3655
|
if (args.length < 1 || typeof args[0] !== "function") {
|
|
@@ -3674,8 +3715,8 @@ function requireHasown() {
|
|
|
3674
3715
|
hasRequiredHasown = 1;
|
|
3675
3716
|
var call = Function.prototype.call;
|
|
3676
3717
|
var $hasOwn = Object.prototype.hasOwnProperty;
|
|
3677
|
-
var
|
|
3678
|
-
hasown =
|
|
3718
|
+
var bind2 = requireFunctionBind();
|
|
3719
|
+
hasown = bind2.call(call, $hasOwn);
|
|
3679
3720
|
return hasown;
|
|
3680
3721
|
}
|
|
3681
3722
|
var undefined$1;
|
|
@@ -3689,7 +3730,7 @@ var $TypeError$3 = type;
|
|
|
3689
3730
|
var $URIError = uri;
|
|
3690
3731
|
var abs = abs$1;
|
|
3691
3732
|
var floor = floor$1;
|
|
3692
|
-
var max = max$
|
|
3733
|
+
var max = max$1;
|
|
3693
3734
|
var min = min$1;
|
|
3694
3735
|
var pow = pow$1;
|
|
3695
3736
|
var round = round$1;
|
|
@@ -3723,7 +3764,7 @@ var getProto = requireGetProto();
|
|
|
3723
3764
|
var $ObjectGPO = requireObject_getPrototypeOf();
|
|
3724
3765
|
var $ReflectGPO = requireReflect_getPrototypeOf();
|
|
3725
3766
|
var $apply = requireFunctionApply();
|
|
3726
|
-
var $call =
|
|
3767
|
+
var $call = requireFunctionCall();
|
|
3727
3768
|
var needsEval = {};
|
|
3728
3769
|
var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined$1 : getProto(Uint8Array);
|
|
3729
3770
|
var INTRINSICS = {
|
|
@@ -3894,13 +3935,13 @@ var LEGACY_ALIASES = {
|
|
|
3894
3935
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
3895
3936
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
3896
3937
|
};
|
|
3897
|
-
var
|
|
3938
|
+
var bind = requireFunctionBind();
|
|
3898
3939
|
var hasOwn = requireHasown();
|
|
3899
|
-
var $concat =
|
|
3900
|
-
var $spliceApply =
|
|
3901
|
-
var $replace =
|
|
3902
|
-
var $strSlice =
|
|
3903
|
-
var $exec =
|
|
3940
|
+
var $concat = bind.call($call, Array.prototype.concat);
|
|
3941
|
+
var $spliceApply = bind.call($apply, Array.prototype.splice);
|
|
3942
|
+
var $replace = bind.call($call, String.prototype.replace);
|
|
3943
|
+
var $strSlice = bind.call($call, String.prototype.slice);
|
|
3944
|
+
var $exec = bind.call($call, RegExp.prototype.exec);
|
|
3904
3945
|
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
|
|
3905
3946
|
var reEscapeChar = /\\(\\)?/g;
|
|
3906
3947
|
var stringToPath = function stringToPath2(string) {
|
|
@@ -5951,6 +5992,294 @@ const PasswordResetButton = ({
|
|
|
5951
5992
|
}
|
|
5952
5993
|
return button;
|
|
5953
5994
|
};
|
|
5995
|
+
const LogItem = styled__default.default(api.R)`
|
|
5996
|
+
border-bottom: 1px solid ${({ theme }) => theme.colors.neutral200};
|
|
5997
|
+
padding: 12px 0;
|
|
5998
|
+
|
|
5999
|
+
&:last-child {
|
|
6000
|
+
border-bottom: none;
|
|
6001
|
+
}
|
|
6002
|
+
`;
|
|
6003
|
+
const FilterRow = styled__default.default(api.T)`
|
|
6004
|
+
flex-wrap: wrap;
|
|
6005
|
+
gap: 8px;
|
|
6006
|
+
margin-bottom: 16px;
|
|
6007
|
+
`;
|
|
6008
|
+
const ScrollContainer = styled__default.default(api.R)`
|
|
6009
|
+
max-height: calc(100vh - 500px);
|
|
6010
|
+
min-height: 200px;
|
|
6011
|
+
overflow-y: auto;
|
|
6012
|
+
padding-right: 12px;
|
|
6013
|
+
`;
|
|
6014
|
+
const PaginationRow = styled__default.default(api.T)`
|
|
6015
|
+
margin-top: 16px;
|
|
6016
|
+
justify-content: center;
|
|
6017
|
+
gap: 8px;
|
|
6018
|
+
`;
|
|
6019
|
+
const ExpandableDetails = styled__default.default(api.R)`
|
|
6020
|
+
margin-top: 8px;
|
|
6021
|
+
padding: 12px;
|
|
6022
|
+
background: ${({ theme }) => theme.colors.neutral100};
|
|
6023
|
+
border-radius: 4px;
|
|
6024
|
+
text-align: left;
|
|
6025
|
+
width: 100%;
|
|
6026
|
+
`;
|
|
6027
|
+
const ResponseBodyContainer = styled__default.default(api.R)`
|
|
6028
|
+
margin-top: 8px;
|
|
6029
|
+
padding: 8px;
|
|
6030
|
+
background: ${({ theme }) => theme.colors.neutral0};
|
|
6031
|
+
border-radius: 4px;
|
|
6032
|
+
max-height: 300px;
|
|
6033
|
+
overflow: auto;
|
|
6034
|
+
font-family: monospace;
|
|
6035
|
+
font-size: 12px;
|
|
6036
|
+
white-space: pre-wrap;
|
|
6037
|
+
word-break: break-all;
|
|
6038
|
+
`;
|
|
6039
|
+
const ACTIVITY_TYPE_OPTIONS = [
|
|
6040
|
+
{ value: "all", label: "All Types" },
|
|
6041
|
+
{ value: "authentication", label: "Authentication" },
|
|
6042
|
+
{ value: "tokenValidation", label: "Token Validation" },
|
|
6043
|
+
{ value: "fieldUpdate", label: "Field Update" },
|
|
6044
|
+
{ value: "passwordReset", label: "Password Reset" },
|
|
6045
|
+
{ value: "emailVerification", label: "Email Verification" },
|
|
6046
|
+
{ value: "accountCreation", label: "Account Creation" },
|
|
6047
|
+
{ value: "accountDeletion", label: "Account Deletion" },
|
|
6048
|
+
{ value: "adminAction", label: "Admin Action" }
|
|
6049
|
+
];
|
|
6050
|
+
const getActivityTypeBadgeColor = (activityType) => {
|
|
6051
|
+
switch (activityType) {
|
|
6052
|
+
case "authentication":
|
|
6053
|
+
return "primary600";
|
|
6054
|
+
case "tokenValidation":
|
|
6055
|
+
return "secondary600";
|
|
6056
|
+
case "fieldUpdate":
|
|
6057
|
+
return "warning600";
|
|
6058
|
+
case "passwordReset":
|
|
6059
|
+
return "danger600";
|
|
6060
|
+
case "emailVerification":
|
|
6061
|
+
return "success600";
|
|
6062
|
+
case "adminAction":
|
|
6063
|
+
return "alternative600";
|
|
6064
|
+
case "accountCreation":
|
|
6065
|
+
return "success600";
|
|
6066
|
+
case "accountDeletion":
|
|
6067
|
+
return "danger600";
|
|
6068
|
+
default:
|
|
6069
|
+
return "neutral600";
|
|
6070
|
+
}
|
|
6071
|
+
};
|
|
6072
|
+
const formatActivityType = (type2) => {
|
|
6073
|
+
return type2.replace(/([A-Z])/g, " $1").trim();
|
|
6074
|
+
};
|
|
6075
|
+
const ActivityLog = ({ firebaseUserId }) => {
|
|
6076
|
+
const [logs, setLogs] = m.useState([]);
|
|
6077
|
+
const [isLoading, setIsLoading] = m.useState(true);
|
|
6078
|
+
const [page, setPage] = m.useState(1);
|
|
6079
|
+
const [totalPages, setTotalPages] = m.useState(1);
|
|
6080
|
+
const [filters, setFilters] = m.useState({
|
|
6081
|
+
activityType: "all",
|
|
6082
|
+
startDate: "",
|
|
6083
|
+
endDate: ""
|
|
6084
|
+
});
|
|
6085
|
+
const [expandedRows, setExpandedRows] = m.useState(/* @__PURE__ */ new Set());
|
|
6086
|
+
const pageSize = 10;
|
|
6087
|
+
const toggleExpand = m.useCallback((documentId) => {
|
|
6088
|
+
setExpandedRows((prev) => {
|
|
6089
|
+
const next = new Set(prev);
|
|
6090
|
+
if (next.has(documentId)) {
|
|
6091
|
+
next.delete(documentId);
|
|
6092
|
+
} else {
|
|
6093
|
+
next.add(documentId);
|
|
6094
|
+
}
|
|
6095
|
+
return next;
|
|
6096
|
+
});
|
|
6097
|
+
}, []);
|
|
6098
|
+
const hasExpandableContent = m.useCallback((log) => {
|
|
6099
|
+
return log.metadata?.responseBody || log.endpoint || log.userAgent;
|
|
6100
|
+
}, []);
|
|
6101
|
+
const loadLogs = m.useCallback(async () => {
|
|
6102
|
+
if (!firebaseUserId) return;
|
|
6103
|
+
setIsLoading(true);
|
|
6104
|
+
try {
|
|
6105
|
+
const response = await fetchActivityLogs(firebaseUserId, {
|
|
6106
|
+
page,
|
|
6107
|
+
pageSize,
|
|
6108
|
+
filters: {
|
|
6109
|
+
activityType: filters.activityType !== "all" ? filters.activityType : void 0,
|
|
6110
|
+
startDate: filters.startDate || void 0,
|
|
6111
|
+
endDate: filters.endDate || void 0
|
|
6112
|
+
}
|
|
6113
|
+
});
|
|
6114
|
+
setLogs(response.data || []);
|
|
6115
|
+
setTotalPages(Math.ceil((response.meta?.total || 0) / pageSize));
|
|
6116
|
+
} catch (error) {
|
|
6117
|
+
console.error("Failed to fetch activity logs:", error);
|
|
6118
|
+
setLogs([]);
|
|
6119
|
+
} finally {
|
|
6120
|
+
setIsLoading(false);
|
|
6121
|
+
}
|
|
6122
|
+
}, [firebaseUserId, page, pageSize, filters]);
|
|
6123
|
+
m.useEffect(() => {
|
|
6124
|
+
loadLogs();
|
|
6125
|
+
}, [loadLogs]);
|
|
6126
|
+
const handleFilterChange = m.useCallback((field, value) => {
|
|
6127
|
+
setFilters((prev) => ({ ...prev, [field]: value }));
|
|
6128
|
+
setPage(1);
|
|
6129
|
+
}, []);
|
|
6130
|
+
const handleClearFilters = m.useCallback(() => {
|
|
6131
|
+
setFilters({
|
|
6132
|
+
activityType: "all",
|
|
6133
|
+
startDate: "",
|
|
6134
|
+
endDate: ""
|
|
6135
|
+
});
|
|
6136
|
+
setPage(1);
|
|
6137
|
+
}, []);
|
|
6138
|
+
const renderChanges = (changes) => {
|
|
6139
|
+
return Object.entries(changes).map(([field, { old: oldVal, new: newVal }]) => /* @__PURE__ */ jsxRuntime.jsxs(api.T, { gap: 2, marginTop: 1, alignItems: "center", wrap: "nowrap", children: [
|
|
6140
|
+
/* @__PURE__ */ jsxRuntime.jsxs(api.E, { variant: "pi", textColor: "neutral600", style: { minWidth: "100px" }, children: [
|
|
6141
|
+
field,
|
|
6142
|
+
":"
|
|
6143
|
+
] }),
|
|
6144
|
+
/* @__PURE__ */ jsxRuntime.jsx(api.E, { variant: "pi", textColor: "danger600", style: { textDecoration: "line-through" }, children: String(oldVal ?? "none") }),
|
|
6145
|
+
/* @__PURE__ */ jsxRuntime.jsx(api.E, { variant: "pi", textColor: "neutral600", children: "→" }),
|
|
6146
|
+
/* @__PURE__ */ jsxRuntime.jsx(api.E, { variant: "pi", textColor: "success600", children: String(newVal ?? "none") })
|
|
6147
|
+
] }, field));
|
|
6148
|
+
};
|
|
6149
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(api.R, { children: [
|
|
6150
|
+
/* @__PURE__ */ jsxRuntime.jsx(api.E, { variant: "sigma", textColor: "neutral600", marginBottom: 3, children: "Activity History" }),
|
|
6151
|
+
/* @__PURE__ */ jsxRuntime.jsxs(FilterRow, { children: [
|
|
6152
|
+
/* @__PURE__ */ jsxRuntime.jsx(api.R, { style: { minWidth: "150px" }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6153
|
+
api.bo,
|
|
6154
|
+
{
|
|
6155
|
+
label: "Activity Type",
|
|
6156
|
+
value: filters.activityType,
|
|
6157
|
+
onChange: (value) => handleFilterChange("activityType", value),
|
|
6158
|
+
size: "S",
|
|
6159
|
+
children: ACTIVITY_TYPE_OPTIONS.map((option) => /* @__PURE__ */ jsxRuntime.jsx(api.wo, { value: option.value, children: option.label }, option.value))
|
|
6160
|
+
}
|
|
6161
|
+
) }),
|
|
6162
|
+
/* @__PURE__ */ jsxRuntime.jsx(api.R, { style: { minWidth: "140px" }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6163
|
+
api.G0,
|
|
6164
|
+
{
|
|
6165
|
+
label: "Start Date",
|
|
6166
|
+
type: "date",
|
|
6167
|
+
value: filters.startDate,
|
|
6168
|
+
onChange: (e2) => handleFilterChange("startDate", e2.target.value),
|
|
6169
|
+
size: "S"
|
|
6170
|
+
}
|
|
6171
|
+
) }),
|
|
6172
|
+
/* @__PURE__ */ jsxRuntime.jsx(api.R, { style: { minWidth: "140px" }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6173
|
+
api.G0,
|
|
6174
|
+
{
|
|
6175
|
+
label: "End Date",
|
|
6176
|
+
type: "date",
|
|
6177
|
+
value: filters.endDate,
|
|
6178
|
+
onChange: (e2) => handleFilterChange("endDate", e2.target.value),
|
|
6179
|
+
size: "S"
|
|
6180
|
+
}
|
|
6181
|
+
) }),
|
|
6182
|
+
/* @__PURE__ */ jsxRuntime.jsx(api.R, { style: { alignSelf: "flex-end" }, children: /* @__PURE__ */ jsxRuntime.jsx(api.Nn, { variant: "tertiary", size: "S", onClick: handleClearFilters, children: "Clear" }) })
|
|
6183
|
+
] }),
|
|
6184
|
+
isLoading ? /* @__PURE__ */ jsxRuntime.jsx(api.T, { justifyContent: "center", padding: 4, children: /* @__PURE__ */ jsxRuntime.jsx(api.Wd, { small: true, children: "Loading activity logs..." }) }) : logs.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(api.E, { variant: "pi", textColor: "neutral600", children: "No activity logs found." }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
6185
|
+
/* @__PURE__ */ jsxRuntime.jsx(ScrollContainer, { children: logs.map((log) => /* @__PURE__ */ jsxRuntime.jsx(LogItem, { children: /* @__PURE__ */ jsxRuntime.jsxs(api.T, { justifyContent: "space-between", alignItems: "flex-start", children: [
|
|
6186
|
+
/* @__PURE__ */ jsxRuntime.jsxs(api.T, { direction: "column", gap: 1, alignItems: "flex-start", style: { flex: 1 }, children: [
|
|
6187
|
+
/* @__PURE__ */ jsxRuntime.jsxs(api.T, { gap: 2, alignItems: "center", wrap: "wrap", children: [
|
|
6188
|
+
/* @__PURE__ */ jsxRuntime.jsx(api.Is, { textColor: getActivityTypeBadgeColor(log.activityType), size: "S", children: formatActivityType(log.activityType) }),
|
|
6189
|
+
log.activityType !== "fieldUpdate" && /* @__PURE__ */ jsxRuntime.jsx(api.E, { variant: "omega", fontWeight: "semiBold", children: log.action }),
|
|
6190
|
+
log.metadata?.statusCode && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6191
|
+
api.Is,
|
|
6192
|
+
{
|
|
6193
|
+
textColor: log.metadata.statusCode >= 400 ? "danger600" : "success600",
|
|
6194
|
+
size: "S",
|
|
6195
|
+
children: log.metadata.statusCode
|
|
6196
|
+
}
|
|
6197
|
+
),
|
|
6198
|
+
!log.success && /* @__PURE__ */ jsxRuntime.jsx(api.Is, { textColor: "danger600", size: "S", children: "Failed" })
|
|
6199
|
+
] }),
|
|
6200
|
+
log.changes && Object.keys(log.changes).length > 0 && /* @__PURE__ */ jsxRuntime.jsx(api.R, { marginTop: 1, children: renderChanges(log.changes) }),
|
|
6201
|
+
log.errorMessage && /* @__PURE__ */ jsxRuntime.jsxs(api.E, { variant: "pi", textColor: "danger600", marginTop: 1, children: [
|
|
6202
|
+
"Error: ",
|
|
6203
|
+
log.errorMessage
|
|
6204
|
+
] }),
|
|
6205
|
+
hasExpandableContent(log) && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6206
|
+
api.Nn,
|
|
6207
|
+
{
|
|
6208
|
+
onClick: () => toggleExpand(log.documentId),
|
|
6209
|
+
variant: "ghost",
|
|
6210
|
+
size: "S",
|
|
6211
|
+
startIcon: expandedRows.has(log.documentId) ? /* @__PURE__ */ jsxRuntime.jsx(index.c5, {}) : /* @__PURE__ */ jsxRuntime.jsx(index.w5, {}),
|
|
6212
|
+
children: expandedRows.has(log.documentId) ? "Hide details" : "Show details"
|
|
6213
|
+
}
|
|
6214
|
+
),
|
|
6215
|
+
expandedRows.has(log.documentId) && hasExpandableContent(log) && /* @__PURE__ */ jsxRuntime.jsx(ExpandableDetails, { children: /* @__PURE__ */ jsxRuntime.jsxs(api.T, { direction: "column", gap: 2, alignItems: "flex-start", children: [
|
|
6216
|
+
log.endpoint && /* @__PURE__ */ jsxRuntime.jsxs(api.E, { variant: "pi", textColor: "neutral600", children: [
|
|
6217
|
+
/* @__PURE__ */ jsxRuntime.jsx("strong", { children: "Endpoint:" }),
|
|
6218
|
+
" ",
|
|
6219
|
+
log.method,
|
|
6220
|
+
" ",
|
|
6221
|
+
log.endpoint
|
|
6222
|
+
] }),
|
|
6223
|
+
log.metadata?.responseTime && /* @__PURE__ */ jsxRuntime.jsxs(api.E, { variant: "pi", textColor: "neutral600", children: [
|
|
6224
|
+
/* @__PURE__ */ jsxRuntime.jsx("strong", { children: "Response Time:" }),
|
|
6225
|
+
" ",
|
|
6226
|
+
log.metadata.responseTime,
|
|
6227
|
+
"ms"
|
|
6228
|
+
] }),
|
|
6229
|
+
log.metadata?.statusCode && /* @__PURE__ */ jsxRuntime.jsxs(api.E, { variant: "pi", textColor: "neutral600", children: [
|
|
6230
|
+
/* @__PURE__ */ jsxRuntime.jsx("strong", { children: "Status Code:" }),
|
|
6231
|
+
" ",
|
|
6232
|
+
log.metadata.statusCode
|
|
6233
|
+
] }),
|
|
6234
|
+
log.userAgent && /* @__PURE__ */ jsxRuntime.jsxs(api.E, { variant: "pi", textColor: "neutral600", children: [
|
|
6235
|
+
/* @__PURE__ */ jsxRuntime.jsx("strong", { children: "User Agent:" }),
|
|
6236
|
+
" ",
|
|
6237
|
+
log.userAgent
|
|
6238
|
+
] }),
|
|
6239
|
+
log.ipAddress && /* @__PURE__ */ jsxRuntime.jsxs(api.E, { variant: "pi", textColor: "neutral600", children: [
|
|
6240
|
+
/* @__PURE__ */ jsxRuntime.jsx("strong", { children: "IP Address:" }),
|
|
6241
|
+
" ",
|
|
6242
|
+
log.ipAddress
|
|
6243
|
+
] }),
|
|
6244
|
+
log.metadata?.responseBody && /* @__PURE__ */ jsxRuntime.jsxs(api.R, { marginTop: 2, children: [
|
|
6245
|
+
/* @__PURE__ */ jsxRuntime.jsx(api.E, { variant: "pi", textColor: "neutral600", fontWeight: "semiBold", children: "Response:" }),
|
|
6246
|
+
/* @__PURE__ */ jsxRuntime.jsx(ResponseBodyContainer, { children: JSON.stringify(log.metadata.responseBody, null, 2) })
|
|
6247
|
+
] })
|
|
6248
|
+
] }) })
|
|
6249
|
+
] }),
|
|
6250
|
+
/* @__PURE__ */ jsxRuntime.jsx(api.E, { variant: "pi", textColor: "neutral500", children: format(new Date(log.createdAt), "yyyy/MM/dd HH:mm") })
|
|
6251
|
+
] }) }, log.documentId)) }),
|
|
6252
|
+
totalPages > 1 && /* @__PURE__ */ jsxRuntime.jsxs(PaginationRow, { children: [
|
|
6253
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6254
|
+
api.Nn,
|
|
6255
|
+
{
|
|
6256
|
+
variant: "tertiary",
|
|
6257
|
+
size: "S",
|
|
6258
|
+
disabled: page === 1,
|
|
6259
|
+
onClick: () => setPage((p) => Math.max(1, p - 1)),
|
|
6260
|
+
children: "Previous"
|
|
6261
|
+
}
|
|
6262
|
+
),
|
|
6263
|
+
/* @__PURE__ */ jsxRuntime.jsxs(api.E, { variant: "pi", textColor: "neutral600", children: [
|
|
6264
|
+
"Page ",
|
|
6265
|
+
page,
|
|
6266
|
+
" of ",
|
|
6267
|
+
totalPages
|
|
6268
|
+
] }),
|
|
6269
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6270
|
+
api.Nn,
|
|
6271
|
+
{
|
|
6272
|
+
variant: "tertiary",
|
|
6273
|
+
size: "S",
|
|
6274
|
+
disabled: page === totalPages,
|
|
6275
|
+
onClick: () => setPage((p) => Math.min(totalPages, p + 1)),
|
|
6276
|
+
children: "Next"
|
|
6277
|
+
}
|
|
6278
|
+
)
|
|
6279
|
+
] })
|
|
6280
|
+
] })
|
|
6281
|
+
] });
|
|
6282
|
+
};
|
|
5954
6283
|
const MetaWrapper = styled__default.default(api.R)`
|
|
5955
6284
|
width: 100%;
|
|
5956
6285
|
display: flex;
|
|
@@ -6094,177 +6423,193 @@ const EditUserForm = ({ data }) => {
|
|
|
6094
6423
|
isSubmitButtonDisabled: isSubmitDisabled
|
|
6095
6424
|
}
|
|
6096
6425
|
),
|
|
6097
|
-
/* @__PURE__ */ jsxRuntime.
|
|
6098
|
-
|
|
6099
|
-
|
|
6100
|
-
|
|
6101
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
6102
|
-
|
|
6103
|
-
|
|
6104
|
-
|
|
6105
|
-
|
|
6106
|
-
|
|
6107
|
-
|
|
6108
|
-
|
|
6109
|
-
|
|
6110
|
-
|
|
6111
|
-
|
|
6112
|
-
|
|
6113
|
-
|
|
6114
|
-
|
|
6115
|
-
/* @__PURE__ */ jsxRuntime.jsxs(api.T, { gap: 1, children: [
|
|
6116
|
-
/* @__PURE__ */ jsxRuntime.jsx(api.E, { variant: "sigma", textColor: "neutral600", children: "Firebase User ID:" }),
|
|
6117
|
-
/* @__PURE__ */ jsxRuntime.jsx(api.E, { variant: "sigma", textColor: "neutral600", children: userData.firebaseUserID || userData.uid })
|
|
6118
|
-
] }),
|
|
6119
|
-
locationState?.strapiId && /* @__PURE__ */ jsxRuntime.jsxs(api.T, { gap: 1, children: [
|
|
6120
|
-
/* @__PURE__ */ jsxRuntime.jsx(api.E, { variant: "sigma", textColor: "neutral600", children: "Strapi ID:" }),
|
|
6121
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6122
|
-
api.E,
|
|
6123
|
-
{
|
|
6124
|
-
variant: "sigma",
|
|
6125
|
-
textColor: "primary600",
|
|
6126
|
-
component: "a",
|
|
6127
|
-
onClick: (e2) => {
|
|
6128
|
-
e2.preventDefault();
|
|
6129
|
-
navigate(
|
|
6130
|
-
`/content-manager/collection-types/plugin::users-permissions.user/${userData.strapiDocumentId || userData.documentId || locationState.strapiDocumentId}`
|
|
6131
|
-
);
|
|
6132
|
-
},
|
|
6133
|
-
style: {
|
|
6134
|
-
cursor: "pointer",
|
|
6135
|
-
textDecoration: "underline"
|
|
6136
|
-
},
|
|
6137
|
-
children: locationState.strapiId
|
|
6138
|
-
}
|
|
6139
|
-
)
|
|
6140
|
-
] })
|
|
6141
|
-
] }),
|
|
6142
|
-
/* @__PURE__ */ jsxRuntime.jsx(api.pl, {}),
|
|
6143
|
-
userData.providerData?.map((provider, index2) => /* @__PURE__ */ jsxRuntime.jsxs(m__default.default.Fragment, { children: [
|
|
6144
|
-
index2 > 0 && /* @__PURE__ */ jsxRuntime.jsx(api.pl, {}),
|
|
6426
|
+
/* @__PURE__ */ jsxRuntime.jsxs(admin.Layouts.Content, { children: [
|
|
6427
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6428
|
+
UserFormLayout,
|
|
6429
|
+
{
|
|
6430
|
+
sidebar: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
6431
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
6432
|
+
api.R,
|
|
6433
|
+
{
|
|
6434
|
+
as: "aside",
|
|
6435
|
+
background: "neutral0",
|
|
6436
|
+
borderColor: "neutral150",
|
|
6437
|
+
hasRadius: true,
|
|
6438
|
+
paddingBottom: 2,
|
|
6439
|
+
paddingLeft: 4,
|
|
6440
|
+
paddingRight: 4,
|
|
6441
|
+
paddingTop: 2,
|
|
6442
|
+
shadow: "tableShadow",
|
|
6443
|
+
children: [
|
|
6145
6444
|
/* @__PURE__ */ jsxRuntime.jsxs(api.T, { paddingTop: 2, paddingBottom: 2, direction: "column", alignItems: "flex-start", gap: 2, children: [
|
|
6146
6445
|
/* @__PURE__ */ jsxRuntime.jsxs(api.T, { gap: 1, children: [
|
|
6147
|
-
/* @__PURE__ */ jsxRuntime.jsx(api.E, { variant: "sigma", textColor: "neutral600", children: "
|
|
6148
|
-
/* @__PURE__ */ jsxRuntime.jsx(api.E, { variant: "sigma", textColor: "neutral600", children:
|
|
6446
|
+
/* @__PURE__ */ jsxRuntime.jsx(api.E, { variant: "sigma", textColor: "neutral600", children: "Firebase User ID:" }),
|
|
6447
|
+
/* @__PURE__ */ jsxRuntime.jsx(api.E, { variant: "sigma", textColor: "neutral600", children: userData.firebaseUserID || userData.uid })
|
|
6149
6448
|
] }),
|
|
6150
|
-
/* @__PURE__ */ jsxRuntime.jsxs(api.T, { gap: 1, children: [
|
|
6151
|
-
/* @__PURE__ */ jsxRuntime.jsx(api.E, { variant: "sigma", textColor: "neutral600", children: "
|
|
6152
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6449
|
+
locationState?.strapiId && /* @__PURE__ */ jsxRuntime.jsxs(api.T, { gap: 1, children: [
|
|
6450
|
+
/* @__PURE__ */ jsxRuntime.jsx(api.E, { variant: "sigma", textColor: "neutral600", children: "Strapi ID:" }),
|
|
6451
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6452
|
+
api.E,
|
|
6453
|
+
{
|
|
6454
|
+
variant: "sigma",
|
|
6455
|
+
textColor: "primary600",
|
|
6456
|
+
component: "a",
|
|
6457
|
+
onClick: (e2) => {
|
|
6458
|
+
e2.preventDefault();
|
|
6459
|
+
navigate(
|
|
6460
|
+
`/content-manager/collection-types/plugin::users-permissions.user/${userData.strapiDocumentId || userData.documentId || locationState.strapiDocumentId}`
|
|
6461
|
+
);
|
|
6462
|
+
},
|
|
6463
|
+
style: {
|
|
6464
|
+
cursor: "pointer",
|
|
6465
|
+
textDecoration: "underline"
|
|
6466
|
+
},
|
|
6467
|
+
children: locationState.strapiId
|
|
6468
|
+
}
|
|
6469
|
+
)
|
|
6153
6470
|
] })
|
|
6154
|
-
] })
|
|
6155
|
-
] }, index2)),
|
|
6156
|
-
/* @__PURE__ */ jsxRuntime.jsx(api.pl, {}),
|
|
6157
|
-
/* @__PURE__ */ jsxRuntime.jsxs(api.T, { paddingTop: 2, paddingBottom: 2, direction: "column", alignItems: "flex-start", gap: 3, children: [
|
|
6158
|
-
userData.metadata?.lastSignInTime && /* @__PURE__ */ jsxRuntime.jsxs(MetaWrapper, { children: [
|
|
6159
|
-
/* @__PURE__ */ jsxRuntime.jsx(api.E, { variant: "sigma", textColor: "neutral600", children: "Last Sign In Time" }),
|
|
6160
|
-
/* @__PURE__ */ jsxRuntime.jsx(api.E, { variant: "sigma", textColor: "neutral600", children: format(new Date(userData.metadata.lastSignInTime), "yyyy/MM/dd HH:mm z") })
|
|
6161
6471
|
] }),
|
|
6162
|
-
|
|
6163
|
-
|
|
6164
|
-
/* @__PURE__ */ jsxRuntime.jsx(api.
|
|
6472
|
+
/* @__PURE__ */ jsxRuntime.jsx(api.pl, {}),
|
|
6473
|
+
userData.providerData?.map((provider, index2) => /* @__PURE__ */ jsxRuntime.jsxs(m__default.default.Fragment, { children: [
|
|
6474
|
+
index2 > 0 && /* @__PURE__ */ jsxRuntime.jsx(api.pl, {}),
|
|
6475
|
+
/* @__PURE__ */ jsxRuntime.jsxs(api.T, { paddingTop: 2, paddingBottom: 2, direction: "column", alignItems: "flex-start", gap: 2, children: [
|
|
6476
|
+
/* @__PURE__ */ jsxRuntime.jsxs(api.T, { gap: 1, children: [
|
|
6477
|
+
/* @__PURE__ */ jsxRuntime.jsx(api.E, { variant: "sigma", textColor: "neutral600", children: "Provider:" }),
|
|
6478
|
+
/* @__PURE__ */ jsxRuntime.jsx(api.E, { variant: "sigma", textColor: "neutral600", children: provider.providerId })
|
|
6479
|
+
] }),
|
|
6480
|
+
/* @__PURE__ */ jsxRuntime.jsxs(api.T, { gap: 1, children: [
|
|
6481
|
+
/* @__PURE__ */ jsxRuntime.jsx(api.E, { variant: "sigma", textColor: "neutral600", children: "Identifier:" }),
|
|
6482
|
+
/* @__PURE__ */ jsxRuntime.jsx(api.E, { variant: "sigma", textColor: "neutral600", children: provider.uid })
|
|
6483
|
+
] })
|
|
6484
|
+
] })
|
|
6485
|
+
] }, index2)),
|
|
6486
|
+
/* @__PURE__ */ jsxRuntime.jsx(api.pl, {}),
|
|
6487
|
+
/* @__PURE__ */ jsxRuntime.jsxs(api.T, { paddingTop: 2, paddingBottom: 2, direction: "column", alignItems: "flex-start", gap: 3, children: [
|
|
6488
|
+
userData.metadata?.lastSignInTime && /* @__PURE__ */ jsxRuntime.jsxs(MetaWrapper, { children: [
|
|
6489
|
+
/* @__PURE__ */ jsxRuntime.jsx(api.E, { variant: "sigma", textColor: "neutral600", children: "Last Sign In Time" }),
|
|
6490
|
+
/* @__PURE__ */ jsxRuntime.jsx(api.E, { variant: "sigma", textColor: "neutral600", children: format(new Date(userData.metadata.lastSignInTime), "yyyy/MM/dd HH:mm z") })
|
|
6491
|
+
] }),
|
|
6492
|
+
(userData.metadata?.creationTime || userData.createdAt) && /* @__PURE__ */ jsxRuntime.jsxs(MetaWrapper, { children: [
|
|
6493
|
+
/* @__PURE__ */ jsxRuntime.jsx(api.E, { variant: "sigma", textColor: "neutral600", children: "Creation Time" }),
|
|
6494
|
+
/* @__PURE__ */ jsxRuntime.jsx(api.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") : "-" })
|
|
6495
|
+
] })
|
|
6165
6496
|
] })
|
|
6166
|
-
]
|
|
6167
|
-
|
|
6168
|
-
|
|
6169
|
-
|
|
6170
|
-
|
|
6171
|
-
|
|
6172
|
-
|
|
6173
|
-
|
|
6174
|
-
|
|
6175
|
-
|
|
6176
|
-
|
|
6177
|
-
|
|
6178
|
-
|
|
6179
|
-
|
|
6180
|
-
|
|
6181
|
-
|
|
6182
|
-
|
|
6183
|
-
|
|
6184
|
-
|
|
6185
|
-
|
|
6186
|
-
|
|
6187
|
-
|
|
6188
|
-
|
|
6189
|
-
|
|
6190
|
-
|
|
6191
|
-
|
|
6192
|
-
|
|
6193
|
-
|
|
6194
|
-
|
|
6195
|
-
|
|
6196
|
-
}
|
|
6497
|
+
]
|
|
6498
|
+
}
|
|
6499
|
+
),
|
|
6500
|
+
/* @__PURE__ */ jsxRuntime.jsx(api.R, { marginTop: 5, marginBottom: 5 }),
|
|
6501
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
6502
|
+
api.R,
|
|
6503
|
+
{
|
|
6504
|
+
as: "aside",
|
|
6505
|
+
background: "neutral0",
|
|
6506
|
+
borderColor: "neutral150",
|
|
6507
|
+
hasRadius: true,
|
|
6508
|
+
paddingBottom: 4,
|
|
6509
|
+
paddingLeft: 4,
|
|
6510
|
+
paddingRight: 4,
|
|
6511
|
+
paddingTop: 4,
|
|
6512
|
+
shadow: "tableShadow",
|
|
6513
|
+
children: [
|
|
6514
|
+
/* @__PURE__ */ jsxRuntime.jsx(api.E, { variant: "sigma", textColor: "neutral600", marginBottom: 2, children: "Account Actions" }),
|
|
6515
|
+
/* @__PURE__ */ jsxRuntime.jsxs(api.T, { direction: "column", gap: 2, children: [
|
|
6516
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6517
|
+
PasswordResetButton,
|
|
6518
|
+
{
|
|
6519
|
+
user: userData,
|
|
6520
|
+
fullWidth: true,
|
|
6521
|
+
onClick: () => {
|
|
6522
|
+
setShowResetPasswordDialog({
|
|
6523
|
+
isOpen: true,
|
|
6524
|
+
email: userData.email || "",
|
|
6525
|
+
id: userData.uid || ""
|
|
6526
|
+
});
|
|
6527
|
+
}
|
|
6197
6528
|
}
|
|
6198
|
-
|
|
6199
|
-
|
|
6200
|
-
|
|
6201
|
-
|
|
6529
|
+
),
|
|
6530
|
+
userData.email && !userData.emailVerified && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6531
|
+
api.Nn,
|
|
6532
|
+
{
|
|
6533
|
+
variant: "secondary",
|
|
6534
|
+
fullWidth: true,
|
|
6535
|
+
onClick: () => {
|
|
6536
|
+
setShowVerificationDialog({
|
|
6537
|
+
isOpen: true,
|
|
6538
|
+
email: userData.email || "",
|
|
6539
|
+
id: userData.uid || ""
|
|
6540
|
+
});
|
|
6541
|
+
},
|
|
6542
|
+
children: "Resend Verification Email"
|
|
6543
|
+
}
|
|
6544
|
+
)
|
|
6545
|
+
] })
|
|
6546
|
+
]
|
|
6547
|
+
}
|
|
6548
|
+
),
|
|
6549
|
+
/* @__PURE__ */ jsxRuntime.jsx(api.R, { marginTop: 5, marginBottom: 5 }),
|
|
6550
|
+
userData.localUser && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6551
|
+
api.R,
|
|
6552
|
+
{
|
|
6553
|
+
as: "aside",
|
|
6554
|
+
background: "neutral0",
|
|
6555
|
+
borderColor: "neutral150",
|
|
6556
|
+
hasRadius: true,
|
|
6557
|
+
paddingBottom: 1,
|
|
6558
|
+
paddingLeft: 2,
|
|
6559
|
+
paddingRight: 2,
|
|
6560
|
+
paddingTop: 1,
|
|
6561
|
+
shadow: "tableShadow",
|
|
6562
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(api.R, { paddingTop: 2, paddingBottom: 2, children: [
|
|
6563
|
+
/* @__PURE__ */ jsxRuntime.jsx(DetailsButtonWrapper, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6564
|
+
api.zc,
|
|
6202
6565
|
{
|
|
6203
|
-
|
|
6204
|
-
|
|
6205
|
-
|
|
6206
|
-
|
|
6207
|
-
|
|
6208
|
-
|
|
6209
|
-
id: userData.uid || ""
|
|
6210
|
-
});
|
|
6211
|
-
},
|
|
6212
|
-
children: "Resend Verification Email"
|
|
6566
|
+
startIcon: /* @__PURE__ */ jsxRuntime.jsx(index._3, {}),
|
|
6567
|
+
onClick: () => navigate(
|
|
6568
|
+
`/content-manager/collection-types/plugin::users-permissions.user/${userData.localUser?.id}`
|
|
6569
|
+
),
|
|
6570
|
+
style: { cursor: "pointer" },
|
|
6571
|
+
children: "Details"
|
|
6213
6572
|
}
|
|
6214
|
-
)
|
|
6573
|
+
) }),
|
|
6574
|
+
/* @__PURE__ */ jsxRuntime.jsxs(ContentWrapper, { children: [
|
|
6575
|
+
/* @__PURE__ */ jsxRuntime.jsx(api.E, { variant: "sigma", textColor: "neutral600", children: "local user:" }),
|
|
6576
|
+
/* @__PURE__ */ jsxRuntime.jsx(api.E, { variant: "sigma", textColor: "neutral600", children: userData.localUser.username })
|
|
6577
|
+
] })
|
|
6215
6578
|
] })
|
|
6216
|
-
|
|
6217
|
-
|
|
6218
|
-
),
|
|
6219
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6220
|
-
|
|
6221
|
-
api.R,
|
|
6579
|
+
}
|
|
6580
|
+
)
|
|
6581
|
+
] }),
|
|
6582
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6583
|
+
UserFormFields,
|
|
6222
6584
|
{
|
|
6223
|
-
|
|
6224
|
-
|
|
6225
|
-
|
|
6226
|
-
|
|
6227
|
-
|
|
6228
|
-
|
|
6229
|
-
|
|
6230
|
-
|
|
6231
|
-
|
|
6232
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(api.R, { paddingTop: 2, paddingBottom: 2, children: [
|
|
6233
|
-
/* @__PURE__ */ jsxRuntime.jsx(DetailsButtonWrapper, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6234
|
-
api.zc,
|
|
6235
|
-
{
|
|
6236
|
-
startIcon: /* @__PURE__ */ jsxRuntime.jsx(index._3, {}),
|
|
6237
|
-
onClick: () => navigate(
|
|
6238
|
-
`/content-manager/collection-types/plugin::users-permissions.user/${userData.localUser?.id}`
|
|
6239
|
-
),
|
|
6240
|
-
style: { cursor: "pointer" },
|
|
6241
|
-
children: "Details"
|
|
6242
|
-
}
|
|
6243
|
-
) }),
|
|
6244
|
-
/* @__PURE__ */ jsxRuntime.jsxs(ContentWrapper, { children: [
|
|
6245
|
-
/* @__PURE__ */ jsxRuntime.jsx(api.E, { variant: "sigma", textColor: "neutral600", children: "local user:" }),
|
|
6246
|
-
/* @__PURE__ */ jsxRuntime.jsx(api.E, { variant: "sigma", textColor: "neutral600", children: userData.localUser.username })
|
|
6247
|
-
] })
|
|
6248
|
-
] })
|
|
6585
|
+
userData,
|
|
6586
|
+
onTextInputChange: handlers.onTextInputChange,
|
|
6587
|
+
onPhoneChange: handlers.onPhoneChange,
|
|
6588
|
+
onToggleInputChange: handlers.onToggleInputChange,
|
|
6589
|
+
onEmailBlur: handlers.onEmailBlur,
|
|
6590
|
+
emailError,
|
|
6591
|
+
phoneError,
|
|
6592
|
+
showPasswordHint: true,
|
|
6593
|
+
hasBeenTouched: true
|
|
6249
6594
|
}
|
|
6250
6595
|
)
|
|
6251
|
-
|
|
6252
|
-
|
|
6253
|
-
|
|
6254
|
-
|
|
6255
|
-
|
|
6256
|
-
|
|
6257
|
-
|
|
6258
|
-
|
|
6259
|
-
|
|
6260
|
-
|
|
6261
|
-
|
|
6262
|
-
|
|
6263
|
-
|
|
6264
|
-
}
|
|
6265
|
-
|
|
6266
|
-
}
|
|
6267
|
-
|
|
6596
|
+
}
|
|
6597
|
+
),
|
|
6598
|
+
/* @__PURE__ */ jsxRuntime.jsx(api.R, { marginTop: 6, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6599
|
+
api.R,
|
|
6600
|
+
{
|
|
6601
|
+
background: "neutral0",
|
|
6602
|
+
borderColor: "neutral150",
|
|
6603
|
+
hasRadius: true,
|
|
6604
|
+
paddingBottom: 4,
|
|
6605
|
+
paddingLeft: 4,
|
|
6606
|
+
paddingRight: 4,
|
|
6607
|
+
paddingTop: 4,
|
|
6608
|
+
shadow: "tableShadow",
|
|
6609
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(ActivityLog, { firebaseUserId: userData.uid || userData.firebaseUserID || "" })
|
|
6610
|
+
}
|
|
6611
|
+
) })
|
|
6612
|
+
] }),
|
|
6268
6613
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6269
6614
|
ResetPassword,
|
|
6270
6615
|
{
|